Merge lp:~sergei.glushchenko/percona-server/5.5-ST29724_bug1132194 into lp:percona-server/5.5

Proposed by Sergei Glushchenko
Status: Merged
Approved by: Laurynas Biveinis
Approved revision: no longer in the source branch.
Merged at revision: 544
Proposed branch: lp:~sergei.glushchenko/percona-server/5.5-ST29724_bug1132194
Merge into: lp:percona-server/5.5
Diff against target: 2490 lines (+2350/-9)
11 files modified
Percona-Server/mysql-test/suite/binlog/r/binlog_stm_ps.result (+0/-2)
Percona-Server/mysql-test/suite/binlog/r/binlog_stm_unsafe_warning.result (+0/-4)
Percona-Server/mysql-test/suite/binlog/r/percona_binlog_unsafe_limit.result (+1581/-0)
Percona-Server/mysql-test/suite/binlog/t/percona_binlog_unsafe_limit.test (+227/-0)
Percona-Server/sql/sql_base.cc (+466/-0)
Percona-Server/sql/sql_base.h (+4/-0)
Percona-Server/sql/sql_class.cc (+30/-1)
Percona-Server/sql/sql_class.h (+2/-0)
Percona-Server/sql/sql_lex.h (+11/-0)
Percona-Server/sql/sql_select.cc (+19/-0)
Percona-Server/sql/sql_yacc.yy (+10/-2)
To merge this branch: bzr merge lp:~sergei.glushchenko/percona-server/5.5-ST29724_bug1132194
Reviewer Review Type Date Requested Status
Laurynas Biveinis (community) Needs Information
Review via email: mp+152714@code.launchpad.net

Description of the change

  BUG#1132194: UPDATE/DELETE with LIMIT clause unsafe for SBR
  even when ORDER BY PK is present

  MYSQL BUGUG#42415 UPDATE/DELETE with LIMIT clause unsafe for SBL
  even with ORDER BY PK clause

  This is an adoption of http://lists.mysql.com/commits/126382

  This is only a partial solution which allows to suppress warning
  in many cases when statement with LIMIT isn't really nondeterministic.
  Partial means that in mixed mode all statements with LIMIT will be
  switched to ROW unconditionally. To determine whether the staments is
  really unsafe some analysis of query should be performed. This requires
  in particular all tables should be opened and all fields should be
  fixed. However decision to switch to ROW mode is made before this
  happens.

  Original description:
  UPDATE/DELETE/INSERT..SELECT with LIMIT clause were considered unsafe
  unconditionally, even if there is an ORDER BY PK or WHERE condition
  that can guarantee the result to be deterministic.

  The problem is fixed by implementing a algorithm to do more elaborate
  analyzed on the nature of the query to determine whether the query
  will cause uncertainty for replication or not.

  The statement will not be considered unsafe for following cases:
   - single table UPDATE/DELETE/INSERT..SELECT with ORDER BY
     <non null unique key>
   - single table UPDATE/DELETE/INSERT..SELECT with WHERE clause
     that include <non null unique key> = <const value>, if it is
     a multi-part key, then it must be <keypart1>=<const1> AND
     <keypart2>=<const2> ..., and this condition is ANDed with
     other conditions if there is any.
   - single table INSERT..SELECT with WHERE clause
     that include some parts of the non null unique key compare to
     const values, and the ORDER BY clause includes all the other
     key pars of the same non null unique key. for example (a,b) is
     a non null unique key, then WHERE a=<const> ORDER b will make
     the query result deterministic.
   - for INSERT..SELECT ... JOIN ..., the join condition (ON,
     USING, or WHERE) must include equations between columns of
     non null unique key of tables from both side of the join.
     For example t1 JOIN t2 USING (a,b), if (a,b) is not a non null
     unique key for both t1 and t2, then the result will be non-
     deterministic. otherwise the result can be deterministic with
     appropirate WHERE/ORDER clauses, and in this case, the same
     rule for single table above applys. But there is a difference
     for INNER JOIN with OUTER JOIN, for OUTER JOIN, only one table
     of the two JOIN tables will be used when checking the WHERE/ORDER
     conditions, it's the left table for LEFT JOIN and the right one
     for RIGHT JOIN when checking the keys. On the other hand, for
     INNER JOIN, keys from both tables can be used when checking
     the conditions. For example:
       INSERT..SELECT * FROM t1 INNER JOIN t2 USING(pk) ORDER BY nnuk LIMIT 1;
     This can be safe if nnuk is a non null unique key of either
     t1 or t2. But if we change the INNER JOIN to LEFT JOIN or
     RIGHT JOIN, then nnuk must be a non null unique key key of
     t1 (LEFT JOIN) or t2 (RIGHT JOIN) respectively.
   - If JOIN are nested, the will be handled recursively from inner
     outside.
   - UNIONs without global LIMIT are unsafe if any of sub-selects
     is unsafe, and safe if all sub-selects are safe. UNIONs with
     global LIMIT are marked unsafe no matter this is ORDER BY or
     not.

  If the key field length is longer than MAX_SORT_LENGTH, then it
  will be ignore and not treated as a key field.

http://jenkins.percona.com/view/PS%205.5/job/percona-server-5.5-param/701/

To post a comment you must log in.
Revision history for this message
Laurynas Biveinis (laurynas-biveinis) wrote :

    - Unfortunately the patch is knowingly suboptimal, see
      http://lists.mysql.com/commits/128836. The question is whether
      it's OK for us in the current form or if we should spend time
      improving it. I think it's acceptable for small joins but the
      overhead might be noticable for big ones. Is it possible to
      quantify this somehow?

    - The algorithm itself looks OK to me, but I am not too confident
      in my review.

    - Low-level code review:

    - All TRUE/FALSE should be replaced with true/false where a proper
      "bool" type is used, in code and comments.

    - is_cond_equal/is_cond_mult_equal: should be static, const arg,
      s/TRUE/true, s/FALSE/false, if (x) return true; else return
      false should be replaced by return x;

    - class Node: field todo should be protected.

    - Add virtual keyword to all add_successor() and desctructor
      declarations in the children classes.

    - class Table_node: const TABLE* table; const arg for
      constructor. get_column_node: const reference arg, const
      method. create_column_node, create_key_node: const reference arg.

    - class Const_ordered_table_node: likewise (const table field,
      const args). Initialize ordered_table_node/const_table_node in
      the constructor initializer list Is there a memory leak for
      ordered_table_node/const_table_node?

    - class Join_node: likewise constify what is constifiable.

    - Likewise constify other new classes/functions.

    - sql_class.h: order_deterministic should be initialized in the
      constructor initializer list and to false, not 0.

review: Needs Fixing
Revision history for this message
Sergei Glushchenko (sergei.glushchenko) wrote :

Laurynas,

Yes, the problem is rather complex. I can propose 2 options.

1. Measure performance impact of this patch, try to optimize it (get rid of memory allocations, etc.)
2. Do not implement the whole thing, analyze only few simple and most common cases for example SELECT * FROM table ORDER BY UNIQUE KEY

Thanks,
Sergei

Revision history for this message
Laurynas Biveinis (laurynas-biveinis) wrote :

Sergei -

Let's implement the later comments on the bug and on the upstream patch review.

Revision history for this message
Sergei Glushchenko (sergei.glushchenko) wrote :

Hi Laurynas,

Looks like I have it:)

> - All TRUE/FALSE should be replaced with true/false where a proper
> "bool" type is used, in code and comments.

Done.

> - is_cond_equal/is_cond_mult_equal: should be static, const arg,
> s/TRUE/true, s/FALSE/false, if (x) return true; else return
> false should be replaced by return x;

Done.

> - class Node: field todo should be protected.

Field todo cannot be protected because class Join_node mantpulates it directly.

> - Add virtual keyword to all add_successor() and desctructor
> declarations in the children classes.

Done, but is any strict guidance for it? Once virtual method is always virtual.

> - class Table_node: const TABLE* table; const arg for
> constructor. get_column_node: const reference arg, const
> method. create_column_node, create_key_node: const reference arg.

Done.

> - class Const_ordered_table_node: likewise (const table field,
> const args). Initialize ordered_table_node/const_table_node in
> the constructor initializer list Is there a memory leak for
> ordered_table_node/const_table_node?

There is no memory leak, table node is the subclass of Sql_alloc.

> - class Join_node: likewise constify what is constifiable.
> - Likewise constify other new classes/functions.

Done.

> - sql_class.h: order_deterministic should be initialized in the
> constructor initializer list and to false, not 0.

Done. But I don't really like it, because it always take some time
to find a good position of initializer list when doing merge.

Revision history for this message
Sergei Glushchenko (sergei.glushchenko) wrote :
Revision history for this message
Sergei Glushchenko (sergei.glushchenko) wrote :

MP for 5.6 goes through Jenkins param build. Should be ready later today.

Revision history for this message
Laurynas Biveinis (laurynas-biveinis) wrote :

> > - class Node: field todo should be protected.
>
> Field todo cannot be protected because class Join_node mantpulates it
> directly.

But Join_node inherits from Node?

> > - Add virtual keyword to all add_successor() and desctructor
> > declarations in the children classes.
>
> Done, but is any strict guidance for it? Once virtual method is always
> virtual.

Yes, that's why IMHO it's a good idea to add it at a child classes. Otherwise it's hard to tell virtualness, if it was made virtual at greatgrandparent class.

Revision history for this message
Laurynas Biveinis (laurynas-biveinis) wrote :

    - s/propogation/propagation/g

    - is_cond_equal/is_cond_mult_equal should be static, const arg.

    - class Node: field todo should be protected.

    - class Table_node: columns should be initialized in the
      initializer list and memset in the body.

review: Needs Fixing
Revision history for this message
Sergei Glushchenko (sergei.glushchenko) wrote :

Well as for todo field. An attempt to compile following simple program gives me error message both for g++ and clang, and I believe it is correct.

class BaseNode {
protected:
 int todo;
};

class ChildNode : public BaseNode {
public:
 void donow(BaseNode* node) {
  node->todo++;
 }
};

~/percona/test❯ g++ -c todo.cc
todo.cc: In member function ‘void ChildNode::donow(BaseNode*)’:
todo.cc:3: error: ‘int BaseNode::todo’ is protected
todo.cc:9: error: within this context

~/percona/test❯ c++ -c todo.cc
todo.cc:9:9: error: 'todo' is a protected member of 'BaseNode'
                node->todo++;
                      ^
todo.cc:3:6: note: can only access this member on an object of type 'ChildNode'
        int todo;
            ^
1 error generated.

Revision history for this message
Laurynas Biveinis (laurynas-biveinis) wrote :

Sorry, I missed it was a field in another object, not this. Either leave it public, either make it protected and add a friend class declaration, as you wish.

Revision history for this message
Sergei Glushchenko (sergei.glushchenko) wrote :

Done.

Since both todo and predecessors are used in same manner, todo is only used in Join_node, and predecessors is used also in Or_node and And_node, they should either be both protected, or both public. I don't like to use 'friend' keyword.

Class hierarchy can be refactored to avoid 'friend' tricks, but I prefer to leave it as is. If we want to refactor class hierarchy, I'd also implement some of improvements listed in upstream review.

Revision history for this message
Laurynas Biveinis (laurynas-biveinis) wrote :

> Class hierarchy can be refactored to avoid 'friend' tricks, but I prefer to
> leave it as is. If we want to refactor class hierarchy, I'd also implement
> some of improvements listed in upstream review.

Agree

Revision history for this message
Laurynas Biveinis (laurynas-biveinis) wrote :

Approve.

Again for the record my review is quite superficial, and we know that the fix is suboptimal, but it looks good enough and it's not invasive should we need further improve it / revert it / eventually replace with the upstream fix / etc.

review: Approve
Revision history for this message
Laurynas Biveinis (laurynas-biveinis) wrote :

Err what about a Jenkins run?

