diff options
author | Jon Olav Hauglid <jon.hauglid@oracle.com> | 2010-09-01 14:45:13 +0200 |
---|---|---|
committer | Jon Olav Hauglid <jon.hauglid@oracle.com> | 2010-09-01 14:45:13 +0200 |
commit | 781e2c417dbc0fd6ce815779253b0db871057ef3 (patch) | |
tree | 96a7daee107f00fa617c76c5f78586940f966a04 /mysql-test | |
parent | cc0925f5d95c9b77336b3f9cd307d7bc2236247e (diff) | |
parent | 99c7536c5c8d9d472c778065973a21d4b23b9f36 (diff) | |
download | mariadb-git-781e2c417dbc0fd6ce815779253b0db871057ef3.tar.gz |
Merge from mysql-5.5-bugfixing to mysql-5.5-runtime.
Diffstat (limited to 'mysql-test')
54 files changed, 667 insertions, 156 deletions
diff --git a/mysql-test/collections/default.experimental b/mysql-test/collections/default.experimental index 7609a4799e3..a8047ae9ed9 100644 --- a/mysql-test/collections/default.experimental +++ b/mysql-test/collections/default.experimental @@ -92,5 +92,3 @@ parts.partition_mgm_lc1_ndb # joro : NDB tests marked as experiment parts.partition_mgm_lc2_ndb # joro : NDB tests marked as experimental as agreed with bochklin parts.partition_syntax_ndb # joro : NDB tests marked as experimental as agreed with bochklin parts.partition_value_ndb # joro : NDB tests marked as experimental as agreed with bochklin -main.mysqlhotcopy_myisam # horst: due to bug#54129 -main.mysqlhotcopy_archive # horst: due to bug#54129 diff --git a/mysql-test/extra/binlog_tests/binlog_insert_delayed.test b/mysql-test/extra/binlog_tests/binlog_insert_delayed.test index c99d0b86be3..2526b2dd149 100644 --- a/mysql-test/extra/binlog_tests/binlog_insert_delayed.test +++ b/mysql-test/extra/binlog_tests/binlog_insert_delayed.test @@ -52,13 +52,19 @@ inc $count; FLUSH TABLES; source include/show_binlog_events.inc; -insert delayed into t1 values (null),(null),(null),(null); +RESET MASTER; +insert /* before delayed */ delayed /* after delayed */ into t1 values (null),(null),(null),(null); inc $count; inc $count; inc $count; inc $count; --source include/wait_until_rows_count.inc -insert delayed into t1 values (null),(null),(400),(null); +insert /*! delayed */ into t1 values (null),(null),(400),(null); inc $count; inc $count; inc $count; inc $count; --source include/wait_until_rows_count.inc +if (`SELECT @@SESSION.BINLOG_FORMAT = 'STATEMENT'`) { + FLUSH TABLES; + source include/show_binlog_events.inc; +} + select * from t1; drop table t1; diff --git a/mysql-test/extra/rpl_tests/create_recursive_construct.inc b/mysql-test/extra/rpl_tests/create_recursive_construct.inc index 3a9c628cbb0..ac10ab8ddb2 100644 --- a/mysql-test/extra/rpl_tests/create_recursive_construct.inc +++ b/mysql-test/extra/rpl_tests/create_recursive_construct.inc @@ -338,10 +338,21 @@ if (`SELECT '$CRC_RET_stmt_sidef' != ''`) { SHOW BINLOG EVENTS; --die Warnings printed } - # The first event is format_description, the second is - # Query_event('BEGIN'), and the third should be our Table_map. --let $event_type= query_get_value(SHOW BINLOG EVENTS, Event_type, 3) - if (`SELECT '$event_type' != 'Table_map'`) { + # The first event is format_description, the second is + # Query_event('BEGIN'), and the third should be our Query + # for 'INSERT DELAYED' unsafe_type 3, which is safe after + # the fix of bug#54579. + if (`SELECT $unsafe_type = 3 AND '$event_type' != 'Query'`) { + --enable_query_log + --echo ******** Failure! Event number 3 was a '$event_type', not a 'Query'. ******** + SHOW BINLOG EVENTS; + --die Wrong events in binlog. + } + # The first event is format_description, the second is + # Query_event('BEGIN'), and the third should be our Table_map + # for unsafe statement. + if (`SELECT $unsafe_type != 3 AND '$event_type' != 'Table_map'`) { --enable_query_log --echo ******** Failure! Event number 3 was a '$event_type', not a 'Table_map'. ******** SHOW BINLOG EVENTS; diff --git a/mysql-test/include/ctype_filesort2.inc b/mysql-test/include/ctype_filesort2.inc new file mode 100644 index 00000000000..7b09eb482a5 --- /dev/null +++ b/mysql-test/include/ctype_filesort2.inc @@ -0,0 +1,16 @@ +# +# Testing filesort for full Unicode character sets +# with supplementary characters. +# + +--echo # +--echo # Bug#55980 Character sets: supplementary character _bin ordering is wrong +--echo # +CREATE TABLE t1 AS SELECT REPEAT('a',1) AS a LIMIT 0; +SHOW CREATE TABLE t1; +INSERT INTO t1 VALUES (_utf8mb4 0xEFBE9D),(_utf8mb4 0xF0908E84); +INSERT INTO t1 VALUES (_utf8mb4 0xCE85),(_utf8mb4 0xF4808080); +SELECT HEX(a), HEX(CONVERT(a USING utf8mb4)) FROM t1 ORDER BY a; +ALTER TABLE t1 ADD KEY(a); +SELECT HEX(a), HEX(CONVERT(a USING utf8mb4)) FROM t1 ORDER BY a; +DROP TABLE IF EXISTS t1; diff --git a/mysql-test/r/create.result b/mysql-test/r/create.result index a84ce6aaddf..d5f3945fb6b 100644 --- a/mysql-test/r/create.result +++ b/mysql-test/r/create.result @@ -1542,6 +1542,7 @@ show status like 'handler_read%'; Variable_name Value Handler_read_first 0 Handler_read_key 0 +Handler_read_last 0 Handler_read_next 0 Handler_read_prev 0 Handler_read_rnd 0 diff --git a/mysql-test/r/ctype_utf16.result b/mysql-test/r/ctype_utf16.result index c5fd7ef1439..7cee15aecef 100644 --- a/mysql-test/r/ctype_utf16.result +++ b/mysql-test/r/ctype_utf16.result @@ -611,6 +611,31 @@ utf16_bin 00610009 utf16_bin 0061 utf16_bin 00610020 drop table t1; +# +# Bug#55980 Character sets: supplementary character _bin ordering is wrong +# +CREATE TABLE t1 AS SELECT REPEAT('a',1) AS a LIMIT 0; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` varchar(1) CHARACTER SET utf16 COLLATE utf16_bin NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES (_utf8mb4 0xEFBE9D),(_utf8mb4 0xF0908E84); +INSERT INTO t1 VALUES (_utf8mb4 0xCE85),(_utf8mb4 0xF4808080); +SELECT HEX(a), HEX(CONVERT(a USING utf8mb4)) FROM t1 ORDER BY a; +HEX(a) HEX(CONVERT(a USING utf8mb4)) +0385 CE85 +D800DF84 F0908E84 +DBC0DC00 F4808080 +FF9D EFBE9D +ALTER TABLE t1 ADD KEY(a); +SELECT HEX(a), HEX(CONVERT(a USING utf8mb4)) FROM t1 ORDER BY a; +HEX(a) HEX(CONVERT(a USING utf8mb4)) +0385 CE85 +D800DF84 F0908E84 +DBC0DC00 F4808080 +FF9D EFBE9D +DROP TABLE IF EXISTS t1; select @@collation_connection; @@collation_connection utf16_bin diff --git a/mysql-test/r/ctype_utf32.result b/mysql-test/r/ctype_utf32.result index 79e714eab47..37d5aa98be3 100644 --- a/mysql-test/r/ctype_utf32.result +++ b/mysql-test/r/ctype_utf32.result @@ -610,6 +610,31 @@ utf32_bin 0000006100000009 utf32_bin 00000061 utf32_bin 0000006100000020 drop table t1; +# +# Bug#55980 Character sets: supplementary character _bin ordering is wrong +# +CREATE TABLE t1 AS SELECT REPEAT('a',1) AS a LIMIT 0; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` varchar(1) CHARACTER SET utf32 COLLATE utf32_bin NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES (_utf8mb4 0xEFBE9D),(_utf8mb4 0xF0908E84); +INSERT INTO t1 VALUES (_utf8mb4 0xCE85),(_utf8mb4 0xF4808080); +SELECT HEX(a), HEX(CONVERT(a USING utf8mb4)) FROM t1 ORDER BY a; +HEX(a) HEX(CONVERT(a USING utf8mb4)) +00000385 CE85 +0000FF9D EFBE9D +00010384 F0908E84 +00100000 F4808080 +ALTER TABLE t1 ADD KEY(a); +SELECT HEX(a), HEX(CONVERT(a USING utf8mb4)) FROM t1 ORDER BY a; +HEX(a) HEX(CONVERT(a USING utf8mb4)) +00000385 CE85 +0000FF9D EFBE9D +00010384 F0908E84 +00100000 F4808080 +DROP TABLE IF EXISTS t1; select @@collation_connection; @@collation_connection utf32_bin @@ -1114,5 +1139,18 @@ format(123,2,'no_NO') 123,00 DROP TABLE t1; # +# Bug#42511 mysqld: ctype-ucs2.c:2044: my_strnncollsp_utf32: Assertion (tlen % 4) == 0' faied +# +CREATE TABLE t1 ( +b char(250) CHARACTER SET utf32, +key (b) +) ENGINE=MYISAM; +INSERT INTO t1 VALUES ('d'),('f'); +SELECT * FROM t1 WHERE b BETWEEN 'a' AND 'z'; +b +d +f +DROP TABLE t1; +# # End of 5.5 tests # diff --git a/mysql-test/r/ctype_utf8mb4.result b/mysql-test/r/ctype_utf8mb4.result index 454c9d4bfbb..3b9abbc5412 100644 --- a/mysql-test/r/ctype_utf8mb4.result +++ b/mysql-test/r/ctype_utf8mb4.result @@ -987,6 +987,31 @@ utf8mb4_bin 6109 utf8mb4_bin 61 utf8mb4_bin 6120 drop table t1; +# +# Bug#55980 Character sets: supplementary character _bin ordering is wrong +# +CREATE TABLE t1 AS SELECT REPEAT('a',1) AS a LIMIT 0; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +INSERT INTO t1 VALUES (_utf8mb4 0xEFBE9D),(_utf8mb4 0xF0908E84); +INSERT INTO t1 VALUES (_utf8mb4 0xCE85),(_utf8mb4 0xF4808080); +SELECT HEX(a), HEX(CONVERT(a USING utf8mb4)) FROM t1 ORDER BY a; +HEX(a) HEX(CONVERT(a USING utf8mb4)) +CE85 CE85 +EFBE9D EFBE9D +F0908E84 F0908E84 +F4808080 F4808080 +ALTER TABLE t1 ADD KEY(a); +SELECT HEX(a), HEX(CONVERT(a USING utf8mb4)) FROM t1 ORDER BY a; +HEX(a) HEX(CONVERT(a USING utf8mb4)) +CE85 CE85 +EFBE9D EFBE9D +F0908E84 F0908E84 +F4808080 F4808080 +DROP TABLE IF EXISTS t1; select @@collation_connection; @@collation_connection utf8mb4_bin diff --git a/mysql-test/r/handler_read_last.result b/mysql-test/r/handler_read_last.result new file mode 100644 index 00000000000..a21e9ed9564 --- /dev/null +++ b/mysql-test/r/handler_read_last.result @@ -0,0 +1,60 @@ +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (a INT, INDEX (a)); +INSERT INTO t1 VALUES (),(),(),(),(),(),(),(),(),(); +FLUSH STATUS; +SELECT a FROM t1 ORDER BY a LIMIT 1; +a +NULL +SHOW STATUS LIKE 'HANDLER_READ%'; +Variable_name Value +Handler_read_first 1 +Handler_read_key 0 +Handler_read_last 0 +Handler_read_next 0 +Handler_read_prev 0 +Handler_read_rnd 0 +Handler_read_rnd_next 0 +FLUSH STATUS; +SELECT a FROM t1 ORDER BY a DESC LIMIT 1; +a +NULL +SHOW STATUS LIKE 'HANDLER_READ%'; +Variable_name Value +Handler_read_first 0 +Handler_read_key 0 +Handler_read_last 1 +Handler_read_next 0 +Handler_read_prev 0 +Handler_read_rnd 0 +Handler_read_rnd_next 0 +FLUSH STATUS; +SELECT a FROM t1 ORDER BY a LIMIT 3; +a +NULL +NULL +NULL +SHOW STATUS LIKE 'HANDLER_READ%'; +Variable_name Value +Handler_read_first 1 +Handler_read_key 0 +Handler_read_last 0 +Handler_read_next 2 +Handler_read_prev 0 +Handler_read_rnd 0 +Handler_read_rnd_next 0 +FLUSH STATUS; +SELECT a FROM t1 ORDER BY a DESC LIMIT 3; +a +NULL +NULL +NULL +SHOW STATUS LIKE 'HANDLER_READ%'; +Variable_name Value +Handler_read_first 0 +Handler_read_key 0 +Handler_read_last 1 +Handler_read_next 0 +Handler_read_prev 2 +Handler_read_rnd 0 +Handler_read_rnd_next 0 +DROP TABLE t1; diff --git a/mysql-test/r/insert_select.result b/mysql-test/r/insert_select.result index f12c9a0a61a..b0858894b71 100644 --- a/mysql-test/r/insert_select.result +++ b/mysql-test/r/insert_select.result @@ -694,6 +694,7 @@ show status like 'Handler_read%'; Variable_name Value Handler_read_first 1 Handler_read_key 0 +Handler_read_last 0 Handler_read_next 0 Handler_read_prev 0 Handler_read_rnd 0 diff --git a/mysql-test/r/join.result b/mysql-test/r/join.result index 9f87ea082db..260f7170fc5 100644 --- a/mysql-test/r/join.result +++ b/mysql-test/r/join.result @@ -854,6 +854,7 @@ show status like 'Handler_read%'; Variable_name Value Handler_read_first 0 Handler_read_key 0 +Handler_read_last 0 Handler_read_next 0 Handler_read_prev 0 Handler_read_rnd 0 diff --git a/mysql-test/r/join_outer.result b/mysql-test/r/join_outer.result index 847a00cad94..0af32d8f749 100644 --- a/mysql-test/r/join_outer.result +++ b/mysql-test/r/join_outer.result @@ -1238,6 +1238,7 @@ show status like 'Handler_read%'; Variable_name Value Handler_read_first 0 Handler_read_key 5 +Handler_read_last 0 Handler_read_next 0 Handler_read_prev 0 Handler_read_rnd 0 diff --git a/mysql-test/r/mysqld--help-notwin.result b/mysql-test/r/mysqld--help-notwin.result index 533f35c1113..51703531d8b 100644 --- a/mysql-test/r/mysqld--help-notwin.result +++ b/mysql-test/r/mysqld--help-notwin.result @@ -860,9 +860,9 @@ performance-schema-max-file-classes 50 performance-schema-max-file-handles 32768 performance-schema-max-file-instances 10000 performance-schema-max-mutex-classes 200 -performance-schema-max-mutex-instances 1000 -performance-schema-max-rwlock-classes 20 -performance-schema-max-rwlock-instances 1000 +performance-schema-max-mutex-instances 1000000 +performance-schema-max-rwlock-classes 30 +performance-schema-max-rwlock-instances 1000000 performance-schema-max-table-handles 100000 performance-schema-max-table-instances 50000 performance-schema-max-thread-classes 50 diff --git a/mysql-test/r/mysqld--help-win.result b/mysql-test/r/mysqld--help-win.result index 9b6b0f53b01..661be6e5678 100644 --- a/mysql-test/r/mysqld--help-win.result +++ b/mysql-test/r/mysqld--help-win.result @@ -864,9 +864,9 @@ performance-schema-max-file-classes 50 performance-schema-max-file-handles 32768 performance-schema-max-file-instances 10000 performance-schema-max-mutex-classes 200 -performance-schema-max-mutex-instances 1000 -performance-schema-max-rwlock-classes 20 -performance-schema-max-rwlock-instances 1000 +performance-schema-max-mutex-instances 1000000 +performance-schema-max-rwlock-classes 30 +performance-schema-max-rwlock-instances 1000000 performance-schema-max-table-handles 100000 performance-schema-max-table-instances 50000 performance-schema-max-thread-classes 50 diff --git a/mysql-test/r/null_key.result b/mysql-test/r/null_key.result index 58c587fe588..fd523168e7c 100644 --- a/mysql-test/r/null_key.result +++ b/mysql-test/r/null_key.result @@ -424,6 +424,7 @@ SHOW STATUS LIKE "handler_read%"; Variable_name Value Handler_read_first 0 Handler_read_key 6 +Handler_read_last 0 Handler_read_next 2 Handler_read_prev 0 Handler_read_rnd 0 diff --git a/mysql-test/r/partition.result b/mysql-test/r/partition.result index 55366bd2e07..dfcd9dde73d 100644 --- a/mysql-test/r/partition.result +++ b/mysql-test/r/partition.result @@ -359,6 +359,7 @@ SHOW STATUS LIKE 'Handler_read_%'; Variable_name Value Handler_read_first 0 Handler_read_key 2 +Handler_read_last 0 Handler_read_next 4 Handler_read_prev 0 Handler_read_rnd 0 @@ -377,6 +378,7 @@ SHOW STATUS LIKE 'Handler_read_%'; Variable_name Value Handler_read_first 0 Handler_read_key 2 +Handler_read_last 0 Handler_read_next 4 Handler_read_prev 0 Handler_read_rnd 0 @@ -407,6 +409,7 @@ SHOW STATUS LIKE 'Handler_read_%'; Variable_name Value Handler_read_first 0 Handler_read_key 1 +Handler_read_last 0 Handler_read_next 2 Handler_read_prev 0 Handler_read_rnd 0 @@ -423,6 +426,7 @@ SHOW STATUS LIKE 'Handler_read_%'; Variable_name Value Handler_read_first 0 Handler_read_key 1 +Handler_read_last 0 Handler_read_next 2 Handler_read_prev 0 Handler_read_rnd 0 @@ -439,6 +443,7 @@ SHOW STATUS LIKE 'Handler_read_%'; Variable_name Value Handler_read_first 0 Handler_read_key 1 +Handler_read_last 0 Handler_read_next 2 Handler_read_prev 0 Handler_read_rnd 0 @@ -455,6 +460,7 @@ SHOW STATUS LIKE 'Handler_read_%'; Variable_name Value Handler_read_first 0 Handler_read_key 1 +Handler_read_last 0 Handler_read_next 2 Handler_read_prev 0 Handler_read_rnd 0 diff --git a/mysql-test/r/select.result b/mysql-test/r/select.result index b193a269288..e8628d72a46 100644 --- a/mysql-test/r/select.result +++ b/mysql-test/r/select.result @@ -4338,6 +4338,7 @@ SHOW STATUS LIKE 'Handler_read%'; Variable_name Value Handler_read_first 0 Handler_read_key 2 +Handler_read_last 0 Handler_read_next 0 Handler_read_prev 0 Handler_read_rnd 0 diff --git a/mysql-test/r/single_delete_update.result b/mysql-test/r/single_delete_update.result index 921d308097c..72419c6ec9d 100644 --- a/mysql-test/r/single_delete_update.result +++ b/mysql-test/r/single_delete_update.result @@ -25,6 +25,7 @@ SHOW STATUS LIKE 'Handler_read_%'; Variable_name Value Handler_read_first 0 Handler_read_key 1 +Handler_read_last 0 Handler_read_next 4 Handler_read_prev 0 Handler_read_rnd 0 @@ -41,6 +42,7 @@ SHOW STATUS LIKE 'Handler_read_%'; Variable_name Value Handler_read_first 0 Handler_read_key 1 +Handler_read_last 0 Handler_read_next 4 Handler_read_prev 0 Handler_read_rnd 0 @@ -74,6 +76,7 @@ SHOW STATUS LIKE 'Handler_read_%'; Variable_name Value Handler_read_first 0 Handler_read_key 0 +Handler_read_last 0 Handler_read_next 0 Handler_read_prev 0 Handler_read_rnd 0 @@ -90,6 +93,7 @@ SHOW STATUS LIKE 'Handler_read_%'; Variable_name Value Handler_read_first 0 Handler_read_key 0 +Handler_read_last 0 Handler_read_next 0 Handler_read_prev 0 Handler_read_rnd 5 @@ -120,6 +124,7 @@ SHOW STATUS LIKE 'Handler_read_%'; Variable_name Value Handler_read_first 0 Handler_read_key 0 +Handler_read_last 0 Handler_read_next 0 Handler_read_prev 0 Handler_read_rnd 0 @@ -136,6 +141,7 @@ SHOW STATUS LIKE 'Handler_read_%'; Variable_name Value Handler_read_first 0 Handler_read_key 0 +Handler_read_last 0 Handler_read_next 0 Handler_read_prev 0 Handler_read_rnd 1 @@ -170,6 +176,7 @@ SHOW STATUS LIKE 'Handler_read_%'; Variable_name Value Handler_read_first 1 Handler_read_key 0 +Handler_read_last 0 Handler_read_next 4 Handler_read_prev 0 Handler_read_rnd 0 @@ -186,6 +193,7 @@ SHOW STATUS LIKE 'Handler_read_%'; Variable_name Value Handler_read_first 1 Handler_read_key 0 +Handler_read_last 0 Handler_read_next 4 Handler_read_prev 0 Handler_read_rnd 0 @@ -214,6 +222,7 @@ SHOW STATUS LIKE 'Handler_read_%'; Variable_name Value Handler_read_first 0 Handler_read_key 0 +Handler_read_last 0 Handler_read_next 0 Handler_read_prev 0 Handler_read_rnd 0 @@ -230,6 +239,7 @@ SHOW STATUS LIKE 'Handler_read_%'; Variable_name Value Handler_read_first 0 Handler_read_key 0 +Handler_read_last 0 Handler_read_next 0 Handler_read_prev 0 Handler_read_rnd 1 @@ -256,6 +266,7 @@ SHOW STATUS LIKE 'Handler_read_%'; Variable_name Value Handler_read_first 0 Handler_read_key 0 +Handler_read_last 0 Handler_read_next 0 Handler_read_prev 0 Handler_read_rnd 1 @@ -272,6 +283,7 @@ SHOW STATUS LIKE 'Handler_read_%'; Variable_name Value Handler_read_first 0 Handler_read_key 0 +Handler_read_last 0 Handler_read_next 0 Handler_read_prev 0 Handler_read_rnd 1 @@ -301,6 +313,7 @@ SHOW STATUS LIKE 'Handler_read_%'; Variable_name Value Handler_read_first 0 Handler_read_key 2 +Handler_read_last 0 Handler_read_next 7 Handler_read_prev 0 Handler_read_rnd 4 @@ -322,6 +335,7 @@ SHOW STATUS LIKE 'Handler_read_%'; Variable_name Value Handler_read_first 0 Handler_read_key 2 +Handler_read_last 0 Handler_read_next 7 Handler_read_prev 0 Handler_read_rnd 8 @@ -357,6 +371,7 @@ SHOW STATUS LIKE 'Handler_read_%'; Variable_name Value Handler_read_first 0 Handler_read_key 1 +Handler_read_last 0 Handler_read_next 0 Handler_read_prev 4 Handler_read_rnd 0 @@ -373,6 +388,7 @@ SHOW STATUS LIKE 'Handler_read_%'; Variable_name Value Handler_read_first 0 Handler_read_key 1 +Handler_read_last 0 Handler_read_next 0 Handler_read_prev 4 Handler_read_rnd 0 @@ -406,6 +422,7 @@ SHOW STATUS LIKE 'Handler_read_%'; Variable_name Value Handler_read_first 0 Handler_read_key 0 +Handler_read_last 0 Handler_read_next 0 Handler_read_prev 0 Handler_read_rnd 0 @@ -422,6 +439,7 @@ SHOW STATUS LIKE 'Handler_read_%'; Variable_name Value Handler_read_first 0 Handler_read_key 0 +Handler_read_last 0 Handler_read_next 0 Handler_read_prev 0 Handler_read_rnd 5 @@ -464,6 +482,7 @@ SHOW STATUS LIKE 'Handler_read_%'; Variable_name Value Handler_read_first 1 Handler_read_key 0 +Handler_read_last 0 Handler_read_next 4 Handler_read_prev 0 Handler_read_rnd 0 @@ -486,6 +505,7 @@ SHOW STATUS LIKE 'Handler_read_%'; Variable_name Value Handler_read_first 0 Handler_read_key 0 +Handler_read_last 1 Handler_read_next 0 Handler_read_prev 4 Handler_read_rnd 0 @@ -502,6 +522,7 @@ SHOW STATUS LIKE 'Handler_read_%'; Variable_name Value Handler_read_first 0 Handler_read_key 0 +Handler_read_last 1 Handler_read_next 0 Handler_read_prev 4 Handler_read_rnd 0 @@ -536,6 +557,7 @@ SHOW STATUS LIKE 'Handler_read_%'; Variable_name Value Handler_read_first 0 Handler_read_key 1 +Handler_read_last 0 Handler_read_next 4 Handler_read_prev 0 Handler_read_rnd 0 @@ -552,6 +574,7 @@ SHOW STATUS LIKE 'Handler_read_%'; Variable_name Value Handler_read_first 0 Handler_read_key 1 +Handler_read_last 0 Handler_read_next 4 Handler_read_prev 0 Handler_read_rnd 5 @@ -590,6 +613,7 @@ SHOW STATUS LIKE 'Handler_read_%'; Variable_name Value Handler_read_first 0 Handler_read_key 0 +Handler_read_last 0 Handler_read_next 0 Handler_read_prev 0 Handler_read_rnd 0 @@ -606,6 +630,7 @@ SHOW STATUS LIKE 'Handler_read_%'; Variable_name Value Handler_read_first 0 Handler_read_key 0 +Handler_read_last 0 Handler_read_next 0 Handler_read_prev 0 Handler_read_rnd 5 @@ -641,6 +666,7 @@ SHOW STATUS LIKE 'Handler_read_%'; Variable_name Value Handler_read_first 0 Handler_read_key 0 +Handler_read_last 0 Handler_read_next 0 Handler_read_prev 0 Handler_read_rnd 0 @@ -657,6 +683,7 @@ SHOW STATUS LIKE 'Handler_read_%'; Variable_name Value Handler_read_first 0 Handler_read_key 0 +Handler_read_last 0 Handler_read_next 0 Handler_read_prev 0 Handler_read_rnd 1 @@ -691,6 +718,7 @@ SHOW STATUS LIKE 'Handler_read_%'; Variable_name Value Handler_read_first 1 Handler_read_key 0 +Handler_read_last 0 Handler_read_next 4 Handler_read_prev 0 Handler_read_rnd 0 @@ -707,6 +735,7 @@ SHOW STATUS LIKE 'Handler_read_%'; Variable_name Value Handler_read_first 1 Handler_read_key 0 +Handler_read_last 0 Handler_read_next 4 Handler_read_prev 0 Handler_read_rnd 5 @@ -735,6 +764,7 @@ SHOW STATUS LIKE 'Handler_read_%'; Variable_name Value Handler_read_first 0 Handler_read_key 0 +Handler_read_last 0 Handler_read_next 0 Handler_read_prev 0 Handler_read_rnd 0 @@ -751,6 +781,7 @@ SHOW STATUS LIKE 'Handler_read_%'; Variable_name Value Handler_read_first 0 Handler_read_key 0 +Handler_read_last 0 Handler_read_next 0 Handler_read_prev 0 Handler_read_rnd 1 @@ -778,6 +809,7 @@ SHOW STATUS LIKE 'Handler_read_%'; Variable_name Value Handler_read_first 0 Handler_read_key 0 +Handler_read_last 0 Handler_read_next 0 Handler_read_prev 0 Handler_read_rnd 1 @@ -794,6 +826,7 @@ SHOW STATUS LIKE 'Handler_read_%'; Variable_name Value Handler_read_first 0 Handler_read_key 0 +Handler_read_last 0 Handler_read_next 0 Handler_read_prev 0 Handler_read_rnd 1 @@ -824,6 +857,7 @@ SHOW STATUS LIKE 'Handler_read_%'; Variable_name Value Handler_read_first 0 Handler_read_key 2 +Handler_read_last 0 Handler_read_next 7 Handler_read_prev 0 Handler_read_rnd 4 @@ -845,6 +879,7 @@ SHOW STATUS LIKE 'Handler_read_%'; Variable_name Value Handler_read_first 0 Handler_read_key 2 +Handler_read_last 0 Handler_read_next 7 Handler_read_prev 0 Handler_read_rnd 8 @@ -884,6 +919,7 @@ SHOW STATUS LIKE 'Handler_read_%'; Variable_name Value Handler_read_first 0 Handler_read_key 1 +Handler_read_last 0 Handler_read_next 0 Handler_read_prev 4 Handler_read_rnd 0 @@ -900,6 +936,7 @@ SHOW STATUS LIKE 'Handler_read_%'; Variable_name Value Handler_read_first 0 Handler_read_key 1 +Handler_read_last 0 Handler_read_next 0 Handler_read_prev 4 Handler_read_rnd 5 @@ -938,6 +975,7 @@ SHOW STATUS LIKE 'Handler_read_%'; Variable_name Value Handler_read_first 0 Handler_read_key 0 +Handler_read_last 0 Handler_read_next 0 Handler_read_prev 0 Handler_read_rnd 0 @@ -954,6 +992,7 @@ SHOW STATUS LIKE 'Handler_read_%'; Variable_name Value Handler_read_first 0 Handler_read_key 0 +Handler_read_last 0 Handler_read_next 0 Handler_read_prev 0 Handler_read_rnd 5 @@ -990,6 +1029,7 @@ SHOW STATUS LIKE 'Handler_read_%'; Variable_name Value Handler_read_first 1 Handler_read_key 0 +Handler_read_last 0 Handler_read_next 4 Handler_read_prev 0 Handler_read_rnd 0 @@ -1012,6 +1052,7 @@ SHOW STATUS LIKE 'Handler_read_%'; Variable_name Value Handler_read_first 0 Handler_read_key 0 +Handler_read_last 1 Handler_read_next 0 Handler_read_prev 4 Handler_read_rnd 0 @@ -1028,6 +1069,7 @@ SHOW STATUS LIKE 'Handler_read_%'; Variable_name Value Handler_read_first 0 Handler_read_key 0 +Handler_read_last 1 Handler_read_next 0 Handler_read_prev 4 Handler_read_rnd 5 diff --git a/mysql-test/r/subselect3.result b/mysql-test/r/subselect3.result index 586e2e7822b..2962a12d9a2 100644 --- a/mysql-test/r/subselect3.result +++ b/mysql-test/r/subselect3.result @@ -113,6 +113,7 @@ show status like '%Handler_read%'; Variable_name Value Handler_read_first 0 Handler_read_key 0 +Handler_read_last 0 Handler_read_next 0 Handler_read_prev 0 Handler_read_rnd 0 diff --git a/mysql-test/r/update.result b/mysql-test/r/update.result index 05ab1b71018..54170ae3dad 100644 --- a/mysql-test/r/update.result +++ b/mysql-test/r/update.result @@ -273,6 +273,7 @@ show status like 'handler_read%'; Variable_name Value Handler_read_first 1 Handler_read_key 0 +Handler_read_last 0 Handler_read_next 0 Handler_read_prev 0 Handler_read_rnd 0 @@ -284,6 +285,7 @@ show status like 'handler_read%'; Variable_name Value Handler_read_first 1 Handler_read_key 0 +Handler_read_last 0 Handler_read_next 0 Handler_read_prev 0 Handler_read_rnd 2 @@ -294,6 +296,7 @@ show status like 'handler_read%'; Variable_name Value Handler_read_first 1 Handler_read_key 0 +Handler_read_last 0 Handler_read_next 0 Handler_read_prev 0 Handler_read_rnd 0 @@ -304,6 +307,7 @@ show status like 'handler_read%'; Variable_name Value Handler_read_first 0 Handler_read_key 0 +Handler_read_last 1 Handler_read_next 0 Handler_read_prev 0 Handler_read_rnd 0 @@ -315,6 +319,7 @@ show status like 'handler_read%'; Variable_name Value Handler_read_first 0 Handler_read_key 0 +Handler_read_last 0 Handler_read_next 0 Handler_read_prev 0 Handler_read_rnd 1 @@ -368,6 +373,7 @@ show status like 'handler_read%'; Variable_name Value Handler_read_first 0 Handler_read_key 1 +Handler_read_last 0 Handler_read_next 1 Handler_read_prev 0 Handler_read_rnd 1 @@ -405,6 +411,7 @@ show status like '%Handler_read%'; Variable_name Value Handler_read_first 0 Handler_read_key 1 +Handler_read_last 0 Handler_read_next 0 Handler_read_prev 0 Handler_read_rnd 0 @@ -415,6 +422,7 @@ show status like '%Handler_read%'; Variable_name Value Handler_read_first 0 Handler_read_key 2 +Handler_read_last 0 Handler_read_next 0 Handler_read_prev 0 Handler_read_rnd 0 @@ -424,6 +432,7 @@ show status like '%Handler_read%'; Variable_name Value Handler_read_first 0 Handler_read_key 3 +Handler_read_last 0 Handler_read_next 0 Handler_read_prev 0 Handler_read_rnd 0 @@ -433,6 +442,7 @@ show status like '%Handler_read%'; Variable_name Value Handler_read_first 0 Handler_read_key 3 +Handler_read_last 0 Handler_read_next 0 Handler_read_prev 0 Handler_read_rnd 0 diff --git a/mysql-test/suite/binlog/r/binlog_row_binlog.result b/mysql-test/suite/binlog/r/binlog_row_binlog.result index 3c4668b72bb..e45f4a76643 100644 --- a/mysql-test/suite/binlog/r/binlog_row_binlog.result +++ b/mysql-test/suite/binlog/r/binlog_row_binlog.result @@ -1267,8 +1267,9 @@ master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Query # # use `test`; FLUSH TABLES -insert delayed into t1 values (null),(null),(null),(null); -insert delayed into t1 values (null),(null),(400),(null); +RESET MASTER; +insert /* before delayed */ delayed /* after delayed */ into t1 values (null),(null),(null),(null); +insert /*! delayed */ into t1 values (null),(null),(400),(null); select * from t1; a 207 diff --git a/mysql-test/suite/binlog/r/binlog_statement_insert_delayed.result b/mysql-test/suite/binlog/r/binlog_statement_insert_delayed.result index e081bed40e6..2219961aca0 100644 --- a/mysql-test/suite/binlog/r/binlog_statement_insert_delayed.result +++ b/mysql-test/suite/binlog/r/binlog_statement_insert_delayed.result @@ -20,12 +20,21 @@ master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; insert delayed into t1 values (300) master-bin.000001 # Query # # COMMIT master-bin.000001 # Query # # use `test`; FLUSH TABLES -insert delayed into t1 values (null),(null),(null),(null); -Warnings: -Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses INSERT DELAYED. This is unsafe because the times when rows are inserted cannot be predicted. -insert delayed into t1 values (null),(null),(400),(null); -Warnings: -Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses INSERT DELAYED. This is unsafe because the times when rows are inserted cannot be predicted. +RESET MASTER; +insert /* before delayed */ delayed /* after delayed */ into t1 values (null),(null),(null),(null); +insert /*! delayed */ into t1 values (null),(null),(400),(null); +FLUSH TABLES; +show binlog events from <binlog_start>; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Intvar # # INSERT_ID=301 +master-bin.000001 # Query # # use `test`; insert /* before delayed */ /* after delayed */ into t1 values (null),(null),(null),(null) +master-bin.000001 # Query # # COMMIT +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Intvar # # INSERT_ID=305 +master-bin.000001 # Query # # use `test`; insert /*! */ into t1 values (null),(null),(400),(null) +master-bin.000001 # Query # # COMMIT +master-bin.000001 # Query # # use `test`; FLUSH TABLES select * from t1; a 207 diff --git a/mysql-test/suite/binlog/r/binlog_stm_binlog.result b/mysql-test/suite/binlog/r/binlog_stm_binlog.result index b96707f994c..187a778d9cc 100644 --- a/mysql-test/suite/binlog/r/binlog_stm_binlog.result +++ b/mysql-test/suite/binlog/r/binlog_stm_binlog.result @@ -758,8 +758,9 @@ master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT master-bin.000001 # Query # # use `test`; FLUSH TABLES -insert delayed into t1 values (null),(null),(null),(null); -insert delayed into t1 values (null),(null),(400),(null); +RESET MASTER; +insert /* before delayed */ delayed /* after delayed */ into t1 values (null),(null),(null),(null); +insert /*! delayed */ into t1 values (null),(null),(400),(null); select * from t1; a 207 diff --git a/mysql-test/suite/binlog/r/binlog_unsafe.result b/mysql-test/suite/binlog/r/binlog_unsafe.result index ba361e59428..7222f384a1f 100644 --- a/mysql-test/suite/binlog/r/binlog_unsafe.result +++ b/mysql-test/suite/binlog/r/binlog_unsafe.result @@ -862,65 +862,51 @@ Note 1592 Unsafe statement written to the binary log using statement format sinc * Invoke statement so that return value is dicarded: expect no warning. SELECT * FROM data_table LIMIT 1; -==== Testing INSERT DELAYED unsafeness ==== +==== Testing INSERT DELAYED safeness after BUG#54579 is fixed ==== Invoking function func_sidef_1 invoking unsafe INSERT DELAYED statement. CREATE FUNCTION func_sidef_1() RETURNS VARCHAR(100) BEGIN INSERT INTO ta1 VALUES (47); INSERT DELAYED INTO t0 VALUES (1), (2); RETURN 0; END; -* binlog_format = STATEMENT: expect 1 warnings. +* binlog_format = STATEMENT: expect 0 warnings. INSERT INTO t1 SELECT func_sidef_1(); -Warnings: -Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses INSERT DELAYED. This is unsafe because the times when rows are inserted cannot be predicted. * SQL_LOG_BIN = 0: expect nothing logged and no warning. * binlog_format = MIXED: expect row events in binlog and no warning. Invoking function func_sidef_2 invoking function func_sidef_1 invoking unsafe INSERT DELAYED statement. CREATE FUNCTION func_sidef_2() RETURNS VARCHAR(100) BEGIN INSERT INTO ta2 VALUES (47); INSERT INTO t1 SELECT func_sidef_1(); RETURN 0; END; -* binlog_format = STATEMENT: expect 1 warnings. +* binlog_format = STATEMENT: expect 0 warnings. INSERT INTO t2 SELECT func_sidef_2(); -Warnings: -Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses INSERT DELAYED. This is unsafe because the times when rows are inserted cannot be predicted. * SQL_LOG_BIN = 0: expect nothing logged and no warning. * binlog_format = MIXED: expect row events in binlog and no warning. DROP FUNCTION func_sidef_2; Invoking procedure proc_2 invoking function func_sidef_1 invoking unsafe INSERT DELAYED statement. CREATE PROCEDURE proc_2() BEGIN INSERT INTO t1 SELECT func_sidef_1(); INSERT INTO ta2 VALUES (47); END; -* binlog_format = STATEMENT: expect 1 warnings. +* binlog_format = STATEMENT: expect 0 warnings. CALL proc_2(); -Warnings: -Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses INSERT DELAYED. This is unsafe because the times when rows are inserted cannot be predicted. * SQL_LOG_BIN = 0: expect nothing logged and no warning. * binlog_format = MIXED: expect row events in binlog and no warning. DROP PROCEDURE proc_2; Invoking trigger trig_2 invoking function func_sidef_1 invoking unsafe INSERT DELAYED statement. CREATE TRIGGER trig_2 BEFORE INSERT ON trigger_table_2 FOR EACH ROW BEGIN INSERT INTO ta2 VALUES (47); INSERT INTO t1 SELECT func_sidef_1(); END; -* binlog_format = STATEMENT: expect 1 warnings. +* binlog_format = STATEMENT: expect 0 warnings. INSERT INTO trigger_table_2 VALUES (1); -Warnings: -Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses INSERT DELAYED. This is unsafe because the times when rows are inserted cannot be predicted. * SQL_LOG_BIN = 0: expect nothing logged and no warning. * binlog_format = MIXED: expect row events in binlog and no warning. DROP TRIGGER trig_2; Invoking view view_sidef_2 invoking function func_sidef_1 invoking unsafe INSERT DELAYED statement. CREATE VIEW view_sidef_2 AS SELECT func_sidef_1(); -Warnings: -Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses INSERT DELAYED. This is unsafe because the times when rows are inserted cannot be predicted. -* binlog_format = STATEMENT: expect 1 warnings. +* binlog_format = STATEMENT: expect 0 warnings. INSERT INTO t2 SELECT * FROM view_sidef_2; -Warnings: -Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses INSERT DELAYED. This is unsafe because the times when rows are inserted cannot be predicted. * SQL_LOG_BIN = 0: expect nothing logged and no warning. * binlog_format = MIXED: expect row events in binlog and no warning. DROP VIEW view_sidef_2; Invoking prepared statement prep_2 invoking function func_sidef_1 invoking unsafe INSERT DELAYED statement. PREPARE prep_2 FROM "INSERT INTO t1 SELECT func_sidef_1()"; -* binlog_format = STATEMENT: expect 1 warnings. +* binlog_format = STATEMENT: expect 0 warnings. EXECUTE prep_2; -Warnings: -Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses INSERT DELAYED. This is unsafe because the times when rows are inserted cannot be predicted. * SQL_LOG_BIN = 0: expect nothing logged and no warning. * binlog_format = MIXED: expect row events in binlog and no warning. DROP PREPARE prep_2; @@ -928,49 +914,39 @@ DROP FUNCTION func_sidef_1; Invoking procedure proc_1 invoking unsafe INSERT DELAYED statement. CREATE PROCEDURE proc_1() BEGIN INSERT DELAYED INTO t0 VALUES (1), (2); INSERT INTO ta1 VALUES (47); END; -* binlog_format = STATEMENT: expect 1 warnings. +* binlog_format = STATEMENT: expect 0 warnings. CALL proc_1(); -Warnings: -Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses INSERT DELAYED. This is unsafe because the times when rows are inserted cannot be predicted. * SQL_LOG_BIN = 0: expect nothing logged and no warning. * binlog_format = MIXED: expect row events in binlog and no warning. Invoking function func_sidef_2 invoking procedure proc_1 invoking unsafe INSERT DELAYED statement. CREATE FUNCTION func_sidef_2() RETURNS VARCHAR(100) BEGIN INSERT INTO ta2 VALUES (47); CALL proc_1(); RETURN 0; END; -* binlog_format = STATEMENT: expect 1 warnings. +* binlog_format = STATEMENT: expect 0 warnings. INSERT INTO t2 SELECT func_sidef_2(); -Warnings: -Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses INSERT DELAYED. This is unsafe because the times when rows are inserted cannot be predicted. * SQL_LOG_BIN = 0: expect nothing logged and no warning. * binlog_format = MIXED: expect row events in binlog and no warning. DROP FUNCTION func_sidef_2; Invoking procedure proc_2 invoking procedure proc_1 invoking unsafe INSERT DELAYED statement. CREATE PROCEDURE proc_2() BEGIN CALL proc_1(); INSERT INTO ta2 VALUES (47); END; -* binlog_format = STATEMENT: expect 1 warnings. +* binlog_format = STATEMENT: expect 0 warnings. CALL proc_2(); -Warnings: -Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses INSERT DELAYED. This is unsafe because the times when rows are inserted cannot be predicted. * SQL_LOG_BIN = 0: expect nothing logged and no warning. * binlog_format = MIXED: expect row events in binlog and no warning. DROP PROCEDURE proc_2; Invoking trigger trig_2 invoking procedure proc_1 invoking unsafe INSERT DELAYED statement. CREATE TRIGGER trig_2 BEFORE INSERT ON trigger_table_2 FOR EACH ROW BEGIN INSERT INTO ta2 VALUES (47); CALL proc_1(); END; -* binlog_format = STATEMENT: expect 1 warnings. +* binlog_format = STATEMENT: expect 0 warnings. INSERT INTO trigger_table_2 VALUES (1); -Warnings: -Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses INSERT DELAYED. This is unsafe because the times when rows are inserted cannot be predicted. * SQL_LOG_BIN = 0: expect nothing logged and no warning. * binlog_format = MIXED: expect row events in binlog and no warning. DROP TRIGGER trig_2; Invoking prepared statement prep_2 invoking procedure proc_1 invoking unsafe INSERT DELAYED statement. PREPARE prep_2 FROM "CALL proc_1()"; -* binlog_format = STATEMENT: expect 1 warnings. +* binlog_format = STATEMENT: expect 0 warnings. EXECUTE prep_2; -Warnings: -Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses INSERT DELAYED. This is unsafe because the times when rows are inserted cannot be predicted. * SQL_LOG_BIN = 0: expect nothing logged and no warning. * binlog_format = MIXED: expect row events in binlog and no warning. DROP PREPARE prep_2; @@ -978,49 +954,39 @@ DROP PROCEDURE proc_1; Invoking trigger trig_1 invoking unsafe INSERT DELAYED statement. CREATE TRIGGER trig_1 BEFORE INSERT ON trigger_table_1 FOR EACH ROW BEGIN INSERT INTO ta1 VALUES (47); INSERT DELAYED INTO t0 VALUES (1), (2); END; -* binlog_format = STATEMENT: expect 1 warnings. +* binlog_format = STATEMENT: expect 0 warnings. INSERT INTO trigger_table_1 VALUES (1); -Warnings: -Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses INSERT DELAYED. This is unsafe because the times when rows are inserted cannot be predicted. * SQL_LOG_BIN = 0: expect nothing logged and no warning. * binlog_format = MIXED: expect row events in binlog and no warning. Invoking function func_sidef_2 invoking trigger trig_1 invoking unsafe INSERT DELAYED statement. CREATE FUNCTION func_sidef_2() RETURNS VARCHAR(100) BEGIN INSERT INTO ta2 VALUES (47); INSERT INTO trigger_table_1 VALUES (1); RETURN 0; END; -* binlog_format = STATEMENT: expect 1 warnings. +* binlog_format = STATEMENT: expect 0 warnings. INSERT INTO t2 SELECT func_sidef_2(); -Warnings: -Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses INSERT DELAYED. This is unsafe because the times when rows are inserted cannot be predicted. * SQL_LOG_BIN = 0: expect nothing logged and no warning. * binlog_format = MIXED: expect row events in binlog and no warning. DROP FUNCTION func_sidef_2; Invoking procedure proc_2 invoking trigger trig_1 invoking unsafe INSERT DELAYED statement. CREATE PROCEDURE proc_2() BEGIN INSERT INTO trigger_table_1 VALUES (1); INSERT INTO ta2 VALUES (47); END; -* binlog_format = STATEMENT: expect 1 warnings. +* binlog_format = STATEMENT: expect 0 warnings. CALL proc_2(); -Warnings: -Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses INSERT DELAYED. This is unsafe because the times when rows are inserted cannot be predicted. * SQL_LOG_BIN = 0: expect nothing logged and no warning. * binlog_format = MIXED: expect row events in binlog and no warning. DROP PROCEDURE proc_2; Invoking trigger trig_2 invoking trigger trig_1 invoking unsafe INSERT DELAYED statement. CREATE TRIGGER trig_2 BEFORE INSERT ON trigger_table_2 FOR EACH ROW BEGIN INSERT INTO ta2 VALUES (47); INSERT INTO trigger_table_1 VALUES (1); END; -* binlog_format = STATEMENT: expect 1 warnings. +* binlog_format = STATEMENT: expect 0 warnings. INSERT INTO trigger_table_2 VALUES (1); -Warnings: -Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses INSERT DELAYED. This is unsafe because the times when rows are inserted cannot be predicted. * SQL_LOG_BIN = 0: expect nothing logged and no warning. * binlog_format = MIXED: expect row events in binlog and no warning. DROP TRIGGER trig_2; Invoking prepared statement prep_2 invoking trigger trig_1 invoking unsafe INSERT DELAYED statement. PREPARE prep_2 FROM "INSERT INTO trigger_table_1 VALUES (1)"; -* binlog_format = STATEMENT: expect 1 warnings. +* binlog_format = STATEMENT: expect 0 warnings. EXECUTE prep_2; -Warnings: -Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses INSERT DELAYED. This is unsafe because the times when rows are inserted cannot be predicted. * SQL_LOG_BIN = 0: expect nothing logged and no warning. * binlog_format = MIXED: expect row events in binlog and no warning. DROP PREPARE prep_2; @@ -1028,19 +994,15 @@ DROP TRIGGER trig_1; Invoking prepared statement prep_1 invoking unsafe INSERT DELAYED statement. PREPARE prep_1 FROM "INSERT DELAYED INTO t0 VALUES (1), (2)"; -* binlog_format = STATEMENT: expect 1 warnings. +* binlog_format = STATEMENT: expect 0 warnings. EXECUTE prep_1; -Warnings: -Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses INSERT DELAYED. This is unsafe because the times when rows are inserted cannot be predicted. * SQL_LOG_BIN = 0: expect nothing logged and no warning. * binlog_format = MIXED: expect row events in binlog and no warning. DROP PREPARE prep_1; Invoking unsafe INSERT DELAYED statement. -* binlog_format = STATEMENT: expect 1 warnings. +* binlog_format = STATEMENT: expect 0 warnings. INSERT DELAYED INTO t0 VALUES (1), (2); -Warnings: -Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses INSERT DELAYED. This is unsafe because the times when rows are inserted cannot be predicted. * SQL_LOG_BIN = 0: expect nothing logged and no warning. * binlog_format = MIXED: expect row events in binlog and no warning. @@ -1798,11 +1760,10 @@ SELECT COUNT(*) FROM mysql.general_log; Invoking function func_sidef_1 invoking statement that is unsafe in many ways. CREATE FUNCTION func_sidef_1() RETURNS VARCHAR(100) BEGIN INSERT INTO ta1 VALUES (47); INSERT DELAYED INTO double_autoinc_table SELECT CONCAT(UUID(), @@hostname, myfunc_int(), NULL) FROM mysql.general_log LIMIT 1; RETURN 0; END; -* binlog_format = STATEMENT: expect 7 warnings. +* binlog_format = STATEMENT: expect 6 warnings. INSERT INTO t1 SELECT func_sidef_1(); Warnings: 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. -Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses INSERT DELAYED. This is unsafe because the times when rows are inserted cannot be predicted. Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses the general log, slow query log, or performance_schema table(s). This is unsafe because system tables may differ on slaves. Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it invokes a trigger or a stored function that inserts into an AUTO_INCREMENT column. Inserted values cannot be logged correctly. Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a UDF which may not return the same value on the slave. @@ -1813,11 +1774,10 @@ Note 1592 Unsafe statement written to the binary log using statement format sinc Invoking function func_sidef_2 invoking function func_sidef_1 invoking statement that is unsafe in many ways. CREATE FUNCTION func_sidef_2() RETURNS VARCHAR(100) BEGIN INSERT INTO ta2 VALUES (47); INSERT INTO t1 SELECT func_sidef_1(); RETURN 0; END; -* binlog_format = STATEMENT: expect 7 warnings. +* binlog_format = STATEMENT: expect 6 warnings. INSERT INTO t2 SELECT func_sidef_2(); Warnings: 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. -Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses INSERT DELAYED. This is unsafe because the times when rows are inserted cannot be predicted. Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses the general log, slow query log, or performance_schema table(s). This is unsafe because system tables may differ on slaves. Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it invokes a trigger or a stored function that inserts into an AUTO_INCREMENT column. Inserted values cannot be logged correctly. Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a UDF which may not return the same value on the slave. @@ -1829,11 +1789,10 @@ DROP FUNCTION func_sidef_2; Invoking procedure proc_2 invoking function func_sidef_1 invoking statement that is unsafe in many ways. CREATE PROCEDURE proc_2() BEGIN INSERT INTO t1 SELECT func_sidef_1(); INSERT INTO ta2 VALUES (47); END; -* binlog_format = STATEMENT: expect 7 warnings. +* binlog_format = STATEMENT: expect 6 warnings. CALL proc_2(); Warnings: 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. -Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses INSERT DELAYED. This is unsafe because the times when rows are inserted cannot be predicted. Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses the general log, slow query log, or performance_schema table(s). This is unsafe because system tables may differ on slaves. Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it invokes a trigger or a stored function that inserts into an AUTO_INCREMENT column. Inserted values cannot be logged correctly. Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a UDF which may not return the same value on the slave. @@ -1845,11 +1804,10 @@ DROP PROCEDURE proc_2; Invoking trigger trig_2 invoking function func_sidef_1 invoking statement that is unsafe in many ways. CREATE TRIGGER trig_2 BEFORE INSERT ON trigger_table_2 FOR EACH ROW BEGIN INSERT INTO ta2 VALUES (47); INSERT INTO t1 SELECT func_sidef_1(); END; -* binlog_format = STATEMENT: expect 7 warnings. +* binlog_format = STATEMENT: expect 6 warnings. INSERT INTO trigger_table_2 VALUES (1); Warnings: 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. -Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses INSERT DELAYED. This is unsafe because the times when rows are inserted cannot be predicted. Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses the general log, slow query log, or performance_schema table(s). This is unsafe because system tables may differ on slaves. Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it invokes a trigger or a stored function that inserts into an AUTO_INCREMENT column. Inserted values cannot be logged correctly. Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a UDF which may not return the same value on the slave. @@ -1863,17 +1821,15 @@ Invoking view view_sidef_2 invoking function func_sidef_1 invoking statement tha CREATE VIEW view_sidef_2 AS SELECT func_sidef_1(); Warnings: 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. -Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses INSERT DELAYED. This is unsafe because the times when rows are inserted cannot be predicted. Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses the general log, slow query log, or performance_schema table(s). This is unsafe because system tables may differ on slaves. Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it invokes a trigger or a stored function that inserts into an AUTO_INCREMENT column. Inserted values cannot be logged correctly. Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a UDF which may not return the same value on the slave. Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system variable that may have a different value on the slave. Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system function that may return a different value on the slave. -* binlog_format = STATEMENT: expect 7 warnings. +* binlog_format = STATEMENT: expect 6 warnings. INSERT INTO t2 SELECT * FROM view_sidef_2; Warnings: 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. -Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses INSERT DELAYED. This is unsafe because the times when rows are inserted cannot be predicted. Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses the general log, slow query log, or performance_schema table(s). This is unsafe because system tables may differ on slaves. Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it invokes a trigger or a stored function that inserts into an AUTO_INCREMENT column. Inserted values cannot be logged correctly. Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a UDF which may not return the same value on the slave. @@ -1885,11 +1841,10 @@ DROP VIEW view_sidef_2; Invoking prepared statement prep_2 invoking function func_sidef_1 invoking statement that is unsafe in many ways. PREPARE prep_2 FROM "INSERT INTO t1 SELECT func_sidef_1()"; -* binlog_format = STATEMENT: expect 7 warnings. +* binlog_format = STATEMENT: expect 6 warnings. EXECUTE prep_2; Warnings: 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. -Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses INSERT DELAYED. This is unsafe because the times when rows are inserted cannot be predicted. Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses the general log, slow query log, or performance_schema table(s). This is unsafe because system tables may differ on slaves. Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it invokes a trigger or a stored function that inserts into an AUTO_INCREMENT column. Inserted values cannot be logged correctly. Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a UDF which may not return the same value on the slave. @@ -1902,11 +1857,10 @@ DROP FUNCTION func_sidef_1; Invoking procedure proc_1 invoking statement that is unsafe in many ways. CREATE PROCEDURE proc_1() BEGIN INSERT DELAYED INTO double_autoinc_table SELECT CONCAT(UUID(), @@hostname, myfunc_int(), NULL) FROM mysql.general_log LIMIT 1; INSERT INTO ta1 VALUES (47); END; -* binlog_format = STATEMENT: expect 7 warnings. +* binlog_format = STATEMENT: expect 6 warnings. CALL proc_1(); Warnings: 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. -Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses INSERT DELAYED. This is unsafe because the times when rows are inserted cannot be predicted. Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses the general log, slow query log, or performance_schema table(s). This is unsafe because system tables may differ on slaves. Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it invokes a trigger or a stored function that inserts into an AUTO_INCREMENT column. Inserted values cannot be logged correctly. Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a UDF which may not return the same value on the slave. @@ -1917,11 +1871,10 @@ Note 1592 Unsafe statement written to the binary log using statement format sinc Invoking function func_sidef_2 invoking procedure proc_1 invoking statement that is unsafe in many ways. CREATE FUNCTION func_sidef_2() RETURNS VARCHAR(100) BEGIN INSERT INTO ta2 VALUES (47); CALL proc_1(); RETURN 0; END; -* binlog_format = STATEMENT: expect 7 warnings. +* binlog_format = STATEMENT: expect 6 warnings. INSERT INTO t2 SELECT func_sidef_2(); Warnings: 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. -Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses INSERT DELAYED. This is unsafe because the times when rows are inserted cannot be predicted. Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses the general log, slow query log, or performance_schema table(s). This is unsafe because system tables may differ on slaves. Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it invokes a trigger or a stored function that inserts into an AUTO_INCREMENT column. Inserted values cannot be logged correctly. Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a UDF which may not return the same value on the slave. @@ -1933,11 +1886,10 @@ DROP FUNCTION func_sidef_2; Invoking procedure proc_2 invoking procedure proc_1 invoking statement that is unsafe in many ways. CREATE PROCEDURE proc_2() BEGIN CALL proc_1(); INSERT INTO ta2 VALUES (47); END; -* binlog_format = STATEMENT: expect 7 warnings. +* binlog_format = STATEMENT: expect 6 warnings. CALL proc_2(); Warnings: 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. -Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses INSERT DELAYED. This is unsafe because the times when rows are inserted cannot be predicted. Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses the general log, slow query log, or performance_schema table(s). This is unsafe because system tables may differ on slaves. Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it invokes a trigger or a stored function that inserts into an AUTO_INCREMENT column. Inserted values cannot be logged correctly. Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a UDF which may not return the same value on the slave. @@ -1949,11 +1901,10 @@ DROP PROCEDURE proc_2; Invoking trigger trig_2 invoking procedure proc_1 invoking statement that is unsafe in many ways. CREATE TRIGGER trig_2 BEFORE INSERT ON trigger_table_2 FOR EACH ROW BEGIN INSERT INTO ta2 VALUES (47); CALL proc_1(); END; -* binlog_format = STATEMENT: expect 7 warnings. +* binlog_format = STATEMENT: expect 6 warnings. INSERT INTO trigger_table_2 VALUES (1); Warnings: 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. -Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses INSERT DELAYED. This is unsafe because the times when rows are inserted cannot be predicted. Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses the general log, slow query log, or performance_schema table(s). This is unsafe because system tables may differ on slaves. Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it invokes a trigger or a stored function that inserts into an AUTO_INCREMENT column. Inserted values cannot be logged correctly. Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a UDF which may not return the same value on the slave. @@ -1965,11 +1916,10 @@ DROP TRIGGER trig_2; Invoking prepared statement prep_2 invoking procedure proc_1 invoking statement that is unsafe in many ways. PREPARE prep_2 FROM "CALL proc_1()"; -* binlog_format = STATEMENT: expect 7 warnings. +* binlog_format = STATEMENT: expect 6 warnings. EXECUTE prep_2; Warnings: 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. -Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses INSERT DELAYED. This is unsafe because the times when rows are inserted cannot be predicted. Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses the general log, slow query log, or performance_schema table(s). This is unsafe because system tables may differ on slaves. Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it invokes a trigger or a stored function that inserts into an AUTO_INCREMENT column. Inserted values cannot be logged correctly. Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a UDF which may not return the same value on the slave. @@ -1982,11 +1932,10 @@ DROP PROCEDURE proc_1; Invoking trigger trig_1 invoking statement that is unsafe in many ways. CREATE TRIGGER trig_1 BEFORE INSERT ON trigger_table_1 FOR EACH ROW BEGIN INSERT INTO ta1 VALUES (47); INSERT DELAYED INTO double_autoinc_table SELECT CONCAT(UUID(), @@hostname, myfunc_int(), NULL) FROM mysql.general_log LIMIT 1; END; -* binlog_format = STATEMENT: expect 7 warnings. +* binlog_format = STATEMENT: expect 6 warnings. INSERT INTO trigger_table_1 VALUES (1); Warnings: 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. -Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses INSERT DELAYED. This is unsafe because the times when rows are inserted cannot be predicted. Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses the general log, slow query log, or performance_schema table(s). This is unsafe because system tables may differ on slaves. Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it invokes a trigger or a stored function that inserts into an AUTO_INCREMENT column. Inserted values cannot be logged correctly. Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a UDF which may not return the same value on the slave. @@ -1997,11 +1946,10 @@ Note 1592 Unsafe statement written to the binary log using statement format sinc Invoking function func_sidef_2 invoking trigger trig_1 invoking statement that is unsafe in many ways. CREATE FUNCTION func_sidef_2() RETURNS VARCHAR(100) BEGIN INSERT INTO ta2 VALUES (47); INSERT INTO trigger_table_1 VALUES (1); RETURN 0; END; -* binlog_format = STATEMENT: expect 7 warnings. +* binlog_format = STATEMENT: expect 6 warnings. INSERT INTO t2 SELECT func_sidef_2(); Warnings: 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. -Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses INSERT DELAYED. This is unsafe because the times when rows are inserted cannot be predicted. Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses the general log, slow query log, or performance_schema table(s). This is unsafe because system tables may differ on slaves. Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it invokes a trigger or a stored function that inserts into an AUTO_INCREMENT column. Inserted values cannot be logged correctly. Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a UDF which may not return the same value on the slave. @@ -2013,11 +1961,10 @@ DROP FUNCTION func_sidef_2; Invoking procedure proc_2 invoking trigger trig_1 invoking statement that is unsafe in many ways. CREATE PROCEDURE proc_2() BEGIN INSERT INTO trigger_table_1 VALUES (1); INSERT INTO ta2 VALUES (47); END; -* binlog_format = STATEMENT: expect 7 warnings. +* binlog_format = STATEMENT: expect 6 warnings. CALL proc_2(); Warnings: 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. -Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses INSERT DELAYED. This is unsafe because the times when rows are inserted cannot be predicted. Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses the general log, slow query log, or performance_schema table(s). This is unsafe because system tables may differ on slaves. Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it invokes a trigger or a stored function that inserts into an AUTO_INCREMENT column. Inserted values cannot be logged correctly. Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a UDF which may not return the same value on the slave. @@ -2029,11 +1976,10 @@ DROP PROCEDURE proc_2; Invoking trigger trig_2 invoking trigger trig_1 invoking statement that is unsafe in many ways. CREATE TRIGGER trig_2 BEFORE INSERT ON trigger_table_2 FOR EACH ROW BEGIN INSERT INTO ta2 VALUES (47); INSERT INTO trigger_table_1 VALUES (1); END; -* binlog_format = STATEMENT: expect 7 warnings. +* binlog_format = STATEMENT: expect 6 warnings. INSERT INTO trigger_table_2 VALUES (1); Warnings: 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. -Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses INSERT DELAYED. This is unsafe because the times when rows are inserted cannot be predicted. Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses the general log, slow query log, or performance_schema table(s). This is unsafe because system tables may differ on slaves. Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it invokes a trigger or a stored function that inserts into an AUTO_INCREMENT column. Inserted values cannot be logged correctly. Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a UDF which may not return the same value on the slave. @@ -2045,11 +1991,10 @@ DROP TRIGGER trig_2; Invoking prepared statement prep_2 invoking trigger trig_1 invoking statement that is unsafe in many ways. PREPARE prep_2 FROM "INSERT INTO trigger_table_1 VALUES (1)"; -* binlog_format = STATEMENT: expect 7 warnings. +* binlog_format = STATEMENT: expect 6 warnings. EXECUTE prep_2; Warnings: 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. -Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses INSERT DELAYED. This is unsafe because the times when rows are inserted cannot be predicted. Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses the general log, slow query log, or performance_schema table(s). This is unsafe because system tables may differ on slaves. Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it invokes a trigger or a stored function that inserts into an AUTO_INCREMENT column. Inserted values cannot be logged correctly. Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a UDF which may not return the same value on the slave. @@ -2062,11 +2007,10 @@ DROP TRIGGER trig_1; Invoking prepared statement prep_1 invoking statement that is unsafe in many ways. PREPARE prep_1 FROM "INSERT DELAYED INTO double_autoinc_table SELECT CONCAT(UUID(), @@hostname, myfunc_int(), NULL) FROM mysql.general_log LIMIT 1"; -* binlog_format = STATEMENT: expect 7 warnings. +* binlog_format = STATEMENT: expect 6 warnings. EXECUTE prep_1; Warnings: 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. -Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses INSERT DELAYED. This is unsafe because the times when rows are inserted cannot be predicted. Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses the general log, slow query log, or performance_schema table(s). This is unsafe because system tables may differ on slaves. Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it invokes a trigger or a stored function that inserts into an AUTO_INCREMENT column. Inserted values cannot be logged correctly. Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a UDF which may not return the same value on the slave. @@ -2077,11 +2021,10 @@ Note 1592 Unsafe statement written to the binary log using statement format sinc DROP PREPARE prep_1; Invoking statement that is unsafe in many ways. -* binlog_format = STATEMENT: expect 7 warnings. +* binlog_format = STATEMENT: expect 6 warnings. INSERT DELAYED INTO double_autoinc_table SELECT CONCAT(UUID(), @@hostname, myfunc_int(), NULL) FROM mysql.general_log LIMIT 1; Warnings: 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. -Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses INSERT DELAYED. This is unsafe because the times when rows are inserted cannot be predicted. Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses the general log, slow query log, or performance_schema table(s). This is unsafe because system tables may differ on slaves. Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it invokes a trigger or a stored function that inserts into an AUTO_INCREMENT column. Inserted values cannot be logged correctly. Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a UDF which may not return the same value on the slave. @@ -2554,8 +2497,7 @@ func_limit() show binlog events from <binlog_start>; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # BEGIN -master-bin.000001 # Table_map # # table_id: # (test.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `test`; INSERT DELAYED INTO t1 VALUES (1), (2) master-bin.000001 # Query # # COMMIT master-bin.000001 # Query # # BEGIN master-bin.000001 # Table_map # # table_id: # (test.t1) diff --git a/mysql-test/suite/binlog/t/binlog_unsafe.test b/mysql-test/suite/binlog/t/binlog_unsafe.test index ed42a2cdb19..abcdf08d7a7 100644 --- a/mysql-test/suite/binlog/t/binlog_unsafe.test +++ b/mysql-test/suite/binlog/t/binlog_unsafe.test @@ -179,13 +179,13 @@ while (`SELECT $unsafe_type < 9`) { } if (`SELECT $unsafe_type = 3`) { - --echo ==== Testing INSERT DELAYED unsafeness ==== + --echo ==== Testing INSERT DELAYED safeness after BUG#54579 is fixed ==== --let $desc_0= unsafe INSERT DELAYED statement --let $stmt_sidef_0= INSERT DELAYED INTO t0 VALUES (1), (2) --let $value_0= --let $sel_sidef_0= --let $sel_retval_0= - --let $CRC_ARG_expected_number_of_warnings= 1 + --let $CRC_ARG_expected_number_of_warnings= 0 } if (`SELECT $unsafe_type = 4`) { @@ -227,7 +227,7 @@ while (`SELECT $unsafe_type < 9`) { --let $value_0= --let $sel_sidef_0= --let $sel_retval_0= - --let $CRC_ARG_expected_number_of_warnings= 7 + --let $CRC_ARG_expected_number_of_warnings= 6 } if (`SELECT $unsafe_type = 8`) { diff --git a/mysql-test/suite/perfschema/r/bad_option_3.result b/mysql-test/suite/perfschema/r/bad_option_3.result new file mode 100644 index 00000000000..ec717d6f7d2 --- /dev/null +++ b/mysql-test/suite/perfschema/r/bad_option_3.result @@ -0,0 +1,2 @@ +Found: unknown option '-x' +Found: Aborting diff --git a/mysql-test/suite/perfschema/r/bad_option_4.result b/mysql-test/suite/perfschema/r/bad_option_4.result new file mode 100644 index 00000000000..812ee546200 --- /dev/null +++ b/mysql-test/suite/perfschema/r/bad_option_4.result @@ -0,0 +1,2 @@ +Found: Can't change dir to.*bad_option_h_param +Found: Aborting diff --git a/mysql-test/suite/perfschema/r/bad_option_5.result b/mysql-test/suite/perfschema/r/bad_option_5.result new file mode 100644 index 00000000000..b318b6e0482 --- /dev/null +++ b/mysql-test/suite/perfschema/r/bad_option_5.result @@ -0,0 +1,2 @@ +Found: unknown option '-X' +Found: Aborting diff --git a/mysql-test/suite/perfschema/r/short_option_1.result b/mysql-test/suite/perfschema/r/short_option_1.result new file mode 100644 index 00000000000..ad48fe05ad9 --- /dev/null +++ b/mysql-test/suite/perfschema/r/short_option_1.result @@ -0,0 +1,27 @@ +select 'Ok, the server started' as result; +result +Ok, the server started +select @@SQL_MODE; +@@SQL_MODE +REAL_AS_FLOAT,PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,ANSI +show variables like 'sql_mode'; +Variable_name Value +sql_mode REAL_AS_FLOAT,PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,ANSI +select @@character_set_server; +@@character_set_server +utf8 +show variables like 'character_set_system'; +Variable_name Value +character_set_system utf8 +show variables like 'log'; +Variable_name Value +log ON +show variables like 'general_log'; +Variable_name Value +general_log ON +show variables like 'new'; +Variable_name Value +new ON +show variables like 'log_warnings'; +Variable_name Value +log_warnings 3 diff --git a/mysql-test/suite/perfschema/r/short_option_2.result b/mysql-test/suite/perfschema/r/short_option_2.result new file mode 100644 index 00000000000..0587fdef73b --- /dev/null +++ b/mysql-test/suite/perfschema/r/short_option_2.result @@ -0,0 +1,9 @@ +select 'Ok, the server started' as result; +result +Ok, the server started +select @@SQL_MODE; +@@SQL_MODE +REAL_AS_FLOAT,PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,ANSI +select @@log_warnings; +@@log_warnings +5 diff --git a/mysql-test/suite/perfschema/r/start_server_no_cond_class.result b/mysql-test/suite/perfschema/r/start_server_no_cond_class.result index 48891adce73..0241313863d 100644 --- a/mysql-test/suite/perfschema/r/start_server_no_cond_class.result +++ b/mysql-test/suite/perfschema/r/start_server_no_cond_class.result @@ -45,9 +45,9 @@ performance_schema_max_file_classes 50 performance_schema_max_file_handles 32768 performance_schema_max_file_instances 10000 performance_schema_max_mutex_classes 200 -performance_schema_max_mutex_instances 1000 -performance_schema_max_rwlock_classes 20 -performance_schema_max_rwlock_instances 1000 +performance_schema_max_mutex_instances 1000000 +performance_schema_max_rwlock_classes 30 +performance_schema_max_rwlock_instances 1000000 performance_schema_max_table_handles 100000 performance_schema_max_table_instances 50000 performance_schema_max_thread_classes 50 diff --git a/mysql-test/suite/perfschema/r/start_server_no_cond_inst.result b/mysql-test/suite/perfschema/r/start_server_no_cond_inst.result index cb1d64bf1e7..fe3e5646218 100644 --- a/mysql-test/suite/perfschema/r/start_server_no_cond_inst.result +++ b/mysql-test/suite/perfschema/r/start_server_no_cond_inst.result @@ -45,9 +45,9 @@ performance_schema_max_file_classes 50 performance_schema_max_file_handles 32768 performance_schema_max_file_instances 10000 performance_schema_max_mutex_classes 200 -performance_schema_max_mutex_instances 1000 -performance_schema_max_rwlock_classes 20 -performance_schema_max_rwlock_instances 1000 +performance_schema_max_mutex_instances 1000000 +performance_schema_max_rwlock_classes 30 +performance_schema_max_rwlock_instances 1000000 performance_schema_max_table_handles 100000 performance_schema_max_table_instances 50000 performance_schema_max_thread_classes 50 diff --git a/mysql-test/suite/perfschema/r/start_server_no_file_class.result b/mysql-test/suite/perfschema/r/start_server_no_file_class.result index 3856d241d73..974d933ed8d 100644 --- a/mysql-test/suite/perfschema/r/start_server_no_file_class.result +++ b/mysql-test/suite/perfschema/r/start_server_no_file_class.result @@ -45,9 +45,9 @@ performance_schema_max_file_classes 0 performance_schema_max_file_handles 32768 performance_schema_max_file_instances 10000 performance_schema_max_mutex_classes 200 -performance_schema_max_mutex_instances 1000 -performance_schema_max_rwlock_classes 20 -performance_schema_max_rwlock_instances 1000 +performance_schema_max_mutex_instances 1000000 +performance_schema_max_rwlock_classes 30 +performance_schema_max_rwlock_instances 1000000 performance_schema_max_table_handles 100000 performance_schema_max_table_instances 50000 performance_schema_max_thread_classes 50 diff --git a/mysql-test/suite/perfschema/r/start_server_no_file_inst.result b/mysql-test/suite/perfschema/r/start_server_no_file_inst.result index e52f04cbae7..303c31d1f08 100644 --- a/mysql-test/suite/perfschema/r/start_server_no_file_inst.result +++ b/mysql-test/suite/perfschema/r/start_server_no_file_inst.result @@ -45,9 +45,9 @@ performance_schema_max_file_classes 50 performance_schema_max_file_handles 32768 performance_schema_max_file_instances 0 performance_schema_max_mutex_classes 200 -performance_schema_max_mutex_instances 1000 -performance_schema_max_rwlock_classes 20 -performance_schema_max_rwlock_instances 1000 +performance_schema_max_mutex_instances 1000000 +performance_schema_max_rwlock_classes 30 +performance_schema_max_rwlock_instances 1000000 performance_schema_max_table_handles 100000 performance_schema_max_table_instances 50000 performance_schema_max_thread_classes 50 diff --git a/mysql-test/suite/perfschema/r/start_server_no_mutex_class.result b/mysql-test/suite/perfschema/r/start_server_no_mutex_class.result index aab39dfb619..11b91f80b04 100644 --- a/mysql-test/suite/perfschema/r/start_server_no_mutex_class.result +++ b/mysql-test/suite/perfschema/r/start_server_no_mutex_class.result @@ -45,9 +45,9 @@ performance_schema_max_file_classes 50 performance_schema_max_file_handles 32768 performance_schema_max_file_instances 10000 performance_schema_max_mutex_classes 0 -performance_schema_max_mutex_instances 1000 -performance_schema_max_rwlock_classes 20 -performance_schema_max_rwlock_instances 1000 +performance_schema_max_mutex_instances 1000000 +performance_schema_max_rwlock_classes 30 +performance_schema_max_rwlock_instances 1000000 performance_schema_max_table_handles 100000 performance_schema_max_table_instances 50000 performance_schema_max_thread_classes 50 diff --git a/mysql-test/suite/perfschema/r/start_server_no_mutex_inst.result b/mysql-test/suite/perfschema/r/start_server_no_mutex_inst.result index 0665058a469..8cda000e36a 100644 --- a/mysql-test/suite/perfschema/r/start_server_no_mutex_inst.result +++ b/mysql-test/suite/perfschema/r/start_server_no_mutex_inst.result @@ -46,8 +46,8 @@ performance_schema_max_file_handles 32768 performance_schema_max_file_instances 10000 performance_schema_max_mutex_classes 200 performance_schema_max_mutex_instances 0 -performance_schema_max_rwlock_classes 20 -performance_schema_max_rwlock_instances 1000 +performance_schema_max_rwlock_classes 30 +performance_schema_max_rwlock_instances 1000000 performance_schema_max_table_handles 100000 performance_schema_max_table_instances 50000 performance_schema_max_thread_classes 50 diff --git a/mysql-test/suite/perfschema/r/start_server_no_rwlock_class.result b/mysql-test/suite/perfschema/r/start_server_no_rwlock_class.result index 721f9957b1e..6cd7c180ddc 100644 --- a/mysql-test/suite/perfschema/r/start_server_no_rwlock_class.result +++ b/mysql-test/suite/perfschema/r/start_server_no_rwlock_class.result @@ -45,9 +45,9 @@ performance_schema_max_file_classes 50 performance_schema_max_file_handles 32768 performance_schema_max_file_instances 10000 performance_schema_max_mutex_classes 200 -performance_schema_max_mutex_instances 1000 +performance_schema_max_mutex_instances 1000000 performance_schema_max_rwlock_classes 0 -performance_schema_max_rwlock_instances 1000 +performance_schema_max_rwlock_instances 1000000 performance_schema_max_table_handles 100000 performance_schema_max_table_instances 50000 performance_schema_max_thread_classes 50 diff --git a/mysql-test/suite/perfschema/r/start_server_no_rwlock_inst.result b/mysql-test/suite/perfschema/r/start_server_no_rwlock_inst.result index 63398bce1f5..4393f9ea57b 100644 --- a/mysql-test/suite/perfschema/r/start_server_no_rwlock_inst.result +++ b/mysql-test/suite/perfschema/r/start_server_no_rwlock_inst.result @@ -45,8 +45,8 @@ performance_schema_max_file_classes 50 performance_schema_max_file_handles 32768 performance_schema_max_file_instances 10000 performance_schema_max_mutex_classes 200 -performance_schema_max_mutex_instances 1000 -performance_schema_max_rwlock_classes 20 +performance_schema_max_mutex_instances 1000000 +performance_schema_max_rwlock_classes 30 performance_schema_max_rwlock_instances 0 performance_schema_max_table_handles 100000 performance_schema_max_table_instances 50000 @@ -56,7 +56,7 @@ show engine PERFORMANCE_SCHEMA status; show status like "performance_schema%"; show variables like "performance_schema_max_rwlock_classes"; Variable_name Value -performance_schema_max_rwlock_classes 20 +performance_schema_max_rwlock_classes 30 select count(*) > 0 from performance_schema.SETUP_INSTRUMENTS where name like "wait/synch/rwlock/%"; count(*) > 0 diff --git a/mysql-test/suite/perfschema/r/start_server_no_thread_class.result b/mysql-test/suite/perfschema/r/start_server_no_thread_class.result index 006f0fc6002..20e6f18a284 100644 --- a/mysql-test/suite/perfschema/r/start_server_no_thread_class.result +++ b/mysql-test/suite/perfschema/r/start_server_no_thread_class.result @@ -45,9 +45,9 @@ performance_schema_max_file_classes 50 performance_schema_max_file_handles 32768 performance_schema_max_file_instances 10000 performance_schema_max_mutex_classes 200 -performance_schema_max_mutex_instances 1000 -performance_schema_max_rwlock_classes 20 -performance_schema_max_rwlock_instances 1000 +performance_schema_max_mutex_instances 1000000 +performance_schema_max_rwlock_classes 30 +performance_schema_max_rwlock_instances 1000000 performance_schema_max_table_handles 100000 performance_schema_max_table_instances 50000 performance_schema_max_thread_classes 0 diff --git a/mysql-test/suite/perfschema/r/start_server_no_thread_inst.result b/mysql-test/suite/perfschema/r/start_server_no_thread_inst.result index e0377e10583..28fe6923991 100644 --- a/mysql-test/suite/perfschema/r/start_server_no_thread_inst.result +++ b/mysql-test/suite/perfschema/r/start_server_no_thread_inst.result @@ -45,9 +45,9 @@ performance_schema_max_file_classes 50 performance_schema_max_file_handles 32768 performance_schema_max_file_instances 10000 performance_schema_max_mutex_classes 200 -performance_schema_max_mutex_instances 1000 -performance_schema_max_rwlock_classes 20 -performance_schema_max_rwlock_instances 1000 +performance_schema_max_mutex_instances 1000000 +performance_schema_max_rwlock_classes 30 +performance_schema_max_rwlock_instances 1000000 performance_schema_max_table_handles 100000 performance_schema_max_table_instances 50000 performance_schema_max_thread_classes 50 diff --git a/mysql-test/suite/perfschema/r/start_server_off.result b/mysql-test/suite/perfschema/r/start_server_off.result index 5f72cb4eba1..de09d9daa07 100644 --- a/mysql-test/suite/perfschema/r/start_server_off.result +++ b/mysql-test/suite/perfschema/r/start_server_off.result @@ -45,9 +45,9 @@ performance_schema_max_file_classes 50 performance_schema_max_file_handles 32768 performance_schema_max_file_instances 10000 performance_schema_max_mutex_classes 200 -performance_schema_max_mutex_instances 1000 -performance_schema_max_rwlock_classes 20 -performance_schema_max_rwlock_instances 1000 +performance_schema_max_mutex_instances 1000000 +performance_schema_max_rwlock_classes 30 +performance_schema_max_rwlock_instances 1000000 performance_schema_max_table_handles 100000 performance_schema_max_table_instances 50000 performance_schema_max_thread_classes 50 diff --git a/mysql-test/suite/perfschema/r/start_server_on.result b/mysql-test/suite/perfschema/r/start_server_on.result index 2639fb8e540..30546496050 100644 --- a/mysql-test/suite/perfschema/r/start_server_on.result +++ b/mysql-test/suite/perfschema/r/start_server_on.result @@ -45,9 +45,9 @@ performance_schema_max_file_classes 50 performance_schema_max_file_handles 32768 performance_schema_max_file_instances 10000 performance_schema_max_mutex_classes 200 -performance_schema_max_mutex_instances 1000 -performance_schema_max_rwlock_classes 20 -performance_schema_max_rwlock_instances 1000 +performance_schema_max_mutex_instances 1000000 +performance_schema_max_rwlock_classes 30 +performance_schema_max_rwlock_instances 1000000 performance_schema_max_table_handles 100000 performance_schema_max_table_instances 50000 performance_schema_max_thread_classes 50 diff --git a/mysql-test/suite/perfschema/t/bad_option_3.test b/mysql-test/suite/perfschema/t/bad_option_3.test new file mode 100644 index 00000000000..1a9efb61fdf --- /dev/null +++ b/mysql-test/suite/perfschema/t/bad_option_3.test @@ -0,0 +1,49 @@ +# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software Foundation, +# 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA + +# Tests for PERFORMANCE_SCHEMA +# Check error handling for invalid server start options + +--source include/not_embedded.inc +--source include/have_perfschema.inc + +let $outfile= $MYSQLTEST_VARDIR/tmp/bad_option_3.txt; +--error 0,1 +--remove_file $outfile +--error 2 +--exec $MYSQLD_BOOTSTRAP_CMD --loose-console -a -x > $outfile 2>&1 + +perl; + use strict; + use warnings; + my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/bad_option_3.txt"; + open(FILE, "<", $fname) or die; + my @lines= <FILE>; + # those must be in the file for the test to pass + my @patterns= + ("unknown option '-x'", + "Aborting"); + foreach my $one_line (@lines) + { + foreach my $one_pattern (@patterns) + { + # print pattern, not line, to get a stable output + print "Found: $one_pattern\n" if ($one_line =~ /$one_pattern/); + } + } + close FILE; +EOF +--remove_file $outfile + diff --git a/mysql-test/suite/perfschema/t/bad_option_4.test b/mysql-test/suite/perfschema/t/bad_option_4.test new file mode 100644 index 00000000000..c13df1b614d --- /dev/null +++ b/mysql-test/suite/perfschema/t/bad_option_4.test @@ -0,0 +1,49 @@ +# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software Foundation, +# 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA + +# Tests for PERFORMANCE_SCHEMA +# Check error handling for invalid server start options + +--source include/not_embedded.inc +--source include/have_perfschema.inc + +let $outfile= $MYSQLTEST_VARDIR/tmp/bad_option_4.txt; +--error 0,1 +--remove_file $outfile +--error 1 +--exec $MYSQLD_BOOTSTRAP_CMD --loose-console -a -h bad_option_h_param > $outfile 2>&1 + +perl; + use strict; + use warnings; + my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/bad_option_4.txt"; + open(FILE, "<", $fname) or die; + my @lines= <FILE>; + # those must be in the file for the test to pass + my @patterns= + ("Can't change dir to.*bad_option_h_param", + "Aborting"); + foreach my $one_line (@lines) + { + foreach my $one_pattern (@patterns) + { + # print pattern, not line, to get a stable output + print "Found: $one_pattern\n" if ($one_line =~ /$one_pattern/); + } + } + close FILE; +EOF +--remove_file $outfile + diff --git a/mysql-test/suite/perfschema/t/bad_option_5.test b/mysql-test/suite/perfschema/t/bad_option_5.test new file mode 100644 index 00000000000..d0ae1370859 --- /dev/null +++ b/mysql-test/suite/perfschema/t/bad_option_5.test @@ -0,0 +1,52 @@ +# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software Foundation, +# 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA + +# Tests for PERFORMANCE_SCHEMA +# Check error handling for invalid server start options + +--source include/not_embedded.inc +--source include/have_perfschema.inc + +let $outfile= $MYSQLTEST_VARDIR/tmp/bad_option_5.txt; +--error 0,1 +--remove_file $outfile +--error 2 +--exec $MYSQLD_BOOTSTRAP_CMD --loose-console -aXbroken > $outfile 2>&1 + +# -aXbroken should be parsed as -a -Xbroken, or --ansi -Xbroken, +# therefore the -X option is what the server should complain about + +perl; + use strict; + use warnings; + my $fname= "$ENV{'MYSQLTEST_VARDIR'}/tmp/bad_option_5.txt"; + open(FILE, "<", $fname) or die; + my @lines= <FILE>; + # those must be in the file for the test to pass + my @patterns= + ("unknown option '-X'", + "Aborting"); + foreach my $one_line (@lines) + { + foreach my $one_pattern (@patterns) + { + # print pattern, not line, to get a stable output + print "Found: $one_pattern\n" if ($one_line =~ /$one_pattern/); + } + } + close FILE; +EOF +--remove_file $outfile + diff --git a/mysql-test/suite/perfschema/t/short_option_1-master.opt b/mysql-test/suite/perfschema/t/short_option_1-master.opt new file mode 100644 index 00000000000..6a6e8d4c5ca --- /dev/null +++ b/mysql-test/suite/perfschema/t/short_option_1-master.opt @@ -0,0 +1 @@ +-a -n -Cutf8 --collation=utf8_bin -l -T12 -W3 diff --git a/mysql-test/suite/perfschema/t/short_option_1.test b/mysql-test/suite/perfschema/t/short_option_1.test new file mode 100644 index 00000000000..1d3e0835188 --- /dev/null +++ b/mysql-test/suite/perfschema/t/short_option_1.test @@ -0,0 +1,35 @@ +# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software Foundation, +# 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA + +# Tests for PERFORMANCE_SCHEMA +# Check server start for short server start options + +select 'Ok, the server started' as result; + +# See the associated -master.opt file. + +select @@SQL_MODE; +show variables like 'sql_mode'; + +select @@character_set_server; +show variables like 'character_set_system'; + +show variables like 'log'; +show variables like 'general_log'; + +show variables like 'new'; + +show variables like 'log_warnings'; + diff --git a/mysql-test/suite/perfschema/t/short_option_2-master.opt b/mysql-test/suite/perfschema/t/short_option_2-master.opt new file mode 100644 index 00000000000..5cf7590a1c8 --- /dev/null +++ b/mysql-test/suite/perfschema/t/short_option_2-master.opt @@ -0,0 +1 @@ +-aW5 diff --git a/mysql-test/suite/perfschema/t/short_option_2.test b/mysql-test/suite/perfschema/t/short_option_2.test new file mode 100644 index 00000000000..eb528dfcf72 --- /dev/null +++ b/mysql-test/suite/perfschema/t/short_option_2.test @@ -0,0 +1,29 @@ +# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software Foundation, +# 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA + +# Tests for PERFORMANCE_SCHEMA +# Check server start for short server start options + +select 'Ok, the server started' as result; + +# See the associated -master.opt file. +# -aW5 should be parsed as -a -W5, which are two separate short options +# stuffed inside a single argv[i] argument. + +# Should contain ANSI, since we started the server with -a (stands for --ansi) +select @@SQL_MODE; + +# Should be 5, since we started the server with -W5 +select @@log_warnings; diff --git a/mysql-test/t/ctype_utf16.test b/mysql-test/t/ctype_utf16.test index e9c7e569250..ef705474eee 100644 --- a/mysql-test/t/ctype_utf16.test +++ b/mysql-test/t/ctype_utf16.test @@ -326,6 +326,7 @@ SET collation_connection='utf16_general_ci'; SET NAMES latin1; SET collation_connection='utf16_bin'; -- source include/ctype_filesort.inc +-- source include/ctype_filesort2.inc -- source include/ctype_like_escape.inc # diff --git a/mysql-test/t/ctype_utf32.test b/mysql-test/t/ctype_utf32.test index 668b3b033bd..b03284a1c7c 100644 --- a/mysql-test/t/ctype_utf32.test +++ b/mysql-test/t/ctype_utf32.test @@ -328,6 +328,7 @@ SET collation_connection='utf32_general_ci'; SET NAMES latin1; SET collation_connection='utf32_bin'; -- source include/ctype_filesort.inc +-- source include/ctype_filesort2.inc -- source include/ctype_like_escape.inc # @@ -819,5 +820,16 @@ SELECT * FROM t1; DROP TABLE t1; --echo # +--echo # Bug#42511 mysqld: ctype-ucs2.c:2044: my_strnncollsp_utf32: Assertion (tlen % 4) == 0' faied +--echo # +CREATE TABLE t1 ( + b char(250) CHARACTER SET utf32, + key (b) +) ENGINE=MYISAM; +INSERT INTO t1 VALUES ('d'),('f'); +SELECT * FROM t1 WHERE b BETWEEN 'a' AND 'z'; +DROP TABLE t1; + +--echo # --echo # End of 5.5 tests --echo # diff --git a/mysql-test/t/ctype_utf8mb4.test b/mysql-test/t/ctype_utf8mb4.test index 8fcba92ff47..03696f385b5 100644 --- a/mysql-test/t/ctype_utf8mb4.test +++ b/mysql-test/t/ctype_utf8mb4.test @@ -733,6 +733,7 @@ SET collation_connection='utf8mb4_general_ci'; -- source include/ctype_german.inc SET collation_connection='utf8mb4_bin'; -- source include/ctype_filesort.inc +-- source include/ctype_filesort2.inc -- source include/ctype_like_escape.inc # diff --git a/mysql-test/t/disabled.def b/mysql-test/t/disabled.def index 8a1f91086d2..16842016037 100644 --- a/mysql-test/t/disabled.def +++ b/mysql-test/t/disabled.def @@ -11,6 +11,8 @@ ############################################################################## kill : Bug#37780 2008-12-03 HHunger need some changes to be robust enough for pushbuild. lowercase_table3 : Bug#54845 2010-06-30 alik main.lowercase_table3 on Mac OSX +mysqlhotcopy_myisam : Bug#54129 2010-08-31 alik mysqlhotcopy* fails +mysqlhotcopy_archive : Bug#54129 2010-08-31 alik mysqlhotcopy* fails partition_innodb_plugin : Bug#53307 2010-04-30 VasilDimov valgrind warnings plugin : Bug#55966 2010-08-13 alik "plugin" tests fail in 5.5 plugin_load : Bug#55966 2010-08-13 alik "plugin" tests fail in 5.5 diff --git a/mysql-test/t/handler_read_last.test b/mysql-test/t/handler_read_last.test new file mode 100644 index 00000000000..376829b9baf --- /dev/null +++ b/mysql-test/t/handler_read_last.test @@ -0,0 +1,40 @@ +# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software Foundation, +# 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA + +--disable_warnings +DROP TABLE IF EXISTS t1; +--enable_warnings + +CREATE TABLE t1 (a INT, INDEX (a)); +INSERT INTO t1 VALUES (),(),(),(),(),(),(),(),(),(); + +FLUSH STATUS; +SELECT a FROM t1 ORDER BY a LIMIT 1; +SHOW STATUS LIKE 'HANDLER_READ%'; + +FLUSH STATUS; +SELECT a FROM t1 ORDER BY a DESC LIMIT 1; +SHOW STATUS LIKE 'HANDLER_READ%'; + +FLUSH STATUS; +SELECT a FROM t1 ORDER BY a LIMIT 3; +SHOW STATUS LIKE 'HANDLER_READ%'; + +FLUSH STATUS; +SELECT a FROM t1 ORDER BY a DESC LIMIT 3; +SHOW STATUS LIKE 'HANDLER_READ%'; + +DROP TABLE t1; + |