diff options
author | Sergei Golubchik <sergii@pisem.net> | 2012-01-16 20:16:35 +0100 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2012-01-16 20:16:35 +0100 |
commit | 38e3ae155db08ab2e9e5c267f05f89bec0542b33 (patch) | |
tree | 7289bbef1ba3f495aa5c7cdb7d0a3f993a5bbc80 /mysql-test | |
parent | c56483d972d023105fbcb0f47af0042ee092657c (diff) | |
parent | ed1ba992c1d3c3ecbe6a2769c51ceb5d27606d3b (diff) | |
download | mariadb-git-38e3ae155db08ab2e9e5c267f05f89bec0542b33.tar.gz |
mysql-5.5 merge
Diffstat (limited to 'mysql-test')
221 files changed, 2753 insertions, 2731 deletions
diff --git a/mysql-test/collections/default.experimental b/mysql-test/collections/default.experimental index b3623402065..f528f1c473e 100644 --- a/mysql-test/collections/default.experimental +++ b/mysql-test/collections/default.experimental @@ -24,4 +24,6 @@ sys_vars.wait_timeout_func # Bug#11750645 2010-04-26 alik wai sys_vars.ndb_log_update_as_write_basic sys_vars.have_ndbcluster_basic sys_vars.ndb_log_updated_only_basic +sys_vars.query_cache_size_basic_64 # Bug#11748572 - 36747: ALLOCATING A LARGE QUERY CACHE IS NOT DETERMINISTIC +sys_vars.query_cache_size_basic_32 # Bug#11748572 - 36747: ALLOCATING A LARGE QUERY CACHE IS NOT DETERMINISTIC sys_vars.rpl_init_slave_func # Bug#12535301 2011-05-09 andrei sys_vars.rpl_init_slave_func mismatches in daily-5.5 diff --git a/mysql-test/extra/binlog_tests/ctype_ucs_binlog.test b/mysql-test/extra/binlog_tests/ctype_ucs_binlog.test index b240109f6e6..733ad05b0be 100644 --- a/mysql-test/extra/binlog_tests/ctype_ucs_binlog.test +++ b/mysql-test/extra/binlog_tests/ctype_ucs_binlog.test @@ -15,7 +15,6 @@ source include/show_binlog_events.inc; # absolutely need variables names to be quoted and strings to be # escaped). flush logs; ---replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR let $MYSQLD_DATADIR= `select @@datadir`; --exec $MYSQL_BINLOG --short-form $MYSQLD_DATADIR/master-bin.000001 drop table t2; diff --git a/mysql-test/include/begin_include_file.inc b/mysql-test/include/begin_include_file.inc index 1b69fb0e52d..6c438f3df30 100644 --- a/mysql-test/include/begin_include_file.inc +++ b/mysql-test/include/begin_include_file.inc @@ -48,6 +48,11 @@ # must be provided both for begin_include_file.inc and # end_include_file.inc. # +# $keep_include_silent +# This specifies whether it should be echoed to the result file +# the following string: include/$include_filename +# If not set, the string will be echoed. +# # $rpl_debug # If set, this script will print the following text: # ==== BEGIN include/$include_filename.inc ==== @@ -59,7 +64,10 @@ # recursively. if (!$_include_file_depth) { - --echo include/$include_filename + if (!$keep_include_silent) + { + --echo include/$include_filename + } --let $_include_file_depth= 0 } --inc $_include_file_depth diff --git a/mysql-test/include/relocate_binlogs.inc b/mysql-test/include/relocate_binlogs.inc new file mode 100644 index 00000000000..d5d1135dda3 --- /dev/null +++ b/mysql-test/include/relocate_binlogs.inc @@ -0,0 +1,137 @@ +# ==== Purpose ==== +# +# Relocates the relay logs and index file from +# a directory into another. The logs relocated +# are the one listed in the index file. +# +# ==== Usage ==== +# +# [--let $relocate_disable_query_log= 1] +# [--let $rpl_debug= 1] +# [--let $relocate_is_windows= 0] +# [--let $relocate_recreate_index= 0] +# [--let $relocate_fix_relay_log_info= 0] +# --let $relocate_from= DIR +# --let $relocate_to= DIR +# --let $relocate_index_file= FNAME +# --source include/relocate_binlogs.inc + +if ($relocate_disable_query_log) +{ + --disable_query_log +} + +--let $_path_separator=/ +if ($relocate_is_windows) +{ + --let $_path_separator=\ +} + +if ($relocate_index_file) +{ + SET SQL_LOG_BIN=0; + CREATE TEMPORARY TABLE tmp(id INT AUTO_INCREMENT PRIMARY KEY, filename VARCHAR(1024)); + + --let $write_var= + --let $_index_file= $relocate_index_file + --let $_index_file_basename= `SELECT RIGHT(RTRIM("$_index_file"), LOCATE("$_path_separator",REVERSE(RTRIM("$_index_file"))) -1)` + --let $_from= $relocate_from + --let $_to= $relocate_into + + # chmod to allow the following LOAD DATA + --chmod 0666 $_index_file + + --eval LOAD DATA INFILE '$_index_file' INTO TABLE tmp (filename) + --let $count= `SELECT count(*) FROM tmp` + + while ($count) + { + --let $_filename= `select filename from tmp where id=$count` + + --let $_filename= `SELECT RIGHT(RTRIM("$_filename"), LOCATE("$_path_separator",REVERSE(RTRIM("$_filename"))) -1)` + --move_file $_from/$_filename $_to/$_filename + + if ($relocate_recreate_index) + { + + if ($relocate_is_windows) + { + --let $_write_var=$_to\$_filename\n + } + if (!$relocate_is_windows) + { + --let $_write_var=$_to/$_filename\n + } + if (!$write_var) + { + --let $write_var=$_write_var + } + + if (!`SELECT STRCMP('$write_var', '$_write_var') = 0`) + { + --let $write_var=$_write_var$write_var + } + } + + --dec $count + } + + if (!$relocate_recreate_index) + { + --move_file $_index_file $_to/$_index_file_basename + } + + if ($relocate_recreate_index) + { + --let $write_to_file= $_to/$_index_file_basename + --source include/write_var_to_file.inc + --remove_file $_index_file + } + + DROP TEMPORARY TABLE tmp; + + if ($relocate_fix_relay_log_info) + { + CREATE TEMPORARY TABLE tmp(id INT AUTO_INCREMENT PRIMARY KEY, entry VARCHAR(1024)); + --let $write_var= + + # chmod to allow the following LOAD DATA + --chmod 0666 $relocate_fix_relay_log_info + + --eval LOAD DATA INFILE '$relocate_fix_relay_log_info' INTO TABLE tmp (entry) + --let $count= `SELECT count(*) FROM tmp` + + --let $_curr_entry= `SELECT entry FROM tmp WHERE id=1` + --let $_curr_entry_basename= `SELECT RIGHT(RTRIM("$_curr_entry"), LOCATE("$_path_separator",REVERSE(RTRIM("$_curr_entry"))) -1)` + + if ($relocate_is_windows) + { + --eval UPDATE tmp SET entry='$_to\$_curr_entry_basename' WHERE id=1 + } + if (!$relocate_is_windows) + { + --eval UPDATE tmp SET entry='$_to/$_curr_entry_basename' WHERE id=1 + } + + --remove_file $relocate_fix_relay_log_info + + while($count) + { + --let $_write_var= `SELECT entry FROM tmp WHERE id= $count` + --let $write_var=$_write_var\n$write_var + --dec $count + } + + --let $write_to_file= $relocate_fix_relay_log_info + --source include/write_var_to_file.inc + + DROP TEMPORARY TABLE tmp; + } + SET SQL_LOG_BIN=1; +} + + +if ($relocate_disable_query_log) +{ + --enable_query_log +} diff --git a/mysql-test/r/alter_table-big.result b/mysql-test/r/alter_table-big.result index d6b936bd5d7..33af60938a1 100644 --- a/mysql-test/r/alter_table-big.result +++ b/mysql-test/r/alter_table-big.result @@ -1,57 +1,77 @@ drop table if exists t1, t2; +set debug_sync='RESET'; create table t1 (n1 int, n2 int, n3 int, key (n1, n2, n3), key (n2, n3, n1), key (n3, n1, n2)); create table t2 (i int); alter table t1 disable keys; -insert into t1 values (RAND()*1000, RAND()*1000, RAND()*1000); +insert into t1 values (1, 2, 3); reset master; -set session debug="+d,sleep_alter_enable_indexes"; +set debug_sync='alter_table_enable_indexes SIGNAL parked WAIT_FOR go'; alter table t1 enable keys;; +set debug_sync='now WAIT_FOR parked'; insert into t2 values (1); -insert into t1 values (1, 1, 1); -set session debug="-d,sleep_alter_enable_indexes"; +insert into t1 values (1, 1, 1);; +set debug_sync='now SIGNAL go'; show binlog events from <binlog_start>; Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; insert into t2 values (1) +master-bin.000001 # Query # # COMMIT master-bin.000001 # Query # # use `test`; alter table t1 enable keys +master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; insert into t1 values (1, 1, 1) +master-bin.000001 # Query # # COMMIT drop tables t1, t2; +set debug_sync='RESET'; End of 5.0 tests drop table if exists t1, t2, t3; create table t1 (i int); reset master; -set session debug="+d,sleep_alter_before_main_binlog"; +set debug_sync='alter_table_before_main_binlog SIGNAL parked WAIT_FOR go'; alter table t1 change i c char(10) default 'Test1';; -insert into t1 values (); +set debug_sync='now WAIT_FOR parked'; +insert into t1 values ();; +set debug_sync='now SIGNAL go'; select * from t1; c Test1 +set debug_sync='alter_table_before_main_binlog SIGNAL parked WAIT_FOR go'; alter table t1 change c vc varchar(100) default 'Test2';; -rename table t1 to t2; +set debug_sync='now WAIT_FOR parked'; +rename table t1 to t2;; +set debug_sync='now SIGNAL go'; drop table t2; create table t1 (i int); +set debug_sync='alter_table_before_main_binlog SIGNAL parked WAIT_FOR go'; alter table t1 change i c char(10) default 'Test3', rename to t2;; -insert into t2 values (); +set debug_sync='now WAIT_FOR parked'; +insert into t2 values();; +set debug_sync='now SIGNAL go'; select * from t2; c Test3 alter table t2 change c vc varchar(100) default 'Test2', rename to t1;; rename table t1 to t3; drop table t3; -set session debug="-d,sleep_alter_before_main_binlog"; +set debug_sync='alter_table_before_main_binlog SIGNAL parked WAIT_FOR go'; +set debug_sync='RESET'; show binlog events from <binlog_start>; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # use `test`; alter table t1 change i c char(10) default 'Test1' +master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; insert into t1 values () +master-bin.000001 # Query # # COMMIT master-bin.000001 # Query # # use `test`; alter table t1 change c vc varchar(100) default 'Test2' master-bin.000001 # Query # # use `test`; rename table t1 to t2 -master-bin.000001 # Query # # use `test`; drop table t2 +master-bin.000001 # Query # # use `test`; DROP TABLE `t2` /* generated by server */ master-bin.000001 # Query # # use `test`; create table t1 (i int) master-bin.000001 # Query # # use `test`; alter table t1 change i c char(10) default 'Test3', rename to t2 -master-bin.000001 # Query # # use `test`; insert into t2 values () +master-bin.000001 # Query # # BEGIN +master-bin.000001 # Query # # use `test`; insert into t2 values() +master-bin.000001 # Query # # COMMIT master-bin.000001 # Query # # use `test`; alter table t2 change c vc varchar(100) default 'Test2', rename to t1 master-bin.000001 # Query # # use `test`; rename table t1 to t3 -master-bin.000001 # Query # # use `test`; drop table t3 +master-bin.000001 # Query # # use `test`; DROP TABLE `t3` /* generated by server */ End of 5.1 tests diff --git a/mysql-test/r/archive.result b/mysql-test/r/archive.result index d66940add5d..88d59555f5b 100644 --- a/mysql-test/r/archive.result +++ b/mysql-test/r/archive.result @@ -12832,3 +12832,22 @@ a b c d e f -1 b c d e 1 DROP TABLE t1; SET sort_buffer_size=DEFAULT; +# +# BUG#11758979 - 51252: ARCHIVE TABLES STILL FAIL UNDER STRESS +# TESTS: CRASH, CORRUPTION, 4G MEMOR +# (to be executed with valgrind) +CREATE TABLE t1(a BLOB, b VARCHAR(200)) ENGINE=ARCHIVE; +INSERT INTO t1 VALUES(NULL, ''); +FLUSH TABLE t1; +# we need this select to workaround BUG#11764364 +SELECT * FROM t1; +a b +NULL +CHECKSUM TABLE t1 EXTENDED; +Table Checksum +test.t1 286155052 +FLUSH TABLE t1; +OPTIMIZE TABLE t1; +Table Op Msg_type Msg_text +test.t1 optimize status OK +DROP TABLE t1; diff --git a/mysql-test/r/create-big.result b/mysql-test/r/create-big.result index d062b59a008..34293d7e5cd 100644 --- a/mysql-test/r/create-big.result +++ b/mysql-test/r/create-big.result @@ -1,7 +1,10 @@ drop table if exists t1,t2,t3,t4,t5; -set session debug="+d,sleep_create_select_before_create"; +set debug_sync='RESET'; +set debug_sync='create_table_select_before_create SIGNAL parked WAIT_FOR go'; create table t1 select 1 as i;; -create table t1 (j char(5)); +set debug_sync='now WAIT_FOR parked'; +create table t1 (j char(5));; +set debug_sync='now SIGNAL go'; ERROR 42S01: Table 't1' already exists show create table t1; Table Create Table @@ -9,8 +12,11 @@ t1 CREATE TABLE `t1` ( `i` int(1) NOT NULL DEFAULT '0' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; +set debug_sync='create_table_select_before_create SIGNAL parked WAIT_FOR go'; create table t1 select 1 as i;; -create table t1 select "Test" as j; +set debug_sync='now WAIT_FOR parked'; +create table t1 select 'Test' as j;; +set debug_sync='now SIGNAL go'; ERROR 42S01: Table 't1' already exists show create table t1; Table Create Table @@ -19,8 +25,11 @@ t1 CREATE TABLE `t1` ( ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; create table t3 (j char(5)); +set debug_sync='create_table_select_before_create SIGNAL parked WAIT_FOR go'; create table t1 select 1 as i;; -create table t1 like t3; +set debug_sync='now WAIT_FOR parked'; +create table t1 like t3;; +set debug_sync='now SIGNAL go'; ERROR 42S01: Table 't1' already exists show create table t1; Table Create Table @@ -28,8 +37,11 @@ t1 CREATE TABLE `t1` ( `i` int(1) NOT NULL DEFAULT '0' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; +set debug_sync='create_table_select_before_create SIGNAL parked WAIT_FOR go'; create table t1 select 1 as i;; -rename table t3 to t1; +set debug_sync='now WAIT_FOR parked'; +rename table t3 to t1;; +set debug_sync='now SIGNAL go'; ERROR 42S01: Table 't1' already exists show create table t1; Table Create Table @@ -37,82 +49,117 @@ t1 CREATE TABLE `t1` ( `i` int(1) NOT NULL DEFAULT '0' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; +set debug_sync='create_table_select_before_create SIGNAL parked WAIT_FOR go'; create table t1 select 1 as i;; +set debug_sync='now WAIT_FOR parked'; alter table t3 rename to t1; ERROR 42S01: Table 't1' already exists +set debug_sync='now SIGNAL go'; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( `i` int(1) NOT NULL DEFAULT '0' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; +set debug_sync='create_table_select_before_create SIGNAL parked WAIT_FOR go'; create table t1 select 1 as i;; +set debug_sync='now WAIT_FOR parked'; alter table t3 rename to t1, add k int; ERROR 42S01: Table 't1' already exists +set debug_sync='now SIGNAL go'; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( `i` int(1) NOT NULL DEFAULT '0' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 -drop table t1, t3; -set session debug="-d,sleep_create_select_before_create:+d,sleep_create_select_before_open"; -create table t1 select 1 as i;; -drop table t1; -create table t1 select 1 as i;; -rename table t1 to t2; +drop table t1,t3; +set debug_sync='create_table_select_before_open SIGNAL parked WAIT_FOR go'; +set debug_sync='create_table_select_before_open SIGNAL parked WAIT_FOR go'; +create table t1 select 1 as i;; +set debug_sync='now WAIT_FOR parked'; +drop table t1;; +set debug_sync='now SIGNAL go'; +set debug_sync='create_table_select_before_create SIGNAL parked WAIT_FOR go'; +create table t1 select 1 as i;; +set debug_sync='now WAIT_FOR parked'; +rename table t1 to t2;; +set debug_sync='now SIGNAL go'; drop table t2; +set debug_sync='create_table_select_before_create SIGNAL parked WAIT_FOR go'; create table t1 select 1 as i;; -select * from t1; +set debug_sync='now WAIT_FOR parked'; +select * from t1;; +set debug_sync='now SIGNAL go'; i 1 drop table t1; +set debug_sync='create_table_select_before_create SIGNAL parked WAIT_FOR go'; create table t1 select 1 as i;; -insert into t1 values (2); +set debug_sync='now WAIT_FOR parked'; +insert into t1 values (2);; +set debug_sync='now SIGNAL go'; select * from t1; i 1 2 drop table t1; set @a:=0; +set debug_sync='create_table_select_before_create SIGNAL parked WAIT_FOR go'; create table t1 select 1 as i;; -create trigger t1_bi before insert on t1 for each row set @a:=1; +set debug_sync='now WAIT_FOR parked'; +create trigger t1_bi before insert on t1 for each row set @a:=1;; +set debug_sync='now SIGNAL go'; select @a; @a 0 drop table t1; -set session debug="-d,sleep_create_select_before_open:+d,sleep_create_select_before_lock"; +set debug_sync='create_table_select_before_lock SIGNAL parked WAIT_FOR go'; create table t1 select 1 as i;; -drop table t1; +set debug_sync='now WAIT_FOR parked'; +drop table t1;; +set debug_sync='now SIGNAL go'; +set debug_sync='create_table_select_before_lock SIGNAL parked WAIT_FOR go'; create table t1 select 1 as i;; -rename table t1 to t2; +set debug_sync='now WAIT_FOR parked'; +rename table t1 to t2;; +set debug_sync='now SIGNAL go'; drop table t2; +set debug_sync='create_table_select_before_lock SIGNAL parked WAIT_FOR go'; create table t1 select 1 as i;; -select * from t1; +set debug_sync='now WAIT_FOR parked'; +select * from t1;; +set debug_sync='now SIGNAL go'; i 1 drop table t1; +set debug_sync='create_table_select_before_lock SIGNAL parked WAIT_FOR go'; create table t1 select 1 as i;; -insert into t1 values (2); +set debug_sync='now WAIT_FOR parked'; +insert into t1 values (2);; +set debug_sync='now SIGNAL go'; select * from t1; i 1 2 drop table t1; set @a:=0; +set debug_sync='create_table_select_before_lock SIGNAL parked WAIT_FOR go'; create table t1 select 1 as i;; -create trigger t1_bi before insert on t1 for each row set @a:=1; +set debug_sync='now WAIT_FOR parked'; +create trigger t1_bi before insert on t1 for each row set @a:=1;; +set debug_sync='now SIGNAL go'; select @a; @a 0 drop table t1; -set session debug="-d,sleep_create_select_before_lock:+d,sleep_create_select_before_check_if_exists"; -create table t1 (i int); +set debug_sync='create_table_select_before_check_if_exists SIGNAL parked WAIT_FOR go'; create table if not exists t1 select 1 as i;; -drop table t1; -Warnings: -Note 1050 Table 't1' already exists +set debug_sync='now WAIT_FOR parked'; +drop table t1;; +set debug_sync='now SIGNAL go'; create table t1 (i int); set @a:=0; +set debug_sync='create_table_select_before_check_if_exists SIGNAL parked WAIT_FOR go'; create table if not exists t1 select 1 as i;; create trigger t1_bi before insert on t1 for each row set @a:=1; Warnings: @@ -122,53 +169,17 @@ select @a; 0 select * from t1; i -1 drop table t1; -set session debug="-d,sleep_create_select_before_check_if_exists"; -create table t2 (a int); -create table t4 (b int); -lock table t4 write; -select 1; -1 -1 -create table t3 as select * from t4;; -create table t1 select * from t2, t3;; -unlock tables; -select * from t1; -a b -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` int(11) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 -drop table t1, t3; -lock table t4 read; -select 1; -1 -1 -rename table t4 to t3;; -create table if not exists t1 select 1 as i from t2, t3;; -create table t5 (j int); -rename table t5 to t1; -unlock tables; -Warnings: -Note 1050 Table 't1' already exists -select * from t1; -j -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `j` int(11) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 -drop table t1, t2, t3; drop table if exists t1,t2; +set debug_sync='RESET'; create table t1 (i int); -set session debug="+d,sleep_create_like_before_check_if_exists"; +set debug_sync='create_table_like_after_open SIGNAL parked WAIT_FOR go'; reset master; create table t2 like t1;; +set debug_sync='now WAIT_FOR parked'; insert into t1 values (1); -drop table t1; +drop table t1;; +set debug_sync='now SIGNAL go'; show create table t2; Table Create Table t2 CREATE TABLE `t2` ( @@ -177,71 +188,41 @@ t2 CREATE TABLE `t2` ( drop table t2; show binlog events from <binlog_start>; Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; insert into t1 values (1) +master-bin.000001 # Query # # COMMIT master-bin.000001 # Query # # use `test`; create table t2 like t1 -master-bin.000001 # Query # # use `test`; drop table t1 -master-bin.000001 # Query # # use `test`; drop table t2 +master-bin.000001 # Query # # use `test`; DROP TABLE `t1` /* generated by server */ +master-bin.000001 # Query # # use `test`; DROP TABLE `t2` /* generated by server */ create table t1 (i int); -set session debug="-d,sleep_create_like_before_check_if_exists:+d,sleep_create_like_before_copy"; -create table t2 like t1;; -create table if not exists t2 (j int); -Warnings: -Note 1050 Table 't2' already exists -show create table t2; -Table Create Table -t2 CREATE TABLE `t2` ( - `i` int(11) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 -drop table t2; -reset master; -create table t2 like t1;; -drop table t1; -drop table t2; -show binlog events from <binlog_start>; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; create table t2 like t1 -master-bin.000001 # Query # # use `test`; drop table t1 -master-bin.000001 # Query # # use `test`; drop table t2 -create table t1 (i int); -set session debug="-d,sleep_create_like_before_copy:+d,sleep_create_like_before_ha_create"; +set debug_sync='create_table_like_before_binlog SIGNAL parked WAIT_FOR go'; reset master; create table t2 like t1;; -insert into t2 values (1); +set debug_sync='now WAIT_FOR parked'; +insert into t2 values (1);; +set debug_sync='now SIGNAL go'; drop table t2; +set debug_sync='create_table_like_before_binlog SIGNAL parked WAIT_FOR go'; create table t2 like t1;; -drop table t2; +set debug_sync='now WAIT_FOR parked'; +drop table t2;; +set debug_sync='now SIGNAL go'; +set debug_sync='create_table_like_before_binlog SIGNAL parked WAIT_FOR go'; create table t2 like t1;; -drop table t1; -drop table t2; -show binlog events from <binlog_start>; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; create table t2 like t1 -master-bin.000001 # Query # # use `test`; insert into t2 values (1) -master-bin.000001 # Query # # use `test`; drop table t2 -master-bin.000001 # Query # # use `test`; create table t2 like t1 -master-bin.000001 # Query # # use `test`; drop table t2 -master-bin.000001 # Query # # use `test`; create table t2 like t1 -master-bin.000001 # Query # # use `test`; drop table t1 -master-bin.000001 # Query # # use `test`; drop table t2 -create table t1 (i int); -set session debug="-d,sleep_create_like_before_ha_create:+d,sleep_create_like_before_binlogging"; -reset master; -create table t2 like t1;; -insert into t2 values (1); -drop table t2; -create table t2 like t1;; -drop table t2; -create table t2 like t1;; -drop table t1; +set debug_sync='now WAIT_FOR parked'; +drop table t1;; +set debug_sync='now SIGNAL go'; drop table t2; +set debug_sync='RESET'; show binlog events from <binlog_start>; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # use `test`; create table t2 like t1 +master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # use `test`; insert into t2 values (1) -master-bin.000001 # Query # # use `test`; drop table t2 +master-bin.000001 # Query # # COMMIT +master-bin.000001 # Query # # use `test`; DROP TABLE `t2` /* generated by server */ master-bin.000001 # Query # # use `test`; create table t2 like t1 -master-bin.000001 # Query # # use `test`; drop table t2 +master-bin.000001 # Query # # use `test`; DROP TABLE `t2` /* generated by server */ master-bin.000001 # Query # # use `test`; create table t2 like t1 -master-bin.000001 # Query # # use `test`; drop table t1 -master-bin.000001 # Query # # use `test`; drop table t2 -set session debug="-d,sleep_create_like_before_binlogging"; +master-bin.000001 # Query # # use `test`; DROP TABLE `t1` /* generated by server */ +master-bin.000001 # Query # # use `test`; DROP TABLE `t2` /* generated by server */ diff --git a/mysql-test/r/ctype_utf16.result b/mysql-test/r/ctype_utf16.result index a9878b25c29..b1f9feb01ca 100644 --- a/mysql-test/r/ctype_utf16.result +++ b/mysql-test/r/ctype_utf16.result @@ -1127,5 +1127,19 @@ NULL Warnings: Warning 1301 Result of repeat() was larger than max_allowed_packet (1048576) - truncated # +# Bug#11750518 41090: ORDER BY TRUNCATES GROUP_CONCAT RESULT +# +SET NAMES utf8, @@character_set_connection=utf16; +SELECT id, CHAR_LENGTH(GROUP_CONCAT(body)) AS l +FROM (SELECT 'a' AS id, REPEAT('foo bar', 100) AS body +UNION ALL +SELECT 'a' AS id, REPEAT('bla bla', 100) AS body) t1 +GROUP BY id +ORDER BY l DESC; +id l +a 512 +Warnings: +Warning 1260 Row 1 was cut by GROUP_CONCAT() +# # End of 5.5 tests # diff --git a/mysql-test/r/ctype_utf32.result b/mysql-test/r/ctype_utf32.result index b00c1e094ff..d8a129a01bd 100644 --- a/mysql-test/r/ctype_utf32.result +++ b/mysql-test/r/ctype_utf32.result @@ -1168,5 +1168,19 @@ CASE s1 WHEN 'a' THEN 'b' ELSE 'c' END b DROP TABLE t1; # +# Bug#11750518 41090: ORDER BY TRUNCATES GROUP_CONCAT RESULT +# +SET NAMES utf8, @@character_set_connection=utf32; +SELECT id, CHAR_LENGTH(GROUP_CONCAT(body)) AS l +FROM (SELECT 'a' AS id, REPEAT('foo bar', 100) AS body +UNION ALL +SELECT 'a' AS id, REPEAT('bla bla', 100) AS body) t1 +GROUP BY id +ORDER BY l DESC; +id l +a 256 +Warnings: +Warning 1260 Row 1 was cut by GROUP_CONCAT() +# # End of 5.5 tests # diff --git a/mysql-test/r/ctype_utf8.result b/mysql-test/r/ctype_utf8.result index 0ada8bae8c2..4bc9508f9f3 100644 --- a/mysql-test/r/ctype_utf8.result +++ b/mysql-test/r/ctype_utf8.result @@ -2792,7 +2792,7 @@ create table t1 as select group_concat(1,2,3) as c1; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` varchar(342) CHARACTER SET utf8 DEFAULT NULL + `c1` text CHARACTER SET utf8 ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; create table t1 as select 1 as c1 union select 'a'; @@ -5014,5 +5014,19 @@ id select_type table type possible_keys key key_len ref rows filtered Extra Warnings: Note 1003 select 'abcdÁÂÃÄÅ' AS `abcdÁÂÃÄÅ`,_latin1'abcd\xC3\x81\xC3\x82\xC3\x83\xC3\x84\xC3\x85' AS `abcdÃÂÃÄÅ`,_utf8'abcd\xC3\x81\xC3\x82\xC3\x83\xC3\x84\xC3\x85' AS `abcdÁÂÃÄÅ` # +# Bug#11750518 41090: ORDER BY TRUNCATES GROUP_CONCAT RESULT +# +SET NAMES utf8; +SELECT id, CHAR_LENGTH(GROUP_CONCAT(body)) AS l +FROM (SELECT 'a' AS id, REPEAT('foo bar', 100) AS body +UNION ALL +SELECT 'a' AS id, REPEAT('bla bla', 100) AS body) t1 +GROUP BY id +ORDER BY l DESC; +id l +a 1024 +Warnings: +Warning 1260 Row 2 was cut by GROUP_CONCAT() +# # End of 5.5 tests # diff --git a/mysql-test/r/func_if.result b/mysql-test/r/func_if.result index 887470e9771..3d5ca1805b7 100644 --- a/mysql-test/r/func_if.result +++ b/mysql-test/r/func_if.result @@ -203,3 +203,17 @@ c NULL 0 DROP TABLE t1; +# +# Bug#12532830 +# SIGFPE OR ASSERTION (PRECISION <= ((9 * 9) - 8*2)) && (DEC <= 30) +# +select +sum(distinct(if('a', +(select adddate(elt(convert(9999999999999999999999999999999999999,decimal(64,0)),count(*)), +interval 1 day)) +, .1))) as foo; +foo +0.1 +Warnings: +Warning 1292 Truncated incorrect DOUBLE value: 'a' +Warning 1292 Truncated incorrect DOUBLE value: 'a' diff --git a/mysql-test/r/func_str.result b/mysql-test/r/func_str.result index f2588af733d..f07aa9ceeed 100644 --- a/mysql-test/r/func_str.result +++ b/mysql-test/r/func_str.result @@ -2788,6 +2788,12 @@ format(123,2,'no_NO') 123,00 DROP TABLE t1; # +# Bug#11764310 conv function crashes, negative argument to memcpy +# +SELECT CONV(1,-2147483648,-2147483648); +CONV(1,-2147483648,-2147483648) +NULL +# # Bug#12985030 SIMPLE QUERY WITH DECIMAL NUMBERS LEAKS MEMORY # SELECT (rpad(1.0,2048,1)) IS NOT FALSE; diff --git a/mysql-test/r/gis.result b/mysql-test/r/gis.result index 7624544014a..83db8bf34af 100644 --- a/mysql-test/r/gis.result +++ b/mysql-test/r/gis.result @@ -1446,4 +1446,13 @@ Warning 1292 Incorrect datetime value: '\x00\x00\x00\x00\x01\x01\x00\x00\x00\x00 Warning 1441 Datetime function: datetime field overflow Warning 1292 Incorrect datetime value: '\x00\x00\x00\x00\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\xF0?\x00\x00\x00\x00\x00\x00\x00@' DROP TABLE g1; +# +# Bug#13013970 MORE CRASHES IN FIELD_BLOB::GET_KEY_IMAGE +# +CREATE TABLE g1(a TEXT NOT NULL, KEY(a(255))); +INSERT INTO g1 VALUES ('a'),('a'); +SELECT 1 FROM g1 WHERE a >= ANY +(SELECT 1 FROM g1 WHERE a = geomfromtext('') OR a) ; +1 +DROP TABLE g1; End of 5.5 tests diff --git a/mysql-test/r/group_min_max_innodb.result b/mysql-test/r/group_min_max_innodb.result index 6607e1babf6..0e7841e979d 100644 --- a/mysql-test/r/group_min_max_innodb.result +++ b/mysql-test/r/group_min_max_innodb.result @@ -94,3 +94,27 @@ pk drop view v1; drop table t1; End of 5.1 tests +# +# Bug#12540545 61101: ASSERTION FAILURE IN THREAD 1256741184 IN +# FILE /BUILDDIR/BUILD/BUILD/MYSQ +# +CREATE TABLE t1 (a CHAR(1), b CHAR(1), PRIMARY KEY (a,b)) ENGINE=InnoDB; +INSERT INTO t1 VALUES ('a', 'b'), ('c', 'd'); +EXPLAIN SELECT COUNT(DISTINCT a) FROM t1 WHERE b = 'b'; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 index NULL PRIMARY 2 NULL 2 Using where; Using index +SELECT COUNT(DISTINCT a) FROM t1 WHERE b = 'b'; +COUNT(DISTINCT a) +1 +DROP TABLE t1; +CREATE TABLE t1 (a CHAR(1) NOT NULL, b CHAR(1) NOT NULL, UNIQUE KEY (a,b)) +ENGINE=InnoDB; +INSERT INTO t1 VALUES ('a', 'b'), ('c', 'd'); +EXPLAIN SELECT COUNT(DISTINCT a) FROM t1 WHERE b = 'b'; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 index NULL a 2 NULL 2 Using where; Using index +SELECT COUNT(DISTINCT a) FROM t1 WHERE b = 'b'; +COUNT(DISTINCT a) +1 +DROP TABLE t1; +End of 5.5 tests diff --git a/mysql-test/r/information_schema_all_engines.result b/mysql-test/r/information_schema_all_engines.result index 9ea7c947100..021fe003b22 100644 --- a/mysql-test/r/information_schema_all_engines.result +++ b/mysql-test/r/information_schema_all_engines.result @@ -13,10 +13,32 @@ FILES GLOBAL_STATUS GLOBAL_VARIABLES INDEX_STATISTICS +INNODB_BUFFER_POOL_PAGES +INNODB_BUFFER_POOL_PAGES_BLOB +INNODB_BUFFER_POOL_PAGES_INDEX +INNODB_CMP +INNODB_CMPMEM +INNODB_CMPMEM_RESET +INNODB_CMP_RESET +INNODB_INDEX_STATS +INNODB_LOCKS +INNODB_LOCK_WAITS +INNODB_RSEG +INNODB_SYS_COLUMNS +INNODB_SYS_FIELDS +INNODB_SYS_FOREIGN +INNODB_SYS_FOREIGN_COLS +INNODB_SYS_INDEXES +INNODB_SYS_STATS +INNODB_SYS_TABLES +INNODB_SYS_TABLESTATS +INNODB_TABLE_STATS +INNODB_TRX KEY_CACHES KEY_COLUMN_USAGE PARAMETERS PARTITIONS +PBXT_STATISTICS PLUGINS PROCESSLIST PROFILING @@ -36,29 +58,7 @@ TRIGGERS USER_PRIVILEGES USER_STATISTICS VIEWS -INNODB_CMPMEM_RESET -PBXT_STATISTICS -INNODB_CMPMEM -INNODB_RSEG -INNODB_SYS_TABLESTATS -INNODB_LOCK_WAITS -INNODB_INDEX_STATS -INNODB_CMP -INNODB_SYS_FOREIGN_COLS -INNODB_CMP_RESET -INNODB_BUFFER_POOL_PAGES -INNODB_TRX -INNODB_BUFFER_POOL_PAGES_INDEX -INNODB_LOCKS -INNODB_BUFFER_POOL_PAGES_BLOB -INNODB_SYS_TABLES -INNODB_SYS_FIELDS -INNODB_SYS_COLUMNS -INNODB_SYS_STATS -INNODB_SYS_FOREIGN -INNODB_SYS_INDEXES XTRADB_ADMIN_COMMAND -INNODB_TABLE_STATS SELECT t.table_name, c1.column_name FROM information_schema.tables t INNER JOIN @@ -72,7 +72,7 @@ FROM information_schema.columns c2 WHERE c2.table_schema = t.table_schema AND c2.table_name = t.table_name AND c2.column_name LIKE '%SCHEMA%' - ); + ) order by t.table_name; table_name column_name CHARACTER_SETS CHARACTER_SET_NAME CLIENT_STATISTICS CLIENT @@ -86,10 +86,32 @@ FILES TABLE_SCHEMA GLOBAL_STATUS VARIABLE_NAME GLOBAL_VARIABLES VARIABLE_NAME INDEX_STATISTICS TABLE_SCHEMA +INNODB_BUFFER_POOL_PAGES page_type +INNODB_BUFFER_POOL_PAGES_BLOB space_id +INNODB_BUFFER_POOL_PAGES_INDEX index_id +INNODB_CMP page_size +INNODB_CMPMEM page_size +INNODB_CMPMEM_RESET page_size +INNODB_CMP_RESET page_size +INNODB_INDEX_STATS table_schema +INNODB_LOCKS lock_id +INNODB_LOCK_WAITS requesting_trx_id +INNODB_RSEG rseg_id +INNODB_SYS_COLUMNS TABLE_ID +INNODB_SYS_FIELDS INDEX_ID +INNODB_SYS_FOREIGN ID +INNODB_SYS_FOREIGN_COLS ID +INNODB_SYS_INDEXES INDEX_ID +INNODB_SYS_STATS INDEX_ID +INNODB_SYS_TABLES SCHEMA +INNODB_SYS_TABLESTATS SCHEMA +INNODB_TABLE_STATS table_schema +INNODB_TRX trx_id KEY_CACHES KEY_CACHE_NAME KEY_COLUMN_USAGE CONSTRAINT_SCHEMA PARAMETERS SPECIFIC_SCHEMA PARTITIONS TABLE_SCHEMA +PBXT_STATISTICS ID PLUGINS PLUGIN_NAME PROCESSLIST ID PROFILING QUERY_ID @@ -109,29 +131,7 @@ TRIGGERS TRIGGER_SCHEMA USER_PRIVILEGES GRANTEE USER_STATISTICS USER VIEWS TABLE_SCHEMA -INNODB_CMPMEM_RESET page_size -PBXT_STATISTICS ID -INNODB_CMPMEM page_size -INNODB_RSEG rseg_id -INNODB_SYS_TABLESTATS SCHEMA -INNODB_LOCK_WAITS requesting_trx_id -INNODB_INDEX_STATS table_schema -INNODB_CMP page_size -INNODB_SYS_FOREIGN_COLS ID -INNODB_CMP_RESET page_size -INNODB_BUFFER_POOL_PAGES page_type -INNODB_TRX trx_id -INNODB_BUFFER_POOL_PAGES_INDEX index_id -INNODB_LOCKS lock_id -INNODB_BUFFER_POOL_PAGES_BLOB space_id -INNODB_SYS_TABLES SCHEMA -INNODB_SYS_FIELDS INDEX_ID -INNODB_SYS_COLUMNS TABLE_ID -INNODB_SYS_STATS INDEX_ID -INNODB_SYS_FOREIGN ID -INNODB_SYS_INDEXES INDEX_ID XTRADB_ADMIN_COMMAND result_message -INNODB_TABLE_STATS table_schema SELECT t.table_name, c1.column_name FROM information_schema.tables t INNER JOIN @@ -145,7 +145,7 @@ FROM information_schema.columns c2 WHERE c2.table_schema = 'information_schema' AND c2.table_name = t.table_name AND c2.column_name LIKE '%SCHEMA%' - ); + ) order by t.table_name; table_name column_name CHARACTER_SETS CHARACTER_SET_NAME CLIENT_STATISTICS CLIENT @@ -159,10 +159,32 @@ FILES TABLE_SCHEMA GLOBAL_STATUS VARIABLE_NAME GLOBAL_VARIABLES VARIABLE_NAME INDEX_STATISTICS TABLE_SCHEMA +INNODB_BUFFER_POOL_PAGES page_type +INNODB_BUFFER_POOL_PAGES_BLOB space_id +INNODB_BUFFER_POOL_PAGES_INDEX index_id +INNODB_CMP page_size +INNODB_CMPMEM page_size +INNODB_CMPMEM_RESET page_size +INNODB_CMP_RESET page_size +INNODB_INDEX_STATS table_schema +INNODB_LOCKS lock_id +INNODB_LOCK_WAITS requesting_trx_id +INNODB_RSEG rseg_id +INNODB_SYS_COLUMNS TABLE_ID +INNODB_SYS_FIELDS INDEX_ID +INNODB_SYS_FOREIGN ID +INNODB_SYS_FOREIGN_COLS ID +INNODB_SYS_INDEXES INDEX_ID +INNODB_SYS_STATS INDEX_ID +INNODB_SYS_TABLES SCHEMA +INNODB_SYS_TABLESTATS SCHEMA +INNODB_TABLE_STATS table_schema +INNODB_TRX trx_id KEY_CACHES KEY_CACHE_NAME KEY_COLUMN_USAGE CONSTRAINT_SCHEMA PARAMETERS SPECIFIC_SCHEMA PARTITIONS TABLE_SCHEMA +PBXT_STATISTICS ID PLUGINS PLUGIN_NAME PROCESSLIST ID PROFILING QUERY_ID @@ -182,29 +204,7 @@ TRIGGERS TRIGGER_SCHEMA USER_PRIVILEGES GRANTEE USER_STATISTICS USER VIEWS TABLE_SCHEMA -INNODB_CMPMEM_RESET page_size -PBXT_STATISTICS ID -INNODB_CMPMEM page_size -INNODB_RSEG rseg_id -INNODB_SYS_TABLESTATS SCHEMA -INNODB_LOCK_WAITS requesting_trx_id -INNODB_INDEX_STATS table_schema -INNODB_CMP page_size -INNODB_SYS_FOREIGN_COLS ID -INNODB_CMP_RESET page_size -INNODB_BUFFER_POOL_PAGES page_type -INNODB_TRX trx_id -INNODB_BUFFER_POOL_PAGES_INDEX index_id -INNODB_LOCKS lock_id -INNODB_BUFFER_POOL_PAGES_BLOB space_id -INNODB_SYS_TABLES SCHEMA -INNODB_SYS_FIELDS INDEX_ID -INNODB_SYS_COLUMNS TABLE_ID -INNODB_SYS_STATS INDEX_ID -INNODB_SYS_FOREIGN ID -INNODB_SYS_INDEXES INDEX_ID XTRADB_ADMIN_COMMAND result_message -INNODB_TABLE_STATS table_schema select 1 as f1 from information_schema.tables where "CHARACTER_SETS"= (select cast(table_name as char) from information_schema.tables order by table_name limit 1) limit 1; @@ -283,10 +283,11 @@ TRIGGERS information_schema.TRIGGERS 1 USER_PRIVILEGES information_schema.USER_PRIVILEGES 1 USER_STATISTICS information_schema.USER_STATISTICS 1 VIEWS information_schema.VIEWS 1 -Database: information_schema +---------------------------------------+ -| Tables | +---------------------------------------+ ++---------------------------------------+ +Database: information_schema +| Tables | | CHARACTER_SETS | | CLIENT_STATISTICS | | COLLATIONS | @@ -299,10 +300,32 @@ Database: information_schema | GLOBAL_STATUS | | GLOBAL_VARIABLES | | INDEX_STATISTICS | +| INNODB_BUFFER_POOL_PAGES | +| INNODB_BUFFER_POOL_PAGES_BLOB | +| INNODB_BUFFER_POOL_PAGES_INDEX | +| INNODB_CMP | +| INNODB_CMPMEM | +| INNODB_CMPMEM_RESET | +| INNODB_CMP_RESET | +| INNODB_INDEX_STATS | +| INNODB_LOCKS | +| INNODB_LOCK_WAITS | +| INNODB_RSEG | +| INNODB_SYS_COLUMNS | +| INNODB_SYS_FIELDS | +| INNODB_SYS_FOREIGN | +| INNODB_SYS_FOREIGN_COLS | +| INNODB_SYS_INDEXES | +| INNODB_SYS_STATS | +| INNODB_SYS_TABLES | +| INNODB_SYS_TABLESTATS | +| INNODB_TABLE_STATS | +| INNODB_TRX | | KEY_CACHES | | KEY_COLUMN_USAGE | | PARAMETERS | | PARTITIONS | +| PBXT_STATISTICS | | PLUGINS | | PROCESSLIST | | PROFILING | @@ -322,34 +345,12 @@ Database: information_schema | USER_PRIVILEGES | | USER_STATISTICS | | VIEWS | -| INNODB_CMPMEM_RESET | -| PBXT_STATISTICS | -| INNODB_CMPMEM | -| INNODB_RSEG | -| INNODB_SYS_TABLESTATS | -| INNODB_LOCK_WAITS | -| INNODB_INDEX_STATS | -| INNODB_CMP | -| INNODB_SYS_FOREIGN_COLS | -| INNODB_CMP_RESET | -| INNODB_BUFFER_POOL_PAGES | -| INNODB_TRX | -| INNODB_BUFFER_POOL_PAGES_INDEX | -| INNODB_LOCKS | -| INNODB_BUFFER_POOL_PAGES_BLOB | -| INNODB_SYS_TABLES | -| INNODB_SYS_FIELDS | -| INNODB_SYS_COLUMNS | -| INNODB_SYS_STATS | -| INNODB_SYS_FOREIGN | -| INNODB_SYS_INDEXES | | XTRADB_ADMIN_COMMAND | -| INNODB_TABLE_STATS | +---------------------------------------+ -Database: INFORMATION_SCHEMA +---------------------------------------+ -| Tables | +---------------------------------------+ +Database: INFORMATION_SCHEMA +| Tables | | CHARACTER_SETS | | CLIENT_STATISTICS | | COLLATIONS | @@ -362,10 +363,32 @@ Database: INFORMATION_SCHEMA | GLOBAL_STATUS | | GLOBAL_VARIABLES | | INDEX_STATISTICS | +| INNODB_BUFFER_POOL_PAGES | +| INNODB_BUFFER_POOL_PAGES_BLOB | +| INNODB_BUFFER_POOL_PAGES_INDEX | +| INNODB_CMP | +| INNODB_CMPMEM | +| INNODB_CMPMEM_RESET | +| INNODB_CMP_RESET | +| INNODB_INDEX_STATS | +| INNODB_LOCKS | +| INNODB_LOCK_WAITS | +| INNODB_RSEG | +| INNODB_SYS_COLUMNS | +| INNODB_SYS_FIELDS | +| INNODB_SYS_FOREIGN | +| INNODB_SYS_FOREIGN_COLS | +| INNODB_SYS_INDEXES | +| INNODB_SYS_STATS | +| INNODB_SYS_TABLES | +| INNODB_SYS_TABLESTATS | +| INNODB_TABLE_STATS | +| INNODB_TRX | | KEY_CACHES | | KEY_COLUMN_USAGE | | PARAMETERS | | PARTITIONS | +| PBXT_STATISTICS | | PLUGINS | | PROCESSLIST | | PROFILING | @@ -385,36 +408,13 @@ Database: INFORMATION_SCHEMA | USER_PRIVILEGES | | USER_STATISTICS | | VIEWS | -| INNODB_CMPMEM_RESET | -| PBXT_STATISTICS | -| INNODB_CMPMEM | -| INNODB_RSEG | -| INNODB_SYS_TABLESTATS | -| INNODB_LOCK_WAITS | -| INNODB_INDEX_STATS | -| INNODB_CMP | -| INNODB_SYS_FOREIGN_COLS | -| INNODB_CMP_RESET | -| INNODB_BUFFER_POOL_PAGES | -| INNODB_TRX | -| INNODB_BUFFER_POOL_PAGES_INDEX | -| INNODB_LOCKS | -| INNODB_BUFFER_POOL_PAGES_BLOB | -| INNODB_SYS_TABLES | -| INNODB_SYS_FIELDS | -| INNODB_SYS_COLUMNS | -| INNODB_SYS_STATS | -| INNODB_SYS_FOREIGN | -| INNODB_SYS_INDEXES | | XTRADB_ADMIN_COMMAND | -| INNODB_TABLE_STATS | -+---------------------------------------+ -Wildcard: inf_rmation_schema +--------------------+ -| Databases | +--------------------+ -| information_schema | +--------------------+ +Wildcard: inf_rmation_schema +| Databases | +| information_schema | SELECT table_schema, count(*) FROM information_schema.TABLES WHERE table_schema IN ('mysql', 'INFORMATION_SCHEMA', 'test', 'mysqltest') AND table_name<>'ndb_binlog_index' AND table_name<>'ndb_apply_status' GROUP BY TABLE_SCHEMA; table_schema count(*) information_schema 58 diff --git a/mysql-test/r/init_connect.result b/mysql-test/r/init_connect.result index f5ec0bdc932..0ff6c206422 100644 --- a/mysql-test/r/init_connect.result +++ b/mysql-test/r/init_connect.result @@ -20,6 +20,8 @@ hex(a) 616263 set GLOBAL init_connect="adsfsdfsdfs"; select @a; +ERROR 08S01: Aborted connection to db: 'test' user: 'user_1' host: 'localhost' (init_connect command failed) +select @a; Got one of the listed errors drop table t1; End of 4.1 tests diff --git a/mysql-test/r/mysql_plugin.result b/mysql-test/r/mysql_plugin.result index 949f3748236..93567e28c3d 100644 --- a/mysql-test/r/mysql_plugin.result +++ b/mysql-test/r/mysql_plugin.result @@ -1,24 +1,34 @@ # # Ensure the plugin isn't loaded. # -SELECT * FROM mysql.plugin WHERE name = 'daemon_example' ORDER BY name; +SELECT * FROM mysql.plugin WHERE dl like 'libdaemon%' ORDER BY name; name dl # # Enable the plugin... # # +# Simulate loading a plugin libary with multiple entry points. +# This will test the DISABLE to ensure all rows are removed. +# +INSERT INTO mysql.plugin VALUES ('wicky', 'libdaemon_example.so'); +INSERT INTO mysql.plugin VALUES ('wacky', 'libdaemon_example.so'); +INSERT INTO mysql.plugin VALUES ('wonky', 'libdaemon_example.so'); +# # Ensure the plugin is now loaded. # -SELECT * FROM mysql.plugin WHERE name = 'daemon_example' ORDER BY name; +SELECT * FROM mysql.plugin WHERE dl like 'libdaemon%' ORDER BY name; name dl daemon_example libdaemon_example.so +wacky libdaemon_example.so +wicky libdaemon_example.so +wonky libdaemon_example.so # # Disable the plugin... # # # Ensure the plugin isn't loaded. # -SELECT * FROM mysql.plugin WHERE name = 'daemon_example' ORDER BY name; +SELECT * FROM mysql.plugin WHERE dl like 'libdaemon%' ORDER BY name; name dl # # Attempt to load non-existant plugin diff --git a/mysql-test/r/mysql_upgrade.result b/mysql-test/r/mysql_upgrade.result index cc4c7a1dad9..247c2b80d62 100644 --- a/mysql-test/r/mysql_upgrade.result +++ b/mysql-test/r/mysql_upgrade.result @@ -245,3 +245,44 @@ End of 5.1 tests The --upgrade-system-tables option was used, databases won't be touched. Phase 3/3: Running 'mysql_fix_privilege_tables'... OK +# +# Bug#11827359 60223: MYSQL_UPGRADE PROBLEM WITH OPTION +# SKIP-WRITE-BINLOG +# +# Droping the previously created mysql_upgrade_info file.. +# Running mysql_upgrade with --skip-write-binlog.. +Phase 1/3: Fixing table and database names +Phase 2/3: Checking and upgrading tables +Processing databases +information_schema +mtr +mtr.global_suppressions OK +mtr.test_suppressions OK +mysql +mysql.columns_priv OK +mysql.db OK +mysql.event OK +mysql.func OK +mysql.help_category OK +mysql.help_keyword OK +mysql.help_relation OK +mysql.help_topic OK +mysql.host OK +mysql.ndb_binlog_index OK +mysql.plugin OK +mysql.proc OK +mysql.procs_priv OK +mysql.proxies_priv OK +mysql.servers OK +mysql.tables_priv OK +mysql.time_zone OK +mysql.time_zone_leap_second OK +mysql.time_zone_name OK +mysql.time_zone_transition OK +mysql.time_zone_transition_type OK +mysql.user OK +performance_schema +test +Phase 3/3: Running 'mysql_fix_privilege_tables'... +OK +End of tests diff --git a/mysql-test/r/mysqld--help-notwin.result b/mysql-test/r/mysqld--help-notwin.result index 0155a06a941..b0c1648327d 100644 --- a/mysql-test/r/mysqld--help-notwin.result +++ b/mysql-test/r/mysqld--help-notwin.result @@ -400,6 +400,8 @@ The following options may be given as the first argument: After this many write locks, allow some read locks to run in between --memlock Lock mysqld in memory. + --metadata-locks-cache-size=# + Size of unused metadata locks cache --min-examined-row-limit=# Don't write queries to slow log that examine fewer rows than that @@ -956,6 +958,7 @@ max-tmp-tables 32 max-user-connections 0 max-write-lock-count 18446744073709551615 memlock FALSE +metadata-locks-cache-size 1024 min-examined-row-limit 0 mrr-buffer-size 262144 multi-range-count 256 diff --git a/mysql-test/r/mysqld--help-win.result b/mysql-test/r/mysqld--help-win.result index dbc42fdc4ba..9fd1b8479d2 100644 --- a/mysql-test/r/mysqld--help-win.result +++ b/mysql-test/r/mysqld--help-win.result @@ -399,6 +399,8 @@ The following options may be given as the first argument: After this many write locks, allow some read locks to run in between --memlock Lock mysqld in memory. + --metadata-locks-cache-size=# + Size of unused metadata locks cache --min-examined-row-limit=# Don't write queries to slow log that examine fewer rows than that @@ -760,6 +762,10 @@ The following options may be given as the first argument: Log slow queries to given log file. Defaults logging to 'hostname'-slow.log. Must be enabled to activate other slow log options + --slow-start-timeout=# + Maximum number of milliseconds that the service control + manager should wait before trying to kill the windows + service during startup(Default: 15000). --socket=name Socket file to use for connection --sort-buffer-size=# Each thread that needs to do a sort allocates a buffer of @@ -959,6 +965,7 @@ max-tmp-tables 32 max-user-connections 0 max-write-lock-count 18446744073709551615 memlock FALSE +metadata-locks-cache-size 1024 min-examined-row-limit 0 mrr-buffer-size 262144 multi-range-count 256 @@ -1053,6 +1060,7 @@ slave-transaction-retries 10 slave-type-conversions slow-launch-time 2 slow-query-log FALSE +slow-start-timeout 15000 sort-buffer-size 2097152 sql-mode stack-trace TRUE diff --git a/mysql-test/r/mysqldump.result b/mysql-test/r/mysqldump.result index 4cb50b02533..022523d4749 100644 --- a/mysql-test/r/mysqldump.result +++ b/mysql-test/r/mysqldump.result @@ -4747,3 +4747,107 @@ UNLOCK TABLES; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; DROP TABLE t1; +# +# Bug#12809202 61854: MYSQLDUMP --SINGLE-TRANSACTION --FLUSH-LOG BREAKS +# CONSISTENCY +# +DROP DATABASE IF EXISTS b12809202_db; +CREATE DATABASE b12809202_db; +CREATE TABLE b12809202_db.t1 (c1 INT); +CREATE TABLE b12809202_db.t2 (c1 INT); +INSERT INTO b12809202_db.t1 VALUES (1), (2), (3); +INSERT INTO b12809202_db.t2 VALUES (1), (2), (3); +# Starting mysqldump with --single-transaction & --flush-log options.. +# Note : In the following dump the transaction +# should start only after the logs are +# flushed, as 'flush logs' causes implicit +# commit starting 5.5. + +#### Dump starts here #### +-- Connecting to localhost... +-- main : logs flushed successfully! +-- Starting transaction... +-- Retrieving table structure for table t1... +-- Sending SELECT query... +-- Retrieving rows... +-- +-- Host: localhost Database: b12809202_db +-- ------------------------------------------------------ + +/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; +/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; +/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; +/*!40101 SET NAMES utf8 */; +/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; +/*!40103 SET TIME_ZONE='+00:00' */; +/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; +/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; +/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; +/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; + +-- +-- Table structure for table `t1` +-- + +DROP TABLE IF EXISTS `t1`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `t1` ( + `c1` int(11) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `t1` +-- + +LOCK TABLES `t1` WRITE; +/*!40000 ALTER TABLE `t1` DISABLE KEYS */; +INSERT INTO `t1` VALUES (1),(2),(3); +-- Retrieving table structure for table t2... +-- Sending SELECT query... +-- Retrieving rows... +/*!40000 ALTER TABLE `t1` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `t2` +-- + +DROP TABLE IF EXISTS `t2`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `t2` ( + `c1` int(11) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `t2` +-- + +LOCK TABLES `t2` WRITE; +/*!40000 ALTER TABLE `t2` DISABLE KEYS */; +INSERT INTO `t2` VALUES (1),(2),(3); +/*!40000 ALTER TABLE `t2` ENABLE KEYS */; +UNLOCK TABLES; +-- Disconnecting from localhost... +/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; + +/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; +/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; +/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; +/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; +/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; +/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; +/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; + +-- Dump completed +#### Dump ends here #### +DROP TABLE b12809202_db.t1; +DROP TABLE b12809202_db.t2; +DROP DATABASE b12809202_db; +# +# Delete all existing binary logs. +# +RESET MASTER; diff --git a/mysql-test/r/mysqltest.result b/mysql-test/r/mysqltest.result index 2c9287d1646..10139295871 100644 --- a/mysql-test/r/mysqltest.result +++ b/mysql-test/r/mysqltest.result @@ -557,6 +557,7 @@ mysqltest: At line 1: Wrong column number to replace_column in 'replace_column 1 select "LONG_STRING" as x; x LONG_STRING +dog mysqltest: At line 1: Invalid integer argument "10!" mysqltest: At line 1: Invalid integer argument "a" mysqltest: At line 1: Missing required argument 'connection name' to command 'connect' @@ -674,6 +675,22 @@ a D 1 1 1 4 drop table t1; +y +txt +b is b and more is more +txt +a is a and less is more +create table t2 ( a char(10)); +garbage; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'garbage' at line 1 +garbage; +Got one of the listed errors +garbage; +Got one of the listed errors +insert into t1 values ("Abcd"); +Got one of the listed errors +garbage; +drop table t2; create table t1 ( f1 char(10)); insert into t1 values ("Abcd"); select * from t1; diff --git a/mysql-test/r/partition_innodb_plugin.result b/mysql-test/r/partition_innodb_plugin.result index 03163e972b5..21f18f715d0 100644 --- a/mysql-test/r/partition_innodb_plugin.result +++ b/mysql-test/r/partition_innodb_plugin.result @@ -1,8 +1,8 @@ # # Bug#11766879/Bug#60106: DIFF BETWEEN # OF INDEXES IN MYSQL VS INNODB, # PARTITONING, ON INDEX CREATE +# Bug#12696518: MEMORY LEAKS IN HA_PARTITION (VALGRIND TESTS ON TRUNK) # -call mtr.add_suppression("contains 2 indexes inside InnoDB, which is different from the number of indexes 1 defined in the MySQL"); CREATE TABLE t1 ( id bigint NOT NULL AUTO_INCREMENT, time date, @@ -20,6 +20,17 @@ ERROR 23000: Duplicate entry '2011-07-25-1' for key 'uk_time_id2' SELECT COUNT(*) FROM t1; COUNT(*) 3 +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `time` date NOT NULL DEFAULT '0000-00-00', + `id2` bigint(20) NOT NULL, + PRIMARY KEY (`id`,`time`) +) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 +/*!50100 PARTITION BY RANGE (TO_DAYS(time)) +(PARTITION p10 VALUES LESS THAN (734708) ENGINE = InnoDB, + PARTITION p20 VALUES LESS THAN MAXVALUE ENGINE = InnoDB) */ DROP TABLE t1; call mtr.add_suppression("InnoDB: Error: table `test`.`t1` .* InnoDB internal"); # diff --git a/mysql-test/r/query_cache.result b/mysql-test/r/query_cache.result index e35012e2218..d9cb2d99020 100644 --- a/mysql-test/r/query_cache.result +++ b/mysql-test/r/query_cache.result @@ -1596,7 +1596,63 @@ set global query_cache_type=0; show status like 'Qcache_free_blocks'; Variable_name Value Qcache_free_blocks 0 +set global query_cache_size=102400; +ERROR HY000: Query cache is disabled; set query_cache_type to ON or DEMAND to enable it +set global query_cache_type=on; +set session query_cache_type=on; Restore default values. +drop database if exists db1; +drop database if exists db2; +set GLOBAL query_cache_size=15*1024*1024; +create database db1; +use db1; +create table t1(c1 int)engine=myisam; +insert into t1(c1) values (1); +select * from db1.t1 f; +c1 +1 +show status like 'Qcache_queries_in_cache'; +Variable_name Value +Qcache_queries_in_cache 1 +create database db2; +rename table db1.t1 to db2.t2; +drop database db1; +show status like 'Qcache_queries_in_cache'; +Variable_name Value +Qcache_queries_in_cache 0 +drop database db2; +set global query_cache_size=default; +drop database if exists db1; +drop database if exists db3; +set GLOBAL query_cache_size=15*1024*1024; +create database db1; +create database db3; +use db1; +create table t1(c1 int) engine=myisam; +use db3; +create table t1(c1 int) engine=myisam; +use db1; +insert into t1(c1) values (1); +use test; +select * from db1.t1; +c1 +1 +select c1+1 from db1.t1; +c1+1 +2 +select * from db3.t1; +c1 +show status like 'Qcache_queries_in_cache'; +Variable_name Value +Qcache_queries_in_cache 3 +create database db2; +rename table db1.t1 to db2.t2; +drop database db1; +show status like 'Qcache_queries_in_cache'; +Variable_name Value +Qcache_queries_in_cache 1 +drop database db2; +drop database db3; set GLOBAL query_cache_type=default; set GLOBAL query_cache_limit=default; set GLOBAL query_cache_min_res_unit=default; diff --git a/mysql-test/r/select.result b/mysql-test/r/select.result index 57e0ca97999..7f035ca749a 100644 --- a/mysql-test/r/select.result +++ b/mysql-test/r/select.result @@ -5234,6 +5234,7 @@ avg(distinct(t1.a)) 0 DROP TABLE t1; # End of test BUG#57203 +# # lp:822760 Wrong result with view + invalid dates # CREATE TABLE t1 (f1 date); @@ -5270,4 +5271,22 @@ Warning 1292 Incorrect datetime value: 'zz' Warning 1292 Incorrect datetime value: 'aa' DROP TABLE t1; DROP VIEW v1; +# +# Bug#63020: Function "format"'s 'locale' argument is not considered +# when creating a "view' +# +CREATE TABLE t1 (f1 DECIMAL(10,2)); +INSERT INTO t1 VALUES (11.67),(17865.3),(12345678.92); +CREATE VIEW view_t1 AS SELECT FORMAT(f1,1,'sk_SK') AS f1 FROM t1; +SHOW CREATE VIEW view_t1; +View Create View character_set_client collation_connection +view_t1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `view_t1` AS select format(`t1`.`f1`,1,'sk_SK') AS `f1` from `t1` latin1 latin1_swedish_ci +SELECT * FROM view_t1; +f1 +11,7 +17 865,3 +12 345 678,9 +DROP TABLE t1; +DROP VIEW view_t1; +# End of test BUG#63020 SET optimizer_switch=@save_optimizer_switch; diff --git a/mysql-test/r/select_jcl6.result b/mysql-test/r/select_jcl6.result index bfd42910508..54eed1ebaae 100644 --- a/mysql-test/r/select_jcl6.result +++ b/mysql-test/r/select_jcl6.result @@ -5245,6 +5245,7 @@ avg(distinct(t1.a)) 0 DROP TABLE t1; # End of test BUG#57203 +# # lp:822760 Wrong result with view + invalid dates # CREATE TABLE t1 (f1 date); @@ -5281,6 +5282,24 @@ Warning 1292 Incorrect datetime value: 'zz' Warning 1292 Incorrect datetime value: 'aa' DROP TABLE t1; DROP VIEW v1; +# +# Bug#63020: Function "format"'s 'locale' argument is not considered +# when creating a "view' +# +CREATE TABLE t1 (f1 DECIMAL(10,2)); +INSERT INTO t1 VALUES (11.67),(17865.3),(12345678.92); +CREATE VIEW view_t1 AS SELECT FORMAT(f1,1,'sk_SK') AS f1 FROM t1; +SHOW CREATE VIEW view_t1; +View Create View character_set_client collation_connection +view_t1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `view_t1` AS select format(`t1`.`f1`,1,'sk_SK') AS `f1` from `t1` latin1 latin1_swedish_ci +SELECT * FROM view_t1; +f1 +11,7 +17 865,3 +12 345 678,9 +DROP TABLE t1; +DROP VIEW view_t1; +# End of test BUG#63020 SET optimizer_switch=@save_optimizer_switch; set join_cache_level=default; show variables like 'join_cache_level'; diff --git a/mysql-test/r/select_pkeycache.result b/mysql-test/r/select_pkeycache.result index 57e0ca97999..7f035ca749a 100644 --- a/mysql-test/r/select_pkeycache.result +++ b/mysql-test/r/select_pkeycache.result @@ -5234,6 +5234,7 @@ avg(distinct(t1.a)) 0 DROP TABLE t1; # End of test BUG#57203 +# # lp:822760 Wrong result with view + invalid dates # CREATE TABLE t1 (f1 date); @@ -5270,4 +5271,22 @@ Warning 1292 Incorrect datetime value: 'zz' Warning 1292 Incorrect datetime value: 'aa' DROP TABLE t1; DROP VIEW v1; +# +# Bug#63020: Function "format"'s 'locale' argument is not considered +# when creating a "view' +# +CREATE TABLE t1 (f1 DECIMAL(10,2)); +INSERT INTO t1 VALUES (11.67),(17865.3),(12345678.92); +CREATE VIEW view_t1 AS SELECT FORMAT(f1,1,'sk_SK') AS f1 FROM t1; +SHOW CREATE VIEW view_t1; +View Create View character_set_client collation_connection +view_t1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `view_t1` AS select format(`t1`.`f1`,1,'sk_SK') AS `f1` from `t1` latin1 latin1_swedish_ci +SELECT * FROM view_t1; +f1 +11,7 +17 865,3 +12 345 678,9 +DROP TABLE t1; +DROP VIEW view_t1; +# End of test BUG#63020 SET optimizer_switch=@save_optimizer_switch; diff --git a/mysql-test/r/sp.result b/mysql-test/r/sp.result index fffb1ddceef..c8743ab112d 100644 --- a/mysql-test/r/sp.result +++ b/mysql-test/r/sp.result @@ -2772,20 +2772,23 @@ userid drop procedure bug8116| drop table t3| drop procedure if exists bug6857| -create procedure bug6857(counter int) +create procedure bug6857() begin declare t0, t1 int; declare plus bool default 0; -set t0 = current_time(); -while counter > 0 do -set counter = counter - 1; -end while; -set t1 = current_time(); +set t0 = unix_timestamp(); +select sleep(1.1); +set t1 = unix_timestamp(); if t1 > t0 then set plus = 1; end if; select plus; end| +call bug6857()| +sleep(1.1) +0 +plus +1 drop procedure bug6857| drop procedure if exists bug8757| create procedure bug8757() @@ -7435,17 +7438,17 @@ ERROR 42000: Undeclared variable: a # Try to use data types not allowed in LIMIT # create procedure p1(p1 date, p2 date) select * from t1 limit p1, p2; -ERROR HY000: A variable of a non-integer type in LIMIT clause +ERROR HY000: A variable of a non-integer based type in LIMIT clause create procedure p1(p1 integer, p2 float) select * from t1 limit p1, p2; -ERROR HY000: A variable of a non-integer type in LIMIT clause +ERROR HY000: A variable of a non-integer based type in LIMIT clause create procedure p1(p1 integer, p2 char(1)) select * from t1 limit p1, p2; -ERROR HY000: A variable of a non-integer type in LIMIT clause +ERROR HY000: A variable of a non-integer based type in LIMIT clause create procedure p1(p1 varchar(5), p2 char(1)) select * from t1 limit p1, p2; -ERROR HY000: A variable of a non-integer type in LIMIT clause +ERROR HY000: A variable of a non-integer based type in LIMIT clause create procedure p1(p1 decimal, p2 decimal) select * from t1 limit p1, p2; -ERROR HY000: A variable of a non-integer type in LIMIT clause +ERROR HY000: A variable of a non-integer based type in LIMIT clause create procedure p1(p1 double, p2 double) select * from t1 limit p1, p2; -ERROR HY000: A variable of a non-integer type in LIMIT clause +ERROR HY000: A variable of a non-integer based type in LIMIT clause # # Finally, test the valid case. # @@ -7481,9 +7484,117 @@ call p1(3, 2); c1 4 5 +# Try to create a function that +# refers to non-existing variables. +create function f1(p1 integer, p2 integer) +returns int +begin +declare a int; +set a = (select count(*) from t1 limit a, b); +return a; +end| +ERROR 42000: Undeclared variable: b +create function f1() +returns int +begin +declare a, b, c int; +set a = (select count(*) from t1 limit b, c); +return a; +end| +# How do we handle NULL limit values? +select f1(); +f1() +NULL +drop function f1; +# +# Try to use data types not allowed in LIMIT +# +create function f1(p1 date, p2 date) +returns int +begin +declare a int; +set a = (select count(*) from t1 limit p1, p2); +return a; +end| +ERROR HY000: A variable of a non-integer based type in LIMIT clause +create function f1(p1 integer, p2 float) +returns int +begin +declare a int; +set a = (select count(*) from t1 limit p1, p2); +return a; +end| +ERROR HY000: A variable of a non-integer based type in LIMIT clause +create function f1(p1 integer, p2 char(1)) +returns int +begin +declare a int; +set a = (select count(*) from t1 limit p1, p2); +return a; +end| +ERROR HY000: A variable of a non-integer based type in LIMIT clause +create function f1(p1 varchar(5), p2 char(1)) +returns int +begin +declare a int; +set a = (select count(*) from t1 limit p1, p2); +return a; +end| +ERROR HY000: A variable of a non-integer based type in LIMIT clause +create function f1(p1 decimal, p2 decimal) +returns int +begin +declare a int; +set a = (select count(*) from t1 limit p1, p2); +return a; +end| +ERROR HY000: A variable of a non-integer based type in LIMIT clause +create function f1(p1 double, p2 double) +returns int +begin +declare a int; +set a = (select count(*) from t1 limit p1, p2); +return a; +end| +ERROR HY000: A variable of a non-integer based type in LIMIT clause +# +# Finally, test the valid case. +# +create function f1(p1 integer, p2 integer) +returns int +begin +declare count int; +set count= (select count(*) from (select * from t1 limit p1, p2) t_1); +return count; +end| +select f1(0, 0); +f1(0, 0) +0 +select f1(0, -1); +f1(0, -1) +5 +select f1(-1, 0); +f1(-1, 0) +0 +select f1(-1, -1); +f1(-1, -1) +0 +select f1(0, 1); +f1(0, 1) +1 +select f1(1, 0); +f1(1, 0) +0 +select f1(1, 5); +f1(1, 5) +4 +select f1(3, 2); +f1(3, 2) +2 # Cleanup drop table t1; drop procedure p1; +drop function f1; # # BUG#11766234: 59299: ASSERT (TABLE_REF->TABLE || TABLE_REF->VIEW) # FAILS IN SET_FIELD_ITERATOR @@ -7604,4 +7715,34 @@ b DROP TABLE t1; DROP PROCEDURE p1; +# +# Bug#12621017 - Crash if a sp variable is used in the +# limit clause of a set statement +# +DROP TABLE IF EXISTS t1; +DROP PROCEDURE IF EXISTS p1; +DROP PROCEDURE IF EXISTS p2; +CREATE TABLE t1 (c1 INT); +INSERT INTO t1 VALUES (1); +CREATE PROCEDURE p1() +BEGIN +DECLARE foo, cnt INT UNSIGNED DEFAULT 1; +SET foo = (SELECT MIN(c1) FROM t1 LIMIT cnt); +END| +CREATE PROCEDURE p2() +BEGIN +DECLARE iLimit INT; +DECLARE iVal INT; +DECLARE cur1 CURSOR FOR +SELECT c1 FROM t1 +LIMIT iLimit; +SET iLimit=1; +OPEN cur1; +FETCH cur1 INTO iVal; +END| +CALL p1(); +CALL p2(); +DROP PROCEDURE p1; +DROP PROCEDURE p2; +DROP TABLE t1; # End of 5.5 test diff --git a/mysql-test/r/view_grant.result b/mysql-test/r/view_grant.result index 7b94bdccc6b..bfd09bfa9cd 100644 --- a/mysql-test/r/view_grant.result +++ b/mysql-test/r/view_grant.result @@ -109,6 +109,9 @@ ERROR 42000: SHOW VIEW command denied to user 'mysqltest_1'@'localhost' for tabl explain select c from mysqltest.v5; ERROR 42000: SELECT command denied to user 'mysqltest_1'@'localhost' for table 'v5' show create view mysqltest.v5; +ERROR 42000: SELECT command denied to user 'mysqltest_1'@'localhost' for table 'v5' +grant select on mysqltest.v5 to mysqltest_1@localhost; +show create view mysqltest.v5; View Create View character_set_client collation_connection v5 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `mysqltest`.`v5` AS select (`mysqltest`.`t1`.`a` + 1) AS `c`,(`mysqltest`.`t1`.`b` + 1) AS `d` from `mysqltest`.`t1` latin1 latin1_swedish_ci explain select c from mysqltest.v1; @@ -117,6 +120,7 @@ show create view mysqltest.v1; ERROR 42000: SHOW VIEW command denied to user 'mysqltest_1'@'localhost' for table 'v1' grant show view on mysqltest.v1 to mysqltest_1@localhost; grant select on mysqltest.t1 to mysqltest_1@localhost; +revoke select on mysqltest.v5 from mysqltest_1@localhost; explain select c from mysqltest.v1; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 system NULL NULL NULL NULL 0 const row not found @@ -137,9 +141,6 @@ show create view mysqltest.v4; ERROR 42000: SHOW VIEW command denied to user 'mysqltest_1'@'localhost' for table 'v4' explain select c from mysqltest.v5; ERROR 42000: SELECT command denied to user 'mysqltest_1'@'localhost' for table 'v5' -show create view mysqltest.v5; -View Create View character_set_client collation_connection -v5 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `mysqltest`.`v5` AS select (`mysqltest`.`t1`.`a` + 1) AS `c`,(`mysqltest`.`t1`.`b` + 1) AS `d` from `mysqltest`.`t1` latin1 latin1_swedish_ci grant show view on mysqltest.* to mysqltest_1@localhost; explain select c from mysqltest.v1; id select_type table type possible_keys key key_len ref rows Extra diff --git a/mysql-test/suite/federated/federatedx.test b/mysql-test/suite/federated/federatedx.test index cabcf0cea1b..2c307587b4f 100644 --- a/mysql-test/suite/federated/federatedx.test +++ b/mysql-test/suite/federated/federatedx.test @@ -4,8 +4,6 @@ # -# should work with embedded server after mysqltest is fixed ---source include/not_embedded.inc --source federated.inc --source have_federatedx.inc diff --git a/mysql-test/suite/innodb/r/innodb-index.result b/mysql-test/suite/innodb/r/innodb-index.result index 785270be600..a33099661aa 100644 --- a/mysql-test/suite/innodb/r/innodb-index.result +++ b/mysql-test/suite/innodb/r/innodb-index.result @@ -1045,20 +1045,6 @@ COMMIT; UPDATE bug12547647 SET c = REPEAT('b',16928); ERROR HY000: Undo log record is too big. DROP TABLE bug12547647; -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) -) 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; set global innodb_file_per_table=0; set global innodb_file_format=Antelope; set global innodb_file_format_max=Antelope; diff --git a/mysql-test/suite/innodb/r/innodb.result b/mysql-test/suite/innodb/r/innodb.result index ff9f7057622..2ec6c91f7d5 100644 --- a/mysql-test/suite/innodb/r/innodb.result +++ b/mysql-test/suite/innodb/r/innodb.result @@ -3130,3 +3130,14 @@ Handler_update 1 Variable_name Value Handler_delete 1 DROP TABLE bug58912; +create table t1 (f1 integer primary key) engine=innodb; +flush status; +show status like "handler_read_key"; +Variable_name Value +Handler_read_key 0 +select f1 from t1; +f1 +show status like "handler_read_key"; +Variable_name Value +Handler_read_key 0 +drop table t1; diff --git a/mysql-test/suite/innodb/r/innodb_bug54044.result b/mysql-test/suite/innodb/r/innodb_bug54044.result index 3f607e20ddf..47aa8805834 100644 --- a/mysql-test/suite/innodb/r/innodb_bug54044.result +++ b/mysql-test/suite/innodb/r/innodb_bug54044.result @@ -1,2 +1,9 @@ CREATE TEMPORARY TABLE table_54044 ENGINE = INNODB AS SELECT IF(NULL IS NOT NULL, NULL, NULL); +SHOW CREATE TABLE table_54044; +Table Create Table +table_54044 CREATE TEMPORARY TABLE `table_54044` ( + `IF(NULL IS NOT NULL, NULL, NULL)` binary(0) DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +CREATE TEMPORARY TABLE tmp1 ENGINE = INNODB AS SELECT COALESCE(NULL, NULL, NULL); +CREATE TEMPORARY TABLE tmp2 ENGINE = INNODB AS SELECT GREATEST(NULL, NULL); diff --git a/mysql-test/suite/innodb/r/innodb_bug60229.result b/mysql-test/suite/innodb/r/innodb_bug60229.result new file mode 100644 index 00000000000..a3971876193 --- /dev/null +++ b/mysql-test/suite/innodb/r/innodb_bug60229.result @@ -0,0 +1,26 @@ +CREATE TABLE PERSON ( +PERSON_ID VARCHAR(50) NOT NULL, +DOB VARCHAR(50) NOT NULL, +NAME NVARCHAR(255) NOT NULL, +CONSTRAINT PK_PERSON PRIMARY KEY (PERSON_ID, DOB) +)Engine=InnoDB; +CREATE TABLE PHOTO ( +PERSON_ID VARCHAR(50) NOT NULL, +DOB VARCHAR(50) NOT NULL, +PHOTO_DETAILS VARCHAR(50) NULL, +CONSTRAINT PK_PHOTO PRIMARY KEY (PERSON_ID, DOB), +CONSTRAINT FK_PHOTO_2_PERSON FOREIGN KEY (PERSON_ID, DOB) REFERENCES PERSON (PERSON_ID, DOB) +)Engine=InnoDB; +CREATE TABLE ADDRESS ( +PERSON_ID VARCHAR(50) NOT NULL, +DOB VARCHAR(50) NOT NULL, +ADDRESS_ID VARCHAR(50) NOT NULL, +ADDRESS_DETAILS NVARCHAR(250) NULL, +CONSTRAINT PK_ADDRESS PRIMARY KEY (PERSON_ID, DOB, ADDRESS_ID), +CONSTRAINT FK_ADDRESS_2_PERSON FOREIGN KEY (PERSON_ID, DOB) REFERENCES PERSON (PERSON_ID, DOB) ON DELETE CASCADE +)Engine=InnoDB; +INSERT INTO PERSON VALUES("10", "11011999", "John"); +INSERT INTO PHOTO VALUES("10", "11011999", "new photo"); +DROP TABLE PHOTO; +DROP TABLE ADDRESS; +DROP TABLE PERSON; diff --git a/mysql-test/suite/innodb/r/innodb_cmp_drop_table.result b/mysql-test/suite/innodb/r/innodb_cmp_drop_table.result new file mode 100644 index 00000000000..1f6d6948756 --- /dev/null +++ b/mysql-test/suite/innodb/r/innodb_cmp_drop_table.result @@ -0,0 +1,14 @@ +set global innodb_file_per_table=on; +set global innodb_file_format=`1`; +create table t1(a text) engine=innodb key_block_size=8; +SELECT page_size FROM information_schema.innodb_cmpmem WHERE pages_used > 0; +page_size +8192 +drop table t1; +SELECT page_size FROM information_schema.innodb_cmpmem WHERE pages_used > 0; +page_size +8192 +create table t2(a text) engine=innodb; +SELECT page_size FROM information_schema.innodb_cmpmem WHERE pages_used > 0; +page_size +drop table t2; diff --git a/mysql-test/suite/innodb/r/innodb_lock_wait_timeout_1.result b/mysql-test/suite/innodb/r/innodb_lock_wait_timeout_1.result index 30e58aacff5..051266c526e 100644 --- a/mysql-test/suite/innodb/r/innodb_lock_wait_timeout_1.result +++ b/mysql-test/suite/innodb/r/innodb_lock_wait_timeout_1.result @@ -97,8 +97,6 @@ insert into t1 values (1,1), (2,null), (3,1), (4,1), # Demonstrate that for the SELECT statement # used later in the test JT_EQ_REF access method is used. # -set @tmp_optimizer_switch=@@optimizer_switch; -set optimizer_switch='derived_merge=off,derived_with_keys=off'; explain select 1 from t1 natural join (select 2 as a, 1 as b union all select 2 as a, 2 as b) as t2 for update; @@ -106,7 +104,7 @@ id 1 select_type PRIMARY table <derived2> type ALL -possible_keys NULL +possible_keys key0 key NULL key_len NULL ref NULL @@ -121,7 +119,7 @@ key PRIMARY key_len 4 ref t2.a rows 1 -Extra Using index condition; Using where +Extra Using where id 2 select_type DERIVED table NULL @@ -152,7 +150,6 @@ key_len NULL ref NULL rows NULL Extra -set optimizer_switch=@tmp_optimizer_switch; # # Demonstrate that the reported SELECT statement # no longer produces warnings. @@ -304,8 +301,6 @@ begin; # is retreived and processed first. # # Verify that JT_EQ_REF is used. -set @tmp_optimizer_switch=@@optimizer_switch; -set optimizer_switch='derived_merge=off,derived_with_keys=off'; explain select 1 from t1 natural join (select 3 as a, 2 as b union all select 3 as a, 1 as b) as t2 for update; @@ -313,7 +308,7 @@ id 1 select_type PRIMARY table <derived2> type ALL -possible_keys NULL +possible_keys key0 key NULL key_len NULL ref NULL @@ -328,7 +323,7 @@ key PRIMARY key_len 4 ref t2.a rows 1 -Extra Using index condition; Using where +Extra Using where id 2 select_type DERIVED table NULL @@ -359,7 +354,6 @@ key_len NULL ref NULL rows NULL Extra -set optimizer_switch=@tmp_optimizer_switch; # Lock the record. select 1 from t1 natural join (select 3 as a, 2 as b union all select 3 as a, 1 as b) as t2 for update; diff --git a/mysql-test/suite/innodb/r/innodb_replace.result b/mysql-test/suite/innodb/r/innodb_replace.result deleted file mode 100644 index 30009b8ddc9..00000000000 --- a/mysql-test/suite/innodb/r/innodb_replace.result +++ /dev/null @@ -1,77 +0,0 @@ -# -#Bug#11759688 52020: InnoDB can still deadlock -#on just INSERT...ON DUPLICATE KEY -#a.k.a. Bug#7975 deadlock without any locking, simple select and update -# -CREATE TABLE t1 (a INT PRIMARY KEY, b INT NOT NULL) ENGINE=InnoDB; -INSERT INTO t1 VALUES(3,1); -BEGIN; -SET DEBUG_SYNC='write_row_noreplace SIGNAL insert1 WAIT_FOR select1'; -INSERT INTO t1 VALUES(3,2); -SET DEBUG_SYNC='now WAIT_FOR insert1'; -SELECT * FROM t1 LOCK IN SHARE MODE; -a b -3 1 -SELECT * FROM t1 FOR UPDATE; -SET DEBUG_SYNC='now SIGNAL select1'; -ERROR 23000: Duplicate entry '3' for key 'PRIMARY' -INSERT INTO t1 VALUES(3,3) ON DUPLICATE KEY UPDATE b=b+10; -ERROR 40001: Deadlock found when trying to get lock; try restarting transaction -COMMIT; -SET DEBUG_SYNC='write_row_replace SIGNAL insert2 WAIT_FOR select2'; -REPLACE INTO t1 VALUES(3,4); -SET DEBUG_SYNC='now WAIT_FOR insert2'; -SELECT * FROM t1; -a b -3 11 -SELECT * FROM t1 LOCK IN SHARE MODE; -SET DEBUG_SYNC='now SIGNAL select2'; -SET DEBUG_SYNC='write_row_replace SIGNAL insert3 WAIT_FOR select3'; -INSERT INTO t1 VALUES(3,5) ON DUPLICATE KEY UPDATE b=b+20; -a b -3 4 -SET DEBUG_SYNC='now WAIT_FOR insert3'; -SELECT b FROM t1 LOCK IN SHARE MODE; -SET DEBUG_SYNC='now SIGNAL select3'; -b -24 -SET DEBUG_SYNC='write_row_noreplace SIGNAL insert4 WAIT_FOR select4'; -LOAD DATA INFILE '../../std_data/loaddata5.dat' INTO TABLE t1 FIELDS TERMINATED BY '' ENCLOSED BY '' (a, b); -SET DEBUG_SYNC='now WAIT_FOR insert4'; -SELECT b FROM t1 WHERE a=3 LOCK IN SHARE MODE; -b -24 -SELECT b FROM t1 WHERE a=3 FOR UPDATE; -SET DEBUG_SYNC='now SIGNAL select4'; -b -24 -ERROR 23000: Duplicate entry '3' for key 'PRIMARY' -SET DEBUG_SYNC='write_row_noreplace SIGNAL insert5 WAIT_FOR select5'; -LOAD DATA INFILE '../../std_data/loaddata5.dat' IGNORE INTO TABLE t1 FIELDS TERMINATED BY '' ENCLOSED BY '' (a, b); -SET DEBUG_SYNC='now WAIT_FOR insert5'; -SELECT * FROM t1; -a b -3 24 -SELECT * FROM t1 WHERE a=3 LOCK IN SHARE MODE; -a b -3 24 -SELECT * FROM t1 WHERE a=3 FOR UPDATE; -SET DEBUG_SYNC='now SIGNAL select5'; -a b -3 24 -SET DEBUG_SYNC='write_row_replace SIGNAL insert6 WAIT_FOR select6'; -LOAD DATA INFILE '../../std_data/loaddata5.dat' REPLACE INTO TABLE t1 FIELDS TERMINATED BY '' ENCLOSED BY '' (a, b); -SET DEBUG_SYNC='now WAIT_FOR insert6'; -SELECT * FROM t1; -a b -1 2 -3 24 -5 6 -SELECT a,b FROM t1 LOCK IN SHARE MODE; -SET DEBUG_SYNC='now SIGNAL select6'; -a b -1 2 -3 4 -5 6 -SET DEBUG_SYNC='RESET'; -DROP TABLE t1; diff --git a/mysql-test/suite/innodb/t/innodb-index.test b/mysql-test/suite/innodb/t/innodb-index.test index beeda98c7f1..2402c74fe53 100644 --- a/mysql-test/suite/innodb/t/innodb-index.test +++ b/mysql-test/suite/innodb/t/innodb-index.test @@ -530,24 +530,6 @@ COMMIT; --error ER_UNDO_RECORD_TOO_BIG UPDATE bug12547647 SET c = REPEAT('b',16928); DROP TABLE bug12547647; -# 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) -) 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; eval set global innodb_file_per_table=$per_table; eval set global innodb_file_format=$format; diff --git a/mysql-test/suite/innodb/t/innodb.test b/mysql-test/suite/innodb/t/innodb.test index 6150f4252cd..54628b0fb1b 100644 --- a/mysql-test/suite/innodb/t/innodb.test +++ b/mysql-test/suite/innodb/t/innodb.test @@ -2541,6 +2541,17 @@ SET GLOBAL innodb_thread_concurrency = @innodb_thread_concurrency_orig; # Clean up after the Bug#55284/Bug#58912 test case. DROP TABLE bug58912; +# +# Test fix for bug 13117023. InnoDB increments HA_READ_KEY_COUNT (aka +# HANDLER_READ_KEY) when it should not. +# +create table t1 (f1 integer primary key) engine=innodb; +flush status; +show status like "handler_read_key"; +select f1 from t1; +show status like "handler_read_key"; +drop table t1; + ####################################################################### # # # Please, DO NOT TOUCH this file as well as the innodb.result file. # diff --git a/mysql-test/suite/innodb/t/innodb_bug54044.test b/mysql-test/suite/innodb/t/innodb_bug54044.test index 46a32921c5b..4b6341d2412 100644 --- a/mysql-test/suite/innodb/t/innodb_bug54044.test +++ b/mysql-test/suite/innodb/t/innodb_bug54044.test @@ -2,6 +2,10 @@ # during create table, so it will not trigger assertion failure. +# This 'create table' operation no longer uses the NULL datatype. + CREATE TEMPORARY TABLE table_54044 ENGINE = INNODB AS SELECT IF(NULL IS NOT NULL, NULL, NULL); - +SHOW CREATE TABLE table_54044; +CREATE TEMPORARY TABLE tmp1 ENGINE = INNODB AS SELECT COALESCE(NULL, NULL, NULL); +CREATE TEMPORARY TABLE tmp2 ENGINE = INNODB AS SELECT GREATEST(NULL, NULL); diff --git a/mysql-test/suite/innodb/t/innodb_bug60229-master.opt b/mysql-test/suite/innodb/t/innodb_bug60229-master.opt new file mode 100644 index 00000000000..9b27aef9bf8 --- /dev/null +++ b/mysql-test/suite/innodb/t/innodb_bug60229-master.opt @@ -0,0 +1 @@ +--lower_case_table_names=0 diff --git a/mysql-test/suite/innodb/t/innodb_bug60229.test b/mysql-test/suite/innodb/t/innodb_bug60229.test new file mode 100644 index 00000000000..8dcf15157d6 --- /dev/null +++ b/mysql-test/suite/innodb/t/innodb_bug60229.test @@ -0,0 +1,39 @@ +# +# Bug #13083023 - 60229: BROKEN COMPATIBILITY: ERROR WHILE CREATE TABLE +# WITH FOREIGN KEY CONSTRAINT. + +-- source include/have_innodb.inc + +CREATE TABLE PERSON ( + PERSON_ID VARCHAR(50) NOT NULL, + DOB VARCHAR(50) NOT NULL, + NAME NVARCHAR(255) NOT NULL, + CONSTRAINT PK_PERSON PRIMARY KEY (PERSON_ID, DOB) +)Engine=InnoDB; + + +CREATE TABLE PHOTO ( + PERSON_ID VARCHAR(50) NOT NULL, + DOB VARCHAR(50) NOT NULL, + PHOTO_DETAILS VARCHAR(50) NULL, + CONSTRAINT PK_PHOTO PRIMARY KEY (PERSON_ID, DOB), + CONSTRAINT FK_PHOTO_2_PERSON FOREIGN KEY (PERSON_ID, DOB) REFERENCES PERSON (PERSON_ID, DOB) +)Engine=InnoDB; + + +CREATE TABLE ADDRESS ( + PERSON_ID VARCHAR(50) NOT NULL, + DOB VARCHAR(50) NOT NULL, + ADDRESS_ID VARCHAR(50) NOT NULL, + ADDRESS_DETAILS NVARCHAR(250) NULL, + CONSTRAINT PK_ADDRESS PRIMARY KEY (PERSON_ID, DOB, ADDRESS_ID), + CONSTRAINT FK_ADDRESS_2_PERSON FOREIGN KEY (PERSON_ID, DOB) REFERENCES PERSON (PERSON_ID, DOB) ON DELETE CASCADE +)Engine=InnoDB; + +INSERT INTO PERSON VALUES("10", "11011999", "John"); +INSERT INTO PHOTO VALUES("10", "11011999", "new photo"); + +DROP TABLE PHOTO; +DROP TABLE ADDRESS; +DROP TABLE PERSON; + diff --git a/mysql-test/suite/innodb/t/innodb_cmp_drop_table-master.opt b/mysql-test/suite/innodb/t/innodb_cmp_drop_table-master.opt new file mode 100644 index 00000000000..a9a3d8c3db8 --- /dev/null +++ b/mysql-test/suite/innodb/t/innodb_cmp_drop_table-master.opt @@ -0,0 +1 @@ +--innodb-buffer-pool-size=8M diff --git a/mysql-test/suite/innodb/t/innodb_cmp_drop_table.test b/mysql-test/suite/innodb/t/innodb_cmp_drop_table.test new file mode 100644 index 00000000000..84527e1b035 --- /dev/null +++ b/mysql-test/suite/innodb/t/innodb_cmp_drop_table.test @@ -0,0 +1,58 @@ + +let $per_table=`select @@innodb_file_per_table`; +let $format=`select @@innodb_file_format`; + +-- let $query_i_s = SELECT page_size FROM information_schema.innodb_cmpmem WHERE pages_used > 0 + +set global innodb_file_per_table=on; +set global innodb_file_format=`1`; + +create table t1(a text) engine=innodb key_block_size=8; + +-- disable_query_log + +# insert some rows so we are using compressed pages +-- let $i = 10 +while ($i) +{ + insert into t1 values(repeat('abcdefghijklmnopqrstuvwxyz',100)); + dec $i; +} +-- enable_query_log + +# we should be using some 8K pages +-- eval $query_i_s + +drop table t1; + +# because of lazy eviction at drop table in 5.5 there should be some +# used 8K pages +-- eval $query_i_s + +# create a non-compressed table and insert enough into it to evict +# compressed pages +create table t2(a text) engine=innodb; + +-- disable_query_log + +-- let $i = 400 +while ($i) +{ + insert into t2 values(repeat('abcdefghijklmnopqrstuvwxyz',1000)); + dec $i; +} + +-- enable_query_log + +# now there should be no 8K pages in the buffer pool +-- eval $query_i_s + +drop table t2; + +# +# restore environment to the state it was before this test execution +# + +-- disable_query_log +eval set global innodb_file_format=$format; +eval set global innodb_file_per_table=$per_table; diff --git a/mysql-test/suite/innodb/t/innodb_corrupt_bit.test b/mysql-test/suite/innodb/t/innodb_corrupt_bit.test index 34991362f98..7c4ea00afec 100644 --- a/mysql-test/suite/innodb/t/innodb_corrupt_bit.test +++ b/mysql-test/suite/innodb/t/innodb_corrupt_bit.test @@ -3,6 +3,10 @@ # -- source include/have_innodb.inc +# Issues with innodb_change_buffering_debug on Windows, so the test scenario +# cannot be created on windows +--source include/not_windows.inc + # This test needs debug server --source include/have_debug.inc diff --git a/mysql-test/suite/innodb/t/innodb_lock_wait_timeout_1.test b/mysql-test/suite/innodb/t/innodb_lock_wait_timeout_1.test index ef448680f93..5a0aaa86d4c 100644 --- a/mysql-test/suite/innodb/t/innodb_lock_wait_timeout_1.test +++ b/mysql-test/suite/innodb/t/innodb_lock_wait_timeout_1.test @@ -139,12 +139,10 @@ insert into t1 values (1,1), (2,null), (3,1), (4,1), --echo # used later in the test JT_EQ_REF access method is used. --echo # --vertical_results -set @tmp_optimizer_switch=@@optimizer_switch; -set optimizer_switch='derived_merge=off,derived_with_keys=off'; +--replace_result "Using index condition; Using where" "Using where" explain select 1 from t1 natural join (select 2 as a, 1 as b union all select 2 as a, 2 as b) as t2 for update; -set optimizer_switch=@tmp_optimizer_switch; --horizontal_results --echo # --echo # Demonstrate that the reported SELECT statement @@ -238,12 +236,10 @@ begin; --echo # --echo # Verify that JT_EQ_REF is used. --vertical_results -set @tmp_optimizer_switch=@@optimizer_switch; -set optimizer_switch='derived_merge=off,derived_with_keys=off'; +--replace_result "Using index condition; Using where" "Using where" explain select 1 from t1 natural join (select 3 as a, 2 as b union all select 3 as a, 1 as b) as t2 for update; -set optimizer_switch=@tmp_optimizer_switch; --horizontal_results --echo # Lock the record. select 1 from t1 natural join (select 3 as a, 2 as b union all diff --git a/mysql-test/suite/innodb/t/innodb_replace.test b/mysql-test/suite/innodb/t/innodb_replace.test deleted file mode 100644 index a35f423c85e..00000000000 --- a/mysql-test/suite/innodb/t/innodb_replace.test +++ /dev/null @@ -1,186 +0,0 @@ ---source include/have_innodb.inc ---source include/have_debug_sync.inc - ---echo # ---echo #Bug#11759688 52020: InnoDB can still deadlock ---echo #on just INSERT...ON DUPLICATE KEY ---echo #a.k.a. Bug#7975 deadlock without any locking, simple select and update ---echo # - -CREATE TABLE t1 (a INT PRIMARY KEY, b INT NOT NULL) ENGINE=InnoDB; - -INSERT INTO t1 VALUES(3,1); - -connect (con1,localhost,root,,); -connect (con2,localhost,root,,); -connection con1; - -BEGIN; -# normal INSERT of a duplicate should only S-lock the existing record (3,1) -SET DEBUG_SYNC='write_row_noreplace SIGNAL insert1 WAIT_FOR select1'; ---send -INSERT INTO t1 VALUES(3,2); - -connection default; -SET DEBUG_SYNC='now WAIT_FOR insert1'; -# this should S-lock (3,1); no conflict -SELECT * FROM t1 LOCK IN SHARE MODE; -# this should X-lock (3,1), conflicting with con1 ---send -SELECT * FROM t1 FOR UPDATE; - -connection con2; -# Check that the above SELECT is blocked -let $wait_condition= - select count(*) = 1 from information_schema.processlist - where state = 'Sending data' and - info = 'SELECT * FROM t1 FOR UPDATE'; ---source include/wait_condition.inc -SET DEBUG_SYNC='now SIGNAL select1'; - -connection con1; ---error ER_DUP_ENTRY -reap; -# We are still holding an S-lock on (3,1) after the failed INSERT. -# The following will upgrade it to an X-lock, causing a deadlock. -# InnoDB should resolve the deadlock by aborting the blocked SELECT. -INSERT INTO t1 VALUES(3,3) ON DUPLICATE KEY UPDATE b=b+10; - -connection default; ---error ER_LOCK_DEADLOCK -reap; -connection con1; -COMMIT; - -SET DEBUG_SYNC='write_row_replace SIGNAL insert2 WAIT_FOR select2'; ---send -REPLACE INTO t1 VALUES(3,4); - -connection default; -SET DEBUG_SYNC='now WAIT_FOR insert2'; -SELECT * FROM t1; ---send -SELECT * FROM t1 LOCK IN SHARE MODE; - -connection con2; -# Check that the above SELECT is blocked because of X lock. -let $wait_condition= - select count(*) = 1 from information_schema.processlist - where state = 'Sending data' and - info = 'SELECT * FROM t1 LOCK IN SHARE MODE'; ---source include/wait_condition.inc -SET DEBUG_SYNC='now SIGNAL select2'; - -connection con1; -reap; - -SET DEBUG_SYNC='write_row_replace SIGNAL insert3 WAIT_FOR select3'; ---send -INSERT INTO t1 VALUES(3,5) ON DUPLICATE KEY UPDATE b=b+20; - -connection default; -reap; -SET DEBUG_SYNC='now WAIT_FOR insert3'; ---send -SELECT b FROM t1 LOCK IN SHARE MODE; - -connection con2; -# Check that the above SELECT is blocked because of X lock. -let $wait_condition= - select count(*) = 1 from information_schema.processlist - where state = 'Sending data' and - info = 'SELECT b FROM t1 LOCK IN SHARE MODE'; ---source include/wait_condition.inc -SET DEBUG_SYNC='now SIGNAL select3'; - -connection default; -reap; - -connection con1; -reap; -SET DEBUG_SYNC='write_row_noreplace SIGNAL insert4 WAIT_FOR select4'; ---send -LOAD DATA INFILE '../../std_data/loaddata5.dat' INTO TABLE t1 FIELDS TERMINATED BY '' ENCLOSED BY '' (a, b); - -connection default; -SET DEBUG_SYNC='now WAIT_FOR insert4'; -# this should S-lock (3,1); no conflict -SELECT b FROM t1 WHERE a=3 LOCK IN SHARE MODE; -# this should X-lock (3,1), conflicting with con1 ---send -SELECT b FROM t1 WHERE a=3 FOR UPDATE; - -connection con2; -# Check that the above SELECT is blocked -let $wait_condition= - select count(*) = 1 from information_schema.processlist - where state = 'statistics' and - info = 'SELECT b FROM t1 WHERE a=3 FOR UPDATE'; ---source include/wait_condition.inc -SET DEBUG_SYNC='now SIGNAL select4'; - -connection default; -reap; - -connection con1; ---error ER_DUP_ENTRY -reap; -SET DEBUG_SYNC='write_row_noreplace SIGNAL insert5 WAIT_FOR select5'; ---send -LOAD DATA INFILE '../../std_data/loaddata5.dat' IGNORE INTO TABLE t1 FIELDS TERMINATED BY '' ENCLOSED BY '' (a, b); - -connection default; -SET DEBUG_SYNC='now WAIT_FOR insert5'; -SELECT * FROM t1; -# this should S-lock; no conflict -SELECT * FROM t1 WHERE a=3 LOCK IN SHARE MODE; -# this should X-lock, conflicting with the S-lock of the IGNORE in con1 ---send -SELECT * FROM t1 WHERE a=3 FOR UPDATE; - -connection con2; -# Check that the above SELECT is blocked -let $wait_condition= - select count(*) = 1 from information_schema.processlist - where state = 'statistics' and - info = 'SELECT * FROM t1 WHERE a=3 FOR UPDATE'; ---source include/wait_condition.inc -SET DEBUG_SYNC='now SIGNAL select5'; - -connection con1; -reap; -connection default; -reap; - -connection con1; -SET DEBUG_SYNC='write_row_replace SIGNAL insert6 WAIT_FOR select6'; ---send -LOAD DATA INFILE '../../std_data/loaddata5.dat' REPLACE INTO TABLE t1 FIELDS TERMINATED BY '' ENCLOSED BY '' (a, b); - -connection default; -SET DEBUG_SYNC='now WAIT_FOR insert6'; -SELECT * FROM t1; -# this should conflict with the X-lock acquired by the REPLACE ---send -SELECT a,b FROM t1 LOCK IN SHARE MODE; - -connection con2; -# Check that the above SELECT is blocked -let $wait_condition= - select count(*) = 1 from information_schema.processlist - where state = 'Sending data' and - info = 'SELECT a,b FROM t1 LOCK IN SHARE MODE'; ---source include/wait_condition.inc -SET DEBUG_SYNC='now SIGNAL select6'; - -connection con1; -reap; -connection default; -reap; - -disconnect con1; -disconnect con2; - -connection default; -SET DEBUG_SYNC='RESET'; -DROP TABLE t1; diff --git a/mysql-test/suite/parts/r/partition_debug_innodb.result b/mysql-test/suite/parts/r/partition_debug_innodb.result index c60b1e17979..891091efd58 100644 --- a/mysql-test/suite/parts/r/partition_debug_innodb.result +++ b/mysql-test/suite/parts/r/partition_debug_innodb.result @@ -1,4 +1,75 @@ DROP TABLE IF EXISTS t1; +# +# Bug#12696518/Bug#11766879/60106:DIFF BETWEEN # OF INDEXES IN MYSQL +# VS INNODB, PARTITONING, ON INDEX CREATE +# +CREATE TABLE t1 +(a INT PRIMARY KEY, +b VARCHAR(64)) +ENGINE = InnoDB +PARTITION BY HASH (a) PARTITIONS 3; +INSERT INTO t1 VALUES (0, 'first row'), (1, 'second row'), (2, 'Third row'); +INSERT INTO t1 VALUES (3, 'row id 3'), (4, '4 row'), (5, 'row5'); +INSERT INTO t1 VALUES (6, 'X 6 row'), (7, 'Seventh row'), (8, 'Last row'); +ALTER TABLE t1 ADD INDEX new_b_index (b); +ALTER TABLE t1 DROP INDEX new_b_index; +SET SESSION debug_dbug = "+d,ha_partition_fail_final_add_index"; +ALTER TABLE t1 ADD INDEX (b); +ERROR HY000: Table has no partition for value 0 +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) NOT NULL, + `b` varchar(64) DEFAULT NULL, + PRIMARY KEY (`a`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +/*!50100 PARTITION BY HASH (a) +PARTITIONS 3 */ +SELECT * FROM t1; +a b +0 first row +1 second row +2 Third row +3 row id 3 +4 4 row +5 row5 +6 X 6 row +7 Seventh row +8 Last row +FLUSH TABLES; +CREATE INDEX new_index ON t1 (b); +ERROR HY000: Table has no partition for value 0 +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) NOT NULL, + `b` varchar(64) DEFAULT NULL, + PRIMARY KEY (`a`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +/*!50100 PARTITION BY HASH (a) +PARTITIONS 3 */ +SELECT * FROM t1; +a b +0 first row +1 second row +2 Third row +3 row id 3 +4 4 row +5 row5 +6 X 6 row +7 Seventh row +8 Last row +SET SESSION debug_dbug = "-d,ha_partition_fail_final_add_index"; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) NOT NULL, + `b` varchar(64) DEFAULT NULL, + PRIMARY KEY (`a`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +/*!50100 PARTITION BY HASH (a) +PARTITIONS 3 */ +DROP TABLE t1; call mtr.add_suppression("InnoDB: Warning: allocated tablespace .*, old maximum was"); call mtr.add_suppression("InnoDB: Error: table .* does not exist in the InnoDB internal"); call mtr.add_suppression("InnoDB: Warning: MySQL is trying to drop table "); diff --git a/mysql-test/suite/parts/t/partition_debug_innodb.test b/mysql-test/suite/parts/t/partition_debug_innodb.test index ba7ca3059ae..33cbd8e3b7b 100644 --- a/mysql-test/suite/parts/t/partition_debug_innodb.test +++ b/mysql-test/suite/parts/t/partition_debug_innodb.test @@ -13,6 +13,41 @@ DROP TABLE IF EXISTS t1; --let $DATADIR= `SELECT @@datadir;` +--echo # +--echo # Bug#12696518/Bug#11766879/60106:DIFF BETWEEN # OF INDEXES IN MYSQL +--echo # VS INNODB, PARTITONING, ON INDEX CREATE +--echo # +CREATE TABLE t1 +(a INT PRIMARY KEY, + b VARCHAR(64)) +ENGINE = InnoDB +PARTITION BY HASH (a) PARTITIONS 3; +INSERT INTO t1 VALUES (0, 'first row'), (1, 'second row'), (2, 'Third row'); +INSERT INTO t1 VALUES (3, 'row id 3'), (4, '4 row'), (5, 'row5'); +INSERT INTO t1 VALUES (6, 'X 6 row'), (7, 'Seventh row'), (8, 'Last row'); + +ALTER TABLE t1 ADD INDEX new_b_index (b); +ALTER TABLE t1 DROP INDEX new_b_index; + +SET SESSION debug_dbug = "+d,ha_partition_fail_final_add_index"; + +--error ER_NO_PARTITION_FOR_GIVEN_VALUE +ALTER TABLE t1 ADD INDEX (b); +SHOW CREATE TABLE t1; +--sorted_result +SELECT * FROM t1; + +FLUSH TABLES; +--error ER_NO_PARTITION_FOR_GIVEN_VALUE +CREATE INDEX new_index ON t1 (b); +SHOW CREATE TABLE t1; +--sorted_result +SELECT * FROM t1; + +SET SESSION debug_dbug = "-d,ha_partition_fail_final_add_index"; +SHOW CREATE TABLE t1; +DROP TABLE t1; + # Checking with #innodb what this is... call mtr.add_suppression("InnoDB: Warning: allocated tablespace .*, old maximum was"); # If there is a crash or failure between the ddl_log is written and the diff --git a/mysql-test/suite/pbxt/r/group_by.result b/mysql-test/suite/pbxt/r/group_by.result index 034a95ecc71..e41c86e45e0 100644 --- a/mysql-test/suite/pbxt/r/group_by.result +++ b/mysql-test/suite/pbxt/r/group_by.result @@ -1176,7 +1176,7 @@ EXPLAIN SELECT 1 FROM t1 WHERE a IN id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY t1 index PRIMARY,i2 PRIMARY 4 NULL 144 Using index 1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 4 func 1 -2 SUBQUERY t1 ALL NULL NULL NULL NULL 144 +2 MATERIALIZED t1 ALL NULL NULL NULL NULL 144 CREATE TABLE t2 (a INT, b INT, KEY(a)); INSERT INTO t2 VALUES (1, 1), (2, 2), (3,3), (4,4); EXPLAIN SELECT a, SUM(b) FROM t2 GROUP BY a LIMIT 2; @@ -1190,5 +1190,5 @@ EXPLAIN SELECT 1 FROM t2 WHERE a IN id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY t2 index a a 5 NULL 4 Using index 1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 4 func 1 -2 SUBQUERY t1 ALL NULL NULL NULL NULL 144 +2 MATERIALIZED t1 ALL NULL NULL NULL NULL 144 DROP TABLE t1, t2; diff --git a/mysql-test/suite/pbxt/r/mysqlshow.result b/mysql-test/suite/pbxt/r/mysqlshow.result index a8bd5904600..b544b4d236b 100644 --- a/mysql-test/suite/pbxt/r/mysqlshow.result +++ b/mysql-test/suite/pbxt/r/mysqlshow.result @@ -75,10 +75,11 @@ Database: test 2 rows in set. DROP TABLE t1, t2; -Database: information_schema +---------------------------------------+ -| Tables | +---------------------------------------+ ++---------------------------------------+ +Database: information_schema +| Tables | | CHARACTER_SETS | | CLIENT_STATISTICS | | COLLATIONS | @@ -91,10 +92,32 @@ Database: information_schema | GLOBAL_STATUS | | GLOBAL_VARIABLES | | INDEX_STATISTICS | +| INNODB_BUFFER_POOL_PAGES | +| INNODB_BUFFER_POOL_PAGES_BLOB | +| INNODB_BUFFER_POOL_PAGES_INDEX | +| INNODB_CMP | +| INNODB_CMPMEM | +| INNODB_CMPMEM_RESET | +| INNODB_CMP_RESET | +| INNODB_INDEX_STATS | +| INNODB_LOCKS | +| INNODB_LOCK_WAITS | +| INNODB_RSEG | +| INNODB_SYS_COLUMNS | +| INNODB_SYS_FIELDS | +| INNODB_SYS_FOREIGN | +| INNODB_SYS_FOREIGN_COLS | +| INNODB_SYS_INDEXES | +| INNODB_SYS_STATS | +| INNODB_SYS_TABLES | +| INNODB_SYS_TABLESTATS | +| INNODB_TABLE_STATS | +| INNODB_TRX | | KEY_CACHES | | KEY_COLUMN_USAGE | | PARAMETERS | | PARTITIONS | +| PBXT_STATISTICS | | PLUGINS | | PROCESSLIST | | PROFILING | @@ -114,34 +137,12 @@ Database: information_schema | USER_PRIVILEGES | | USER_STATISTICS | | VIEWS | -| INNODB_CMPMEM_RESET | -| PBXT_STATISTICS | -| INNODB_CMPMEM | -| INNODB_RSEG | -| INNODB_SYS_TABLESTATS | -| INNODB_LOCK_WAITS | -| INNODB_INDEX_STATS | -| INNODB_CMP | -| INNODB_SYS_FOREIGN_COLS | -| INNODB_CMP_RESET | -| INNODB_BUFFER_POOL_PAGES | -| INNODB_TRX | -| INNODB_BUFFER_POOL_PAGES_INDEX | -| INNODB_LOCKS | -| INNODB_BUFFER_POOL_PAGES_BLOB | -| INNODB_SYS_TABLES | -| INNODB_SYS_FIELDS | -| INNODB_SYS_COLUMNS | -| INNODB_SYS_STATS | -| INNODB_SYS_FOREIGN | -| INNODB_SYS_INDEXES | | XTRADB_ADMIN_COMMAND | -| INNODB_TABLE_STATS | +---------------------------------------+ -Database: INFORMATION_SCHEMA +---------------------------------------+ -| Tables | +---------------------------------------+ +Database: INFORMATION_SCHEMA +| Tables | | CHARACTER_SETS | | CLIENT_STATISTICS | | COLLATIONS | @@ -154,10 +155,32 @@ Database: INFORMATION_SCHEMA | GLOBAL_STATUS | | GLOBAL_VARIABLES | | INDEX_STATISTICS | +| INNODB_BUFFER_POOL_PAGES | +| INNODB_BUFFER_POOL_PAGES_BLOB | +| INNODB_BUFFER_POOL_PAGES_INDEX | +| INNODB_CMP | +| INNODB_CMPMEM | +| INNODB_CMPMEM_RESET | +| INNODB_CMP_RESET | +| INNODB_INDEX_STATS | +| INNODB_LOCKS | +| INNODB_LOCK_WAITS | +| INNODB_RSEG | +| INNODB_SYS_COLUMNS | +| INNODB_SYS_FIELDS | +| INNODB_SYS_FOREIGN | +| INNODB_SYS_FOREIGN_COLS | +| INNODB_SYS_INDEXES | +| INNODB_SYS_STATS | +| INNODB_SYS_TABLES | +| INNODB_SYS_TABLESTATS | +| INNODB_TABLE_STATS | +| INNODB_TRX | | KEY_CACHES | | KEY_COLUMN_USAGE | | PARAMETERS | | PARTITIONS | +| PBXT_STATISTICS | | PLUGINS | | PROCESSLIST | | PROFILING | @@ -177,30 +200,7 @@ Database: INFORMATION_SCHEMA | USER_PRIVILEGES | | USER_STATISTICS | | VIEWS | -| INNODB_CMPMEM_RESET | -| PBXT_STATISTICS | -| INNODB_CMPMEM | -| INNODB_RSEG | -| INNODB_SYS_TABLESTATS | -| INNODB_LOCK_WAITS | -| INNODB_INDEX_STATS | -| INNODB_CMP | -| INNODB_SYS_FOREIGN_COLS | -| INNODB_CMP_RESET | -| INNODB_BUFFER_POOL_PAGES | -| INNODB_TRX | -| INNODB_BUFFER_POOL_PAGES_INDEX | -| INNODB_LOCKS | -| INNODB_BUFFER_POOL_PAGES_BLOB | -| INNODB_SYS_TABLES | -| INNODB_SYS_FIELDS | -| INNODB_SYS_COLUMNS | -| INNODB_SYS_STATS | -| INNODB_SYS_FOREIGN | -| INNODB_SYS_INDEXES | | XTRADB_ADMIN_COMMAND | -| INNODB_TABLE_STATS | -+---------------------------------------+ Wildcard: inf_rmation_schema +--------------------+ | Databases | diff --git a/mysql-test/suite/perfschema/include/binlog_common.inc b/mysql-test/suite/perfschema/include/binlog_common.inc index bbe09de3e19..1c8651a070c 100644 --- a/mysql-test/suite/perfschema/include/binlog_common.inc +++ b/mysql-test/suite/perfschema/include/binlog_common.inc @@ -1,18 +1,3 @@ -# Copyright (c) 2009, 2011, Oracle and/or its affiliates. All rights reserved. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software Foundation, -# 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA - # Tests for PERFORMANCE_SCHEMA RESET MASTER; diff --git a/mysql-test/suite/perfschema/include/cleanup_helper.inc b/mysql-test/suite/perfschema/include/cleanup_helper.inc index 7ea97ba6e92..24b2cbec11e 100644 --- a/mysql-test/suite/perfschema/include/cleanup_helper.inc +++ b/mysql-test/suite/perfschema/include/cleanup_helper.inc @@ -1,18 +1,3 @@ -# Copyright (c) 2009, 2011, Oracle and/or its affiliates. All rights reserved. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; version 2 of -# the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # Tests for PERFORMANCE_SCHEMA diff --git a/mysql-test/suite/perfschema/include/privilege.inc b/mysql-test/suite/perfschema/include/privilege.inc index 0de948d369b..f01511b6fc8 100644 --- a/mysql-test/suite/perfschema/include/privilege.inc +++ b/mysql-test/suite/perfschema/include/privilege.inc @@ -1,18 +1,3 @@ -# Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - # Tests for PERFORMANCE_SCHEMA --disable_warnings diff --git a/mysql-test/suite/perfschema/include/setup_helper.inc b/mysql-test/suite/perfschema/include/setup_helper.inc index cdbfd81a24c..1a375916e4c 100644 --- a/mysql-test/suite/perfschema/include/setup_helper.inc +++ b/mysql-test/suite/perfschema/include/setup_helper.inc @@ -1,18 +1,3 @@ -# Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software Foundation, -# 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA - # Tests for PERFORMANCE_SCHEMA let $MYSQLD_DATADIR= `select @@datadir`; diff --git a/mysql-test/suite/perfschema/include/start_server_common.inc b/mysql-test/suite/perfschema/include/start_server_common.inc index e48bbba4d40..88f98f0c063 100644 --- a/mysql-test/suite/perfschema/include/start_server_common.inc +++ b/mysql-test/suite/perfschema/include/start_server_common.inc @@ -1,18 +1,3 @@ -# Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - # Tests for PERFORMANCE_SCHEMA show databases; diff --git a/mysql-test/suite/perfschema/include/upgrade_check.inc b/mysql-test/suite/perfschema/include/upgrade_check.inc index d8dc750bd39..440eb8f7123 100644 --- a/mysql-test/suite/perfschema/include/upgrade_check.inc +++ b/mysql-test/suite/perfschema/include/upgrade_check.inc @@ -1,18 +1,3 @@ -# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - # Routine to be called by pfs_upgrade.test # $out_file and $err_file must be set within pfs_upgrade.test. # diff --git a/mysql-test/suite/perfschema/t/aggregate.test b/mysql-test/suite/perfschema/t/aggregate.test index 13906af3099..91794f04346 100644 --- a/mysql-test/suite/perfschema/t/aggregate.test +++ b/mysql-test/suite/perfschema/t/aggregate.test @@ -1,18 +1,3 @@ -# Copyright (C) 2009-2010 Sun Microsystems, Inc -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - # Tests for PERFORMANCE_SCHEMA # Verify that statistics aggregated by different criteria are consistent. diff --git a/mysql-test/suite/perfschema/t/bad_option_1.test b/mysql-test/suite/perfschema/t/bad_option_1.test index ee4f0d0d160..1c76dbdc512 100644 --- a/mysql-test/suite/perfschema/t/bad_option_1.test +++ b/mysql-test/suite/perfschema/t/bad_option_1.test @@ -1,18 +1,3 @@ -# Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software Foundation, -# 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA - # Tests for PERFORMANCE_SCHEMA # Check error handling for invalid server start options diff --git a/mysql-test/suite/perfschema/t/bad_option_2.test b/mysql-test/suite/perfschema/t/bad_option_2.test index b8f45be3cdf..175767bb9f2 100644 --- a/mysql-test/suite/perfschema/t/bad_option_2.test +++ b/mysql-test/suite/perfschema/t/bad_option_2.test @@ -1,18 +1,3 @@ -# Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software Foundation, -# 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA - # Tests for PERFORMANCE_SCHEMA # Check error handling for ambiguous server start options diff --git a/mysql-test/suite/perfschema/t/bad_option_3.test b/mysql-test/suite/perfschema/t/bad_option_3.test index 1a9efb61fdf..63565df14a2 100644 --- a/mysql-test/suite/perfschema/t/bad_option_3.test +++ b/mysql-test/suite/perfschema/t/bad_option_3.test @@ -1,18 +1,3 @@ -# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software Foundation, -# 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA - # Tests for PERFORMANCE_SCHEMA # Check error handling for invalid server start options diff --git a/mysql-test/suite/perfschema/t/bad_option_4.test b/mysql-test/suite/perfschema/t/bad_option_4.test index c13df1b614d..27a32c201a9 100644 --- a/mysql-test/suite/perfschema/t/bad_option_4.test +++ b/mysql-test/suite/perfschema/t/bad_option_4.test @@ -1,18 +1,3 @@ -# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software Foundation, -# 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA - # Tests for PERFORMANCE_SCHEMA # Check error handling for invalid server start options diff --git a/mysql-test/suite/perfschema/t/bad_option_5.test b/mysql-test/suite/perfschema/t/bad_option_5.test index d0ae1370859..ada8228b249 100644 --- a/mysql-test/suite/perfschema/t/bad_option_5.test +++ b/mysql-test/suite/perfschema/t/bad_option_5.test @@ -1,18 +1,3 @@ -# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software Foundation, -# 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA - # Tests for PERFORMANCE_SCHEMA # Check error handling for invalid server start options diff --git a/mysql-test/suite/perfschema/t/binlog_mix.test b/mysql-test/suite/perfschema/t/binlog_mix.test index 5e2c65d6fe4..ec2a6847beb 100644 --- a/mysql-test/suite/perfschema/t/binlog_mix.test +++ b/mysql-test/suite/perfschema/t/binlog_mix.test @@ -1,18 +1,3 @@ -# Copyright (c) 2009, 2011, Oracle and/or its affiliates. All rights reserved. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software Foundation, -# 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA - # Tests for PERFORMANCE_SCHEMA --source include/have_log_bin.inc diff --git a/mysql-test/suite/perfschema/t/binlog_row.test b/mysql-test/suite/perfschema/t/binlog_row.test index d09baaa3011..825da373509 100644 --- a/mysql-test/suite/perfschema/t/binlog_row.test +++ b/mysql-test/suite/perfschema/t/binlog_row.test @@ -1,18 +1,3 @@ -# Copyright (c) 2009, 2011, Oracle and/or its affiliates. All rights reserved. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software Foundation, -# 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA - # Tests for PERFORMANCE_SCHEMA --source include/have_log_bin.inc diff --git a/mysql-test/suite/perfschema/t/binlog_stmt.test b/mysql-test/suite/perfschema/t/binlog_stmt.test index 46418d5703f..463bba0ec22 100644 --- a/mysql-test/suite/perfschema/t/binlog_stmt.test +++ b/mysql-test/suite/perfschema/t/binlog_stmt.test @@ -1,18 +1,3 @@ -# Copyright (c) 2009, 2011, Oracle and/or its affiliates. All rights reserved. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software Foundation, -# 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA - # Tests for PERFORMANCE_SCHEMA --source include/have_log_bin.inc diff --git a/mysql-test/suite/perfschema/t/checksum.test b/mysql-test/suite/perfschema/t/checksum.test index 0600edcef26..c0f8692d6f6 100644 --- a/mysql-test/suite/perfschema/t/checksum.test +++ b/mysql-test/suite/perfschema/t/checksum.test @@ -1,18 +1,3 @@ -# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software Foundation, -# 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA */ - # Tests for PERFORMANCE_SCHEMA --source include/not_embedded.inc diff --git a/mysql-test/suite/perfschema/t/cnf_option.cnf b/mysql-test/suite/perfschema/t/cnf_option.cnf index 2be42791fb6..d24593235da 100644 --- a/mysql-test/suite/perfschema/t/cnf_option.cnf +++ b/mysql-test/suite/perfschema/t/cnf_option.cnf @@ -1,18 +1,3 @@ -# Copyright (c) 2009, 2010 Sun Microsystems, Inc. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - # Tests for PERFORMANCE_SCHEMA # Check server start options, read from a .cnf file diff --git a/mysql-test/suite/perfschema/t/cnf_option.test b/mysql-test/suite/perfschema/t/cnf_option.test index c968307ee00..698bb44b104 100644 --- a/mysql-test/suite/perfschema/t/cnf_option.test +++ b/mysql-test/suite/perfschema/t/cnf_option.test @@ -1,18 +1,3 @@ -# Copyright (C) 2009 Sun Microsystems, Inc -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - # Tests for PERFORMANCE_SCHEMA # Check server start options, read from a .cnf file diff --git a/mysql-test/suite/perfschema/t/column_privilege.test b/mysql-test/suite/perfschema/t/column_privilege.test index a1b0ede6b45..649e7b0aa05 100644 --- a/mysql-test/suite/perfschema/t/column_privilege.test +++ b/mysql-test/suite/perfschema/t/column_privilege.test @@ -1,18 +1,3 @@ -# Copyright (C) 2009 Sun Microsystems, Inc -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - # Tests for PERFORMANCE_SCHEMA # Test how columns privileges can be used on performance schema tables, # for very fine control. diff --git a/mysql-test/suite/perfschema/t/ddl_cond_instances.test b/mysql-test/suite/perfschema/t/ddl_cond_instances.test index 2da1100702f..11c86a0b6e1 100644 --- a/mysql-test/suite/perfschema/t/ddl_cond_instances.test +++ b/mysql-test/suite/perfschema/t/ddl_cond_instances.test @@ -1,18 +1,3 @@ -# Copyright (C) 2008-2009 Sun Microsystems, Inc -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - # Tests for PERFORMANCE_SCHEMA --source include/not_embedded.inc diff --git a/mysql-test/suite/perfschema/t/ddl_events_waits_current.test b/mysql-test/suite/perfschema/t/ddl_events_waits_current.test index 1914d333f00..6a7a6412ae1 100644 --- a/mysql-test/suite/perfschema/t/ddl_events_waits_current.test +++ b/mysql-test/suite/perfschema/t/ddl_events_waits_current.test @@ -1,18 +1,3 @@ -# Copyright (C) 2008-2009 Sun Microsystems, Inc -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - # Tests for PERFORMANCE_SCHEMA --source include/not_embedded.inc diff --git a/mysql-test/suite/perfschema/t/ddl_events_waits_history.test b/mysql-test/suite/perfschema/t/ddl_events_waits_history.test index 97c840a350d..a731d462f97 100644 --- a/mysql-test/suite/perfschema/t/ddl_events_waits_history.test +++ b/mysql-test/suite/perfschema/t/ddl_events_waits_history.test @@ -1,18 +1,3 @@ -# Copyright (C) 2008-2009 Sun Microsystems, Inc -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - # Tests for PERFORMANCE_SCHEMA --source include/not_embedded.inc diff --git a/mysql-test/suite/perfschema/t/ddl_events_waits_history_long.test b/mysql-test/suite/perfschema/t/ddl_events_waits_history_long.test index b57a3864e1a..686f20bcd1a 100644 --- a/mysql-test/suite/perfschema/t/ddl_events_waits_history_long.test +++ b/mysql-test/suite/perfschema/t/ddl_events_waits_history_long.test @@ -1,18 +1,3 @@ -# Copyright (C) 2008-2009 Sun Microsystems, Inc -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - # Tests for PERFORMANCE_SCHEMA --source include/not_embedded.inc diff --git a/mysql-test/suite/perfschema/t/ddl_ews_by_instance.test b/mysql-test/suite/perfschema/t/ddl_ews_by_instance.test index a6315edd31d..999b1283a0a 100644 --- a/mysql-test/suite/perfschema/t/ddl_ews_by_instance.test +++ b/mysql-test/suite/perfschema/t/ddl_ews_by_instance.test @@ -1,18 +1,3 @@ -# Copyright (C) 2008-2009 Sun Microsystems, Inc -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - # Tests for PERFORMANCE_SCHEMA --source include/not_embedded.inc diff --git a/mysql-test/suite/perfschema/t/ddl_ews_by_thread_by_event_name.test b/mysql-test/suite/perfschema/t/ddl_ews_by_thread_by_event_name.test index f59daca4b46..307827944aa 100644 --- a/mysql-test/suite/perfschema/t/ddl_ews_by_thread_by_event_name.test +++ b/mysql-test/suite/perfschema/t/ddl_ews_by_thread_by_event_name.test @@ -1,18 +1,3 @@ -# Copyright (C) 2008-2009 Sun Microsystems, Inc -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - # Tests for PERFORMANCE_SCHEMA --source include/not_embedded.inc diff --git a/mysql-test/suite/perfschema/t/ddl_ews_global_by_event_name.test b/mysql-test/suite/perfschema/t/ddl_ews_global_by_event_name.test index 880b4bf1a59..09d6f34e623 100644 --- a/mysql-test/suite/perfschema/t/ddl_ews_global_by_event_name.test +++ b/mysql-test/suite/perfschema/t/ddl_ews_global_by_event_name.test @@ -1,18 +1,3 @@ -# Copyright (C) 2008-2009 Sun Microsystems, Inc -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - # Tests for PERFORMANCE_SCHEMA --source include/not_embedded.inc diff --git a/mysql-test/suite/perfschema/t/ddl_file_instances.test b/mysql-test/suite/perfschema/t/ddl_file_instances.test index 9d6b8c3cf26..818aeae42ef 100644 --- a/mysql-test/suite/perfschema/t/ddl_file_instances.test +++ b/mysql-test/suite/perfschema/t/ddl_file_instances.test @@ -1,18 +1,3 @@ -# Copyright (C) 2008-2009 Sun Microsystems, Inc -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - # Tests for PERFORMANCE_SCHEMA --source include/not_embedded.inc diff --git a/mysql-test/suite/perfschema/t/ddl_fs_by_event_name.test b/mysql-test/suite/perfschema/t/ddl_fs_by_event_name.test index f9a9cabb5b2..d30901961d9 100644 --- a/mysql-test/suite/perfschema/t/ddl_fs_by_event_name.test +++ b/mysql-test/suite/perfschema/t/ddl_fs_by_event_name.test @@ -1,18 +1,3 @@ -# Copyright (C) 2008-2009 Sun Microsystems, Inc -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - # Tests for PERFORMANCE_SCHEMA --source include/not_embedded.inc diff --git a/mysql-test/suite/perfschema/t/ddl_fs_by_instance.test b/mysql-test/suite/perfschema/t/ddl_fs_by_instance.test index defbff34321..894122aa990 100644 --- a/mysql-test/suite/perfschema/t/ddl_fs_by_instance.test +++ b/mysql-test/suite/perfschema/t/ddl_fs_by_instance.test @@ -1,18 +1,3 @@ -# Copyright (C) 2008-2009 Sun Microsystems, Inc -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - # Tests for PERFORMANCE_SCHEMA --source include/not_embedded.inc diff --git a/mysql-test/suite/perfschema/t/ddl_mutex_instances.test b/mysql-test/suite/perfschema/t/ddl_mutex_instances.test index ccd970655af..0fb21ae845a 100644 --- a/mysql-test/suite/perfschema/t/ddl_mutex_instances.test +++ b/mysql-test/suite/perfschema/t/ddl_mutex_instances.test @@ -1,18 +1,3 @@ -# Copyright (C) 2008-2009 Sun Microsystems, Inc -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - # Tests for PERFORMANCE_SCHEMA --source include/not_embedded.inc diff --git a/mysql-test/suite/perfschema/t/ddl_performance_timers.test b/mysql-test/suite/perfschema/t/ddl_performance_timers.test index f6fcfd58bab..32125f74f8e 100644 --- a/mysql-test/suite/perfschema/t/ddl_performance_timers.test +++ b/mysql-test/suite/perfschema/t/ddl_performance_timers.test @@ -1,18 +1,3 @@ -# Copyright (C) 2008-2009 Sun Microsystems, Inc -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - # Tests for PERFORMANCE_SCHEMA --source include/not_embedded.inc diff --git a/mysql-test/suite/perfschema/t/ddl_rwlock_instances.test b/mysql-test/suite/perfschema/t/ddl_rwlock_instances.test index e5bd8b890a1..6e2f6e8d93e 100644 --- a/mysql-test/suite/perfschema/t/ddl_rwlock_instances.test +++ b/mysql-test/suite/perfschema/t/ddl_rwlock_instances.test @@ -1,18 +1,3 @@ -# Copyright (C) 2008-2009 Sun Microsystems, Inc -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - # Tests for PERFORMANCE_SCHEMA --source include/not_embedded.inc diff --git a/mysql-test/suite/perfschema/t/ddl_setup_consumers.test b/mysql-test/suite/perfschema/t/ddl_setup_consumers.test index 3984e0b7fab..16e231d3539 100644 --- a/mysql-test/suite/perfschema/t/ddl_setup_consumers.test +++ b/mysql-test/suite/perfschema/t/ddl_setup_consumers.test @@ -1,18 +1,3 @@ -# Copyright (C) 2008-2009 Sun Microsystems, Inc -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - # Tests for PERFORMANCE_SCHEMA --source include/not_embedded.inc diff --git a/mysql-test/suite/perfschema/t/ddl_setup_instruments.test b/mysql-test/suite/perfschema/t/ddl_setup_instruments.test index b900f69e801..3a8a9b6f66b 100644 --- a/mysql-test/suite/perfschema/t/ddl_setup_instruments.test +++ b/mysql-test/suite/perfschema/t/ddl_setup_instruments.test @@ -1,18 +1,3 @@ -# Copyright (C) 2008-2009 Sun Microsystems, Inc -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - # Tests for PERFORMANCE_SCHEMA --source include/not_embedded.inc diff --git a/mysql-test/suite/perfschema/t/ddl_setup_timers.test b/mysql-test/suite/perfschema/t/ddl_setup_timers.test index bf8878a496d..b344370a294 100644 --- a/mysql-test/suite/perfschema/t/ddl_setup_timers.test +++ b/mysql-test/suite/perfschema/t/ddl_setup_timers.test @@ -1,18 +1,3 @@ -# Copyright (C) 2008-2009 Sun Microsystems, Inc -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - # Tests for PERFORMANCE_SCHEMA --source include/not_embedded.inc diff --git a/mysql-test/suite/perfschema/t/ddl_threads.test b/mysql-test/suite/perfschema/t/ddl_threads.test index d9ff3356b8d..05c4a193399 100644 --- a/mysql-test/suite/perfschema/t/ddl_threads.test +++ b/mysql-test/suite/perfschema/t/ddl_threads.test @@ -1,18 +1,3 @@ -# Copyright (C) 2008-2009 Sun Microsystems, Inc -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - # Tests for PERFORMANCE_SCHEMA --source include/not_embedded.inc diff --git a/mysql-test/suite/perfschema/t/disabled.def b/mysql-test/suite/perfschema/t/disabled.def index c9f3b9a97e0..8cae44a3607 100644 --- a/mysql-test/suite/perfschema/t/disabled.def +++ b/mysql-test/suite/perfschema/t/disabled.def @@ -1,18 +1,3 @@ -# Copyright (c) 2009, 2010 Sun Microsystems, Inc. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - ############################################################################## # # List the test cases that are to be disabled temporarily. diff --git a/mysql-test/suite/perfschema/t/dml_cond_instances.test b/mysql-test/suite/perfschema/t/dml_cond_instances.test index e2773d15252..d80c97cbd31 100644 --- a/mysql-test/suite/perfschema/t/dml_cond_instances.test +++ b/mysql-test/suite/perfschema/t/dml_cond_instances.test @@ -1,18 +1,3 @@ -# Copyright (C) 2008-2009 Sun Microsystems, Inc -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - # Tests for PERFORMANCE_SCHEMA --source include/not_embedded.inc diff --git a/mysql-test/suite/perfschema/t/dml_events_waits_current.test b/mysql-test/suite/perfschema/t/dml_events_waits_current.test index 43a70618b4d..e59802d0f25 100644 --- a/mysql-test/suite/perfschema/t/dml_events_waits_current.test +++ b/mysql-test/suite/perfschema/t/dml_events_waits_current.test @@ -1,18 +1,3 @@ -# Copyright (C) 2008-2009 Sun Microsystems, Inc -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - # Tests for PERFORMANCE_SCHEMA --source include/not_embedded.inc diff --git a/mysql-test/suite/perfschema/t/dml_events_waits_history.test b/mysql-test/suite/perfschema/t/dml_events_waits_history.test index 51937a75f49..bd9ac2f438e 100644 --- a/mysql-test/suite/perfschema/t/dml_events_waits_history.test +++ b/mysql-test/suite/perfschema/t/dml_events_waits_history.test @@ -1,18 +1,3 @@ -# Copyright (C) 2008-2009 Sun Microsystems, Inc -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - # Tests for PERFORMANCE_SCHEMA --source include/not_embedded.inc diff --git a/mysql-test/suite/perfschema/t/dml_events_waits_history_long.test b/mysql-test/suite/perfschema/t/dml_events_waits_history_long.test index a7fc1937529..d5e9f0630e0 100644 --- a/mysql-test/suite/perfschema/t/dml_events_waits_history_long.test +++ b/mysql-test/suite/perfschema/t/dml_events_waits_history_long.test @@ -1,18 +1,3 @@ -# Copyright (C) 2008-2009 Sun Microsystems, Inc -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - # Tests for PERFORMANCE_SCHEMA --source include/not_embedded.inc diff --git a/mysql-test/suite/perfschema/t/dml_ews_by_instance.test b/mysql-test/suite/perfschema/t/dml_ews_by_instance.test index 2f25f842dcc..9b9dddfa48d 100644 --- a/mysql-test/suite/perfschema/t/dml_ews_by_instance.test +++ b/mysql-test/suite/perfschema/t/dml_ews_by_instance.test @@ -1,18 +1,3 @@ -# Copyright (C) 2009 Sun Microsystems, Inc -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - # Tests for PERFORMANCE_SCHEMA --source include/not_embedded.inc diff --git a/mysql-test/suite/perfschema/t/dml_ews_by_thread_by_event_name.test b/mysql-test/suite/perfschema/t/dml_ews_by_thread_by_event_name.test index a1b41fdab42..763961dec4e 100644 --- a/mysql-test/suite/perfschema/t/dml_ews_by_thread_by_event_name.test +++ b/mysql-test/suite/perfschema/t/dml_ews_by_thread_by_event_name.test @@ -1,18 +1,3 @@ -# Copyright (C) 2009 Sun Microsystems, Inc -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - # Tests for PERFORMANCE_SCHEMA --source include/not_embedded.inc diff --git a/mysql-test/suite/perfschema/t/dml_ews_global_by_event_name.test b/mysql-test/suite/perfschema/t/dml_ews_global_by_event_name.test index bf311c7b470..ac4829640fb 100644 --- a/mysql-test/suite/perfschema/t/dml_ews_global_by_event_name.test +++ b/mysql-test/suite/perfschema/t/dml_ews_global_by_event_name.test @@ -1,18 +1,3 @@ -# Copyright (C) 2009 Sun Microsystems, Inc -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - # Tests for PERFORMANCE_SCHEMA --source include/not_embedded.inc diff --git a/mysql-test/suite/perfschema/t/dml_file_instances.test b/mysql-test/suite/perfschema/t/dml_file_instances.test index d7a1002b040..f95f74fd61a 100644 --- a/mysql-test/suite/perfschema/t/dml_file_instances.test +++ b/mysql-test/suite/perfschema/t/dml_file_instances.test @@ -1,18 +1,3 @@ -# Copyright (C) 2009 Sun Microsystems, Inc -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - # Tests for PERFORMANCE_SCHEMA --source include/not_embedded.inc diff --git a/mysql-test/suite/perfschema/t/dml_file_summary_by_event_name.test b/mysql-test/suite/perfschema/t/dml_file_summary_by_event_name.test index 8060c4a4cbe..dbf31d1963d 100644 --- a/mysql-test/suite/perfschema/t/dml_file_summary_by_event_name.test +++ b/mysql-test/suite/perfschema/t/dml_file_summary_by_event_name.test @@ -1,18 +1,3 @@ -# Copyright (C) 2009 Sun Microsystems, Inc -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - # Tests for PERFORMANCE_SCHEMA --source include/not_embedded.inc diff --git a/mysql-test/suite/perfschema/t/dml_file_summary_by_instance.test b/mysql-test/suite/perfschema/t/dml_file_summary_by_instance.test index c24f57390a4..5f69c2d0dc7 100644 --- a/mysql-test/suite/perfschema/t/dml_file_summary_by_instance.test +++ b/mysql-test/suite/perfschema/t/dml_file_summary_by_instance.test @@ -1,18 +1,3 @@ -# Copyright (C) 2009 Sun Microsystems, Inc -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - # Tests for PERFORMANCE_SCHEMA --source include/not_embedded.inc diff --git a/mysql-test/suite/perfschema/t/dml_mutex_instances.test b/mysql-test/suite/perfschema/t/dml_mutex_instances.test index 1a48bd9d8ea..ac3a7c788a8 100644 --- a/mysql-test/suite/perfschema/t/dml_mutex_instances.test +++ b/mysql-test/suite/perfschema/t/dml_mutex_instances.test @@ -1,18 +1,3 @@ -# Copyright (C) 2008-2009 Sun Microsystems, Inc -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - # Tests for PERFORMANCE_SCHEMA --source include/not_embedded.inc diff --git a/mysql-test/suite/perfschema/t/dml_performance_timers.test b/mysql-test/suite/perfschema/t/dml_performance_timers.test index 211e6db4fb1..2ec37fbe7e9 100644 --- a/mysql-test/suite/perfschema/t/dml_performance_timers.test +++ b/mysql-test/suite/perfschema/t/dml_performance_timers.test @@ -1,18 +1,3 @@ -# Copyright (C) 2008-2009 Sun Microsystems, Inc -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - # Tests for PERFORMANCE_SCHEMA --source include/not_embedded.inc diff --git a/mysql-test/suite/perfschema/t/dml_rwlock_instances.test b/mysql-test/suite/perfschema/t/dml_rwlock_instances.test index b588502c996..7832a02ccb8 100644 --- a/mysql-test/suite/perfschema/t/dml_rwlock_instances.test +++ b/mysql-test/suite/perfschema/t/dml_rwlock_instances.test @@ -1,18 +1,3 @@ -# Copyright (C) 2008-2009 Sun Microsystems, Inc -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - # Tests for PERFORMANCE_SCHEMA --source include/not_embedded.inc diff --git a/mysql-test/suite/perfschema/t/dml_setup_consumers.test b/mysql-test/suite/perfschema/t/dml_setup_consumers.test index 2a29f428f3d..7a95e5d48c1 100644 --- a/mysql-test/suite/perfschema/t/dml_setup_consumers.test +++ b/mysql-test/suite/perfschema/t/dml_setup_consumers.test @@ -1,18 +1,3 @@ -# Copyright (C) 2008-2009 Sun Microsystems, Inc -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - # Tests for PERFORMANCE_SCHEMA --source include/not_embedded.inc diff --git a/mysql-test/suite/perfschema/t/dml_setup_instruments.test b/mysql-test/suite/perfschema/t/dml_setup_instruments.test index b6e28440758..5582d559664 100644 --- a/mysql-test/suite/perfschema/t/dml_setup_instruments.test +++ b/mysql-test/suite/perfschema/t/dml_setup_instruments.test @@ -1,18 +1,3 @@ -# Copyright (C) 2008-2009 Sun Microsystems, Inc -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - # Tests for PERFORMANCE_SCHEMA --source include/not_embedded.inc diff --git a/mysql-test/suite/perfschema/t/dml_setup_timers.test b/mysql-test/suite/perfschema/t/dml_setup_timers.test index 1bfc0ab83a2..0956ae2cc95 100644 --- a/mysql-test/suite/perfschema/t/dml_setup_timers.test +++ b/mysql-test/suite/perfschema/t/dml_setup_timers.test @@ -1,18 +1,3 @@ -# Copyright (C) 2008-2009 Sun Microsystems, Inc -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - # Tests for PERFORMANCE_SCHEMA --source include/not_embedded.inc diff --git a/mysql-test/suite/perfschema/t/dml_threads.test b/mysql-test/suite/perfschema/t/dml_threads.test index 6cb372e2c96..324e6107834 100644 --- a/mysql-test/suite/perfschema/t/dml_threads.test +++ b/mysql-test/suite/perfschema/t/dml_threads.test @@ -1,18 +1,3 @@ -# Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software Foundation, -# 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA - # Tests for PERFORMANCE_SCHEMA --source include/not_embedded.inc diff --git a/mysql-test/suite/perfschema/t/func_file_io.test b/mysql-test/suite/perfschema/t/func_file_io.test index 64f71a99ee6..bcf29a7daa2 100644 --- a/mysql-test/suite/perfschema/t/func_file_io.test +++ b/mysql-test/suite/perfschema/t/func_file_io.test @@ -1,18 +1,3 @@ -# Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software Foundation, -# 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA - ## ## WL#4814, 4.1.4 FILE IO ## diff --git a/mysql-test/suite/perfschema/t/func_mutex.test b/mysql-test/suite/perfschema/t/func_mutex.test index 51cbc77790e..c0af600077e 100644 --- a/mysql-test/suite/perfschema/t/func_mutex.test +++ b/mysql-test/suite/perfschema/t/func_mutex.test @@ -1,18 +1,3 @@ -# Copyright (C) 2008-2009 Sun Microsystems, Inc -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - ## ## WL#4818, 4.1.3 MUTEXES, RW-LOCKS, ... ## diff --git a/mysql-test/suite/perfschema/t/global_read_lock.test b/mysql-test/suite/perfschema/t/global_read_lock.test index d00c6583e31..f73b8785cb2 100644 --- a/mysql-test/suite/perfschema/t/global_read_lock.test +++ b/mysql-test/suite/perfschema/t/global_read_lock.test @@ -1,18 +1,3 @@ -# Copyright (C) 2009 Sun Microsystems, Inc -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - # Tests for PERFORMANCE_SCHEMA # # Test the effect of a flush tables with read lock on setup_ tables. diff --git a/mysql-test/suite/perfschema/t/information_schema.test b/mysql-test/suite/perfschema/t/information_schema.test index 36ba1912df3..24325710174 100644 --- a/mysql-test/suite/perfschema/t/information_schema.test +++ b/mysql-test/suite/perfschema/t/information_schema.test @@ -1,18 +1,3 @@ -# Copyright (C) 2008-2009 Sun Microsystems, Inc -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - # Tests for PERFORMANCE_SCHEMA --source include/not_embedded.inc diff --git a/mysql-test/suite/perfschema/t/misc.test b/mysql-test/suite/perfschema/t/misc.test index dee18f0fa21..5cff586c5f0 100644 --- a/mysql-test/suite/perfschema/t/misc.test +++ b/mysql-test/suite/perfschema/t/misc.test @@ -1,18 +1,3 @@ -# Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software Foundation, -# 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA - # Tests for PERFORMANCE_SCHEMA # Miscelaneous diff --git a/mysql-test/suite/perfschema/t/myisam_file_io.test b/mysql-test/suite/perfschema/t/myisam_file_io.test index de9f6f48480..5888c29fe22 100644 --- a/mysql-test/suite/perfschema/t/myisam_file_io.test +++ b/mysql-test/suite/perfschema/t/myisam_file_io.test @@ -1,18 +1,3 @@ -# Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software Foundation, -# 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA - # Tests for PERFORMANCE_SCHEMA --source include/not_embedded.inc diff --git a/mysql-test/suite/perfschema/t/no_threads.test b/mysql-test/suite/perfschema/t/no_threads.test index dd0bd076dfc..6192843f641 100644 --- a/mysql-test/suite/perfschema/t/no_threads.test +++ b/mysql-test/suite/perfschema/t/no_threads.test @@ -1,18 +1,3 @@ -# Copyright (C) 2009 Sun Microsystems, Inc -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - # Tests for PERFORMANCE_SCHEMA --source include/not_embedded.inc diff --git a/mysql-test/suite/perfschema/t/one_thread_per_con.test b/mysql-test/suite/perfschema/t/one_thread_per_con.test index fc4d17e34c7..d295f2e658c 100644 --- a/mysql-test/suite/perfschema/t/one_thread_per_con.test +++ b/mysql-test/suite/perfschema/t/one_thread_per_con.test @@ -1,18 +1,3 @@ -# Copyright (C) 2009 Sun Microsystems, Inc -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - # Tests for PERFORMANCE_SCHEMA --source include/not_embedded.inc diff --git a/mysql-test/suite/perfschema/t/pfs_upgrade.test b/mysql-test/suite/perfschema/t/pfs_upgrade.test index b8d25d4a66e..ad5356a4b93 100644 --- a/mysql-test/suite/perfschema/t/pfs_upgrade.test +++ b/mysql-test/suite/perfschema/t/pfs_upgrade.test @@ -1,18 +1,3 @@ -# Copyright (C) 2010 Oracle and/or its affiliates. All rights reserved. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - # Tests for PERFORMANCE_SCHEMA # Make sure mysql_upgrade does not destroy data in a 'performance_schema' # database. diff --git a/mysql-test/suite/perfschema/t/privilege.test b/mysql-test/suite/perfschema/t/privilege.test index 277ba9bf3b8..3b4cd1a4d2b 100644 --- a/mysql-test/suite/perfschema/t/privilege.test +++ b/mysql-test/suite/perfschema/t/privilege.test @@ -1,18 +1,3 @@ -# Copyright (C) 2009 Sun Microsystems, Inc -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - # Tests for PERFORMANCE_SCHEMA --source include/not_embedded.inc diff --git a/mysql-test/suite/perfschema/t/query_cache.test b/mysql-test/suite/perfschema/t/query_cache.test index 6e322434ae0..8c9e5fcd0ed 100644 --- a/mysql-test/suite/perfschema/t/query_cache.test +++ b/mysql-test/suite/perfschema/t/query_cache.test @@ -1,18 +1,3 @@ -# Copyright (C) 2009 Sun Microsystems, Inc -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - # Tests for PERFORMANCE_SCHEMA # This test verifies that performance schema tables, because they contain diff --git a/mysql-test/suite/perfschema/t/read_only.test b/mysql-test/suite/perfschema/t/read_only.test index 98683e36327..3050cee9e72 100644 --- a/mysql-test/suite/perfschema/t/read_only.test +++ b/mysql-test/suite/perfschema/t/read_only.test @@ -1,18 +1,3 @@ -# Copyright (C) 2009 Sun Microsystems, Inc -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - # Tests for PERFORMANCE_SCHEMA # # Check that diff --git a/mysql-test/suite/perfschema/t/relaylog.test b/mysql-test/suite/perfschema/t/relaylog.test index e2798e9b707..25974f18384 100644 --- a/mysql-test/suite/perfschema/t/relaylog.test +++ b/mysql-test/suite/perfschema/t/relaylog.test @@ -1,18 +1,3 @@ -# Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software Foundation, -# 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA - # Tests for PERFORMANCE_SCHEMA --source include/have_log_bin.inc diff --git a/mysql-test/suite/perfschema/t/schema.test b/mysql-test/suite/perfschema/t/schema.test index 32ee4a26676..df6a100ee0d 100644 --- a/mysql-test/suite/perfschema/t/schema.test +++ b/mysql-test/suite/perfschema/t/schema.test @@ -1,18 +1,3 @@ -# Copyright (C) 2008-2009 Sun Microsystems, Inc -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - # Tests for PERFORMANCE_SCHEMA --source include/not_embedded.inc diff --git a/mysql-test/suite/perfschema/t/selects.test b/mysql-test/suite/perfschema/t/selects.test index e4541d6c6fc..eb8d8f7ed31 100644 --- a/mysql-test/suite/perfschema/t/selects.test +++ b/mysql-test/suite/perfschema/t/selects.test @@ -1,18 +1,3 @@ -# Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software Foundation, -# 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA - --source include/not_embedded.inc --source include/have_perfschema.inc diff --git a/mysql-test/suite/perfschema/t/server_init.test b/mysql-test/suite/perfschema/t/server_init.test index 1b84a214532..cffcc0edee2 100644 --- a/mysql-test/suite/perfschema/t/server_init.test +++ b/mysql-test/suite/perfschema/t/server_init.test @@ -1,18 +1,3 @@ -# Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software Foundation, -# 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA - # Tests for PERFORMANCE_SCHEMA --source include/not_embedded.inc diff --git a/mysql-test/suite/perfschema/t/short_option_1.test b/mysql-test/suite/perfschema/t/short_option_1.test index 1d3e0835188..2b616844e58 100644 --- a/mysql-test/suite/perfschema/t/short_option_1.test +++ b/mysql-test/suite/perfschema/t/short_option_1.test @@ -1,18 +1,3 @@ -# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software Foundation, -# 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA - # Tests for PERFORMANCE_SCHEMA # Check server start for short server start options diff --git a/mysql-test/suite/perfschema/t/short_option_2.test b/mysql-test/suite/perfschema/t/short_option_2.test index eb528dfcf72..77798c36722 100644 --- a/mysql-test/suite/perfschema/t/short_option_2.test +++ b/mysql-test/suite/perfschema/t/short_option_2.test @@ -1,18 +1,3 @@ -# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software Foundation, -# 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA - # Tests for PERFORMANCE_SCHEMA # Check server start for short server start options diff --git a/mysql-test/suite/perfschema/t/start_server_no_cond_class.test b/mysql-test/suite/perfschema/t/start_server_no_cond_class.test index da75306c2ca..31578f80238 100644 --- a/mysql-test/suite/perfschema/t/start_server_no_cond_class.test +++ b/mysql-test/suite/perfschema/t/start_server_no_cond_class.test @@ -1,18 +1,3 @@ -# Copyright (C) 2008-2009 Sun Microsystems, Inc -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - # Tests for PERFORMANCE_SCHEMA --source include/not_embedded.inc diff --git a/mysql-test/suite/perfschema/t/start_server_no_cond_inst.test b/mysql-test/suite/perfschema/t/start_server_no_cond_inst.test index eb77d76b70e..03b9b16ef4e 100644 --- a/mysql-test/suite/perfschema/t/start_server_no_cond_inst.test +++ b/mysql-test/suite/perfschema/t/start_server_no_cond_inst.test @@ -1,18 +1,3 @@ -# Copyright (C) 2008-2009 Sun Microsystems, Inc -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - # Tests for PERFORMANCE_SCHEMA --source include/not_embedded.inc diff --git a/mysql-test/suite/perfschema/t/start_server_no_file_class.test b/mysql-test/suite/perfschema/t/start_server_no_file_class.test index 03180dae01e..b2c97ccde1e 100644 --- a/mysql-test/suite/perfschema/t/start_server_no_file_class.test +++ b/mysql-test/suite/perfschema/t/start_server_no_file_class.test @@ -1,18 +1,3 @@ -# Copyright (C) 2008-2009 Sun Microsystems, Inc -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - # Tests for PERFORMANCE_SCHEMA --source include/not_embedded.inc diff --git a/mysql-test/suite/perfschema/t/start_server_no_file_inst.test b/mysql-test/suite/perfschema/t/start_server_no_file_inst.test index faa5e97a853..d8a7402a948 100644 --- a/mysql-test/suite/perfschema/t/start_server_no_file_inst.test +++ b/mysql-test/suite/perfschema/t/start_server_no_file_inst.test @@ -1,18 +1,3 @@ -# Copyright (C) 2008-2009 Sun Microsystems, Inc -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - # Tests for PERFORMANCE_SCHEMA --source include/not_embedded.inc diff --git a/mysql-test/suite/perfschema/t/start_server_no_mutex_class.test b/mysql-test/suite/perfschema/t/start_server_no_mutex_class.test index 79bf3d52bc5..43798ecf01f 100644 --- a/mysql-test/suite/perfschema/t/start_server_no_mutex_class.test +++ b/mysql-test/suite/perfschema/t/start_server_no_mutex_class.test @@ -1,18 +1,3 @@ -# Copyright (C) 2008-2009 Sun Microsystems, Inc -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - # Tests for PERFORMANCE_SCHEMA --source include/not_embedded.inc diff --git a/mysql-test/suite/perfschema/t/start_server_no_mutex_inst.test b/mysql-test/suite/perfschema/t/start_server_no_mutex_inst.test index 32c0a02b642..bffb8218937 100644 --- a/mysql-test/suite/perfschema/t/start_server_no_mutex_inst.test +++ b/mysql-test/suite/perfschema/t/start_server_no_mutex_inst.test @@ -1,18 +1,3 @@ -# Copyright (C) 2008-2009 Sun Microsystems, Inc -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - # Tests for PERFORMANCE_SCHEMA --source include/not_embedded.inc diff --git a/mysql-test/suite/perfschema/t/start_server_no_rwlock_class.test b/mysql-test/suite/perfschema/t/start_server_no_rwlock_class.test index 10780b59fbe..3c4f32137cc 100644 --- a/mysql-test/suite/perfschema/t/start_server_no_rwlock_class.test +++ b/mysql-test/suite/perfschema/t/start_server_no_rwlock_class.test @@ -1,18 +1,3 @@ -# Copyright (C) 2008-2009 Sun Microsystems, Inc -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - # Tests for PERFORMANCE_SCHEMA --source include/not_embedded.inc diff --git a/mysql-test/suite/perfschema/t/start_server_no_rwlock_inst.test b/mysql-test/suite/perfschema/t/start_server_no_rwlock_inst.test index 2ba2ebcdd4b..68cb75ea37e 100644 --- a/mysql-test/suite/perfschema/t/start_server_no_rwlock_inst.test +++ b/mysql-test/suite/perfschema/t/start_server_no_rwlock_inst.test @@ -1,18 +1,3 @@ -# Copyright (C) 2008-2009 Sun Microsystems, Inc -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - # Tests for PERFORMANCE_SCHEMA --source include/not_embedded.inc diff --git a/mysql-test/suite/perfschema/t/start_server_no_thread_class.test b/mysql-test/suite/perfschema/t/start_server_no_thread_class.test index df825ede637..e37faeacf53 100644 --- a/mysql-test/suite/perfschema/t/start_server_no_thread_class.test +++ b/mysql-test/suite/perfschema/t/start_server_no_thread_class.test @@ -1,18 +1,3 @@ -# Copyright (C) 2008-2009 Sun Microsystems, Inc -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - # Tests for PERFORMANCE_SCHEMA --source include/not_embedded.inc diff --git a/mysql-test/suite/perfschema/t/start_server_no_thread_inst.test b/mysql-test/suite/perfschema/t/start_server_no_thread_inst.test index 150886d01f9..c27de1d4027 100644 --- a/mysql-test/suite/perfschema/t/start_server_no_thread_inst.test +++ b/mysql-test/suite/perfschema/t/start_server_no_thread_inst.test @@ -1,18 +1,3 @@ -# Copyright (C) 2008-2009 Sun Microsystems, Inc -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - # Tests for PERFORMANCE_SCHEMA --source include/not_embedded.inc diff --git a/mysql-test/suite/perfschema/t/start_server_off.test b/mysql-test/suite/perfschema/t/start_server_off.test index bd9db97840d..4b24b2263cb 100644 --- a/mysql-test/suite/perfschema/t/start_server_off.test +++ b/mysql-test/suite/perfschema/t/start_server_off.test @@ -1,18 +1,3 @@ -# Copyright (C) 2008-2009 Sun Microsystems, Inc -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - # Tests for PERFORMANCE_SCHEMA --source include/not_embedded.inc diff --git a/mysql-test/suite/perfschema/t/start_server_on.test b/mysql-test/suite/perfschema/t/start_server_on.test index 54714616a08..18789e9d16a 100644 --- a/mysql-test/suite/perfschema/t/start_server_on.test +++ b/mysql-test/suite/perfschema/t/start_server_on.test @@ -1,18 +1,3 @@ -# Copyright (C) 2008-2009 Sun Microsystems, Inc -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - # Tests for PERFORMANCE_SCHEMA --source include/not_embedded.inc diff --git a/mysql-test/suite/perfschema/t/tampered_perfschema_table1.test b/mysql-test/suite/perfschema/t/tampered_perfschema_table1.test index 741b41ec46b..e06a8fae892 100644 --- a/mysql-test/suite/perfschema/t/tampered_perfschema_table1.test +++ b/mysql-test/suite/perfschema/t/tampered_perfschema_table1.test @@ -1,18 +1,3 @@ -# Copyright (C) 2009 Sun Microsystems, Inc -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - # Tests for PERFORMANCE_SCHEMA # This test uses error injection, diff --git a/mysql-test/suite/perfschema/t/thread_cache.test b/mysql-test/suite/perfschema/t/thread_cache.test index e839552ed19..cef0c2553f5 100644 --- a/mysql-test/suite/perfschema/t/thread_cache.test +++ b/mysql-test/suite/perfschema/t/thread_cache.test @@ -1,18 +1,3 @@ -# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software Foundation, -# 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA - # Tests for PERFORMANCE_SCHEMA --source include/not_embedded.inc diff --git a/mysql-test/suite/perfschema_stress/include/settings.inc b/mysql-test/suite/perfschema_stress/include/settings.inc index 224cb54a8aa..a373de74e86 100644 --- a/mysql-test/suite/perfschema_stress/include/settings.inc +++ b/mysql-test/suite/perfschema_stress/include/settings.inc @@ -1,17 +1,2 @@ -# Copyright (c) 2009, 2010 Sun Microsystems, Inc. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - let $num_stress_rows= 5000; let $default_engine_type= myisam; diff --git a/mysql-test/suite/perfschema_stress/t/modify.test b/mysql-test/suite/perfschema_stress/t/modify.test index 0c254818cf2..f89b72f49bd 100644 --- a/mysql-test/suite/perfschema_stress/t/modify.test +++ b/mysql-test/suite/perfschema_stress/t/modify.test @@ -1,18 +1,3 @@ -# Copyright (C) 2009 Sun Microsystems, Inc -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - --source include/not_embedded.inc --source suite/perfschema_stress/include/settings.inc diff --git a/mysql-test/suite/perfschema_stress/t/read.test b/mysql-test/suite/perfschema_stress/t/read.test index 12dc1357357..c330444f600 100644 --- a/mysql-test/suite/perfschema_stress/t/read.test +++ b/mysql-test/suite/perfschema_stress/t/read.test @@ -1,18 +1,3 @@ -# Copyright (C) 2009 Sun Microsystems, Inc -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - --source include/not_embedded.inc SELECT * FROM performance_schema.setup_instruments diff --git a/mysql-test/suite/perfschema_stress/t/setup.test b/mysql-test/suite/perfschema_stress/t/setup.test index c745463f097..15247862e26 100644 --- a/mysql-test/suite/perfschema_stress/t/setup.test +++ b/mysql-test/suite/perfschema_stress/t/setup.test @@ -1,18 +1,3 @@ -# Copyright (C) 2009 Sun Microsystems, Inc -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - if (`SELECT VERSION() LIKE '%embedded%'`) { --skip This test cannot run with the embedded server. diff --git a/mysql-test/suite/perfschema_stress/t/work.test b/mysql-test/suite/perfschema_stress/t/work.test index 4408a00b0c9..17ddb411c7c 100644 --- a/mysql-test/suite/perfschema_stress/t/work.test +++ b/mysql-test/suite/perfschema_stress/t/work.test @@ -1,18 +1,3 @@ -# Copyright (C) 2009 Sun Microsystems, Inc -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - --source include/not_embedded.inc --source suite/perfschema_stress/include/settings.inc diff --git a/mysql-test/suite/rpl/r/rpl_binlog_index.result b/mysql-test/suite/rpl/r/rpl_binlog_index.result new file mode 100644 index 00000000000..6611a9ef2c0 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_binlog_index.result @@ -0,0 +1,42 @@ +include/master-slave.inc +[connection master] +CREATE TABLE t1 (a INT); +FLUSH BINARY LOGS; +INSERT INTO t1 VALUES (1); +# Shutdown master +include/rpl_stop_server.inc [server_number=1] +# Move the master binlog files and the index file to a new place +# Restart master with log-bin option set to the new path +# Master has restarted successfully +# Create the master-bin.index file with the old format +# Shutdown master +include/rpl_stop_server.inc [server_number=1] +# Move back the master binlog files +# Remove the unneeded master-bin.index file +# Restart master with log-bin option set to default +# Master has restarted successfully +# stop slave +include/stop_slave.inc +include/rpl_stop_server.inc [server_number=2] +# relocate binlogs +# relocate relay logs +# Restart slave with options log-bin, relay-log set to the new paths +# Slave server has restarted successfully +include/start_slave.inc +include/stop_slave.inc +FLUSH LOGS; +INSERT INTO t1 VALUES (2); +INSERT INTO t1 VALUES (2); +INSERT INTO t1 VALUES (2); +INSERT INTO t1 VALUES (2); +FLUSH LOGS; +FLUSH LOGS; +include/start_slave.inc +include/diff_tables.inc [master:t1,slave:t1] +DROP TABLE t1; +include/stop_slave.inc +include/rpl_stop_server.inc [server_number=2] +# remove tmpdir +# restarted with previous slave settings +include/start_slave.inc +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_cant_read_event_incident.result b/mysql-test/suite/rpl/r/rpl_cant_read_event_incident.result index 1bee6f2ec1a..c1b2c6e3195 100644 --- a/mysql-test/suite/rpl/r/rpl_cant_read_event_incident.result +++ b/mysql-test/suite/rpl/r/rpl_cant_read_event_incident.result @@ -11,7 +11,7 @@ reset slave; start slave; include/wait_for_slave_param.inc [Last_IO_Errno] Last_IO_Errno = '1236' -Last_IO_Error = 'Got fatal error 1236 from master when reading data from binary log: 'binlog truncated in the middle of event; consider out of disk space on master; the last event was read from 'master-bin.000001' at 316, the last byte read was read from 'master-bin.000001' at 335.'' +Last_IO_Error = 'Got fatal error 1236 from master when reading data from binary log: 'binlog truncated in the middle of event; consider out of disk space on master; the last event was read from './master-bin.000001' at 316, the last byte read was read from './master-bin.000001' at 335.'' reset master; stop slave; reset slave; diff --git a/mysql-test/suite/rpl/r/rpl_checksum.result b/mysql-test/suite/rpl/r/rpl_checksum.result index 3297e8c2754..9c008540bb8 100644 --- a/mysql-test/suite/rpl/r/rpl_checksum.result +++ b/mysql-test/suite/rpl/r/rpl_checksum.result @@ -71,7 +71,7 @@ insert into t1 values (1) /* will not be applied on slave due to simulation */; set @@global.debug_dbug='d,simulate_slave_unaware_checksum'; start slave; include/wait_for_slave_io_error.inc [errno=1236] -Last_IO_Error = 'Got fatal error 1236 from master when reading data from binary log: 'Slave can not handle replication events with the checksum that master is configured to log; the last event was read from 'master-bin.000010' at 245, the last byte read was read from 'master-bin.000010' at 245.'' +Last_IO_Error = 'Got fatal error 1236 from master when reading data from binary log: 'Slave can not handle replication events with the checksum that master is configured to log; the last event was read from './master-bin.000010' at 245, the last byte read was read from './master-bin.000010' at 245.'' select count(*) as zero from t1; zero 0 diff --git a/mysql-test/suite/rpl/r/rpl_connection.result b/mysql-test/suite/rpl/r/rpl_connection.result new file mode 100644 index 00000000000..02a7a36278e --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_connection.result @@ -0,0 +1,11 @@ +include/master-slave.inc +[connection master] +call mtr.add_suppression(".*Invalid .* username when attempting to connect to the master server.*"); +include/stop_slave.inc +CHANGE MASTER TO MASTER_USER= '', MASTER_PASSWORD= ''; +START SLAVE; +include/wait_for_slave_io_error.inc [errno=1045, 1593] +include/stop_slave.inc +CHANGE MASTER TO MASTER_USER= 'root', MASTER_PASSWORD= ''; +START SLAVE; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_known_bugs_detection.result b/mysql-test/suite/rpl/r/rpl_known_bugs_detection.result index 7857ba95209..f7aea20a34f 100644 --- a/mysql-test/suite/rpl/r/rpl_known_bugs_detection.result +++ b/mysql-test/suite/rpl/r/rpl_known_bugs_detection.result @@ -1,6 +1,7 @@ call mtr.add_suppression("Unsafe statement written to the binary log using statement format"); include/master-slave.inc [connection master] +call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT."); CREATE TABLE t1 (a INT NOT NULL PRIMARY KEY AUTO_INCREMENT, b INT, UNIQUE(b)); INSERT INTO t1(b) VALUES(1),(1),(2) ON DUPLICATE KEY UPDATE t1.b=10; diff --git a/mysql-test/suite/rpl/r/rpl_log_pos.result b/mysql-test/suite/rpl/r/rpl_log_pos.result index 29b11f4b950..a7687dd3e73 100644 --- a/mysql-test/suite/rpl/r/rpl_log_pos.result +++ b/mysql-test/suite/rpl/r/rpl_log_pos.result @@ -11,7 +11,6 @@ include/stop_slave.inc change master to master_log_pos=MASTER_LOG_POS; start slave; include/wait_for_slave_io_error.inc [errno=1236] -Last_IO_Error = 'Got fatal error 1236 from master when reading data from binary log: 'log event entry exceeded max_allowed_packet; Increase max_allowed_packet on master; the last event was read from 'master-bin.000001' at 247, the last byte read was read from 'master-bin.000001' at 266.'' include/stop_slave_sql.inc show master status; File Position Binlog_Do_DB Binlog_Ignore_DB diff --git a/mysql-test/suite/rpl/r/rpl_rotate_purge_deadlock.result b/mysql-test/suite/rpl/r/rpl_rotate_purge_deadlock.result new file mode 100644 index 00000000000..34024f89617 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_rotate_purge_deadlock.result @@ -0,0 +1,30 @@ +include/master-slave.inc +[connection master] +show binary logs; +Log_name File_size +master-bin.000001 # +create table t1 (f text) engine=innodb; +SET DEBUG_SYNC = 'at_purge_logs_before_date WAIT_FOR rotated'; +insert into t1 set f=repeat('a', 4096); +*** there must be two logs in the list *** +show binary logs; +Log_name File_size +master-bin.000001 # +master-bin.000002 # +insert into t1 set f=repeat('b', 4096); +*** there must be three logs in the list *** +show binary logs; +Log_name File_size +master-bin.000001 # +master-bin.000002 # +master-bin.000003 # +SET DEBUG_SYNC = 'now SIGNAL rotated'; +SET DEBUG_SYNC = 'RESET'; +SET DEBUG_SYNC = 'RESET'; +SET DEBUG_SYNC = 'at_purge_logs_before_date WAIT_FOR rotated'; +insert into t1 set f=repeat('b', 4096); +SET DEBUG_SYNC = 'now SIGNAL rotated'; +SET DEBUG_SYNC = 'RESET'; +SET DEBUG_SYNC = 'RESET'; +drop table t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_find_row_debug.result b/mysql-test/suite/rpl/r/rpl_row_find_row_debug.result new file mode 100644 index 00000000000..914e4af6732 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_row_find_row_debug.result @@ -0,0 +1,18 @@ +include/master-slave.inc +[connection master] +include/stop_slave.inc +SET GLOBAL log_warnings = 2; +SET GLOBAL debug_dbug="d,inject_long_find_row_note"; +include/start_slave.inc +CREATE TABLE t1 (c1 INT); +INSERT INTO t1 VALUES (1), (2); +UPDATE t1 SET c1= 1000 WHERE c1=2; +DELETE FROM t1; +DROP TABLE t1; +# Check if any note related to long DELETE_ROWS and UPDATE_ROWS appears in the error log +Occurrences: update=1, delete=1 +include/stop_slave.inc +SET GLOBAL debug_dbug = ''; +SET GLOBAL log_warnings = 1; +include/start_slave.inc +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_binlog_index.test b/mysql-test/suite/rpl/t/rpl_binlog_index.test new file mode 100644 index 00000000000..8586b1d7489 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_binlog_index.test @@ -0,0 +1,209 @@ +# ==== Purpose ==== +# +# Test that server can work fine after moving binlog or relay log +# files to another directory and setting binlog or relay log paths to +# the new path. +# +# ==== Method ==== +# +# Start replication, and then shutdown the master, move the binary +# logs and the log index file to a another directory and then restart +# the server with option to set the new binlog directory. After master +# restarted successfully, do the similar on slave to check the relay +# log of slave. +# +# ==== Reference ==== +# +# BUG#12133 master.index file keeps mysqld from starting if bin log has been moved +# BUG#42576 Relay logs in relay-log.info&localhost-relay-bin.index not processed after move + +source include/master-slave.inc; +# There is no need to run this test case on all binlog format +source include/have_binlog_format_row.inc; + +# Since this test relies heavily on filesystem operations (like +# moving files around, backslashes and so forth) we avoid messing +# around with windows access violations for not cluttering the +# test case any further. It is prepared to support windows, but +# it is not 100% compliant. +--source include/not_windows.inc + +connection master; +--let $master_datadir= `select @@datadir` +connection slave; +--let $slave_datadir= `select @@datadir` +connection master; +--let $dirname= `select uuid()` +--let $tmpdir= $MYSQLTEST_VARDIR/tmp/$dirname +--mkdir $tmpdir + +CREATE TABLE t1 (a INT); +# flush to generate one more binlog file. +FLUSH BINARY LOGS; +INSERT INTO t1 VALUES (1); + +sync_slave_with_master; + +# +# Test on master +# +connection master; +--echo # Shutdown master +--let $rpl_server_number=1 +source include/rpl_stop_server.inc; + +--echo # Move the master binlog files and the index file to a new place +--move_file $master_datadir/master-bin.000001 $tmpdir/master-bin.000001 +--move_file $master_datadir/master-bin.000002 $tmpdir/master-bin.000002 +--move_file $master_datadir/master-bin.index $tmpdir/master-bin.index + +--echo # Restart master with log-bin option set to the new path +--let $rpl_server_parameters=--log-bin=$tmpdir/master-bin +--let $keep_include_silent=1 +source include/rpl_start_server.inc; +--let $keep_include_silent=0 + +--echo # Master has restarted successfully + +# +# Test master can handle old format with directory path in index file +# +--let $is_windows= `select convert(@@version_compile_os using latin1) in ('Win32', 'Win64', 'Windows')` + +# write_var_to_file.inc will call SELECT INTO DUMPFILE, which has to be +# done before shutdown the server +--echo # Create the master-bin.index file with the old format +--let $write_to_file= $master_datadir/master-bin.index +if ($is_windows) +{ + --let $write_var= .\\\\master-bin.000001\n.\\\\master-bin.000002\n.\\\\master-bin.000003\n +} +if (!$is_windows) +{ + --let $write_var= ./master-bin.000001\n./master-bin.000002\n./master-bin.000003\n +} +--disable_query_log +source include/write_var_to_file.inc; +--enable_query_log + +--echo # Shutdown master +--let $rpl_server_number=1 +source include/rpl_stop_server.inc; + +--echo # Move back the master binlog files +--move_file $tmpdir/master-bin.000001 $master_datadir/master-bin.000001 +--move_file $tmpdir/master-bin.000002 $master_datadir/master-bin.000002 +--move_file $tmpdir/master-bin.000003 $master_datadir/master-bin.000003 + +--echo # Remove the unneeded master-bin.index file +--remove_file $tmpdir/master-bin.index + +--echo # Restart master with log-bin option set to default +--let $rpl_server_parameters=--log-bin=$master_datadir/master-bin +--let $keep_include_silent=1 +source include/rpl_start_server.inc; +--let $keep_include_silent=0 + +--echo # Master has restarted successfully + +connection slave; +--echo # stop slave +--source include/stop_slave.inc +--let $rpl_server_number= 2 +--source include/rpl_stop_server.inc + +# switch to master because the slave has been shutdown +# and relocate_binlogs requires a running server to do +# SQL operations +--connection master + +--let $relocate_disable_query_log= 1 +--let $relocate_is_windows= $is_windows +--let $relocate_from=$slave_datadir +--let $relocate_into=$tmpdir + +--echo # relocate binlogs +--let $relocate_index_file=$slave_datadir/slave-bin.index +--source include/relocate_binlogs.inc + +--echo # relocate relay logs +--let $relocate_index_file=$slave_datadir/slave-relay-bin.index +--source include/relocate_binlogs.inc + +--echo # Restart slave with options log-bin, relay-log set to the new paths +--let $rpl_server_parameters=--log-bin=$tmpdir/slave-bin --relay-log=$tmpdir/slave-relay-bin --relay-log-index=$tmpdir/slave-relay-bin.index +--let $keep_include_silent=1 +--let $rpl_server_number= 2 +source include/rpl_start_server.inc; +--let $keep_include_silent=0 + +--connection slave + +--echo # Slave server has restarted successfully +--source include/start_slave.inc +--source include/stop_slave.inc + +connection master; +FLUSH LOGS; +INSERT INTO t1 VALUES (2); +INSERT INTO t1 VALUES (2); +INSERT INTO t1 VALUES (2); +INSERT INTO t1 VALUES (2); + +FLUSH LOGS; + +connection slave; +FLUSH LOGS; +--source include/start_slave.inc +connection master; +sync_slave_with_master; +--let $diff_tables= master:t1,slave:t1 +source include/diff_tables.inc; + +connection master; +DROP TABLE t1; +--sync_slave_with_master +--source include/stop_slave.inc +--let $rpl_server_number= 2 +--source include/rpl_stop_server.inc + +--connection master + +--let $relocate_from=$tmpdir +--let $relocate_into=$slave_datadir +--let $relocate_recreate_index= 1 + +# binlogs +--let $relocate_index_file=$tmpdir/slave-bin.index +--source include/relocate_binlogs.inc + +# relay logs + +# since the complete fix for the relocation of logs is +# done in BUG#13428851 it does not help here to try +# to start the slave as it would fail (relay-log.info is +# tainted with the full path in the RELAY_LOG_FILE position). +# Instead, we reset the slave and let the test clean up. +--let $relocate_fix_relay_log_info= $slave_datadir/relay-log.info +--let $relocate_index_file=$tmpdir/slave-relay-bin.index +--source include/relocate_binlogs.inc + +--echo # remove tmpdir +--remove_files_wildcard $tmpdir * +--rmdir $tmpdir + +--echo # restarted with previous slave settings +--let $rpl_server_parameters=--log-bin=$slave_datadir/slave-bin --relay-log=$slave_datadir/slave-relay-bin --relay-log-index=$slave_datadir/slave-relay-bin.index +--let $keep_include_silent=1 +--let $rpl_server_number= 2 +--source include/rpl_start_server.inc +--let $keep_include_silent=0 + +--connection slave + +# The slave will restart if we have fixed the relay-log.info +# correctly +--source include/start_slave.inc + +--connection master +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_cant_read_event_incident.test b/mysql-test/suite/rpl/t/rpl_cant_read_event_incident.test index 71445be55e6..5e88b163d99 100644 --- a/mysql-test/suite/rpl/t/rpl_cant_read_event_incident.test +++ b/mysql-test/suite/rpl/t/rpl_cant_read_event_incident.test @@ -14,6 +14,11 @@ --source include/master-slave.inc --source include/have_binlog_format_mixed.inc +# +# Bug#13050593 swallows `\' from Last_IO_Error +# todo: uncomment the filter once the bug is fixed. +# +--source include/not_windows.inc call mtr.add_suppression("Error in Log_event::read_log_event()"); diff --git a/mysql-test/suite/rpl/t/rpl_connection.test b/mysql-test/suite/rpl/t/rpl_connection.test new file mode 100644 index 00000000000..1233e28dc86 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_connection.test @@ -0,0 +1,24 @@ +--source include/not_embedded.inc +--source include/master-slave.inc +--source include/have_binlog_format_mixed.inc + +# +# BUG#13427949: CHANGE MASTER TO USER='' (EMPTY USER) CAUSES ERRORS ON VALGRING +# + +--connection slave +call mtr.add_suppression(".*Invalid .* username when attempting to connect to the master server.*"); + + +# Assert that we disallow empty users and that no problem +--source include/stop_slave.inc +CHANGE MASTER TO MASTER_USER= '', MASTER_PASSWORD= ''; +START SLAVE; +--let $slave_io_errno= 1045, 1593 +--source include/wait_for_slave_io_error.inc +--source include/stop_slave.inc + +CHANGE MASTER TO MASTER_USER= 'root', MASTER_PASSWORD= ''; +START SLAVE; + +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_empty_master_host.test b/mysql-test/suite/rpl/t/rpl_empty_master_host.test index df0c85ad7ec..66d30375a59 100644 --- a/mysql-test/suite/rpl/t/rpl_empty_master_host.test +++ b/mysql-test/suite/rpl/t/rpl_empty_master_host.test @@ -17,6 +17,7 @@ # working when expected. --source include/master-slave.inc +--source include/have_binlog_format_mixed.inc connection slave; STOP SLAVE; diff --git a/mysql-test/suite/rpl/t/rpl_ip_mix.test b/mysql-test/suite/rpl/t/rpl_ip_mix.test index c86e1ba54b7..2122b831eea 100644 --- a/mysql-test/suite/rpl/t/rpl_ip_mix.test +++ b/mysql-test/suite/rpl/t/rpl_ip_mix.test @@ -1,7 +1,3 @@ -# Copyright (C) 2009 SUN Microsystems -# All rights reserved. Use is subject to license terms. -# Author: Horst Hunger -# Nov. 19, 2009 # Test of ipv6 format, especially "change master host=..." # Options: --skip-name-resolve, master: --bind-address=::, slave: --bind-address=0.0.0.0 # (see corresponding cnf file) diff --git a/mysql-test/suite/rpl/t/rpl_ip_mix2.test b/mysql-test/suite/rpl/t/rpl_ip_mix2.test index 3c928cffbc6..594900fe7a1 100644 --- a/mysql-test/suite/rpl/t/rpl_ip_mix2.test +++ b/mysql-test/suite/rpl/t/rpl_ip_mix2.test @@ -1,7 +1,3 @@ -# Copyright (C) 2009 SUN Microsystems -# All rights reserved. Use is subject to license terms. -# Author: Horst Hunger -# Nov. 19, 2009 # Test of ipv6 format, especially "change master host=..." # Options: --skip-name-resolve, master: --bind-address=0.0.0.0, slave: --bind-address=:: # (see corresponding cnf file) diff --git a/mysql-test/suite/rpl/t/rpl_ipv4_as_ipv6.test b/mysql-test/suite/rpl/t/rpl_ipv4_as_ipv6.test index cacf5e187ef..08d94ab85f5 100644 --- a/mysql-test/suite/rpl/t/rpl_ipv4_as_ipv6.test +++ b/mysql-test/suite/rpl/t/rpl_ipv4_as_ipv6.test @@ -1,7 +1,3 @@ -# Copyright (C) 2009 SUN Microsystems -# All rights reserved. Use is subject to license terms. -# Author: Horst Hunger -# Nov. 19, 2009 # Test of ipv4 (127.0.0.1) in ipv6 format, especially "change master host=..." # Options: --skip-name-resolve, --bind-address=0.0.0.0 (see corresponding cnf file) # for master and slave diff --git a/mysql-test/suite/rpl/t/rpl_ipv6.test b/mysql-test/suite/rpl/t/rpl_ipv6.test index c42221445fb..3ff58714407 100644 --- a/mysql-test/suite/rpl/t/rpl_ipv6.test +++ b/mysql-test/suite/rpl/t/rpl_ipv6.test @@ -1,7 +1,3 @@ -# Copyright (C) 2009 SUN Microsystems -# All rights reserved. Use is subject to license terms. -# Author: Horst Hunger -# Nov. 19, 2009 # Test of ipv6 format, especially "change master host=..." # Options: --skip-name-resolve, --bind-address=:: (see corresponding cnf file) # for master and slave. diff --git a/mysql-test/suite/rpl/t/rpl_known_bugs_detection.test b/mysql-test/suite/rpl/t/rpl_known_bugs_detection.test index 87c492e7f22..ee41df6592b 100644 --- a/mysql-test/suite/rpl/t/rpl_known_bugs_detection.test +++ b/mysql-test/suite/rpl/t/rpl_known_bugs_detection.test @@ -10,6 +10,8 @@ source include/have_debug.inc; source include/have_binlog_checksum_off.inc; source include/master-slave.inc; +call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT."); + # Currently only statement-based-specific bugs are here -- source include/have_binlog_format_statement.inc diff --git a/mysql-test/suite/rpl/t/rpl_log_pos.test b/mysql-test/suite/rpl/t/rpl_log_pos.test index e3d8c7ffc02..43f54bd3705 100644 --- a/mysql-test/suite/rpl/t/rpl_log_pos.test +++ b/mysql-test/suite/rpl/t/rpl_log_pos.test @@ -30,7 +30,12 @@ let $wrong_log_pos= `SELECT $read_pos+2`; eval change master to master_log_pos=$wrong_log_pos; start slave; let $slave_io_errno= 1236; -let $show_slave_io_error= 1; +# +# Win and Unix path is printed differently: BUG#13055685. So +# show_slave_io_error is made 0 until the bug fixes provide necessary +# facilities +# +let $show_slave_io_error= 0; source include/wait_for_slave_io_error.inc; source include/stop_slave_sql.inc; --enable_warnings diff --git a/mysql-test/suite/rpl/t/rpl_manual_change_index_file.test b/mysql-test/suite/rpl/t/rpl_manual_change_index_file.test index e1b8948281c..9b648de8486 100644 --- a/mysql-test/suite/rpl/t/rpl_manual_change_index_file.test +++ b/mysql-test/suite/rpl/t/rpl_manual_change_index_file.test @@ -60,6 +60,11 @@ call mtr.add_suppression('Got fatal error 1236 from master when reading data fro connection slave; # 1236 = ER_MASTER_FATAL_ERROR_READING_BINLOG --let $slave_io_errno= 1236 +# +# Win and Unix path is printed differently: BUG#13055685. So +# show_slave_io_error is made 0 until the bug fixes provide necessary +# facilities +# --let $show_slave_io_error= 0 --source include/wait_for_slave_io_error.inc diff --git a/mysql-test/suite/rpl/t/rpl_rotate_purge_deadlock-master.opt b/mysql-test/suite/rpl/t/rpl_rotate_purge_deadlock-master.opt new file mode 100644 index 00000000000..f71317fc399 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_rotate_purge_deadlock-master.opt @@ -0,0 +1 @@ +--max-binlog-size=4k --expire-logs-days=1 diff --git a/mysql-test/suite/rpl/t/rpl_rotate_purge_deadlock.test b/mysql-test/suite/rpl/t/rpl_rotate_purge_deadlock.test new file mode 100644 index 00000000000..429612c405f --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_rotate_purge_deadlock.test @@ -0,0 +1,92 @@ +# +# Bug#11763573 - 56299: MUTEX DEADLOCK WITH COM_BINLOG_DUMP, BINLOG PURGE, AND PROCESSLIST/KILL +# +source include/master-slave.inc; +source include/have_debug_sync.inc; +source include/have_binlog_format_row.inc; +source include/have_innodb.inc; + +# +# Testing that execution of two concurrent INSERTing connections both +# triggering the binlog rotation is correct even though their execution +# is interleaved. +# The test makes the first connection to complete the rotation part +# and yields control to the second connection that rotates as well and +# gets first on purging. And the fact of interleaving does not create +# any issue. +# + +connection master; +source include/show_binary_logs.inc; +create table t1 (f text) engine=innodb; +SET DEBUG_SYNC = 'at_purge_logs_before_date WAIT_FOR rotated'; +send insert into t1 set f=repeat('a', 4096); + +connection master1; + +let $wait_condition= + SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST + WHERE STATE like "debug sync point: at_purge_logs_before_date%"; +--source include/wait_condition.inc + +--echo *** there must be two logs in the list *** +source include/show_binary_logs.inc; + +insert into t1 set f=repeat('b', 4096); + +--echo *** there must be three logs in the list *** +source include/show_binary_logs.inc; + +SET DEBUG_SYNC = 'now SIGNAL rotated'; +SET DEBUG_SYNC = 'RESET'; + +# the first connection finally completes its INSERT +connection master; +reap; +SET DEBUG_SYNC = 'RESET'; + +sync_slave_with_master; + + +# +# Testing the reported deadlock involving DUMP, KILL and INSERT threads +# + +connection master; +SET DEBUG_SYNC = 'at_purge_logs_before_date WAIT_FOR rotated'; +send insert into t1 set f=repeat('b', 4096); + +connection master1; + +# make sure INSERT reaches waiting point +let $wait_condition= + SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST + WHERE STATE like "debug sync point: at_purge_logs_before_date%"; +--source include/wait_condition.inc + +# find and kill DUMP thread +let $_tid= `select id from information_schema.processlist where command = 'Binlog Dump' limit 1`; +--disable_query_log +eval kill query $_tid; +--enable_query_log + +# +# Now the proof is that the new DUMP thread has executed +# a critical section of the deadlock without any regression and is UP +# +let $wait_condition= + SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST + WHERE command = 'Binlog Dump' and STATE like "Master has sent all binlog to slave%"; +--source include/wait_condition.inc + +SET DEBUG_SYNC = 'now SIGNAL rotated'; +SET DEBUG_SYNC = 'RESET'; + +connection master; +reap; +SET DEBUG_SYNC = 'RESET'; +drop table t1; + +sync_slave_with_master; + +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_row_find_row_debug.test b/mysql-test/suite/rpl/t/rpl_row_find_row_debug.test new file mode 100644 index 00000000000..af7ccf74295 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_row_find_row_debug.test @@ -0,0 +1,62 @@ +# +# Bug#11760927: 53375: RBR + NO PK => HIGH LOAD ON SLAVE (TABLE SCAN/CPU) => SLAVE FAILURE +# +--source include/master-slave.inc +--source include/have_binlog_format_row.inc +--source include/have_debug.inc + +# SETUP +# - setup log_warnings and debug +--connection slave +--source include/stop_slave.inc +--let $debug_save= `SELECT @@GLOBAL.debug_dbug` +--let $log_warnings_save= `SELECT @@GLOBAL.log_warnings` + +SET GLOBAL log_warnings = 2; + +let $log_error_= `SELECT @@GLOBAL.log_error`; +if(!$log_error_) +{ + # MySQL Server on windows is started with --console and thus + # does not know the location of its .err log, use default location + let $log_error_ = $MYSQLTEST_VARDIR/log/mysqld.2.err; +} + +# Assign env variable LOG_ERROR +let LOG_ERROR=$log_error_; + +# force printing the notes to the error log +SET GLOBAL debug_dbug="d,inject_long_find_row_note"; +--source include/start_slave.inc + +# test +--connection master +CREATE TABLE t1 (c1 INT); +--sync_slave_with_master +--connection master + +INSERT INTO t1 VALUES (1), (2); +UPDATE t1 SET c1= 1000 WHERE c1=2; +DELETE FROM t1; +DROP TABLE t1; +--sync_slave_with_master + +--echo # Check if any note related to long DELETE_ROWS and UPDATE_ROWS appears in the error log +perl; + use strict; + my $log_error= $ENV{'LOG_ERROR'} or die "LOG_ERROR not set"; + open(FILE, "$log_error") or die("Unable to open $log_error: $!\n"); + my $upd_count = () = grep(/The slave is applying a ROW event on behalf of an UPDATE statement on table t1 and is currently taking a considerable amount/g,<FILE>); + seek(FILE, 0, 0) or die "Can't seek to beginning of file: $!"; + my $del_count = () = grep(/The slave is applying a ROW event on behalf of a DELETE statement on table t1 and is currently taking a considerable amount/g,<FILE>); + print "Occurrences: update=$upd_count, delete=$del_count\n"; + close(FILE); +EOF + +# cleanup +--source include/stop_slave.inc +--eval SET GLOBAL debug_dbug = '$debug_save' +--eval SET GLOBAL log_warnings = $log_warnings_save +--source include/start_slave.inc + +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_server_id_ignore.test b/mysql-test/suite/rpl/t/rpl_server_id_ignore.test index 004f4daa19d..1e6d46c9d40 100644 --- a/mysql-test/suite/rpl/t/rpl_server_id_ignore.test +++ b/mysql-test/suite/rpl/t/rpl_server_id_ignore.test @@ -18,6 +18,7 @@ # executing events this time source include/master-slave.inc; +source include/have_binlog_format_mixed.inc; connection slave; diff --git a/mysql-test/suite/sys_vars/r/metadata_locks_cache_size_basic.result b/mysql-test/suite/sys_vars/r/metadata_locks_cache_size_basic.result new file mode 100644 index 00000000000..a62b6011739 --- /dev/null +++ b/mysql-test/suite/sys_vars/r/metadata_locks_cache_size_basic.result @@ -0,0 +1,21 @@ +# +# Check that the paremeter is correctly set by start-up +# option (.opt file sets it to 256 while default is 1024). +select @@global.metadata_locks_cache_size = 256; +@@global.metadata_locks_cache_size = 256 +1 +# +# Check that variable is read only +# +set @@global.metadata_locks_cache_size= 1024; +ERROR HY000: Variable 'metadata_locks_cache_size' is a read only variable +select @@global.metadata_locks_cache_size = 256; +@@global.metadata_locks_cache_size = 256 +1 +# +# And only GLOBAL +# +select @@session.metadata_locks_cache_size; +ERROR HY000: Variable 'metadata_locks_cache_size' is a GLOBAL variable +set @@session.metadata_locks_cache_size= 1024; +ERROR HY000: Variable 'metadata_locks_cache_size' is a read only variable diff --git a/mysql-test/suite/sys_vars/r/query_cache_size_basic_32.result b/mysql-test/suite/sys_vars/r/query_cache_size_basic_32.result index 5ceb02182b3..6edaf22302a 100644 --- a/mysql-test/suite/sys_vars/r/query_cache_size_basic_32.result +++ b/mysql-test/suite/sys_vars/r/query_cache_size_basic_32.result @@ -1,6 +1,8 @@ SET @start_value = @@global.query_cache_size; '#--------------------FN_DYNVARS_133_01------------------------#' SET @@global.query_cache_size = 99; +Warnings: +Warning 1292 Truncated incorrect query_cache_size value: '99' SET @@global.query_cache_size = DEFAULT; SELECT @@global.query_cache_size; @@global.query_cache_size @@ -16,10 +18,14 @@ SELECT @@global.query_cache_size; @@global.query_cache_size 0 SET @@global.query_cache_size = 1; +Warnings: +Warning 1292 Truncated incorrect query_cache_size value: '1' SELECT @@global.query_cache_size; @@global.query_cache_size 0 SET @@global.query_cache_size = 512; +Warnings: +Warning 1292 Truncated incorrect query_cache_size value: '512' SELECT @@global.query_cache_size; @@global.query_cache_size 0 @@ -29,13 +35,13 @@ Warning 1282 Query cache failed to set size 1024; new query cache size is 0 SELECT @@global.query_cache_size; @@global.query_cache_size 0 -: 'Bug#34880: Warnings are coming on assinging valid values to variable -'Bug# 34877: Invalid Values are coming in variable on assigning valid values'; SET @@global.query_cache_size = 1048576; SELECT @@global.query_cache_size; @@global.query_cache_size 1048576 SET @@global.query_cache_size = 1048575; +Warnings: +Warning 1292 Truncated incorrect query_cache_size value: '1048575' SELECT @@global.query_cache_size; @@global.query_cache_size 1047552 @@ -46,14 +52,9 @@ Warning 1292 Truncated incorrect query_cache_size value: '-1' SELECT @@global.query_cache_size; @@global.query_cache_size 0 -SET @@global.query_cache_size = 4294967296; -Warnings: -Warning 1292 Truncated incorrect query_cache_size value: '4294967296' -Warning 1282 Query cache failed to set size 4294966272; new query cache size is 0 -SELECT @@global.query_cache_size; -@@global.query_cache_size -0 SET @@global.query_cache_size = 511; +Warnings: +Warning 1292 Truncated incorrect query_cache_size value: '511' SELECT @@global.query_cache_size; @@global.query_cache_size 0 @@ -75,7 +76,6 @@ Warning 1282 Query cache failed to set size 4294966272; new query cache size is SELECT @@global.query_cache_size; @@global.query_cache_size 0 -'Bug # 34837: Errors are not coming on assigning invalid values to variable'; SET @@global.query_cache_size = ON; ERROR 42000: Incorrect argument type to variable 'query_cache_size' SELECT @@global.query_cache_size; @@ -105,6 +105,8 @@ WHERE VARIABLE_NAME='query_cache_size'; 1 '#---------------------FN_DYNVARS_133_07----------------------#' SET @@global.query_cache_size = TRUE; +Warnings: +Warning 1292 Truncated incorrect query_cache_size value: '1' SELECT @@global.query_cache_size; @@global.query_cache_size 0 @@ -114,6 +116,8 @@ SELECT @@global.query_cache_size; 0 '#---------------------FN_DYNVARS_133_08----------------------#' SET @@global.query_cache_size = 1; +Warnings: +Warning 1292 Truncated incorrect query_cache_size value: '1' SELECT @@query_cache_size = @@global.query_cache_size; @@query_cache_size = @@global.query_cache_size 1 diff --git a/mysql-test/suite/sys_vars/t/all_vars.test b/mysql-test/suite/sys_vars/t/all_vars.test index 3f7e778fd2c..8f59af0f47d 100644 --- a/mysql-test/suite/sys_vars/t/all_vars.test +++ b/mysql-test/suite/sys_vars/t/all_vars.test @@ -1,18 +1,3 @@ -# Copyright (C) 2009-2010 Sun Microsystems, Inc. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - --source include/not_embedded.inc --source include/not_threadpool.inc diff --git a/mysql-test/suite/sys_vars/t/metadata_locks_cache_size_basic-master.opt b/mysql-test/suite/sys_vars/t/metadata_locks_cache_size_basic-master.opt new file mode 100644 index 00000000000..77e019cd3d4 --- /dev/null +++ b/mysql-test/suite/sys_vars/t/metadata_locks_cache_size_basic-master.opt @@ -0,0 +1 @@ +--metadata-locks-cache-size=256 diff --git a/mysql-test/suite/sys_vars/t/metadata_locks_cache_size_basic.test b/mysql-test/suite/sys_vars/t/metadata_locks_cache_size_basic.test new file mode 100644 index 00000000000..31b033579c6 --- /dev/null +++ b/mysql-test/suite/sys_vars/t/metadata_locks_cache_size_basic.test @@ -0,0 +1,25 @@ +# +# Basic test coverage for --metadata-locks-cache-size startup +# parameter and corresponding read-only global @@metadata_locks_cache_size +# variable. +# + +--echo # +--echo # Check that the paremeter is correctly set by start-up +--echo # option (.opt file sets it to 256 while default is 1024). +select @@global.metadata_locks_cache_size = 256; + +--echo # +--echo # Check that variable is read only +--echo # +--error ER_INCORRECT_GLOBAL_LOCAL_VAR +set @@global.metadata_locks_cache_size= 1024; +select @@global.metadata_locks_cache_size = 256; + +--echo # +--echo # And only GLOBAL +--echo # +--error ER_INCORRECT_GLOBAL_LOCAL_VAR +select @@session.metadata_locks_cache_size; +--error ER_INCORRECT_GLOBAL_LOCAL_VAR +set @@session.metadata_locks_cache_size= 1024; diff --git a/mysql-test/suite/sys_vars/t/performance_schema_basic.test b/mysql-test/suite/sys_vars/t/performance_schema_basic.test index 804e6261921..bef8d6c58e7 100644 --- a/mysql-test/suite/sys_vars/t/performance_schema_basic.test +++ b/mysql-test/suite/sys_vars/t/performance_schema_basic.test @@ -1,18 +1,3 @@ -# Copyright (C) 2010 Sun Microsystems, Inc. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - --source include/not_embedded.inc --source include/have_perfschema.inc diff --git a/mysql-test/suite/sys_vars/t/pfs_events_waits_history_long_size_basic.test b/mysql-test/suite/sys_vars/t/pfs_events_waits_history_long_size_basic.test index bf6638803bc..032f1f32727 100644 --- a/mysql-test/suite/sys_vars/t/pfs_events_waits_history_long_size_basic.test +++ b/mysql-test/suite/sys_vars/t/pfs_events_waits_history_long_size_basic.test @@ -1,18 +1,3 @@ -# Copyright (C) 2010 Sun Microsystems, Inc. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - --source include/not_embedded.inc --source include/have_perfschema.inc diff --git a/mysql-test/suite/sys_vars/t/pfs_events_waits_history_size_basic.test b/mysql-test/suite/sys_vars/t/pfs_events_waits_history_size_basic.test index 28338ad1ffd..d7ea0590d9d 100644 --- a/mysql-test/suite/sys_vars/t/pfs_events_waits_history_size_basic.test +++ b/mysql-test/suite/sys_vars/t/pfs_events_waits_history_size_basic.test @@ -1,18 +1,3 @@ -# Copyright (C) 2010 Sun Microsystems, Inc. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - --source include/not_embedded.inc --source include/have_perfschema.inc diff --git a/mysql-test/suite/sys_vars/t/pfs_max_cond_classes_basic.test b/mysql-test/suite/sys_vars/t/pfs_max_cond_classes_basic.test index 70a757087f8..6f25cf8c485 100644 --- a/mysql-test/suite/sys_vars/t/pfs_max_cond_classes_basic.test +++ b/mysql-test/suite/sys_vars/t/pfs_max_cond_classes_basic.test @@ -1,18 +1,3 @@ -# Copyright (C) 2010 Sun Microsystems, Inc. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - --source include/not_embedded.inc --source include/have_perfschema.inc diff --git a/mysql-test/suite/sys_vars/t/pfs_max_cond_instances_basic.test b/mysql-test/suite/sys_vars/t/pfs_max_cond_instances_basic.test index 597ad334295..3ffd3619098 100644 --- a/mysql-test/suite/sys_vars/t/pfs_max_cond_instances_basic.test +++ b/mysql-test/suite/sys_vars/t/pfs_max_cond_instances_basic.test @@ -1,18 +1,3 @@ -# Copyright (C) 2010 Sun Microsystems, Inc. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - --source include/not_embedded.inc --source include/have_perfschema.inc diff --git a/mysql-test/suite/sys_vars/t/pfs_max_file_classes_basic.test b/mysql-test/suite/sys_vars/t/pfs_max_file_classes_basic.test index 8536a703afa..58effd782cb 100644 --- a/mysql-test/suite/sys_vars/t/pfs_max_file_classes_basic.test +++ b/mysql-test/suite/sys_vars/t/pfs_max_file_classes_basic.test @@ -1,18 +1,3 @@ -# Copyright (C) 2010 Sun Microsystems, Inc. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - --source include/not_embedded.inc --source include/have_perfschema.inc diff --git a/mysql-test/suite/sys_vars/t/pfs_max_file_handles_basic.test b/mysql-test/suite/sys_vars/t/pfs_max_file_handles_basic.test index ba702a030d7..f1bb3c969d4 100644 --- a/mysql-test/suite/sys_vars/t/pfs_max_file_handles_basic.test +++ b/mysql-test/suite/sys_vars/t/pfs_max_file_handles_basic.test @@ -1,18 +1,3 @@ -# Copyright (C) 2010 Sun Microsystems, Inc. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - --source include/not_embedded.inc --source include/have_perfschema.inc diff --git a/mysql-test/suite/sys_vars/t/pfs_max_file_instances_basic.test b/mysql-test/suite/sys_vars/t/pfs_max_file_instances_basic.test index 829df39bbe9..880db840142 100644 --- a/mysql-test/suite/sys_vars/t/pfs_max_file_instances_basic.test +++ b/mysql-test/suite/sys_vars/t/pfs_max_file_instances_basic.test @@ -1,18 +1,3 @@ -# Copyright (C) 2010 Sun Microsystems, Inc. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - --source include/not_embedded.inc --source include/have_perfschema.inc diff --git a/mysql-test/suite/sys_vars/t/pfs_max_mutex_classes_basic.test b/mysql-test/suite/sys_vars/t/pfs_max_mutex_classes_basic.test index 633d1a3487c..08f15526c18 100644 --- a/mysql-test/suite/sys_vars/t/pfs_max_mutex_classes_basic.test +++ b/mysql-test/suite/sys_vars/t/pfs_max_mutex_classes_basic.test @@ -1,18 +1,3 @@ -# Copyright (C) 2010 Sun Microsystems, Inc. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - --source include/not_embedded.inc --source include/have_perfschema.inc diff --git a/mysql-test/suite/sys_vars/t/pfs_max_mutex_instances_basic.test b/mysql-test/suite/sys_vars/t/pfs_max_mutex_instances_basic.test index 2a8f5e5ae00..ab5a8536a7b 100644 --- a/mysql-test/suite/sys_vars/t/pfs_max_mutex_instances_basic.test +++ b/mysql-test/suite/sys_vars/t/pfs_max_mutex_instances_basic.test @@ -1,18 +1,3 @@ -# Copyright (C) 2010 Sun Microsystems, Inc. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - --source include/not_embedded.inc --source include/have_perfschema.inc diff --git a/mysql-test/suite/sys_vars/t/pfs_max_rwlock_classes_basic.test b/mysql-test/suite/sys_vars/t/pfs_max_rwlock_classes_basic.test index ce911b60049..9b4d1d40dfd 100644 --- a/mysql-test/suite/sys_vars/t/pfs_max_rwlock_classes_basic.test +++ b/mysql-test/suite/sys_vars/t/pfs_max_rwlock_classes_basic.test @@ -1,18 +1,3 @@ -# Copyright (C) 2010 Sun Microsystems, Inc. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - --source include/not_embedded.inc --source include/have_perfschema.inc diff --git a/mysql-test/suite/sys_vars/t/pfs_max_rwlock_instances_basic.test b/mysql-test/suite/sys_vars/t/pfs_max_rwlock_instances_basic.test index d16c1c46f68..d551df25ed5 100644 --- a/mysql-test/suite/sys_vars/t/pfs_max_rwlock_instances_basic.test +++ b/mysql-test/suite/sys_vars/t/pfs_max_rwlock_instances_basic.test @@ -1,18 +1,3 @@ -# Copyright (C) 2010 Sun Microsystems, Inc. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - --source include/not_embedded.inc --source include/have_perfschema.inc diff --git a/mysql-test/suite/sys_vars/t/pfs_max_table_handles_basic.test b/mysql-test/suite/sys_vars/t/pfs_max_table_handles_basic.test index 3ede0985a70..55869817eb2 100644 --- a/mysql-test/suite/sys_vars/t/pfs_max_table_handles_basic.test +++ b/mysql-test/suite/sys_vars/t/pfs_max_table_handles_basic.test @@ -1,18 +1,3 @@ -# Copyright (C) 2010 Sun Microsystems, Inc. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - --source include/not_embedded.inc --source include/have_perfschema.inc diff --git a/mysql-test/suite/sys_vars/t/pfs_max_table_instances_basic.test b/mysql-test/suite/sys_vars/t/pfs_max_table_instances_basic.test index fcd4886ca22..4ea5901ef04 100644 --- a/mysql-test/suite/sys_vars/t/pfs_max_table_instances_basic.test +++ b/mysql-test/suite/sys_vars/t/pfs_max_table_instances_basic.test @@ -1,18 +1,3 @@ -# Copyright (C) 2010 Sun Microsystems, Inc. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - --source include/not_embedded.inc --source include/have_perfschema.inc diff --git a/mysql-test/suite/sys_vars/t/pfs_max_thread_classes_basic.test b/mysql-test/suite/sys_vars/t/pfs_max_thread_classes_basic.test index 4704e87cf06..7f739a25e7e 100644 --- a/mysql-test/suite/sys_vars/t/pfs_max_thread_classes_basic.test +++ b/mysql-test/suite/sys_vars/t/pfs_max_thread_classes_basic.test @@ -1,18 +1,3 @@ -# Copyright (C) 2010 Sun Microsystems, Inc. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - --source include/not_embedded.inc --source include/have_perfschema.inc diff --git a/mysql-test/suite/sys_vars/t/pfs_max_thread_instances_basic.test b/mysql-test/suite/sys_vars/t/pfs_max_thread_instances_basic.test index d709c097f20..653b6bc199a 100644 --- a/mysql-test/suite/sys_vars/t/pfs_max_thread_instances_basic.test +++ b/mysql-test/suite/sys_vars/t/pfs_max_thread_instances_basic.test @@ -1,18 +1,3 @@ -# Copyright (C) 2010 Sun Microsystems, Inc. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - --source include/not_embedded.inc --source include/have_perfschema.inc diff --git a/mysql-test/t/alter_table-big.test b/mysql-test/t/alter_table-big.test index cc7b8ea02b4..b010815955f 100644 --- a/mysql-test/t/alter_table-big.test +++ b/mysql-test/t/alter_table-big.test @@ -18,7 +18,10 @@ --disable_warnings drop table if exists t1, t2; --enable_warnings +set debug_sync='RESET'; + connect (addconroot, localhost, root,,); +connect (addconroot2, localhost, root,,); connection default; create table t1 (n1 int, n2 int, n3 int, key (n1, n2, n3), @@ -26,38 +29,45 @@ create table t1 (n1 int, n2 int, n3 int, key (n3, n1, n2)); create table t2 (i int); -# Starting from 5.1 we have runtime settable @@debug variable, -# which can be used for introducing delays at certain points of -# statement execution, so we don't need many rows in 't1' to make -# this test repeatable. alter table t1 disable keys; ---disable_warnings -insert into t1 values (RAND()*1000, RAND()*1000, RAND()*1000); ---enable_warnings +insert into t1 values (1, 2, 3); # Later we use binlog to check the order in which statements are # executed so let us reset it first. reset master; -set session debug_dbug="+d,sleep_alter_enable_indexes"; +set debug_sync='alter_table_enable_indexes SIGNAL parked WAIT_FOR go'; --send alter table t1 enable keys; connection addconroot; ---sleep 2 +# Wait until ALTER TABLE acquires metadata lock. +set debug_sync='now WAIT_FOR parked'; # This statement should not be blocked by in-flight ALTER and therefore # should be executed and written to binlog before ALTER TABLE ... ENABLE KEYS # finishes. insert into t2 values (1); # And this should wait until the end of ALTER TABLE ... ENABLE KEYS. -insert into t1 values (1, 1, 1); +--send insert into t1 values (1, 1, 1); +connection addconroot2; +# Wait until the above INSERT INTO t1 is blocked due to ALTER +let $wait_condition= + select count(*) = 1 from information_schema.processlist + where state = "Waiting for table metadata lock" and + info = "insert into t1 values (1, 1, 1)"; +--source include/wait_condition.inc +# Resume ALTER execution. +set debug_sync='now SIGNAL go'; connection default; --reap -set session debug_dbug="-d,sleep_alter_enable_indexes"; +connection addconroot; +--reap +connection default; # Check that statements were executed/binlogged in correct order. source include/show_binlog_events.inc; # Clean up drop tables t1, t2; disconnect addconroot; - +disconnect addconroot2; +set debug_sync='RESET'; --echo End of 5.0 tests @@ -72,48 +82,92 @@ disconnect addconroot; --disable_warnings drop table if exists t1, t2, t3; --enable_warnings +connect (addconroot, localhost, root,,); +connect (addconroot2, localhost, root,,); +connection default; create table t1 (i int); # We are going to check that statements are logged in correct order reset master; -set session debug_dbug="+d,sleep_alter_before_main_binlog"; +set debug_sync='alter_table_before_main_binlog SIGNAL parked WAIT_FOR go'; --send alter table t1 change i c char(10) default 'Test1'; -connect (addconroot, localhost, root,,); connection addconroot; ---sleep 2 -insert into t1 values (); -select * from t1; +# Wait until ALTER TABLE acquires metadata lock. +set debug_sync='now WAIT_FOR parked'; +--send insert into t1 values (); +connection addconroot2; +# Wait until the above INSERT INTO t1 is blocked due to ALTER +let $wait_condition= + select count(*) = 1 from information_schema.processlist + where state = "Waiting for table metadata lock" and + info = "insert into t1 values ()"; +--source include/wait_condition.inc +# Resume ALTER execution. +set debug_sync='now SIGNAL go'; connection default; --reap +connection addconroot; +--reap +connection default; +select * from t1; +set debug_sync='alter_table_before_main_binlog SIGNAL parked WAIT_FOR go'; --send alter table t1 change c vc varchar(100) default 'Test2'; connection addconroot; ---sleep 2 -rename table t1 to t2; +# Wait until ALTER TABLE acquires metadata lock. +set debug_sync='now WAIT_FOR parked'; +--send rename table t1 to t2; +connection addconroot2; +# Wait until the above RENAME TABLE is blocked due to ALTER +let $wait_condition= + select count(*) = 1 from information_schema.processlist + where state = "Waiting for table metadata lock" and + info = "rename table t1 to t2"; +--source include/wait_condition.inc +# Resume ALTER execution. +set debug_sync='now SIGNAL go'; connection default; --reap +connection addconroot; +--reap +connection default; drop table t2; # And now tests for ALTER TABLE with RENAME clause. In this # case target table name should be properly locked as well. create table t1 (i int); +set debug_sync='alter_table_before_main_binlog SIGNAL parked WAIT_FOR go'; --send alter table t1 change i c char(10) default 'Test3', rename to t2; connection addconroot; ---sleep 2 -insert into t2 values (); -select * from t2; +# Wait until ALTER TABLE acquires metadata lock. +set debug_sync='now WAIT_FOR parked'; +--send insert into t2 values(); +connection addconroot2; +# Wait until the above INSERT INTO t2 is blocked due to ALTER +let $wait_condition= + select count(*) = 1 from information_schema.processlist + where state = "Waiting for table metadata lock" and + info = "insert into t2 values()"; +--source include/wait_condition.inc +# Resume ALTER execution. +set debug_sync='now SIGNAL go'; connection default; --reap +connection addconroot; +--reap +connection default; +select * from t2; --send alter table t2 change c vc varchar(100) default 'Test2', rename to t1; connection addconroot; ---sleep 2 -rename table t1 to t3; connection default; --reap +rename table t1 to t3; + disconnect addconroot; +disconnect addconroot2; drop table t3; -set session debug_dbug="-d,sleep_alter_before_main_binlog"; +set debug_sync='alter_table_before_main_binlog SIGNAL parked WAIT_FOR go'; +set debug_sync='RESET'; # Check that all statements were logged in correct order source include/show_binlog_events.inc; --echo End of 5.1 tests - diff --git a/mysql-test/t/archive.test b/mysql-test/t/archive.test index 80f88fbb51b..d979ba509d5 100644 --- a/mysql-test/t/archive.test +++ b/mysql-test/t/archive.test @@ -1754,3 +1754,18 @@ INSERT INTO t1 SELECT t1.* FROM t1,t1 t2,t1 t3,t1 t4,t1 t5,t1 t6; SELECT * FROM t1 ORDER BY f LIMIT 1; DROP TABLE t1; SET sort_buffer_size=DEFAULT; + + +--echo # +--echo # BUG#11758979 - 51252: ARCHIVE TABLES STILL FAIL UNDER STRESS +--echo # TESTS: CRASH, CORRUPTION, 4G MEMOR +--echo # (to be executed with valgrind) +CREATE TABLE t1(a BLOB, b VARCHAR(200)) ENGINE=ARCHIVE; +INSERT INTO t1 VALUES(NULL, ''); +FLUSH TABLE t1; +--echo # we need this select to workaround BUG#11764364 +SELECT * FROM t1; +CHECKSUM TABLE t1 EXTENDED; +FLUSH TABLE t1; +OPTIMIZE TABLE t1; +DROP TABLE t1; diff --git a/mysql-test/t/create-big.test b/mysql-test/t/create-big.test index 65273df3d1d..d487608f7e1 100644 --- a/mysql-test/t/create-big.test +++ b/mysql-test/t/create-big.test @@ -7,11 +7,13 @@ # # This test takes rather long time so let us run it only in --big-test mode --source include/big_test.inc -# We are using some debug-only features in this test ---source include/have_debug.inc +# We need the Debug Sync Facility. +--source include/have_debug_sync.inc # Some of tests below also use binlog to check that statements are # executed and logged in correct order --source include/have_binlog_format_mixed_or_statement.inc +# Save the initial number of concurrent sessions. +--source include/count_sessions.inc # Create auxilliary connections connect (addconroot1, localhost, root,,); @@ -22,7 +24,7 @@ connection default; --disable_warnings drop table if exists t1,t2,t3,t4,t5; --enable_warnings - +set debug_sync='RESET'; # # Tests for concurrency problems in CREATE TABLE ... SELECT @@ -34,244 +36,378 @@ drop table if exists t1,t2,t3,t4,t5; # What happens in situation when other statement messes with # table to be created before it is created ? # Concurrent CREATE TABLE -set session debug_dbug="+d,sleep_create_select_before_create"; +set debug_sync='create_table_select_before_create SIGNAL parked WAIT_FOR go'; --send create table t1 select 1 as i; connection addconroot1; ---sleep 2 ---error ER_TABLE_EXISTS_ERROR -create table t1 (j char(5)); +set debug_sync='now WAIT_FOR parked'; +--send create table t1 (j char(5)); +connection addconroot2; +let $wait_condition= + select count(*) = 1 from information_schema.processlist + where state = "Waiting for table metadata lock" and + info = "create table t1 (j char(5))"; +--source include/wait_condition.inc +set debug_sync='now SIGNAL go'; connection default; --reap +connection addconroot1; +--error ER_TABLE_EXISTS_ERROR +--reap +connection default; show create table t1; drop table t1; + # Concurrent CREATE TABLE ... SELECT +set debug_sync='create_table_select_before_create SIGNAL parked WAIT_FOR go'; --send create table t1 select 1 as i; connection addconroot1; ---sleep 2 ---error ER_TABLE_EXISTS_ERROR -create table t1 select "Test" as j; +set debug_sync='now WAIT_FOR parked'; +--send create table t1 select 'Test' as j; +connection addconroot2; +# Wait until the above CREATE TABLE t1 is blocked due to CREATE +let $wait_condition= + select count(*) = 1 from information_schema.processlist + where state = "Waiting for table metadata lock" and + info = "create table t1 select 'Test' as j"; +--source include/wait_condition.inc +set debug_sync='now SIGNAL go'; connection default; --reap +connection addconroot1; +--error ER_TABLE_EXISTS_ERROR +--reap +connection default; show create table t1; drop table t1; + # Concurrent CREATE TABLE LIKE create table t3 (j char(5)); +set debug_sync='create_table_select_before_create SIGNAL parked WAIT_FOR go'; --send create table t1 select 1 as i; connection addconroot1; ---sleep 2 ---error ER_TABLE_EXISTS_ERROR -create table t1 like t3; +set debug_sync='now WAIT_FOR parked'; +--send create table t1 like t3; +connection addconroot2; +# Wait until the above CREATE TABLE t1 is blocked due to CREATE +let $wait_condition= + select count(*) = 1 from information_schema.processlist + where state = "Waiting for table metadata lock" and + info = "create table t1 like t3"; +--source include/wait_condition.inc +set debug_sync='now SIGNAL go'; connection default; --reap +connection addconroot1; +--error ER_TABLE_EXISTS_ERROR +--reap +connection default; show create table t1; drop table t1; + # Concurrent RENAME TABLE +set debug_sync='create_table_select_before_create SIGNAL parked WAIT_FOR go'; --send create table t1 select 1 as i; connection addconroot1; ---sleep 2 ---error ER_TABLE_EXISTS_ERROR -rename table t3 to t1; +set debug_sync='now WAIT_FOR parked'; +--send rename table t3 to t1; +connection addconroot2; +# Wait until the above RENAME TABLE is blocked due to CREATE +let $wait_condition= + select count(*) = 1 from information_schema.processlist + where state = "Waiting for table metadata lock" and + info = "rename table t3 to t1"; +--source include/wait_condition.inc +set debug_sync='now SIGNAL go'; connection default; --reap +connection addconroot1; +--error ER_TABLE_EXISTS_ERROR +--reap +connection default; show create table t1; drop table t1; + # Concurrent ALTER TABLE RENAME +set debug_sync='create_table_select_before_create SIGNAL parked WAIT_FOR go'; --send create table t1 select 1 as i; connection addconroot1; ---sleep 2 +set debug_sync='now WAIT_FOR parked'; --error ER_TABLE_EXISTS_ERROR alter table t3 rename to t1; +set debug_sync='now SIGNAL go'; connection default; --reap +connection default; show create table t1; drop table t1; + # Concurrent ALTER TABLE RENAME which also adds column +set debug_sync='create_table_select_before_create SIGNAL parked WAIT_FOR go'; --send create table t1 select 1 as i; connection addconroot1; ---sleep 2 +set debug_sync='now WAIT_FOR parked'; --error ER_TABLE_EXISTS_ERROR alter table t3 rename to t1, add k int; +set debug_sync='now SIGNAL go'; connection default; --reap show create table t1; -drop table t1, t3; +drop table t1,t3; + # What happens if other statement sneaks in after the table # creation but before its opening ? -set session debug_dbug="-d,sleep_create_select_before_create:+d,sleep_create_select_before_open"; +set debug_sync='create_table_select_before_open SIGNAL parked WAIT_FOR go'; +connection default; + # Concurrent DROP TABLE +set debug_sync='create_table_select_before_open SIGNAL parked WAIT_FOR go'; --send create table t1 select 1 as i; connection addconroot1; ---sleep 2 -drop table t1; +set debug_sync='now WAIT_FOR parked'; +--send drop table t1; +connection addconroot2; +# Wait until the above DROP TABLE is blocked due to CREATE +let $wait_condition= + select count(*) = 1 from information_schema.processlist + where state = "Waiting for table metadata lock" and + info = "drop table t1"; +--source include/wait_condition.inc +set debug_sync='now SIGNAL go'; connection default; --reap +connection addconroot1; +--reap +connection default; + # Concurrent RENAME TABLE +set debug_sync='create_table_select_before_create SIGNAL parked WAIT_FOR go'; --send create table t1 select 1 as i; connection addconroot1; ---sleep 2 -rename table t1 to t2; +set debug_sync='now WAIT_FOR parked'; +--send rename table t1 to t2; +connection addconroot2; +# Wait until the above RENAME TABLE is blocked due to CREATE +let $wait_condition= + select count(*) = 1 from information_schema.processlist + where state = "Waiting for table metadata lock" and + info = "rename table t1 to t2"; +--source include/wait_condition.inc +set debug_sync='now SIGNAL go'; connection default; --reap +connection addconroot1; +--reap +connection default; drop table t2; + # Concurrent SELECT +set debug_sync='create_table_select_before_create SIGNAL parked WAIT_FOR go'; --send create table t1 select 1 as i; connection addconroot1; ---sleep 2 -select * from t1; +set debug_sync='now WAIT_FOR parked'; +--send select * from t1; +connection addconroot2; +# Wait until the above SELECT is blocked due to CREATE +let $wait_condition= + select count(*) = 1 from information_schema.processlist + where state = "Waiting for table metadata lock" and + info = "select * from t1"; +--source include/wait_condition.inc +set debug_sync='now SIGNAL go'; connection default; --reap +connection addconroot1; +--reap +connection default; drop table t1; + # Concurrent INSERT +set debug_sync='create_table_select_before_create SIGNAL parked WAIT_FOR go'; --send create table t1 select 1 as i; connection addconroot1; ---sleep 2 -insert into t1 values (2); +set debug_sync='now WAIT_FOR parked'; +--send insert into t1 values (2); +connection addconroot2; +# Wait until the above INSERT is blocked due to CREATE +let $wait_condition= + select count(*) = 1 from information_schema.processlist + where state = "Waiting for table metadata lock" and + info = "insert into t1 values (2)"; +--source include/wait_condition.inc +set debug_sync='now SIGNAL go'; connection default; --reap +connection addconroot1; +--reap +connection default; select * from t1; drop table t1; + # Concurrent CREATE TRIGGER set @a:=0; +set debug_sync='create_table_select_before_create SIGNAL parked WAIT_FOR go'; --send create table t1 select 1 as i; connection addconroot1; ---sleep 2 -create trigger t1_bi before insert on t1 for each row set @a:=1; +set debug_sync='now WAIT_FOR parked'; +--send create trigger t1_bi before insert on t1 for each row set @a:=1; +connection addconroot2; +# Wait until the above CREATE TRIGGER is blocked due to CREATE TABLE +let $wait_condition= + select count(*) = 1 from information_schema.processlist + where state = "Waiting for table metadata lock" and + info = "create trigger t1_bi before insert on t1 for each row set @a:=1"; +--source include/wait_condition.inc +set debug_sync='now SIGNAL go'; connection default; --reap +connection addconroot1; +--reap +connection default; select @a; drop table t1; + # Okay, now the same tests for the potential gap between open and lock -set session debug_dbug="-d,sleep_create_select_before_open:+d,sleep_create_select_before_lock"; +set debug_sync='create_table_select_before_lock SIGNAL parked WAIT_FOR go'; + # Concurrent DROP TABLE --send create table t1 select 1 as i; connection addconroot1; ---sleep 2 -drop table t1; +set debug_sync='now WAIT_FOR parked'; +--send drop table t1; +connection addconroot2; +# Wait until the above DROP TABLE is blocked due to CREATE TABLE +let $wait_condition= + select count(*) = 1 from information_schema.processlist + where state = "Waiting for table metadata lock" and + info = "drop table t1"; +--source include/wait_condition.inc +set debug_sync='now SIGNAL go'; connection default; --reap +connection addconroot1; +--reap +connection default; + # Concurrent RENAME TABLE +set debug_sync='create_table_select_before_lock SIGNAL parked WAIT_FOR go'; --send create table t1 select 1 as i; connection addconroot1; ---sleep 2 -rename table t1 to t2; +set debug_sync='now WAIT_FOR parked'; +--send rename table t1 to t2; +connection addconroot2; +# Wait until the above RENAME TABLE is blocked due to CREATE TABLE +let $wait_condition= + select count(*) = 1 from information_schema.processlist + where state = "Waiting for table metadata lock" and + info = "rename table t1 to t2"; +--source include/wait_condition.inc +set debug_sync='now SIGNAL go'; connection default; --reap +connection addconroot1; +--reap +connection default; drop table t2; + # Concurrent SELECT +set debug_sync='create_table_select_before_lock SIGNAL parked WAIT_FOR go'; --send create table t1 select 1 as i; connection addconroot1; ---sleep 2 -select * from t1; +set debug_sync='now WAIT_FOR parked'; +--send select * from t1; +connection addconroot2; +# Wait until the above SELECT is blocked due to CREATE TABLE +let $wait_condition= + select count(*) = 1 from information_schema.processlist + where state = "Waiting for table metadata lock" and + info = "select * from t1"; +--source include/wait_condition.inc +set debug_sync='now SIGNAL go'; connection default; --reap +connection addconroot1; +--reap +connection default; drop table t1; + # Concurrent INSERT +set debug_sync='create_table_select_before_lock SIGNAL parked WAIT_FOR go'; --send create table t1 select 1 as i; connection addconroot1; ---sleep 2 -insert into t1 values (2); +set debug_sync='now WAIT_FOR parked'; +--send insert into t1 values (2); +connection addconroot2; +# Wait until the above INSERT INTO t1 is blocked due to CREATE TABLE +let $wait_condition= + select count(*) = 1 from information_schema.processlist + where state = "Waiting for table metadata lock" and + info = "insert into t1 values (2)"; +--source include/wait_condition.inc +set debug_sync='now SIGNAL go'; connection default; --reap +connection addconroot1; +--reap +connection default; select * from t1; drop table t1; + # Concurrent CREATE TRIGGER set @a:=0; +set debug_sync='create_table_select_before_lock SIGNAL parked WAIT_FOR go'; --send create table t1 select 1 as i; connection addconroot1; ---sleep 2 -create trigger t1_bi before insert on t1 for each row set @a:=1; +set debug_sync='now WAIT_FOR parked'; +--send create trigger t1_bi before insert on t1 for each row set @a:=1; +connection addconroot2; +# Wait until the above CREATE TRIGGER is blocked due to CREATE TABLE +let $wait_condition= + select count(*) = 1 from information_schema.processlist + where state = "Waiting for table metadata lock" and + info = "create trigger t1_bi before insert on t1 for each row set @a:=1"; +--source include/wait_condition.inc +set debug_sync='now SIGNAL go'; connection default; --reap +connection addconroot1; +--reap +connection default; select @a; drop table t1; -# Some tests for case with existing table -set session debug_dbug="-d,sleep_create_select_before_lock:+d,sleep_create_select_before_check_if_exists"; -create table t1 (i int); + # Concurrent DROP TABLE +set debug_sync='create_table_select_before_check_if_exists SIGNAL parked WAIT_FOR go'; --send create table if not exists t1 select 1 as i; connection addconroot1; ---sleep 2 -drop table t1; +set debug_sync='now WAIT_FOR parked'; +--send drop table t1; +connection addconroot2; +# Wait until the above DROP TABLE is blocked due to CREATE TABLE +let $wait_condition= + select count(*) = 1 from information_schema.processlist + where state = "Waiting for table metadata lock" and + info = "drop table t1"; +--source include/wait_condition.inc +set debug_sync='now SIGNAL go'; connection default; --reap -# Concurrent CREATE TRIGGER +connection addconroot1; +--reap +connection default; + +# Concurrent CREATE TRIGGER create table t1 (i int); set @a:=0; +set debug_sync='create_table_select_before_check_if_exists SIGNAL parked WAIT_FOR go'; --send create table if not exists t1 select 1 as i; connection addconroot1; ---sleep 2 create trigger t1_bi before insert on t1 for each row set @a:=1; connection default; --reap +connection default; select @a; select * from t1; drop table t1; -set session debug_dbug="-d,sleep_create_select_before_check_if_exists"; - - -# Test for some details of CREATE TABLE ... SELECT implementation. -# -# We check that create placeholder is handled properly if we have -# to reopen tables in open_tables(). -# This test heavily relies on current implementation of name-locking/ -# table cache so it may stop working if it changes. OTOH it such problem -# will serve as warning that such changes should not be done lightly. -create table t2 (a int); -create table t4 (b int); -connection addconroot2; -lock table t4 write; -select 1; -connection addconroot1; -# Create placeholder/name-lock for t3 ---send create table t3 as select * from t4; ---sleep 2 -connection default; -# This statement creates placeholder for t1, then opens t2, -# then meets name-lock for t3 and then reopens all tables ---send create table t1 select * from t2, t3; ---sleep 2 -connection addconroot2; -unlock tables; -connection addconroot1; ---reap -connection default; ---reap -select * from t1; -show create table t1; -drop table t1, t3; -# Now similar test which proves that we really temporarily -# remove placeholder when we reopen tables. -connection addconroot2; -lock table t4 read; -select 1; -connection addconroot1; -# Create name-lock for t3 ---send rename table t4 to t3; ---sleep 2 -connection default; -# This statement creates placeholder for t1, then opens t2, -# then meets name-lock for t3 and then reopens all tables ---send create table if not exists t1 select 1 as i from t2, t3; ---sleep 2 -connection addconroot3; -# We should be able to take name-lock on table t1 as we should not have -# open placeholder for it at this point (otherwise it is possible to -# come-up with situation which will lead to deadlock, e.g. think of -# concurrent CREATE TABLE t1 SELECT * FROM t2 and RENAME TABLE t2 TO t1) -create table t5 (j int); -# This statement takes name-lock on t1 and therefore proves -# that there is no active open placeholder for it. -rename table t5 to t1; -connection addconroot2; -unlock tables; -connection addconroot1; ---reap -connection default; ---reap -select * from t1; -show create table t1; -drop table t1, t2, t3; - # Tests for possible concurrency issues with CREATE TABLE ... LIKE # @@ -286,103 +422,101 @@ drop table t1, t2, t3; --disable_warnings drop table if exists t1,t2; --enable_warnings +set debug_sync='RESET'; # What happens if some statements sneak in right after we have -# opened source table ? +# acquired locks and opened source table ? create table t1 (i int); -set session debug_dbug="+d,sleep_create_like_before_check_if_exists"; +set debug_sync='create_table_like_after_open SIGNAL parked WAIT_FOR go'; # Reset binlog to have clear start reset master; --send create table t2 like t1; connection addconroot1; ---sleep 2 +set debug_sync='now WAIT_FOR parked'; # DML on source table should be allowed to run concurrently insert into t1 values (1); # And DDL should wait -drop table t1; +--send drop table t1; +connection addconroot2; +let $wait_condition= + select count(*) = 1 from information_schema.processlist + where state = "Waiting for table metadata lock" and + info = "drop table t1"; +--source include/wait_condition.inc +set debug_sync='now SIGNAL go'; connection default; --reap +connection addconroot1; +--reap +connection default; show create table t2; drop table t2; # Let us check that statements were executed/binlogged in correct order source include/show_binlog_events.inc; -# Now let us check the gap between check for target table -# existance and copying of .frm file. +# Now check the gap between table creation and binlogging create table t1 (i int); -set session debug_dbug="-d,sleep_create_like_before_check_if_exists:+d,sleep_create_like_before_copy"; -# It should be impossible to create target table concurrently ---send create table t2 like t1; -connection addconroot1; ---sleep 2 -create table if not exists t2 (j int); -connection default; ---reap -show create table t2; -drop table t2; -# And concurrent DDL on the source table should be still disallowed +set debug_sync='create_table_like_before_binlog SIGNAL parked WAIT_FOR go'; reset master; --send create table t2 like t1; connection addconroot1; ---sleep 2 -drop table t1; +set debug_sync='now WAIT_FOR parked'; +--send insert into t2 values (1); +connection addconroot2; +let $wait_condition= + select count(*) = 1 from information_schema.processlist + where state = "Waiting for table metadata lock" and + info = "insert into t2 values (1)"; +--source include/wait_condition.inc +set debug_sync='now SIGNAL go'; connection default; --reap -drop table t2; -source include/show_binlog_events.inc; -# And now he gap between copying of .frm file and ha_create_table() call. -create table t1 (i int); -set session debug_dbug="-d,sleep_create_like_before_copy:+d,sleep_create_like_before_ha_create"; -# Both DML and DDL on target table should wait till operation completes -reset master; ---send create table t2 like t1; connection addconroot1; ---sleep 2 -insert into t2 values (1); -connection default; --reap +connection default; drop table t2; +set debug_sync='create_table_like_before_binlog SIGNAL parked WAIT_FOR go'; --send create table t2 like t1; connection addconroot1; ---sleep 2 -drop table t2; +set debug_sync='now WAIT_FOR parked'; +--send drop table t2; +connection addconroot2; +let $wait_condition= + select count(*) = 1 from information_schema.processlist + where state = "Waiting for table metadata lock" and + info = "drop table t2"; +--source include/wait_condition.inc +set debug_sync='now SIGNAL go'; connection default; --reap -# Concurrent DDL on the source table still waits ---send create table t2 like t1; connection addconroot1; ---sleep 2 -drop table t1; -connection default; --reap -drop table t2; -source include/show_binlog_events.inc; - -# Finally we check the gap between ha_create_table() and binlogging -create table t1 (i int); -set session debug_dbug="-d,sleep_create_like_before_ha_create:+d,sleep_create_like_before_binlogging"; -reset master; ---send create table t2 like t1; -connection addconroot1; ---sleep 2 -insert into t2 values (1); connection default; ---reap -drop table t2; +set debug_sync='create_table_like_before_binlog SIGNAL parked WAIT_FOR go'; --send create table t2 like t1; connection addconroot1; ---sleep 2 -drop table t2; +set debug_sync='now WAIT_FOR parked'; +--send drop table t1; +connection addconroot2; +let $wait_condition= + select count(*) = 1 from information_schema.processlist + where state = "Waiting for table metadata lock" and + info = "drop table t1"; +--source include/wait_condition.inc +set debug_sync='now SIGNAL go'; connection default; --reap ---send create table t2 like t1; connection addconroot1; ---sleep 2 -drop table t1; -connection default; --reap +connection default; drop table t2; -source include/show_binlog_events.inc; +disconnect addconroot1; +disconnect addconroot2; +disconnect addconroot3; -set session debug_dbug="-d,sleep_create_like_before_binlogging"; +set debug_sync='RESET'; +source include/show_binlog_events.inc; +# Check that all connections opened by test cases in this file are really +# gone so execution of other tests won't be affected by their presence. +--source include/wait_until_count_sessions.inc diff --git a/mysql-test/t/ctype_utf16.test b/mysql-test/t/ctype_utf16.test index d47dc335d5b..847e302e615 100644 --- a/mysql-test/t/ctype_utf16.test +++ b/mysql-test/t/ctype_utf16.test @@ -764,6 +764,20 @@ DROP TABLE t1; SELECT space(date_add(101, INTERVAL CHAR('1' USING utf16) hour_second)); + +--echo # +--echo # Bug#11750518 41090: ORDER BY TRUNCATES GROUP_CONCAT RESULT +--echo # + +SET NAMES utf8, @@character_set_connection=utf16; +SELECT id, CHAR_LENGTH(GROUP_CONCAT(body)) AS l +FROM (SELECT 'a' AS id, REPEAT('foo bar', 100) AS body +UNION ALL +SELECT 'a' AS id, REPEAT('bla bla', 100) AS body) t1 +GROUP BY id +ORDER BY l DESC; + + # ## TODO: add tests for all engines # diff --git a/mysql-test/t/ctype_utf32.test b/mysql-test/t/ctype_utf32.test index 945646087aa..5fc01e4467e 100644 --- a/mysql-test/t/ctype_utf32.test +++ b/mysql-test/t/ctype_utf32.test @@ -843,5 +843,18 @@ SELECT CASE s1 WHEN 'a' THEN 'b' ELSE 'c' END FROM t1; DROP TABLE t1; --echo # +--echo # Bug#11750518 41090: ORDER BY TRUNCATES GROUP_CONCAT RESULT +--echo # + +SET NAMES utf8, @@character_set_connection=utf32; +SELECT id, CHAR_LENGTH(GROUP_CONCAT(body)) AS l +FROM (SELECT 'a' AS id, REPEAT('foo bar', 100) AS body +UNION ALL +SELECT 'a' AS id, REPEAT('bla bla', 100) AS body) t1 +GROUP BY id +ORDER BY l DESC; + + +--echo # --echo # End of 5.5 tests --echo # diff --git a/mysql-test/t/ctype_utf8.test b/mysql-test/t/ctype_utf8.test index 2c7b27c63bb..b123902f605 100644 --- a/mysql-test/t/ctype_utf8.test +++ b/mysql-test/t/ctype_utf8.test @@ -1571,5 +1571,17 @@ SET NAMES utf8; EXPLAIN EXTENDED SELECT 'abcdÁÂÃÄÅ', _latin1'abcdÁÂÃÄÅ', _utf8'abcdÁÂÃÄÅ'; --echo # +--echo # Bug#11750518 41090: ORDER BY TRUNCATES GROUP_CONCAT RESULT +--echo # + +SET NAMES utf8; +SELECT id, CHAR_LENGTH(GROUP_CONCAT(body)) AS l +FROM (SELECT 'a' AS id, REPEAT('foo bar', 100) AS body +UNION ALL +SELECT 'a' AS id, REPEAT('bla bla', 100) AS body) t1 +GROUP BY id +ORDER BY l DESC; + +--echo # --echo # End of 5.5 tests --echo # diff --git a/mysql-test/t/disabled.def b/mysql-test/t/disabled.def index ce9f57b130f..37b4626e6db 100644 --- a/mysql-test/t/disabled.def +++ b/mysql-test/t/disabled.def @@ -14,8 +14,6 @@ events_time_zone : Test is not predictable as it depends on precise timi lowercase_table3 : Bug#11762269 2010-06-30 alik main.lowercase_table3 on Mac OSX read_many_rows_innodb : Bug#11748886 2010-11-15 mattiasj report already exists sum_distinct-big : Bug#11764126 2010-11-15 mattiasj was not tested -alter_table-big : Bug#11748731 2010-11-15 mattiasj was not tested -create-big : Bug#11748731 2010-11-15 mattiasj was not tested archive-big : Bug#11817185 2011-03-10 Anitha Disabled since this leads to timeout on Solaris Sparc log_tables-big : Bug#11756699 2010-11-15 mattiasj report already exists mysql_embedded : Bug#12561297 2011-05-14 Anitha Dependent on PB2 changes - eventum#41836 diff --git a/mysql-test/t/file_contents.test b/mysql-test/t/file_contents.test index f32b4f6f08b..4adf81a1aed 100644 --- a/mysql-test/t/file_contents.test +++ b/mysql-test/t/file_contents.test @@ -15,9 +15,9 @@ if ($dir_bin eq '/usr/') { # RPM package $dir_docs = $dir_bin; $dir_docs =~ s|/lib|/share/doc|; - if(-d "$dir_docs/packages/MySQL-server") { - # SuSE - $dir_docs = "$dir_docs/packages/MySQL-server"; + if(-d "$dir_docs/packages") { + # SuSE: "packages/" in the documentation path + $dir_docs = glob "$dir_docs/packages/MySQL-server*"; } else { # RedHat: version number in directory name $dir_docs = glob "$dir_docs/MySQL-server*"; @@ -25,9 +25,9 @@ if ($dir_bin eq '/usr/') { } elsif ($dir_bin eq '/usr') { # RPM build during development $dir_docs = "$dir_bin/share/doc"; - if(-d "$dir_docs/packages/MySQL-server") { - # SuSE - $dir_docs = "$dir_docs/packages/MySQL-server"; + if(-d "$dir_docs/packages") { + # SuSE: "packages/" in the documentation path + $dir_docs = glob "$dir_docs/packages/MySQL-server*"; } else { # RedHat: version number in directory name $dir_docs = glob "$dir_docs/MySQL-server*"; diff --git a/mysql-test/t/func_if.test b/mysql-test/t/func_if.test index a67bb088faa..5414adddd43 100644 --- a/mysql-test/t/func_if.test +++ b/mysql-test/t/func_if.test @@ -181,3 +181,15 @@ INSERT INTO t1 VALUES (NULL, 0), (NULL, 1); SELECT IF(b, (SELECT a FROM t1 LIMIT 1), b) c FROM t1 GROUP BY c; DROP TABLE t1; + +--echo # +--echo # Bug#12532830 +--echo # SIGFPE OR ASSERTION (PRECISION <= ((9 * 9) - 8*2)) && (DEC <= 30) +--echo # + +let $nines= 9999999999999999999999999999999999999; +eval select +sum(distinct(if('a', + (select adddate(elt(convert($nines,decimal(64,0)),count(*)), + interval 1 day)) + , .1))) as foo; diff --git a/mysql-test/t/func_str.test b/mysql-test/t/func_str.test index 8d01b84e359..208b18b3f85 100644 --- a/mysql-test/t/func_str.test +++ b/mysql-test/t/func_str.test @@ -1441,6 +1441,11 @@ SELECT * FROM t1; DROP TABLE t1; --echo # +--echo # Bug#11764310 conv function crashes, negative argument to memcpy +--echo # +SELECT CONV(1,-2147483648,-2147483648); + +--echo # --echo # Bug#12985030 SIMPLE QUERY WITH DECIMAL NUMBERS LEAKS MEMORY --echo # diff --git a/mysql-test/t/gis.test b/mysql-test/t/gis.test index f1e85ac0e40..a559b16b1f0 100644 --- a/mysql-test/t/gis.test +++ b/mysql-test/t/gis.test @@ -1313,5 +1313,17 @@ FORCE INDEX(i) WHERE a = date_sub(now(), interval 2808.4 year_month) DROP TABLE g1; +--echo # +--echo # Bug#13013970 MORE CRASHES IN FIELD_BLOB::GET_KEY_IMAGE +--echo # + +CREATE TABLE g1(a TEXT NOT NULL, KEY(a(255))); + +INSERT INTO g1 VALUES ('a'),('a'); +SELECT 1 FROM g1 WHERE a >= ANY +(SELECT 1 FROM g1 WHERE a = geomfromtext('') OR a) ; + +DROP TABLE g1; + --echo End of 5.5 tests diff --git a/mysql-test/t/group_min_max_innodb.test b/mysql-test/t/group_min_max_innodb.test index 643b4f7d55e..7038eb2ff47 100644 --- a/mysql-test/t/group_min_max_innodb.test +++ b/mysql-test/t/group_min_max_innodb.test @@ -117,3 +117,23 @@ drop view v1; drop table t1; --echo End of 5.1 tests + +--echo # +--echo # Bug#12540545 61101: ASSERTION FAILURE IN THREAD 1256741184 IN +--echo # FILE /BUILDDIR/BUILD/BUILD/MYSQ +--echo # + +CREATE TABLE t1 (a CHAR(1), b CHAR(1), PRIMARY KEY (a,b)) ENGINE=InnoDB; +INSERT INTO t1 VALUES ('a', 'b'), ('c', 'd'); +EXPLAIN SELECT COUNT(DISTINCT a) FROM t1 WHERE b = 'b'; +SELECT COUNT(DISTINCT a) FROM t1 WHERE b = 'b'; +DROP TABLE t1; + +CREATE TABLE t1 (a CHAR(1) NOT NULL, b CHAR(1) NOT NULL, UNIQUE KEY (a,b)) +ENGINE=InnoDB; +INSERT INTO t1 VALUES ('a', 'b'), ('c', 'd'); +EXPLAIN SELECT COUNT(DISTINCT a) FROM t1 WHERE b = 'b'; +SELECT COUNT(DISTINCT a) FROM t1 WHERE b = 'b'; +DROP TABLE t1; + +--echo End of 5.5 tests diff --git a/mysql-test/t/handler_read_last.test b/mysql-test/t/handler_read_last.test index 376829b9baf..9104be78952 100644 --- a/mysql-test/t/handler_read_last.test +++ b/mysql-test/t/handler_read_last.test @@ -1,18 +1,3 @@ -# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software Foundation, -# 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA - --disable_warnings DROP TABLE IF EXISTS t1; --enable_warnings diff --git a/mysql-test/t/init_connect.test b/mysql-test/t/init_connect.test index b6bac5f65fa..e96d02fe0d1 100644 --- a/mysql-test/t/init_connect.test +++ b/mysql-test/t/init_connect.test @@ -36,6 +36,14 @@ connection con0; set GLOBAL init_connect="adsfsdfsdfs"; connect (con5,localhost,user_1,,); connection con5; +# BUG#11755281/47032: ERROR 2006 / ERROR 2013 INSTEAD OF PROPER ERROR MESSAGE +# We now throw a proper error message here: +--replace_regex /connection .* to/connection to/ +--error ER_NEW_ABORTING_CONNECTION +select @a; +# We got disconnected after receiving the above error message; any further +# requests should fail with a notice that no one's listening to us. +# --error CR_SERVER_GONE_ERROR,CR_SERVER_LOST --error 2013,2006 select @a; connection con0; diff --git a/mysql-test/t/ipv4_as_ipv6.test b/mysql-test/t/ipv4_as_ipv6.test index ace3c286643..1fbc0317a36 100644 --- a/mysql-test/t/ipv4_as_ipv6.test +++ b/mysql-test/t/ipv4_as_ipv6.test @@ -1,7 +1,3 @@ -# Copyright (C) 2009 SUN Microsystems -# All rights reserved. Use is subject to license terms. -# Author: Horst Hunger -# Nov. 19, 2009 # Test of ipv4 (127.0.0.1) in ipv6 format # Options: --skip-name-resolve, --bind-address=0.0.0.0 (see corresponding opt file). # diff --git a/mysql-test/t/ipv6.test b/mysql-test/t/ipv6.test index 5c08cde3746..24ab09b7083 100644 --- a/mysql-test/t/ipv6.test +++ b/mysql-test/t/ipv6.test @@ -1,7 +1,3 @@ -# Copyright (C) 2009 SUN Microsystems -# All rights reserved. Use is subject to license terms. -# Author: Horst Hunger -# Nov. 19, 2009 # Test of ipv6 format # Options: --skip-name-resolve, --bind-address=:: (see corresponding opt file). # diff --git a/mysql-test/t/mysql_plugin.test b/mysql-test/t/mysql_plugin.test index b7fbe377e31..c5968df85f8 100644 --- a/mysql-test/t/mysql_plugin.test +++ b/mysql-test/t/mysql_plugin.test @@ -105,7 +105,7 @@ let $MYSQL_PLUGIN_CMD= $MYSQL_PLUGIN --datadir=$MYSQLD_DATADIR --basedir=$MYSQLD --echo # --echo # Ensure the plugin isn't loaded. --echo # -SELECT * FROM mysql.plugin WHERE name = 'daemon_example' ORDER BY name; +SELECT * FROM mysql.plugin WHERE dl like 'libdaemon%' ORDER BY name; --echo # --echo # Enable the plugin... @@ -139,10 +139,21 @@ EOF --source include/wait_until_connected_again.inc --echo # +--echo # Simulate loading a plugin libary with multiple entry points. +--echo # This will test the DISABLE to ensure all rows are removed. +--echo # +--replace_regex /\.dll/.so/ +eval INSERT INTO mysql.plugin VALUES ('wicky', '$DAEMONEXAMPLE'); +--replace_regex /\.dll/.so/ +eval INSERT INTO mysql.plugin VALUES ('wacky', '$DAEMONEXAMPLE'); +--replace_regex /\.dll/.so/ +eval INSERT INTO mysql.plugin VALUES ('wonky', '$DAEMONEXAMPLE'); + +--echo # --echo # Ensure the plugin is now loaded. --echo # --replace_regex /\.dll/.so/ -SELECT * FROM mysql.plugin WHERE name = 'daemon_example' ORDER BY name; +SELECT * FROM mysql.plugin WHERE dl like 'libdaemon%' ORDER BY name; --echo # --echo # Disable the plugin... @@ -173,7 +184,7 @@ EOF --echo # --echo # Ensure the plugin isn't loaded. --echo # -SELECT * FROM mysql.plugin WHERE name = 'daemon_example' ORDER BY name; +SELECT * FROM mysql.plugin WHERE dl like 'libdaemon%' ORDER BY name; # # Stop the server for error conditions diff --git a/mysql-test/t/mysql_upgrade.test b/mysql-test/t/mysql_upgrade.test index 4c188ff3147..f200bce551f 100644 --- a/mysql-test/t/mysql_upgrade.test +++ b/mysql-test/t/mysql_upgrade.test @@ -105,3 +105,22 @@ DROP USER 'user3'@'%'; --replace_result $MYSQLTEST_VARDIR var --exec $MYSQL_UPGRADE --force --upgrade-system-tables +--echo # +--echo # Bug#11827359 60223: MYSQL_UPGRADE PROBLEM WITH OPTION +--echo # SKIP-WRITE-BINLOG +--echo # + +let $MYSQLD_DATADIR= `select @@datadir`; + +--echo # Droping the previously created mysql_upgrade_info file.. +--remove_file $MYSQLD_DATADIR/mysql_upgrade_info + +--echo # Running mysql_upgrade with --skip-write-binlog.. +--replace_result $MYSQLTEST_VARDIR var +--exec $MYSQL_UPGRADE --skip-write-binlog + +# mysql_upgrade must have created mysql_upgrade_info file, +# so the following command should never fail. +--remove_file $MYSQLD_DATADIR/mysql_upgrade_info + +--echo End of tests diff --git a/mysql-test/t/mysqld--help-notwin.test b/mysql-test/t/mysqld--help-notwin.test index e3d1ca97128..7cc490c0615 100644 --- a/mysql-test/t/mysqld--help-notwin.test +++ b/mysql-test/t/mysqld--help-notwin.test @@ -1,18 +1,3 @@ -# Copyright (C) 2009-2010 Sun Microsystems, Inc. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - # # mysqld --help # diff --git a/mysql-test/t/mysqld--help-win.test b/mysql-test/t/mysqld--help-win.test index 56cfec8999b..fca329bfbe6 100644 --- a/mysql-test/t/mysqld--help-win.test +++ b/mysql-test/t/mysqld--help-win.test @@ -1,18 +1,3 @@ -# Copyright (C) 2009-2010 Sun Microsystems, Inc. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - # # mysqld --help # diff --git a/mysql-test/t/mysqldump.test b/mysql-test/t/mysqldump.test index 2170b9aa38b..302d79b6b13 100644 --- a/mysql-test/t/mysqldump.test +++ b/mysql-test/t/mysqldump.test @@ -2226,5 +2226,43 @@ CREATE TABLE t1 (a INT); --exec $MYSQL_DUMP --compatible=no_t,no_f --skip-comments test DROP TABLE t1; +--echo # +--echo # Bug#12809202 61854: MYSQLDUMP --SINGLE-TRANSACTION --FLUSH-LOG BREAKS +--echo # CONSISTENCY +--echo # + +--disable_warnings +DROP DATABASE IF EXISTS b12809202_db; +--enable_warnings + +CREATE DATABASE b12809202_db; +CREATE TABLE b12809202_db.t1 (c1 INT); +CREATE TABLE b12809202_db.t2 (c1 INT); + +INSERT INTO b12809202_db.t1 VALUES (1), (2), (3); +INSERT INTO b12809202_db.t2 VALUES (1), (2), (3); + +--echo # Starting mysqldump with --single-transaction & --flush-log options.. +--echo # Note : In the following dump the transaction +--echo # should start only after the logs are +--echo # flushed, as 'flush logs' causes implicit +--echo # commit starting 5.5. +--echo +--echo #### Dump starts here #### +--replace_regex /-- Server version.*// /-- MySQL dump .*// /-- Dump completed on .*/-- Dump completed/ +--exec $MYSQL_DUMP --verbose --single-transaction --flush-log b12809202_db 2>&1 +--echo +--echo #### Dump ends here #### + +# Cleanup +DROP TABLE b12809202_db.t1; +DROP TABLE b12809202_db.t2; +DROP DATABASE b12809202_db; + +--echo # +--echo # Delete all existing binary logs. +--echo # +RESET MASTER; + # Wait till we reached the initial number of concurrent sessions --source include/wait_until_count_sessions.inc diff --git a/mysql-test/t/mysqltest.test b/mysql-test/t/mysqltest.test index ab55fd30bf5..a7585bea4f8 100644 --- a/mysql-test/t/mysqltest.test +++ b/mysql-test/t/mysqltest.test @@ -1753,6 +1753,12 @@ let $long_rep= $long_rep,$long_rep; --replace_result $long_rep LONG_STRING eval select "$long_rep" as x; +# Test replace within `` + +--replace_result cat dog +--let $animal= `select "cat" as pet` +--echo $animal + # ---------------------------------------------------------------------------- # Test sync_with_master # ---------------------------------------------------------------------------- @@ -2075,6 +2081,48 @@ insert into t1 values (2,4); select * from t1; drop table t1; +# Test usage with `` + +--replace_regex /x/y/ +--let $result= `select "x" as col` +--echo $result + +# Test usage with a variable as pattern list + +--disable_query_log +--let $patt= /a /b / /less/more/ +--replace_regex $patt +select "a is a and less is more" as txt; +--let $patt= +--replace_regex $patt +select "a is a and less is more" as txt; +--enable_query_log + +#------------------------------------------------------------------------- +# BUG #11754855 : Passing variable to --error +#------------------------------------------------------------------------- +create table t2 ( a char(10)); +let $errno1=0; +let $errno2=ER_PARSE_ERROR; +let $errno3=ER_NO_SUCH_TABLE; +--error $errno2 +garbage; + +--error $errno2,$errno3 +garbage; + +--error $errno2,ER_NO_SUCH_TABLE +garbage; + +--error ER_NO_SUCH_TABLE,$errno2 +insert into t1 values ("Abcd"); + +--error $errno1,ER_PARSE_ERROR +garbage; + +drop table t2; + + # ---------------------------------------------------------------------------- # Tests of send # ---------------------------------------------------------------------------- diff --git a/mysql-test/t/partition_innodb_plugin.test b/mysql-test/t/partition_innodb_plugin.test index 9da22d55ef7..4693288a4dd 100644 --- a/mysql-test/t/partition_innodb_plugin.test +++ b/mysql-test/t/partition_innodb_plugin.test @@ -6,8 +6,8 @@ let $MYSQLD_DATADIR= `SELECT @@datadir`; --echo # --echo # Bug#11766879/Bug#60106: DIFF BETWEEN # OF INDEXES IN MYSQL VS INNODB, --echo # PARTITONING, ON INDEX CREATE +--echo # Bug#12696518: MEMORY LEAKS IN HA_PARTITION (VALGRIND TESTS ON TRUNK) --echo # -call mtr.add_suppression("contains 2 indexes inside InnoDB, which is different from the number of indexes 1 defined in the MySQL"); CREATE TABLE t1 ( id bigint NOT NULL AUTO_INCREMENT, time date, @@ -26,6 +26,7 @@ INSERT INTO t1 (time,id2) VALUES ('2011-07-25',1); CREATE UNIQUE INDEX uk_time_id2 on t1(time,id2); SELECT COUNT(*) FROM t1; +SHOW CREATE TABLE t1; DROP TABLE t1; diff --git a/mysql-test/t/query_cache.test b/mysql-test/t/query_cache.test index e87e57702ac..c8371ea31f1 100644 --- a/mysql-test/t/query_cache.test +++ b/mysql-test/t/query_cache.test @@ -1205,48 +1205,55 @@ set global query_cache_size=0; set global query_cache_type=0; show status like 'Qcache_free_blocks'; +--error ER_QUERY_CACHE_DISABLED +set global query_cache_size=102400; +set global query_cache_type=on; +set session query_cache_type=on; + --echo Restore default values. -# Bug#28211 RENAME DATABASE and query cache don't play nicely together -# -# TODO: enable these tests when RENAME DATABASE is implemented. -# --disable_warnings -# drop database if exists db1; -# drop database if exists db2; -# --enable_warnings -# set GLOBAL query_cache_size=15*1024*1024; -# create database db1; -# use db1; -# create table t1(c1 int)engine=myisam; -# insert into t1(c1) values (1); -# select * from db1.t1 f; -# show status like 'Qcache_queries_in_cache'; -# rename schema db1 to db2; -# show status like 'Qcache_queries_in_cache'; -# drop database db2; -# set global query_cache_size=default; -# -# --disable_warnings -# drop database if exists db1; -# drop database if exists db3; -# --enable_warnings -# set GLOBAL query_cache_size=15*1024*1024; -# create database db1; -# create database db3; -# use db1; -# create table t1(c1 int) engine=myisam; -# use db3; -# create table t1(c1 int) engine=myisam; -# use db1; -# insert into t1(c1) values (1); -# use mysql; -# select * from db1.t1; -# select c1+1 from db1.t1; -# select * from db3.t1; -# show status like 'Qcache_queries_in_cache'; -# rename schema db1 to db2; -# show status like 'Qcache_queries_in_cache'; -# drop database db2; -# drop database db3; + --disable_warnings + drop database if exists db1; + drop database if exists db2; + --enable_warnings + set GLOBAL query_cache_size=15*1024*1024; + create database db1; + use db1; + create table t1(c1 int)engine=myisam; + insert into t1(c1) values (1); + select * from db1.t1 f; + show status like 'Qcache_queries_in_cache'; + + create database db2; + rename table db1.t1 to db2.t2; + drop database db1; + show status like 'Qcache_queries_in_cache'; + drop database db2; + set global query_cache_size=default; + + --disable_warnings + drop database if exists db1; + drop database if exists db3; + --enable_warnings + set GLOBAL query_cache_size=15*1024*1024; + create database db1; + create database db3; + use db1; + create table t1(c1 int) engine=myisam; + use db3; + create table t1(c1 int) engine=myisam; + use db1; + insert into t1(c1) values (1); + use test; + select * from db1.t1; + select c1+1 from db1.t1; + select * from db3.t1; + show status like 'Qcache_queries_in_cache'; + create database db2; + rename table db1.t1 to db2.t2; + drop database db1; + show status like 'Qcache_queries_in_cache'; + drop database db2; + drop database db3; set GLOBAL query_cache_type=default; set GLOBAL query_cache_limit=default; diff --git a/mysql-test/t/select.test b/mysql-test/t/select.test index 2a8913730ca..44fb3ba46f5 100644 --- a/mysql-test/t/select.test +++ b/mysql-test/t/select.test @@ -4417,6 +4417,7 @@ DROP TABLE t1; --echo # End of test BUG#57203 +--echo # --echo # lp:822760 Wrong result with view + invalid dates --echo # CREATE TABLE t1 (f1 date); @@ -4430,4 +4431,19 @@ SELECT * FROM v1 HAVING f1 = 'zz' AND f1 <= 'aa' ; DROP TABLE t1; DROP VIEW v1; +--echo # +--echo # Bug#63020: Function "format"'s 'locale' argument is not considered +--echo # when creating a "view' +--echo # + +CREATE TABLE t1 (f1 DECIMAL(10,2)); +INSERT INTO t1 VALUES (11.67),(17865.3),(12345678.92); +CREATE VIEW view_t1 AS SELECT FORMAT(f1,1,'sk_SK') AS f1 FROM t1; +SHOW CREATE VIEW view_t1; +SELECT * FROM view_t1; +DROP TABLE t1; +DROP VIEW view_t1; +--echo # End of test BUG#63020 + SET optimizer_switch=@save_optimizer_switch; + diff --git a/mysql-test/t/show_check.test b/mysql-test/t/show_check.test index e78724d16da..3a38b85f1ae 100644 --- a/mysql-test/t/show_check.test +++ b/mysql-test/t/show_check.test @@ -1,21 +1,3 @@ -# Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reserved. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; version 2 of -# the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA -# 02110-1301 USA -# - ################################################################################ # # NOTICE: diff --git a/mysql-test/t/signal.test b/mysql-test/t/signal.test index af0aa17f232..13a0db2029b 100644 --- a/mysql-test/t/signal.test +++ b/mysql-test/t/signal.test @@ -1,18 +1,3 @@ -# Copyright (C) 2008 Sun Microsystems, Inc -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - # Tests for SIGNAL and RESIGNAL --echo # diff --git a/mysql-test/t/signal_code.test b/mysql-test/t/signal_code.test index d2f65647c81..6922a447c6a 100644 --- a/mysql-test/t/signal_code.test +++ b/mysql-test/t/signal_code.test @@ -1,18 +1,3 @@ -# Copyright (C) 2008 Sun Microsystems, Inc -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - # Tests for SIGNAL and RESIGNAL -- source include/have_debug.inc diff --git a/mysql-test/t/signal_demo1.test b/mysql-test/t/signal_demo1.test index 5de847ba0ba..62020b8f3fd 100644 --- a/mysql-test/t/signal_demo1.test +++ b/mysql-test/t/signal_demo1.test @@ -1,18 +1,3 @@ -# Copyright (C) 2008 Sun Microsystems, Inc -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - # # Demonstrate how SIGNAL can be used to enforce integrity constraints. # diff --git a/mysql-test/t/signal_demo2.test b/mysql-test/t/signal_demo2.test index fc909cb926c..30f5cef715c 100644 --- a/mysql-test/t/signal_demo2.test +++ b/mysql-test/t/signal_demo2.test @@ -1,18 +1,3 @@ -# Copyright (C) 2008 Sun Microsystems, Inc -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - # # Demonstrate how RESIGNAL can be used to 'catch' and 're-throw' an error # diff --git a/mysql-test/t/signal_demo3.test b/mysql-test/t/signal_demo3.test index 347f1b75a79..a685111c3c1 100644 --- a/mysql-test/t/signal_demo3.test +++ b/mysql-test/t/signal_demo3.test @@ -1,18 +1,3 @@ -# Copyright (C) 2008 Sun Microsystems, Inc -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - # # Demonstrate how RESIGNAL can be used to print a stack trace # diff --git a/mysql-test/t/signal_sqlmode.test b/mysql-test/t/signal_sqlmode.test index 860c145a361..2b311fd1ab1 100644 --- a/mysql-test/t/signal_sqlmode.test +++ b/mysql-test/t/signal_sqlmode.test @@ -1,18 +1,3 @@ -# Copyright (C) 2008 Sun Microsystems, Inc -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - # Tests for SIGNAL, RESIGNAL and GET DIAGNOSTICS SET @save_sql_mode=@@sql_mode; diff --git a/mysql-test/t/sp-lock.test b/mysql-test/t/sp-lock.test index 6284169eb9b..a01c9e19908 100644 --- a/mysql-test/t/sp-lock.test +++ b/mysql-test/t/sp-lock.test @@ -1,18 +1,3 @@ -# Copyright (C) 2009 Sun Microsystems, Inc -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - # # Metadata lock handling for stored procedures and # functions. diff --git a/mysql-test/t/sp.test b/mysql-test/t/sp.test index acbf75d9f01..09deb057ea0 100644 --- a/mysql-test/t/sp.test +++ b/mysql-test/t/sp.test @@ -3336,28 +3336,20 @@ drop table t3| --disable_warnings drop procedure if exists bug6857| --enable_warnings -create procedure bug6857(counter int) +create procedure bug6857() begin declare t0, t1 int; declare plus bool default 0; - - set t0 = current_time(); - while counter > 0 do - set counter = counter - 1; - end while; - set t1 = current_time(); + set t0 = unix_timestamp(); + select sleep(1.1); + set t1 = unix_timestamp(); if t1 > t0 then set plus = 1; end if; select plus; end| -# QQ: This is currently disabled. Not only does it slow down a normal test -# run, it makes running with valgrind (or similar tools) extremely -# painful. -# Make sure this takes at least one second on all machines in all builds. -# 30000 makes it about 3 seconds on an old 1.1GHz linux. -#call bug6857(300000)| +call bug6857()| drop procedure bug6857| @@ -8764,11 +8756,117 @@ call p1(1, 0); call p1(1, 5); call p1(3, 2); +delimiter |; +--echo # Try to create a function that +--echo # refers to non-existing variables. +--error ER_SP_UNDECLARED_VAR +create function f1(p1 integer, p2 integer) + returns int +begin + declare a int; + set a = (select count(*) from t1 limit a, b); + return a; +end| + +create function f1() + returns int +begin + declare a, b, c int; + set a = (select count(*) from t1 limit b, c); + return a; +end| + +delimiter ;| +--echo # How do we handle NULL limit values? +select f1(); + +drop function f1; + +delimiter |; +--echo # +--echo # Try to use data types not allowed in LIMIT +--echo # +--error ER_WRONG_SPVAR_TYPE_IN_LIMIT +create function f1(p1 date, p2 date) + returns int +begin + declare a int; + set a = (select count(*) from t1 limit p1, p2); + return a; +end| + +--error ER_WRONG_SPVAR_TYPE_IN_LIMIT +create function f1(p1 integer, p2 float) + returns int +begin + declare a int; + set a = (select count(*) from t1 limit p1, p2); + return a; +end| + +--error ER_WRONG_SPVAR_TYPE_IN_LIMIT +create function f1(p1 integer, p2 char(1)) + returns int +begin + declare a int; + set a = (select count(*) from t1 limit p1, p2); + return a; +end| + +--error ER_WRONG_SPVAR_TYPE_IN_LIMIT +create function f1(p1 varchar(5), p2 char(1)) + returns int +begin + declare a int; + set a = (select count(*) from t1 limit p1, p2); + return a; +end| + +--error ER_WRONG_SPVAR_TYPE_IN_LIMIT +create function f1(p1 decimal, p2 decimal) + returns int +begin + declare a int; + set a = (select count(*) from t1 limit p1, p2); + return a; +end| + +--error ER_WRONG_SPVAR_TYPE_IN_LIMIT +create function f1(p1 double, p2 double) + returns int +begin + declare a int; + set a = (select count(*) from t1 limit p1, p2); + return a; +end| + +--echo # +--echo # Finally, test the valid case. +--echo # + +create function f1(p1 integer, p2 integer) +returns int +begin + declare count int; + set count= (select count(*) from (select * from t1 limit p1, p2) t_1); + return count; +end| + +delimiter ;| + +select f1(0, 0); +select f1(0, -1); +select f1(-1, 0); +select f1(-1, -1); +select f1(0, 1); +select f1(1, 0); +select f1(1, 5); +select f1(3, 2); --echo # Cleanup drop table t1; drop procedure p1; - +drop function f1; --echo # --echo # BUG#11766234: 59299: ASSERT (TABLE_REF->TABLE || TABLE_REF->VIEW) @@ -8890,4 +8988,52 @@ DROP TABLE t1; DROP PROCEDURE p1; --echo +--echo # +--echo # Bug#12621017 - Crash if a sp variable is used in the +--echo # limit clause of a set statement +--echo # + +--disable_warnings +DROP TABLE IF EXISTS t1; +DROP PROCEDURE IF EXISTS p1; +DROP PROCEDURE IF EXISTS p2; +--enable_warnings + +CREATE TABLE t1 (c1 INT); +INSERT INTO t1 VALUES (1); + +delimiter |; + +CREATE PROCEDURE p1() +BEGIN + DECLARE foo, cnt INT UNSIGNED DEFAULT 1; + SET foo = (SELECT MIN(c1) FROM t1 LIMIT cnt); +END| + +CREATE PROCEDURE p2() +BEGIN + +DECLARE iLimit INT; +DECLARE iVal INT; + +DECLARE cur1 CURSOR FOR + SELECT c1 FROM t1 + LIMIT iLimit; + +SET iLimit=1; + +OPEN cur1; +FETCH cur1 INTO iVal; + +END| + +delimiter ;| + +CALL p1(); +CALL p2(); + +DROP PROCEDURE p1; +DROP PROCEDURE p2; +DROP TABLE t1; + --echo # End of 5.5 test diff --git a/mysql-test/t/view_grant.test b/mysql-test/t/view_grant.test index 1b9c2c0a25e..663501a0a88 100644 --- a/mysql-test/t/view_grant.test +++ b/mysql-test/t/view_grant.test @@ -165,6 +165,12 @@ explain select c from mysqltest.v4; show create view mysqltest.v4; --error ER_TABLEACCESS_DENIED_ERROR explain select c from mysqltest.v5; +# new in 5.5: SHOW CREATE VIEW needs SELECT now (MySQL Bug#27145) +--error ER_TABLEACCESS_DENIED_ERROR +show create view mysqltest.v5; +connection root; +grant select on mysqltest.v5 to mysqltest_1@localhost; +connection user1; show create view mysqltest.v5; # missing SELECT on underlying t1, no SHOW VIEW on v1 either. @@ -177,6 +183,7 @@ show create view mysqltest.v1; connection root; grant show view on mysqltest.v1 to mysqltest_1@localhost; grant select on mysqltest.t1 to mysqltest_1@localhost; +revoke select on mysqltest.v5 from mysqltest_1@localhost; connection user1; # EXPLAIN works explain select c from mysqltest.v1; @@ -198,8 +205,6 @@ show create view mysqltest.v4; # we have SHOW VIEW on v5, and SELECT on t1 -- not enough --error ER_TABLEACCESS_DENIED_ERROR explain select c from mysqltest.v5; -# we can SHOW CREATE VIEW though -show create view mysqltest.v5; # allow to see any view in mysqltest database connection root; |