From c4a4119829756aef666f2244f2e71d09a3bfd885 Mon Sep 17 00:00:00 2001 From: Sven Sandberg Date: Fri, 29 Oct 2010 16:56:58 +0200 Subject: wL#5625: Deprecate mysqlbinlog options --base64-output=always and --base64-output Adds deprecation warning for the mysqlbinlog options --base64-output=always and --base64-output. A warning is printed when the flags are used, and also when running mysqlbinlog --help. client/mysqlbinlog.cc: Give a warning for --base64-output=always and --base64-output, and print warning in mysqlbinlog --help. mysql-test/r/mysqlbinlog.result: updated result file mysql-test/t/mysqlbinlog.test: Test that mysqlbinlog --base64-output=always gives a warning. --- mysql-test/r/mysqlbinlog.result | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'mysql-test/r') diff --git a/mysql-test/r/mysqlbinlog.result b/mysql-test/r/mysqlbinlog.result index 51fad679909..ce83fe5b79b 100644 --- a/mysql-test/r/mysqlbinlog.result +++ b/mysql-test/r/mysqlbinlog.result @@ -879,3 +879,7 @@ ROLLBACK /* added by mysqlbinlog */; /*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; End of 5.0 tests End of 5.1 tests +# Expect deprecation warning. +WARNING: The --base64-output=always flag and the --base64-output flag (with '=MODE' omitted), are deprecated. The output generated when these flags are used cannot be parsed by mysql 5.6.0 and later. The flags will be removed in a future version. Please use --base64-output=auto instead. +# Expect deprecation warning again. +WARNING: The --base64-output=always flag and the --base64-output flag (with '=MODE' omitted), are deprecated. The output generated when these flags are used cannot be parsed by mysql 5.6.0 and later. The flags will be removed in a future version. Please use --base64-output=auto instead. -- cgit v1.2.1 From 20d704978ddb14dee414f40f28bd58f82b21711c Mon Sep 17 00:00:00 2001 From: Gleb Shchepa Date: Sun, 31 Oct 2010 19:04:38 +0300 Subject: Bug #52160: crash and inconsistent results when grouping by a function and column The bugreport reveals two different bugs about grouping on a function: 1) grouping by the TIME_TO_SEC function result caused a server crash or wrong results and 2) grouping by the function returning a blob caused an unexpected "Duplicate entry" error and wrong result. Details for the 1st bug: TIME_TO_SEC() returns NULL if its argument is invalid (empty string for example). Thus its nullability depends not only on the nullability of its arguments but also on their values. Fixed by (overoptimistically) setting TIME_TO_SEC() to be nullable despite the nullability of its arguments. Details for the 2nd bug: The server is unable to create indices on blobs without explicit blob key part length. However, this fact was ignored for blob function result fields of GROUP BY intermediate tables. Fixed by disabling GROUP BY index creation for blob function result fields like regular blob fields. mysql-test/r/func_time.result: Test case for bug #52160. mysql-test/r/type_blob.result: Test case for bug #52160. mysql-test/t/func_time.test: Test case for bug #52160. mysql-test/t/type_blob.test: Test case for bug #52160. sql/item_timefunc.h: Bug #52160: crash and inconsistent results when grouping by a function and column TIME_TO_SEC() returns NULL if its argument is invalid (empty string for example). Thus its nullability depends not only Fixed by (overoptimistically) setting TIME_TO_SEC() to be nullable despite the nullability of its arguments. sql/sql_select.cc: Bug #52160: crash and inconsistent results when grouping by a function and column The server is unable to create indices on blobs without explicit blob key part length. However, this fact was ignored for blob function result fields of GROUP BY intermediate tables. Fixed by disabling GROUP BY index creation for blob function result fields like regular blob fields. --- mysql-test/r/func_time.result | 14 ++++++++++++++ mysql-test/r/type_blob.result | 11 +++++++++++ 2 files changed, 25 insertions(+) (limited to 'mysql-test/r') diff --git a/mysql-test/r/func_time.result b/mysql-test/r/func_time.result index 4ff4cfa586b..48e837f180f 100644 --- a/mysql-test/r/func_time.result +++ b/mysql-test/r/func_time.result @@ -1343,4 +1343,18 @@ SELECT 1 FROM t1 ORDER BY @x:=makedate(a,a); 1 1 DROP TABLE t1; +# +# Bug #52160: crash and inconsistent results when grouping +# by a function and column +# +CREATE TABLE t1(a CHAR(10) NOT NULL); +INSERT INTO t1 VALUES (''),(''); +SELECT COUNT(*) FROM t1 GROUP BY TIME_TO_SEC(a); +COUNT(*) +2 +Warnings: +Warning 1292 Truncated incorrect time value: '' +Warning 1292 Truncated incorrect time value: '' +Warning 1292 Truncated incorrect time value: '' +DROP TABLE t1; End of 5.1 tests diff --git a/mysql-test/r/type_blob.result b/mysql-test/r/type_blob.result index 08c30d884fd..e6fd49b4247 100644 --- a/mysql-test/r/type_blob.result +++ b/mysql-test/r/type_blob.result @@ -974,3 +974,14 @@ ERROR 42000: Display width out of range for column 'cast as char' (max = 4294967 explain select convert(1, binary(999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999)); ERROR 42000: Display width out of range for column 'cast as char' (max = 4294967295) End of 5.0 tests +# Bug #52160: crash and inconsistent results when grouping +# by a function and column +CREATE FUNCTION f1() RETURNS TINYBLOB RETURN 1; +CREATE TABLE t1(a CHAR(1)); +INSERT INTO t1 VALUES ('0'), ('0'); +SELECT COUNT(*) FROM t1 GROUP BY f1(), a; +COUNT(*) +2 +DROP FUNCTION f1; +DROP TABLE t1; +End of 5.1 tests -- cgit v1.2.1 From 00f1e71d9ab02ca4b7b47b194a122afd88bad7f3 Mon Sep 17 00:00:00 2001 From: Georgi Kodinov Date: Tue, 2 Nov 2010 17:45:26 +0200 Subject: Bug #57916: Fix the naming of the proxy_priv table 1. Fixed the name of the table to proxies_priv 2. Fixed the column names to be of the form Capitalized_lowecarse instead of Capitalized_Capitalized 3. Added Timestamp and Grantor columns 4. Added tests to plugin_auth to check the table structure 5. Updated the existing tests --- mysql-test/r/1st.result | 2 +- mysql-test/r/connect.result | 6 +++--- mysql-test/r/information_schema.result | 2 +- mysql-test/r/log_tables_upgrade.result | 2 +- mysql-test/r/mysql_upgrade.result | 12 ++++++------ mysql-test/r/mysql_upgrade_ssl.result | 2 +- mysql-test/r/mysqlcheck.result | 8 ++++---- mysql-test/r/plugin_auth.result | 24 ++++++++++++++++++++++-- mysql-test/r/system_mysql_db.result | 2 +- 9 files changed, 40 insertions(+), 20 deletions(-) (limited to 'mysql-test/r') diff --git a/mysql-test/r/1st.result b/mysql-test/r/1st.result index e8562662bfd..792d9eaf2f1 100644 --- a/mysql-test/r/1st.result +++ b/mysql-test/r/1st.result @@ -21,7 +21,7 @@ ndb_binlog_index plugin proc procs_priv -proxy_priv +proxies_priv servers slow_log tables_priv diff --git a/mysql-test/r/connect.result b/mysql-test/r/connect.result index bbd0273c1c6..b21956252d2 100644 --- a/mysql-test/r/connect.result +++ b/mysql-test/r/connect.result @@ -15,7 +15,7 @@ ndb_binlog_index plugin proc procs_priv -proxy_priv +proxies_priv servers slow_log tables_priv @@ -49,7 +49,7 @@ ndb_binlog_index plugin proc procs_priv -proxy_priv +proxies_priv servers slow_log tables_priv @@ -91,7 +91,7 @@ ndb_binlog_index plugin proc procs_priv -proxy_priv +proxies_priv servers slow_log tables_priv diff --git a/mysql-test/r/information_schema.result b/mysql-test/r/information_schema.result index bab60774b32..1418af5b813 100644 --- a/mysql-test/r/information_schema.result +++ b/mysql-test/r/information_schema.result @@ -88,7 +88,7 @@ host plugin proc procs_priv -proxy_priv +proxies_priv servers slow_log tables_priv diff --git a/mysql-test/r/log_tables_upgrade.result b/mysql-test/r/log_tables_upgrade.result index 13b08c2e771..7d15005e143 100644 --- a/mysql-test/r/log_tables_upgrade.result +++ b/mysql-test/r/log_tables_upgrade.result @@ -27,7 +27,7 @@ mysql.ndb_binlog_index OK mysql.plugin OK mysql.proc OK mysql.procs_priv OK -mysql.proxy_priv OK +mysql.proxies_priv OK mysql.renamed_general_log OK mysql.servers OK mysql.slow_log OK diff --git a/mysql-test/r/mysql_upgrade.result b/mysql-test/r/mysql_upgrade.result index f705db3e509..e36b4781ddf 100644 --- a/mysql-test/r/mysql_upgrade.result +++ b/mysql-test/r/mysql_upgrade.result @@ -15,7 +15,7 @@ mysql.ndb_binlog_index OK mysql.plugin OK mysql.proc OK mysql.procs_priv OK -mysql.proxy_priv OK +mysql.proxies_priv OK mysql.servers OK mysql.slow_log OK mysql.tables_priv OK @@ -44,7 +44,7 @@ mysql.ndb_binlog_index OK mysql.plugin OK mysql.proc OK mysql.procs_priv OK -mysql.proxy_priv OK +mysql.proxies_priv OK mysql.servers OK mysql.slow_log OK mysql.tables_priv OK @@ -73,7 +73,7 @@ mysql.ndb_binlog_index OK mysql.plugin OK mysql.proc OK mysql.procs_priv OK -mysql.proxy_priv OK +mysql.proxies_priv OK mysql.servers OK mysql.slow_log OK mysql.tables_priv OK @@ -104,7 +104,7 @@ mysql.ndb_binlog_index OK mysql.plugin OK mysql.proc OK mysql.procs_priv OK -mysql.proxy_priv OK +mysql.proxies_priv OK mysql.servers OK mysql.slow_log OK mysql.tables_priv OK @@ -139,7 +139,7 @@ mysql.ndb_binlog_index OK mysql.plugin OK mysql.proc OK mysql.procs_priv OK -mysql.proxy_priv OK +mysql.proxies_priv OK mysql.servers OK mysql.slow_log OK mysql.tables_priv OK @@ -177,7 +177,7 @@ mysql.ndb_binlog_index OK mysql.plugin OK mysql.proc OK mysql.procs_priv OK -mysql.proxy_priv OK +mysql.proxies_priv OK mysql.servers OK mysql.slow_log OK mysql.tables_priv OK diff --git a/mysql-test/r/mysql_upgrade_ssl.result b/mysql-test/r/mysql_upgrade_ssl.result index 694eb1e7d88..4cc8b6ab44b 100644 --- a/mysql-test/r/mysql_upgrade_ssl.result +++ b/mysql-test/r/mysql_upgrade_ssl.result @@ -17,7 +17,7 @@ mysql.ndb_binlog_index OK mysql.plugin OK mysql.proc OK mysql.procs_priv OK -mysql.proxy_priv OK +mysql.proxies_priv OK mysql.servers OK mysql.slow_log OK mysql.tables_priv OK diff --git a/mysql-test/r/mysqlcheck.result b/mysql-test/r/mysqlcheck.result index 241c92f0aa6..ef46eba5ccb 100644 --- a/mysql-test/r/mysqlcheck.result +++ b/mysql-test/r/mysqlcheck.result @@ -18,7 +18,7 @@ mysql.ndb_binlog_index OK mysql.plugin OK mysql.proc OK mysql.procs_priv OK -mysql.proxy_priv OK +mysql.proxies_priv OK mysql.servers OK mysql.slow_log note : The storage engine for the table doesn't support analyze @@ -46,7 +46,7 @@ mysql.ndb_binlog_index OK mysql.plugin OK mysql.proc OK mysql.procs_priv OK -mysql.proxy_priv OK +mysql.proxies_priv OK mysql.servers OK mysql.slow_log note : The storage engine for the table doesn't support optimize @@ -72,7 +72,7 @@ mysql.ndb_binlog_index OK mysql.plugin OK mysql.proc OK mysql.procs_priv OK -mysql.proxy_priv OK +mysql.proxies_priv OK mysql.servers OK mysql.slow_log note : The storage engine for the table doesn't support analyze @@ -98,7 +98,7 @@ mysql.ndb_binlog_index Table is already up to date mysql.plugin Table is already up to date mysql.proc Table is already up to date mysql.procs_priv Table is already up to date -mysql.proxy_priv Table is already up to date +mysql.proxies_priv Table is already up to date mysql.servers Table is already up to date mysql.slow_log note : The storage engine for the table doesn't support optimize diff --git a/mysql-test/r/plugin_auth.result b/mysql-test/r/plugin_auth.result index 54467b78f19..d56a4e5326a 100644 --- a/mysql-test/r/plugin_auth.result +++ b/mysql-test/r/plugin_auth.result @@ -11,6 +11,26 @@ test_plugin_server plug_dest ## test plugin auth ERROR 28000: Access denied for user 'plug'@'localhost' (using password: YES) GRANT PROXY ON plug_dest TO plug; +test proxies_priv columns +SELECT * FROM mysql.proxies_priv; +Host User Proxied_host Proxied_user With_grant Grantor Timestamp +localhost root 1 xx +unknown root 1 xx +% plug % plug_dest 0 root@localhost xx +test mysql.proxies_priv; +SHOW CREATE TABLE mysql.proxies_priv; +Table Create Table +proxies_priv CREATE TABLE `proxies_priv` ( + `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '', + `User` char(16) COLLATE utf8_bin NOT NULL DEFAULT '', + `Proxied_host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '', + `Proxied_user` char(16) COLLATE utf8_bin NOT NULL DEFAULT '', + `With_grant` tinyint(1) NOT NULL DEFAULT '0', + `Grantor` char(77) COLLATE utf8_bin NOT NULL DEFAULT '', + `Timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`Host`,`User`,`Proxied_host`,`Proxied_user`), + KEY `Grantor` (`Grantor`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='User proxy privileges' select USER(),CURRENT_USER(); USER() CURRENT_USER() plug@localhost plug_dest@% @@ -146,8 +166,8 @@ Grants for test_drop@localhost GRANT USAGE ON *.* TO 'test_drop'@'localhost' GRANT PROXY ON 'future_user'@'%' TO 'test_drop'@'localhost' DROP USER test_drop@localhost; -SELECT * FROM mysql.proxy_priv WHERE Host = 'test_drop' AND User = 'localhost'; -Host User Proxied_Host Proxied_User With_Grant +SELECT * FROM mysql.proxies_priv WHERE Host = 'test_drop' AND User = 'localhost'; +Host User Proxied_host Proxied_user With_grant Grantor Timestamp DROP USER proxy_admin; DROP USER grant_plug,grant_plug_dest,grant_plug_dest2; ## END GRANT PROXY tests diff --git a/mysql-test/r/system_mysql_db.result b/mysql-test/r/system_mysql_db.result index e82cf229912..0028f2ce5c1 100644 --- a/mysql-test/r/system_mysql_db.result +++ b/mysql-test/r/system_mysql_db.result @@ -14,7 +14,7 @@ ndb_binlog_index plugin proc procs_priv -proxy_priv +proxies_priv servers slow_log tables_priv -- cgit v1.2.1 From 74328892e0f28c1b1a410df1889225639cb9152b Mon Sep 17 00:00:00 2001 From: Georgi Kodinov Date: Wed, 3 Nov 2010 13:47:22 +0200 Subject: Addendum to bug #57916 : fixed the test suite to be less environment dependent. --- mysql-test/r/plugin_auth.result | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'mysql-test/r') diff --git a/mysql-test/r/plugin_auth.result b/mysql-test/r/plugin_auth.result index d56a4e5326a..7119ba11077 100644 --- a/mysql-test/r/plugin_auth.result +++ b/mysql-test/r/plugin_auth.result @@ -14,9 +14,9 @@ GRANT PROXY ON plug_dest TO plug; test proxies_priv columns SELECT * FROM mysql.proxies_priv; Host User Proxied_host Proxied_user With_grant Grantor Timestamp -localhost root 1 xx -unknown root 1 xx -% plug % plug_dest 0 root@localhost xx +xx root 1 xx +xx root 1 xx +xx plug % plug_dest 0 root@localhost xx test mysql.proxies_priv; SHOW CREATE TABLE mysql.proxies_priv; Table Create Table -- cgit v1.2.1 From 1602ffb8ab4e04d17db995a22bb6c33a5a638881 Mon Sep 17 00:00:00 2001 From: Luis Soares Date: Wed, 3 Nov 2010 14:51:52 +0000 Subject: BUG#57899: Certain reserved words should not be reserved In MySQL 5.5 the new reserved words include: SLOW as in FLUSH SLOW LOGS GENERAL as in FLUSH GENERAL LOGS IGNORE_SERVER_IDS as in CHANGE MASTER ... IGNORE_SERVER_IDS MASTER_HEARTBEAT_PERIOD as in CHANGE MASTER ... MASTER_HEARTBEAT_PERIOD These are not reserved words in standard SQL, or in Oracle 11g, and as such, may affect existing applications. We fix this by adding the new words to the list of keywords that are allowed for labels in SPs. mysql-test/t/keywords.test: Test case that checks that the target words can be used for naming fields in a table or as local routine variable names. --- mysql-test/r/keywords.result | 224 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 224 insertions(+) (limited to 'mysql-test/r') diff --git a/mysql-test/r/keywords.result b/mysql-test/r/keywords.result index 5f338ad6a62..977fe7791b9 100644 --- a/mysql-test/r/keywords.result +++ b/mysql-test/r/keywords.result @@ -45,3 +45,227 @@ p1 max=1 drop procedure p1; drop table t1; +CREATE TABLE slow (slow INT, general INT, master_heartbeat_period INT, ignore_server_ids INT); +INSERT INTO slow(slow, general, master_heartbeat_period, ignore_server_ids) VALUES (1,2,3,4), (5,6,7,8); +INSERT INTO slow(slow, general, master_heartbeat_period) VALUES (1,2,3), (5,6,7); +INSERT INTO slow(slow, general) VALUES (1,2), (5,6); +INSERT INTO slow(slow) VALUES (1), (5); +SELECT slow, general, master_heartbeat_period, slow FROM slow ORDER BY slow; +slow general master_heartbeat_period slow +1 2 3 1 +1 2 3 1 +1 2 NULL 1 +1 NULL NULL 1 +5 6 7 5 +5 6 7 5 +5 6 NULL 5 +5 NULL NULL 5 +SELECT slow, general, master_heartbeat_period FROM slow ORDER BY slow; +slow general master_heartbeat_period +1 2 3 +1 2 3 +1 2 NULL +1 NULL NULL +5 6 7 +5 6 7 +5 6 NULL +5 NULL NULL +SELECT slow, master_heartbeat_period FROM slow ORDER BY slow; +slow master_heartbeat_period +1 3 +1 3 +1 NULL +1 NULL +5 7 +5 7 +5 NULL +5 NULL +SELECT slow FROM slow ORDER BY slow; +slow +1 +1 +1 +1 +5 +5 +5 +5 +DROP TABLE slow; +CREATE TABLE general (slow INT, general INT, master_heartbeat_period INT, ignore_server_ids INT); +INSERT INTO general(slow, general, master_heartbeat_period, ignore_server_ids) VALUES (1,2,3,4), (5,6,7,8); +INSERT INTO general(slow, general, master_heartbeat_period) VALUES (1,2,3), (5,6,7); +INSERT INTO general(slow, general) VALUES (1,2), (5,6); +INSERT INTO general(slow) VALUES (1), (5); +SELECT slow, general, master_heartbeat_period, slow FROM general ORDER BY slow; +slow general master_heartbeat_period slow +1 2 3 1 +1 2 3 1 +1 2 NULL 1 +1 NULL NULL 1 +5 6 7 5 +5 6 7 5 +5 6 NULL 5 +5 NULL NULL 5 +SELECT slow, general, master_heartbeat_period FROM general ORDER BY slow; +slow general master_heartbeat_period +1 2 3 +1 2 3 +1 2 NULL +1 NULL NULL +5 6 7 +5 6 7 +5 6 NULL +5 NULL NULL +SELECT slow, master_heartbeat_period FROM general ORDER BY slow; +slow master_heartbeat_period +1 3 +1 3 +1 NULL +1 NULL +5 7 +5 7 +5 NULL +5 NULL +SELECT slow FROM general ORDER BY slow; +slow +1 +1 +1 +1 +5 +5 +5 +5 +DROP TABLE general; +CREATE TABLE master_heartbeat_period (slow INT, general INT, master_heartbeat_period INT, ignore_server_ids INT); +INSERT INTO master_heartbeat_period(slow, general, master_heartbeat_period, ignore_server_ids) VALUES (1,2,3,4), (5,6,7,8); +INSERT INTO master_heartbeat_period(slow, general, master_heartbeat_period) VALUES (1,2,3), (5,6,7); +INSERT INTO master_heartbeat_period(slow, general) VALUES (1,2), (5,6); +INSERT INTO master_heartbeat_period(slow) VALUES (1), (5); +SELECT slow, general, master_heartbeat_period, slow FROM master_heartbeat_period ORDER BY slow; +slow general master_heartbeat_period slow +1 2 3 1 +1 2 3 1 +1 2 NULL 1 +1 NULL NULL 1 +5 6 7 5 +5 6 7 5 +5 6 NULL 5 +5 NULL NULL 5 +SELECT slow, general, master_heartbeat_period FROM master_heartbeat_period ORDER BY slow; +slow general master_heartbeat_period +1 2 3 +1 2 3 +1 2 NULL +1 NULL NULL +5 6 7 +5 6 7 +5 6 NULL +5 NULL NULL +SELECT slow, master_heartbeat_period FROM master_heartbeat_period ORDER BY slow; +slow master_heartbeat_period +1 3 +1 3 +1 NULL +1 NULL +5 7 +5 7 +5 NULL +5 NULL +SELECT slow FROM master_heartbeat_period ORDER BY slow; +slow +1 +1 +1 +1 +5 +5 +5 +5 +DROP TABLE master_heartbeat_period; +CREATE TABLE ignore_server_ids (slow INT, general INT, master_heartbeat_period INT, ignore_server_ids INT); +INSERT INTO ignore_server_ids(slow, general, master_heartbeat_period, ignore_server_ids) VALUES (1,2,3,4), (5,6,7,8); +INSERT INTO ignore_server_ids(slow, general, master_heartbeat_period) VALUES (1,2,3), (5,6,7); +INSERT INTO ignore_server_ids(slow, general) VALUES (1,2), (5,6); +INSERT INTO ignore_server_ids(slow) VALUES (1), (5); +SELECT slow, general, master_heartbeat_period, slow FROM ignore_server_ids ORDER BY slow; +slow general master_heartbeat_period slow +1 2 3 1 +1 2 3 1 +1 2 NULL 1 +1 NULL NULL 1 +5 6 7 5 +5 6 7 5 +5 6 NULL 5 +5 NULL NULL 5 +SELECT slow, general, master_heartbeat_period FROM ignore_server_ids ORDER BY slow; +slow general master_heartbeat_period +1 2 3 +1 2 3 +1 2 NULL +1 NULL NULL +5 6 7 +5 6 7 +5 6 NULL +5 NULL NULL +SELECT slow, master_heartbeat_period FROM ignore_server_ids ORDER BY slow; +slow master_heartbeat_period +1 3 +1 3 +1 NULL +1 NULL +5 7 +5 7 +5 NULL +5 NULL +SELECT slow FROM ignore_server_ids ORDER BY slow; +slow +1 +1 +1 +1 +5 +5 +5 +5 +DROP TABLE ignore_server_ids; +CREATE TABLE t1 (slow INT, general INT, ignore_server_ids INT, master_heartbeat_period INT); +INSERT INTO t1 VALUES (1,2,3,4); +CREATE PROCEDURE p1() +BEGIN +DECLARE slow INT; +DECLARE general INT; +DECLARE ignore_server_ids INT; +DECLARE master_heartbeat_period INT; +SELECT max(t1.slow) INTO slow FROM t1; +SELECT max(t1.general) INTO general FROM t1; +SELECT max(t1.ignore_server_ids) INTO ignore_server_ids FROM t1; +SELECT max(t1.master_heartbeat_period) INTO master_heartbeat_period FROM t1; +SELECT slow, general, ignore_server_ids, master_heartbeat_period; +END| +CREATE PROCEDURE p2() +BEGIN +DECLARE n INT DEFAULT 2; +general: WHILE n > 0 DO +SET n = n -1; +END WHILE general; +SET n = 2; +slow: WHILE n > 0 DO +SET n = n -1; +END WHILE slow; +SET n = 2; +ignore_server_ids: WHILE n > 0 DO +SET n = n -1; +END WHILE ignore_server_ids; +SET n = 2; +master_heartbeat_period: WHILE n > 0 DO +SET n = n -1; +END WHILE master_heartbeat_period; +END| +CALL p1(); +slow general ignore_server_ids master_heartbeat_period +1 2 3 4 +call p2(); +DROP PROCEDURE p1; +DROP PROCEDURE p2; +DROP TABLE t1; -- cgit v1.2.1 From 64bee6fdc5a16bacc6e290e586038ac338b1ed69 Mon Sep 17 00:00:00 2001 From: Jorgen Loland Date: Thu, 4 Nov 2010 09:36:04 +0100 Subject: Bug#57882 - Item_func_conv_charset::val_str(String*): Assertion `fixed == 1' failed (also fixes duplicate bug 57515) agg_item_set_converter() (item.cc) handles conversion of character sets by creating a new Item. fix_fields() is then called on this newly created item. Prior to this patch, it was not checked whether fix_fields() was successful or not. Thus, agg_item_set_converter() would return success even when an error occured. This patch makes it return error (TRUE) if fix_fields() fails. mysql-test/r/errors.result: Add test for BUG#57882 mysql-test/t/errors.test: Add test for BUG#57882 sql/item.cc: Make agg_item_set_converter() return with error if fix_fields() on the newly created converted item fails. --- mysql-test/r/errors.result | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'mysql-test/r') diff --git a/mysql-test/r/errors.result b/mysql-test/r/errors.result index 3d247a242a3..43cabd28498 100644 --- a/mysql-test/r/errors.result +++ b/mysql-test/r/errors.result @@ -134,3 +134,15 @@ INSERT INTO t1 VALUES ('abc\0\0'); INSERT INTO t1 VALUES ('abc\0\0'); ERROR 23000: Duplicate entry 'abc\x00\x00' for key 'PRIMARY' DROP TABLE t1; +# +# Bug#57882: Item_func_conv_charset::val_str(String*): +# Assertion `fixed == 1' failed +# +SELECT (CONVERT('0' USING latin1) IN (CHAR(COT('v') USING utf8),'')); +ERROR 22003: DOUBLE value is out of range in 'cot('v')' +SET NAMES utf8 COLLATE utf8_latvian_ci ; +SELECT UPDATEXML(-73 * -2465717823867977728,@@global.slave_net_timeout,null); +ERROR 22003: BIGINT value is out of range in '(-(73) * -(2465717823867977728))' +# +# End Bug#57882 +# -- cgit v1.2.1 From f0ce67873cd2eb2b6eb30ba1ecb0d3df5206d5a0 Mon Sep 17 00:00:00 2001 From: Jorgen Loland Date: Thu, 4 Nov 2010 13:36:36 +0100 Subject: Bug#57882 - Item_func_conv_charset::val_str(String*): Assertion `fixed == 1' failed Followup patch. Test case relied on system variable that is only available if replication is compiled in. Replaced with variable available in all builds. mysql-test/r/errors.result: Test case relied on system variable that is only available if replication is compiled in. Replaced with variable available in all builds. mysql-test/t/errors.test: Test case relied on system variable that is only available if replication is compiled in. Replaced with variable available in all builds. --- mysql-test/r/errors.result | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mysql-test/r') diff --git a/mysql-test/r/errors.result b/mysql-test/r/errors.result index 43cabd28498..e6a1b492b39 100644 --- a/mysql-test/r/errors.result +++ b/mysql-test/r/errors.result @@ -141,7 +141,7 @@ DROP TABLE t1; SELECT (CONVERT('0' USING latin1) IN (CHAR(COT('v') USING utf8),'')); ERROR 22003: DOUBLE value is out of range in 'cot('v')' SET NAMES utf8 COLLATE utf8_latvian_ci ; -SELECT UPDATEXML(-73 * -2465717823867977728,@@global.slave_net_timeout,null); +SELECT UPDATEXML(-73 * -2465717823867977728,@@global.auto_increment_increment,null); ERROR 22003: BIGINT value is out of range in '(-(73) * -(2465717823867977728))' # # End Bug#57882 -- cgit v1.2.1 From aafb35d09975170b6162a9bcd3b2c35cdb78579d Mon Sep 17 00:00:00 2001 From: Luis Soares Date: Fri, 5 Nov 2010 08:23:39 +0000 Subject: BUG#57899: Certain reserved words should not be reserved Small fix for the test case. The column named "slow" was used twice in the SELECTs. As a consequence, the column named "ignore_server_ids" was not used. To fix this we simply replace the second column selected named "slow" with a column named "ignore_server_ids". --- mysql-test/r/keywords.result | 80 ++++++++++++++++++++++---------------------- 1 file changed, 40 insertions(+), 40 deletions(-) (limited to 'mysql-test/r') diff --git a/mysql-test/r/keywords.result b/mysql-test/r/keywords.result index 977fe7791b9..58cb7430563 100644 --- a/mysql-test/r/keywords.result +++ b/mysql-test/r/keywords.result @@ -50,16 +50,16 @@ INSERT INTO slow(slow, general, master_heartbeat_period, ignore_server_ids) VALU INSERT INTO slow(slow, general, master_heartbeat_period) VALUES (1,2,3), (5,6,7); INSERT INTO slow(slow, general) VALUES (1,2), (5,6); INSERT INTO slow(slow) VALUES (1), (5); -SELECT slow, general, master_heartbeat_period, slow FROM slow ORDER BY slow; -slow general master_heartbeat_period slow -1 2 3 1 -1 2 3 1 -1 2 NULL 1 -1 NULL NULL 1 -5 6 7 5 -5 6 7 5 -5 6 NULL 5 -5 NULL NULL 5 +SELECT slow, general, master_heartbeat_period, ignore_server_ids FROM slow ORDER BY slow; +slow general master_heartbeat_period ignore_server_ids +1 2 3 4 +1 2 3 NULL +1 2 NULL NULL +1 NULL NULL NULL +5 6 7 8 +5 6 7 NULL +5 6 NULL NULL +5 NULL NULL NULL SELECT slow, general, master_heartbeat_period FROM slow ORDER BY slow; slow general master_heartbeat_period 1 2 3 @@ -96,16 +96,16 @@ INSERT INTO general(slow, general, master_heartbeat_period, ignore_server_ids) V INSERT INTO general(slow, general, master_heartbeat_period) VALUES (1,2,3), (5,6,7); INSERT INTO general(slow, general) VALUES (1,2), (5,6); INSERT INTO general(slow) VALUES (1), (5); -SELECT slow, general, master_heartbeat_period, slow FROM general ORDER BY slow; -slow general master_heartbeat_period slow -1 2 3 1 -1 2 3 1 -1 2 NULL 1 -1 NULL NULL 1 -5 6 7 5 -5 6 7 5 -5 6 NULL 5 -5 NULL NULL 5 +SELECT slow, general, master_heartbeat_period, ignore_server_ids FROM general ORDER BY slow; +slow general master_heartbeat_period ignore_server_ids +1 2 3 4 +1 2 3 NULL +1 2 NULL NULL +1 NULL NULL NULL +5 6 7 8 +5 6 7 NULL +5 6 NULL NULL +5 NULL NULL NULL SELECT slow, general, master_heartbeat_period FROM general ORDER BY slow; slow general master_heartbeat_period 1 2 3 @@ -142,16 +142,16 @@ INSERT INTO master_heartbeat_period(slow, general, master_heartbeat_period, igno INSERT INTO master_heartbeat_period(slow, general, master_heartbeat_period) VALUES (1,2,3), (5,6,7); INSERT INTO master_heartbeat_period(slow, general) VALUES (1,2), (5,6); INSERT INTO master_heartbeat_period(slow) VALUES (1), (5); -SELECT slow, general, master_heartbeat_period, slow FROM master_heartbeat_period ORDER BY slow; -slow general master_heartbeat_period slow -1 2 3 1 -1 2 3 1 -1 2 NULL 1 -1 NULL NULL 1 -5 6 7 5 -5 6 7 5 -5 6 NULL 5 -5 NULL NULL 5 +SELECT slow, general, master_heartbeat_period, ignore_server_ids FROM master_heartbeat_period ORDER BY slow; +slow general master_heartbeat_period ignore_server_ids +1 2 3 4 +1 2 3 NULL +1 2 NULL NULL +1 NULL NULL NULL +5 6 7 8 +5 6 7 NULL +5 6 NULL NULL +5 NULL NULL NULL SELECT slow, general, master_heartbeat_period FROM master_heartbeat_period ORDER BY slow; slow general master_heartbeat_period 1 2 3 @@ -188,16 +188,16 @@ INSERT INTO ignore_server_ids(slow, general, master_heartbeat_period, ignore_ser INSERT INTO ignore_server_ids(slow, general, master_heartbeat_period) VALUES (1,2,3), (5,6,7); INSERT INTO ignore_server_ids(slow, general) VALUES (1,2), (5,6); INSERT INTO ignore_server_ids(slow) VALUES (1), (5); -SELECT slow, general, master_heartbeat_period, slow FROM ignore_server_ids ORDER BY slow; -slow general master_heartbeat_period slow -1 2 3 1 -1 2 3 1 -1 2 NULL 1 -1 NULL NULL 1 -5 6 7 5 -5 6 7 5 -5 6 NULL 5 -5 NULL NULL 5 +SELECT slow, general, master_heartbeat_period, ignore_server_ids FROM ignore_server_ids ORDER BY slow; +slow general master_heartbeat_period ignore_server_ids +1 2 3 4 +1 2 3 NULL +1 2 NULL NULL +1 NULL NULL NULL +5 6 7 8 +5 6 7 NULL +5 6 NULL NULL +5 NULL NULL NULL SELECT slow, general, master_heartbeat_period FROM ignore_server_ids ORDER BY slow; slow general master_heartbeat_period 1 2 3 -- cgit v1.2.1 From c04318ed243fd85eeb7256399516a9189e12a0b0 Mon Sep 17 00:00:00 2001 From: Mattias Jonsson Date: Fri, 5 Nov 2010 12:01:10 +0100 Subject: Bug#57778: failed primary key add to partitioned innodb table inconsistent and crashes It was possible to issue an ALTER TABLE ADD PRIMARY KEY on an partitioned InnoDB table that failed and crashed the server. The problem was that it succeeded to create the PK on at least one partition, and then failed on a subsequent partition, due to duplicate key violation. Since the partitions that already had added the PK was not reverted all partitions was not consistent with the table definition, which caused the crash. The solution was to add a revert step to ha_partition::add_index() that dropped the index for the already succeeded partitions, on failure. mysql-test/r/partition.result: updated result mysql-test/t/partition.test: Added test sql/ha_partition.cc: Only allow ADD/DROP flags in pairs, so that they can be reverted on failures. If add_index() fails for a partition, revert (drop the index) for the previous partitions. sql/handler.h: Added some extra info in a comment. --- mysql-test/r/partition.result | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) (limited to 'mysql-test/r') diff --git a/mysql-test/r/partition.result b/mysql-test/r/partition.result index 80676c0d324..a639f9e6b3b 100644 --- a/mysql-test/r/partition.result +++ b/mysql-test/r/partition.result @@ -1,5 +1,38 @@ drop table if exists t1, t2; # +# Bug#57778: failed primary key add to partitioned innodb table +# inconsistent and crashes +# +CREATE TABLE t1 (a INT NOT NULL, b INT NOT NULL) +PARTITION BY KEY (a) PARTITIONS 2; +INSERT INTO t1 VALUES (0,1), (0,2); +ALTER TABLE t1 ADD PRIMARY KEY (a); +ERROR 23000: Duplicate entry '0' for key 'PRIMARY' +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) NOT NULL, + `b` int(11) NOT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +/*!50100 PARTITION BY KEY (a) +PARTITIONS 2 */ +SELECT * FROM t1; +a b +0 1 +0 2 +UPDATE t1 SET a = 1, b = 1 WHERE a = 0 AND b = 2; +ALTER TABLE t1 ADD PRIMARY KEY (a); +SELECT * FROM t1; +a b +1 1 +0 1 +ALTER TABLE t1 DROP PRIMARY KEY; +SELECT * FROM t1; +a b +1 1 +0 1 +DROP TABLE t1; +# # Bug#57113: ha_partition::extra(ha_extra_function): # Assertion `m_extra_cache' failed CREATE TABLE t1 -- cgit v1.2.1 From 03b9e73878c8953d8228dfefb0a14d4c09756cf3 Mon Sep 17 00:00:00 2001 From: Guilhem Bichot Date: Fri, 5 Nov 2010 14:16:27 +0100 Subject: Fix for BUG#57316 "It is not clear how to disable autocommit" add boolean command-line option --autocommit. mysql-test/mysql-test-run.pl: do in --gdb like in --ddd: to let the developer debug the startup phase (like command-line options parsing), don't "run". It's the third time I do this change, it was previously lost by merges, port of 6.0 to next-mr... mysql-test/r/mysqld--help-notwin.result: new command-line option mysql-test/r/mysqld--help-win.result: a Linux user's best guess at what the Windows result should be mysql-test/suite/sys_vars/inc/autocommit_func2.inc: new test mysql-test/suite/sys_vars/t/autocommit_func2-master.opt: test new option mysql-test/suite/sys_vars/t/autocommit_func3-master.opt: test new option sql/mysqld.cc: new --autocommit sql/mysqld.h: new --autocommit sql/sql_partition.cc: What matters to this partitioning quote is to have the OPTION_QUOTE_SHOW_CREATE flag down, it's all that append_identifier() uses. So we make it explicit. --- mysql-test/r/mysqld--help-notwin.result | 1 + mysql-test/r/mysqld--help-win.result | 1 + 2 files changed, 2 insertions(+) (limited to 'mysql-test/r') diff --git a/mysql-test/r/mysqld--help-notwin.result b/mysql-test/r/mysqld--help-notwin.result index 63e17e1c188..fc269e1dd82 100644 --- a/mysql-test/r/mysqld--help-notwin.result +++ b/mysql-test/r/mysqld--help-notwin.result @@ -19,6 +19,7 @@ The following options may be given as the first argument: --auto-increment-offset[=#] Offset added to Auto-increment columns. Used when auto-increment-increment != 1 + --autocommit Set default value for autocommit (0 or 1) --automatic-sp-privileges Creating and dropping stored procedures alters ACLs (Defaults to on; use --skip-automatic-sp-privileges to disable.) diff --git a/mysql-test/r/mysqld--help-win.result b/mysql-test/r/mysqld--help-win.result index c5996981e92..c5d7bb458c3 100644 --- a/mysql-test/r/mysqld--help-win.result +++ b/mysql-test/r/mysqld--help-win.result @@ -19,6 +19,7 @@ The following options may be given as the first argument: --auto-increment-offset[=#] Offset added to Auto-increment columns. Used when auto-increment-increment != 1 + --autocommit Set default value for autocommit (0 or 1) --automatic-sp-privileges Creating and dropping stored procedures alters ACLs (Defaults to on; use --skip-automatic-sp-privileges to disable.) -- cgit v1.2.1 From 8f237f5874a814daaa7431748849997d1a2aa8ea Mon Sep 17 00:00:00 2001 From: Dmitry Shulga Date: Sun, 7 Nov 2010 23:42:54 +0600 Subject: A fix and a test case for Bug#47924 -main.log_tables times out sporadically. The cause of the sporadic time out was a leaking protection against the global read lock, taken by the RENAME statement, and not released in case of an error occurred during RENAME. The leaking protection counter would lead to the value of protect_against_global_read never dropping to 0. Consequently FLUSH TABLES in all connections, including the one that leaked the protection, could not proceed. The fix is to ensure that all branchesin RENAME code properly release GRL protection. mysql-test/r/log_tables.result: Added results for test for bug#47924. mysql-test/t/log_tables.test: Added test for bug#47924. sql/sql_rename.cc: mysql_rename_tables() modified: replaced return from function to goto to clean up code block in case of error. --- mysql-test/r/log_tables.result | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'mysql-test/r') diff --git a/mysql-test/r/log_tables.result b/mysql-test/r/log_tables.result index f8321520880..fcde09db7c5 100644 --- a/mysql-test/r/log_tables.result +++ b/mysql-test/r/log_tables.result @@ -899,6 +899,16 @@ TIMESTAMP 1 1 SELECT SQL_NO_CACHE 'Bug#31700 - KEY', f1,f2,f3,SLEEP(1.1) FROM t1 TIMESTAMP 1 1 SELECT SQL_NO_CACHE 'Bug#31700 - PK', f1,f2,f3,SLEEP(1.1) FROM t1 WHERE f1=2 DROP TABLE t1; TRUNCATE TABLE mysql.slow_log; +use mysql; +drop table if exists renamed_general_log; +drop table if exists renamed_slow_log; +RENAME TABLE general_log TO renamed_general_log; +ERROR HY000: Cannot rename 'general_log'. When logging enabled, rename to/from log table must rename two tables: the log table to an archive table and another table back to 'general_log' +RENAME TABLE slow_log TO renamed_slow_log; +ERROR HY000: Cannot rename 'slow_log'. When logging enabled, rename to/from log table must rename two tables: the log table to an archive table and another table back to 'slow_log' +use test; +flush tables with read lock; +unlock tables; SET @@session.long_query_time= @old_long_query_time; SET @@global.log_output= @old_log_output; SET @@global.slow_query_log= @old_slow_query_log; -- cgit v1.2.1 From f91c6de21188613220cef7cee8935510f6b5cc99 Mon Sep 17 00:00:00 2001 From: Alexander Barkov Date: Tue, 9 Nov 2010 11:08:02 +0300 Subject: Postfix for Bug#26474 Add Sinhala script (Sri Lanka) collation to MySQL --- mysql-test/r/ctype_utf8.result | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'mysql-test/r') diff --git a/mysql-test/r/ctype_utf8.result b/mysql-test/r/ctype_utf8.result index 122d722be71..02ff80890e0 100644 --- a/mysql-test/r/ctype_utf8.result +++ b/mysql-test/r/ctype_utf8.result @@ -2040,6 +2040,20 @@ predicted_order hex(utf8_encoding) 100 E0B78AE2808DE0B6BA 101 E0B78AE2808DE0B6BB DROP TABLE t1; +SET NAMES utf8 COLLATE utf8_sinhala_ci; +CREATE TABLE t1 (s1 VARCHAR(10) COLLATE utf8_sinhala_ci); +INSERT INTO t1 VALUES ('a'),('ae'),('af'); +SELECT s1,hex(s1) FROM t1 ORDER BY s1; +s1 hex(s1) +a 61 +ae 6165 +af 6166 +SELECT * FROM t1 ORDER BY s1; +s1 +a +ae +af +DROP TABLE t1; End of 5.4 tests # # Start of 5.5 tests -- cgit v1.2.1 From bb356127a3f2095cebec63f50205682bdf765e64 Mon Sep 17 00:00:00 2001 From: Oystein Grovlen Date: Wed, 10 Nov 2010 15:48:29 +0100 Subject: Bug#57704 Cleanup code dies with void TABLE::set_keyread(bool): Assertion `file' failed. This bug was introduced in this revision: kostja@sun.com-20100727102553-b4n2ojcyfj79l2x7 ("A pre-requisite patch for the fix for Bug#52044.") It happens because close_thread_tables() is now called in open_and_lock_tables upon failure. Hence, table is no longer open when optimizer tries to do cleanup. Fix: Make sure to do cleanup in st_select_lex_unit::prepare() upon failure. This way, cleanup() is called before tables are released. mysql-test/r/subselect.result: Added test case for Bug#57704. mysql-test/t/subselect.test: Added test case for Bug#57704. sql/sql_union.cc: st_select_lex_unit::prepare(): On failure, make sure cleanup() is called. --- mysql-test/r/subselect.result | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'mysql-test/r') diff --git a/mysql-test/r/subselect.result b/mysql-test/r/subselect.result index 13941b56040..3136b5dfcc0 100644 --- a/mysql-test/r/subselect.result +++ b/mysql-test/r/subselect.result @@ -5005,3 +5005,15 @@ SELECT * FROM t2 UNION SELECT * FROM t2 ORDER BY (SELECT * FROM t1 WHERE MATCH(a) AGAINST ('+abc' IN BOOLEAN MODE)); DROP TABLE t1,t2; End of 5.1 tests +# +# Bug #57704: Cleanup code dies with void TABLE::set_keyread(bool): +# Assertion `file' failed. +# +CREATE TABLE t1 (a INT); +SELECT 1 FROM +(SELECT ROW( +(SELECT 1 FROM t1 RIGHT JOIN +(SELECT 1 FROM t1, t1 t2) AS d ON 1), +1) FROM t1) AS e; +ERROR 21000: Operand should contain 1 column(s) +DROP TABLE t1; -- cgit v1.2.1 From 871f36357e696d12cc4a360a8c36d7be61516ac6 Mon Sep 17 00:00:00 2001 From: Dmitry Shulga Date: Thu, 11 Nov 2010 10:52:51 +0600 Subject: Fixed bug#54375 - Error in stored procedure leaves connection in different default schema. In strict mode, when data truncation or conversion happens, THD::killed is set to THD::KILL_BAD_DATA. This is abuse of KILL mechanism to guarantee that execution of statement is aborted. The stored procedures execution, on the other hand, upon detection that a connection was killed, would terminate immediately, without trying to restore the caller's context, in particular, restore the caller's current schema. The fix is, when terminating a stored procedure execution, to only bypass cleanup if the entire connection was killed, not in case of other forms of KILL. mysql-test/r/sp-bugs.result: Added result for a test case for bug#54375. mysql-test/t/sp-bugs.test: Added test case for bug#54375. sql/sp_head.cc: sp_head::execute modified: restore saved current db if connection is not killed. --- mysql-test/r/sp-bugs.result | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) (limited to 'mysql-test/r') diff --git a/mysql-test/r/sp-bugs.result b/mysql-test/r/sp-bugs.result index 2374b433fba..507c73c2683 100644 --- a/mysql-test/r/sp-bugs.result +++ b/mysql-test/r/sp-bugs.result @@ -73,4 +73,40 @@ CALL p1 (); ERROR HY000: Trigger does not exist DROP TABLE t1; DROP PROCEDURE p1; +# +# Bug#54375: Error in stored procedure leaves connection +# in different default schema +# +SET @@SQL_MODE = 'STRICT_ALL_TABLES'; +DROP DATABASE IF EXISTS db1; +CREATE DATABASE db1; +USE db1; +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (c1 int NOT NULL PRIMARY KEY); +INSERT INTO t1 VALUES (1); +CREATE FUNCTION f1 ( +some_value int +) +RETURNS smallint +DETERMINISTIC +BEGIN +INSERT INTO t1 SET c1 = some_value; +RETURN(LAST_INSERT_ID()); +END$$ +DROP DATABASE IF EXISTS db2; +CREATE DATABASE db2; +USE db2; +SELECT DATABASE(); +DATABASE() +db2 +SELECT db1.f1(1); +ERROR 23000: Duplicate entry '1' for key 'PRIMARY' +SELECT DATABASE(); +DATABASE() +db2 +USE test; +DROP FUNCTION db1.f1; +DROP TABLE db1.t1; +DROP DATABASE db1; +DROP DATABASE db2; End of 5.1 tests -- cgit v1.2.1 From 3fa437cf4061c20f2995e859b89a6898d3b646b4 Mon Sep 17 00:00:00 2001 From: Alexander Nozdrin Date: Sat, 13 Nov 2010 18:05:02 +0300 Subject: Fix for Bug#56934 (mysql_stmt_fetch() incorrectly fills MYSQL_TIME structure buffer). This is a follow-up for WL#4435. The bug actually existed not only MYSQL_TYPE_DATETIME type. The problem was that Item_param::set_value() was written in an assumption that it's working with expressions, i.e. with basic data types. There are two different quick fixes here: a) Change Item_param::make_field() -- remove setting of Send_field::length, Send_field::charsetnr, Send_field::flags and Send_field::type. That would lead to marshalling all data using basic types to the client (MYSQL_TYPE_LONGLONG, MYSQL_TYPE_DOUBLE, MYSQL_TYPE_STRING and MYSQL_TYPE_NEWDECIMAL). In particular, that means, DATETIME would be sent as MYSQL_TYPE_STRING, TINYINT -- as MYSQL_TYPE_LONGLONG, etc. That could be Ok for the client, because the client library does reverse conversion automatically (the client program would see DATETIME as MYSQL_TIME object). However, there is a problem with metadata -- the metadata would be wrong (misleading): it would say that DATETIME is marshaled as MYSQL_TYPE_DATETIME, not as MYSQL_TYPE_STRING. b) Set Item_param::param_type properly to actual underlying field type. That would lead to double conversion inside the server: for example, MYSQL_TIME-object would be converted into STRING-object (in Item_param::set_value()), and then converted back to MYSQL_TIME-object (in Item_param::send()). The data however would be marshalled more properly, and also metadata would be correct. This patch implements b). There is also a possibility to avoid double conversion either by clonning the data field, or by storing a reference to it and using it on Item::send() time. That requires more work and might be done later. --- mysql-test/r/ps.result | 504 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 504 insertions(+) (limited to 'mysql-test/r') diff --git a/mysql-test/r/ps.result b/mysql-test/r/ps.result index 33282823931..17f639cdca3 100644 --- a/mysql-test/r/ps.result +++ b/mysql-test/r/ps.result @@ -3202,6 +3202,510 @@ test1 DROP PROCEDURE p1; DROP PROCEDURE p2; +TINYINT + +CREATE PROCEDURE p1(OUT v TINYINT) +SET v = 127; +PREPARE stmt1 FROM 'CALL p1(?)'; +EXECUTE stmt1 USING @a; +CREATE TEMPORARY TABLE tmp1 AS SELECT @a AS c1; +SHOW CREATE TABLE tmp1; +Table Create Table +tmp1 CREATE TEMPORARY TABLE `tmp1` ( + `c1` bigint(20) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT @a, @a = 127; +@a @a = 127 +127 1 +DROP TEMPORARY TABLE tmp1; +DROP PROCEDURE p1; + +SMALLINT + +CREATE PROCEDURE p1(OUT v SMALLINT) +SET v = 32767; +PREPARE stmt1 FROM 'CALL p1(?)'; +EXECUTE stmt1 USING @a; +CREATE TEMPORARY TABLE tmp1 AS SELECT @a AS c1; +SHOW CREATE TABLE tmp1; +Table Create Table +tmp1 CREATE TEMPORARY TABLE `tmp1` ( + `c1` bigint(20) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT @a, @a = 32767; +@a @a = 32767 +32767 1 +DROP TEMPORARY TABLE tmp1; +DROP PROCEDURE p1; + +MEDIUMINT + +CREATE PROCEDURE p1(OUT v MEDIUMINT) +SET v = 8388607; +PREPARE stmt1 FROM 'CALL p1(?)'; +EXECUTE stmt1 USING @a; +CREATE TEMPORARY TABLE tmp1 AS SELECT @a AS c1; +SHOW CREATE TABLE tmp1; +Table Create Table +tmp1 CREATE TEMPORARY TABLE `tmp1` ( + `c1` bigint(20) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT @a, @a = 8388607; +@a @a = 8388607 +8388607 1 +DROP TEMPORARY TABLE tmp1; +DROP PROCEDURE p1; + +INT + +CREATE PROCEDURE p1(OUT v INT) +SET v = 2147483647; +PREPARE stmt1 FROM 'CALL p1(?)'; +EXECUTE stmt1 USING @a; +CREATE TEMPORARY TABLE tmp1 AS SELECT @a AS c1; +SHOW CREATE TABLE tmp1; +Table Create Table +tmp1 CREATE TEMPORARY TABLE `tmp1` ( + `c1` bigint(20) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT @a, @a = 2147483647; +@a @a = 2147483647 +2147483647 1 +DROP TEMPORARY TABLE tmp1; +DROP PROCEDURE p1; + +BIGINT + +CREATE PROCEDURE p1(OUT v BIGINT) +SET v = 9223372036854775807; +PREPARE stmt1 FROM 'CALL p1(?)'; +EXECUTE stmt1 USING @a; +CREATE TEMPORARY TABLE tmp1 AS SELECT @a AS c1; +SHOW CREATE TABLE tmp1; +Table Create Table +tmp1 CREATE TEMPORARY TABLE `tmp1` ( + `c1` bigint(20) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT @a, @a = 9223372036854775807; +@a @a = 9223372036854775807 +9223372036854775807 1 +DROP TEMPORARY TABLE tmp1; +DROP PROCEDURE p1; + +BIT(11) + +CREATE PROCEDURE p1(OUT v BIT(11)) +SET v = b'10100100101'; +PREPARE stmt1 FROM 'CALL p1(?)'; +EXECUTE stmt1 USING @a; +CREATE TEMPORARY TABLE tmp1 AS SELECT @a AS c1; +SHOW CREATE TABLE tmp1; +Table Create Table +tmp1 CREATE TEMPORARY TABLE `tmp1` ( + `c1` bigint(20) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT @a, @a = b'10100100101'; +@a @a = b'10100100101' +1317 1 +DROP TEMPORARY TABLE tmp1; +DROP PROCEDURE p1; + +TIMESTAMP + +CREATE PROCEDURE p1(OUT v TIMESTAMP) +SET v = '2007-11-18 15:01:02'; +PREPARE stmt1 FROM 'CALL p1(?)'; +EXECUTE stmt1 USING @a; +CREATE TEMPORARY TABLE tmp1 AS SELECT @a AS c1; +SHOW CREATE TABLE tmp1; +Table Create Table +tmp1 CREATE TEMPORARY TABLE `tmp1` ( + `c1` longblob +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT @a, @a = '2007-11-18 15:01:02'; +@a @a = '2007-11-18 15:01:02' +2007-11-18 15:01:02 1 +DROP TEMPORARY TABLE tmp1; +DROP PROCEDURE p1; + +DATETIME + +CREATE PROCEDURE p1(OUT v DATETIME) +SET v = '1234-11-12 12:34:59'; +PREPARE stmt1 FROM 'CALL p1(?)'; +EXECUTE stmt1 USING @a; +CREATE TEMPORARY TABLE tmp1 AS SELECT @a AS c1; +SHOW CREATE TABLE tmp1; +Table Create Table +tmp1 CREATE TEMPORARY TABLE `tmp1` ( + `c1` longblob +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT @a, @a = '1234-11-12 12:34:59'; +@a @a = '1234-11-12 12:34:59' +1234-11-12 12:34:59 1 +DROP TEMPORARY TABLE tmp1; +DROP PROCEDURE p1; + +TIME + +CREATE PROCEDURE p1(OUT v TIME) +SET v = '123:45:01'; +PREPARE stmt1 FROM 'CALL p1(?)'; +EXECUTE stmt1 USING @a; +CREATE TEMPORARY TABLE tmp1 AS SELECT @a AS c1; +SHOW CREATE TABLE tmp1; +Table Create Table +tmp1 CREATE TEMPORARY TABLE `tmp1` ( + `c1` longblob +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT @a, @a = '123:45:01'; +@a @a = '123:45:01' +123:45:01 1 +DROP TEMPORARY TABLE tmp1; +DROP PROCEDURE p1; + +DATE + +CREATE PROCEDURE p1(OUT v DATE) +SET v = '1234-11-12'; +PREPARE stmt1 FROM 'CALL p1(?)'; +EXECUTE stmt1 USING @a; +CREATE TEMPORARY TABLE tmp1 AS SELECT @a AS c1; +SHOW CREATE TABLE tmp1; +Table Create Table +tmp1 CREATE TEMPORARY TABLE `tmp1` ( + `c1` longblob +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT @a, @a = '1234-11-12'; +@a @a = '1234-11-12' +1234-11-12 1 +DROP TEMPORARY TABLE tmp1; +DROP PROCEDURE p1; + +YEAR + +CREATE PROCEDURE p1(OUT v YEAR) +SET v = 2010; +PREPARE stmt1 FROM 'CALL p1(?)'; +EXECUTE stmt1 USING @a; +CREATE TEMPORARY TABLE tmp1 AS SELECT @a AS c1; +SHOW CREATE TABLE tmp1; +Table Create Table +tmp1 CREATE TEMPORARY TABLE `tmp1` ( + `c1` bigint(20) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT @a, @a = 2010; +@a @a = 2010 +2010 1 +DROP TEMPORARY TABLE tmp1; +DROP PROCEDURE p1; + +FLOAT(7, 4) + +CREATE PROCEDURE p1(OUT v FLOAT(7, 4)) +SET v = 123.4567; +PREPARE stmt1 FROM 'CALL p1(?)'; +EXECUTE stmt1 USING @a; +CREATE TEMPORARY TABLE tmp1 AS SELECT @a AS c1; +SHOW CREATE TABLE tmp1; +Table Create Table +tmp1 CREATE TEMPORARY TABLE `tmp1` ( + `c1` double DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT @a, @a - 123.4567 < 0.00001; +@a @a - 123.4567 < 0.00001 +123.45670318603516 1 +DROP TEMPORARY TABLE tmp1; +DROP PROCEDURE p1; + +DOUBLE(8, 5) + +CREATE PROCEDURE p1(OUT v DOUBLE(8, 5)) +SET v = 123.45678; +PREPARE stmt1 FROM 'CALL p1(?)'; +EXECUTE stmt1 USING @a; +CREATE TEMPORARY TABLE tmp1 AS SELECT @a AS c1; +SHOW CREATE TABLE tmp1; +Table Create Table +tmp1 CREATE TEMPORARY TABLE `tmp1` ( + `c1` double DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT @a, @a - 123.45678 < 0.000001; +@a @a - 123.45678 < 0.000001 +123.45678 1 +DROP TEMPORARY TABLE tmp1; +DROP PROCEDURE p1; + +DECIMAL(9, 6) + +CREATE PROCEDURE p1(OUT v DECIMAL(9, 6)) +SET v = 123.456789; +PREPARE stmt1 FROM 'CALL p1(?)'; +EXECUTE stmt1 USING @a; +CREATE TEMPORARY TABLE tmp1 AS SELECT @a AS c1; +SHOW CREATE TABLE tmp1; +Table Create Table +tmp1 CREATE TEMPORARY TABLE `tmp1` ( + `c1` decimal(65,30) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT @a, @a = 123.456789; +@a @a = 123.456789 +123.456789 1 +DROP TEMPORARY TABLE tmp1; +DROP PROCEDURE p1; + +CHAR(32) + +CREATE PROCEDURE p1(OUT v CHAR(32)) +SET v = REPEAT('a', 16); +PREPARE stmt1 FROM 'CALL p1(?)'; +EXECUTE stmt1 USING @a; +CREATE TEMPORARY TABLE tmp1 AS SELECT @a AS c1; +SHOW CREATE TABLE tmp1; +Table Create Table +tmp1 CREATE TEMPORARY TABLE `tmp1` ( + `c1` longblob +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT @a, @a = REPEAT('a', 16); +@a @a = REPEAT('a', 16) +aaaaaaaaaaaaaaaa 1 +DROP TEMPORARY TABLE tmp1; +DROP PROCEDURE p1; + +VARCHAR(32) + +CREATE PROCEDURE p1(OUT v VARCHAR(32)) +SET v = REPEAT('b', 16); +PREPARE stmt1 FROM 'CALL p1(?)'; +EXECUTE stmt1 USING @a; +CREATE TEMPORARY TABLE tmp1 AS SELECT @a AS c1; +SHOW CREATE TABLE tmp1; +Table Create Table +tmp1 CREATE TEMPORARY TABLE `tmp1` ( + `c1` longblob +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT @a, @a = REPEAT('b', 16); +@a @a = REPEAT('b', 16) +bbbbbbbbbbbbbbbb 1 +DROP TEMPORARY TABLE tmp1; +DROP PROCEDURE p1; + +TINYTEXT + +CREATE PROCEDURE p1(OUT v TINYTEXT) +SET v = REPEAT('c', 16); +PREPARE stmt1 FROM 'CALL p1(?)'; +EXECUTE stmt1 USING @a; +CREATE TEMPORARY TABLE tmp1 AS SELECT @a AS c1; +SHOW CREATE TABLE tmp1; +Table Create Table +tmp1 CREATE TEMPORARY TABLE `tmp1` ( + `c1` longblob +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT @a, @a = REPEAT('c', 16); +@a @a = REPEAT('c', 16) +cccccccccccccccc 1 +DROP TEMPORARY TABLE tmp1; +DROP PROCEDURE p1; + +TEXT + +CREATE PROCEDURE p1(OUT v TEXT) +SET v = REPEAT('d', 16); +PREPARE stmt1 FROM 'CALL p1(?)'; +EXECUTE stmt1 USING @a; +CREATE TEMPORARY TABLE tmp1 AS SELECT @a AS c1; +SHOW CREATE TABLE tmp1; +Table Create Table +tmp1 CREATE TEMPORARY TABLE `tmp1` ( + `c1` longblob +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT @a, @a = REPEAT('d', 16); +@a @a = REPEAT('d', 16) +dddddddddddddddd 1 +DROP TEMPORARY TABLE tmp1; +DROP PROCEDURE p1; + +MEDIUMTEXT + +CREATE PROCEDURE p1(OUT v MEDIUMTEXT) +SET v = REPEAT('e', 16); +PREPARE stmt1 FROM 'CALL p1(?)'; +EXECUTE stmt1 USING @a; +CREATE TEMPORARY TABLE tmp1 AS SELECT @a AS c1; +SHOW CREATE TABLE tmp1; +Table Create Table +tmp1 CREATE TEMPORARY TABLE `tmp1` ( + `c1` longblob +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT @a, @a = REPEAT('e', 16); +@a @a = REPEAT('e', 16) +eeeeeeeeeeeeeeee 1 +DROP TEMPORARY TABLE tmp1; +DROP PROCEDURE p1; + +LONGTEXT + +CREATE PROCEDURE p1(OUT v LONGTEXT) +SET v = REPEAT('f', 16); +PREPARE stmt1 FROM 'CALL p1(?)'; +EXECUTE stmt1 USING @a; +CREATE TEMPORARY TABLE tmp1 AS SELECT @a AS c1; +SHOW CREATE TABLE tmp1; +Table Create Table +tmp1 CREATE TEMPORARY TABLE `tmp1` ( + `c1` longblob +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT @a, @a = REPEAT('f', 16); +@a @a = REPEAT('f', 16) +ffffffffffffffff 1 +DROP TEMPORARY TABLE tmp1; +DROP PROCEDURE p1; + +BINARY(32) + +CREATE PROCEDURE p1(OUT v BINARY(32)) +SET v = REPEAT('g', 32); +PREPARE stmt1 FROM 'CALL p1(?)'; +EXECUTE stmt1 USING @a; +CREATE TEMPORARY TABLE tmp1 AS SELECT @a AS c1; +SHOW CREATE TABLE tmp1; +Table Create Table +tmp1 CREATE TEMPORARY TABLE `tmp1` ( + `c1` longblob +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT @a, @a = REPEAT('g', 32); +@a @a = REPEAT('g', 32) +gggggggggggggggggggggggggggggggg 1 +DROP TEMPORARY TABLE tmp1; +DROP PROCEDURE p1; + +VARBINARY(32) + +CREATE PROCEDURE p1(OUT v VARBINARY(32)) +SET v = REPEAT('h', 16); +PREPARE stmt1 FROM 'CALL p1(?)'; +EXECUTE stmt1 USING @a; +CREATE TEMPORARY TABLE tmp1 AS SELECT @a AS c1; +SHOW CREATE TABLE tmp1; +Table Create Table +tmp1 CREATE TEMPORARY TABLE `tmp1` ( + `c1` longblob +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT @a, @a = REPEAT('h', 16); +@a @a = REPEAT('h', 16) +hhhhhhhhhhhhhhhh 1 +DROP TEMPORARY TABLE tmp1; +DROP PROCEDURE p1; + +TINYBLOB + +CREATE PROCEDURE p1(OUT v TINYBLOB) +SET v = REPEAT('i', 16); +PREPARE stmt1 FROM 'CALL p1(?)'; +EXECUTE stmt1 USING @a; +CREATE TEMPORARY TABLE tmp1 AS SELECT @a AS c1; +SHOW CREATE TABLE tmp1; +Table Create Table +tmp1 CREATE TEMPORARY TABLE `tmp1` ( + `c1` longblob +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT @a, @a = REPEAT('i', 16); +@a @a = REPEAT('i', 16) +iiiiiiiiiiiiiiii 1 +DROP TEMPORARY TABLE tmp1; +DROP PROCEDURE p1; + +BLOB + +CREATE PROCEDURE p1(OUT v BLOB) +SET v = REPEAT('j', 16); +PREPARE stmt1 FROM 'CALL p1(?)'; +EXECUTE stmt1 USING @a; +CREATE TEMPORARY TABLE tmp1 AS SELECT @a AS c1; +SHOW CREATE TABLE tmp1; +Table Create Table +tmp1 CREATE TEMPORARY TABLE `tmp1` ( + `c1` longblob +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT @a, @a = REPEAT('j', 16); +@a @a = REPEAT('j', 16) +jjjjjjjjjjjjjjjj 1 +DROP TEMPORARY TABLE tmp1; +DROP PROCEDURE p1; + +MEDIUMBLOB + +CREATE PROCEDURE p1(OUT v MEDIUMBLOB) +SET v = REPEAT('k', 16); +PREPARE stmt1 FROM 'CALL p1(?)'; +EXECUTE stmt1 USING @a; +CREATE TEMPORARY TABLE tmp1 AS SELECT @a AS c1; +SHOW CREATE TABLE tmp1; +Table Create Table +tmp1 CREATE TEMPORARY TABLE `tmp1` ( + `c1` longblob +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT @a, @a = REPEAT('k', 16); +@a @a = REPEAT('k', 16) +kkkkkkkkkkkkkkkk 1 +DROP TEMPORARY TABLE tmp1; +DROP PROCEDURE p1; + +LONGBLOB + +CREATE PROCEDURE p1(OUT v LONGBLOB) +SET v = REPEAT('l', 16); +PREPARE stmt1 FROM 'CALL p1(?)'; +EXECUTE stmt1 USING @a; +CREATE TEMPORARY TABLE tmp1 AS SELECT @a AS c1; +SHOW CREATE TABLE tmp1; +Table Create Table +tmp1 CREATE TEMPORARY TABLE `tmp1` ( + `c1` longblob +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT @a, @a = REPEAT('l', 16); +@a @a = REPEAT('l', 16) +llllllllllllllll 1 +DROP TEMPORARY TABLE tmp1; +DROP PROCEDURE p1; + +SET('aaa', 'bbb') + +CREATE PROCEDURE p1(OUT v SET('aaa', 'bbb')) +SET v = 'aaa'; +PREPARE stmt1 FROM 'CALL p1(?)'; +EXECUTE stmt1 USING @a; +CREATE TEMPORARY TABLE tmp1 AS SELECT @a AS c1; +SHOW CREATE TABLE tmp1; +Table Create Table +tmp1 CREATE TEMPORARY TABLE `tmp1` ( + `c1` longblob +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT @a, @a = 'aaa'; +@a @a = 'aaa' +aaa 1 +DROP TEMPORARY TABLE tmp1; +DROP PROCEDURE p1; + +ENUM('aaa', 'bbb') + +CREATE PROCEDURE p1(OUT v ENUM('aaa', 'bbb')) +SET v = 'aaa'; +PREPARE stmt1 FROM 'CALL p1(?)'; +EXECUTE stmt1 USING @a; +CREATE TEMPORARY TABLE tmp1 AS SELECT @a AS c1; +SHOW CREATE TABLE tmp1; +Table Create Table +tmp1 CREATE TEMPORARY TABLE `tmp1` ( + `c1` longblob +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT @a, @a = 'aaa'; +@a @a = 'aaa' +aaa 1 +DROP TEMPORARY TABLE tmp1; +DROP PROCEDURE p1; + # End of WL#4435. # # WL#4284: Transactional DDL locking -- cgit v1.2.1 From 47b514ffce0c5b1bdda27f745d1129496dff037f Mon Sep 17 00:00:00 2001 From: Mattias Jonsson Date: Mon, 15 Nov 2010 16:17:38 +0100 Subject: Bug#58197: main.variables-big fails on windows The test result differs on windows, since it writes out 'localhost:' instead of only 'localhost', since it uses tcp/ip instead of unix sockets on windows. Fixed by replacing that column. Also requires --big-test from some long running tests and added a weekly run of all test requiring --big-test. mysql-test/collections/default.weekly: Added a run of big-test (already exists in 5.5). mysql-test/r/variables-big.result: Updated results mysql-test/suite/parts/t/part_supported_sql_func_innodb.test: requiring --big-test since the test takes long time mysql-test/suite/parts/t/partition_alter1_1_2_innodb.test: requiring --big-test since the test takes long time mysql-test/suite/parts/t/partition_alter1_2_innodb.test: requiring --big-test since the test takes long time mysql-test/suite/parts/t/partition_alter4_innodb.test: requiring --big-test since the test takes long time mysql-test/t/disabled.def: Disabled two tests since they fail and was already reported as bugs (but was never run since they requires --big-test flag). mysql-test/t/variables-big.test: Replacing column 3 in process list since it is not the same on windows as in unix. --- mysql-test/r/variables-big.result | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'mysql-test/r') diff --git a/mysql-test/r/variables-big.result b/mysql-test/r/variables-big.result index 960fc6d22f4..71b32393d82 100644 --- a/mysql-test/r/variables-big.result +++ b/mysql-test/r/variables-big.result @@ -1,20 +1,20 @@ SET SESSION transaction_prealloc_size=1024*1024*1024*1; SHOW PROCESSLIST; Id User Host db Command Time State Info - root localhost test Query