review: Needs Information
Revision history for this message
Sergei Glushchenko (sergei.glushchenko) wrote :

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'Percona-Server/mysql-test/suite/binlog/r/binlog_stm_ps.result'
2--- Percona-Server/mysql-test/suite/binlog/r/binlog_stm_ps.result 2010-04-28 12:47:49 +0000
3+++ Percona-Server/mysql-test/suite/binlog/r/binlog_stm_ps.result 2013-06-26 17:10:34 +0000
4@@ -10,8 +10,6 @@
5 prepare s from "insert into t1 select 100 limit ?";
6 set @a=100;
7 execute s using @a;
8-Warnings:
9-Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
10 show binlog events from <binlog_start>;
11 Log_name Pos Event_type Server_id End_log_pos Info
12 master-bin.000001 # Query # # use `test`; create table t1 (a int)
13
14=== modified file 'Percona-Server/mysql-test/suite/binlog/r/binlog_stm_unsafe_warning.result'
15--- Percona-Server/mysql-test/suite/binlog/r/binlog_stm_unsafe_warning.result 2012-01-06 10:22:56 +0000
16+++ Percona-Server/mysql-test/suite/binlog/r/binlog_stm_unsafe_warning.result 2013-06-26 17:10:34 +0000
17@@ -4,11 +4,7 @@
18 CREATE TABLE t1 (a int, b int, primary key (a));
19 INSERT INTO t1 VALUES (1,2), (2,3);
20 UPDATE t1 SET b='4' WHERE a=1 LIMIT 1;
21-Warnings:
22-Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
23 UPDATE t1 SET b='5' WHERE a=2 ORDER BY a LIMIT 1;
24-Warnings:
25-Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
26 DROP TABLE t1;
27 ### NOT filtered database => assertion: binlog disabled and warnings ARE NOT shown
28 SET SQL_LOG_BIN= 0;
29
30=== added file 'Percona-Server/mysql-test/suite/binlog/r/percona_binlog_unsafe_limit.result'
31--- Percona-Server/mysql-test/suite/binlog/r/percona_binlog_unsafe_limit.result 1970-01-01 00:00:00 +0000
32+++ Percona-Server/mysql-test/suite/binlog/r/percona_binlog_unsafe_limit.result 2013-06-26 17:10:34 +0000
33@@ -0,0 +1,1581 @@
34+CREATE TABLE t (nokey INT, pk INT PRIMARY KEY, nnuk INT NOT NULL UNIQUE KEY, nuk INT UNIQUE KEY,
35+nnuk1 INT NOT NULL, nnuk2 INT NOT NULL, UNIQUE KEY(nnuk1, nnuk2),
36+nnuk_str_long VARCHAR(512) NOT NULL UNIQUE KEY,
37+nnuk_str_short VARCHAR(50) NOT NULL UNIQUE KEY);
38+CREATE TABLE t1 LIKE t;
39+CREATE TABLE t2 LIKE t;
40+CREATE TABLE t3 LIKE t;
41+CREATE TABLE t4 LIKE t;
42+CREATE TABLE queries (query VARCHAR(1024) NOT NULL);
43+CREATE TABLE result_queries (id INT AUTO_INCREMENT PRIMARY KEY, query VARCHAR(1024) NOT NULL);
44+CREATE TABLE limits (`limit` VARCHAR(256) NOT NULL);
45+INSERT INTO queries(query) VALUES
46+('UPDATE t SET nokey = nokey + 10 [LIMIT_1]'),
47+('UPDATE t SET nokey = nokey + 10 WHERE nokey=1 [LIMIT_1]'),
48+('UPDATE t SET nokey = nokey + 10 WHERE nuk=1 [LIMIT_1]'),
49+('UPDATE t SET nokey = nokey + 10 WHERE nnuk=1 [LIMIT_1]'),
50+('UPDATE t SET nokey = nokey + 10 WHERE pk=1 [LIMIT_1]'),
51+('DELETE FROM t [LIMIT_1]'),
52+('DELETE FROM t WHERE nokey=1 [LIMIT_1]'),
53+('DELETE FROM t WHERE nuk=1 [LIMIT_1]'),
54+('DELETE FROM t WHERE nnuk=1 [LIMIT_1]'),
55+('DELETE FROM t WHERE pk=1 [LIMIT_1]'),
56+('REPLACE INTO t SELECT * FROM t1 [LIMIT_1]'),
57+('REPLACE INTO t SELECT * FROM t1 WHERE nokey=1 [LIMIT_1]'),
58+('REPLACE INTO t SELECT * FROM t1 WHERE nuk=1 [LIMIT_1]'),
59+('REPLACE INTO t SELECT * FROM t1 WHERE nnuk=1 [LIMIT_1]'),
60+('REPLACE INTO t SELECT * FROM t1 WHERE pk=1 [LIMIT_1]'),
61+('INSERT INTO t SELECT * FROM t1 [LIMIT_1]'),
62+('INSERT INTO t SELECT * FROM t1 WHERE nokey=1 [LIMIT_1]'),
63+('INSERT INTO t SELECT * FROM t1 WHERE nuk=1 [LIMIT_1]'),
64+('INSERT INTO t SELECT * FROM t1 WHERE nnuk=1 [LIMIT_1]'),
65+('INSERT INTO t SELECT * FROM t1 WHERE pk=1 [LIMIT_1]'),
66+('INSERT INTO t (SELECT * FROM t1) UNION (SELECT * FROM t2) [LIMIT_1]'),
67+('INSERT INTO t (SELECT * FROM t1 [LIMIT_1]) UNION (SELECT * FROM t2)'),
68+('INSERT INTO t (SELECT * FROM t1) UNION (SELECT * FROM t2 [LIMIT_1])'),
69+('INSERT INTO t (SELECT * FROM t1 [LIMIT_1]) UNION (SELECT * FROM t2 [LIMIT_2])'),
70+('INSERT INTO t SELECT * FROM (SELECT * FROM t1 [LIMIT_1]) AS subselect [LIMIT_2]'),
71+('INSERT INTO t SELECT * FROM t1 WHERE pk IN (SELECT t2.pk FROM t2 WHERE t1.pk = t2.pk) [LIMIT_1]'),
72+('INSERT INTO t SELECT t1.* FROM t1, t2 [LIMIT_1]'),
73+('INSERT INTO t SELECT t1.* FROM t1, t2 WHERE t1.nokey=t2.nokey [LIMIT_1]'),
74+('INSERT INTO t SELECT t1.* FROM t1, t2 WHERE t1.nuk=t2.nuk [LIMIT_1]'),
75+('INSERT INTO t SELECT t1.* FROM t1, t2 WHERE t1.nnuk=t2.nnuk [LIMIT_1]'),
76+('INSERT INTO t SELECT t1.* FROM t1, t2 WHERE t1.pk=t2.pk [LIMIT_1]'),
77+('INSERT INTO t SELECT t1.* FROM t1 NATURAL JOIN t2 [LIMIT_1]'),
78+('INSERT INTO t SELECT t1.* FROM t1 JOIN t2 USING(pk) [LIMIT_1]'),
79+('INSERT INTO t SELECT t1.* FROM t1 JOIN t2 ON t1.nnuk1=t2.nnuk1 AND t1.nnuk2=t2.nnuk2 [LIMIT_1]'),
80+('INSERT INTO t SELECT t1.* FROM t1 JOIN t2 ON t1.nnuk1=t2.nnuk2 AND t1.nnuk2=t2.nnuk1 [LIMIT_1]'),
81+('INSERT INTO t SELECT t1.* FROM t1 JOIN (t2 JOIN t3 USING (pk)) USING(pk) [LIMIT_1]'),
82+('INSERT INTO t SELECT t1.* FROM t1 JOIN (t2 JOIN (t3 JOIN t4 USING (pk)) ON t2.pk=t3.pk) ON t1.pk=t4.pk [LIMIT_1]'),
83+('INSERT INTO t SELECT t1.* FROM t1 JOIN (t2 JOIN (t3 JOIN t4 USING (pk)) ON t2.nnuk=t3.nnuk) ON t1.nnuk1=t4.nnuk1 AND t1.nnuk2=t4.nnuk2 [LIMIT_1]'),
84+('INSERT INTO t SELECT t1.* FROM t1 JOIN (t2 JOIN (t3 JOIN t4 USING (pk)) ON t2.nnuk=t3.nnuk) ON t1.nnuk1=t4.nnuk1 AND t1.nnuk2=t4.nnuk2 AND t2.pk=1 [LIMIT_1]'),
85+('INSERT INTO t SELECT t1.* FROM t1 LEFT JOIN t2 ON t1.pk=t2.pk [LIMIT_1]'),
86+('INSERT INTO t SELECT t2.* FROM t1 RIGHT JOIN t2 ON t1.pk=t2.pk [LIMIT_1]');
87+INSERT INTO limits (`limit`) VALUES
88+('LIMIT 0'),
89+('LIMIT 1'),
90+('ORDER BY nokey LIMIT 1'),
91+('ORDER BY nuk LIMIT 1'),
92+('ORDER BY nnuk1 LIMIT 1'),
93+('ORDER BY nnuk LIMIT 1'),
94+('ORDER BY nnuk_str_short LIMIT 1'),
95+('ORDER BY nnuk_str_long LIMIT 1'),
96+('ORDER BY pk LIMIT 1'),
97+('ORDER BY nnuk1, nnuk2 LIMIT 1'),
98+('ORDER BY nnuk1, nnuk2, nokey LIMIT 1'),
99+('ORDER BY nnuk1, nokey, nnuk2 LIMIT 1');
100+CREATE PROCEDURE gen_queries()
101+BEGIN
102+DECLARE done INT DEFAULT 0;
103+DECLARE q VARCHAR(1024);
104+DECLARE limit1, limit2 VARCHAR(256);
105+DECLARE qcur CURSOR FOR SELECT * FROM queries;
106+DECLARE lcur1 CURSOR FOR SELECT * FROM limits;
107+DECLARE lcur2 CURSOR FOR SELECT * FROM limits;
108+DECLARE CONTINUE HANDLER FOR NOT FOUND SET done=1;
109+OPEN qcur;
110+FETCH qcur INTO q;
111+WHILE done <> 1 DO
112+OPEN lcur1;
113+FETCH lcur1 INTO limit1;
114+WHILE done <> 1 DO
115+IF LOCATE('[LIMIT_2]', q) > 0 THEN
116+OPEN lcur2;
117+FETCH lcur2 INTO limit2;
118+WHILE done <> 1 DO
119+SELECT REPLACE(REPLACE(q, '[LIMIT_1]', limit1), '[LIMIT_2]', limit2) INTO @query;
120+FETCH lcur2 INTO limit2;
121+END WHILE;
122+CLOSE lcur2;
123+SET done = 0;
124+ELSE
125+SELECT REPLACE(q, '[LIMIT_1]', limit1) INTO @query;
126+END IF;
127+INSERT INTO result_queries set query=@query;
128+FETCH lcur1 INTO limit1;
129+END WHILE;
130+CLOSE lcur1;
131+SET done = 0;
132+FETCH qcur INTO q;
133+END WHILE;
134+CLOSE qcur;
135+END|
136+call gen_queries();
137+Warnings:
138+Error 1329 No data - zero rows fetched, selected, or processed
139+SET MAX_SORT_LENGTH=50;
140+UPDATE t SET nokey = nokey + 10 LIMIT 0;
141+ROWS in table t: 2
142+UPDATE t SET nokey = nokey + 10 LIMIT 1;
143+Warnings:
144+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
145+ROWS in table t: 2
146+UPDATE t SET nokey = nokey + 10 ORDER BY nokey LIMIT 1;
147+Warnings:
148+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
149+ROWS in table t: 2
150+UPDATE t SET nokey = nokey + 10 ORDER BY nuk LIMIT 1;
151+Warnings:
152+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
153+ROWS in table t: 2
154+UPDATE t SET nokey = nokey + 10 ORDER BY nnuk1 LIMIT 1;
155+Warnings:
156+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
157+ROWS in table t: 2
158+UPDATE t SET nokey = nokey + 10 ORDER BY nnuk LIMIT 1;
159+ROWS in table t: 2
160+UPDATE t SET nokey = nokey + 10 ORDER BY nnuk_str_short LIMIT 1;
161+ROWS in table t: 2
162+UPDATE t SET nokey = nokey + 10 ORDER BY nnuk_str_long LIMIT 1;
163+Warnings:
164+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
165+ROWS in table t: 2
166+UPDATE t SET nokey = nokey + 10 ORDER BY pk LIMIT 1;
167+ROWS in table t: 2
168+UPDATE t SET nokey = nokey + 10 ORDER BY nnuk1, nnuk2 LIMIT 1;
169+ROWS in table t: 2
170+UPDATE t SET nokey = nokey + 10 ORDER BY nnuk1, nnuk2, nokey LIMIT 1;
171+ROWS in table t: 2
172+UPDATE t SET nokey = nokey + 10 ORDER BY nnuk1, nokey, nnuk2 LIMIT 1;
173+ROWS in table t: 2
174+UPDATE t SET nokey = nokey + 10 WHERE nokey=1 LIMIT 0;
175+ROWS in table t: 2
176+UPDATE t SET nokey = nokey + 10 WHERE nokey=1 LIMIT 1;
177+Warnings:
178+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
179+ROWS in table t: 2
180+UPDATE t SET nokey = nokey + 10 WHERE nokey=1 ORDER BY nokey LIMIT 1;
181+Warnings:
182+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
183+ROWS in table t: 2
184+UPDATE t SET nokey = nokey + 10 WHERE nokey=1 ORDER BY nuk LIMIT 1;
185+Warnings:
186+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
187+ROWS in table t: 2
188+UPDATE t SET nokey = nokey + 10 WHERE nokey=1 ORDER BY nnuk1 LIMIT 1;
189+Warnings:
190+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
191+ROWS in table t: 2
192+UPDATE t SET nokey = nokey + 10 WHERE nokey=1 ORDER BY nnuk LIMIT 1;
193+ROWS in table t: 2
194+UPDATE t SET nokey = nokey + 10 WHERE nokey=1 ORDER BY nnuk_str_short LIMIT 1;
195+ROWS in table t: 2
196+UPDATE t SET nokey = nokey + 10 WHERE nokey=1 ORDER BY nnuk_str_long LIMIT 1;
197+Warnings:
198+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
199+ROWS in table t: 2
200+UPDATE t SET nokey = nokey + 10 WHERE nokey=1 ORDER BY pk LIMIT 1;
201+ROWS in table t: 2
202+UPDATE t SET nokey = nokey + 10 WHERE nokey=1 ORDER BY nnuk1, nnuk2 LIMIT 1;
203+ROWS in table t: 2
204+UPDATE t SET nokey = nokey + 10 WHERE nokey=1 ORDER BY nnuk1, nnuk2, nokey LIMIT 1;
205+ROWS in table t: 2
206+UPDATE t SET nokey = nokey + 10 WHERE nokey=1 ORDER BY nnuk1, nokey, nnuk2 LIMIT 1;
207+ROWS in table t: 2
208+UPDATE t SET nokey = nokey + 10 WHERE nuk=1 LIMIT 0;
209+ROWS in table t: 2
210+UPDATE t SET nokey = nokey + 10 WHERE nuk=1 LIMIT 1;
211+Warnings:
212+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
213+ROWS in table t: 2
214+UPDATE t SET nokey = nokey + 10 WHERE nuk=1 ORDER BY nokey LIMIT 1;
215+Warnings:
216+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
217+ROWS in table t: 2
218+UPDATE t SET nokey = nokey + 10 WHERE nuk=1 ORDER BY nuk LIMIT 1;
219+Warnings:
220+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
221+ROWS in table t: 2
222+UPDATE t SET nokey = nokey + 10 WHERE nuk=1 ORDER BY nnuk1 LIMIT 1;
223+Warnings:
224+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
225+ROWS in table t: 2
226+UPDATE t SET nokey = nokey + 10 WHERE nuk=1 ORDER BY nnuk LIMIT 1;
227+ROWS in table t: 2
228+UPDATE t SET nokey = nokey + 10 WHERE nuk=1 ORDER BY nnuk_str_short LIMIT 1;
229+ROWS in table t: 2
230+UPDATE t SET nokey = nokey + 10 WHERE nuk=1 ORDER BY nnuk_str_long LIMIT 1;
231+Warnings:
232+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
233+ROWS in table t: 2
234+UPDATE t SET nokey = nokey + 10 WHERE nuk=1 ORDER BY pk LIMIT 1;
235+ROWS in table t: 2
236+UPDATE t SET nokey = nokey + 10 WHERE nuk=1 ORDER BY nnuk1, nnuk2 LIMIT 1;
237+ROWS in table t: 2
238+UPDATE t SET nokey = nokey + 10 WHERE nuk=1 ORDER BY nnuk1, nnuk2, nokey LIMIT 1;
239+ROWS in table t: 2
240+UPDATE t SET nokey = nokey + 10 WHERE nuk=1 ORDER BY nnuk1, nokey, nnuk2 LIMIT 1;
241+ROWS in table t: 2
242+UPDATE t SET nokey = nokey + 10 WHERE nnuk=1 LIMIT 0;
243+ROWS in table t: 2
244+UPDATE t SET nokey = nokey + 10 WHERE nnuk=1 LIMIT 1;
245+ROWS in table t: 2
246+UPDATE t SET nokey = nokey + 10 WHERE nnuk=1 ORDER BY nokey LIMIT 1;
247+ROWS in table t: 2
248+UPDATE t SET nokey = nokey + 10 WHERE nnuk=1 ORDER BY nuk LIMIT 1;
249+ROWS in table t: 2
250+UPDATE t SET nokey = nokey + 10 WHERE nnuk=1 ORDER BY nnuk1 LIMIT 1;
251+ROWS in table t: 2
252+UPDATE t SET nokey = nokey + 10 WHERE nnuk=1 ORDER BY nnuk LIMIT 1;
253+ROWS in table t: 2
254+UPDATE t SET nokey = nokey + 10 WHERE nnuk=1 ORDER BY nnuk_str_short LIMIT 1;
255+ROWS in table t: 2
256+UPDATE t SET nokey = nokey + 10 WHERE nnuk=1 ORDER BY nnuk_str_long LIMIT 1;
257+ROWS in table t: 2
258+UPDATE t SET nokey = nokey + 10 WHERE nnuk=1 ORDER BY pk LIMIT 1;
259+ROWS in table t: 2
260+UPDATE t SET nokey = nokey + 10 WHERE nnuk=1 ORDER BY nnuk1, nnuk2 LIMIT 1;
261+ROWS in table t: 2
262+UPDATE t SET nokey = nokey + 10 WHERE nnuk=1 ORDER BY nnuk1, nnuk2, nokey LIMIT 1;
263+ROWS in table t: 2
264+UPDATE t SET nokey = nokey + 10 WHERE nnuk=1 ORDER BY nnuk1, nokey, nnuk2 LIMIT 1;
265+ROWS in table t: 2
266+UPDATE t SET nokey = nokey + 10 WHERE pk=1 LIMIT 0;
267+ROWS in table t: 2
268+UPDATE t SET nokey = nokey + 10 WHERE pk=1 LIMIT 1;
269+ROWS in table t: 2
270+UPDATE t SET nokey = nokey + 10 WHERE pk=1 ORDER BY nokey LIMIT 1;
271+ROWS in table t: 2
272+UPDATE t SET nokey = nokey + 10 WHERE pk=1 ORDER BY nuk LIMIT 1;
273+ROWS in table t: 2
274+UPDATE t SET nokey = nokey + 10 WHERE pk=1 ORDER BY nnuk1 LIMIT 1;
275+ROWS in table t: 2
276+UPDATE t SET nokey = nokey + 10 WHERE pk=1 ORDER BY nnuk LIMIT 1;
277+ROWS in table t: 2
278+UPDATE t SET nokey = nokey + 10 WHERE pk=1 ORDER BY nnuk_str_short LIMIT 1;
279+ROWS in table t: 2
280+UPDATE t SET nokey = nokey + 10 WHERE pk=1 ORDER BY nnuk_str_long LIMIT 1;
281+ROWS in table t: 2
282+UPDATE t SET nokey = nokey + 10 WHERE pk=1 ORDER BY pk LIMIT 1;
283+ROWS in table t: 2
284+UPDATE t SET nokey = nokey + 10 WHERE pk=1 ORDER BY nnuk1, nnuk2 LIMIT 1;
285+ROWS in table t: 2
286+UPDATE t SET nokey = nokey + 10 WHERE pk=1 ORDER BY nnuk1, nnuk2, nokey LIMIT 1;
287+ROWS in table t: 2
288+UPDATE t SET nokey = nokey + 10 WHERE pk=1 ORDER BY nnuk1, nokey, nnuk2 LIMIT 1;
289+ROWS in table t: 2
290+DELETE FROM t LIMIT 0;
291+ROWS in table t: 2
292+DELETE FROM t LIMIT 1;
293+Warnings:
294+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
295+ROWS in table t: 1
296+DELETE FROM t ORDER BY nokey LIMIT 1;
297+Warnings:
298+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
299+ROWS in table t: 1
300+DELETE FROM t ORDER BY nuk LIMIT 1;
301+Warnings:
302+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
303+ROWS in table t: 1
304+DELETE FROM t ORDER BY nnuk1 LIMIT 1;
305+Warnings:
306+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
307+ROWS in table t: 1
308+DELETE FROM t ORDER BY nnuk LIMIT 1;
309+ROWS in table t: 1
310+DELETE FROM t ORDER BY nnuk_str_short LIMIT 1;
311+ROWS in table t: 1
312+DELETE FROM t ORDER BY nnuk_str_long LIMIT 1;
313+Warnings:
314+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
315+ROWS in table t: 1
316+DELETE FROM t ORDER BY pk LIMIT 1;
317+ROWS in table t: 1
318+DELETE FROM t ORDER BY nnuk1, nnuk2 LIMIT 1;
319+ROWS in table t: 1
320+DELETE FROM t ORDER BY nnuk1, nnuk2, nokey LIMIT 1;
321+ROWS in table t: 1
322+DELETE FROM t ORDER BY nnuk1, nokey, nnuk2 LIMIT 1;
323+ROWS in table t: 1
324+DELETE FROM t WHERE nokey=1 LIMIT 0;
325+ROWS in table t: 2
326+DELETE FROM t WHERE nokey=1 LIMIT 1;
327+Warnings:
328+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
329+ROWS in table t: 1
330+DELETE FROM t WHERE nokey=1 ORDER BY nokey LIMIT 1;
331+Warnings:
332+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
333+ROWS in table t: 1
334+DELETE FROM t WHERE nokey=1 ORDER BY nuk LIMIT 1;
335+Warnings:
336+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
337+ROWS in table t: 1
338+DELETE FROM t WHERE nokey=1 ORDER BY nnuk1 LIMIT 1;
339+Warnings:
340+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
341+ROWS in table t: 1
342+DELETE FROM t WHERE nokey=1 ORDER BY nnuk LIMIT 1;
343+ROWS in table t: 1
344+DELETE FROM t WHERE nokey=1 ORDER BY nnuk_str_short LIMIT 1;
345+ROWS in table t: 1
346+DELETE FROM t WHERE nokey=1 ORDER BY nnuk_str_long LIMIT 1;
347+Warnings:
348+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
349+ROWS in table t: 1
350+DELETE FROM t WHERE nokey=1 ORDER BY pk LIMIT 1;
351+ROWS in table t: 1
352+DELETE FROM t WHERE nokey=1 ORDER BY nnuk1, nnuk2 LIMIT 1;
353+ROWS in table t: 1
354+DELETE FROM t WHERE nokey=1 ORDER BY nnuk1, nnuk2, nokey LIMIT 1;
355+ROWS in table t: 1
356+DELETE FROM t WHERE nokey=1 ORDER BY nnuk1, nokey, nnuk2 LIMIT 1;
357+ROWS in table t: 1
358+DELETE FROM t WHERE nuk=1 LIMIT 0;
359+ROWS in table t: 2
360+DELETE FROM t WHERE nuk=1 LIMIT 1;
361+Warnings:
362+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
363+ROWS in table t: 1
364+DELETE FROM t WHERE nuk=1 ORDER BY nokey LIMIT 1;
365+Warnings:
366+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
367+ROWS in table t: 1
368+DELETE FROM t WHERE nuk=1 ORDER BY nuk LIMIT 1;
369+Warnings:
370+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
371+ROWS in table t: 1
372+DELETE FROM t WHERE nuk=1 ORDER BY nnuk1 LIMIT 1;
373+Warnings:
374+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
375+ROWS in table t: 1
376+DELETE FROM t WHERE nuk=1 ORDER BY nnuk LIMIT 1;
377+ROWS in table t: 1
378+DELETE FROM t WHERE nuk=1 ORDER BY nnuk_str_short LIMIT 1;
379+ROWS in table t: 1
380+DELETE FROM t WHERE nuk=1 ORDER BY nnuk_str_long LIMIT 1;
381+Warnings:
382+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
383+ROWS in table t: 1
384+DELETE FROM t WHERE nuk=1 ORDER BY pk LIMIT 1;
385+ROWS in table t: 1
386+DELETE FROM t WHERE nuk=1 ORDER BY nnuk1, nnuk2 LIMIT 1;
387+ROWS in table t: 1
388+DELETE FROM t WHERE nuk=1 ORDER BY nnuk1, nnuk2, nokey LIMIT 1;
389+ROWS in table t: 1
390+DELETE FROM t WHERE nuk=1 ORDER BY nnuk1, nokey, nnuk2 LIMIT 1;
391+ROWS in table t: 1
392+DELETE FROM t WHERE nnuk=1 LIMIT 0;
393+ROWS in table t: 2
394+DELETE FROM t WHERE nnuk=1 LIMIT 1;
395+ROWS in table t: 1
396+DELETE FROM t WHERE nnuk=1 ORDER BY nokey LIMIT 1;
397+ROWS in table t: 1
398+DELETE FROM t WHERE nnuk=1 ORDER BY nuk LIMIT 1;
399+ROWS in table t: 1
400+DELETE FROM t WHERE nnuk=1 ORDER BY nnuk1 LIMIT 1;
401+ROWS in table t: 1
402+DELETE FROM t WHERE nnuk=1 ORDER BY nnuk LIMIT 1;
403+ROWS in table t: 1
404+DELETE FROM t WHERE nnuk=1 ORDER BY nnuk_str_short LIMIT 1;
405+ROWS in table t: 1
406+DELETE FROM t WHERE nnuk=1 ORDER BY nnuk_str_long LIMIT 1;
407+ROWS in table t: 1
408+DELETE FROM t WHERE nnuk=1 ORDER BY pk LIMIT 1;
409+ROWS in table t: 1
410+DELETE FROM t WHERE nnuk=1 ORDER BY nnuk1, nnuk2 LIMIT 1;
411+ROWS in table t: 1
412+DELETE FROM t WHERE nnuk=1 ORDER BY nnuk1, nnuk2, nokey LIMIT 1;
413+ROWS in table t: 1
414+DELETE FROM t WHERE nnuk=1 ORDER BY nnuk1, nokey, nnuk2 LIMIT 1;
415+ROWS in table t: 1
416+DELETE FROM t WHERE pk=1 LIMIT 0;
417+ROWS in table t: 2
418+DELETE FROM t WHERE pk=1 LIMIT 1;
419+ROWS in table t: 1
420+DELETE FROM t WHERE pk=1 ORDER BY nokey LIMIT 1;
421+ROWS in table t: 1
422+DELETE FROM t WHERE pk=1 ORDER BY nuk LIMIT 1;
423+ROWS in table t: 1
424+DELETE FROM t WHERE pk=1 ORDER BY nnuk1 LIMIT 1;
425+ROWS in table t: 1
426+DELETE FROM t WHERE pk=1 ORDER BY nnuk LIMIT 1;
427+ROWS in table t: 1
428+DELETE FROM t WHERE pk=1 ORDER BY nnuk_str_short LIMIT 1;
429+ROWS in table t: 1
430+DELETE FROM t WHERE pk=1 ORDER BY nnuk_str_long LIMIT 1;
431+ROWS in table t: 1
432+DELETE FROM t WHERE pk=1 ORDER BY pk LIMIT 1;
433+ROWS in table t: 1
434+DELETE FROM t WHERE pk=1 ORDER BY nnuk1, nnuk2 LIMIT 1;
435+ROWS in table t: 1
436+DELETE FROM t WHERE pk=1 ORDER BY nnuk1, nnuk2, nokey LIMIT 1;
437+ROWS in table t: 1
438+DELETE FROM t WHERE pk=1 ORDER BY nnuk1, nokey, nnuk2 LIMIT 1;
439+ROWS in table t: 1
440+REPLACE INTO t SELECT * FROM t1 LIMIT 0;
441+Warnings:
442+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. REPLACE... SELECT is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are replaced. This order cannot be predicted and may differ on master and the slave.
443+ROWS in table t: 2
444+REPLACE INTO t SELECT * FROM t1 LIMIT 1;
445+Warnings:
446+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
447+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. REPLACE... SELECT is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are replaced. This order cannot be predicted and may differ on master and the slave.
448+ROWS in table t: 3
449+REPLACE INTO t SELECT * FROM t1 ORDER BY nokey LIMIT 1;
450+Warnings:
451+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
452+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. REPLACE... SELECT is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are replaced. This order cannot be predicted and may differ on master and the slave.
453+ROWS in table t: 3
454+REPLACE INTO t SELECT * FROM t1 ORDER BY nuk LIMIT 1;
455+Warnings:
456+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
457+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. REPLACE... SELECT is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are replaced. This order cannot be predicted and may differ on master and the slave.
458+ROWS in table t: 3
459+REPLACE INTO t SELECT * FROM t1 ORDER BY nnuk1 LIMIT 1;
460+Warnings:
461+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
462+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. REPLACE... SELECT is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are replaced. This order cannot be predicted and may differ on master and the slave.
463+ROWS in table t: 3
464+REPLACE INTO t SELECT * FROM t1 ORDER BY nnuk LIMIT 1;
465+Warnings:
466+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. REPLACE... SELECT is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are replaced. This order cannot be predicted and may differ on master and the slave.
467+ROWS in table t: 3
468+REPLACE INTO t SELECT * FROM t1 ORDER BY nnuk_str_short LIMIT 1;
469+Warnings:
470+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. REPLACE... SELECT is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are replaced. This order cannot be predicted and may differ on master and the slave.
471+ROWS in table t: 3
472+REPLACE INTO t SELECT * FROM t1 ORDER BY nnuk_str_long LIMIT 1;
473+Warnings:
474+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
475+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. REPLACE... SELECT is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are replaced. This order cannot be predicted and may differ on master and the slave.
476+ROWS in table t: 3
477+REPLACE INTO t SELECT * FROM t1 ORDER BY pk LIMIT 1;
478+Warnings:
479+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. REPLACE... SELECT is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are replaced. This order cannot be predicted and may differ on master and the slave.
480+ROWS in table t: 3
481+REPLACE INTO t SELECT * FROM t1 ORDER BY nnuk1, nnuk2 LIMIT 1;
482+Warnings:
483+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. REPLACE... SELECT is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are replaced. This order cannot be predicted and may differ on master and the slave.
484+ROWS in table t: 3
485+REPLACE INTO t SELECT * FROM t1 ORDER BY nnuk1, nnuk2, nokey LIMIT 1;
486+Warnings:
487+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. REPLACE... SELECT is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are replaced. This order cannot be predicted and may differ on master and the slave.
488+ROWS in table t: 3
489+REPLACE INTO t SELECT * FROM t1 ORDER BY nnuk1, nokey, nnuk2 LIMIT 1;
490+Warnings:
491+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. REPLACE... SELECT is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are replaced. This order cannot be predicted and may differ on master and the slave.
492+ROWS in table t: 3
493+REPLACE INTO t SELECT * FROM t1 WHERE nokey=1 LIMIT 0;
494+Warnings:
495+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. REPLACE... SELECT is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are replaced. This order cannot be predicted and may differ on master and the slave.
496+ROWS in table t: 2
497+REPLACE INTO t SELECT * FROM t1 WHERE nokey=1 LIMIT 1;
498+Warnings:
499+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
500+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. REPLACE... SELECT is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are replaced. This order cannot be predicted and may differ on master and the slave.
501+ROWS in table t: 2
502+REPLACE INTO t SELECT * FROM t1 WHERE nokey=1 ORDER BY nokey LIMIT 1;
503+Warnings:
504+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
505+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. REPLACE... SELECT is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are replaced. This order cannot be predicted and may differ on master and the slave.
506+ROWS in table t: 2
507+REPLACE INTO t SELECT * FROM t1 WHERE nokey=1 ORDER BY nuk LIMIT 1;
508+Warnings:
509+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
510+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. REPLACE... SELECT is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are replaced. This order cannot be predicted and may differ on master and the slave.
511+ROWS in table t: 2
512+REPLACE INTO t SELECT * FROM t1 WHERE nokey=1 ORDER BY nnuk1 LIMIT 1;
513+Warnings:
514+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
515+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. REPLACE... SELECT is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are replaced. This order cannot be predicted and may differ on master and the slave.
516+ROWS in table t: 2
517+REPLACE INTO t SELECT * FROM t1 WHERE nokey=1 ORDER BY nnuk LIMIT 1;
518+Warnings:
519+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. REPLACE... SELECT is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are replaced. This order cannot be predicted and may differ on master and the slave.
520+ROWS in table t: 2
521+REPLACE INTO t SELECT * FROM t1 WHERE nokey=1 ORDER BY nnuk_str_short LIMIT 1;
522+Warnings:
523+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. REPLACE... SELECT is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are replaced. This order cannot be predicted and may differ on master and the slave.
524+ROWS in table t: 2
525+REPLACE INTO t SELECT * FROM t1 WHERE nokey=1 ORDER BY nnuk_str_long LIMIT 1;
526+Warnings:
527+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
528+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. REPLACE... SELECT is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are replaced. This order cannot be predicted and may differ on master and the slave.
529+ROWS in table t: 2
530+REPLACE INTO t SELECT * FROM t1 WHERE nokey=1 ORDER BY pk LIMIT 1;
531+Warnings:
532+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. REPLACE... SELECT is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are replaced. This order cannot be predicted and may differ on master and the slave.
533+ROWS in table t: 2
534+REPLACE INTO t SELECT * FROM t1 WHERE nokey=1 ORDER BY nnuk1, nnuk2 LIMIT 1;
535+Warnings:
536+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. REPLACE... SELECT is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are replaced. This order cannot be predicted and may differ on master and the slave.
537+ROWS in table t: 2
538+REPLACE INTO t SELECT * FROM t1 WHERE nokey=1 ORDER BY nnuk1, nnuk2, nokey LIMIT 1;
539+Warnings:
540+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. REPLACE... SELECT is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are replaced. This order cannot be predicted and may differ on master and the slave.
541+ROWS in table t: 2
542+REPLACE INTO t SELECT * FROM t1 WHERE nokey=1 ORDER BY nnuk1, nokey, nnuk2 LIMIT 1;
543+Warnings:
544+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. REPLACE... SELECT is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are replaced. This order cannot be predicted and may differ on master and the slave.
545+ROWS in table t: 2
546+REPLACE INTO t SELECT * FROM t1 WHERE nuk=1 LIMIT 0;
547+Warnings:
548+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. REPLACE... SELECT is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are replaced. This order cannot be predicted and may differ on master and the slave.
549+ROWS in table t: 2
550+REPLACE INTO t SELECT * FROM t1 WHERE nuk=1 LIMIT 1;
551+Warnings:
552+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
553+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. REPLACE... SELECT is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are replaced. This order cannot be predicted and may differ on master and the slave.
554+ROWS in table t: 2
555+REPLACE INTO t SELECT * FROM t1 WHERE nuk=1 ORDER BY nokey LIMIT 1;
556+Warnings:
557+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
558+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. REPLACE... SELECT is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are replaced. This order cannot be predicted and may differ on master and the slave.
559+ROWS in table t: 2
560+REPLACE INTO t SELECT * FROM t1 WHERE nuk=1 ORDER BY nuk LIMIT 1;
561+Warnings:
562+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
563+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. REPLACE... SELECT is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are replaced. This order cannot be predicted and may differ on master and the slave.
564+ROWS in table t: 2
565+REPLACE INTO t SELECT * FROM t1 WHERE nuk=1 ORDER BY nnuk1 LIMIT 1;
566+Warnings:
567+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
568+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. REPLACE... SELECT is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are replaced. This order cannot be predicted and may differ on master and the slave.
569+ROWS in table t: 2
570+REPLACE INTO t SELECT * FROM t1 WHERE nuk=1 ORDER BY nnuk LIMIT 1;
571+Warnings:
572+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. REPLACE... SELECT is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are replaced. This order cannot be predicted and may differ on master and the slave.
573+ROWS in table t: 2
574+REPLACE INTO t SELECT * FROM t1 WHERE nuk=1 ORDER BY nnuk_str_short LIMIT 1;
575+Warnings:
576+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. REPLACE... SELECT is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are replaced. This order cannot be predicted and may differ on master and the slave.
577+ROWS in table t: 2
578+REPLACE INTO t SELECT * FROM t1 WHERE nuk=1 ORDER BY nnuk_str_long LIMIT 1;
579+Warnings:
580+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
581+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. REPLACE... SELECT is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are replaced. This order cannot be predicted and may differ on master and the slave.
582+ROWS in table t: 2
583+REPLACE INTO t SELECT * FROM t1 WHERE nuk=1 ORDER BY pk LIMIT 1;
584+Warnings:
585+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. REPLACE... SELECT is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are replaced. This order cannot be predicted and may differ on master and the slave.
586+ROWS in table t: 2
587+REPLACE INTO t SELECT * FROM t1 WHERE nuk=1 ORDER BY nnuk1, nnuk2 LIMIT 1;
588+Warnings:
589+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. REPLACE... SELECT is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are replaced. This order cannot be predicted and may differ on master and the slave.
590+ROWS in table t: 2
591+REPLACE INTO t SELECT * FROM t1 WHERE nuk=1 ORDER BY nnuk1, nnuk2, nokey LIMIT 1;
592+Warnings:
593+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. REPLACE... SELECT is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are replaced. This order cannot be predicted and may differ on master and the slave.
594+ROWS in table t: 2
595+REPLACE INTO t SELECT * FROM t1 WHERE nuk=1 ORDER BY nnuk1, nokey, nnuk2 LIMIT 1;
596+Warnings:
597+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. REPLACE... SELECT is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are replaced. This order cannot be predicted and may differ on master and the slave.
598+ROWS in table t: 2
599+REPLACE INTO t SELECT * FROM t1 WHERE nnuk=1 LIMIT 0;
600+Warnings:
601+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. REPLACE... SELECT is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are replaced. This order cannot be predicted and may differ on master and the slave.
602+ROWS in table t: 2
603+REPLACE INTO t SELECT * FROM t1 WHERE nnuk=1 LIMIT 1;
604+Warnings:
605+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. REPLACE... SELECT is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are replaced. This order cannot be predicted and may differ on master and the slave.
606+ROWS in table t: 2
607+REPLACE INTO t SELECT * FROM t1 WHERE nnuk=1 ORDER BY nokey LIMIT 1;
608+Warnings:
609+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. REPLACE... SELECT is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are replaced. This order cannot be predicted and may differ on master and the slave.
610+ROWS in table t: 2
611+REPLACE INTO t SELECT * FROM t1 WHERE nnuk=1 ORDER BY nuk LIMIT 1;
612+Warnings:
613+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. REPLACE... SELECT is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are replaced. This order cannot be predicted and may differ on master and the slave.
614+ROWS in table t: 2
615+REPLACE INTO t SELECT * FROM t1 WHERE nnuk=1 ORDER BY nnuk1 LIMIT 1;
616+Warnings:
617+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. REPLACE... SELECT is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are replaced. This order cannot be predicted and may differ on master and the slave.
618+ROWS in table t: 2
619+REPLACE INTO t SELECT * FROM t1 WHERE nnuk=1 ORDER BY nnuk LIMIT 1;
620+Warnings:
621+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. REPLACE... SELECT is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are replaced. This order cannot be predicted and may differ on master and the slave.
622+ROWS in table t: 2
623+REPLACE INTO t SELECT * FROM t1 WHERE nnuk=1 ORDER BY nnuk_str_short LIMIT 1;
624+Warnings:
625+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. REPLACE... SELECT is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are replaced. This order cannot be predicted and may differ on master and the slave.
626+ROWS in table t: 2
627+REPLACE INTO t SELECT * FROM t1 WHERE nnuk=1 ORDER BY nnuk_str_long LIMIT 1;
628+Warnings:
629+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. REPLACE... SELECT is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are replaced. This order cannot be predicted and may differ on master and the slave.
630+ROWS in table t: 2
631+REPLACE INTO t SELECT * FROM t1 WHERE nnuk=1 ORDER BY pk LIMIT 1;
632+Warnings:
633+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. REPLACE... SELECT is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are replaced. This order cannot be predicted and may differ on master and the slave.
634+ROWS in table t: 2
635+REPLACE INTO t SELECT * FROM t1 WHERE nnuk=1 ORDER BY nnuk1, nnuk2 LIMIT 1;
636+Warnings:
637+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. REPLACE... SELECT is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are replaced. This order cannot be predicted and may differ on master and the slave.
638+ROWS in table t: 2
639+REPLACE INTO t SELECT * FROM t1 WHERE nnuk=1 ORDER BY nnuk1, nnuk2, nokey LIMIT 1;
640+Warnings:
641+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. REPLACE... SELECT is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are replaced. This order cannot be predicted and may differ on master and the slave.
642+ROWS in table t: 2
643+REPLACE INTO t SELECT * FROM t1 WHERE nnuk=1 ORDER BY nnuk1, nokey, nnuk2 LIMIT 1;
644+Warnings:
645+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. REPLACE... SELECT is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are replaced. This order cannot be predicted and may differ on master and the slave.
646+ROWS in table t: 2
647+REPLACE INTO t SELECT * FROM t1 WHERE pk=1 LIMIT 0;
648+Warnings:
649+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. REPLACE... SELECT is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are replaced. This order cannot be predicted and may differ on master and the slave.
650+ROWS in table t: 2
651+REPLACE INTO t SELECT * FROM t1 WHERE pk=1 LIMIT 1;
652+Warnings:
653+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. REPLACE... SELECT is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are replaced. This order cannot be predicted and may differ on master and the slave.
654+ROWS in table t: 2
655+REPLACE INTO t SELECT * FROM t1 WHERE pk=1 ORDER BY nokey LIMIT 1;
656+Warnings:
657+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. REPLACE... SELECT is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are replaced. This order cannot be predicted and may differ on master and the slave.
658+ROWS in table t: 2
659+REPLACE INTO t SELECT * FROM t1 WHERE pk=1 ORDER BY nuk LIMIT 1;
660+Warnings:
661+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. REPLACE... SELECT is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are replaced. This order cannot be predicted and may differ on master and the slave.
662+ROWS in table t: 2
663+REPLACE INTO t SELECT * FROM t1 WHERE pk=1 ORDER BY nnuk1 LIMIT 1;
664+Warnings:
665+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. REPLACE... SELECT is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are replaced. This order cannot be predicted and may differ on master and the slave.
666+ROWS in table t: 2
667+REPLACE INTO t SELECT * FROM t1 WHERE pk=1 ORDER BY nnuk LIMIT 1;
668+Warnings:
669+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. REPLACE... SELECT is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are replaced. This order cannot be predicted and may differ on master and the slave.
670+ROWS in table t: 2
671+REPLACE INTO t SELECT * FROM t1 WHERE pk=1 ORDER BY nnuk_str_short LIMIT 1;
672+Warnings:
673+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. REPLACE... SELECT is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are replaced. This order cannot be predicted and may differ on master and the slave.
674+ROWS in table t: 2
675+REPLACE INTO t SELECT * FROM t1 WHERE pk=1 ORDER BY nnuk_str_long LIMIT 1;
676+Warnings:
677+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. REPLACE... SELECT is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are replaced. This order cannot be predicted and may differ on master and the slave.
678+ROWS in table t: 2
679+REPLACE INTO t SELECT * FROM t1 WHERE pk=1 ORDER BY pk LIMIT 1;
680+Warnings:
681+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. REPLACE... SELECT is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are replaced. This order cannot be predicted and may differ on master and the slave.
682+ROWS in table t: 2
683+REPLACE INTO t SELECT * FROM t1 WHERE pk=1 ORDER BY nnuk1, nnuk2 LIMIT 1;
684+Warnings:
685+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. REPLACE... SELECT is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are replaced. This order cannot be predicted and may differ on master and the slave.
686+ROWS in table t: 2
687+REPLACE INTO t SELECT * FROM t1 WHERE pk=1 ORDER BY nnuk1, nnuk2, nokey LIMIT 1;
688+Warnings:
689+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. REPLACE... SELECT is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are replaced. This order cannot be predicted and may differ on master and the slave.
690+ROWS in table t: 2
691+REPLACE INTO t SELECT * FROM t1 WHERE pk=1 ORDER BY nnuk1, nokey, nnuk2 LIMIT 1;
692+Warnings:
693+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. REPLACE... SELECT is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are replaced. This order cannot be predicted and may differ on master and the slave.
694+ROWS in table t: 2
695+INSERT INTO t SELECT * FROM t1 LIMIT 0;
696+ROWS in table t: 2
697+INSERT INTO t SELECT * FROM t1 LIMIT 1;
698+Warnings:
699+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
700+ROWS in table t: 3
701+INSERT INTO t SELECT * FROM t1 ORDER BY nokey LIMIT 1;
702+Warnings:
703+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
704+ROWS in table t: 3
705+INSERT INTO t SELECT * FROM t1 ORDER BY nuk LIMIT 1;
706+Warnings:
707+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
708+ROWS in table t: 3
709+INSERT INTO t SELECT * FROM t1 ORDER BY nnuk1 LIMIT 1;
710+Warnings:
711+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
712+ROWS in table t: 3
713+INSERT INTO t SELECT * FROM t1 ORDER BY nnuk LIMIT 1;
714+ROWS in table t: 3
715+INSERT INTO t SELECT * FROM t1 ORDER BY nnuk_str_short LIMIT 1;
716+ROWS in table t: 3
717+INSERT INTO t SELECT * FROM t1 ORDER BY nnuk_str_long LIMIT 1;
718+Warnings:
719+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
720+ROWS in table t: 3
721+INSERT INTO t SELECT * FROM t1 ORDER BY pk LIMIT 1;
722+ROWS in table t: 3
723+INSERT INTO t SELECT * FROM t1 ORDER BY nnuk1, nnuk2 LIMIT 1;
724+ROWS in table t: 3
725+INSERT INTO t SELECT * FROM t1 ORDER BY nnuk1, nnuk2, nokey LIMIT 1;
726+ROWS in table t: 3
727+INSERT INTO t SELECT * FROM t1 ORDER BY nnuk1, nokey, nnuk2 LIMIT 1;
728+ROWS in table t: 3
729+INSERT INTO t SELECT * FROM t1 WHERE nokey=1 LIMIT 0;
730+ROWS in table t: 2
731+INSERT INTO t SELECT * FROM t1 WHERE nokey=1 LIMIT 1;
732+Warnings:
733+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
734+ROWS in table t: 2
735+INSERT INTO t SELECT * FROM t1 WHERE nokey=1 ORDER BY nokey LIMIT 1;
736+Warnings:
737+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
738+ROWS in table t: 2
739+INSERT INTO t SELECT * FROM t1 WHERE nokey=1 ORDER BY nuk LIMIT 1;
740+Warnings:
741+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
742+ROWS in table t: 2
743+INSERT INTO t SELECT * FROM t1 WHERE nokey=1 ORDER BY nnuk1 LIMIT 1;
744+Warnings:
745+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
746+ROWS in table t: 2
747+INSERT INTO t SELECT * FROM t1 WHERE nokey=1 ORDER BY nnuk LIMIT 1;
748+ROWS in table t: 2
749+INSERT INTO t SELECT * FROM t1 WHERE nokey=1 ORDER BY nnuk_str_short LIMIT 1;
750+ROWS in table t: 2
751+INSERT INTO t SELECT * FROM t1 WHERE nokey=1 ORDER BY nnuk_str_long LIMIT 1;
752+Warnings:
753+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
754+ROWS in table t: 2
755+INSERT INTO t SELECT * FROM t1 WHERE nokey=1 ORDER BY pk LIMIT 1;
756+ROWS in table t: 2
757+INSERT INTO t SELECT * FROM t1 WHERE nokey=1 ORDER BY nnuk1, nnuk2 LIMIT 1;
758+ROWS in table t: 2
759+INSERT INTO t SELECT * FROM t1 WHERE nokey=1 ORDER BY nnuk1, nnuk2, nokey LIMIT 1;
760+ROWS in table t: 2
761+INSERT INTO t SELECT * FROM t1 WHERE nokey=1 ORDER BY nnuk1, nokey, nnuk2 LIMIT 1;
762+ROWS in table t: 2
763+INSERT INTO t SELECT * FROM t1 WHERE nuk=1 LIMIT 0;
764+ROWS in table t: 2
765+INSERT INTO t SELECT * FROM t1 WHERE nuk=1 LIMIT 1;
766+Warnings:
767+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
768+ROWS in table t: 2
769+INSERT INTO t SELECT * FROM t1 WHERE nuk=1 ORDER BY nokey LIMIT 1;
770+Warnings:
771+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
772+ROWS in table t: 2
773+INSERT INTO t SELECT * FROM t1 WHERE nuk=1 ORDER BY nuk LIMIT 1;
774+Warnings:
775+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
776+ROWS in table t: 2
777+INSERT INTO t SELECT * FROM t1 WHERE nuk=1 ORDER BY nnuk1 LIMIT 1;
778+Warnings:
779+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
780+ROWS in table t: 2
781+INSERT INTO t SELECT * FROM t1 WHERE nuk=1 ORDER BY nnuk LIMIT 1;
782+ROWS in table t: 2
783+INSERT INTO t SELECT * FROM t1 WHERE nuk=1 ORDER BY nnuk_str_short LIMIT 1;
784+ROWS in table t: 2
785+INSERT INTO t SELECT * FROM t1 WHERE nuk=1 ORDER BY nnuk_str_long LIMIT 1;
786+Warnings:
787+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
788+ROWS in table t: 2
789+INSERT INTO t SELECT * FROM t1 WHERE nuk=1 ORDER BY pk LIMIT 1;
790+ROWS in table t: 2
791+INSERT INTO t SELECT * FROM t1 WHERE nuk=1 ORDER BY nnuk1, nnuk2 LIMIT 1;
792+ROWS in table t: 2
793+INSERT INTO t SELECT * FROM t1 WHERE nuk=1 ORDER BY nnuk1, nnuk2, nokey LIMIT 1;
794+ROWS in table t: 2
795+INSERT INTO t SELECT * FROM t1 WHERE nuk=1 ORDER BY nnuk1, nokey, nnuk2 LIMIT 1;
796+ROWS in table t: 2
797+INSERT INTO t SELECT * FROM t1 WHERE nnuk=1 LIMIT 0;
798+ROWS in table t: 2
799+INSERT INTO t SELECT * FROM t1 WHERE nnuk=1 LIMIT 1;
800+ROWS in table t: 2
801+INSERT INTO t SELECT * FROM t1 WHERE nnuk=1 ORDER BY nokey LIMIT 1;
802+ROWS in table t: 2
803+INSERT INTO t SELECT * FROM t1 WHERE nnuk=1 ORDER BY nuk LIMIT 1;
804+ROWS in table t: 2
805+INSERT INTO t SELECT * FROM t1 WHERE nnuk=1 ORDER BY nnuk1 LIMIT 1;
806+ROWS in table t: 2
807+INSERT INTO t SELECT * FROM t1 WHERE nnuk=1 ORDER BY nnuk LIMIT 1;
808+ROWS in table t: 2
809+INSERT INTO t SELECT * FROM t1 WHERE nnuk=1 ORDER BY nnuk_str_short LIMIT 1;
810+ROWS in table t: 2
811+INSERT INTO t SELECT * FROM t1 WHERE nnuk=1 ORDER BY nnuk_str_long LIMIT 1;
812+ROWS in table t: 2
813+INSERT INTO t SELECT * FROM t1 WHERE nnuk=1 ORDER BY pk LIMIT 1;
814+ROWS in table t: 2
815+INSERT INTO t SELECT * FROM t1 WHERE nnuk=1 ORDER BY nnuk1, nnuk2 LIMIT 1;
816+ROWS in table t: 2
817+INSERT INTO t SELECT * FROM t1 WHERE nnuk=1 ORDER BY nnuk1, nnuk2, nokey LIMIT 1;
818+ROWS in table t: 2
819+INSERT INTO t SELECT * FROM t1 WHERE nnuk=1 ORDER BY nnuk1, nokey, nnuk2 LIMIT 1;
820+ROWS in table t: 2
821+INSERT INTO t SELECT * FROM t1 WHERE pk=1 LIMIT 0;
822+ROWS in table t: 2
823+INSERT INTO t SELECT * FROM t1 WHERE pk=1 LIMIT 1;
824+ROWS in table t: 2
825+INSERT INTO t SELECT * FROM t1 WHERE pk=1 ORDER BY nokey LIMIT 1;
826+ROWS in table t: 2
827+INSERT INTO t SELECT * FROM t1 WHERE pk=1 ORDER BY nuk LIMIT 1;
828+ROWS in table t: 2
829+INSERT INTO t SELECT * FROM t1 WHERE pk=1 ORDER BY nnuk1 LIMIT 1;
830+ROWS in table t: 2
831+INSERT INTO t SELECT * FROM t1 WHERE pk=1 ORDER BY nnuk LIMIT 1;
832+ROWS in table t: 2
833+INSERT INTO t SELECT * FROM t1 WHERE pk=1 ORDER BY nnuk_str_short LIMIT 1;
834+ROWS in table t: 2
835+INSERT INTO t SELECT * FROM t1 WHERE pk=1 ORDER BY nnuk_str_long LIMIT 1;
836+ROWS in table t: 2
837+INSERT INTO t SELECT * FROM t1 WHERE pk=1 ORDER BY pk LIMIT 1;
838+ROWS in table t: 2
839+INSERT INTO t SELECT * FROM t1 WHERE pk=1 ORDER BY nnuk1, nnuk2 LIMIT 1;
840+ROWS in table t: 2
841+INSERT INTO t SELECT * FROM t1 WHERE pk=1 ORDER BY nnuk1, nnuk2, nokey LIMIT 1;
842+ROWS in table t: 2
843+INSERT INTO t SELECT * FROM t1 WHERE pk=1 ORDER BY nnuk1, nokey, nnuk2 LIMIT 1;
844+ROWS in table t: 2
845+INSERT INTO t (SELECT * FROM t1) UNION (SELECT * FROM t2) LIMIT 0;
846+ROWS in table t: 2
847+INSERT INTO t (SELECT * FROM t1) UNION (SELECT * FROM t2) LIMIT 1;
848+Warnings:
849+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
850+ROWS in table t: 3
851+INSERT INTO t (SELECT * FROM t1) UNION (SELECT * FROM t2) ORDER BY nokey LIMIT 1;
852+Warnings:
853+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
854+ROWS in table t: 3
855+INSERT INTO t (SELECT * FROM t1) UNION (SELECT * FROM t2) ORDER BY nuk LIMIT 1;
856+Warnings:
857+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
858+ROWS in table t: 3
859+INSERT INTO t (SELECT * FROM t1) UNION (SELECT * FROM t2) ORDER BY nnuk1 LIMIT 1;
860+Warnings:
861+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
862+ROWS in table t: 3
863+INSERT INTO t (SELECT * FROM t1) UNION (SELECT * FROM t2) ORDER BY nnuk LIMIT 1;
864+Warnings:
865+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
866+ROWS in table t: 3
867+INSERT INTO t (SELECT * FROM t1) UNION (SELECT * FROM t2) ORDER BY nnuk_str_short LIMIT 1;
868+Warnings:
869+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
870+ROWS in table t: 3
871+INSERT INTO t (SELECT * FROM t1) UNION (SELECT * FROM t2) ORDER BY nnuk_str_long LIMIT 1;
872+Warnings:
873+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
874+ROWS in table t: 3
875+INSERT INTO t (SELECT * FROM t1) UNION (SELECT * FROM t2) ORDER BY pk LIMIT 1;
876+Warnings:
877+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
878+ROWS in table t: 3
879+INSERT INTO t (SELECT * FROM t1) UNION (SELECT * FROM t2) ORDER BY nnuk1, nnuk2 LIMIT 1;
880+Warnings:
881+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
882+ROWS in table t: 3
883+INSERT INTO t (SELECT * FROM t1) UNION (SELECT * FROM t2) ORDER BY nnuk1, nnuk2, nokey LIMIT 1;
884+Warnings:
885+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
886+ROWS in table t: 3
887+INSERT INTO t (SELECT * FROM t1) UNION (SELECT * FROM t2) ORDER BY nnuk1, nokey, nnuk2 LIMIT 1;
888+Warnings:
889+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
890+ROWS in table t: 3
891+INSERT INTO t (SELECT * FROM t1 LIMIT 0) UNION (SELECT * FROM t2);
892+ROWS in table t: 4
893+INSERT INTO t (SELECT * FROM t1 LIMIT 1) UNION (SELECT * FROM t2);
894+Warnings:
895+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
896+ROWS in table t: 5
897+INSERT INTO t (SELECT * FROM t1 ORDER BY nokey LIMIT 1) UNION (SELECT * FROM t2);
898+Warnings:
899+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
900+ROWS in table t: 5
901+INSERT INTO t (SELECT * FROM t1 ORDER BY nuk LIMIT 1) UNION (SELECT * FROM t2);
902+Warnings:
903+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
904+ROWS in table t: 5
905+INSERT INTO t (SELECT * FROM t1 ORDER BY nnuk1 LIMIT 1) UNION (SELECT * FROM t2);
906+Warnings:
907+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
908+ROWS in table t: 5
909+INSERT INTO t (SELECT * FROM t1 ORDER BY nnuk LIMIT 1) UNION (SELECT * FROM t2);
910+ROWS in table t: 5
911+INSERT INTO t (SELECT * FROM t1 ORDER BY nnuk_str_short LIMIT 1) UNION (SELECT * FROM t2);
912+ROWS in table t: 5
913+INSERT INTO t (SELECT * FROM t1 ORDER BY nnuk_str_long LIMIT 1) UNION (SELECT * FROM t2);
914+Warnings:
915+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
916+ROWS in table t: 5
917+INSERT INTO t (SELECT * FROM t1 ORDER BY pk LIMIT 1) UNION (SELECT * FROM t2);
918+ROWS in table t: 5
919+INSERT INTO t (SELECT * FROM t1 ORDER BY nnuk1, nnuk2 LIMIT 1) UNION (SELECT * FROM t2);
920+ROWS in table t: 5
921+INSERT INTO t (SELECT * FROM t1 ORDER BY nnuk1, nnuk2, nokey LIMIT 1) UNION (SELECT * FROM t2);
922+ROWS in table t: 5
923+INSERT INTO t (SELECT * FROM t1 ORDER BY nnuk1, nokey, nnuk2 LIMIT 1) UNION (SELECT * FROM t2);
924+ROWS in table t: 5
925+INSERT INTO t (SELECT * FROM t1) UNION (SELECT * FROM t2 LIMIT 0);
926+ROWS in table t: 4
927+INSERT INTO t (SELECT * FROM t1) UNION (SELECT * FROM t2 LIMIT 1);
928+Warnings:
929+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
930+ROWS in table t: 5
931+INSERT INTO t (SELECT * FROM t1) UNION (SELECT * FROM t2 ORDER BY nokey LIMIT 1);
932+Warnings:
933+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
934+ROWS in table t: 5
935+INSERT INTO t (SELECT * FROM t1) UNION (SELECT * FROM t2 ORDER BY nuk LIMIT 1);
936+Warnings:
937+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
938+ROWS in table t: 5
939+INSERT INTO t (SELECT * FROM t1) UNION (SELECT * FROM t2 ORDER BY nnuk1 LIMIT 1);
940+Warnings:
941+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
942+ROWS in table t: 5
943+INSERT INTO t (SELECT * FROM t1) UNION (SELECT * FROM t2 ORDER BY nnuk LIMIT 1);
944+ROWS in table t: 5
945+INSERT INTO t (SELECT * FROM t1) UNION (SELECT * FROM t2 ORDER BY nnuk_str_short LIMIT 1);
946+ROWS in table t: 5
947+INSERT INTO t (SELECT * FROM t1) UNION (SELECT * FROM t2 ORDER BY nnuk_str_long LIMIT 1);
948+Warnings:
949+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
950+ROWS in table t: 5
951+INSERT INTO t (SELECT * FROM t1) UNION (SELECT * FROM t2 ORDER BY pk LIMIT 1);
952+ROWS in table t: 5
953+INSERT INTO t (SELECT * FROM t1) UNION (SELECT * FROM t2 ORDER BY nnuk1, nnuk2 LIMIT 1);
954+ROWS in table t: 5
955+INSERT INTO t (SELECT * FROM t1) UNION (SELECT * FROM t2 ORDER BY nnuk1, nnuk2, nokey LIMIT 1);
956+ROWS in table t: 5
957+INSERT INTO t (SELECT * FROM t1) UNION (SELECT * FROM t2 ORDER BY nnuk1, nokey, nnuk2 LIMIT 1);
958+ROWS in table t: 5
959+INSERT INTO t (SELECT * FROM t1 LIMIT 0) UNION (SELECT * FROM t2 ORDER BY nnuk1, nokey, nnuk2 LIMIT 1);
960+ROWS in table t: 3
961+INSERT INTO t (SELECT * FROM t1 LIMIT 1) UNION (SELECT * FROM t2 ORDER BY nnuk1, nokey, nnuk2 LIMIT 1);
962+Warnings:
963+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
964+ROWS in table t: 4
965+INSERT INTO t (SELECT * FROM t1 ORDER BY nokey LIMIT 1) UNION (SELECT * FROM t2 ORDER BY nnuk1, nokey, nnuk2 LIMIT 1);
966+Warnings:
967+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
968+ROWS in table t: 4
969+INSERT INTO t (SELECT * FROM t1 ORDER BY nuk LIMIT 1) UNION (SELECT * FROM t2 ORDER BY nnuk1, nokey, nnuk2 LIMIT 1);
970+Warnings:
971+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
972+ROWS in table t: 4
973+INSERT INTO t (SELECT * FROM t1 ORDER BY nnuk1 LIMIT 1) UNION (SELECT * FROM t2 ORDER BY nnuk1, nokey, nnuk2 LIMIT 1);
974+Warnings:
975+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
976+ROWS in table t: 4
977+INSERT INTO t (SELECT * FROM t1 ORDER BY nnuk LIMIT 1) UNION (SELECT * FROM t2 ORDER BY nnuk1, nokey, nnuk2 LIMIT 1);
978+ROWS in table t: 4
979+INSERT INTO t (SELECT * FROM t1 ORDER BY nnuk_str_short LIMIT 1) UNION (SELECT * FROM t2 ORDER BY nnuk1, nokey, nnuk2 LIMIT 1);
980+ROWS in table t: 4
981+INSERT INTO t (SELECT * FROM t1 ORDER BY nnuk_str_long LIMIT 1) UNION (SELECT * FROM t2 ORDER BY nnuk1, nokey, nnuk2 LIMIT 1);
982+Warnings:
983+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
984+ROWS in table t: 4
985+INSERT INTO t (SELECT * FROM t1 ORDER BY pk LIMIT 1) UNION (SELECT * FROM t2 ORDER BY nnuk1, nokey, nnuk2 LIMIT 1);
986+ROWS in table t: 4
987+INSERT INTO t (SELECT * FROM t1 ORDER BY nnuk1, nnuk2 LIMIT 1) UNION (SELECT * FROM t2 ORDER BY nnuk1, nokey, nnuk2 LIMIT 1);
988+ROWS in table t: 4
989+INSERT INTO t (SELECT * FROM t1 ORDER BY nnuk1, nnuk2, nokey LIMIT 1) UNION (SELECT * FROM t2 ORDER BY nnuk1, nokey, nnuk2 LIMIT 1);
990+ROWS in table t: 4
991+INSERT INTO t (SELECT * FROM t1 ORDER BY nnuk1, nokey, nnuk2 LIMIT 1) UNION (SELECT * FROM t2 ORDER BY nnuk1, nokey, nnuk2 LIMIT 1);
992+ROWS in table t: 4
993+INSERT INTO t SELECT * FROM (SELECT * FROM t1 LIMIT 0) AS subselect ORDER BY nnuk1, nokey, nnuk2 LIMIT 1;
994+Warnings:
995+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
996+ROWS in table t: 2
997+INSERT INTO t SELECT * FROM (SELECT * FROM t1 LIMIT 1) AS subselect ORDER BY nnuk1, nokey, nnuk2 LIMIT 1;
998+Warnings:
999+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
1000+ROWS in table t: 3
1001+INSERT INTO t SELECT * FROM (SELECT * FROM t1 ORDER BY nokey LIMIT 1) AS subselect ORDER BY nnuk1, nokey, nnuk2 LIMIT 1;
1002+Warnings:
1003+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
1004+ROWS in table t: 3
1005+INSERT INTO t SELECT * FROM (SELECT * FROM t1 ORDER BY nuk LIMIT 1) AS subselect ORDER BY nnuk1, nokey, nnuk2 LIMIT 1;
1006+Warnings:
1007+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
1008+ROWS in table t: 3
1009+INSERT INTO t SELECT * FROM (SELECT * FROM t1 ORDER BY nnuk1 LIMIT 1) AS subselect ORDER BY nnuk1, nokey, nnuk2 LIMIT 1;
1010+Warnings:
1011+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
1012+ROWS in table t: 3
1013+INSERT INTO t SELECT * FROM (SELECT * FROM t1 ORDER BY nnuk LIMIT 1) AS subselect ORDER BY nnuk1, nokey, nnuk2 LIMIT 1;
1014+Warnings:
1015+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
1016+ROWS in table t: 3
1017+INSERT INTO t SELECT * FROM (SELECT * FROM t1 ORDER BY nnuk_str_short LIMIT 1) AS subselect ORDER BY nnuk1, nokey, nnuk2 LIMIT 1;
1018+Warnings:
1019+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
1020+ROWS in table t: 3
1021+INSERT INTO t SELECT * FROM (SELECT * FROM t1 ORDER BY nnuk_str_long LIMIT 1) AS subselect ORDER BY nnuk1, nokey, nnuk2 LIMIT 1;
1022+Warnings:
1023+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
1024+ROWS in table t: 3
1025+INSERT INTO t SELECT * FROM (SELECT * FROM t1 ORDER BY pk LIMIT 1) AS subselect ORDER BY nnuk1, nokey, nnuk2 LIMIT 1;
1026+Warnings:
1027+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
1028+ROWS in table t: 3
1029+INSERT INTO t SELECT * FROM (SELECT * FROM t1 ORDER BY nnuk1, nnuk2 LIMIT 1) AS subselect ORDER BY nnuk1, nokey, nnuk2 LIMIT 1;
1030+Warnings:
1031+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
1032+ROWS in table t: 3
1033+INSERT INTO t SELECT * FROM (SELECT * FROM t1 ORDER BY nnuk1, nnuk2, nokey LIMIT 1) AS subselect ORDER BY nnuk1, nokey, nnuk2 LIMIT 1;
1034+Warnings:
1035+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
1036+ROWS in table t: 3
1037+INSERT INTO t SELECT * FROM (SELECT * FROM t1 ORDER BY nnuk1, nokey, nnuk2 LIMIT 1) AS subselect ORDER BY nnuk1, nokey, nnuk2 LIMIT 1;
1038+Warnings:
1039+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
1040+ROWS in table t: 3
1041+INSERT INTO t SELECT * FROM t1 WHERE pk IN (SELECT t2.pk FROM t2 WHERE t1.pk = t2.pk) LIMIT 0;
1042+ROWS in table t: 2
1043+INSERT INTO t SELECT * FROM t1 WHERE pk IN (SELECT t2.pk FROM t2 WHERE t1.pk = t2.pk) LIMIT 1;
1044+Warnings:
1045+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
1046+ROWS in table t: 2
1047+INSERT INTO t SELECT * FROM t1 WHERE pk IN (SELECT t2.pk FROM t2 WHERE t1.pk = t2.pk) ORDER BY nokey LIMIT 1;
1048+Warnings:
1049+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
1050+ROWS in table t: 2
1051+INSERT INTO t SELECT * FROM t1 WHERE pk IN (SELECT t2.pk FROM t2 WHERE t1.pk = t2.pk) ORDER BY nuk LIMIT 1;
1052+Warnings:
1053+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
1054+ROWS in table t: 2
1055+INSERT INTO t SELECT * FROM t1 WHERE pk IN (SELECT t2.pk FROM t2 WHERE t1.pk = t2.pk) ORDER BY nnuk1 LIMIT 1;
1056+Warnings:
1057+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
1058+ROWS in table t: 2
1059+INSERT INTO t SELECT * FROM t1 WHERE pk IN (SELECT t2.pk FROM t2 WHERE t1.pk = t2.pk) ORDER BY nnuk LIMIT 1;
1060+ROWS in table t: 2
1061+INSERT INTO t SELECT * FROM t1 WHERE pk IN (SELECT t2.pk FROM t2 WHERE t1.pk = t2.pk) ORDER BY nnuk_str_short LIMIT 1;
1062+ROWS in table t: 2
1063+INSERT INTO t SELECT * FROM t1 WHERE pk IN (SELECT t2.pk FROM t2 WHERE t1.pk = t2.pk) ORDER BY nnuk_str_long LIMIT 1;
1064+Warnings:
1065+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
1066+ROWS in table t: 2
1067+INSERT INTO t SELECT * FROM t1 WHERE pk IN (SELECT t2.pk FROM t2 WHERE t1.pk = t2.pk) ORDER BY pk LIMIT 1;
1068+ROWS in table t: 2
1069+INSERT INTO t SELECT * FROM t1 WHERE pk IN (SELECT t2.pk FROM t2 WHERE t1.pk = t2.pk) ORDER BY nnuk1, nnuk2 LIMIT 1;
1070+ROWS in table t: 2
1071+INSERT INTO t SELECT * FROM t1 WHERE pk IN (SELECT t2.pk FROM t2 WHERE t1.pk = t2.pk) ORDER BY nnuk1, nnuk2, nokey LIMIT 1;
1072+ROWS in table t: 2
1073+INSERT INTO t SELECT * FROM t1 WHERE pk IN (SELECT t2.pk FROM t2 WHERE t1.pk = t2.pk) ORDER BY nnuk1, nokey, nnuk2 LIMIT 1;
1074+ROWS in table t: 2
1075+INSERT INTO t SELECT t1.* FROM t1, t2 LIMIT 0;
1076+ROWS in table t: 2
1077+INSERT INTO t SELECT t1.* FROM t1, t2 LIMIT 1;
1078+Warnings:
1079+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
1080+ROWS in table t: 3
1081+INSERT INTO t SELECT t1.* FROM t1, t2 ORDER BY nokey LIMIT 1;
1082+Warnings:
1083+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
1084+ROWS in table t: 3
1085+INSERT INTO t SELECT t1.* FROM t1, t2 ORDER BY nuk LIMIT 1;
1086+Warnings:
1087+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
1088+ROWS in table t: 3
1089+INSERT INTO t SELECT t1.* FROM t1, t2 ORDER BY nnuk1 LIMIT 1;
1090+Warnings:
1091+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
1092+ROWS in table t: 3
1093+INSERT INTO t SELECT t1.* FROM t1, t2 ORDER BY nnuk LIMIT 1;
1094+Warnings:
1095+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
1096+ROWS in table t: 3
1097+INSERT INTO t SELECT t1.* FROM t1, t2 ORDER BY nnuk_str_short LIMIT 1;
1098+Warnings:
1099+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
1100+ROWS in table t: 3
1101+INSERT INTO t SELECT t1.* FROM t1, t2 ORDER BY nnuk_str_long LIMIT 1;
1102+Warnings:
1103+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
1104+ROWS in table t: 3
1105+INSERT INTO t SELECT t1.* FROM t1, t2 ORDER BY pk LIMIT 1;
1106+Warnings:
1107+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
1108+ROWS in table t: 3
1109+INSERT INTO t SELECT t1.* FROM t1, t2 ORDER BY nnuk1, nnuk2 LIMIT 1;
1110+Warnings:
1111+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
1112+ROWS in table t: 3
1113+INSERT INTO t SELECT t1.* FROM t1, t2 ORDER BY nnuk1, nnuk2, nokey LIMIT 1;
1114+Warnings:
1115+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
1116+ROWS in table t: 3
1117+INSERT INTO t SELECT t1.* FROM t1, t2 ORDER BY nnuk1, nokey, nnuk2 LIMIT 1;
1118+Warnings:
1119+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
1120+ROWS in table t: 3
1121+INSERT INTO t SELECT t1.* FROM t1, t2 WHERE t1.nokey=t2.nokey LIMIT 0;
1122+ROWS in table t: 2
1123+INSERT INTO t SELECT t1.* FROM t1, t2 WHERE t1.nokey=t2.nokey LIMIT 1;
1124+Warnings:
1125+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
1126+ROWS in table t: 2
1127+INSERT INTO t SELECT t1.* FROM t1, t2 WHERE t1.nokey=t2.nokey ORDER BY nokey LIMIT 1;
1128+Warnings:
1129+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
1130+ROWS in table t: 2
1131+INSERT INTO t SELECT t1.* FROM t1, t2 WHERE t1.nokey=t2.nokey ORDER BY nuk LIMIT 1;
1132+Warnings:
1133+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
1134+ROWS in table t: 2
1135+INSERT INTO t SELECT t1.* FROM t1, t2 WHERE t1.nokey=t2.nokey ORDER BY nnuk1 LIMIT 1;
1136+Warnings:
1137+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
1138+ROWS in table t: 2
1139+INSERT INTO t SELECT t1.* FROM t1, t2 WHERE t1.nokey=t2.nokey ORDER BY nnuk LIMIT 1;
1140+Warnings:
1141+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
1142+ROWS in table t: 2
1143+INSERT INTO t SELECT t1.* FROM t1, t2 WHERE t1.nokey=t2.nokey ORDER BY nnuk_str_short LIMIT 1;
1144+Warnings:
1145+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
1146+ROWS in table t: 2
1147+INSERT INTO t SELECT t1.* FROM t1, t2 WHERE t1.nokey=t2.nokey ORDER BY nnuk_str_long LIMIT 1;
1148+Warnings:
1149+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
1150+ROWS in table t: 2
1151+INSERT INTO t SELECT t1.* FROM t1, t2 WHERE t1.nokey=t2.nokey ORDER BY pk LIMIT 1;
1152+Warnings:
1153+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
1154+ROWS in table t: 2
1155+INSERT INTO t SELECT t1.* FROM t1, t2 WHERE t1.nokey=t2.nokey ORDER BY nnuk1, nnuk2 LIMIT 1;
1156+Warnings:
1157+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
1158+ROWS in table t: 2
1159+INSERT INTO t SELECT t1.* FROM t1, t2 WHERE t1.nokey=t2.nokey ORDER BY nnuk1, nnuk2, nokey LIMIT 1;
1160+Warnings:
1161+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
1162+ROWS in table t: 2
1163+INSERT INTO t SELECT t1.* FROM t1, t2 WHERE t1.nokey=t2.nokey ORDER BY nnuk1, nokey, nnuk2 LIMIT 1;
1164+Warnings:
1165+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
1166+ROWS in table t: 2
1167+INSERT INTO t SELECT t1.* FROM t1, t2 WHERE t1.nuk=t2.nuk LIMIT 0;
1168+ROWS in table t: 2
1169+INSERT INTO t SELECT t1.* FROM t1, t2 WHERE t1.nuk=t2.nuk LIMIT 1;
1170+Warnings:
1171+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
1172+ROWS in table t: 2
1173+INSERT INTO t SELECT t1.* FROM t1, t2 WHERE t1.nuk=t2.nuk ORDER BY nokey LIMIT 1;
1174+Warnings:
1175+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
1176+ROWS in table t: 2
1177+INSERT INTO t SELECT t1.* FROM t1, t2 WHERE t1.nuk=t2.nuk ORDER BY nuk LIMIT 1;
1178+Warnings:
1179+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
1180+ROWS in table t: 2
1181+INSERT INTO t SELECT t1.* FROM t1, t2 WHERE t1.nuk=t2.nuk ORDER BY nnuk1 LIMIT 1;
1182+Warnings:
1183+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
1184+ROWS in table t: 2
1185+INSERT INTO t SELECT t1.* FROM t1, t2 WHERE t1.nuk=t2.nuk ORDER BY nnuk LIMIT 1;
1186+Warnings:
1187+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
1188+ROWS in table t: 2
1189+INSERT INTO t SELECT t1.* FROM t1, t2 WHERE t1.nuk=t2.nuk ORDER BY nnuk_str_short LIMIT 1;
1190+Warnings:
1191+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
1192+ROWS in table t: 2
1193+INSERT INTO t SELECT t1.* FROM t1, t2 WHERE t1.nuk=t2.nuk ORDER BY nnuk_str_long LIMIT 1;
1194+Warnings:
1195+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
1196+ROWS in table t: 2
1197+INSERT INTO t SELECT t1.* FROM t1, t2 WHERE t1.nuk=t2.nuk ORDER BY pk LIMIT 1;
1198+Warnings:
1199+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
1200+ROWS in table t: 2
1201+INSERT INTO t SELECT t1.* FROM t1, t2 WHERE t1.nuk=t2.nuk ORDER BY nnuk1, nnuk2 LIMIT 1;
1202+Warnings:
1203+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
1204+ROWS in table t: 2
1205+INSERT INTO t SELECT t1.* FROM t1, t2 WHERE t1.nuk=t2.nuk ORDER BY nnuk1, nnuk2, nokey LIMIT 1;
1206+Warnings:
1207+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
1208+ROWS in table t: 2
1209+INSERT INTO t SELECT t1.* FROM t1, t2 WHERE t1.nuk=t2.nuk ORDER BY nnuk1, nokey, nnuk2 LIMIT 1;
1210+Warnings:
1211+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
1212+ROWS in table t: 2
1213+INSERT INTO t SELECT t1.* FROM t1, t2 WHERE t1.nnuk=t2.nnuk LIMIT 0;
1214+ROWS in table t: 2
1215+INSERT INTO t SELECT t1.* FROM t1, t2 WHERE t1.nnuk=t2.nnuk LIMIT 1;
1216+Warnings:
1217+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
1218+ROWS in table t: 2
1219+INSERT INTO t SELECT t1.* FROM t1, t2 WHERE t1.nnuk=t2.nnuk ORDER BY nokey LIMIT 1;
1220+Warnings:
1221+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
1222+ROWS in table t: 2
1223+INSERT INTO t SELECT t1.* FROM t1, t2 WHERE t1.nnuk=t2.nnuk ORDER BY nuk LIMIT 1;
1224+Warnings:
1225+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
1226+ROWS in table t: 2
1227+INSERT INTO t SELECT t1.* FROM t1, t2 WHERE t1.nnuk=t2.nnuk ORDER BY nnuk1 LIMIT 1;
1228+Warnings:
1229+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
1230+ROWS in table t: 2
1231+INSERT INTO t SELECT t1.* FROM t1, t2 WHERE t1.nnuk=t2.nnuk ORDER BY nnuk LIMIT 1;
1232+ROWS in table t: 2
1233+INSERT INTO t SELECT t1.* FROM t1, t2 WHERE t1.nnuk=t2.nnuk ORDER BY nnuk_str_short LIMIT 1;
1234+ROWS in table t: 2
1235+INSERT INTO t SELECT t1.* FROM t1, t2 WHERE t1.nnuk=t2.nnuk ORDER BY nnuk_str_long LIMIT 1;
1236+Warnings:
1237+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
1238+ROWS in table t: 2
1239+INSERT INTO t SELECT t1.* FROM t1, t2 WHERE t1.nnuk=t2.nnuk ORDER BY pk LIMIT 1;
1240+ROWS in table t: 2
1241+INSERT INTO t SELECT t1.* FROM t1, t2 WHERE t1.nnuk=t2.nnuk ORDER BY nnuk1, nnuk2 LIMIT 1;
1242+ROWS in table t: 2
1243+INSERT INTO t SELECT t1.* FROM t1, t2 WHERE t1.nnuk=t2.nnuk ORDER BY nnuk1, nnuk2, nokey LIMIT 1;
1244+ROWS in table t: 2
1245+INSERT INTO t SELECT t1.* FROM t1, t2 WHERE t1.nnuk=t2.nnuk ORDER BY nnuk1, nokey, nnuk2 LIMIT 1;
1246+ROWS in table t: 2
1247+INSERT INTO t SELECT t1.* FROM t1, t2 WHERE t1.pk=t2.pk LIMIT 0;
1248+ROWS in table t: 2
1249+INSERT INTO t SELECT t1.* FROM t1, t2 WHERE t1.pk=t2.pk LIMIT 1;
1250+Warnings:
1251+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
1252+ROWS in table t: 2
1253+INSERT INTO t SELECT t1.* FROM t1, t2 WHERE t1.pk=t2.pk ORDER BY nokey LIMIT 1;
1254+Warnings:
1255+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
1256+ROWS in table t: 2
1257+INSERT INTO t SELECT t1.* FROM t1, t2 WHERE t1.pk=t2.pk ORDER BY nuk LIMIT 1;
1258+Warnings:
1259+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
1260+ROWS in table t: 2
1261+INSERT INTO t SELECT t1.* FROM t1, t2 WHERE t1.pk=t2.pk ORDER BY nnuk1 LIMIT 1;
1262+Warnings:
1263+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
1264+ROWS in table t: 2
1265+INSERT INTO t SELECT t1.* FROM t1, t2 WHERE t1.pk=t2.pk ORDER BY nnuk LIMIT 1;
1266+ROWS in table t: 2
1267+INSERT INTO t SELECT t1.* FROM t1, t2 WHERE t1.pk=t2.pk ORDER BY nnuk_str_short LIMIT 1;
1268+ROWS in table t: 2
1269+INSERT INTO t SELECT t1.* FROM t1, t2 WHERE t1.pk=t2.pk ORDER BY nnuk_str_long LIMIT 1;
1270+Warnings:
1271+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
1272+ROWS in table t: 2
1273+INSERT INTO t SELECT t1.* FROM t1, t2 WHERE t1.pk=t2.pk ORDER BY pk LIMIT 1;
1274+ROWS in table t: 2
1275+INSERT INTO t SELECT t1.* FROM t1, t2 WHERE t1.pk=t2.pk ORDER BY nnuk1, nnuk2 LIMIT 1;
1276+ROWS in table t: 2
1277+INSERT INTO t SELECT t1.* FROM t1, t2 WHERE t1.pk=t2.pk ORDER BY nnuk1, nnuk2, nokey LIMIT 1;
1278+ROWS in table t: 2
1279+INSERT INTO t SELECT t1.* FROM t1, t2 WHERE t1.pk=t2.pk ORDER BY nnuk1, nokey, nnuk2 LIMIT 1;
1280+ROWS in table t: 2
1281+INSERT INTO t SELECT t1.* FROM t1 NATURAL JOIN t2 LIMIT 0;
1282+ROWS in table t: 2
1283+INSERT INTO t SELECT t1.* FROM t1 NATURAL JOIN t2 LIMIT 1;
1284+Warnings:
1285+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
1286+ROWS in table t: 2
1287+INSERT INTO t SELECT t1.* FROM t1 NATURAL JOIN t2 ORDER BY nokey LIMIT 1;
1288+Warnings:
1289+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
1290+ROWS in table t: 2
1291+INSERT INTO t SELECT t1.* FROM t1 NATURAL JOIN t2 ORDER BY nuk LIMIT 1;
1292+Warnings:
1293+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
1294+ROWS in table t: 2
1295+INSERT INTO t SELECT t1.* FROM t1 NATURAL JOIN t2 ORDER BY nnuk1 LIMIT 1;
1296+Warnings:
1297+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
1298+ROWS in table t: 2
1299+INSERT INTO t SELECT t1.* FROM t1 NATURAL JOIN t2 ORDER BY nnuk LIMIT 1;
1300+ROWS in table t: 2
1301+INSERT INTO t SELECT t1.* FROM t1 NATURAL JOIN t2 ORDER BY nnuk_str_short LIMIT 1;
1302+ROWS in table t: 2
1303+INSERT INTO t SELECT t1.* FROM t1 NATURAL JOIN t2 ORDER BY nnuk_str_long LIMIT 1;
1304+Warnings:
1305+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
1306+ROWS in table t: 2
1307+INSERT INTO t SELECT t1.* FROM t1 NATURAL JOIN t2 ORDER BY pk LIMIT 1;
1308+ROWS in table t: 2
1309+INSERT INTO t SELECT t1.* FROM t1 NATURAL JOIN t2 ORDER BY nnuk1, nnuk2 LIMIT 1;
1310+ROWS in table t: 2
1311+INSERT INTO t SELECT t1.* FROM t1 NATURAL JOIN t2 ORDER BY nnuk1, nnuk2, nokey LIMIT 1;
1312+ROWS in table t: 2
1313+INSERT INTO t SELECT t1.* FROM t1 NATURAL JOIN t2 ORDER BY nnuk1, nokey, nnuk2 LIMIT 1;
1314+ROWS in table t: 2
1315+INSERT INTO t SELECT t1.* FROM t1 JOIN t2 USING(pk) LIMIT 0;
1316+ROWS in table t: 2
1317+INSERT INTO t SELECT t1.* FROM t1 JOIN t2 USING(pk) LIMIT 1;
1318+Warnings:
1319+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
1320+ROWS in table t: 2
1321+INSERT INTO t SELECT t1.* FROM t1 JOIN t2 USING(pk) ORDER BY nokey LIMIT 1;
1322+Warnings:
1323+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
1324+ROWS in table t: 2
1325+INSERT INTO t SELECT t1.* FROM t1 JOIN t2 USING(pk) ORDER BY nuk LIMIT 1;
1326+Warnings:
1327+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
1328+ROWS in table t: 2
1329+INSERT INTO t SELECT t1.* FROM t1 JOIN t2 USING(pk) ORDER BY nnuk1 LIMIT 1;
1330+Warnings:
1331+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
1332+ROWS in table t: 2
1333+INSERT INTO t SELECT t1.* FROM t1 JOIN t2 USING(pk) ORDER BY nnuk LIMIT 1;
1334+ROWS in table t: 2
1335+INSERT INTO t SELECT t1.* FROM t1 JOIN t2 USING(pk) ORDER BY nnuk_str_short LIMIT 1;
1336+ROWS in table t: 2
1337+INSERT INTO t SELECT t1.* FROM t1 JOIN t2 USING(pk) ORDER BY nnuk_str_long LIMIT 1;
1338+Warnings:
1339+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
1340+ROWS in table t: 2
1341+INSERT INTO t SELECT t1.* FROM t1 JOIN t2 USING(pk) ORDER BY pk LIMIT 1;
1342+ROWS in table t: 2
1343+INSERT INTO t SELECT t1.* FROM t1 JOIN t2 USING(pk) ORDER BY nnuk1, nnuk2 LIMIT 1;
1344+ROWS in table t: 2
1345+INSERT INTO t SELECT t1.* FROM t1 JOIN t2 USING(pk) ORDER BY nnuk1, nnuk2, nokey LIMIT 1;
1346+ROWS in table t: 2
1347+INSERT INTO t SELECT t1.* FROM t1 JOIN t2 USING(pk) ORDER BY nnuk1, nokey, nnuk2 LIMIT 1;
1348+ROWS in table t: 2
1349+INSERT INTO t SELECT t1.* FROM t1 JOIN t2 ON t1.nnuk1=t2.nnuk1 AND t1.nnuk2=t2.nnuk2 LIMIT 0;
1350+ROWS in table t: 2
1351+INSERT INTO t SELECT t1.* FROM t1 JOIN t2 ON t1.nnuk1=t2.nnuk1 AND t1.nnuk2=t2.nnuk2 LIMIT 1;
1352+Warnings:
1353+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
1354+ROWS in table t: 2
1355+INSERT INTO t SELECT t1.* FROM t1 JOIN t2 ON t1.nnuk1=t2.nnuk1 AND t1.nnuk2=t2.nnuk2 ORDER BY nokey LIMIT 1;
1356+Warnings:
1357+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
1358+ROWS in table t: 2
1359+INSERT INTO t SELECT t1.* FROM t1 JOIN t2 ON t1.nnuk1=t2.nnuk1 AND t1.nnuk2=t2.nnuk2 ORDER BY nuk LIMIT 1;
1360+Warnings:
1361+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
1362+ROWS in table t: 2
1363+INSERT INTO t SELECT t1.* FROM t1 JOIN t2 ON t1.nnuk1=t2.nnuk1 AND t1.nnuk2=t2.nnuk2 ORDER BY nnuk1 LIMIT 1;
1364+Warnings:
1365+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
1366+ROWS in table t: 2
1367+INSERT INTO t SELECT t1.* FROM t1 JOIN t2 ON t1.nnuk1=t2.nnuk1 AND t1.nnuk2=t2.nnuk2 ORDER BY nnuk LIMIT 1;
1368+ROWS in table t: 2
1369+INSERT INTO t SELECT t1.* FROM t1 JOIN t2 ON t1.nnuk1=t2.nnuk1 AND t1.nnuk2=t2.nnuk2 ORDER BY nnuk_str_short LIMIT 1;
1370+ROWS in table t: 2
1371+INSERT INTO t SELECT t1.* FROM t1 JOIN t2 ON t1.nnuk1=t2.nnuk1 AND t1.nnuk2=t2.nnuk2 ORDER BY nnuk_str_long LIMIT 1;
1372+Warnings:
1373+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
1374+ROWS in table t: 2
1375+INSERT INTO t SELECT t1.* FROM t1 JOIN t2 ON t1.nnuk1=t2.nnuk1 AND t1.nnuk2=t2.nnuk2 ORDER BY pk LIMIT 1;
1376+ROWS in table t: 2
1377+INSERT INTO t SELECT t1.* FROM t1 JOIN t2 ON t1.nnuk1=t2.nnuk1 AND t1.nnuk2=t2.nnuk2 ORDER BY nnuk1, nnuk2 LIMIT 1;
1378+ROWS in table t: 2
1379+INSERT INTO t SELECT t1.* FROM t1 JOIN t2 ON t1.nnuk1=t2.nnuk1 AND t1.nnuk2=t2.nnuk2 ORDER BY nnuk1, nnuk2, nokey LIMIT 1;
1380+ROWS in table t: 2
1381+INSERT INTO t SELECT t1.* FROM t1 JOIN t2 ON t1.nnuk1=t2.nnuk1 AND t1.nnuk2=t2.nnuk2 ORDER BY nnuk1, nokey, nnuk2 LIMIT 1;
1382+ROWS in table t: 2
1383+INSERT INTO t SELECT t1.* FROM t1 JOIN t2 ON t1.nnuk1=t2.nnuk2 AND t1.nnuk2=t2.nnuk1 LIMIT 0;
1384+ROWS in table t: 2
1385+INSERT INTO t SELECT t1.* FROM t1 JOIN t2 ON t1.nnuk1=t2.nnuk2 AND t1.nnuk2=t2.nnuk1 LIMIT 1;
1386+Warnings:
1387+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
1388+ROWS in table t: 2
1389+INSERT INTO t SELECT t1.* FROM t1 JOIN t2 ON t1.nnuk1=t2.nnuk2 AND t1.nnuk2=t2.nnuk1 ORDER BY nokey LIMIT 1;
1390+Warnings:
1391+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
1392+ROWS in table t: 2
1393+INSERT INTO t SELECT t1.* FROM t1 JOIN t2 ON t1.nnuk1=t2.nnuk2 AND t1.nnuk2=t2.nnuk1 ORDER BY nuk LIMIT 1;
1394+Warnings:
1395+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
1396+ROWS in table t: 2
1397+INSERT INTO t SELECT t1.* FROM t1 JOIN t2 ON t1.nnuk1=t2.nnuk2 AND t1.nnuk2=t2.nnuk1 ORDER BY nnuk1 LIMIT 1;
1398+Warnings:
1399+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
1400+ROWS in table t: 2
1401+INSERT INTO t SELECT t1.* FROM t1 JOIN t2 ON t1.nnuk1=t2.nnuk2 AND t1.nnuk2=t2.nnuk1 ORDER BY nnuk LIMIT 1;
1402+ROWS in table t: 2
1403+INSERT INTO t SELECT t1.* FROM t1 JOIN t2 ON t1.nnuk1=t2.nnuk2 AND t1.nnuk2=t2.nnuk1 ORDER BY nnuk_str_short LIMIT 1;
1404+ROWS in table t: 2
1405+INSERT INTO t SELECT t1.* FROM t1 JOIN t2 ON t1.nnuk1=t2.nnuk2 AND t1.nnuk2=t2.nnuk1 ORDER BY nnuk_str_long LIMIT 1;
1406+Warnings:
1407+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
1408+ROWS in table t: 2
1409+INSERT INTO t SELECT t1.* FROM t1 JOIN t2 ON t1.nnuk1=t2.nnuk2 AND t1.nnuk2=t2.nnuk1 ORDER BY pk LIMIT 1;
1410+ROWS in table t: 2
1411+INSERT INTO t SELECT t1.* FROM t1 JOIN t2 ON t1.nnuk1=t2.nnuk2 AND t1.nnuk2=t2.nnuk1 ORDER BY nnuk1, nnuk2 LIMIT 1;
1412+ROWS in table t: 2
1413+INSERT INTO t SELECT t1.* FROM t1 JOIN t2 ON t1.nnuk1=t2.nnuk2 AND t1.nnuk2=t2.nnuk1 ORDER BY nnuk1, nnuk2, nokey LIMIT 1;
1414+ROWS in table t: 2
1415+INSERT INTO t SELECT t1.* FROM t1 JOIN t2 ON t1.nnuk1=t2.nnuk2 AND t1.nnuk2=t2.nnuk1 ORDER BY nnuk1, nokey, nnuk2 LIMIT 1;
1416+ROWS in table t: 2
1417+INSERT INTO t SELECT t1.* FROM t1 JOIN (t2 JOIN t3 USING (pk)) USING(pk) LIMIT 0;
1418+ROWS in table t: 2
1419+INSERT INTO t SELECT t1.* FROM t1 JOIN (t2 JOIN t3 USING (pk)) USING(pk) LIMIT 1;
1420+Warnings:
1421+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
1422+ROWS in table t: 2
1423+INSERT INTO t SELECT t1.* FROM t1 JOIN (t2 JOIN t3 USING (pk)) USING(pk) ORDER BY nokey LIMIT 1;
1424+Warnings:
1425+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
1426+ROWS in table t: 2
1427+INSERT INTO t SELECT t1.* FROM t1 JOIN (t2 JOIN t3 USING (pk)) USING(pk) ORDER BY nuk LIMIT 1;
1428+Warnings:
1429+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
1430+ROWS in table t: 2
1431+INSERT INTO t SELECT t1.* FROM t1 JOIN (t2 JOIN t3 USING (pk)) USING(pk) ORDER BY nnuk1 LIMIT 1;
1432+Warnings:
1433+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
1434+ROWS in table t: 2
1435+INSERT INTO t SELECT t1.* FROM t1 JOIN (t2 JOIN t3 USING (pk)) USING(pk) ORDER BY nnuk LIMIT 1;
1436+ROWS in table t: 2
1437+INSERT INTO t SELECT t1.* FROM t1 JOIN (t2 JOIN t3 USING (pk)) USING(pk) ORDER BY nnuk_str_short LIMIT 1;
1438+ROWS in table t: 2
1439+INSERT INTO t SELECT t1.* FROM t1 JOIN (t2 JOIN t3 USING (pk)) USING(pk) ORDER BY nnuk_str_long LIMIT 1;
1440+Warnings:
1441+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
1442+ROWS in table t: 2
1443+INSERT INTO t SELECT t1.* FROM t1 JOIN (t2 JOIN t3 USING (pk)) USING(pk) ORDER BY pk LIMIT 1;
1444+ROWS in table t: 2
1445+INSERT INTO t SELECT t1.* FROM t1 JOIN (t2 JOIN t3 USING (pk)) USING(pk) ORDER BY nnuk1, nnuk2 LIMIT 1;
1446+ROWS in table t: 2
1447+INSERT INTO t SELECT t1.* FROM t1 JOIN (t2 JOIN t3 USING (pk)) USING(pk) ORDER BY nnuk1, nnuk2, nokey LIMIT 1;
1448+ROWS in table t: 2
1449+INSERT INTO t SELECT t1.* FROM t1 JOIN (t2 JOIN t3 USING (pk)) USING(pk) ORDER BY nnuk1, nokey, nnuk2 LIMIT 1;
1450+ROWS in table t: 2
1451+INSERT INTO t SELECT t1.* FROM t1 JOIN (t2 JOIN (t3 JOIN t4 USING (pk)) ON t2.pk=t3.pk) ON t1.pk=t4.pk LIMIT 0;
1452+ROWS in table t: 2
1453+INSERT INTO t SELECT t1.* FROM t1 JOIN (t2 JOIN (t3 JOIN t4 USING (pk)) ON t2.pk=t3.pk) ON t1.pk=t4.pk LIMIT 1;
1454+Warnings:
1455+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
1456+ROWS in table t: 2
1457+INSERT INTO t SELECT t1.* FROM t1 JOIN (t2 JOIN (t3 JOIN t4 USING (pk)) ON t2.pk=t3.pk) ON t1.pk=t4.pk ORDER BY nokey LIMIT 1;
1458+Warnings:
1459+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
1460+ROWS in table t: 2
1461+INSERT INTO t SELECT t1.* FROM t1 JOIN (t2 JOIN (t3 JOIN t4 USING (pk)) ON t2.pk=t3.pk) ON t1.pk=t4.pk ORDER BY nuk LIMIT 1;
1462+Warnings:
1463+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
1464+ROWS in table t: 2
1465+INSERT INTO t SELECT t1.* FROM t1 JOIN (t2 JOIN (t3 JOIN t4 USING (pk)) ON t2.pk=t3.pk) ON t1.pk=t4.pk ORDER BY nnuk1 LIMIT 1;
1466+Warnings:
1467+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
1468+ROWS in table t: 2
1469+INSERT INTO t SELECT t1.* FROM t1 JOIN (t2 JOIN (t3 JOIN t4 USING (pk)) ON t2.pk=t3.pk) ON t1.pk=t4.pk ORDER BY nnuk LIMIT 1;
1470+ROWS in table t: 2
1471+INSERT INTO t SELECT t1.* FROM t1 JOIN (t2 JOIN (t3 JOIN t4 USING (pk)) ON t2.pk=t3.pk) ON t1.pk=t4.pk ORDER BY nnuk_str_short LIMIT 1;
1472+ROWS in table t: 2
1473+INSERT INTO t SELECT t1.* FROM t1 JOIN (t2 JOIN (t3 JOIN t4 USING (pk)) ON t2.pk=t3.pk) ON t1.pk=t4.pk ORDER BY nnuk_str_long LIMIT 1;
1474+Warnings:
1475+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
1476+ROWS in table t: 2
1477+INSERT INTO t SELECT t1.* FROM t1 JOIN (t2 JOIN (t3 JOIN t4 USING (pk)) ON t2.pk=t3.pk) ON t1.pk=t4.pk ORDER BY pk LIMIT 1;
1478+ROWS in table t: 2
1479+INSERT INTO t SELECT t1.* FROM t1 JOIN (t2 JOIN (t3 JOIN t4 USING (pk)) ON t2.pk=t3.pk) ON t1.pk=t4.pk ORDER BY nnuk1, nnuk2 LIMIT 1;
1480+ROWS in table t: 2
1481+INSERT INTO t SELECT t1.* FROM t1 JOIN (t2 JOIN (t3 JOIN t4 USING (pk)) ON t2.pk=t3.pk) ON t1.pk=t4.pk ORDER BY nnuk1, nnuk2, nokey LIMIT 1;
1482+ROWS in table t: 2
1483+INSERT INTO t SELECT t1.* FROM t1 JOIN (t2 JOIN (t3 JOIN t4 USING (pk)) ON t2.pk=t3.pk) ON t1.pk=t4.pk ORDER BY nnuk1, nokey, nnuk2 LIMIT 1;
1484+ROWS in table t: 2
1485+INSERT INTO t SELECT t1.* FROM t1 JOIN (t2 JOIN (t3 JOIN t4 USING (pk)) ON t2.nnuk=t3.nnuk) ON t1.nnuk1=t4.nnuk1 AND t1.nnuk2=t4.nnuk2 LIMIT 0;
1486+ROWS in table t: 2
1487+INSERT INTO t SELECT t1.* FROM t1 JOIN (t2 JOIN (t3 JOIN t4 USING (pk)) ON t2.nnuk=t3.nnuk) ON t1.nnuk1=t4.nnuk1 AND t1.nnuk2=t4.nnuk2 LIMIT 1;
1488+Warnings:
1489+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
1490+ROWS in table t: 2
1491+INSERT INTO t SELECT t1.* FROM t1 JOIN (t2 JOIN (t3 JOIN t4 USING (pk)) ON t2.nnuk=t3.nnuk) ON t1.nnuk1=t4.nnuk1 AND t1.nnuk2=t4.nnuk2 ORDER BY nokey LIMIT 1;
1492+Warnings:
1493+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
1494+ROWS in table t: 2
1495+INSERT INTO t SELECT t1.* FROM t1 JOIN (t2 JOIN (t3 JOIN t4 USING (pk)) ON t2.nnuk=t3.nnuk) ON t1.nnuk1=t4.nnuk1 AND t1.nnuk2=t4.nnuk2 ORDER BY nuk LIMIT 1;
1496+Warnings:
1497+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
1498+ROWS in table t: 2
1499+INSERT INTO t SELECT t1.* FROM t1 JOIN (t2 JOIN (t3 JOIN t4 USING (pk)) ON t2.nnuk=t3.nnuk) ON t1.nnuk1=t4.nnuk1 AND t1.nnuk2=t4.nnuk2 ORDER BY nnuk1 LIMIT 1;
1500+Warnings:
1501+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
1502+ROWS in table t: 2
1503+INSERT INTO t SELECT t1.* FROM t1 JOIN (t2 JOIN (t3 JOIN t4 USING (pk)) ON t2.nnuk=t3.nnuk) ON t1.nnuk1=t4.nnuk1 AND t1.nnuk2=t4.nnuk2 ORDER BY nnuk LIMIT 1;
1504+ROWS in table t: 2
1505+INSERT INTO t SELECT t1.* FROM t1 JOIN (t2 JOIN (t3 JOIN t4 USING (pk)) ON t2.nnuk=t3.nnuk) ON t1.nnuk1=t4.nnuk1 AND t1.nnuk2=t4.nnuk2 ORDER BY nnuk_str_short LIMIT 1;
1506+ROWS in table t: 2
1507+INSERT INTO t SELECT t1.* FROM t1 JOIN (t2 JOIN (t3 JOIN t4 USING (pk)) ON t2.nnuk=t3.nnuk) ON t1.nnuk1=t4.nnuk1 AND t1.nnuk2=t4.nnuk2 ORDER BY nnuk_str_long LIMIT 1;
1508+Warnings:
1509+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
1510+ROWS in table t: 2
1511+INSERT INTO t SELECT t1.* FROM t1 JOIN (t2 JOIN (t3 JOIN t4 USING (pk)) ON t2.nnuk=t3.nnuk) ON t1.nnuk1=t4.nnuk1 AND t1.nnuk2=t4.nnuk2 ORDER BY pk LIMIT 1;
1512+ROWS in table t: 2
1513+INSERT INTO t SELECT t1.* FROM t1 JOIN (t2 JOIN (t3 JOIN t4 USING (pk)) ON t2.nnuk=t3.nnuk) ON t1.nnuk1=t4.nnuk1 AND t1.nnuk2=t4.nnuk2 ORDER BY nnuk1, nnuk2 LIMIT 1;
1514+ROWS in table t: 2
1515+INSERT INTO t SELECT t1.* FROM t1 JOIN (t2 JOIN (t3 JOIN t4 USING (pk)) ON t2.nnuk=t3.nnuk) ON t1.nnuk1=t4.nnuk1 AND t1.nnuk2=t4.nnuk2 ORDER BY nnuk1, nnuk2, nokey LIMIT 1;
1516+ROWS in table t: 2
1517+INSERT INTO t SELECT t1.* FROM t1 JOIN (t2 JOIN (t3 JOIN t4 USING (pk)) ON t2.nnuk=t3.nnuk) ON t1.nnuk1=t4.nnuk1 AND t1.nnuk2=t4.nnuk2 ORDER BY nnuk1, nokey, nnuk2 LIMIT 1;
1518+ROWS in table t: 2
1519+INSERT INTO t SELECT t1.* FROM t1 JOIN (t2 JOIN (t3 JOIN t4 USING (pk)) ON t2.nnuk=t3.nnuk) ON t1.nnuk1=t4.nnuk1 AND t1.nnuk2=t4.nnuk2 AND t2.pk=1 LIMIT 0;
1520+ROWS in table t: 2
1521+INSERT INTO t SELECT t1.* FROM t1 JOIN (t2 JOIN (t3 JOIN t4 USING (pk)) ON t2.nnuk=t3.nnuk) ON t1.nnuk1=t4.nnuk1 AND t1.nnuk2=t4.nnuk2 AND t2.pk=1 LIMIT 1;
1522+ROWS in table t: 2
1523+INSERT INTO t SELECT t1.* FROM t1 JOIN (t2 JOIN (t3 JOIN t4 USING (pk)) ON t2.nnuk=t3.nnuk) ON t1.nnuk1=t4.nnuk1 AND t1.nnuk2=t4.nnuk2 AND t2.pk=1 ORDER BY nokey LIMIT 1;
1524+ROWS in table t: 2
1525+INSERT INTO t SELECT t1.* FROM t1 JOIN (t2 JOIN (t3 JOIN t4 USING (pk)) ON t2.nnuk=t3.nnuk) ON t1.nnuk1=t4.nnuk1 AND t1.nnuk2=t4.nnuk2 AND t2.pk=1 ORDER BY nuk LIMIT 1;
1526+ROWS in table t: 2
1527+INSERT INTO t SELECT t1.* FROM t1 JOIN (t2 JOIN (t3 JOIN t4 USING (pk)) ON t2.nnuk=t3.nnuk) ON t1.nnuk1=t4.nnuk1 AND t1.nnuk2=t4.nnuk2 AND t2.pk=1 ORDER BY nnuk1 LIMIT 1;
1528+ROWS in table t: 2
1529+INSERT INTO t SELECT t1.* FROM t1 JOIN (t2 JOIN (t3 JOIN t4 USING (pk)) ON t2.nnuk=t3.nnuk) ON t1.nnuk1=t4.nnuk1 AND t1.nnuk2=t4.nnuk2 AND t2.pk=1 ORDER BY nnuk LIMIT 1;
1530+ROWS in table t: 2
1531+INSERT INTO t SELECT t1.* FROM t1 JOIN (t2 JOIN (t3 JOIN t4 USING (pk)) ON t2.nnuk=t3.nnuk) ON t1.nnuk1=t4.nnuk1 AND t1.nnuk2=t4.nnuk2 AND t2.pk=1 ORDER BY nnuk_str_short LIMIT 1;
1532+ROWS in table t: 2
1533+INSERT INTO t SELECT t1.* FROM t1 JOIN (t2 JOIN (t3 JOIN t4 USING (pk)) ON t2.nnuk=t3.nnuk) ON t1.nnuk1=t4.nnuk1 AND t1.nnuk2=t4.nnuk2 AND t2.pk=1 ORDER BY nnuk_str_long LIMIT 1;
1534+ROWS in table t: 2
1535+INSERT INTO t SELECT t1.* FROM t1 JOIN (t2 JOIN (t3 JOIN t4 USING (pk)) ON t2.nnuk=t3.nnuk) ON t1.nnuk1=t4.nnuk1 AND t1.nnuk2=t4.nnuk2 AND t2.pk=1 ORDER BY pk LIMIT 1;
1536+ROWS in table t: 2
1537+INSERT INTO t SELECT t1.* FROM t1 JOIN (t2 JOIN (t3 JOIN t4 USING (pk)) ON t2.nnuk=t3.nnuk) ON t1.nnuk1=t4.nnuk1 AND t1.nnuk2=t4.nnuk2 AND t2.pk=1 ORDER BY nnuk1, nnuk2 LIMIT 1;
1538+ROWS in table t: 2
1539+INSERT INTO t SELECT t1.* FROM t1 JOIN (t2 JOIN (t3 JOIN t4 USING (pk)) ON t2.nnuk=t3.nnuk) ON t1.nnuk1=t4.nnuk1 AND t1.nnuk2=t4.nnuk2 AND t2.pk=1 ORDER BY nnuk1, nnuk2, nokey LIMIT 1;
1540+ROWS in table t: 2
1541+INSERT INTO t SELECT t1.* FROM t1 JOIN (t2 JOIN (t3 JOIN t4 USING (pk)) ON t2.nnuk=t3.nnuk) ON t1.nnuk1=t4.nnuk1 AND t1.nnuk2=t4.nnuk2 AND t2.pk=1 ORDER BY nnuk1, nokey, nnuk2 LIMIT 1;
1542+ROWS in table t: 2
1543+INSERT INTO t SELECT t1.* FROM t1 LEFT JOIN t2 ON t1.pk=t2.pk LIMIT 0;
1544+ROWS in table t: 2
1545+INSERT INTO t SELECT t1.* FROM t1 LEFT JOIN t2 ON t1.pk=t2.pk LIMIT 1;
1546+Warnings:
1547+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
1548+ROWS in table t: 3
1549+INSERT INTO t SELECT t1.* FROM t1 LEFT JOIN t2 ON t1.pk=t2.pk ORDER BY nokey LIMIT 1;
1550+Warnings:
1551+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
1552+ROWS in table t: 3
1553+INSERT INTO t SELECT t1.* FROM t1 LEFT JOIN t2 ON t1.pk=t2.pk ORDER BY nuk LIMIT 1;
1554+Warnings:
1555+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
1556+ROWS in table t: 3
1557+INSERT INTO t SELECT t1.* FROM t1 LEFT JOIN t2 ON t1.pk=t2.pk ORDER BY nnuk1 LIMIT 1;
1558+Warnings:
1559+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
1560+ROWS in table t: 3
1561+INSERT INTO t SELECT t1.* FROM t1 LEFT JOIN t2 ON t1.pk=t2.pk ORDER BY nnuk LIMIT 1;
1562+ROWS in table t: 3
1563+INSERT INTO t SELECT t1.* FROM t1 LEFT JOIN t2 ON t1.pk=t2.pk ORDER BY nnuk_str_short LIMIT 1;
1564+ROWS in table t: 3
1565+INSERT INTO t SELECT t1.* FROM t1 LEFT JOIN t2 ON t1.pk=t2.pk ORDER BY nnuk_str_long LIMIT 1;
1566+Warnings:
1567+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
1568+ROWS in table t: 3
1569+INSERT INTO t SELECT t1.* FROM t1 LEFT JOIN t2 ON t1.pk=t2.pk ORDER BY pk LIMIT 1;
1570+ROWS in table t: 3
1571+INSERT INTO t SELECT t1.* FROM t1 LEFT JOIN t2 ON t1.pk=t2.pk ORDER BY nnuk1, nnuk2 LIMIT 1;
1572+ROWS in table t: 3
1573+INSERT INTO t SELECT t1.* FROM t1 LEFT JOIN t2 ON t1.pk=t2.pk ORDER BY nnuk1, nnuk2, nokey LIMIT 1;
1574+ROWS in table t: 3
1575+INSERT INTO t SELECT t1.* FROM t1 LEFT JOIN t2 ON t1.pk=t2.pk ORDER BY nnuk1, nokey, nnuk2 LIMIT 1;
1576+ROWS in table t: 3
1577+INSERT INTO t SELECT t2.* FROM t1 RIGHT JOIN t2 ON t1.pk=t2.pk LIMIT 0;
1578+ROWS in table t: 2
1579+INSERT INTO t SELECT t2.* FROM t1 RIGHT JOIN t2 ON t1.pk=t2.pk LIMIT 1;
1580+Warnings:
1581+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
1582+ROWS in table t: 3
1583+INSERT INTO t SELECT t2.* FROM t1 RIGHT JOIN t2 ON t1.pk=t2.pk ORDER BY nokey LIMIT 1;
1584+Warnings:
1585+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
1586+ROWS in table t: 3
1587+INSERT INTO t SELECT t2.* FROM t1 RIGHT JOIN t2 ON t1.pk=t2.pk ORDER BY nuk LIMIT 1;
1588+Warnings:
1589+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
1590+ROWS in table t: 3
1591+INSERT INTO t SELECT t2.* FROM t1 RIGHT JOIN t2 ON t1.pk=t2.pk ORDER BY nnuk1 LIMIT 1;
1592+Warnings:
1593+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
1594+ROWS in table t: 3
1595+INSERT INTO t SELECT t2.* FROM t1 RIGHT JOIN t2 ON t1.pk=t2.pk ORDER BY nnuk LIMIT 1;
1596+ROWS in table t: 3
1597+INSERT INTO t SELECT t2.* FROM t1 RIGHT JOIN t2 ON t1.pk=t2.pk ORDER BY nnuk_str_short LIMIT 1;
1598+ROWS in table t: 3
1599+INSERT INTO t SELECT t2.* FROM t1 RIGHT JOIN t2 ON t1.pk=t2.pk ORDER BY nnuk_str_long LIMIT 1;
1600+Warnings:
1601+Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
1602+ROWS in table t: 3
1603+INSERT INTO t SELECT t2.* FROM t1 RIGHT JOIN t2 ON t1.pk=t2.pk ORDER BY pk LIMIT 1;
1604+ROWS in table t: 3
1605+INSERT INTO t SELECT t2.* FROM t1 RIGHT JOIN t2 ON t1.pk=t2.pk ORDER BY nnuk1, nnuk2 LIMIT 1;
1606+ROWS in table t: 3
1607+INSERT INTO t SELECT t2.* FROM t1 RIGHT JOIN t2 ON t1.pk=t2.pk ORDER BY nnuk1, nnuk2, nokey LIMIT 1;
1608+ROWS in table t: 3
1609+INSERT INTO t SELECT t2.* FROM t1 RIGHT JOIN t2 ON t1.pk=t2.pk ORDER BY nnuk1, nokey, nnuk2 LIMIT 1;
1610+ROWS in table t: 3
1611+SET MAX_SORT_LENGTH=DEFAULT;
1612+DROP TABLE t, t1, t2, t3, t4;
1613+DROP TABLE queries, result_queries, limits;
1614+DROP PROCEDURE gen_queries;
1615
1616=== added file 'Percona-Server/mysql-test/suite/binlog/t/percona_binlog_unsafe_limit.test'
1617--- Percona-Server/mysql-test/suite/binlog/t/percona_binlog_unsafe_limit.test 1970-01-01 00:00:00 +0000
1618+++ Percona-Server/mysql-test/suite/binlog/t/percona_binlog_unsafe_limit.test 2013-06-26 17:10:34 +0000
1619@@ -0,0 +1,227 @@
1620+# ==== Purpose ====
1621+#
1622+# Test under what circumstances there is a warning for unsafe
1623+# statements on the following form:
1624+#
1625+# [INSERT...SELECT | REPLACE...SELECT | DELETE | UPDATE] ... ORDER BY ... LIMIT
1626+#
1627+# INSERT...SELECT...LIMIT should give a warning because the order of
1628+# rows may differ between master and slave, so the LIMIT may select a
1629+# different set of rows on master and slave. However, if there is an
1630+# 'ORDER BY primary_key', then the order is known and there should not
1631+# be any warning. The same is true for REPLACE...SELECT, DELETE, and
1632+# UPDATE. In REPLACE...SELECT and INSERT...SELECT, the select may be
1633+# compound using UNION or JOIN or subqueries in the FROM clause. So
1634+# we test LIMIT in various places in the subqueries.
1635+#
1636+# We also test various forms of ORDER BY ... LIMIT. If there is one
1637+# ORDER BY column and it is a PRIMARY KEY or NOT NULL UNIQUE KEY, then
1638+# the order is deterministic. If there is one ORDER BY column and it
1639+# is neither a PRIMARY KEY nor a NOT NULL UNIQUE KEY, then the order
1640+# is not deterministic. If the ORDER BY consists of several columns,
1641+# and a prefix of the ORDER BY columns is a PRIMARY KEY or NOT NULL
1642+# UNIQUE KEY, then the order is deterministic. If the ORDER BY
1643+# consists of several columns, and no prefix of the ORDER BY COLUMNS
1644+# is a PRIMARY KEY or NOT NULL UNIQUE KEY, then the order is not
1645+# deterministic.
1646+
1647+source include/have_log_bin.inc;
1648+source include/have_binlog_format_statement.inc;
1649+
1650+--disable_query_log
1651+call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT");
1652+--enable_query_log
1653+
1654+#
1655+# Create the tables for test
1656+# Where:
1657+# - nokey is a column not part of key
1658+# - pk is column of the primary key
1659+# - nuk is a column of UNIQUE KEY, which can be NULL.
1660+# - nnuk is a column of NOT NULL UNIQUE KEY
1661+# - nnuk1 and nnuk2 are NOT NULL columns, and togather forms a UNIQUE KEY.
1662+# - nnuk_str_long is a VARCHAR UNIQUE KEY column that is longer than MAX_LENGTH_SORT in this test.
1663+# - nnuk_str_short is a VARCHAR UNIQUE KEY column that is shorter than MAX_LENGTH_SORT in this test.
1664+#
1665+CREATE TABLE t (nokey INT, pk INT PRIMARY KEY, nnuk INT NOT NULL UNIQUE KEY, nuk INT UNIQUE KEY,
1666+ nnuk1 INT NOT NULL, nnuk2 INT NOT NULL, UNIQUE KEY(nnuk1, nnuk2),
1667+ nnuk_str_long VARCHAR(512) NOT NULL UNIQUE KEY,
1668+ nnuk_str_short VARCHAR(50) NOT NULL UNIQUE KEY);
1669+CREATE TABLE t1 LIKE t;
1670+CREATE TABLE t2 LIKE t;
1671+CREATE TABLE t3 LIKE t;
1672+CREATE TABLE t4 LIKE t;
1673+
1674+
1675+CREATE TABLE queries (query VARCHAR(1024) NOT NULL);
1676+CREATE TABLE result_queries (id INT AUTO_INCREMENT PRIMARY KEY, query VARCHAR(1024) NOT NULL);
1677+CREATE TABLE limits (`limit` VARCHAR(256) NOT NULL);
1678+
1679+#
1680+# Iterate through the following queries
1681+#
1682+# [LIMIT_1] and [LIMIT_2] will iterate over the strings in table `limits`
1683+#
1684+INSERT INTO queries(query) VALUES
1685+ ('UPDATE t SET nokey = nokey + 10 [LIMIT_1]'),
1686+ ('UPDATE t SET nokey = nokey + 10 WHERE nokey=1 [LIMIT_1]'),
1687+ ('UPDATE t SET nokey = nokey + 10 WHERE nuk=1 [LIMIT_1]'),
1688+ ('UPDATE t SET nokey = nokey + 10 WHERE nnuk=1 [LIMIT_1]'),
1689+ ('UPDATE t SET nokey = nokey + 10 WHERE pk=1 [LIMIT_1]'),
1690+
1691+ ('DELETE FROM t [LIMIT_1]'),
1692+ ('DELETE FROM t WHERE nokey=1 [LIMIT_1]'),
1693+ ('DELETE FROM t WHERE nuk=1 [LIMIT_1]'),
1694+ ('DELETE FROM t WHERE nnuk=1 [LIMIT_1]'),
1695+ ('DELETE FROM t WHERE pk=1 [LIMIT_1]'),
1696+
1697+ ('REPLACE INTO t SELECT * FROM t1 [LIMIT_1]'),
1698+ ('REPLACE INTO t SELECT * FROM t1 WHERE nokey=1 [LIMIT_1]'),
1699+ ('REPLACE INTO t SELECT * FROM t1 WHERE nuk=1 [LIMIT_1]'),
1700+ ('REPLACE INTO t SELECT * FROM t1 WHERE nnuk=1 [LIMIT_1]'),
1701+ ('REPLACE INTO t SELECT * FROM t1 WHERE pk=1 [LIMIT_1]'),
1702+
1703+ ('INSERT INTO t SELECT * FROM t1 [LIMIT_1]'),
1704+ ('INSERT INTO t SELECT * FROM t1 WHERE nokey=1 [LIMIT_1]'),
1705+ ('INSERT INTO t SELECT * FROM t1 WHERE nuk=1 [LIMIT_1]'),
1706+ ('INSERT INTO t SELECT * FROM t1 WHERE nnuk=1 [LIMIT_1]'),
1707+ ('INSERT INTO t SELECT * FROM t1 WHERE pk=1 [LIMIT_1]'),
1708+
1709+ ('INSERT INTO t (SELECT * FROM t1) UNION (SELECT * FROM t2) [LIMIT_1]'),
1710+ ('INSERT INTO t (SELECT * FROM t1 [LIMIT_1]) UNION (SELECT * FROM t2)'),
1711+ ('INSERT INTO t (SELECT * FROM t1) UNION (SELECT * FROM t2 [LIMIT_1])'),
1712+ ('INSERT INTO t (SELECT * FROM t1 [LIMIT_1]) UNION (SELECT * FROM t2 [LIMIT_2])'),
1713+
1714+ ('INSERT INTO t SELECT * FROM (SELECT * FROM t1 [LIMIT_1]) AS subselect [LIMIT_2]'),
1715+ ('INSERT INTO t SELECT * FROM t1 WHERE pk IN (SELECT t2.pk FROM t2 WHERE t1.pk = t2.pk) [LIMIT_1]'),
1716+ ('INSERT INTO t SELECT t1.* FROM t1, t2 [LIMIT_1]'),
1717+ ('INSERT INTO t SELECT t1.* FROM t1, t2 WHERE t1.nokey=t2.nokey [LIMIT_1]'),
1718+ ('INSERT INTO t SELECT t1.* FROM t1, t2 WHERE t1.nuk=t2.nuk [LIMIT_1]'),
1719+ ('INSERT INTO t SELECT t1.* FROM t1, t2 WHERE t1.nnuk=t2.nnuk [LIMIT_1]'),
1720+ ('INSERT INTO t SELECT t1.* FROM t1, t2 WHERE t1.pk=t2.pk [LIMIT_1]'),
1721+
1722+ ('INSERT INTO t SELECT t1.* FROM t1 NATURAL JOIN t2 [LIMIT_1]'),
1723+ ('INSERT INTO t SELECT t1.* FROM t1 JOIN t2 USING(pk) [LIMIT_1]'),
1724+ ('INSERT INTO t SELECT t1.* FROM t1 JOIN t2 ON t1.nnuk1=t2.nnuk1 AND t1.nnuk2=t2.nnuk2 [LIMIT_1]'),
1725+ ('INSERT INTO t SELECT t1.* FROM t1 JOIN t2 ON t1.nnuk1=t2.nnuk2 AND t1.nnuk2=t2.nnuk1 [LIMIT_1]'),
1726+ ('INSERT INTO t SELECT t1.* FROM t1 JOIN (t2 JOIN t3 USING (pk)) USING(pk) [LIMIT_1]'),
1727+ ('INSERT INTO t SELECT t1.* FROM t1 JOIN (t2 JOIN (t3 JOIN t4 USING (pk)) ON t2.pk=t3.pk) ON t1.pk=t4.pk [LIMIT_1]'),
1728+ ('INSERT INTO t SELECT t1.* FROM t1 JOIN (t2 JOIN (t3 JOIN t4 USING (pk)) ON t2.nnuk=t3.nnuk) ON t1.nnuk1=t4.nnuk1 AND t1.nnuk2=t4.nnuk2 [LIMIT_1]'),
1729+ ('INSERT INTO t SELECT t1.* FROM t1 JOIN (t2 JOIN (t3 JOIN t4 USING (pk)) ON t2.nnuk=t3.nnuk) ON t1.nnuk1=t4.nnuk1 AND t1.nnuk2=t4.nnuk2 AND t2.pk=1 [LIMIT_1]'),
1730+ ('INSERT INTO t SELECT t1.* FROM t1 LEFT JOIN t2 ON t1.pk=t2.pk [LIMIT_1]'),
1731+ ('INSERT INTO t SELECT t2.* FROM t1 RIGHT JOIN t2 ON t1.pk=t2.pk [LIMIT_1]');
1732+
1733+
1734+#
1735+# Let the LIMIT cluase ([LIMIT_1] and [LIMIT_2]) iterate through the following strings:
1736+#
1737+INSERT INTO limits (`limit`) VALUES
1738+ ('LIMIT 0'),
1739+ ('LIMIT 1'),
1740+ ('ORDER BY nokey LIMIT 1'),
1741+ ('ORDER BY nuk LIMIT 1'),
1742+ ('ORDER BY nnuk1 LIMIT 1'),
1743+ ('ORDER BY nnuk LIMIT 1'),
1744+ ('ORDER BY nnuk_str_short LIMIT 1'),
1745+ ('ORDER BY nnuk_str_long LIMIT 1'),
1746+ ('ORDER BY pk LIMIT 1'),
1747+ ('ORDER BY nnuk1, nnuk2 LIMIT 1'),
1748+ ('ORDER BY nnuk1, nnuk2, nokey LIMIT 1'),
1749+ ('ORDER BY nnuk1, nokey, nnuk2 LIMIT 1');
1750+
1751+
1752+DELIMITER |;
1753+
1754+#
1755+# This function is used to generate the queries by replace [LIMIT_1]
1756+# and [LIMIT_2] with values in table `limits` for values in table
1757+# `queries`. And the result will be save in table `result_queries`.
1758+#
1759+
1760+CREATE PROCEDURE gen_queries()
1761+BEGIN
1762+ DECLARE done INT DEFAULT 0;
1763+ DECLARE q VARCHAR(1024);
1764+ DECLARE limit1, limit2 VARCHAR(256);
1765+ DECLARE qcur CURSOR FOR SELECT * FROM queries;
1766+ DECLARE lcur1 CURSOR FOR SELECT * FROM limits;
1767+ DECLARE lcur2 CURSOR FOR SELECT * FROM limits;
1768+ DECLARE CONTINUE HANDLER FOR NOT FOUND SET done=1;
1769+
1770+ OPEN qcur;
1771+
1772+ FETCH qcur INTO q;
1773+ WHILE done <> 1 DO
1774+ OPEN lcur1;
1775+ FETCH lcur1 INTO limit1;
1776+ WHILE done <> 1 DO
1777+
1778+ IF LOCATE('[LIMIT_2]', q) > 0 THEN
1779+ OPEN lcur2;
1780+ FETCH lcur2 INTO limit2;
1781+ WHILE done <> 1 DO
1782+ SELECT REPLACE(REPLACE(q, '[LIMIT_1]', limit1), '[LIMIT_2]', limit2) INTO @query;
1783+ FETCH lcur2 INTO limit2;
1784+ END WHILE;
1785+ CLOSE lcur2;
1786+ SET done = 0;
1787+ ELSE
1788+ SELECT REPLACE(q, '[LIMIT_1]', limit1) INTO @query;
1789+ END IF;
1790+ INSERT INTO result_queries set query=@query;
1791+ FETCH lcur1 INTO limit1;
1792+ END WHILE;
1793+ CLOSE lcur1;
1794+ SET done = 0;
1795+ FETCH qcur INTO q;
1796+ END WHILE;
1797+ CLOSE qcur;
1798+END|
1799+
1800+DELIMITER ;|
1801+
1802+call gen_queries();
1803+
1804+#
1805+# Execute the generated queries
1806+#
1807+let $count= `SELECT COUNT(*) FROM result_queries`;
1808+let $id=1;
1809+SET MAX_SORT_LENGTH=50;
1810+while (`SELECT $id <= $count`)
1811+{
1812+ disable_query_log;
1813+ TRUNCATE t;
1814+ TRUNCATE t1;
1815+ TRUNCATE t2;
1816+ TRUNCATE t3;
1817+ TRUNCATE t4;
1818+
1819+ # INSERT INTO t VALUES (1, 1, 1, 1, 1, 1), (2, 2, 2, 2, 2, 2);
1820+ # INSERT INTO t1 VALUES (3, 3, 3, 3, 3, 3), (4, 4, 4, 4, 4, 4);
1821+ # INSERT INTO t2 VALUES (5, 5, 5, 5, 5, 5), (6, 6, 6, 6, 6, 6);
1822+ # INSERT INTO t3 VALUES (7, 7, 7, 7, 7, 7), (8, 8, 8, 8, 8, 8);
1823+ # INSERT INTO t4 VALUES (9, 9, 9, 9, 9, 9), (10, 10, 10, 10, 10, 10);
1824+
1825+ INSERT INTO t VALUES (1, 1, 1, 1, 1, 1, "a", "a"), (2, 2, 2, 2, 2, 2, "b", "b");
1826+ INSERT INTO t1 VALUES (3, 3, 3, 3, 3, 3, "c", "c"), (4, 4, 4, 4, 4, 4, "d", "d");
1827+ INSERT INTO t2 VALUES (5, 5, 5, 5, 5, 5, "e", "e"), (6, 6, 6, 6, 6, 6, "f", "f");
1828+ INSERT INTO t3 VALUES (7, 7, 7, 7, 7, 7, "g", "g"), (8, 8, 8, 8, 8, 8, "h", "h");
1829+ INSERT INTO t4 VALUES (9, 9, 9, 9, 9, 9, "i", "i"), (10, 10, 10, 10, 10, 10, "j", "j");
1830+
1831+ let $query= `SELECT query FROM result_queries WHERE id=$id`;
1832+ enable_query_log;
1833+
1834+ eval $query;
1835+ let $rows= `SELECT COUNT(*) FROM t`;
1836+ echo ROWS in table t: $rows;
1837+ inc $id;
1838+}
1839+SET MAX_SORT_LENGTH=DEFAULT;
1840+
1841+#
1842+# Cleanup
1843+#
1844+DROP TABLE t, t1, t2, t3, t4;
1845+DROP TABLE queries, result_queries, limits;
1846+DROP PROCEDURE gen_queries;
1847
1848=== modified file 'Percona-Server/sql/sql_base.cc'
1849--- Percona-Server/sql/sql_base.cc 2013-05-23 08:39:28 +0000
1850+++ Percona-Server/sql/sql_base.cc 2013-06-26 17:10:34 +0000
1851@@ -9262,6 +9262,472 @@
1852 return 0;
1853 }
1854
1855+static bool is_cond_equal(const COND *cond)
1856+{
1857+ return (cond->type() == Item::FUNC_ITEM &&
1858+ (((Item_func*)cond)->functype() == Item_func::EQ_FUNC ||
1859+ ((Item_func*)cond)->functype() == Item_func::EQUAL_FUNC));
1860+}
1861+
1862+static bool is_cond_mult_equal(const COND *cond)
1863+{
1864+ return (cond->type() == Item::FUNC_ITEM &&
1865+ (((Item_func*)cond)->functype() == Item_func::MULT_EQUAL_FUNC));
1866+}
1867+
1868+/*
1869+ And-or graph truth propagation algorithm is used to calculate if the
1870+ statement is ordered or not.
1871+
1872+ Nodes:
1873+ Join_node - And node, this is the root, successors are a list of
1874+ Const_ordered_table_node.
1875+ Const_ordered_table_node - Or node, have two Table_node as successors,
1876+ one for ordered table, and the other for constant table.
1877+ Table_node - Or node, have a list of Key_node and one All_columns_node
1878+ as successors.
1879+ Key_node - And node, successors are a list of Column_node that corresponding
1880+ to the fields of the key.
1881+ All_columns_node - And node, successors are a list of Column_node of all
1882+ fields of the table.
1883+ Column_node - Or node, represent a field of the table, it will take a
1884+ Table_node as a successor, which means if a table is true
1885+ (const or ordered), the all its columns are const or ordered.
1886+ Successors to other column nodes will be added mutually if
1887+ there is an equation to that field in the condition. The
1888+ column nodes for fields that are in the ORDER BY or are
1889+ equal to constants are added to the init_nodes of the Join_node,
1890+ which is used as the initial true values of the propagation.
1891+ */
1892+
1893+/*
1894+ Abstract base class for and-or node.
1895+*/
1896+class Node :public Sql_alloc {
1897+public:
1898+ Node() :todo(0) {}
1899+ virtual ~Node() {}
1900+ virtual void add_successor(Node* node)=0;
1901+ /* Number of successors need to be true to make this node true. */
1902+ uint todo;
1903+ /* List of nodes that this node is a successor */
1904+ List<Node> predecessors;
1905+};
1906+
1907+/*
1908+ Or node will be true if any of its successors is true.
1909+ */
1910+class Or_node :public Node {
1911+public:
1912+ Or_node() :Node() {}
1913+ virtual void add_successor(Node* node)
1914+ {
1915+ todo= 1;
1916+ node->predecessors.push_back(this);
1917+ }
1918+};
1919+
1920+/*
1921+ And node can only be true if all its successors are true.
1922+ */
1923+class And_node :public Node {
1924+public:
1925+ And_node() :Node() {}
1926+ virtual void add_successor(Node* node)
1927+ {
1928+ todo++;
1929+ node->predecessors.push_back(this);
1930+ }
1931+};
1932+
1933+typedef Or_node Column_node;
1934+typedef And_node Key_node;
1935+typedef And_node All_columns_node;
1936+
1937+class Table_node :public Or_node {
1938+public:
1939+ Table_node(const TABLE* table_arg);
1940+ ~Table_node();
1941+ Column_node* get_column_node(const Field* field) const;
1942+ Column_node* create_column_node(const Field* field);
1943+ All_columns_node* create_all_columns_node();
1944+ Key_node* create_key_node(const KEY* key_info);
1945+private:
1946+ const TABLE* table;
1947+ Column_node** columns;
1948+};
1949+
1950+Table_node::Table_node(const TABLE* table_arg)
1951+ :table(table_arg), columns(new Column_node*[table->s->fields])
1952+{
1953+ memset(columns, 0, sizeof(Column_node*) * table->s->fields);
1954+
1955+ if (table->s->primary_key == MAX_KEY && !table->s->uniques)
1956+ {
1957+ add_successor(create_all_columns_node());
1958+ return;
1959+ }
1960+ uint key;
1961+ for (key=0; key < table->s->keys; key++)
1962+ {
1963+ if ((table->s->key_info[key].flags &
1964+ (HA_NOSAME | HA_NULL_PART_KEY)) == HA_NOSAME)
1965+ add_successor(create_key_node(&table->s->key_info[key]));
1966+ }
1967+}
1968+
1969+Table_node::~Table_node()
1970+{
1971+ delete [] columns;
1972+}
1973+
1974+inline Column_node* Table_node::get_column_node(const Field* field) const
1975+{
1976+ return columns[field->field_index];
1977+}
1978+
1979+inline Column_node* Table_node::create_column_node(const Field* field)
1980+{
1981+ if (!get_column_node(field))
1982+ {
1983+ Column_node* column= new Column_node;
1984+ columns[field->field_index]= column;
1985+ /*
1986+ If the table is ORDERED or CONST, then all the columns are
1987+ ORDERED or CONST, so add the table as an successor of the column
1988+ node (Or_node).
1989+ */
1990+ column->add_successor(this);
1991+ }
1992+ return get_column_node(field);
1993+}
1994+
1995+All_columns_node* Table_node::create_all_columns_node()
1996+{
1997+ All_columns_node* node= new All_columns_node;
1998+ uint i= 0;
1999+ for (i=0; i<table->s->fields; i++)
2000+ {
2001+ Column_node* column= create_column_node(table->field[i]);
2002+ node->add_successor(column);
2003+ }
2004+ return node;
2005+}
2006+
2007+Key_node* Table_node::create_key_node(const KEY *key_info)
2008+{
2009+ Key_node* node= new Key_node;
2010+ uint key_parts= key_info->key_parts;
2011+ uint i;
2012+ for (i=0; i<key_parts; i++)
2013+ {
2014+ KEY_PART_INFO *key_part= &key_info->key_part[i];
2015+ Field *field= table->field[key_part->fieldnr - 1];
2016+ node->add_successor(create_column_node(field));
2017+ }
2018+ return node;
2019+}
2020+
2021+class Const_ordered_table_node :public Or_node {
2022+public:
2023+ Const_ordered_table_node(const TABLE* table_arg);
2024+ const TABLE* get_table() const { return table; }
2025+ Column_node* get_ordered_column_node(const Field* field) const;
2026+ Column_node* get_const_column_node(const Field* field) const;
2027+
2028+private:
2029+ const TABLE* table;
2030+ Table_node* ordered_table_node;
2031+ Table_node* const_table_node;
2032+};
2033+
2034+Const_ordered_table_node::Const_ordered_table_node(const TABLE* table_arg)
2035+ :table(table_arg),
2036+ ordered_table_node(new Table_node(table)),
2037+ const_table_node(new Table_node(table))
2038+{
2039+ add_successor(ordered_table_node);
2040+ add_successor(const_table_node);
2041+}
2042+
2043+inline Column_node*
2044+Const_ordered_table_node::get_ordered_column_node(const Field* field) const
2045+{
2046+ return ordered_table_node->create_column_node(field);
2047+}
2048+
2049+inline Column_node*
2050+Const_ordered_table_node::get_const_column_node(const Field* field) const
2051+{
2052+ return const_table_node->create_column_node(field);
2053+}
2054+
2055+class Join_node :public And_node {
2056+public:
2057+ Join_node(List<TABLE_LIST>* join_list, COND* cond, const ORDER* order);
2058+ Join_node(const TABLE_LIST* table, COND* cond, const ORDER* order);
2059+ bool is_ordered() const;
2060+private:
2061+ void add_join_list(List<TABLE_LIST>* join_list);
2062+ Const_ordered_table_node* add_table(const TABLE* table);
2063+ Const_ordered_table_node* get_const_ordered_table_node(const TABLE* table);
2064+ Column_node* get_ordered_column_node(const Field* field);
2065+ Column_node* get_const_column_node(const Field* field);
2066+ void add_ordered_columns(const ORDER* order);
2067+ void add_const_equi_columns(COND* cond);
2068+ void add_const_column(const Field* field);
2069+ void add_equi_column(const Field* left, const Field* right);
2070+ bool field_belongs_to_tables(const Field* field);
2071+ List<Const_ordered_table_node> tables;
2072+ List<Node> init_nodes;
2073+ ulong max_sort_length;
2074+};
2075+
2076+inline void Join_node::add_join_list(List<TABLE_LIST>* join_list)
2077+{
2078+ List_iterator<TABLE_LIST> it(*join_list);
2079+ TABLE_LIST *table= join_list->head();
2080+ COND* on_expr= table->on_expr;
2081+ while((table= it++))
2082+ if (table->nested_join)
2083+ add_join_list(&table->nested_join->join_list);
2084+ else
2085+ add_table(table->table);
2086+ add_const_equi_columns(on_expr);
2087+}
2088+
2089+inline Const_ordered_table_node* Join_node::add_table(const TABLE* table)
2090+{
2091+ Const_ordered_table_node* tableNode= new Const_ordered_table_node(table);
2092+ add_successor(tableNode);
2093+ tables.push_back(tableNode);
2094+ return tableNode;
2095+}
2096+
2097+inline Join_node::Join_node(List<TABLE_LIST>* join_list,
2098+ COND* cond, const ORDER* order)
2099+{
2100+ DBUG_ASSERT(!join_list->is_empty());
2101+ max_sort_length= current_thd->variables.max_sort_length;
2102+ add_join_list(join_list);
2103+ add_ordered_columns(order);
2104+ add_const_equi_columns(cond);
2105+}
2106+
2107+inline Join_node::Join_node(const TABLE_LIST* table,
2108+ COND* cond, const ORDER* order)
2109+{
2110+ max_sort_length= current_thd->variables.max_sort_length;
2111+ add_table(table->table);
2112+ add_ordered_columns(order);
2113+ add_const_equi_columns(cond);
2114+}
2115+
2116+inline Const_ordered_table_node* Join_node::get_const_ordered_table_node(const TABLE* table)
2117+{
2118+ List_iterator<Const_ordered_table_node> it(tables);
2119+ Const_ordered_table_node* node;
2120+ while ((node= it++))
2121+ {
2122+ if (node->get_table() == table)
2123+ return node;
2124+ }
2125+ DBUG_ASSERT(0);
2126+ return add_table(table);
2127+}
2128+
2129+inline bool Join_node::field_belongs_to_tables(const Field* field)
2130+{
2131+ List_iterator<Const_ordered_table_node> it(tables);
2132+ Const_ordered_table_node* node;
2133+ while ((node= it++))
2134+ {
2135+ if (node->get_table() == field->table)
2136+ return true;
2137+ }
2138+ return false;
2139+}
2140+
2141+inline Column_node* Join_node::get_ordered_column_node(const Field* field)
2142+{
2143+ return get_const_ordered_table_node(field->table)->get_ordered_column_node(field);
2144+}
2145+
2146+inline Column_node* Join_node::get_const_column_node(const Field* field)
2147+{
2148+ return get_const_ordered_table_node(field->table)->get_const_column_node(field);
2149+}
2150+
2151+inline void Join_node::add_const_column(const Field* field)
2152+{
2153+ Column_node* column= get_const_column_node(field);
2154+ init_nodes.push_back(column);
2155+}
2156+
2157+void Join_node::add_equi_column(const Field* left, const Field* right)
2158+{
2159+ Column_node* left_column= get_const_column_node(left);
2160+ Column_node* right_column= get_const_column_node(right);
2161+ left_column->add_successor(right_column);
2162+ right_column->add_successor(left_column);
2163+
2164+ left_column= get_ordered_column_node(left);
2165+ right_column= get_ordered_column_node(right);
2166+ left_column->add_successor(right_column);
2167+ right_column->add_successor(left_column);
2168+}
2169+
2170+void Join_node::add_const_equi_columns(COND* cond)
2171+{
2172+ if (!cond)
2173+ return;
2174+ if (is_cond_or(cond))
2175+ return;
2176+ if (is_cond_and(cond))
2177+ {
2178+ List<Item> *args= ((Item_cond*) cond)->argument_list();
2179+ List_iterator<COND> it(*args);
2180+ COND *c;
2181+ while ((c= it++))
2182+ add_const_equi_columns(c);
2183+ return;
2184+ }
2185+ if (is_cond_equal(cond))
2186+ {
2187+ uint i;
2188+ Field *first_field= NULL;
2189+ Field *second_field= NULL;
2190+ Item **args= ((Item_func*)cond)->arguments();
2191+ uint arg_count= ((Item_func*)cond)->argument_count();
2192+ bool const_value= false;
2193+
2194+ DBUG_ASSERT(arg_count == 2);
2195+
2196+ bool variable_field= false;
2197+ for (i=0; i<arg_count; i++)
2198+ {
2199+ if (args[i]->real_item()->type() == Item::FIELD_ITEM &&
2200+ (variable_field= field_belongs_to_tables(((Item_field*)args[i]->real_item())->field)))
2201+ {
2202+ if (!first_field)
2203+ first_field= ((Item_field*)args[i]->real_item())->field;
2204+ else
2205+ second_field= ((Item_field*)args[i]->real_item())->field;
2206+ }
2207+ else if (args[i]->real_item()->basic_const_item() ||
2208+ !variable_field)
2209+ {
2210+ const_value = true;
2211+ }
2212+ }
2213+ if (first_field && const_value)
2214+ add_const_column(first_field);
2215+ else if (second_field)
2216+ add_equi_column(first_field, second_field);
2217+ return;
2218+ }
2219+ if (is_cond_mult_equal(cond))
2220+ {
2221+ bool has_const= ((Item_equal*)cond)->get_const();
2222+ Item_equal_iterator it(*((Item_equal*)cond));
2223+ Item_field *item;
2224+ if (has_const)
2225+ {
2226+ while ((item= it++))
2227+ add_const_column(item->field);
2228+ }
2229+ else
2230+ {
2231+ Item_field *first_item= it++;
2232+ while ((item= it++))
2233+ add_equi_column(first_item->field, item->field);
2234+ }
2235+ }
2236+ return;
2237+}
2238+
2239+void Join_node::add_ordered_columns(const ORDER* order)
2240+{
2241+ for (; order; order=order->next)
2242+ {
2243+ if ((*order->item)->real_item()->type() == Item::FIELD_ITEM)
2244+ {
2245+ Field *field=((Item_field*) (*order->item)->real_item())->field;
2246+ /*
2247+ If the field length is larger than the max_sort_length, then
2248+ ORDER BY the field will not be guaranteed to be deterministic.
2249+ */
2250+ if (field->field_length > max_sort_length)
2251+ continue;
2252+ Column_node* column= get_ordered_column_node(field);
2253+ init_nodes.push_back(column);
2254+ }
2255+ }
2256+}
2257+
2258+bool Join_node::is_ordered() const
2259+{
2260+ List<Node> nodes(init_nodes);
2261+ List_iterator<Node> it(nodes);
2262+ Node *node;
2263+
2264+ while ((node= it++))
2265+ {
2266+ node->todo--;
2267+ if (node->todo == 0)
2268+ {
2269+ if (node == this)
2270+ return true;
2271+ List_iterator<Node> pit(node->predecessors);
2272+ Node *pnode;
2273+ while ((pnode= pit++))
2274+ {
2275+ if (pnode->todo)
2276+ nodes.push_back(pnode);
2277+ }
2278+ }
2279+ }
2280+ return false;
2281+}
2282+
2283+/*
2284+ Test if the result order is deterministic for a JOIN table list.
2285+
2286+ @retval false not deterministic
2287+ @retval true deterministic
2288+ */
2289+bool is_order_deterministic(List<TABLE_LIST>* join_list,
2290+ COND* cond, ORDER* order)
2291+{
2292+ /*
2293+ join_list->is_empty() means this is a UNION with a global LIMIT,
2294+ always mark such statements as non-deterministic, although it
2295+ might be deterministic for some cases (for example, UNION DISTINCT
2296+ with ORDER BY a unique key of both side of the UNION).
2297+ */
2298+ if (join_list->is_empty())
2299+ return false;
2300+
2301+ Join_node root(join_list, cond, order);
2302+ return root.is_ordered();
2303+}
2304+
2305+/*
2306+ Test if the result order is deterministic for a single table.
2307+
2308+ @retval false not deterministic
2309+ @retval true deterministic
2310+ */
2311+bool is_order_deterministic(TABLE_LIST *table,
2312+ COND *cond, ORDER *order)
2313+{
2314+ if (order == NULL && cond == NULL)
2315+ return false;
2316+
2317+ Join_node root(table, cond, order);
2318+ return root.is_ordered();
2319+}
2320+
2321 /*
2322 checks if we have select tables in the table list and write tables
2323 with auto-increment column.
2324
2325=== modified file 'Percona-Server/sql/sql_base.h'
2326--- Percona-Server/sql/sql_base.h 2013-03-20 05:31:58 +0000
2327+++ Percona-Server/sql/sql_base.h 2013-06-26 17:10:34 +0000
2328@@ -288,6 +288,10 @@
2329 bool rename_temporary_table(THD* thd, TABLE *table, const char *new_db,
2330 const char *table_name);
2331 bool is_equal(const LEX_STRING *a, const LEX_STRING *b);
2332+bool is_order_deterministic(List<TABLE_LIST>* join_list,
2333+ COND* cond, ORDER* order);
2334+bool is_order_deterministic(TABLE_LIST *table,
2335+ COND *cond, ORDER* order);
2336
2337 /* Functions to work with system tables. */
2338 bool open_system_tables_for_read(THD *thd, TABLE_LIST *table_list,
2339
2340=== modified file 'Percona-Server/sql/sql_class.cc'
2341--- Percona-Server/sql/sql_class.cc 2013-05-21 16:37:02 +0000
2342+++ Percona-Server/sql/sql_class.cc 2013-06-26 17:10:34 +0000
2343@@ -848,6 +848,7 @@
2344 /* statement id */ 0),
2345 rli_fake(0), rli_slave(NULL),
2346 user_time(0), in_sub_stmt(0),
2347+ order_deterministic(false),
2348 binlog_unsafe_warning_flags(0),
2349 binlog_table_maps(0),
2350 table_map_for_update(0),
2351@@ -5262,6 +5263,32 @@
2352 sizeof(binlog_unsafe_warning_flags) * CHAR_BIT);
2353
2354 uint32 unsafe_type_flags= binlog_unsafe_warning_flags;
2355+
2356+ if ((unsafe_type_flags & (1U << LEX::BINLOG_STMT_UNSAFE_LIMIT)) != 0)
2357+ {
2358+ if ((lex->sql_command == SQLCOM_DELETE || lex->sql_command == SQLCOM_UPDATE) &&
2359+ lex->select_lex.select_limit)
2360+ {
2361+ ORDER *order= (ORDER *) ((lex->select_lex.order_list.elements) ?
2362+ lex->select_lex.order_list.first : NULL);
2363+ if ((lex->select_lex.select_limit &&
2364+ lex->select_lex.select_limit->fixed &&
2365+ lex->select_lex.select_limit->val_int() == 0) ||
2366+ is_order_deterministic(lex->query_tables,
2367+ lex->select_lex.where, order))
2368+ {
2369+ unsafe_type_flags&= ~(1U << LEX::BINLOG_STMT_UNSAFE_LIMIT);
2370+ }
2371+ }
2372+ if ((lex->sql_command == SQLCOM_INSERT_SELECT ||
2373+ lex->sql_command == SQLCOM_REPLACE_SELECT) &&
2374+ order_deterministic)
2375+ {
2376+ unsafe_type_flags&= ~(1U << LEX::BINLOG_STMT_UNSAFE_LIMIT);
2377+ }
2378+
2379+ }
2380+
2381 /*
2382 For each unsafe_type, check if the statement is unsafe in this way
2383 and issue a warning.
2384@@ -5360,8 +5387,10 @@
2385 */
2386 if ((variables.option_bits & OPTION_BIN_LOG) &&
2387 spcont == NULL && !binlog_evt_union.do_union)
2388+ {
2389 issue_unsafe_warnings();
2390-
2391+ order_deterministic= true;
2392+ }
2393
2394 switch (qtype) {
2395 /*
2396
2397=== modified file 'Percona-Server/sql/sql_class.h'
2398--- Percona-Server/sql/sql_class.h 2013-05-21 16:37:02 +0000
2399+++ Percona-Server/sql/sql_class.h 2013-06-26 17:10:34 +0000
2400@@ -1732,6 +1732,8 @@
2401 /* container for handler's private per-connection data */
2402 Ha_data ha_data[MAX_HA];
2403
2404+ bool order_deterministic;
2405+
2406 #ifndef MYSQL_CLIENT
2407 int binlog_setup_trx_data();
2408
2409
2410=== modified file 'Percona-Server/sql/sql_lex.h'
2411--- Percona-Server/sql/sql_lex.h 2013-05-23 08:39:28 +0000
2412+++ Percona-Server/sql/sql_lex.h 2013-06-26 17:10:34 +0000
2413@@ -1365,6 +1365,17 @@
2414 static const int binlog_stmt_unsafe_errcode[BINLOG_STMT_UNSAFE_COUNT];
2415
2416 /**
2417+ Determine if this statement is marked as unsafe with
2418+ specific type
2419+
2420+ @retval false if the statement is not marked as unsafe.
2421+ @retval true if it is.
2422+ */
2423+ inline bool is_stmt_unsafe(enum_binlog_stmt_unsafe unsafe_type) const {
2424+ return ((binlog_stmt_flags & (1U << unsafe_type)) != 0);
2425+ }
2426+
2427+ /**
2428 Determine if this statement is marked as unsafe.
2429
2430 @retval 0 if the statement is not marked as unsafe.
2431
2432=== modified file 'Percona-Server/sql/sql_select.cc'
2433--- Percona-Server/sql/sql_select.cc 2013-05-21 16:37:02 +0000
2434+++ Percona-Server/sql/sql_select.cc 2013-06-26 17:10:34 +0000
2435@@ -977,6 +977,25 @@
2436 }
2437 }
2438
2439+ if (thd->lex->sql_command == SQLCOM_INSERT_SELECT ||
2440+ thd->lex->sql_command == SQLCOM_REPLACE_SELECT)
2441+ {
2442+ /*
2443+ Statement-based replication of INSERT ... SELECT ... LIMIT and
2444+ REPLACE ... SELECT is safe as order of row is defined with either
2445+ ORDER BY or other condition. However it is too late for it have
2446+ an impact to our decision to switch to row- based. We can only
2447+ suppress warning here.
2448+ */
2449+ if (select_lex->select_limit &&
2450+ select_lex->select_limit->fixed &&
2451+ select_lex->select_limit->val_int() &&
2452+ !is_order_deterministic(join_list, conds, order))
2453+ {
2454+ thd->order_deterministic= false;
2455+ }
2456+ }
2457+
2458 #ifdef WITH_PARTITION_STORAGE_ENGINE
2459 {
2460 TABLE_LIST *tbl;
2461
2462=== modified file 'Percona-Server/sql/sql_yacc.yy'
2463--- Percona-Server/sql/sql_yacc.yy 2013-05-15 05:05:18 +0000
2464+++ Percona-Server/sql/sql_yacc.yy 2013-06-26 17:10:34 +0000
2465@@ -9962,7 +9962,11 @@
2466 limit_clause:
2467 LIMIT limit_options
2468 {
2469- Lex->set_stmt_unsafe(LEX::BINLOG_STMT_UNSAFE_LIMIT);
2470+ if (Select->select_limit->fixed &&
2471+ Select->select_limit->val_int() != 0)
2472+ {
2473+ Lex->set_stmt_unsafe(LEX::BINLOG_STMT_UNSAFE_LIMIT);
2474+ }
2475 }
2476 ;
2477
2478@@ -10059,7 +10063,11 @@
2479 {
2480 SELECT_LEX *sel= Select;
2481 sel->select_limit= $2;
2482- Lex->set_stmt_unsafe(LEX::BINLOG_STMT_UNSAFE_LIMIT);
2483+ if (Select->select_limit->fixed &&
2484+ Select->select_limit->val_int() != 0)
2485+ {
2486+ Lex->set_stmt_unsafe(LEX::BINLOG_STMT_UNSAFE_LIMIT);
2487+ }
2488 sel->explicit_limit= 1;
2489 }
2490 ;

Subscribers

People subscribed via source and target branches