diff options
Diffstat (limited to 'mysql-test')
45 files changed, 1364 insertions, 201 deletions
diff --git a/mysql-test/include/mtr_check.sql b/mysql-test/include/mtr_check.sql index 55e346c2007..699a35a1831 100644 --- a/mysql-test/include/mtr_check.sql +++ b/mysql-test/include/mtr_check.sql @@ -72,3 +72,13 @@ BEGIN mysql.user; END|| + +-- +-- Procedure used by test case used to force all +-- servers to restart after testcase and thus skipping +-- check test case after test +-- +CREATE DEFINER=root@localhost PROCEDURE force_restart() +BEGIN + SELECT 1 INTO OUTFILE 'force_restart'; +END|| diff --git a/mysql-test/include/mysqld--help.inc b/mysql-test/include/mysqld--help.inc index 5d20cff2c13..380a7f6c8cf 100644 --- a/mysql-test/include/mysqld--help.inc +++ b/mysql-test/include/mysqld--help.inc @@ -26,7 +26,7 @@ perl; # And substitute the content some environment variables with their # names: - @env=qw/MYSQLTEST_VARDIR MYSQL_TEST_DIR MYSQL_LIBDIR MYSQL_CHARSETSDIR MYSQL_SHAREDIR/; + @env=qw/MYSQLTEST_VARDIR MYSQL_TEST_DIR MYSQL_CHARSETSDIR MYSQL_SHAREDIR/; $re1=join('|', @skipvars, @plugins); $re2=join('|', @plugins); diff --git a/mysql-test/lib/mtr_cases.pm b/mysql-test/lib/mtr_cases.pm index 044ebb1f176..c8381e16061 100644 --- a/mysql-test/lib/mtr_cases.pm +++ b/mysql-test/lib/mtr_cases.pm @@ -337,17 +337,41 @@ sub collect_one_suite($) for my $skip (@disabled_collection) { if ( open(DISABLED, $skip ) ) - { - while ( <DISABLED> ) - { - chomp; - if ( /^\s*(\S+)\s*:\s*(.*?)\s*$/ ) - { - $disabled{$1}= $2 if not exists $disabled{$1}; - } - } - close DISABLED; - } + { + # $^O on Windows considered not generic enough + my $plat= (IS_WINDOWS) ? 'windows' : $^O; + + while ( <DISABLED> ) + { + chomp; + #diasble the test case if platform matches + if ( /\@/ ) + { + if ( /\@$plat/ ) + { + /^\s*(\S+)\s*\@$plat.*:\s*(.*?)\s*$/ ; + $disabled{$1}= $2 if not exists $disabled{$1}; + } + elsif ( /\@!(\S*)/ ) + { + if ( $1 ne $plat) + { + /^\s*(\S+)\s*\@!.*:\s*(.*?)\s*$/ ; + $disabled{$1}= $2 if not exists $disabled{$1}; + } + } + } + elsif ( /^\s*(\S+)\s*:\s*(.*?)\s*$/ ) + { + chomp; + if ( /^\s*(\S+)\s*:\s*(.*?)\s*$/ ) + { + $disabled{$1}= $2 if not exists $disabled{$1}; + } + } + } + close DISABLED; + } } # Read suite.opt file diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index 1f02a5fb08e..1954d2798ed 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -2298,12 +2298,6 @@ sub environment_setup { $ENV{'DEFAULT_MASTER_PORT'}= $mysqld_variables{'port'}; $ENV{'MYSQL_TMP_DIR'}= $opt_tmpdir; $ENV{'MYSQLTEST_VARDIR'}= $opt_vardir; - # Used for guessing default plugin dir, we can't really know for sure - $ENV{'MYSQL_LIBDIR'}= "$basedir/lib"; - # Override if this does not exist, but lib64 does (best effort) - if (! -d "$basedir/lib" && -d "$basedir/lib64") { - $ENV{'MYSQL_LIBDIR'}= "$basedir/lib64"; - } $ENV{'MYSQL_BINDIR'}= "$bindir"; $ENV{'MYSQL_SHAREDIR'}= $path_language; $ENV{'MYSQL_CHARSETSDIR'}= $path_charsetsdir; diff --git a/mysql-test/r/auth_rpl.result b/mysql-test/r/auth_rpl.result new file mode 100644 index 00000000000..70626b02b2b --- /dev/null +++ b/mysql-test/r/auth_rpl.result @@ -0,0 +1,24 @@ +include/master-slave.inc +[connection master] +[connection slave] +include/stop_slave.inc +[connection master] +CREATE USER 'plug_user' IDENTIFIED WITH 'test_plugin_server' AS 'plug_user'; +GRANT REPLICATION SLAVE ON *.* TO plug_user; +FLUSH PRIVILEGES; +[connection slave] +CHANGE MASTER TO +MASTER_USER= 'plug_user', +MASTER_PASSWORD= 'plug_user'; +include/start_slave.inc +# Slave in-sync with master now. +SELECT user, plugin, authentication_string FROM mysql.user WHERE user LIKE 'plug_user'; +user plugin authentication_string +plug_user test_plugin_server plug_user +# Cleanup (on slave). +include/stop_slave.inc +CHANGE MASTER TO MASTER_USER='root'; +DROP USER 'plug_user'; +# Cleanup (on master). +DROP USER 'plug_user'; +include/rpl_end.inc diff --git a/mysql-test/r/execution_constants.result b/mysql-test/r/execution_constants.result index 293c88dc506..86eed447b83 100644 --- a/mysql-test/r/execution_constants.result +++ b/mysql-test/r/execution_constants.result @@ -7,6 +7,6 @@ PRIMARY KEY (`ID_MEMBER`,`ID_BOARD`), KEY `logTime` (`logTime`) ) ENGINE=MyISAM DEFAULT CHARSET=cp1251 COLLATE=cp1251_bulgarian_ci; INSERT INTO `t_bug21476` VALUES (2,2,1154870939,0),(1,2,1154870957,0),(2,183,1154941362,0),(2,84,1154904301,0),(1,84,1154905867,0),(2,13,1154947484,10271),(3,84,1154880549,0),(1,6,1154892183,0),(2,25,1154947581,10271),(3,25,1154904760,0),(1,25,1154947373,10271),(1,179,1154899992,0),(2,179,1154899410,0),(5,25,1154901666,0),(2,329,1154902026,0),(3,329,1154902040,0),(1,329,1154902058,0),(1,13,1154930841,0),(3,85,1154904987,0),(1,183,1154929665,0),(3,13,1154931268,0),(1,85,1154936888,0),(1,169,1154937959,0),(2,169,1154941717,0),(3,183,1154939810,0),(3,169,1154941734,0); -Assertion: mysql_errno 1436 == 1436 +Assertion: mysql_errname ER_STACK_OVERRUN_NEED_MORE == ER_STACK_OVERRUN_NEED_MORE DROP TABLE `t_bug21476`; End of 5.0 tests. diff --git a/mysql-test/r/func_str.result b/mysql-test/r/func_str.result index 81fe2413725..755763e6994 100644 --- a/mysql-test/r/func_str.result +++ b/mysql-test/r/func_str.result @@ -2785,5 +2785,40 @@ format(123,2,'no_NO') 123,00 DROP TABLE t1; # +# Bug#12985030 SIMPLE QUERY WITH DECIMAL NUMBERS LEAKS MEMORY +# +SELECT (rpad(1.0,2048,1)) IS NOT FALSE; +(rpad(1.0,2048,1)) IS NOT FALSE +1 +SELECT ((+0) IN +((0b111111111111111111111111111111111111111111111111111),(rpad(1.0,2048,1)), +(32767.1))); +((+0) IN +((0b111111111111111111111111111111111111111111111111111),(rpad(1.0,2048,1)), +(32767.1))) +0 +SELECT ((rpad(1.0,2048,1)) = ('4(') ^ (0.1)); +((rpad(1.0,2048,1)) = ('4(') ^ (0.1)) +0 +Warnings: +Warning 1292 Truncated incorrect INTEGER value: '4(' +SELECT +pow((rpad(1.0,2048,1)),(b'1111111111111111111111111111111111111111111')); +ERROR 22003: DOUBLE value is out of range in 'pow(rpad(1.0,2048,1),0x07ffffffffff)' +SELECT ((rpad(1.0,2048,1)) + (0) ^ ('../')); +((rpad(1.0,2048,1)) + (0) ^ ('../')) +1.011111111111111 +Warnings: +Warning 1292 Truncated incorrect INTEGER value: '../' +SELECT stddev_samp(rpad(1.0,2048,1)); +stddev_samp(rpad(1.0,2048,1)) +NULL +SELECT ((127.1) not in ((rpad(1.0,2048,1)),(''),(-1.1))); +((127.1) not in ((rpad(1.0,2048,1)),(''),(-1.1))) +1 +SELECT ((0xf3) * (rpad(1.0,2048,1)) << (0xcc)); +((0xf3) * (rpad(1.0,2048,1)) << (0xcc)) +0 +# # End of 5.5 tests # diff --git a/mysql-test/r/group_by.result b/mysql-test/r/group_by.result index 2a52d63e1d7..950de54b815 100644 --- a/mysql-test/r/group_by.result +++ b/mysql-test/r/group_by.result @@ -1892,6 +1892,38 @@ a AVG(t1.b) t11c t12c 1 4.0000 6 6 2 2.0000 7 7 DROP TABLE t1; +# +# Bug#11765254 (58200): Assertion failed: param.sort_length when grouping +# by functions +# +SET SQL_BIG_TABLES=1; +CREATE TABLE t1(a INT); +INSERT INTO t1 VALUES (0),(0); +SELECT 1 FROM t1 GROUP BY IF(`a`,'',''); +1 +1 +SELECT 1 FROM t1 GROUP BY TRIM(LEADING RAND() FROM ''); +1 +1 +SELECT 1 FROM t1 GROUP BY SUBSTRING('',SLEEP(0),''); +1 +1 +Warnings: +Warning 1292 Truncated incorrect INTEGER value: '' +Warning 1292 Truncated incorrect INTEGER value: '' +Warning 1292 Truncated incorrect INTEGER value: '' +SELECT 1 FROM t1 GROUP BY SUBSTRING(SYSDATE() FROM 'K' FOR 'jxW<'); +1 +1 +Warnings: +Warning 1292 Truncated incorrect INTEGER value: 'K' +Warning 1292 Truncated incorrect INTEGER value: 'jxW<' +Warning 1292 Truncated incorrect INTEGER value: 'K' +Warning 1292 Truncated incorrect INTEGER value: 'jxW<' +Warning 1292 Truncated incorrect INTEGER value: 'K' +Warning 1292 Truncated incorrect INTEGER value: 'jxW<' +DROP TABLE t1; +SET SQL_BIG_TABLES=0; # End of 5.1 tests # # Bug#49771: Incorrect MIN (date) when minimum value is 0000-00-00 diff --git a/mysql-test/r/myisampack.result b/mysql-test/r/myisampack.result index 91700701139..56f61ccdf47 100644 --- a/mysql-test/r/myisampack.result +++ b/mysql-test/r/myisampack.result @@ -118,3 +118,35 @@ Aborted: file is not compressed DROP TABLE t1,t2,t3; DROP TABLE mysql_db1.t1; DROP DATABASE mysql_db1; +# +# BUG#11761180 - 53646: MYISAMPACK CORRUPTS TABLES WITH FULLTEXT INDEXES +# +CREATE TABLE t1(a CHAR(4), FULLTEXT(a)); +INSERT INTO t1 VALUES('aaaa'),('bbbb'),('cccc'); +FLUSH TABLE t1; +CHECK TABLE t1; +Table Op Msg_type Msg_text +test.t1 check status OK +SELECT * FROM t1 WHERE MATCH(a) AGAINST('aaaa' IN BOOLEAN MODE); +a +aaaa +SELECT * FROM t1 WHERE MATCH(a) AGAINST('aaaa'); +a +aaaa +DROP TABLE t1; +# Test table with key_reflength > rec_reflength +CREATE TABLE t1(a CHAR(30), FULLTEXT(a)); +# Populating a table, so it's index file exceeds 65K +# Populating a table, so index file has second level fulltext tree +FLUSH TABLE t1; +# Compressing table +# Fixing index (repair by sort) +CHECK TABLE t1; +Table Op Msg_type Msg_text +test.t1 check status OK +FLUSH TABLE t1; +# Fixing index (repair with keycache) +CHECK TABLE t1; +Table Op Msg_type Msg_text +test.t1 check status OK +DROP TABLE t1; diff --git a/mysql-test/r/mysqltest.result b/mysql-test/r/mysqltest.result index 9c8f49c333b..9d000e6f782 100644 --- a/mysql-test/r/mysqltest.result +++ b/mysql-test/r/mysqltest.result @@ -1,6 +1,5 @@ -select 0 as "before_use_test" ; -before_use_test -0 +-1 before test +<No error> before test select otto from (select 1 as otto) as t1; otto 1 @@ -21,27 +20,32 @@ mysqltest: At line 1: query 'select friedrich from (select 1 as otto) as t1' fai select otto from (select 1 as otto) as t1; otto 1 + select 0 as "after_successful_stmt_errno" ; after_successful_stmt_errno 0 garbage ; ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'garbage' at line 1 +ER_PARSE_ERROR select 1064 as "after_wrong_syntax_errno" ; after_wrong_syntax_errno 1064 garbage ; ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'garbage' at line 1 +ER_PARSE_ERROR select 1064 as "after_let_var_equal_value" ; after_let_var_equal_value 1064 garbage ; ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'garbage' at line 1 set @my_var= 'abc' ; + select 0 as "after_set_var_equal_value" ; after_set_var_equal_value 0 garbage ; ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'garbage' at line 1 +ER_PARSE_ERROR select 1064 as "after_disable_warnings_command" ; after_disable_warnings_command 1064 @@ -49,6 +53,7 @@ drop table if exists t1 ; garbage ; ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'garbage' at line 1 drop table if exists t1 ; + select 0 as "after_disable_warnings" ; after_disable_warnings 0 @@ -56,6 +61,7 @@ garbage ; ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'garbage' at line 1 select 3 from t1 ; ERROR 42S02: Table 'test.t1' doesn't exist +ER_NO_SUCH_TABLE select 1146 as "after_minus_masked" ; after_minus_masked 1146 @@ -63,6 +69,7 @@ garbage ; ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'garbage' at line 1 select 3 from t1 ; ERROR 42S02: Table 'test.t1' doesn't exist +ER_NO_SUCH_TABLE select 1146 as "after_!_masked" ; after_!_masked 1146 @@ -75,6 +82,7 @@ garbage ; ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'garbage' at line 1 prepare stmt from "select 3 from t1" ; ERROR 42S02: Table 'test.t1' doesn't exist +ER_NO_SUCH_TABLE select 1146 as "after_failing_prepare" ; after_failing_prepare 1146 @@ -82,6 +90,7 @@ create table t1 ( f1 char(10)); garbage ; ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'garbage' at line 1 prepare stmt from "select 3 from t1" ; + select 0 as "after_successful_prepare" ; after_successful_prepare 0 @@ -89,6 +98,7 @@ garbage ; ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'garbage' at line 1 execute stmt; 3 + select 0 as "after_successful_execute" ; after_successful_execute 0 @@ -97,6 +107,7 @@ garbage ; ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'garbage' at line 1 execute stmt; ERROR 42S02: Table 'test.t1' doesn't exist +ER_NO_SUCH_TABLE select 1146 as "after_failing_execute" ; after_failing_execute 1146 @@ -104,12 +115,14 @@ garbage ; ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'garbage' at line 1 execute __stmt_; ERROR HY000: Unknown prepared statement handler (__stmt_) given to EXECUTE +ER_UNKNOWN_STMT_HANDLER select 1243 as "after_failing_execute" ; after_failing_execute 1243 garbage ; ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'garbage' at line 1 deallocate prepare stmt; + select 0 as "after_successful_deallocate" ; after_successful_deallocate 0 @@ -117,11 +130,13 @@ garbage ; ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'garbage' at line 1 deallocate prepare __stmt_; ERROR HY000: Unknown prepared statement handler (__stmt_) given to DEALLOCATE PREPARE +ER_UNKNOWN_STMT_HANDLER select 1243 as "after_failing_deallocate" ; after_failing_deallocate 1243 garbage ; ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'garbage' at line 1 +ER_PARSE_ERROR select 1064 as "after_--disable_abort_on_error" ; after_--disable_abort_on_error 1064 @@ -131,12 +146,14 @@ select 3 from t1 ; ERROR 42S02: Table 'test.t1' doesn't exist select 3 from t1 ; ERROR 42S02: Table 'test.t1' doesn't exist +ER_NO_SUCH_TABLE select 1146 as "after_!errno_masked_error" ; after_!errno_masked_error 1146 mysqltest: At line 1: query 'select 3 from t1' failed with wrong errno 1146: 'Table 'test.t1' doesn't exist', instead of 1000... garbage ; ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'garbage' at line 1 +ER_PARSE_ERROR select 1064 as "after_--enable_abort_on_error" ; after_--enable_abort_on_error 1064 diff --git a/mysql-test/r/sp_trans.result b/mysql-test/r/sp_trans.result index 4163725a196..b91dc898f12 100644 --- a/mysql-test/r/sp_trans.result +++ b/mysql-test/r/sp_trans.result @@ -558,6 +558,52 @@ f1 bug13575(f1) 3 ccc drop function bug13575| drop table t3| +SELECT @@GLOBAL.storage_engine INTO @old_engine| +SET @@GLOBAL.storage_engine=InnoDB| +SET @@SESSION.storage_engine=InnoDB| +SHOW GLOBAL VARIABLES LIKE 'storage_engine'| +Variable_name Value +storage_engine InnoDB +SHOW SESSION VARIABLES LIKE 'storage_engine'| +Variable_name Value +storage_engine InnoDB +CREATE PROCEDURE bug11758414() +BEGIN +SET @@GLOBAL.storage_engine="MyISAM"; +SET @@SESSION.storage_engine="MyISAM"; +# show defaults at execution time / that setting them worked +SHOW GLOBAL VARIABLES LIKE 'storage_engine'; +SHOW SESSION VARIABLES LIKE 'storage_engine'; +CREATE TABLE t1 (id int); +CREATE TABLE t2 (id int) ENGINE=InnoDB; +# show we're heeding the default (at run-time, not parse-time!) + SHOW CREATE TABLE t1; + # show that we didn't break explicit override with ENGINE=... +SHOW CREATE TABLE t2; +END; +| +CALL bug11758414| +Variable_name Value +storage_engine MyISAM +Variable_name Value +storage_engine MyISAM +Table Create Table +t1 CREATE TABLE `t1` ( + `id` int(11) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +Table Create Table +t2 CREATE TABLE `t2` ( + `id` int(11) DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +SHOW GLOBAL VARIABLES LIKE 'storage_engine'| +Variable_name Value +storage_engine MyISAM +SHOW SESSION VARIABLES LIKE 'storage_engine'| +Variable_name Value +storage_engine MyISAM +DROP PROCEDURE bug11758414| +DROP TABLE t1, t2| +SET @@GLOBAL.storage_engine=@old_engine| # # End of 5.1 tests # diff --git a/mysql-test/r/type_newdecimal.result b/mysql-test/r/type_newdecimal.result index c9db73c5f85..30c3c8f6442 100644 --- a/mysql-test/r/type_newdecimal.result +++ b/mysql-test/r/type_newdecimal.result @@ -1934,3 +1934,14 @@ f1 0.000000000000000000000000 DROP TABLE IF EXISTS t1; End of 5.1 tests +# +# BUG#12911710 - VALGRIND FAILURE IN +# ROW-DEBUG:PERFSCHEMA.SOCKET_SUMMARY_BY_INSTANCE_FUNC +# +CREATE TABLE t1(d1 DECIMAL(60,0) NOT NULL, +d2 DECIMAL(60,0) NOT NULL); +INSERT INTO t1 (d1, d2) VALUES(0.0, 0.0); +SELECT d1 * d2 FROM t1; +d1 * d2 +0 +DROP TABLE t1; diff --git a/mysql-test/std_data/bug57108.cnf b/mysql-test/std_data/bug57108.cnf deleted file mode 100644 index 5fd8c485cf0..00000000000 --- a/mysql-test/std_data/bug57108.cnf +++ /dev/null @@ -1,95 +0,0 @@ -[mysqld] -open-files-limit=1024 -character-set-server=latin1 -connect-timeout=4711 -log-bin-trust-function-creators=1 -key_buffer_size=1M -sort_buffer=256K -max_heap_table_size=1M -loose-innodb_data_file_path=ibdata1:10M:autoextend -loose-innodb_buffer_pool_size=8M -loose-innodb_write_io_threads=2 -loose-innodb_read_io_threads=2 -loose-innodb_log_buffer_size=1M -loose-innodb_log_file_size=5M -loose-innodb_additional_mem_pool_size=1M -loose-innodb_log_files_in_group=2 -slave-net-timeout=120 -log-bin=mysqld-bin -loose-enable-performance-schema -loose-performance-schema-max-mutex-instances=10000 -loose-performance-schema-max-rwlock-instances=10000 -loose-performance-schema-max-table-instances=500 -loose-performance-schema-max-table-handles=1000 -binlog-direct-non-transactional-updates - -[mysql] -default-character-set=latin1 - -[mysqlshow] -default-character-set=latin1 - -[mysqlimport] -default-character-set=latin1 - -[mysqlcheck] -default-character-set=latin1 - -[mysql_upgrade] -default-character-set=latin1 -tmpdir=/home/bzr/bugs/b57108-5.5-bugteam/mysql-test/var/tmp - -[mysqld.1] -#!run-master-sh -log-bin=master-bin -loose-enable-performance-schema -basedir=/home/bzr/bugs/b57108-5.5-bugteam -tmpdir=/home/bzr/bugs/b57108-5.5-bugteam/mysql-test/var/tmp/mysqld.1 -character-sets-dir=/home/bzr/bugs/b57108-5.5-bugteam/sql/share/charsets -lc-messages-dir=/home/bzr/bugs/b57108-5.5-bugteam/sql/share/ -datadir=/home/bzr/bugs/b57108-5.5-bugteam/mysql-test/var/mysqld.1/data -pid-file=/home/bzr/bugs/b57108-5.5-bugteam/mysql-test/var/run/mysqld.1.pid -#host=localhost -port=13000 -socket=/home/bzr/bugs/b57108-5.5-bugteam/mysql-test/var/tmp/mysqld.1.sock -#log-error=/home/bzr/bugs/b57108-5.5-bugteam/mysql-test/var/log/mysqld.1.err -general_log=1 -general_log_file=/home/bzr/bugs/b57108-5.5-bugteam/mysql-test/var/mysqld.1/mysqld.log -slow_query_log=1 -slow_query_log_file=/home/bzr/bugs/b57108-5.5-bugteam/mysql-test/var/mysqld.1/mysqld-slow.log -#user=root -#password= -server-id=1 -secure-file-priv=/home/bzr/bugs/b57108-5.5-bugteam/mysql-test/var -ssl-ca=/home/bzr/bugs/b57108-5.5-bugteam/mysql-test/std_data/cacert.pem -ssl-cert=/home/bzr/bugs/b57108-5.5-bugteam/mysql-test/std_data/server-cert.pem -ssl-key=/home/bzr/bugs/b57108-5.5-bugteam/mysql-test/std_data/server-key.pem - -[mysqlbinlog] -disable-force-if-open -character-sets-dir=/home/bzr/bugs/b57108-5.5-bugteam/sql/share/charsets - -[ENV] -MASTER_MYPORT=13000 -MASTER_MYSOCK=/home/bzr/bugs/b57108-5.5-bugteam/mysql-test/var/tmp/mysqld.1.sock - -[client] -password= -user=root -port=13000 -host=localhost -socket=/home/bzr/bugs/b57108-5.5-bugteam/mysql-test/var/tmp/mysqld.1.sock - -[mysqltest] -ssl-ca=/home/bzr/bugs/b57108-5.5-bugteam/mysql-test/std_data/cacert.pem -ssl-cert=/home/bzr/bugs/b57108-5.5-bugteam/mysql-test/std_data/client-cert.pem -ssl-key=/home/bzr/bugs/b57108-5.5-bugteam/mysql-test/std_data/client-key.pem -skip-ssl=1 - -[client.1] -password= -user=root -port=13000 -host=localhost -socket=/home/bzr/bugs/b57108-5.5-bugteam/mysql-test/var/tmp/mysqld.1.sock - diff --git a/mysql-test/suite/innodb/r/innodb-index.result b/mysql-test/suite/innodb/r/innodb-index.result index aa03c72022b..a33099661aa 100644 --- a/mysql-test/suite/innodb/r/innodb-index.result +++ b/mysql-test/suite/innodb/r/innodb-index.result @@ -39,6 +39,81 @@ DELETE FROM t1_purge; DELETE FROM t2_purge; DELETE FROM t3_purge; DELETE FROM t4_purge; +SET @r=REPEAT('a',500); +CREATE TABLE t12637786(a INT, +v1 VARCHAR(500), v2 VARCHAR(500), v3 VARCHAR(500), +v4 VARCHAR(500), v5 VARCHAR(500), v6 VARCHAR(500), +v7 VARCHAR(500), v8 VARCHAR(500), v9 VARCHAR(500), +v10 VARCHAR(500), v11 VARCHAR(500), v12 VARCHAR(500), +v13 VARCHAR(500), v14 VARCHAR(500), v15 VARCHAR(500), +v16 VARCHAR(500), v17 VARCHAR(500), v18 VARCHAR(500) +) ENGINE=InnoDB ROW_FORMAT=DYNAMIC; +CREATE INDEX idx1 ON t12637786(a,v1); +INSERT INTO t12637786 VALUES(9,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r); +UPDATE t12637786 SET a=1000; +DELETE FROM t12637786; +create table t12963823(a blob,b blob,c blob,d blob,e blob,f blob,g blob,h blob, +i blob,j blob,k blob,l blob,m blob,n blob,o blob,p blob) +engine=innodb row_format=dynamic; +SET @r = repeat('a', 767); +insert into t12963823 values (@r,@r,@r,@r, @r,@r,@r,@r, @r,@r,@r,@r, @r,@r,@r,@r); +create index ndx_a on t12963823 (a(500)); +create index ndx_b on t12963823 (b(500)); +create index ndx_c on t12963823 (c(500)); +create index ndx_d on t12963823 (d(500)); +create index ndx_e on t12963823 (e(500)); +create index ndx_f on t12963823 (f(500)); +create index ndx_k on t12963823 (k(500)); +create index ndx_l on t12963823 (l(500)); +SET @r = repeat('b', 500); +update t12963823 set a=@r,b=@r,c=@r,d=@r; +update t12963823 set e=@r,f=@r,g=@r,h=@r; +update t12963823 set i=@r,j=@r,k=@r,l=@r; +update t12963823 set m=@r,n=@r,o=@r,p=@r; +alter table t12963823 drop index ndx_a; +alter table t12963823 drop index ndx_b; +create index ndx_g on t12963823 (g(500)); +create index ndx_h on t12963823 (h(500)); +create index ndx_i on t12963823 (i(500)); +create index ndx_j on t12963823 (j(500)); +create index ndx_m on t12963823 (m(500)); +create index ndx_n on t12963823 (n(500)); +create index ndx_o on t12963823 (o(500)); +create index ndx_p on t12963823 (p(500)); +show create table t12963823; +Table Create Table +t12963823 CREATE TABLE `t12963823` ( + `a` blob, + `b` blob, + `c` blob, + `d` blob, + `e` blob, + `f` blob, + `g` blob, + `h` blob, + `i` blob, + `j` blob, + `k` blob, + `l` blob, + `m` blob, + `n` blob, + `o` blob, + `p` blob, + KEY `ndx_c` (`c`(500)), + KEY `ndx_d` (`d`(500)), + KEY `ndx_e` (`e`(500)), + KEY `ndx_f` (`f`(500)), + KEY `ndx_k` (`k`(500)), + KEY `ndx_l` (`l`(500)), + KEY `ndx_g` (`g`(500)), + KEY `ndx_h` (`h`(500)), + KEY `ndx_i` (`i`(500)), + KEY `ndx_j` (`j`(500)), + KEY `ndx_m` (`m`(500)), + KEY `ndx_n` (`n`(500)), + KEY `ndx_o` (`o`(500)), + KEY `ndx_p` (`p`(500)) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC set global innodb_file_per_table=0; set global innodb_file_format=Antelope; create table t1(a int not null, b int, c char(10) not null, d varchar(20)) engine = innodb; @@ -961,20 +1036,15 @@ ERROR HY000: Too big row alter table t1 row_format=compact; create index t1u on t1 (u(767)); drop table t1; -SET @r=REPEAT('a',500); -CREATE TABLE t1(a INT, -v1 VARCHAR(500), v2 VARCHAR(500), v3 VARCHAR(500), -v4 VARCHAR(500), v5 VARCHAR(500), v6 VARCHAR(500), -v7 VARCHAR(500), v8 VARCHAR(500), v9 VARCHAR(500), -v10 VARCHAR(500), v11 VARCHAR(500), v12 VARCHAR(500), -v13 VARCHAR(500), v14 VARCHAR(500), v15 VARCHAR(500), -v16 VARCHAR(500), v17 VARCHAR(500), v18 VARCHAR(500) +CREATE TABLE bug12547647( +a INT NOT NULL, b BLOB NOT NULL, c TEXT, +PRIMARY KEY (b(10), a), INDEX (c(767)), INDEX(b(767)) ) ENGINE=InnoDB ROW_FORMAT=DYNAMIC; -CREATE INDEX idx1 ON t1(a,v1); -INSERT INTO t1 VALUES(9,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r); -UPDATE t1 SET a=1000; -DELETE FROM t1; -DROP TABLE t1; +INSERT INTO bug12547647 VALUES (5,repeat('khdfo5AlOq',1900),repeat('g',7751)); +COMMIT; +UPDATE bug12547647 SET c = REPEAT('b',16928); +ERROR HY000: Undo log record is too big. +DROP TABLE bug12547647; set global innodb_file_per_table=0; set global innodb_file_format=Antelope; set global innodb_file_format_max=Antelope; @@ -1146,3 +1216,5 @@ SELECT SLEEP(10); SLEEP(10) 0 DROP TABLE t1_purge, t2_purge, t3_purge, t4_purge; +DROP TABLE t12637786; +DROP TABLE t12963823; diff --git a/mysql-test/suite/innodb/r/innodb_bug59733.result b/mysql-test/suite/innodb/r/innodb_bug59733.result new file mode 100644 index 00000000000..c962cdfd677 --- /dev/null +++ b/mysql-test/suite/innodb/r/innodb_bug59733.result @@ -0,0 +1,18 @@ +CREATE TABLE bug59733(a INT AUTO_INCREMENT PRIMARY KEY,b CHAR(1))ENGINE=InnoDB; +INSERT INTO bug59733 VALUES(0,'x'); +INSERT INTO bug59733 SELECT 0,b FROM bug59733; +INSERT INTO bug59733 SELECT 0,b FROM bug59733; +INSERT INTO bug59733 SELECT 0,b FROM bug59733; +INSERT INTO bug59733 SELECT 0,b FROM bug59733; +INSERT INTO bug59733 SELECT 0,b FROM bug59733; +INSERT INTO bug59733 SELECT 0,b FROM bug59733; +INSERT INTO bug59733 SELECT 0,b FROM bug59733; +INSERT INTO bug59733 SELECT 0,b FROM bug59733; +INSERT INTO bug59733 SELECT 0,b FROM bug59733; +INSERT INTO bug59733 SELECT 0,b FROM bug59733; +INSERT INTO bug59733 SELECT 0,b FROM bug59733; +CREATE INDEX b ON bug59733 (b); +DELETE FROM bug59733 WHERE (a%100)=0; +DROP INDEX b ON bug59733; +CREATE INDEX b ON bug59733 (b); +DROP TABLE bug59733; diff --git a/mysql-test/suite/innodb/r/innodb_corrupt_bit.result b/mysql-test/suite/innodb/r/innodb_corrupt_bit.result new file mode 100644 index 00000000000..c88e1ed2504 --- /dev/null +++ b/mysql-test/suite/innodb/r/innodb_corrupt_bit.result @@ -0,0 +1,81 @@ +set names utf8; +CREATE TABLE corrupt_bit_test_ā( +a INT AUTO_INCREMENT PRIMARY KEY, +b CHAR(100), +c INT, +z INT, +INDEX(b)) +ENGINE=InnoDB; +INSERT INTO corrupt_bit_test_ā VALUES(0,'x',1, 1); +CREATE UNIQUE INDEX idxā ON corrupt_bit_test_ā(c, b); +CREATE UNIQUE INDEX idxē ON corrupt_bit_test_ā(z, b); +SELECT * FROM corrupt_bit_test_ā; +a b c z +1 x 1 1 +select @@unique_checks; +@@unique_checks +0 +select @@innodb_change_buffering_debug; +@@innodb_change_buffering_debug +1 +INSERT INTO corrupt_bit_test_ā SELECT 0,b,c+1,z+1 FROM corrupt_bit_test_ā; +INSERT INTO corrupt_bit_test_ā SELECT 0,b,c+10,z+10 FROM corrupt_bit_test_ā; +INSERT INTO corrupt_bit_test_ā SELECT 0,b,c+20,z+20 FROM corrupt_bit_test_ā; +INSERT INTO corrupt_bit_test_ā SELECT 0,b,c+50,z+50 FROM corrupt_bit_test_ā; +INSERT INTO corrupt_bit_test_ā SELECT 0,b,c+100,z+100 FROM corrupt_bit_test_ā; +INSERT INTO corrupt_bit_test_ā SELECT 0,b,c+200,z+200 FROM corrupt_bit_test_ā; +INSERT INTO corrupt_bit_test_ā SELECT 0,b,c+400,z+400 FROM corrupt_bit_test_ā; +INSERT INTO corrupt_bit_test_ā SELECT 0,b,c+800,z+800 FROM corrupt_bit_test_ā; +INSERT INTO corrupt_bit_test_ā SELECT 0,b,c+1600,z+1600 FROM corrupt_bit_test_ā; +INSERT INTO corrupt_bit_test_ā SELECT 0,b,c+4000,z+4000 FROM corrupt_bit_test_ā; +select count(*) from corrupt_bit_test_ā; +count(*) +1024 +CREATE INDEX idx3 ON corrupt_bit_test_ā(b, c); +INSERT INTO corrupt_bit_test_ā VALUES(13000,'x',1,1); +CREATE INDEX idx4 ON corrupt_bit_test_ā(b, z); +check table corrupt_bit_test_ā; +Table Op Msg_type Msg_text +test.corrupt_bit_test_ā check Warning InnoDB: The B-tree of index "idxā" is corrupted. +test.corrupt_bit_test_ā check Warning InnoDB: The B-tree of index "idxē" is corrupted. +test.corrupt_bit_test_ā check error Corrupt +select c from corrupt_bit_test_ā; +ERROR HY000: Incorrect key file for table 'corrupt_bit_test_ā'; try to repair it +select z from corrupt_bit_test_ā; +ERROR HY000: Incorrect key file for table 'corrupt_bit_test_ā'; try to repair it +show warnings; +Level Code Message +Warning 179 InnoDB: Index "idxē" for table "test"."corrupt_bit_test_ā" is marked as corrupted +Error 1034 Incorrect key file for table 'corrupt_bit_test_ā'; try to repair it +insert into corrupt_bit_test_ā values (10001, "a", 20001, 20001); +select * from corrupt_bit_test_ā use index(primary) where a = 10001; +a b c z +10001 a 20001 20001 +begin; +insert into corrupt_bit_test_ā values (10002, "a", 20002, 20002); +delete from corrupt_bit_test_ā where a = 10001; +insert into corrupt_bit_test_ā values (10001, "a", 20001, 20001); +rollback; +drop index idxā on corrupt_bit_test_ā; +check table corrupt_bit_test_ā; +Table Op Msg_type Msg_text +test.corrupt_bit_test_ā check Warning InnoDB: Index "idxē" is marked as corrupted +test.corrupt_bit_test_ā check error Corrupt +set names utf8; +select z from corrupt_bit_test_ā; +ERROR HY000: Incorrect key file for table 'corrupt_bit_test_ā'; try to repair it +drop index idxē on corrupt_bit_test_ā; +select z from corrupt_bit_test_ā limit 10; +z +20001 +1 +1 +2 +11 +12 +21 +22 +31 +32 +drop table corrupt_bit_test_ā; +SET GLOBAL innodb_change_buffering_debug = 0; diff --git a/mysql-test/suite/innodb/t/innodb-index.test b/mysql-test/suite/innodb/t/innodb-index.test index fad90e280fc..d52237e02e3 100644 --- a/mysql-test/suite/innodb/t/innodb-index.test +++ b/mysql-test/suite/innodb/t/innodb-index.test @@ -9,7 +9,7 @@ let $format=`select @@innodb_file_format`; set global innodb_file_per_table=on; set global innodb_file_format='Barracuda'; -# Test an assertion failure on purge. +# Bug #12429576 - Test an assertion failure on purge. CREATE TABLE t1_purge ( A INT, B BLOB, C BLOB, D BLOB, E BLOB, @@ -59,6 +59,68 @@ DELETE FROM t1_purge; DELETE FROM t2_purge; DELETE FROM t3_purge; DELETE FROM t4_purge; +# Instead of doing a --sleep 10, wait until the rest of the tests in +# this file complete before dropping the tables. By then, the purge thread +# will have delt with the updates above. + +# Bug#12637786 - Bad assert by purge thread for records with external data +# used in secondary indexes. +SET @r=REPEAT('a',500); +CREATE TABLE t12637786(a INT, + v1 VARCHAR(500), v2 VARCHAR(500), v3 VARCHAR(500), + v4 VARCHAR(500), v5 VARCHAR(500), v6 VARCHAR(500), + v7 VARCHAR(500), v8 VARCHAR(500), v9 VARCHAR(500), + v10 VARCHAR(500), v11 VARCHAR(500), v12 VARCHAR(500), + v13 VARCHAR(500), v14 VARCHAR(500), v15 VARCHAR(500), + v16 VARCHAR(500), v17 VARCHAR(500), v18 VARCHAR(500) +) ENGINE=InnoDB ROW_FORMAT=DYNAMIC; +CREATE INDEX idx1 ON t12637786(a,v1); +INSERT INTO t12637786 VALUES(9,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r); +UPDATE t12637786 SET a=1000; +DELETE FROM t12637786; +# We need to activate the purge thread at this point to make sure it does not +# assert and is able to clean up the old versions of secondary index entries. +# But instead of doing a --sleep 10, wait until the rest of the tests in +# this file complete before dropping the table. By then, the purge thread +# will have delt with the updates above. + +# Bug#12963823 - Test that the purge thread does not crash when +# the number of indexes has changed since the UNDO record was logged. +create table t12963823(a blob,b blob,c blob,d blob,e blob,f blob,g blob,h blob, + i blob,j blob,k blob,l blob,m blob,n blob,o blob,p blob) + engine=innodb row_format=dynamic; +SET @r = repeat('a', 767); +insert into t12963823 values (@r,@r,@r,@r, @r,@r,@r,@r, @r,@r,@r,@r, @r,@r,@r,@r); +create index ndx_a on t12963823 (a(500)); +create index ndx_b on t12963823 (b(500)); +create index ndx_c on t12963823 (c(500)); +create index ndx_d on t12963823 (d(500)); +create index ndx_e on t12963823 (e(500)); +create index ndx_f on t12963823 (f(500)); +create index ndx_k on t12963823 (k(500)); +create index ndx_l on t12963823 (l(500)); + +SET @r = repeat('b', 500); +update t12963823 set a=@r,b=@r,c=@r,d=@r; +update t12963823 set e=@r,f=@r,g=@r,h=@r; +update t12963823 set i=@r,j=@r,k=@r,l=@r; +update t12963823 set m=@r,n=@r,o=@r,p=@r; +alter table t12963823 drop index ndx_a; +alter table t12963823 drop index ndx_b; +create index ndx_g on t12963823 (g(500)); +create index ndx_h on t12963823 (h(500)); +create index ndx_i on t12963823 (i(500)); +create index ndx_j on t12963823 (j(500)); +create index ndx_m on t12963823 (m(500)); +create index ndx_n on t12963823 (n(500)); +create index ndx_o on t12963823 (o(500)); +create index ndx_p on t12963823 (p(500)); +show create table t12963823; +# We need to activate the purge thread at this point to see if it crashes +# but instead of doing a --sleep 10, wait until the rest of the tests in +# this file complete before dropping the table. By then, the purge thread +# will have delt with the updates above. + eval set global innodb_file_per_table=$per_table; eval set global innodb_file_format=$format; @@ -459,23 +521,18 @@ create index t1u on t1 (u(767)); drop table t1; -# Bug#12637786 -SET @r=REPEAT('a',500); -CREATE TABLE t1(a INT, - v1 VARCHAR(500), v2 VARCHAR(500), v3 VARCHAR(500), - v4 VARCHAR(500), v5 VARCHAR(500), v6 VARCHAR(500), - v7 VARCHAR(500), v8 VARCHAR(500), v9 VARCHAR(500), - v10 VARCHAR(500), v11 VARCHAR(500), v12 VARCHAR(500), - v13 VARCHAR(500), v14 VARCHAR(500), v15 VARCHAR(500), - v16 VARCHAR(500), v17 VARCHAR(500), v18 VARCHAR(500) +# Bug#12547647 UPDATE LOGGING COULD EXCEED LOG PAGE SIZE +CREATE TABLE bug12547647( +a INT NOT NULL, b BLOB NOT NULL, c TEXT, +PRIMARY KEY (b(10), a), INDEX (c(767)), INDEX(b(767)) ) ENGINE=InnoDB ROW_FORMAT=DYNAMIC; -CREATE INDEX idx1 ON t1(a,v1); -INSERT INTO t1 VALUES(9,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r); -UPDATE t1 SET a=1000; -DELETE FROM t1; -# Let the purge thread clean up this file. --- sleep 10 -DROP TABLE t1; + +INSERT INTO bug12547647 VALUES (5,repeat('khdfo5AlOq',1900),repeat('g',7751)); +COMMIT; +# The following used to cause infinite undo log allocation. +--error ER_UNDO_RECORD_TOO_BIG +UPDATE bug12547647 SET c = REPEAT('b',16928); +DROP TABLE bug12547647; eval set global innodb_file_per_table=$per_table; eval set global innodb_file_format=$format; @@ -623,6 +680,8 @@ DROP TABLE t1; #this delay is needed because 45225_2 is disabled, to allow the purge to run SELECT SLEEP(10); DROP TABLE t1_purge, t2_purge, t3_purge, t4_purge; +DROP TABLE t12637786; +DROP TABLE t12963823; # # restore environment to the state it was before this test execution diff --git a/mysql-test/suite/innodb/t/innodb_bug59733.test b/mysql-test/suite/innodb/t/innodb_bug59733.test new file mode 100644 index 00000000000..0b1bff51932 --- /dev/null +++ b/mysql-test/suite/innodb/t/innodb_bug59733.test @@ -0,0 +1,53 @@ +# +# Bug #59733 Possible deadlock when buffered changes are to be discarded +# in buf_page_create +# +-- source include/have_innodb.inc + +-- disable_query_log +# The flag innodb_change_buffering_debug is only available in debug builds. +# It instructs InnoDB to try to evict pages from the buffer pool when +# change buffering is possible, so that the change buffer will be used +# whenever possible. +-- error 0,ER_UNKNOWN_SYSTEM_VARIABLE +SET @innodb_change_buffering_debug_orig = @@innodb_change_buffering_debug; +-- error 0,ER_UNKNOWN_SYSTEM_VARIABLE +SET GLOBAL innodb_change_buffering_debug = 1; +-- enable_query_log + +CREATE TABLE bug59733(a INT AUTO_INCREMENT PRIMARY KEY,b CHAR(1))ENGINE=InnoDB; + +# Create enough rows for the table, so that the insert buffer will be +# used. There must be multiple index pages, because changes to the +# root page are never buffered. + +INSERT INTO bug59733 VALUES(0,'x'); +INSERT INTO bug59733 SELECT 0,b FROM bug59733; +INSERT INTO bug59733 SELECT 0,b FROM bug59733; +INSERT INTO bug59733 SELECT 0,b FROM bug59733; +INSERT INTO bug59733 SELECT 0,b FROM bug59733; +INSERT INTO bug59733 SELECT 0,b FROM bug59733; +INSERT INTO bug59733 SELECT 0,b FROM bug59733; +INSERT INTO bug59733 SELECT 0,b FROM bug59733; +INSERT INTO bug59733 SELECT 0,b FROM bug59733; +INSERT INTO bug59733 SELECT 0,b FROM bug59733; +INSERT INTO bug59733 SELECT 0,b FROM bug59733; +INSERT INTO bug59733 SELECT 0,b FROM bug59733; + +# Create the secondary index for which changes will be buffered. +CREATE INDEX b ON bug59733 (b); + +# This should be buffered, if innodb_change_buffering_debug = 1 is in effect. +DELETE FROM bug59733 WHERE (a%100)=0; + +# Drop the index in order to get free pages with orphaned buffered changes. +DROP INDEX b ON bug59733; + +# Create the index and attempt to reuse pages for which buffered changes exist. +CREATE INDEX b ON bug59733 (b); + +DROP TABLE bug59733; + +-- disable_query_log +-- error 0, ER_UNKNOWN_SYSTEM_VARIABLE +SET GLOBAL innodb_change_buffering_debug = @innodb_change_buffering_debug_orig; diff --git a/mysql-test/suite/innodb/t/innodb_corrupt_bit.test b/mysql-test/suite/innodb/t/innodb_corrupt_bit.test new file mode 100644 index 00000000000..34991362f98 --- /dev/null +++ b/mysql-test/suite/innodb/t/innodb_corrupt_bit.test @@ -0,0 +1,120 @@ +# +# Test for persistent corrupt bit for corrupted index and table +# +-- source include/have_innodb.inc + +# This test needs debug server +--source include/have_debug.inc + +-- disable_query_log +# This test setup is extracted from bug56680.test: +# The flag innodb_change_buffering_debug is only available in debug builds. +# It instructs InnoDB to try to evict pages from the buffer pool when +# change buffering is possible, so that the change buffer will be used +# whenever possible. +-- error 0,ER_UNKNOWN_SYSTEM_VARIABLE +SET @innodb_change_buffering_debug_orig = @@innodb_change_buffering_debug; +-- error 0,ER_UNKNOWN_SYSTEM_VARIABLE +SET GLOBAL innodb_change_buffering_debug = 1; + +# Turn off Unique Check to create corrupted index with dup key +SET UNIQUE_CHECKS=0; + +-- enable_query_log + +set names utf8; + +CREATE TABLE corrupt_bit_test_ā( + a INT AUTO_INCREMENT PRIMARY KEY, + b CHAR(100), + c INT, + z INT, + INDEX(b)) +ENGINE=InnoDB; + +INSERT INTO corrupt_bit_test_ā VALUES(0,'x',1, 1); + +# This is the first unique index we intend to corrupt +CREATE UNIQUE INDEX idxā ON corrupt_bit_test_ā(c, b); + +# This is the second unique index we intend to corrupt +CREATE UNIQUE INDEX idxē ON corrupt_bit_test_ā(z, b); + +SELECT * FROM corrupt_bit_test_ā; + +select @@unique_checks; +select @@innodb_change_buffering_debug; + +# Create enough rows for the table, so that the insert buffer will be +# used for modifying the secondary index page. There must be multiple +# index pages, because changes to the root page are never buffered. + +INSERT INTO corrupt_bit_test_ā SELECT 0,b,c+1,z+1 FROM corrupt_bit_test_ā; +INSERT INTO corrupt_bit_test_ā SELECT 0,b,c+10,z+10 FROM corrupt_bit_test_ā; +INSERT INTO corrupt_bit_test_ā SELECT 0,b,c+20,z+20 FROM corrupt_bit_test_ā; +INSERT INTO corrupt_bit_test_ā SELECT 0,b,c+50,z+50 FROM corrupt_bit_test_ā; +INSERT INTO corrupt_bit_test_ā SELECT 0,b,c+100,z+100 FROM corrupt_bit_test_ā; +INSERT INTO corrupt_bit_test_ā SELECT 0,b,c+200,z+200 FROM corrupt_bit_test_ā; +INSERT INTO corrupt_bit_test_ā SELECT 0,b,c+400,z+400 FROM corrupt_bit_test_ā; +INSERT INTO corrupt_bit_test_ā SELECT 0,b,c+800,z+800 FROM corrupt_bit_test_ā; +INSERT INTO corrupt_bit_test_ā SELECT 0,b,c+1600,z+1600 FROM corrupt_bit_test_ā; +INSERT INTO corrupt_bit_test_ā SELECT 0,b,c+4000,z+4000 FROM corrupt_bit_test_ā; + +select count(*) from corrupt_bit_test_ā; + +CREATE INDEX idx3 ON corrupt_bit_test_ā(b, c); + +# Create a dup key error on index "idxē" and "idxā" by inserting a dup value +INSERT INTO corrupt_bit_test_ā VALUES(13000,'x',1,1); + +# creating an index should succeed even if other secondary indexes are corrupted +CREATE INDEX idx4 ON corrupt_bit_test_ā(b, z); + +# Check table will find the unique indexes corrupted +# with dup key +check table corrupt_bit_test_ā; + +# This selection intend to use the corrupted index. Expect to fail +-- error ER_NOT_KEYFILE +select c from corrupt_bit_test_ā; + +-- error ER_NOT_KEYFILE +select z from corrupt_bit_test_ā; + +show warnings; + +# Since corrupted index is a secondary index, we only disable such +# index and allow other DML to proceed +insert into corrupt_bit_test_ā values (10001, "a", 20001, 20001); + +# This does not use the corrupted index, expect to succeed +select * from corrupt_bit_test_ā use index(primary) where a = 10001; + +# Some more DMLs +begin; +insert into corrupt_bit_test_ā values (10002, "a", 20002, 20002); +delete from corrupt_bit_test_ā where a = 10001; +insert into corrupt_bit_test_ā values (10001, "a", 20001, 20001); +rollback; + +# Drop one corrupted index before reboot +drop index idxā on corrupt_bit_test_ā; + +check table corrupt_bit_test_ā; + +set names utf8; + +-- error ER_NOT_KEYFILE +select z from corrupt_bit_test_ā; + +# Drop the corrupted index +drop index idxē on corrupt_bit_test_ā; + +# Now select back to normal +select z from corrupt_bit_test_ā limit 10; + +# Drop table +drop table corrupt_bit_test_ā; + +-- error 0, ER_UNKNOWN_SYSTEM_VARIABLE +SET GLOBAL innodb_change_buffering_debug = 0; diff --git a/mysql-test/suite/sys_vars/r/innodb_file_per_table_basic.result b/mysql-test/suite/sys_vars/r/innodb_file_per_table_basic.result index 163eb31f686..ecf11351cd9 100644 --- a/mysql-test/suite/sys_vars/r/innodb_file_per_table_basic.result +++ b/mysql-test/suite/sys_vars/r/innodb_file_per_table_basic.result @@ -1,13 +1,29 @@ +SET @start_global_value = @@global.innodb_file_per_table; +SELECT @start_global_value; +@start_global_value +0 '#---------------------BS_STVARS_028_01----------------------#' SELECT COUNT(@@GLOBAL.innodb_file_per_table); COUNT(@@GLOBAL.innodb_file_per_table) 1 1 Expected '#---------------------BS_STVARS_028_02----------------------#' -SELECT COUNT(@@GLOBAL.innodb_file_per_table); -COUNT(@@GLOBAL.innodb_file_per_table) +SET @@global.innodb_file_per_table = 0; +SELECT @@global.innodb_file_per_table; +@@global.innodb_file_per_table +0 +SET @@global.innodb_file_per_table ='On' ; +SELECT @@global.innodb_file_per_table; +@@global.innodb_file_per_table +1 +SET @@global.innodb_file_per_table ='Off' ; +SELECT @@global.innodb_file_per_table; +@@global.innodb_file_per_table +0 +SET @@global.innodb_file_per_table = 1; +SELECT @@global.innodb_file_per_table; +@@global.innodb_file_per_table 1 -1 Expected '#---------------------BS_STVARS_028_03----------------------#' SELECT IF(@@GLOBAL.innodb_file_per_table,'ON','OFF') = VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES @@ -47,4 +63,7 @@ COUNT(@@GLOBAL.innodb_file_per_table) 1 Expected SELECT innodb_file_per_table = @@SESSION.innodb_file_per_table; ERROR 42S22: Unknown column 'innodb_file_per_table' in 'field list' -Expected error 'Readonly variable' +SET @@global.innodb_file_per_table = @start_global_value; +SELECT @@global.innodb_file_per_table; +@@global.innodb_file_per_table +0 diff --git a/mysql-test/suite/sys_vars/r/innodb_force_load_corrupted_basic.result b/mysql-test/suite/sys_vars/r/innodb_force_load_corrupted_basic.result new file mode 100644 index 00000000000..bc9b7019eb8 --- /dev/null +++ b/mysql-test/suite/sys_vars/r/innodb_force_load_corrupted_basic.result @@ -0,0 +1,53 @@ +'#---------------------BS_STVARS_031_01----------------------#' +SELECT COUNT(@@GLOBAL.innodb_force_load_corrupted); +COUNT(@@GLOBAL.innodb_force_load_corrupted) +1 +1 Expected +'#---------------------BS_STVARS_031_02----------------------#' +SET @@GLOBAL.innodb_force_load_corrupted=1; +ERROR HY000: Variable 'innodb_force_load_corrupted' is a read only variable +Expected error 'Read only variable' +SELECT COUNT(@@GLOBAL.innodb_force_load_corrupted); +COUNT(@@GLOBAL.innodb_force_load_corrupted) +1 +1 Expected +'#---------------------BS_STVARS_031_03----------------------#' +SELECT IF(@@GLOBAL.innodb_force_load_corrupted, "ON", "OFF") = VARIABLE_VALUE +FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES +WHERE VARIABLE_NAME='innodb_force_load_corrupted'; +IF(@@GLOBAL.innodb_force_load_corrupted, "ON", "OFF") = VARIABLE_VALUE +1 +1 Expected +SELECT COUNT(@@GLOBAL.innodb_force_load_corrupted); +COUNT(@@GLOBAL.innodb_force_load_corrupted) +1 +1 Expected +SELECT COUNT(VARIABLE_VALUE) +FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES +WHERE VARIABLE_NAME='innodb_force_load_corrupted'; +COUNT(VARIABLE_VALUE) +1 +1 Expected +'#---------------------BS_STVARS_031_04----------------------#' +SELECT @@innodb_force_load_corrupted = @@GLOBAL.innodb_force_load_corrupted; +@@innodb_force_load_corrupted = @@GLOBAL.innodb_force_load_corrupted +1 +1 Expected +'#---------------------BS_STVARS_031_05----------------------#' +SELECT COUNT(@@innodb_force_load_corrupted); +COUNT(@@innodb_force_load_corrupted) +1 +1 Expected +SELECT COUNT(@@local.innodb_force_load_corrupted); +ERROR HY000: Variable 'innodb_force_load_corrupted' is a GLOBAL variable +Expected error 'Variable is a GLOBAL variable' +SELECT COUNT(@@SESSION.innodb_force_load_corrupted); +ERROR HY000: Variable 'innodb_force_load_corrupted' is a GLOBAL variable +Expected error 'Variable is a GLOBAL variable' +SELECT COUNT(@@GLOBAL.innodb_force_load_corrupted); +COUNT(@@GLOBAL.innodb_force_load_corrupted) +1 +1 Expected +SELECT innodb_force_load_corrupted = @@SESSION.innodb_force_load_corrupted; +ERROR 42S22: Unknown column 'innodb_force_load_corrupted' in 'field list' +Expected error 'Readonly variable' diff --git a/mysql-test/suite/sys_vars/r/innodb_large_prefix_basic.result b/mysql-test/suite/sys_vars/r/innodb_large_prefix_basic.result new file mode 100644 index 00000000000..adb56b347cd --- /dev/null +++ b/mysql-test/suite/sys_vars/r/innodb_large_prefix_basic.result @@ -0,0 +1,92 @@ +SET @start_global_value = @@global.innodb_large_prefix; +SELECT @start_global_value; +@start_global_value +0 +Valid values are 'ON' and 'OFF' +select @@global.innodb_large_prefix in (0, 1); +@@global.innodb_large_prefix in (0, 1) +1 +select @@global.innodb_large_prefix; +@@global.innodb_large_prefix +0 +select @@session.innodb_large_prefix; +ERROR HY000: Variable 'innodb_large_prefix' is a GLOBAL variable +show global variables like 'innodb_large_prefix'; +Variable_name Value +innodb_large_prefix OFF +show session variables like 'innodb_large_prefix'; +Variable_name Value +innodb_large_prefix OFF +select * from information_schema.global_variables where variable_name='innodb_large_prefix'; +VARIABLE_NAME VARIABLE_VALUE +INNODB_LARGE_PREFIX OFF +select * from information_schema.session_variables where variable_name='innodb_large_prefix'; +VARIABLE_NAME VARIABLE_VALUE +INNODB_LARGE_PREFIX OFF +set global innodb_large_prefix='OFF'; +select @@global.innodb_large_prefix; +@@global.innodb_large_prefix +0 +select * from information_schema.global_variables where variable_name='innodb_large_prefix'; +VARIABLE_NAME VARIABLE_VALUE +INNODB_LARGE_PREFIX OFF +select * from information_schema.session_variables where variable_name='innodb_large_prefix'; +VARIABLE_NAME VARIABLE_VALUE +INNODB_LARGE_PREFIX OFF +set @@global.innodb_large_prefix=1; +select @@global.innodb_large_prefix; +@@global.innodb_large_prefix +1 +select * from information_schema.global_variables where variable_name='innodb_large_prefix'; +VARIABLE_NAME VARIABLE_VALUE +INNODB_LARGE_PREFIX ON +select * from information_schema.session_variables where variable_name='innodb_large_prefix'; +VARIABLE_NAME VARIABLE_VALUE +INNODB_LARGE_PREFIX ON +set global innodb_large_prefix=0; +select @@global.innodb_large_prefix; +@@global.innodb_large_prefix +0 +select * from information_schema.global_variables where variable_name='innodb_large_prefix'; +VARIABLE_NAME VARIABLE_VALUE +INNODB_LARGE_PREFIX OFF +select * from information_schema.session_variables where variable_name='innodb_large_prefix'; +VARIABLE_NAME VARIABLE_VALUE +INNODB_LARGE_PREFIX OFF +set @@global.innodb_large_prefix='ON'; +select @@global.innodb_large_prefix; +@@global.innodb_large_prefix +1 +select * from information_schema.global_variables where variable_name='innodb_large_prefix'; +VARIABLE_NAME VARIABLE_VALUE +INNODB_LARGE_PREFIX ON +select * from information_schema.session_variables where variable_name='innodb_large_prefix'; +VARIABLE_NAME VARIABLE_VALUE +INNODB_LARGE_PREFIX ON +set session innodb_large_prefix='OFF'; +ERROR HY000: Variable 'innodb_large_prefix' is a GLOBAL variable and should be set with SET GLOBAL +set @@session.innodb_large_prefix='ON'; +ERROR HY000: Variable 'innodb_large_prefix' is a GLOBAL variable and should be set with SET GLOBAL +set global innodb_large_prefix=1.1; +ERROR 42000: Incorrect argument type to variable 'innodb_large_prefix' +set global innodb_large_prefix=1e1; +ERROR 42000: Incorrect argument type to variable 'innodb_large_prefix' +set global innodb_large_prefix=2; +ERROR 42000: Variable 'innodb_large_prefix' can't be set to the value of '2' +NOTE: The following should fail with ER_WRONG_VALUE_FOR_VAR (BUG#50643) +set global innodb_large_prefix=-3; +select @@global.innodb_large_prefix; +@@global.innodb_large_prefix +1 +select * from information_schema.global_variables where variable_name='innodb_large_prefix'; +VARIABLE_NAME VARIABLE_VALUE +INNODB_LARGE_PREFIX ON +select * from information_schema.session_variables where variable_name='innodb_large_prefix'; +VARIABLE_NAME VARIABLE_VALUE +INNODB_LARGE_PREFIX ON +set global innodb_large_prefix='AUTO'; +ERROR 42000: Variable 'innodb_large_prefix' can't be set to the value of 'AUTO' +SET @@global.innodb_large_prefix = @start_global_value; +SELECT @@global.innodb_large_prefix; +@@global.innodb_large_prefix +0 diff --git a/mysql-test/suite/sys_vars/r/innodb_lock_wait_timeout_basic.result b/mysql-test/suite/sys_vars/r/innodb_lock_wait_timeout_basic.result index 89960e5860f..1dcc2d554ce 100644 --- a/mysql-test/suite/sys_vars/r/innodb_lock_wait_timeout_basic.result +++ b/mysql-test/suite/sys_vars/r/innodb_lock_wait_timeout_basic.result @@ -1,13 +1,21 @@ +SET @start_global_value=@@global.innodb_lock_wait_timeout; +SELECT @start_global_value; +@start_global_value +50 '#---------------------BS_STVARS_032_01----------------------#' SELECT COUNT(@@GLOBAL.innodb_lock_wait_timeout); COUNT(@@GLOBAL.innodb_lock_wait_timeout) 1 1 Expected '#---------------------BS_STVARS_032_02----------------------#' -SELECT COUNT(@@GLOBAL.innodb_lock_wait_timeout); -COUNT(@@GLOBAL.innodb_lock_wait_timeout) -1 -1 Expected +SET global innodb_lock_wait_timeout=60; +SELECT @@global.innodb_lock_wait_timeout; +@@global.innodb_lock_wait_timeout +60 +SET session innodb_lock_wait_timeout=60; +SELECT @@session.innodb_lock_wait_timeout; +@@session.innodb_lock_wait_timeout +60 '#---------------------BS_STVARS_032_03----------------------#' SELECT @@GLOBAL.innodb_lock_wait_timeout = VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES @@ -47,4 +55,7 @@ COUNT(@@GLOBAL.innodb_lock_wait_timeout) 1 Expected SELECT innodb_lock_wait_timeout = @@SESSION.innodb_lock_wait_timeout; ERROR 42S22: Unknown column 'innodb_lock_wait_timeout' in 'field list' -Expected error 'Readonly variable' +SET @@global.innodb_lock_wait_timeout = @start_global_value; +SELECT @@global.innodb_lock_wait_timeout; +@@global.innodb_lock_wait_timeout +50 diff --git a/mysql-test/suite/sys_vars/r/plugin_dir_basic.result b/mysql-test/suite/sys_vars/r/plugin_dir_basic.result index f81cae24dda..a5f36de73fa 100644 --- a/mysql-test/suite/sys_vars/r/plugin_dir_basic.result +++ b/mysql-test/suite/sys_vars/r/plugin_dir_basic.result @@ -1,20 +1,20 @@ select @@global.plugin_dir; @@global.plugin_dir -MYSQL_LIBDIR/plugin +MYSQL_TMP_DIR select @@session.plugin_dir; ERROR HY000: Variable 'plugin_dir' is a GLOBAL variable show global variables like 'plugin_dir'; Variable_name Value -plugin_dir MYSQL_LIBDIR/plugin +plugin_dir MYSQL_TMP_DIR show session variables like 'plugin_dir'; Variable_name Value -plugin_dir MYSQL_LIBDIR/plugin +plugin_dir MYSQL_TMP_DIR select * from information_schema.global_variables where variable_name='plugin_dir'; VARIABLE_NAME VARIABLE_VALUE -PLUGIN_DIR MYSQL_LIBDIR/plugin +PLUGIN_DIR MYSQL_TMP_DIR select * from information_schema.session_variables where variable_name='plugin_dir'; VARIABLE_NAME VARIABLE_VALUE -PLUGIN_DIR MYSQL_LIBDIR/plugin +PLUGIN_DIR MYSQL_TMP_DIR set global plugin_dir=1; ERROR HY000: Variable 'plugin_dir' is a read only variable set session plugin_dir=1; diff --git a/mysql-test/suite/sys_vars/t/innodb_autoinc_lock_mode_basic.test b/mysql-test/suite/sys_vars/t/innodb_autoinc_lock_mode_basic.test index 5b6fa943bbe..e07234a9152 100644 --- a/mysql-test/suite/sys_vars/t/innodb_autoinc_lock_mode_basic.test +++ b/mysql-test/suite/sys_vars/t/innodb_autoinc_lock_mode_basic.test @@ -1,8 +1,7 @@ ################# mysql-test\t\innodb_autoinc_lock_mode_basic.test ############ # # # Variable Name: innodb_autoinc_lock_mode # -# Scope: GLOBAL # -# Access Type: Dynamic # +# Access Type: Static # # Data Type: Numeric # # Default Value: 1 # # Range: 0,1,2 # diff --git a/mysql-test/suite/sys_vars/t/innodb_fast_shutdown_basic.test b/mysql-test/suite/sys_vars/t/innodb_fast_shutdown_basic.test index 636309a3088..e1b62046313 100644 --- a/mysql-test/suite/sys_vars/t/innodb_fast_shutdown_basic.test +++ b/mysql-test/suite/sys_vars/t/innodb_fast_shutdown_basic.test @@ -3,9 +3,9 @@ # Variable Name: innodb_fast_shutdown # # Scope: GLOBAL # # Access Type: Dynamic # -# Data Type: boolean # +# Data Type: numeric # # Default Value: 1 # -# Valid Values: 0,1 # +# Valid Values: 0,1,2 # # # # # # Creation Date: 2008-02-20 # diff --git a/mysql-test/suite/sys_vars/t/innodb_file_per_table_basic.test b/mysql-test/suite/sys_vars/t/innodb_file_per_table_basic.test index 76a50df8879..1478d6df2e9 100644 --- a/mysql-test/suite/sys_vars/t/innodb_file_per_table_basic.test +++ b/mysql-test/suite/sys_vars/t/innodb_file_per_table_basic.test @@ -4,7 +4,7 @@ # # # Variable Name: innodb_file_per_table # # Scope: Global # -# Access Type: Static # +# Access Type: Dynamic # # Data Type: boolean # # # # # @@ -24,6 +24,10 @@ --source include/have_innodb.inc +SET @start_global_value = @@global.innodb_file_per_table; +SELECT @start_global_value; + + --echo '#---------------------BS_STVARS_028_01----------------------#' #################################################################### # Displaying default value # @@ -37,11 +41,17 @@ SELECT COUNT(@@GLOBAL.innodb_file_per_table); # Check if Value can set # #################################################################### -SELECT COUNT(@@GLOBAL.innodb_file_per_table); ---echo 1 Expected +SET @@global.innodb_file_per_table = 0; +SELECT @@global.innodb_file_per_table; +SET @@global.innodb_file_per_table ='On' ; +SELECT @@global.innodb_file_per_table; +SET @@global.innodb_file_per_table ='Off' ; +SELECT @@global.innodb_file_per_table; +SET @@global.innodb_file_per_table = 1; +SELECT @@global.innodb_file_per_table; --echo '#---------------------BS_STVARS_028_03----------------------#' ################################################################# @@ -93,6 +103,10 @@ SELECT COUNT(@@GLOBAL.innodb_file_per_table); --Error ER_BAD_FIELD_ERROR SELECT innodb_file_per_table = @@SESSION.innodb_file_per_table; ---echo Expected error 'Readonly variable' +# +# Cleanup +# +SET @@global.innodb_file_per_table = @start_global_value; +SELECT @@global.innodb_file_per_table; diff --git a/mysql-test/suite/sys_vars/t/innodb_force_load_corrupted_basic.test b/mysql-test/suite/sys_vars/t/innodb_force_load_corrupted_basic.test new file mode 100644 index 00000000000..1726b320f47 --- /dev/null +++ b/mysql-test/suite/sys_vars/t/innodb_force_load_corrupted_basic.test @@ -0,0 +1,102 @@ + + +################## mysql-test\t\innodb_force_load_corrupted_basic.test ##### +# # +# Variable Name: innodb_force_load_corrupted # +# Scope: Global # +# Access Type: Static # +# Data Type: boolean # +# # +# # +# Creation Date: 2008-02-07 # +# Author : Sharique Abdullah # +# # +# # +# Description:Test Cases of Dynamic System Variable innodb_force_load_corrupted# +# that checks the behavior of this variable in the following ways # +# * Value Check # +# * Scope Check # +# # +# Reference: http://dev.mysql.com/doc/refman/5.1/en/ # +# server-system-variables.html # +# # +############################################################################### + +--source include/have_innodb.inc + +--echo '#---------------------BS_STVARS_031_01----------------------#' +#################################################################### +# Displaying default value # +#################################################################### +SELECT COUNT(@@GLOBAL.innodb_force_load_corrupted); +--echo 1 Expected + + +--echo '#---------------------BS_STVARS_031_02----------------------#' +#################################################################### +# Check if Value can set # +#################################################################### + +--error ER_INCORRECT_GLOBAL_LOCAL_VAR +SET @@GLOBAL.innodb_force_load_corrupted=1; +--echo Expected error 'Read only variable' + +SELECT COUNT(@@GLOBAL.innodb_force_load_corrupted); +--echo 1 Expected + + + + +--echo '#---------------------BS_STVARS_031_03----------------------#' +################################################################# +# Check if the value in GLOBAL Table matches value in variable # +################################################################# + +SELECT IF(@@GLOBAL.innodb_force_load_corrupted, "ON", "OFF") = VARIABLE_VALUE +FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES +WHERE VARIABLE_NAME='innodb_force_load_corrupted'; +--echo 1 Expected + +SELECT COUNT(@@GLOBAL.innodb_force_load_corrupted); +--echo 1 Expected + +SELECT COUNT(VARIABLE_VALUE) +FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES +WHERE VARIABLE_NAME='innodb_force_load_corrupted'; +--echo 1 Expected + + + +--echo '#---------------------BS_STVARS_031_04----------------------#' +################################################################################ +# Check if accessing variable with and without GLOBAL point to same variable # +################################################################################ +SELECT @@innodb_force_load_corrupted = @@GLOBAL.innodb_force_load_corrupted; +--echo 1 Expected + + + +--echo '#---------------------BS_STVARS_031_05----------------------#' +################################################################################ +# Check if innodb_force_load_corrupted can be accessed with and without @@ sign # +################################################################################ + +SELECT COUNT(@@innodb_force_load_corrupted); +--echo 1 Expected + +--Error ER_INCORRECT_GLOBAL_LOCAL_VAR +SELECT COUNT(@@local.innodb_force_load_corrupted); +--echo Expected error 'Variable is a GLOBAL variable' + +--Error ER_INCORRECT_GLOBAL_LOCAL_VAR +SELECT COUNT(@@SESSION.innodb_force_load_corrupted); +--echo Expected error 'Variable is a GLOBAL variable' + +SELECT COUNT(@@GLOBAL.innodb_force_load_corrupted); +--echo 1 Expected + +--Error ER_BAD_FIELD_ERROR +SELECT innodb_force_load_corrupted = @@SESSION.innodb_force_load_corrupted; +--echo Expected error 'Readonly variable' + + diff --git a/mysql-test/suite/sys_vars/t/innodb_io_capacity_basic.test b/mysql-test/suite/sys_vars/t/innodb_io_capacity_basic.test index 3f00b50cf08..0ced5800d4b 100644 --- a/mysql-test/suite/sys_vars/t/innodb_io_capacity_basic.test +++ b/mysql-test/suite/sys_vars/t/innodb_io_capacity_basic.test @@ -54,5 +54,9 @@ select * from information_schema.global_variables where variable_name='innodb_io set global innodb_io_capacity=100; select @@global.innodb_io_capacity; +# +# cleanup +# + SET @@global.innodb_io_capacity = @start_global_value; SELECT @@global.innodb_io_capacity; diff --git a/mysql-test/suite/sys_vars/t/innodb_large_prefix_basic.test b/mysql-test/suite/sys_vars/t/innodb_large_prefix_basic.test new file mode 100644 index 00000000000..582e9ffbee8 --- /dev/null +++ b/mysql-test/suite/sys_vars/t/innodb_large_prefix_basic.test @@ -0,0 +1,70 @@ + + +# 2010-01-25 - Added +# + +--source include/have_innodb.inc + +SET @start_global_value = @@global.innodb_large_prefix; +SELECT @start_global_value; + +# +# exists as global only +# +--echo Valid values are 'ON' and 'OFF' +select @@global.innodb_large_prefix in (0, 1); +select @@global.innodb_large_prefix; +--error ER_INCORRECT_GLOBAL_LOCAL_VAR +select @@session.innodb_large_prefix; +show global variables like 'innodb_large_prefix'; +show session variables like 'innodb_large_prefix'; +select * from information_schema.global_variables where variable_name='innodb_large_prefix'; +select * from information_schema.session_variables where variable_name='innodb_large_prefix'; + +# +# show that it's writable +# +set global innodb_large_prefix='OFF'; +select @@global.innodb_large_prefix; +select * from information_schema.global_variables where variable_name='innodb_large_prefix'; +select * from information_schema.session_variables where variable_name='innodb_large_prefix'; +set @@global.innodb_large_prefix=1; +select @@global.innodb_large_prefix; +select * from information_schema.global_variables where variable_name='innodb_large_prefix'; +select * from information_schema.session_variables where variable_name='innodb_large_prefix'; +set global innodb_large_prefix=0; +select @@global.innodb_large_prefix; +select * from information_schema.global_variables where variable_name='innodb_large_prefix'; +select * from information_schema.session_variables where variable_name='innodb_large_prefix'; +set @@global.innodb_large_prefix='ON'; +select @@global.innodb_large_prefix; +select * from information_schema.global_variables where variable_name='innodb_large_prefix'; +select * from information_schema.session_variables where variable_name='innodb_large_prefix'; +--error ER_GLOBAL_VARIABLE +set session innodb_large_prefix='OFF'; +--error ER_GLOBAL_VARIABLE +set @@session.innodb_large_prefix='ON'; + +# +# incorrect types +# +--error ER_WRONG_TYPE_FOR_VAR +set global innodb_large_prefix=1.1; +--error ER_WRONG_TYPE_FOR_VAR +set global innodb_large_prefix=1e1; +--error ER_WRONG_VALUE_FOR_VAR +set global innodb_large_prefix=2; +--echo NOTE: The following should fail with ER_WRONG_VALUE_FOR_VAR (BUG#50643) +set global innodb_large_prefix=-3; +select @@global.innodb_large_prefix; +select * from information_schema.global_variables where variable_name='innodb_large_prefix'; +select * from information_schema.session_variables where variable_name='innodb_large_prefix'; +--error ER_WRONG_VALUE_FOR_VAR +set global innodb_large_prefix='AUTO'; + +# +# Cleanup +# + +SET @@global.innodb_large_prefix = @start_global_value; +SELECT @@global.innodb_large_prefix; diff --git a/mysql-test/suite/sys_vars/t/innodb_lock_wait_timeout_basic.test b/mysql-test/suite/sys_vars/t/innodb_lock_wait_timeout_basic.test index 8cfd23fd6e7..f80b8e48736 100644 --- a/mysql-test/suite/sys_vars/t/innodb_lock_wait_timeout_basic.test +++ b/mysql-test/suite/sys_vars/t/innodb_lock_wait_timeout_basic.test @@ -3,13 +3,13 @@ ################## mysql-test\t\innodb_lock_wait_timeout_basic.test ########### # # # Variable Name: innodb_lock_wait_timeout # -# Scope: Global # -# Access Type: Static # +# Scope: Global , Session # +# Access Type: Dynamic # # Data Type: numeric # # # # # # Creation Date: 2008-02-07 # -# Author : Sharique Abdullah # +# Author : Sharique Abdullah # # # # # # Description:Test Cases of Dynamic System Variable innodb_lock_wait_timeout # @@ -24,6 +24,9 @@ --source include/have_innodb.inc +SET @start_global_value=@@global.innodb_lock_wait_timeout; +SELECT @start_global_value; + --echo '#---------------------BS_STVARS_032_01----------------------#' #################################################################### # Displaying default value # @@ -37,11 +40,10 @@ SELECT COUNT(@@GLOBAL.innodb_lock_wait_timeout); # Check if Value can set # #################################################################### -SELECT COUNT(@@GLOBAL.innodb_lock_wait_timeout); ---echo 1 Expected - - - +SET global innodb_lock_wait_timeout=60; +SELECT @@global.innodb_lock_wait_timeout; +SET session innodb_lock_wait_timeout=60; +SELECT @@session.innodb_lock_wait_timeout; --echo '#---------------------BS_STVARS_032_03----------------------#' ################################################################# @@ -89,6 +91,10 @@ SELECT COUNT(@@GLOBAL.innodb_lock_wait_timeout); --Error ER_BAD_FIELD_ERROR SELECT innodb_lock_wait_timeout = @@SESSION.innodb_lock_wait_timeout; ---echo Expected error 'Readonly variable' +# +# Cleanup +# +SET @@global.innodb_lock_wait_timeout = @start_global_value; +SELECT @@global.innodb_lock_wait_timeout; diff --git a/mysql-test/suite/sys_vars/t/innodb_max_dirty_pages_pct_basic.test b/mysql-test/suite/sys_vars/t/innodb_max_dirty_pages_pct_basic.test index 38c3acd92a2..7e70ed11351 100644 --- a/mysql-test/suite/sys_vars/t/innodb_max_dirty_pages_pct_basic.test +++ b/mysql-test/suite/sys_vars/t/innodb_max_dirty_pages_pct_basic.test @@ -4,8 +4,8 @@ # Scope: GLOBAL # # Access Type: Dynamic # # Data Type: Numeric # -# Default Value: 90 # -# Range: 0-1000 # +# Default Value: 75 # +# Range: 0-99 # # # # # # Creation Date: 2008-02-07 # diff --git a/mysql-test/suite/sys_vars/t/plugin_dir_basic-master.opt b/mysql-test/suite/sys_vars/t/plugin_dir_basic-master.opt new file mode 100644 index 00000000000..69a9f0def2a --- /dev/null +++ b/mysql-test/suite/sys_vars/t/plugin_dir_basic-master.opt @@ -0,0 +1 @@ +--plugin-dir=$MYSQL_TMP_DIR diff --git a/mysql-test/suite/sys_vars/t/plugin_dir_basic.test b/mysql-test/suite/sys_vars/t/plugin_dir_basic.test index d714950c807..59889f7ecb2 100644 --- a/mysql-test/suite/sys_vars/t/plugin_dir_basic.test +++ b/mysql-test/suite/sys_vars/t/plugin_dir_basic.test @@ -3,20 +3,20 @@ # # -# on windows it's <basedir>/lib/plugin -# on unix it's <basedir>/lib/mysql/plugin +# Don't rely on being able to guess the correct default. +# -master.opt file for this test sets plugin_dir to a known directory # ---replace_result $MYSQL_LIBDIR MYSQL_LIBDIR /mysql/ / +--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR /mysql/ / select @@global.plugin_dir; --error ER_INCORRECT_GLOBAL_LOCAL_VAR select @@session.plugin_dir; ---replace_result $MYSQL_LIBDIR MYSQL_LIBDIR /mysql/ / +--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR /mysql/ / show global variables like 'plugin_dir'; ---replace_result $MYSQL_LIBDIR MYSQL_LIBDIR /mysql/ / +--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR /mysql/ / show session variables like 'plugin_dir'; ---replace_result $MYSQL_LIBDIR MYSQL_LIBDIR /mysql/ / +--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR /mysql/ / select * from information_schema.global_variables where variable_name='plugin_dir'; ---replace_result $MYSQL_LIBDIR MYSQL_LIBDIR /mysql/ / +--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR /mysql/ / select * from information_schema.session_variables where variable_name='plugin_dir'; # diff --git a/mysql-test/t/auth_rpl-master.opt b/mysql-test/t/auth_rpl-master.opt new file mode 100644 index 00000000000..3536d102387 --- /dev/null +++ b/mysql-test/t/auth_rpl-master.opt @@ -0,0 +1,2 @@ +$PLUGIN_AUTH_OPT +$PLUGIN_AUTH_LOAD diff --git a/mysql-test/t/auth_rpl-slave.opt b/mysql-test/t/auth_rpl-slave.opt new file mode 100644 index 00000000000..3f4af6e59bb --- /dev/null +++ b/mysql-test/t/auth_rpl-slave.opt @@ -0,0 +1,4 @@ +--master-retry-count=1 +$PLUGIN_AUTH_OPT +$PLUGIN_AUTH_LOAD + diff --git a/mysql-test/t/auth_rpl.test b/mysql-test/t/auth_rpl.test new file mode 100644 index 00000000000..c413a84b53c --- /dev/null +++ b/mysql-test/t/auth_rpl.test @@ -0,0 +1,66 @@ +--source include/have_plugin_auth.inc
+--source include/not_embedded.inc
+--source include/master-slave.inc
+
+#
+# Check that replication slave can connect to master using an account
+# which authenticates with an external authentication plugin (bug#12897501).
+
+#
+# First stop the slave to guarantee that nothing is replicated.
+#
+--connection slave
+--echo [connection slave]
+--source include/stop_slave.inc
+#
+# Create an replication account on the master.
+#
+--connection master
+--echo [connection master]
+CREATE USER 'plug_user' IDENTIFIED WITH 'test_plugin_server' AS 'plug_user';
+GRANT REPLICATION SLAVE ON *.* TO plug_user;
+FLUSH PRIVILEGES;
+
+#
+# Now go to slave and change the replication user.
+#
+--connection slave
+--echo [connection slave]
+--let $master_user= query_get_value(SHOW SLAVE STATUS, Master_User, 1)
+CHANGE MASTER TO
+ MASTER_USER= 'plug_user',
+ MASTER_PASSWORD= 'plug_user';
+
+#
+# Start slave with new replication account - this should trigger connection
+# to the master server.
+#
+--source include/start_slave.inc
+
+# Replicate all statements executed on master, in this case,
+# (creation of the plug_user account).
+#
+--connection master
+--sync_slave_with_master
+--echo # Slave in-sync with master now.
+
+SELECT user, plugin, authentication_string FROM mysql.user WHERE user LIKE 'plug_user';
+
+#
+# Now we can stop the slave and clean up.
+#
+# Note: it is important that slave is stopped at this
+# moment - otherwise master's cleanup statements
+# would be replicated on slave!
+#
+--echo # Cleanup (on slave).
+--source include/stop_slave.inc
+eval CHANGE MASTER TO MASTER_USER='$master_user';
+DROP USER 'plug_user';
+
+--echo # Cleanup (on master).
+--connection master
+DROP USER 'plug_user';
+
+--let $rpl_only_running_threads= 1
+--source include/rpl_end.inc
diff --git a/mysql-test/t/execution_constants.test b/mysql-test/t/execution_constants.test index 92b1deb9921..285197cd1f4 100644 --- a/mysql-test/t/execution_constants.test +++ b/mysql-test/t/execution_constants.test @@ -38,7 +38,7 @@ while ($i) { # If we SEGV because the min stack size is exceeded, this would return error # 2013 . - error 0,1436 // + error 0,ER_STACK_OVERRUN_NEED_MORE // eval $query_head 0 $query_tail// if ($mysql_errno) @@ -48,10 +48,10 @@ while ($i) # limit, we still have enough space reserved to report an error. let $i = 1// - # Check that mysql_errno is 1436 - if ($mysql_errno != 1436) + # Check that mysql_errname is ER_STACK_OVERRUN_NEED_MORE + if ($mysql_errname != ER_STACK_OVERRUN_NEED_MORE) { - die Wrong error triggered, expected 1436 but got $mysql_errno// + die Wrong error triggered, expected ER_STACK_OVERRUN_NEED_MORE but got $mysql_errname// } } @@ -76,7 +76,7 @@ while ($i) enable_result_log// enable_query_log// -echo Assertion: mysql_errno 1436 == $mysql_errno// +echo Assertion: mysql_errname ER_STACK_OVERRUN_NEED_MORE == $mysql_errname// delimiter ;// DROP TABLE `t_bug21476`; diff --git a/mysql-test/t/func_str.test b/mysql-test/t/func_str.test index 9a9a8110a74..2a14648d6f6 100644 --- a/mysql-test/t/func_str.test +++ b/mysql-test/t/func_str.test @@ -1437,5 +1437,24 @@ SELECT * FROM t1; DROP TABLE t1; --echo # +--echo # Bug#12985030 SIMPLE QUERY WITH DECIMAL NUMBERS LEAKS MEMORY +--echo # + +SELECT (rpad(1.0,2048,1)) IS NOT FALSE; +SELECT ((+0) IN +((0b111111111111111111111111111111111111111111111111111),(rpad(1.0,2048,1)), +(32767.1))); +SELECT ((rpad(1.0,2048,1)) = ('4(') ^ (0.1)); + +--error 1690 +SELECT +pow((rpad(1.0,2048,1)),(b'1111111111111111111111111111111111111111111')); +SELECT ((rpad(1.0,2048,1)) + (0) ^ ('../')); +SELECT stddev_samp(rpad(1.0,2048,1)); +SELECT ((127.1) not in ((rpad(1.0,2048,1)),(''),(-1.1))); +SELECT ((0xf3) * (rpad(1.0,2048,1)) << (0xcc)); + + +--echo # --echo # End of 5.5 tests --echo # diff --git a/mysql-test/t/group_by.test b/mysql-test/t/group_by.test index 0c2da4ae9f4..18034da9a4c 100644 --- a/mysql-test/t/group_by.test +++ b/mysql-test/t/group_by.test @@ -1284,6 +1284,20 @@ FROM t1 GROUP BY a; DROP TABLE t1; +--echo # +--echo # Bug#11765254 (58200): Assertion failed: param.sort_length when grouping +--echo # by functions +--echo # + +SET SQL_BIG_TABLES=1; +CREATE TABLE t1(a INT); +INSERT INTO t1 VALUES (0),(0); +SELECT 1 FROM t1 GROUP BY IF(`a`,'',''); +SELECT 1 FROM t1 GROUP BY TRIM(LEADING RAND() FROM ''); +SELECT 1 FROM t1 GROUP BY SUBSTRING('',SLEEP(0),''); +SELECT 1 FROM t1 GROUP BY SUBSTRING(SYSDATE() FROM 'K' FOR 'jxW<'); +DROP TABLE t1; +SET SQL_BIG_TABLES=0; --echo # End of 5.1 tests diff --git a/mysql-test/t/myisampack.test b/mysql-test/t/myisampack.test index 463aa559de2..e0edcab6df7 100644 --- a/mysql-test/t/myisampack.test +++ b/mysql-test/t/myisampack.test @@ -221,3 +221,47 @@ DROP TABLE t1,t2,t3; DROP TABLE mysql_db1.t1; DROP DATABASE mysql_db1; +--echo # +--echo # BUG#11761180 - 53646: MYISAMPACK CORRUPTS TABLES WITH FULLTEXT INDEXES +--echo # +CREATE TABLE t1(a CHAR(4), FULLTEXT(a)); +INSERT INTO t1 VALUES('aaaa'),('bbbb'),('cccc'); +FLUSH TABLE t1; +--exec $MYISAMPACK -sf $MYSQLD_DATADIR/test/t1 +--exec $MYISAMCHK -srq $MYSQLD_DATADIR/test/t1 +CHECK TABLE t1; +SELECT * FROM t1 WHERE MATCH(a) AGAINST('aaaa' IN BOOLEAN MODE); +SELECT * FROM t1 WHERE MATCH(a) AGAINST('aaaa'); +DROP TABLE t1; + +--echo # Test table with key_reflength > rec_reflength +CREATE TABLE t1(a CHAR(30), FULLTEXT(a)); +--disable_query_log +--echo # Populating a table, so it's index file exceeds 65K +let $1=1700; +while ($1) +{ + eval INSERT INTO t1 VALUES('$1aaaaaaaaaaaaaaaaaaaaaaaaaa'); + dec $1; +} + +--echo # Populating a table, so index file has second level fulltext tree +let $1=60; +while ($1) +{ + eval INSERT INTO t1 VALUES('aaaa'),('aaaa'),('aaaa'),('aaaa'),('aaaa'); + dec $1; +} +--enable_query_log + +FLUSH TABLE t1; +--echo # Compressing table +--exec $MYISAMPACK -sf $MYSQLD_DATADIR/test/t1 +--echo # Fixing index (repair by sort) +--exec $MYISAMCHK -srnq $MYSQLD_DATADIR/test/t1 +CHECK TABLE t1; +FLUSH TABLE t1; +--echo # Fixing index (repair with keycache) +--exec $MYISAMCHK -soq $MYSQLD_DATADIR/test/t1 +CHECK TABLE t1; +DROP TABLE t1; diff --git a/mysql-test/t/mysqltest.test b/mysql-test/t/mysqltest.test index 9ff92496653..9fa41b9eb51 100644 --- a/mysql-test/t/mysqltest.test +++ b/mysql-test/t/mysqltest.test @@ -1,3 +1,14 @@ +# ---------------------------------------------------------------------------- +# $mysql_errno contains the return code of the last command +# sent to the server. +# ---------------------------------------------------------------------------- +# get $mysql_errno before the first statement +# $mysql_errno should be -1 +# get $mysql_errname as well + +echo $mysql_errno before test; +echo $mysql_errname before test; + -- source include/have_log_bin.inc # This test should work in embedded server after mysqltest is fixed @@ -34,15 +45,6 @@ # ============================================================================ # ---------------------------------------------------------------------------- -# $mysql_errno contains the return code of the last command -# sent to the server. -# ---------------------------------------------------------------------------- -# get $mysql_errno before the first statement -# $mysql_errno should be -1 -eval select $mysql_errno as "before_use_test" ; - - -# ---------------------------------------------------------------------------- # Positive case(statement) # ---------------------------------------------------------------------------- @@ -134,6 +136,7 @@ select friedrich from (select 1 as otto) as t1; # check mysql_errno = 0 after successful statement # ---------------------------------------------------------------------------- select otto from (select 1 as otto) as t1; +echo $mysql_errname; eval select $mysql_errno as "after_successful_stmt_errno" ; #---------------------------------------------------------------------------- @@ -142,6 +145,7 @@ eval select $mysql_errno as "after_successful_stmt_errno" ; --error ER_PARSE_ERROR garbage ; +echo $mysql_errname; eval select $mysql_errno as "after_wrong_syntax_errno" ; # ---------------------------------------------------------------------------- @@ -151,6 +155,7 @@ eval select $mysql_errno as "after_wrong_syntax_errno" ; garbage ; let $my_var= 'abc' ; +echo $mysql_errname; eval select $mysql_errno as "after_let_var_equal_value" ; # ---------------------------------------------------------------------------- @@ -160,6 +165,7 @@ eval select $mysql_errno as "after_let_var_equal_value" ; garbage ; set @my_var= 'abc' ; +echo $mysql_errname; eval select $mysql_errno as "after_set_var_equal_value" ; # ---------------------------------------------------------------------------- @@ -170,6 +176,7 @@ eval select $mysql_errno as "after_set_var_equal_value" ; garbage ; --disable_warnings +echo $mysql_errname; eval select $mysql_errno as "after_disable_warnings_command" ; # ---------------------------------------------------------------------------- @@ -182,6 +189,7 @@ drop table if exists t1 ; garbage ; drop table if exists t1 ; +echo $mysql_errname; eval select $mysql_errno as "after_disable_warnings" ; --enable_warnings @@ -194,6 +202,7 @@ garbage ; --error ER_NO_SUCH_TABLE select 3 from t1 ; +echo $mysql_errname; eval select $mysql_errno as "after_minus_masked" ; --error ER_PARSE_ERROR @@ -201,6 +210,7 @@ garbage ; --error ER_NO_SUCH_TABLE select 3 from t1 ; +echo $mysql_errname; eval select $mysql_errno as "after_!_masked" ; # ---------------------------------------------------------------------------- @@ -222,6 +232,7 @@ garbage ; --error ER_NO_SUCH_TABLE prepare stmt from "select 3 from t1" ; +echo $mysql_errname; eval select $mysql_errno as "after_failing_prepare" ; create table t1 ( f1 char(10)); @@ -230,6 +241,7 @@ create table t1 ( f1 char(10)); garbage ; prepare stmt from "select 3 from t1" ; +echo $mysql_errname; eval select $mysql_errno as "after_successful_prepare" ; # successful execute @@ -237,6 +249,7 @@ eval select $mysql_errno as "after_successful_prepare" ; garbage ; execute stmt; +echo $mysql_errname; eval select $mysql_errno as "after_successful_execute" ; # failing execute (table has been dropped) @@ -247,6 +260,7 @@ garbage ; --error ER_NO_SUCH_TABLE execute stmt; +echo $mysql_errname; eval select $mysql_errno as "after_failing_execute" ; # failing execute (unknown statement) @@ -256,6 +270,7 @@ garbage ; --error ER_UNKNOWN_STMT_HANDLER execute __stmt_; +echo $mysql_errname; eval select $mysql_errno as "after_failing_execute" ; # successful deallocate @@ -263,6 +278,7 @@ eval select $mysql_errno as "after_failing_execute" ; garbage ; deallocate prepare stmt; +echo $mysql_errname; eval select $mysql_errno as "after_successful_deallocate" ; # failing deallocate ( statement handle does not exist ) @@ -272,6 +288,7 @@ garbage ; --error ER_UNKNOWN_STMT_HANDLER deallocate prepare __stmt_; +echo $mysql_errname; eval select $mysql_errno as "after_failing_deallocate" ; @@ -299,6 +316,7 @@ eval select $mysql_errno as "after_failing_deallocate" ; garbage ; --disable_abort_on_error +echo $mysql_errname; eval select $mysql_errno as "after_--disable_abort_on_error" ; # ---------------------------------------------------------------------------- @@ -316,6 +334,7 @@ select 3 from t1 ; --error ER_NO_SUCH_TABLE select 3 from t1 ; +echo $mysql_errname; eval select $mysql_errno as "after_!errno_masked_error" ; # expected error <> response # --error 1000 @@ -341,6 +360,7 @@ EOF garbage ; --enable_abort_on_error +echo $mysql_errname; eval select $mysql_errno as "after_--enable_abort_on_error" ; # ---------------------------------------------------------------------------- diff --git a/mysql-test/t/sp_trans.test b/mysql-test/t/sp_trans.test index c114d397e43..39ac086071b 100644 --- a/mysql-test/t/sp_trans.test +++ b/mysql-test/t/sp_trans.test @@ -598,6 +598,39 @@ select distinct f1, bug13575(f1) from t3 order by f1| drop function bug13575| drop table t3| +# +# BUG#11758414: Default storage_engine not honored when set +# from within a stored procedure +# +SELECT @@GLOBAL.storage_engine INTO @old_engine| +SET @@GLOBAL.storage_engine=InnoDB| +SET @@SESSION.storage_engine=InnoDB| +# show defaults at define-time +SHOW GLOBAL VARIABLES LIKE 'storage_engine'| +SHOW SESSION VARIABLES LIKE 'storage_engine'| +CREATE PROCEDURE bug11758414() +BEGIN + SET @@GLOBAL.storage_engine="MyISAM"; + SET @@SESSION.storage_engine="MyISAM"; + # show defaults at execution time / that setting them worked + SHOW GLOBAL VARIABLES LIKE 'storage_engine'; + SHOW SESSION VARIABLES LIKE 'storage_engine'; + CREATE TABLE t1 (id int); + CREATE TABLE t2 (id int) ENGINE=InnoDB; + # show we're heeding the default (at run-time, not parse-time!) + SHOW CREATE TABLE t1; + # show that we didn't break explicit override with ENGINE=... + SHOW CREATE TABLE t2; +END; +| +CALL bug11758414| +# show that changing defaults within SP stuck +SHOW GLOBAL VARIABLES LIKE 'storage_engine'| +SHOW SESSION VARIABLES LIKE 'storage_engine'| +DROP PROCEDURE bug11758414| +DROP TABLE t1, t2| +SET @@GLOBAL.storage_engine=@old_engine| + --echo # --echo # End of 5.1 tests --echo # diff --git a/mysql-test/t/type_newdecimal.test b/mysql-test/t/type_newdecimal.test index f1eeabbd924..4f4b1962cc3 100644 --- a/mysql-test/t/type_newdecimal.test +++ b/mysql-test/t/type_newdecimal.test @@ -1535,3 +1535,17 @@ DROP TABLE IF EXISTS t1; --echo End of 5.1 tests + +--echo # +--echo # BUG#12911710 - VALGRIND FAILURE IN +--echo # ROW-DEBUG:PERFSCHEMA.SOCKET_SUMMARY_BY_INSTANCE_FUNC +--echo # + +CREATE TABLE t1(d1 DECIMAL(60,0) NOT NULL, + d2 DECIMAL(60,0) NOT NULL); + +INSERT INTO t1 (d1, d2) VALUES(0.0, 0.0); +SELECT d1 * d2 FROM t1; + +DROP TABLE t1; + diff --git a/mysql-test/valgrind.supp b/mysql-test/valgrind.supp index b2cb4b0dd3e..0ea50c92985 100644 --- a/mysql-test/valgrind.supp +++ b/mysql-test/valgrind.supp @@ -876,3 +876,46 @@ fun:buf_buddy_free_low fun:buf_buddy_free } + +# Note the wildcard in the (mangled) function signatures of +# write_keys() and find_all_keys(). +# They both return ha_rows, which is platform dependent. +# +# The '...' wildcards are for 'fun:inline_mysql_file_write' which *may* +# be inlined. +{ + Bug#12856915 VALGRIND FAILURE IN FILESORT/CREATE_SORT_INDEX / one + Memcheck:Param + write(buf) + obj:*/libpthread*.so + fun:my_write + ... + fun:my_b_flush_io_cache + fun:_my_b_write + fun:_Z*10write_keysP13st_sort_paramPPhjP11st_io_cacheS4_ + fun:_Z*13find_all_keysP13st_sort_paramP10SQL_SELECTPPhP11st_io_cacheS6_S6_ + fun:_Z8filesortP3THDP5TABLEP13st_sort_fieldjP10SQL_SELECTybPy +} + +{ + Bug#12856915 VALGRIND FAILURE IN FILESORT/CREATE_SORT_INDEX / two + Memcheck:Param + write(buf) + obj:*/libpthread*.so + fun:my_write + ... + fun:my_b_flush_io_cache + fun:_Z15merge_many_buffP13st_sort_paramPhP10st_buffpekPjP11st_io_cache + fun:_Z8filesortP3THDP5TABLEP13st_sort_fieldjP10SQL_SELECTybPy +} + +{ + Bug#12856915 VALGRIND FAILURE IN FILESORT/CREATE_SORT_INDEX / three + Memcheck:Param + write(buf) + obj:*/libpthread*.so + fun:my_write + ... + fun:my_b_flush_io_cache + fun:_Z8filesortP3THDP5TABLEP13st_sort_fieldjP10SQL_SELECTybPy +} |