diff options
author | Leonard Zhou <zhou.li@sun.com> | 2009-03-18 11:05:48 +0800 |
---|---|---|
committer | Leonard Zhou <zhou.li@sun.com> | 2009-03-18 11:05:48 +0800 |
commit | af53e5856abc07897d77a4baa9bb8fdfe5f75b9a (patch) | |
tree | 4ff5a69a88bc847e97ed56daf850be8396acd34e /mysql-test | |
parent | 99524127985de26ee61ccc7fd93165f5c14b450b (diff) | |
parent | b7ce2a25211ce86044635d9899e3517600cbda06 (diff) | |
download | mariadb-git-af53e5856abc07897d77a4baa9bb8fdfe5f75b9a.tar.gz |
Merge
Diffstat (limited to 'mysql-test')
29 files changed, 338 insertions, 132 deletions
diff --git a/mysql-test/include/concurrent.inc b/mysql-test/include/concurrent.inc index 3b34a5b1ede..fe670cef08e 100644 --- a/mysql-test/include/concurrent.inc +++ b/mysql-test/include/concurrent.inc @@ -11,6 +11,11 @@ # $engine_type storage engine to be tested # # Last update: +# 2009-02-13 HH "Release_lock("hello")" is now also successful when delivering NULL, +# replaced two sleeps by wait_condition. The last two "sleep 1" have not been +# replaced as all tried wait conditions leaded to nondeterministic results, especially +# to succeeding concurrent updates. To replace the sleeps there should be some time +# planned (or internal knowledge of the server may help). # 2006-08-02 ML test refactored # old name was t/innodb_concurrent.test # main code went into include/concurrent.inc @@ -21,7 +26,6 @@ # connection default; - # # Show prerequisites for this test. # @@ -50,8 +54,6 @@ GRANT USAGE ON test.* TO mysqltest@localhost; # # Preparatory cleanup. # -DO release_lock("hello"); -DO release_lock("hello2"); --disable_warnings drop table if exists t1; --enable_warnings @@ -86,13 +88,14 @@ drop table if exists t1; connection thread2; --echo ** Start transaction for thread 2 begin; - --echo ** Update will cause a table scan and a new ULL will + --echo ** Update will cause a table scan and a new ULL will --echo ** be created and blocked on the first row where tipo=11. send update t1 set eta=1+get_lock("hello",10)*0 where tipo=11; - sleep 1; --echo ** connection thread1 connection thread1; + let $wait_condition= select count(*)= 1 from information_schema.processlist where state= 'User lock'; + --source include/wait_condition.inc --echo ** Start new transaction for thread 1 begin; --echo ** Update on t1 will cause a table scan which will be blocked because @@ -111,7 +114,9 @@ drop table if exists t1; } --echo ** Release user level name lock from thread 1. This will cause the ULL --echo ** on thread 2 to end its wait. - select release_lock("hello"); +# Due to Bug#32782 User lock hash fails to find lock, which probably also cause Bug#39484 (main.concurrent_innodb_safelog fails sporadically) the success of the following +# is also guaranteed for NULL. Replaced SELECT by DO (no result). + DO release_lock("hello"); --echo ** Table is now updated with a new eta on tipo=22 for thread 1. select * from t1; @@ -119,7 +124,9 @@ drop table if exists t1; connection thread2; --echo ** Release the lock and collect result from update on thread 2 reap; - select release_lock("hello"); +# Due to Bug#32782 User lock hash fails to find lock, which probably also cause Bug#39484 (main.concurrent_innodb_safelog fails sporadically) the success of the following +# is also guaranteed for NULL. Replaced SELECT by DO (no result). + DO release_lock("hello"); --echo ** Table should have eta updates where tipo=11 but updates made by --echo ** thread 1 shouldn't be visible yet. select * from t1; @@ -183,10 +190,11 @@ drop table t1; --echo ** This will cause a hang on the first row where tipo=1 until the --echo ** blocking ULL is released. send update t1 set eta=1+get_lock("hello",10)*0 where tipo=1; - sleep 1; - --echo ** connection thread1 +--echo ** connection thread1 connection thread1; + let $wait_condition= select count(*)= 1 from information_schema.processlist where state= 'User lock'; + --source include/wait_condition.inc --echo ** Start transaction on thread 1 begin; --echo ** Update on t1 will cause a table scan which will be blocked because @@ -204,7 +212,9 @@ drop table t1; update t1 set tipo=1 where tipo=2; } --echo ** Release ULL. This will release the next waiting ULL on thread 2. - select release_lock("hello"); +# Due to Bug#32782 User lock hash fails to find lock, which probably also cause Bug#39484 (main.concurrent_innodb_safelog fails sporadically)the success of the following +# is also guaranteed for NULL. Replaced SELECT by DO (no result). + DO release_lock("hello"); --echo ** The table should still be updated with updates for thread 1 only: select * from t1; @@ -212,7 +222,9 @@ drop table t1; connection thread2; --echo ** Release the lock and collect result from thread 2: reap; - select release_lock("hello"); +# Due to Bug#32782 User lock hash fails to find lock, which probably also cause Bug#39484 (main.concurrent_innodb_safelog fails sporadically) the success of the following +# is also guaranteed for NULL. Replaced SELECT by DO (no result). + DO release_lock("hello"); --echo ** Seen from thread 2 the table should have been updated on four --echo ** places. select * from t1; @@ -264,15 +276,18 @@ drop table t1; --echo ** Update will create a table scan which creates a ULL where a=2; --echo ** this will hang waiting on thread 1. send update t1 set b=10+get_lock(concat("hello",a),10)*0 where a=2; - sleep 1; --echo ** connection thread1 connection thread1; + let $wait_condition= select count(*)= 1 from information_schema.processlist where state= 'User lock'; + --source include/wait_condition.inc --echo ** Insert new values to t1 from thread 1; this created an implicit --echo ** commit since there are no on-going transactions. insert into t1 values (1,1); --echo ** Release the ULL (thread 2 updates will finish). - select release_lock("hello2"); +# Due to Bug#32782 User lock hash fails to find lock, which probably also cause Bug#39484 (main.concurrent_innodb_safelog fails sporadically) the success of the following +# is also guaranteed for NULL. Replaced SELECT by DO (no result). + DO release_lock("hello2"); --echo ** ..but thread 1 will still see t1 as if nothing has happend: select * from t1; @@ -280,7 +295,9 @@ drop table t1; connection thread2; --echo ** Collect results from thread 2 and release the lock. reap; - select release_lock("hello2"); +# Due to Bug#32782 User lock hash fails to find lock, which probably also cause Bug#39484 (main.concurrent_innodb_safelog fails sporadically) the success of the following +# is also guaranteed for NULL. Replaced SELECT by DO (no result). + DO release_lock("hello2"); --echo ** The table should look like the original+updates for thread 2, --echo ** and consist of new rows: select * from t1; @@ -534,6 +551,9 @@ drop table t1; connection thread2; begin; send delete from t1 where tipo=2; +# The sleep has not been replaced as all tried wait conditions leaded to sporadically +# succeding update in the following thread. Also the used status variables '%lock%' and +# 'innodb_deleted_rows' and infos in processlist where not sucessful. sleep 1; --echo ** connection thread1 @@ -594,8 +614,11 @@ drop table t1; connection thread2; begin; send delete from t1 where tipo=2; +# The sleep has not been replaced as all tried wait conditions leaded to sporadically +# succeding update in the following thread. Also the used status variables '%lock%' and +# 'innodb_deleted_rows' and infos in processlist where not sucessful. sleep 1; - + --echo ** connection thread1 connection thread1; begin; diff --git a/mysql-test/include/ndb_backup.inc b/mysql-test/include/ndb_backup.inc index ea56d79cbba..5262f1231a2 100644 --- a/mysql-test/include/ndb_backup.inc +++ b/mysql-test/include/ndb_backup.inc @@ -3,27 +3,44 @@ # in test cases and can be reused. # ###################################################### -# Bug#41307: Tests using include/ndb_backup.inc won't work on Windows due to -# 'grep' call -# This test is disabled on Windows via the next line until the above bug is -# resolved ---source include/not_windows.inc - --exec $NDB_MGM --no-defaults --ndb-connectstring="$NDB_CONNECTSTRING" -e "start backup" >> $NDB_TOOLS_OUTPUT -# there is no neat way to find the backupid, this is a hack to find it... -let $dump_file= $MYSQLTEST_VARDIR/tmp/tmp.dat; ---exec $NDB_TOOLS_DIR/ndb_select_all --ndb-connectstring="$NDB_CONNECTSTRING" -d sys --delimiter=',' SYSTAB_0 | grep 520093696 > $dump_file - -CREATE TEMPORARY TABLE test.backup_info (id INT, backup_id INT) ENGINE = HEAP; - ---replace_result $dump_file DUMP_FILE -eval LOAD DATA INFILE '$dump_file' INTO TABLE test.backup_info FIELDS TERMINATED BY ','; +# To find the backupid, we must dump this data to a table, and SELECT +# what we want into an outfile. This could be accomplished with grep, but +# grep isn't Windows-portable + +--disable_query_log +# create a table to help us out +--disable_warnings # leave this on until done with the entire process +# cleanup +DROP TABLE IF EXISTS helper1; +CREATE TABLE helper1(c1 VARCHAR(20)); +# dump raw data to file +let $ndb_backup_file1= $MYSQLTEST_VARDIR/ndb_backup_tmp.dat; +let $ndb_backup_file2= $MYSQLTEST_VARDIR/tmp.dat; +--error 0,1 +--remove_file $ndb_backup_file1 +--exec $NDB_TOOLS_DIR/ndb_select_all --ndb-connectstring="$NDB_CONNECTSTRING" -d sys --delimiter=',' SYSTAB_0 > $ndb_backup_file1 +# load the table from the raw data file +eval LOAD DATA INFILE '$ndb_backup_file1' INTO TABLE helper1; +--remove_file $ndb_backup_file1 +# output what we need +eval SELECT * FROM helper1 WHERE c1 LIKE '%520093696%' +INTO OUTFILE '$ndb_backup_file2'; +# cleanup +DROP TABLE helper1; +--enable_warnings +--enable_query_log + +CREATE TEMPORARY TABLE IF NOT EXISTS test.backup_info +(id INT, backup_id INT) ENGINE = MEMORY; + +--replace_result $MYSQLTEST_VARDIR <MYSQLTEST_VARDIR> +eval LOAD DATA INFILE '$ndb_backup_file2' INTO TABLE test.backup_info FIELDS TERMINATED BY ','; +--remove_file $ndb_backup_file2 # Load backup id into environment variable let the_backup_id=`SELECT backup_id from test.backup_info`; -DROP TABLE test.backup_info; - -remove_file $dump_file; +DROP TABLE test.backup_info; diff --git a/mysql-test/r/concurrent_innodb_safelog.result b/mysql-test/r/concurrent_innodb_safelog.result index 92d274993d9..e6adaac1068 100644 --- a/mysql-test/r/concurrent_innodb_safelog.result +++ b/mysql-test/r/concurrent_innodb_safelog.result @@ -7,8 +7,6 @@ SELECT @@global.innodb_locks_unsafe_for_binlog; 0 # keep_locks == 1 GRANT USAGE ON test.* TO mysqltest@localhost; -DO release_lock("hello"); -DO release_lock("hello2"); drop table if exists t1; ** @@ -36,7 +34,7 @@ get_lock("hello",10) ** connection thread2 ** Start transaction for thread 2 begin; -** Update will cause a table scan and a new ULL will +** Update will cause a table scan and a new ULL will ** be created and blocked on the first row where tipo=11. update t1 set eta=1+get_lock("hello",10)*0 where tipo=11; ** connection thread1 @@ -51,9 +49,7 @@ update t1 set eta=2 where tipo=22; ERROR HY000: Lock wait timeout exceeded; try restarting transaction ** Release user level name lock from thread 1. This will cause the ULL ** on thread 2 to end its wait. -select release_lock("hello"); -release_lock("hello") -1 +DO release_lock("hello"); ** Table is now updated with a new eta on tipo=22 for thread 1. select * from t1; eta tipo c @@ -70,9 +66,7 @@ eta tipo c 90 11 kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk ** connection thread2 ** Release the lock and collect result from update on thread 2 -select release_lock("hello"); -release_lock("hello") -1 +DO release_lock("hello"); ** Table should have eta updates where tipo=11 but updates made by ** thread 1 shouldn't be visible yet. select * from t1; @@ -194,9 +188,7 @@ begin; update t1 set tipo=1 where tipo=2; ERROR HY000: Lock wait timeout exceeded; try restarting transaction ** Release ULL. This will release the next waiting ULL on thread 2. -select release_lock("hello"); -release_lock("hello") -1 +DO release_lock("hello"); ** The table should still be updated with updates for thread 1 only: select * from t1; eta tipo c @@ -213,9 +205,7 @@ eta tipo c 90 11 kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk ** connection thread2 ** Release the lock and collect result from thread 2: -select release_lock("hello"); -release_lock("hello") -1 +DO release_lock("hello"); ** Seen from thread 2 the table should have been updated on four ** places. select * from t1; @@ -319,9 +309,7 @@ update t1 set b=10+get_lock(concat("hello",a),10)*0 where a=2; ** commit since there are no on-going transactions. insert into t1 values (1,1); ** Release the ULL (thread 2 updates will finish). -select release_lock("hello2"); -release_lock("hello2") -1 +DO release_lock("hello2"); ** ..but thread 1 will still see t1 as if nothing has happend: select * from t1; a b @@ -332,9 +320,7 @@ a b 1 1 ** connection thread2 ** Collect results from thread 2 and release the lock. -select release_lock("hello2"); -release_lock("hello2") -1 +DO release_lock("hello2"); ** The table should look like the original+updates for thread 2, ** and consist of new rows: select * from t1; diff --git a/mysql-test/r/concurrent_innodb_unsafelog.result b/mysql-test/r/concurrent_innodb_unsafelog.result index 2a6c15d38c1..e9c53d4cfa0 100644 --- a/mysql-test/r/concurrent_innodb_unsafelog.result +++ b/mysql-test/r/concurrent_innodb_unsafelog.result @@ -7,8 +7,6 @@ SELECT @@global.innodb_locks_unsafe_for_binlog; 1 # keep_locks == 0 GRANT USAGE ON test.* TO mysqltest@localhost; -DO release_lock("hello"); -DO release_lock("hello2"); drop table if exists t1; ** @@ -36,7 +34,7 @@ get_lock("hello",10) ** connection thread2 ** Start transaction for thread 2 begin; -** Update will cause a table scan and a new ULL will +** Update will cause a table scan and a new ULL will ** be created and blocked on the first row where tipo=11. update t1 set eta=1+get_lock("hello",10)*0 where tipo=11; ** connection thread1 @@ -50,9 +48,7 @@ begin; update t1 set eta=2 where tipo=22; ** Release user level name lock from thread 1. This will cause the ULL ** on thread 2 to end its wait. -select release_lock("hello"); -release_lock("hello") -1 +DO release_lock("hello"); ** Table is now updated with a new eta on tipo=22 for thread 1. select * from t1; eta tipo c @@ -69,9 +65,7 @@ eta tipo c 90 11 kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk ** connection thread2 ** Release the lock and collect result from update on thread 2 -select release_lock("hello"); -release_lock("hello") -1 +DO release_lock("hello"); ** Table should have eta updates where tipo=11 but updates made by ** thread 1 shouldn't be visible yet. select * from t1; @@ -192,9 +186,7 @@ begin; ** do not match the WHERE condition are released. update t1 set tipo=1 where tipo=2; ** Release ULL. This will release the next waiting ULL on thread 2. -select release_lock("hello"); -release_lock("hello") -1 +DO release_lock("hello"); ** The table should still be updated with updates for thread 1 only: select * from t1; eta tipo c @@ -211,9 +203,7 @@ eta tipo c 90 11 kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk ** connection thread2 ** Release the lock and collect result from thread 2: -select release_lock("hello"); -release_lock("hello") -1 +DO release_lock("hello"); ** Seen from thread 2 the table should have been updated on four ** places. select * from t1; @@ -317,9 +307,7 @@ update t1 set b=10+get_lock(concat("hello",a),10)*0 where a=2; ** commit since there are no on-going transactions. insert into t1 values (1,1); ** Release the ULL (thread 2 updates will finish). -select release_lock("hello2"); -release_lock("hello2") -1 +DO release_lock("hello2"); ** ..but thread 1 will still see t1 as if nothing has happend: select * from t1; a b @@ -330,9 +318,7 @@ a b 1 1 ** connection thread2 ** Collect results from thread 2 and release the lock. -select release_lock("hello2"); -release_lock("hello2") -1 +DO release_lock("hello2"); ** The table should look like the original+updates for thread 2, ** and consist of new rows: select * from t1; diff --git a/mysql-test/r/create.result b/mysql-test/r/create.result index 057a8600ca2..bd11a8725ef 100644 --- a/mysql-test/r/create.result +++ b/mysql-test/r/create.result @@ -1731,7 +1731,7 @@ t1 CREATE TABLE `t1` ( `HOST` varchar(64) NOT NULL DEFAULT '', `DB` varchar(64) DEFAULT NULL, `COMMAND` varchar(16) NOT NULL DEFAULT '', - `TIME` bigint(7) NOT NULL DEFAULT '0', + `TIME` int(7) NOT NULL DEFAULT '0', `STATE` varchar(64) DEFAULT NULL, `INFO` longtext ) ENGINE=MyISAM DEFAULT CHARSET=utf8 @@ -1745,7 +1745,7 @@ t1 CREATE TEMPORARY TABLE `t1` ( `HOST` varchar(64) NOT NULL DEFAULT '', `DB` varchar(64) DEFAULT NULL, `COMMAND` varchar(16) NOT NULL DEFAULT '', - `TIME` bigint(7) NOT NULL DEFAULT '0', + `TIME` int(7) NOT NULL DEFAULT '0', `STATE` varchar(64) DEFAULT NULL, `INFO` longtext ) ENGINE=MyISAM DEFAULT CHARSET=utf8 diff --git a/mysql-test/r/information_schema.result b/mysql-test/r/information_schema.result index 5dd0f159428..9a75e478264 100644 --- a/mysql-test/r/information_schema.result +++ b/mysql-test/r/information_schema.result @@ -1720,4 +1720,9 @@ SELECT CREATE_OPTIONS FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME='t1'; CREATE_OPTIONS KEY_BLOCK_SIZE=1 DROP TABLE t1; +SET TIMESTAMP=@@TIMESTAMP + 10000000; +SELECT 'OK' AS TEST_RESULT FROM INFORMATION_SCHEMA.PROCESSLIST WHERE time < 0; +TEST_RESULT +OK +SET TIMESTAMP=DEFAULT; End of 5.1 tests. diff --git a/mysql-test/r/key_cache.result b/mysql-test/r/key_cache.result index 9ada5dc0784..08d8059f61b 100644 --- a/mysql-test/r/key_cache.result +++ b/mysql-test/r/key_cache.result @@ -276,8 +276,6 @@ Variable_name Value Key_blocks_unused KEY_BLOCKS_UNUSED set global keycache2.key_buffer_size=0; set global keycache3.key_buffer_size=100; -Warnings: -Warning 1292 Truncated incorrect key_buffer_size value: '100' set global keycache3.key_buffer_size=0; create table t1 (mytext text, FULLTEXT (mytext)); insert t1 values ('aaabbb'); diff --git a/mysql-test/r/mysqldump.result b/mysql-test/r/mysqldump.result index 45dd89f8078..1d02adf4504 100644 --- a/mysql-test/r/mysqldump.result +++ b/mysql-test/r/mysqldump.result @@ -3815,6 +3815,73 @@ DROP TABLE t1,t2; -- Dump completed on DATE +SET @@GLOBAL.CONCURRENT_INSERT = @OLD_CONCURRENT_INSERT; +# +# Bug #42635: mysqldump includes views that were excluded using +# the --ignore-table option +# +create database db42635; +use db42635; +create table t1 (id int); +create view db42635.v1 (c) as select * from db42635.t1; +create view db42635.v2 (c) as select * from db42635.t1; + +/*!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 */; +DROP TABLE IF EXISTS `t1`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `t1` ( + `id` int(11) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +LOCK TABLES `t1` WRITE; +/*!40000 ALTER TABLE `t1` DISABLE KEYS */; +/*!40000 ALTER TABLE `t1` ENABLE KEYS */; +UNLOCK TABLES; +DROP TABLE IF EXISTS `v2`; +/*!50001 DROP VIEW IF EXISTS `v2`*/; +SET @saved_cs_client = @@character_set_client; +SET character_set_client = utf8; +/*!50001 CREATE TABLE `v2` ( + `c` int(11) +) ENGINE=MyISAM */; +SET character_set_client = @saved_cs_client; +/*!50001 DROP TABLE `v2`*/; +/*!50001 DROP VIEW IF EXISTS `v2`*/; +/*!50001 SET @saved_cs_client = @@character_set_client */; +/*!50001 SET @saved_cs_results = @@character_set_results */; +/*!50001 SET @saved_col_connection = @@collation_connection */; +/*!50001 SET character_set_client = latin1 */; +/*!50001 SET character_set_results = latin1 */; +/*!50001 SET collation_connection = latin1_swedish_ci */; +/*!50001 CREATE ALGORITHM=UNDEFINED */ +/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50001 VIEW `v2` AS select `t1`.`id` AS `c` from `t1` */; +/*!50001 SET character_set_client = @saved_cs_client */; +/*!50001 SET character_set_results = @saved_cs_results */; +/*!50001 SET collation_connection = @saved_col_connection */; +/*!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 */; + +use test; +drop database db42635; # # Bug#33550 mysqldump 4.0 compatibility broken # diff --git a/mysql-test/r/select.result b/mysql-test/r/select.result index 621c11906cb..0771c7fb370 100644 --- a/mysql-test/r/select.result +++ b/mysql-test/r/select.result @@ -4416,4 +4416,32 @@ date_nokey Warnings: Warning 1292 Incorrect date value: '10:41:7' for column 'date_nokey' at row 1 DROP TABLE A,C; +CREATE TABLE t1 (a INT NOT NULL, b INT); +INSERT INTO t1 VALUES (1, 1); +EXPLAIN EXTENDED SELECT * FROM t1 WHERE (a=a AND a=a) OR b > 2; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 system NULL NULL NULL NULL 1 100.00 +Warnings: +Note 1003 select '1' AS `a`,'1' AS `b` from `test`.`t1` where 1 +SELECT * FROM t1 WHERE (a=a AND a=a) OR b > 2; +a b +1 1 +DROP TABLE t1; +CREATE TABLE t1 (a INT NOT NULL, b INT NOT NULL, c INT NOT NULL); +EXPLAIN EXTENDED SELECT * FROM t1 WHERE (a=a AND b=b AND c=c) OR b > 20; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 system NULL NULL NULL NULL 0 0.00 const row not found +Warnings: +Note 1003 select '0' AS `a`,'0' AS `b`,'0' AS `c` from `test`.`t1` where 1 +EXPLAIN EXTENDED SELECT * FROM t1 WHERE (a=a AND a=a AND b=b) OR b > 20; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 system NULL NULL NULL NULL 0 0.00 const row not found +Warnings: +Note 1003 select '0' AS `a`,'0' AS `b`,'0' AS `c` from `test`.`t1` where 1 +EXPLAIN EXTENDED SELECT * FROM t1 WHERE (a=a AND b=b AND a=a) OR b > 20; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 system NULL NULL NULL NULL 0 0.00 const row not found +Warnings: +Note 1003 select '0' AS `a`,'0' AS `b`,'0' AS `c` from `test`.`t1` where 1 +DROP TABLE t1; End of 5.1 tests diff --git a/mysql-test/r/variables.result b/mysql-test/r/variables.result index 80fa0c88b82..f27d0b9fdd5 100644 --- a/mysql-test/r/variables.result +++ b/mysql-test/r/variables.result @@ -27,6 +27,7 @@ set @my_slow_launch_time =@@global.slow_launch_time; set @my_storage_engine =@@global.storage_engine; set @my_thread_cache_size =@@global.thread_cache_size; set @my_max_allowed_packet =@@global.max_allowed_packet; +set @my_join_buffer_size =@@global.join_buffer_size; set @`test`=1; select @test, @`test`, @TEST, @`TEST`, @"teSt"; @test @`test` @TEST @`TEST` @"teSt" @@ -1018,6 +1019,11 @@ show variables like 'hostname'; Variable_name Value hostname # End of 5.0 tests +set join_buffer_size=1; +Warnings: +Warning 1292 Truncated incorrect join_buffer_size value: '1' +set @save_join_buffer_size=@@join_buffer_size; +set join_buffer_size=@save_join_buffer_size; set global binlog_cache_size =@my_binlog_cache_size; set global connect_timeout =@my_connect_timeout; set global delayed_insert_timeout =@my_delayed_insert_timeout; @@ -1048,6 +1054,7 @@ set global slow_launch_time =@my_slow_launch_time; set global storage_engine =@my_storage_engine; set global thread_cache_size =@my_thread_cache_size; set global max_allowed_packet =@my_max_allowed_packet; +set global join_buffer_size =@my_join_buffer_size; show global variables where Variable_name='table_definition_cache' or Variable_name='table_lock_wait_timeout'; Variable_name Value @@ -1421,6 +1428,12 @@ SELECT @@global.expire_logs_days; @@global.expire_logs_days 99 SET GLOBAL expire_logs_days = @old_eld; +SET GLOBAL auto_increment_offset=-1; +Warnings: +Warning 1292 Truncated incorrect auto_increment_offset value: '-1' +SET GLOBAL auto_increment_offset=0; +Warnings: +Warning 1292 Truncated incorrect auto_increment_offset value: '0' select @@storage_engine; Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr def @@storage_engine 253 6 6 N 1 31 8 @@ -1433,13 +1446,13 @@ SELECT @@GLOBAL.server_id; 4294967295 SET GLOBAL server_id = (1 << 32); Warnings: -Warning 1292 Truncated incorrect server-id value: '4294967296' +Warning 1292 Truncated incorrect server_id value: '4294967296' SELECT @@GLOBAL.server_id; @@GLOBAL.server_id 4294967295 SET GLOBAL server_id = (1 << 60); Warnings: -Warning 1292 Truncated incorrect server-id value: '1152921504606846976' +Warning 1292 Truncated incorrect server_id value: '1152921504606846976' SELECT @@GLOBAL.server_id; @@GLOBAL.server_id 4294967295 diff --git a/mysql-test/suite/binlog/r/binlog_auto_increment_bug33029.result b/mysql-test/suite/binlog/r/binlog_auto_increment_bug33029.result index 8df0568a755..8226469fcf7 100644 --- a/mysql-test/suite/binlog/r/binlog_auto_increment_bug33029.result +++ b/mysql-test/suite/binlog/r/binlog_auto_increment_bug33029.result @@ -38,4 +38,5 @@ DROP PROCEDURE IF EXISTS p2; DROP FUNCTION IF EXISTS f1; DROP TRIGGER IF EXISTS tr1; stop slave sql_thread; +reset slave; SET @@global.relay_log_purge= @old_relay_log_purge; diff --git a/mysql-test/suite/binlog/t/binlog_auto_increment_bug33029.test b/mysql-test/suite/binlog/t/binlog_auto_increment_bug33029.test index f20cc33f820..5297767675c 100644 --- a/mysql-test/suite/binlog/t/binlog_auto_increment_bug33029.test +++ b/mysql-test/suite/binlog/t/binlog_auto_increment_bug33029.test @@ -52,9 +52,10 @@ DROP FUNCTION IF EXISTS f1; DROP TRIGGER IF EXISTS tr1; enable_warnings; -remove_file $MYSQLD_DATADIR/slave-relay-bin.000001; -remove_file $MYSQLD_DATADIR/slave-relay-bin.index; stop slave sql_thread; +reset slave; source include/wait_for_slave_sql_to_stop.inc; +remove_file $MYSQLD_DATADIR/slave-relay-bin.000001; +remove_file $MYSQLD_DATADIR/slave-relay-bin.index; SET @@global.relay_log_purge= @old_relay_log_purge; diff --git a/mysql-test/suite/funcs_1/r/is_columns_mysql.result b/mysql-test/suite/funcs_1/r/is_columns_mysql.result index 9d1f316a9bf..2f1f61c0525 100644 --- a/mysql-test/suite/funcs_1/r/is_columns_mysql.result +++ b/mysql-test/suite/funcs_1/r/is_columns_mysql.result @@ -48,7 +48,7 @@ NULL mysql event last_executed 10 NULL YES datetime NULL NULL NULL NULL NULL NUL NULL mysql event modified 9 0000-00-00 00:00:00 NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references NULL mysql event name 2 NO char 64 192 NULL NULL utf8 utf8_general_ci char(64) PRI select,insert,update,references NULL mysql event on_completion 14 DROP NO enum 8 24 NULL NULL utf8 utf8_general_ci enum('DROP','PRESERVE') select,insert,update,references -NULL mysql event originator 17 NULL NO int NULL NULL 10 0 NULL NULL int(10) select,insert,update,references +NULL mysql event originator 17 NULL NO int NULL NULL 10 0 NULL NULL int(10) unsigned select,insert,update,references NULL mysql event sql_mode 15 NO set 478 1434 NULL NULL utf8 utf8_general_ci set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','NOT_USED','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH') select,insert,update,references NULL mysql event starts 11 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select,insert,update,references NULL mysql event status 13 ENABLED NO enum 18 54 NULL NULL utf8 utf8_general_ci enum('ENABLED','DISABLED','SLAVESIDE_DISABLED') select,insert,update,references @@ -60,7 +60,7 @@ NULL mysql func type 4 NULL NO enum 9 27 NULL NULL utf8 utf8_general_ci enum('fu NULL mysql general_log argument 6 NULL NO mediumtext 16777215 16777215 NULL NULL utf8 utf8_general_ci mediumtext select,insert,update,references NULL mysql general_log command_type 5 NULL NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references NULL mysql general_log event_time 1 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp on update CURRENT_TIMESTAMP select,insert,update,references -NULL mysql general_log server_id 4 NULL NO int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references +NULL mysql general_log server_id 4 NULL NO int NULL NULL 10 0 NULL NULL int(10) unsigned select,insert,update,references NULL mysql general_log thread_id 3 NULL NO int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references NULL mysql general_log user_host 2 NULL NO mediumtext 16777215 16777215 NULL NULL utf8 utf8_general_ci mediumtext select,insert,update,references NULL mysql help_category help_category_id 1 NULL NO smallint NULL NULL 5 0 NULL NULL smallint(5) unsigned PRI select,insert,update,references @@ -150,7 +150,7 @@ NULL mysql slow_log lock_time 4 NULL NO time NULL NULL NULL NULL NULL NULL time NULL mysql slow_log query_time 3 NULL NO time NULL NULL NULL NULL NULL NULL time select,insert,update,references NULL mysql slow_log rows_examined 6 NULL NO int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references NULL mysql slow_log rows_sent 5 NULL NO int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL mysql slow_log server_id 10 NULL NO int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references +NULL mysql slow_log server_id 10 NULL NO int NULL NULL 10 0 NULL NULL int(10) unsigned select,insert,update,references NULL mysql slow_log sql_text 11 NULL NO mediumtext 16777215 16777215 NULL NULL utf8 utf8_general_ci mediumtext select,insert,update,references NULL mysql slow_log start_time 1 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp on update CURRENT_TIMESTAMP select,insert,update,references NULL mysql slow_log user_host 2 NULL NO mediumtext 16777215 16777215 NULL NULL utf8 utf8_general_ci mediumtext select,insert,update,references @@ -329,7 +329,7 @@ NULL mysql event ends datetime NULL NULL NULL NULL datetime 3.0000 mysql event on_completion enum 8 24 utf8 utf8_general_ci enum('DROP','PRESERVE') 3.0000 mysql event sql_mode set 478 1434 utf8 utf8_general_ci set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','NOT_USED','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH') 3.0000 mysql event comment char 64 192 utf8 utf8_bin char(64) -NULL mysql event originator int NULL NULL NULL NULL int(10) +NULL mysql event originator int NULL NULL NULL NULL int(10) unsigned 1.0000 mysql event time_zone char 64 64 latin1 latin1_swedish_ci char(64) 3.0000 mysql event character_set_client char 32 96 utf8 utf8_bin char(32) 3.0000 mysql event collation_connection char 32 96 utf8 utf8_bin char(32) @@ -342,7 +342,7 @@ NULL mysql func ret tinyint NULL NULL NULL NULL tinyint(1) NULL mysql general_log event_time timestamp NULL NULL NULL NULL timestamp 1.0000 mysql general_log user_host mediumtext 16777215 16777215 utf8 utf8_general_ci mediumtext NULL mysql general_log thread_id int NULL NULL NULL NULL int(11) -NULL mysql general_log server_id int NULL NULL NULL NULL int(11) +NULL mysql general_log server_id int NULL NULL NULL NULL int(10) unsigned 3.0000 mysql general_log command_type varchar 64 192 utf8 utf8_general_ci varchar(64) 1.0000 mysql general_log argument mediumtext 16777215 16777215 utf8 utf8_general_ci mediumtext NULL mysql help_category help_category_id smallint NULL NULL NULL NULL smallint(5) unsigned @@ -434,7 +434,7 @@ NULL mysql slow_log rows_examined int NULL NULL NULL NULL int(11) 3.0000 mysql slow_log db varchar 512 1536 utf8 utf8_general_ci varchar(512) NULL mysql slow_log last_insert_id int NULL NULL NULL NULL int(11) NULL mysql slow_log insert_id int NULL NULL NULL NULL int(11) -NULL mysql slow_log server_id int NULL NULL NULL NULL int(11) +NULL mysql slow_log server_id int NULL NULL NULL NULL int(10) unsigned 1.0000 mysql slow_log sql_text mediumtext 16777215 16777215 utf8 utf8_general_ci mediumtext 3.0000 mysql tables_priv Host char 60 180 utf8 utf8_bin char(60) 3.0000 mysql tables_priv Db char 64 192 utf8 utf8_bin char(64) diff --git a/mysql-test/suite/ndb/r/ndb_restore.result b/mysql-test/suite/ndb/r/ndb_restore.result index 48c32bc14b6..f6b50a1dfdc 100644 --- a/mysql-test/suite/ndb/r/ndb_restore.result +++ b/mysql-test/suite/ndb/r/ndb_restore.result @@ -131,8 +131,9 @@ create table t9 engine=myisam as select * from t9_c; create table t10 engine=myisam as select * from t10_c; ForceVarPart: 0 ForceVarPart: 1 -CREATE TEMPORARY TABLE test.backup_info (id INT, backup_id INT) ENGINE = HEAP; -LOAD DATA INFILE 'DUMP_FILE' INTO TABLE test.backup_info FIELDS TERMINATED BY ','; +CREATE TEMPORARY TABLE IF NOT EXISTS test.backup_info +(id INT, backup_id INT) ENGINE = MEMORY; +LOAD DATA INFILE '<MYSQLTEST_VARDIR>/tmp.dat' INTO TABLE test.backup_info FIELDS TERMINATED BY ','; DROP TABLE test.backup_info; drop table t1_c,t2_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c,t10_c; ForceVarPart: 0 @@ -286,8 +287,9 @@ auto_increment 10001 ALTER TABLE t7_c PARTITION BY LINEAR KEY (`dardtestard`); -CREATE TEMPORARY TABLE test.backup_info (id INT, backup_id INT) ENGINE = HEAP; -LOAD DATA INFILE 'DUMP_FILE' INTO TABLE test.backup_info FIELDS TERMINATED BY ','; +CREATE TEMPORARY TABLE IF NOT EXISTS test.backup_info +(id INT, backup_id INT) ENGINE = MEMORY; +LOAD DATA INFILE '<MYSQLTEST_VARDIR>/tmp.dat' INTO TABLE test.backup_info FIELDS TERMINATED BY ','; DROP TABLE test.backup_info; drop table t1_c,t2_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c,t10_c; select count(*) from t1; @@ -490,8 +492,9 @@ select * from t9_c) a; count(*) 3 drop table t1_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c,t10_c; -CREATE TEMPORARY TABLE test.backup_info (id INT, backup_id INT) ENGINE = HEAP; -LOAD DATA INFILE 'DUMP_FILE' INTO TABLE test.backup_info FIELDS TERMINATED BY ','; +CREATE TEMPORARY TABLE IF NOT EXISTS test.backup_info +(id INT, backup_id INT) ENGINE = MEMORY; +LOAD DATA INFILE '<MYSQLTEST_VARDIR>/tmp.dat' INTO TABLE test.backup_info FIELDS TERMINATED BY ','; DROP TABLE test.backup_info; drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9,t10; drop table if exists t2_c; diff --git a/mysql-test/suite/ndb/r/ndb_restore_partition.result b/mysql-test/suite/ndb/r/ndb_restore_partition.result index 58a35437a2e..b984c76a91d 100644 --- a/mysql-test/suite/ndb/r/ndb_restore_partition.result +++ b/mysql-test/suite/ndb/r/ndb_restore_partition.result @@ -125,8 +125,9 @@ create table t6 engine=myisam as select * from t6_c; create table t7 engine=myisam as select * from t7_c; create table t8 engine=myisam as select * from t8_c; create table t9 engine=myisam as select * from t9_c; -CREATE TEMPORARY TABLE test.backup_info (id INT, backup_id INT) ENGINE = HEAP; -LOAD DATA INFILE 'DUMP_FILE' INTO TABLE test.backup_info FIELDS TERMINATED BY ','; +CREATE TEMPORARY TABLE IF NOT EXISTS test.backup_info +(id INT, backup_id INT) ENGINE = MEMORY; +LOAD DATA INFILE '<MYSQLTEST_VARDIR>/tmp.dat' INTO TABLE test.backup_info FIELDS TERMINATED BY ','; DROP TABLE test.backup_info; drop table t1_c,t2_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c; select count(*) from t1; @@ -244,8 +245,9 @@ PARTITION BY LINEAR HASH (`relatta`) PARTITIONS 4; ALTER TABLE t7_c PARTITION BY LINEAR KEY (`dardtestard`); -CREATE TEMPORARY TABLE test.backup_info (id INT, backup_id INT) ENGINE = HEAP; -LOAD DATA INFILE 'DUMP_FILE' INTO TABLE test.backup_info FIELDS TERMINATED BY ','; +CREATE TEMPORARY TABLE IF NOT EXISTS test.backup_info +(id INT, backup_id INT) ENGINE = MEMORY; +LOAD DATA INFILE '<MYSQLTEST_VARDIR>/tmp.dat' INTO TABLE test.backup_info FIELDS TERMINATED BY ','; DROP TABLE test.backup_info; drop table t1_c,t2_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c; select count(*) from t1; @@ -448,8 +450,9 @@ select * from t9_c) a; count(*) 3 drop table t1_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c; -CREATE TEMPORARY TABLE test.backup_info (id INT, backup_id INT) ENGINE = HEAP; -LOAD DATA INFILE 'DUMP_FILE' INTO TABLE test.backup_info FIELDS TERMINATED BY ','; +CREATE TEMPORARY TABLE IF NOT EXISTS test.backup_info +(id INT, backup_id INT) ENGINE = MEMORY; +LOAD DATA INFILE '<MYSQLTEST_VARDIR>/tmp.dat' INTO TABLE test.backup_info FIELDS TERMINATED BY ','; DROP TABLE test.backup_info; Create table test/def/t2_c failed: Translate frm error drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; diff --git a/mysql-test/suite/ndb/r/ndb_restore_print.result b/mysql-test/suite/ndb/r/ndb_restore_print.result index 7ff15652b3f..fa52513e7d0 100644 --- a/mysql-test/suite/ndb/r/ndb_restore_print.result +++ b/mysql-test/suite/ndb/r/ndb_restore_print.result @@ -227,8 +227,9 @@ hex(h3) NULL hex(i1) NULL hex(i2) NULL hex(i3) NULL -CREATE TEMPORARY TABLE test.backup_info (id INT, backup_id INT) ENGINE = HEAP; -LOAD DATA INFILE 'DUMP_FILE' INTO TABLE test.backup_info FIELDS TERMINATED BY ','; +CREATE TEMPORARY TABLE IF NOT EXISTS test.backup_info +(id INT, backup_id INT) ENGINE = MEMORY; +LOAD DATA INFILE '<MYSQLTEST_VARDIR>/tmp.dat' INTO TABLE test.backup_info FIELDS TERMINATED BY ','; DROP TABLE test.backup_info; 1;0x1;0x17;0x789A;0x789ABCDE;0xFEDC0001;127;255;32767;65535;2147483647;4294967295;9223372036854775807;18446744073709551615;1;12345678901234567890123456789012;123456789;1;12345678901234567890123456789012;123456789;0x12;0x123456789ABCDEF0;0x012345;0x12;0x123456789ABCDEF0;0x00123450 2;0x0;0x0;0x0;0x0;0x0;-128;0;-32768;0;-2147483648;0;-9223372036854775808;0;;;;;;;0x0;0x0;0x0;0x0;0x0;0x0 @@ -257,8 +258,9 @@ create table t4 (pk int key, a int) engine ndb; insert into t2 values (1,11),(2,12),(3,13),(4,14),(5,15); insert into t3 values (1,21),(2,22),(3,23),(4,24),(5,25); insert into t4 values (1,31),(2,32),(3,33),(4,34),(5,35); -CREATE TEMPORARY TABLE test.backup_info (id INT, backup_id INT) ENGINE = HEAP; -LOAD DATA INFILE 'DUMP_FILE' INTO TABLE test.backup_info FIELDS TERMINATED BY ','; +CREATE TEMPORARY TABLE IF NOT EXISTS test.backup_info +(id INT, backup_id INT) ENGINE = MEMORY; +LOAD DATA INFILE '<MYSQLTEST_VARDIR>/tmp.dat' INTO TABLE test.backup_info FIELDS TERMINATED BY ','; DROP TABLE test.backup_info; '1' '1' '12345678901234567890123456789012' '123456789' '1' '12345678901234567890123456789012' '123456789' '0x20' '0x123456789ABCDEF020' '0x012345000020' '0x1200000020' '0x123456789ABCDEF000000020' '0x00123450000020' @@ -297,8 +299,9 @@ create table t1 insert into t1 values(1, 8388607, 16777215); insert into t1 values(2, -8388608, 0); insert into t1 values(3, -1, 1); -CREATE TEMPORARY TABLE test.backup_info (id INT, backup_id INT) ENGINE = HEAP; -LOAD DATA INFILE 'DUMP_FILE' INTO TABLE test.backup_info FIELDS TERMINATED BY ','; +CREATE TEMPORARY TABLE IF NOT EXISTS test.backup_info +(id INT, backup_id INT) ENGINE = MEMORY; +LOAD DATA INFILE '<MYSQLTEST_VARDIR>/tmp.dat' INTO TABLE test.backup_info FIELDS TERMINATED BY ','; DROP TABLE test.backup_info; 1;8388607;16777215 2;-8388608;0 diff --git a/mysql-test/suite/ndb_team/r/ndb_dd_backuprestore.result b/mysql-test/suite/ndb_team/r/ndb_dd_backuprestore.result index 102a96a15f4..12a65a433a3 100644 --- a/mysql-test/suite/ndb_team/r/ndb_dd_backuprestore.result +++ b/mysql-test/suite/ndb_team/r/ndb_dd_backuprestore.result @@ -27,8 +27,9 @@ pk1 c2 c3 hex(c4) 3 Sweden 498 1 4 Sweden 497 1 5 Sweden 496 1 -CREATE TEMPORARY TABLE test.backup_info (id INT, backup_id INT) ENGINE = HEAP; -LOAD DATA INFILE 'DUMP_FILE' INTO TABLE test.backup_info FIELDS TERMINATED BY ','; +CREATE TEMPORARY TABLE IF NOT EXISTS test.backup_info +(id INT, backup_id INT) ENGINE = MEMORY; +LOAD DATA INFILE '<MYSQLTEST_VARDIR>/tmp.dat' INTO TABLE test.backup_info FIELDS TERMINATED BY ','; DROP TABLE test.backup_info; DROP TABLE test.t1; ALTER TABLESPACE table_space1 @@ -91,8 +92,9 @@ LENGTH(data) SELECT LENGTH(data) FROM test.t4 WHERE c1 = 2; LENGTH(data) 16384 -CREATE TEMPORARY TABLE test.backup_info (id INT, backup_id INT) ENGINE = HEAP; -LOAD DATA INFILE 'DUMP_FILE' INTO TABLE test.backup_info FIELDS TERMINATED BY ','; +CREATE TEMPORARY TABLE IF NOT EXISTS test.backup_info +(id INT, backup_id INT) ENGINE = MEMORY; +LOAD DATA INFILE '<MYSQLTEST_VARDIR>/tmp.dat' INTO TABLE test.backup_info FIELDS TERMINATED BY ','; DROP TABLE test.backup_info; DROP TABLE test.t1; DROP TABLE test.t2; @@ -317,8 +319,9 @@ pk1 c2 c3 hex(c4) 248 TEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXAS, ITALY, Kyle, JO, JBM,TU 4 1 247 TEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXAS, ITALY, Kyle, JO, JBM,TU 6 1 246 TEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXAS, ITALY, Kyle, JO, JBM,TU 8 1 -CREATE TEMPORARY TABLE test.backup_info (id INT, backup_id INT) ENGINE = HEAP; -LOAD DATA INFILE 'DUMP_FILE' INTO TABLE test.backup_info FIELDS TERMINATED BY ','; +CREATE TEMPORARY TABLE IF NOT EXISTS test.backup_info +(id INT, backup_id INT) ENGINE = MEMORY; +LOAD DATA INFILE '<MYSQLTEST_VARDIR>/tmp.dat' INTO TABLE test.backup_info FIELDS TERMINATED BY ','; DROP TABLE test.backup_info; DROP TABLE test.t1; DROP TABLE test.t2; diff --git a/mysql-test/suite/parts/r/ndb_dd_backuprestore.result b/mysql-test/suite/parts/r/ndb_dd_backuprestore.result index 102a96a15f4..12a65a433a3 100644 --- a/mysql-test/suite/parts/r/ndb_dd_backuprestore.result +++ b/mysql-test/suite/parts/r/ndb_dd_backuprestore.result @@ -27,8 +27,9 @@ pk1 c2 c3 hex(c4) 3 Sweden 498 1 4 Sweden 497 1 5 Sweden 496 1 -CREATE TEMPORARY TABLE test.backup_info (id INT, backup_id INT) ENGINE = HEAP; -LOAD DATA INFILE 'DUMP_FILE' INTO TABLE test.backup_info FIELDS TERMINATED BY ','; +CREATE TEMPORARY TABLE IF NOT EXISTS test.backup_info +(id INT, backup_id INT) ENGINE = MEMORY; +LOAD DATA INFILE '<MYSQLTEST_VARDIR>/tmp.dat' INTO TABLE test.backup_info FIELDS TERMINATED BY ','; DROP TABLE test.backup_info; DROP TABLE test.t1; ALTER TABLESPACE table_space1 @@ -91,8 +92,9 @@ LENGTH(data) SELECT LENGTH(data) FROM test.t4 WHERE c1 = 2; LENGTH(data) 16384 -CREATE TEMPORARY TABLE test.backup_info (id INT, backup_id INT) ENGINE = HEAP; -LOAD DATA INFILE 'DUMP_FILE' INTO TABLE test.backup_info FIELDS TERMINATED BY ','; +CREATE TEMPORARY TABLE IF NOT EXISTS test.backup_info +(id INT, backup_id INT) ENGINE = MEMORY; +LOAD DATA INFILE '<MYSQLTEST_VARDIR>/tmp.dat' INTO TABLE test.backup_info FIELDS TERMINATED BY ','; DROP TABLE test.backup_info; DROP TABLE test.t1; DROP TABLE test.t2; @@ -317,8 +319,9 @@ pk1 c2 c3 hex(c4) 248 TEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXAS, ITALY, Kyle, JO, JBM,TU 4 1 247 TEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXAS, ITALY, Kyle, JO, JBM,TU 6 1 246 TEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXASTEXAS, ITALY, Kyle, JO, JBM,TU 8 1 -CREATE TEMPORARY TABLE test.backup_info (id INT, backup_id INT) ENGINE = HEAP; -LOAD DATA INFILE 'DUMP_FILE' INTO TABLE test.backup_info FIELDS TERMINATED BY ','; +CREATE TEMPORARY TABLE IF NOT EXISTS test.backup_info +(id INT, backup_id INT) ENGINE = MEMORY; +LOAD DATA INFILE '<MYSQLTEST_VARDIR>/tmp.dat' INTO TABLE test.backup_info FIELDS TERMINATED BY ','; DROP TABLE test.backup_info; DROP TABLE test.t1; DROP TABLE test.t2; diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_sync.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_sync.result index c788893e055..3ef5e2b7e53 100644 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_sync.result +++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_sync.result @@ -25,8 +25,9 @@ hex(c2) hex(c3) c1 0 1 BCDEF 1 0 CD 0 0 DEFGHIJKL -CREATE TEMPORARY TABLE test.backup_info (id INT, backup_id INT) ENGINE = HEAP; -LOAD DATA INFILE 'DUMP_FILE' INTO TABLE test.backup_info FIELDS TERMINATED BY ','; +CREATE TEMPORARY TABLE IF NOT EXISTS test.backup_info +(id INT, backup_id INT) ENGINE = MEMORY; +LOAD DATA INFILE '<MYSQLTEST_VARDIR>/tmp.dat' INTO TABLE test.backup_info FIELDS TERMINATED BY ','; DROP TABLE test.backup_info; UPDATE t1 SET c2=0 WHERE c3="row2"; SELECT hex(c1),hex(c2),c3 FROM t1 ORDER BY c3; diff --git a/mysql-test/suite/sys_vars/r/auto_increment_increment_basic.result b/mysql-test/suite/sys_vars/r/auto_increment_increment_basic.result index 75f76a60b33..3cfdc54457b 100644 --- a/mysql-test/suite/sys_vars/r/auto_increment_increment_basic.result +++ b/mysql-test/suite/sys_vars/r/auto_increment_increment_basic.result @@ -55,7 +55,7 @@ SELECT @@session.auto_increment_increment; '#------------------FN_DYNVARS_001_05-----------------------#' SET @@global.auto_increment_increment = 0; Warnings: -Warning 1292 Truncated incorrect auto-increment-increment value: '0' +Warning 1292 Truncated incorrect auto_increment_increment value: '0' SELECT @@global.auto_increment_increment; @@global.auto_increment_increment 1 @@ -83,7 +83,7 @@ SELECT @@global.auto_increment_increment; 65535 SET @@session.auto_increment_increment = 0; Warnings: -Warning 1292 Truncated incorrect auto-increment-increment value: '0' +Warning 1292 Truncated incorrect auto_increment_increment value: '0' SELECT @@session.auto_increment_increment; @@session.auto_increment_increment 1 @@ -126,7 +126,7 @@ SELECT @@global.auto_increment_increment; 1 SET @@global.auto_increment_increment = FALSE; Warnings: -Warning 1292 Truncated incorrect auto-increment-increment value: '0' +Warning 1292 Truncated incorrect auto_increment_increment value: '0' SELECT @@global.auto_increment_increment; @@global.auto_increment_increment 1 diff --git a/mysql-test/suite/sys_vars/r/auto_increment_offset_basic.result b/mysql-test/suite/sys_vars/r/auto_increment_offset_basic.result index f91037cb7cf..7752851cb4c 100644 --- a/mysql-test/suite/sys_vars/r/auto_increment_offset_basic.result +++ b/mysql-test/suite/sys_vars/r/auto_increment_offset_basic.result @@ -55,7 +55,7 @@ SELECT @@session.auto_increment_offset; '#------------------FN_DYNVARS_002_05-----------------------#' SET @@global.auto_increment_offset = 0; Warnings: -Warning 1292 Truncated incorrect auto-increment-offset value: '0' +Warning 1292 Truncated incorrect auto_increment_offset value: '0' SELECT @@global.auto_increment_offset; @@global.auto_increment_offset 1 @@ -88,7 +88,7 @@ SELECT @@global.auto_increment_offset; 65535 SET @@session.auto_increment_offset = 0; Warnings: -Warning 1292 Truncated incorrect auto-increment-offset value: '0' +Warning 1292 Truncated incorrect auto_increment_offset value: '0' SELECT @@session.auto_increment_offset; @@session.auto_increment_offset 1 @@ -139,7 +139,7 @@ SELECT @@global.auto_increment_offset; 1 SET @@global.auto_increment_offset = FALSE; Warnings: -Warning 1292 Truncated incorrect auto-increment-offset value: '0' +Warning 1292 Truncated incorrect auto_increment_offset value: '0' SELECT @@global.auto_increment_offset; @@global.auto_increment_offset 1 diff --git a/mysql-test/suite/sys_vars/r/concurrent_insert_basic.result b/mysql-test/suite/sys_vars/r/concurrent_insert_basic.result index 2c7fc4296dd..1ea9c37c2a1 100644 --- a/mysql-test/suite/sys_vars/r/concurrent_insert_basic.result +++ b/mysql-test/suite/sys_vars/r/concurrent_insert_basic.result @@ -35,7 +35,7 @@ Select @@global.concurrent_insert; 0 SET @@global.concurrent_insert = 100; Warnings: -Warning 1292 Truncated incorrect concurrent-insert value: '100' +Warning 1292 Truncated incorrect concurrent_insert value: '100' Select @@global.concurrent_insert; @@global.concurrent_insert 2 diff --git a/mysql-test/suite/sys_vars/r/rpl_recovery_rank_basic_32.result b/mysql-test/suite/sys_vars/r/rpl_recovery_rank_basic_32.result index d4dd46eba71..2f0c9beea9c 100644 --- a/mysql-test/suite/sys_vars/r/rpl_recovery_rank_basic_32.result +++ b/mysql-test/suite/sys_vars/r/rpl_recovery_rank_basic_32.result @@ -23,13 +23,13 @@ SELECT @@global.rpl_recovery_rank; 123456789 SET @@global.rpl_recovery_rank = 2147483648*2; Warnings: -Warning 1292 Truncated incorrect rpl-recovery-rank value: '4294967296' +Warning 1292 Truncated incorrect rpl_recovery_rank value: '4294967296' SELECT @@global.rpl_recovery_rank; @@global.rpl_recovery_rank 4294967295 SET @@global.rpl_recovery_rank = 2147483648*1024; Warnings: -Warning 1292 Truncated incorrect rpl-recovery-rank value: '2199023255552' +Warning 1292 Truncated incorrect rpl_recovery_rank value: '2199023255552' SELECT @@global.rpl_recovery_rank; @@global.rpl_recovery_rank 4294967295 @@ -38,7 +38,7 @@ SELECT @@global.rpl_recovery_rank; 4294967295 SET @@global.rpl_recovery_rank = 2147483648*2147483648; Warnings: -Warning 1292 Truncated incorrect rpl-recovery-rank value: '4611686018427387904' +Warning 1292 Truncated incorrect rpl_recovery_rank value: '4611686018427387904' SELECT @@global.rpl_recovery_rank; @@global.rpl_recovery_rank 4294967295 diff --git a/mysql-test/suite/sys_vars/r/server_id_basic_32.result b/mysql-test/suite/sys_vars/r/server_id_basic_32.result index 6f801fc627b..b1e74736a10 100644 --- a/mysql-test/suite/sys_vars/r/server_id_basic_32.result +++ b/mysql-test/suite/sys_vars/r/server_id_basic_32.result @@ -61,7 +61,7 @@ SELECT @@global.server_id; 0 SET @@global.server_id = 2147483649*2; Warnings: -Warning 1292 Truncated incorrect server-id value: '4294967298' +Warning 1292 Truncated incorrect server_id value: '4294967298' SELECT @@global.server_id; @@global.server_id 4294967295 diff --git a/mysql-test/suite/sys_vars/r/server_id_basic_64.result b/mysql-test/suite/sys_vars/r/server_id_basic_64.result index 6f801fc627b..12d49248f54 100644 --- a/mysql-test/suite/sys_vars/r/server_id_basic_64.result +++ b/mysql-test/suite/sys_vars/r/server_id_basic_64.result @@ -52,16 +52,20 @@ SET @@local.server_id = 4; ERROR HY000: Variable 'server_id' is a GLOBAL variable and should be set with SET GLOBAL '#------------------FN_DYNVARS_144_05-----------------------#' SET @@global.server_id = -1; +Warnings: +Warning 1292 Truncated incorrect server_id value: '-1' SELECT @@global.server_id; @@global.server_id 0 SET @@global.server_id = -2147483648; +Warnings: +Warning 1292 Truncated incorrect server_id value: '-2147483648' SELECT @@global.server_id; @@global.server_id 0 SET @@global.server_id = 2147483649*2; Warnings: -Warning 1292 Truncated incorrect server-id value: '4294967298' +Warning 1292 Truncated incorrect server_id value: '4294967298' SELECT @@global.server_id; @@global.server_id 4294967295 diff --git a/mysql-test/t/information_schema.test b/mysql-test/t/information_schema.test index ef6e3eaca12..392d1062492 100644 --- a/mysql-test/t/information_schema.test +++ b/mysql-test/t/information_schema.test @@ -1410,6 +1410,15 @@ CREATE TABLE t1(a INT) KEY_BLOCK_SIZE=1; SELECT CREATE_OPTIONS FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME='t1'; DROP TABLE t1; +# +# Bug #22047: Time in SHOW PROCESSLIST for SQL thread in replication seems +# to become negative +# + +SET TIMESTAMP=@@TIMESTAMP + 10000000; +SELECT 'OK' AS TEST_RESULT FROM INFORMATION_SCHEMA.PROCESSLIST WHERE time < 0; +SET TIMESTAMP=DEFAULT; + --echo End of 5.1 tests. # Wait till all disconnects are completed diff --git a/mysql-test/t/mysqldump.test b/mysql-test/t/mysqldump.test index 224152d20d0..51becb01fff 100644 --- a/mysql-test/t/mysqldump.test +++ b/mysql-test/t/mysqldump.test @@ -1647,6 +1647,22 @@ DROP TABLE t1,t2; --replace_regex /-- [^D][^u][^m][^p].*// /\/\*!.*// / on [0-9 :-]+/ on DATE/ --exec $MYSQL_DUMP test +# We reset concurrent_inserts value to whatever it was at the start of the test +SET @@GLOBAL.CONCURRENT_INSERT = @OLD_CONCURRENT_INSERT; + +--echo # +--echo # Bug #42635: mysqldump includes views that were excluded using +--echo # the --ignore-table option +--echo # + +create database db42635; +use db42635; +create table t1 (id int); +create view db42635.v1 (c) as select * from db42635.t1; +create view db42635.v2 (c) as select * from db42635.t1; +--exec $MYSQL_DUMP --skip-comments --ignore-table=db42635.v1 db42635 +use test; +drop database db42635; --echo # --echo # Bug#33550 mysqldump 4.0 compatibility broken diff --git a/mysql-test/t/select.test b/mysql-test/t/select.test index ccdb53ec11f..8981ddbe2e4 100644 --- a/mysql-test/t/select.test +++ b/mysql-test/t/select.test @@ -3769,4 +3769,20 @@ SELECT date_nokey FROM C DROP TABLE A,C; +# +# Bug #42957: no results from +# select where .. (col=col and col=col) or ... (false expression) +# +CREATE TABLE t1 (a INT NOT NULL, b INT); +INSERT INTO t1 VALUES (1, 1); +EXPLAIN EXTENDED SELECT * FROM t1 WHERE (a=a AND a=a) OR b > 2; +SELECT * FROM t1 WHERE (a=a AND a=a) OR b > 2; +DROP TABLE t1; + +CREATE TABLE t1 (a INT NOT NULL, b INT NOT NULL, c INT NOT NULL); +EXPLAIN EXTENDED SELECT * FROM t1 WHERE (a=a AND b=b AND c=c) OR b > 20; +EXPLAIN EXTENDED SELECT * FROM t1 WHERE (a=a AND a=a AND b=b) OR b > 20; +EXPLAIN EXTENDED SELECT * FROM t1 WHERE (a=a AND b=b AND a=a) OR b > 20; +DROP TABLE t1; + --echo End of 5.1 tests diff --git a/mysql-test/t/variables.test b/mysql-test/t/variables.test index 7865a9d7b8e..6da20409639 100644 --- a/mysql-test/t/variables.test +++ b/mysql-test/t/variables.test @@ -36,6 +36,7 @@ set @my_slow_launch_time =@@global.slow_launch_time; set @my_storage_engine =@@global.storage_engine; set @my_thread_cache_size =@@global.thread_cache_size; set @my_max_allowed_packet =@@global.max_allowed_packet; +set @my_join_buffer_size =@@global.join_buffer_size; # case insensitivity tests (new in 5.0) set @`test`=1; select @test, @`test`, @TEST, @`TEST`, @"teSt"; @@ -780,6 +781,18 @@ show variables like 'hostname'; --echo End of 5.0 tests +# +# Bug#36446: Attempt to set @@join_buffer_size to its minimum value +# produces spurious warning +# + +# set to 1 so mysqld will correct to minimum (+ warn) +set join_buffer_size=1; +# save minimum +set @save_join_buffer_size=@@join_buffer_size; +# set minimum +set join_buffer_size=@save_join_buffer_size; + # This is at the very after the versioned tests, since it involves doing # cleanup # @@ -816,6 +829,8 @@ set global slow_launch_time =@my_slow_launch_time; set global storage_engine =@my_storage_engine; set global thread_cache_size =@my_thread_cache_size; set global max_allowed_packet =@my_max_allowed_packet; +set global join_buffer_size =@my_join_buffer_size; + # # Bug#28580 Repeatation of status variables # @@ -1155,6 +1170,11 @@ SELECT @@global.expire_logs_days; # cleanup SET GLOBAL expire_logs_days = @old_eld; +# show that warning uses underscore (sysvar-name), not hyphens (option-name) +SET GLOBAL auto_increment_offset=-1; +SET GLOBAL auto_increment_offset=0; + + # # Bug#41030 Wrong meta data (incorrect fieldlen) |