From 4819f65a8b1751f126c8ef79d8cfced5ada8f50f Mon Sep 17 00:00:00 2001 From: Aleksandr Kuzminsky Date: Wed, 4 Nov 2009 12:11:12 -0800 Subject: Sync with rev. 114 --- mysql-test/innodb-index.result | 1 + mysql-test/innodb-index.test | 2 ++ mysql-test/innodb_file_format.result | 4 +--- mysql-test/innodb_file_format.test | 16 +++++++++++++--- mysql-test/innodb_xtradb_bug317074.result | 1 - mysql-test/innodb_xtradb_bug317074.test | 4 ++-- mysql-test/patches/disabled.def.diff | 11 +++++------ mysql-test/patches/innodb_bug46000.diff | 26 ++++++++++++++++++++++++++ 8 files changed, 50 insertions(+), 15 deletions(-) create mode 100644 mysql-test/patches/innodb_bug46000.diff (limited to 'mysql-test') diff --git a/mysql-test/innodb-index.result b/mysql-test/innodb-index.result index 8772d8354e6..f2c90c54df8 100644 --- a/mysql-test/innodb-index.result +++ b/mysql-test/innodb-index.result @@ -1125,6 +1125,7 @@ t2 CREATE TABLE `t2` ( ) ENGINE=InnoDB DEFAULT CHARSET=latin1 DROP TABLE t2; DROP TABLE t1; +call mtr.add_suppression("InnoDB: insufficient history for index"); CREATE TABLE t1 (a INT, b CHAR(1)) ENGINE=InnoDB; INSERT INTO t1 VALUES (3,'a'),(3,'b'),(1,'c'),(0,'d'),(1,'e'); BEGIN; diff --git a/mysql-test/innodb-index.test b/mysql-test/innodb-index.test index 59f1e5d3d2b..1ec1a503c63 100644 --- a/mysql-test/innodb-index.test +++ b/mysql-test/innodb-index.test @@ -499,6 +499,8 @@ SHOW CREATE TABLE t2; DROP TABLE t2; DROP TABLE t1; +call mtr.add_suppression("InnoDB: insufficient history for index"); + connect (a,localhost,root,,); connect (b,localhost,root,,); connection a; diff --git a/mysql-test/innodb_file_format.result b/mysql-test/innodb_file_format.result index 45285542936..fbc67ada1bb 100644 --- a/mysql-test/innodb_file_format.result +++ b/mysql-test/innodb_file_format.result @@ -1,4 +1,4 @@ -set @old_innodb_file_format=@@innodb_file_format; +call mtr.add_suppression("InnoDB: invalid innodb_file_format_check value"); select @@innodb_file_format; @@innodb_file_format Antelope @@ -43,5 +43,3 @@ ERROR HY000: Incorrect arguments to SET select @@innodb_file_format_check; @@innodb_file_format_check Barracuda -set global innodb_file_format=@old_innodb_file_format; -set global innodb_file_format_check=Antelope; diff --git a/mysql-test/innodb_file_format.test b/mysql-test/innodb_file_format.test index 62f8468a818..3bd1dd2fa6f 100644 --- a/mysql-test/innodb_file_format.test +++ b/mysql-test/innodb_file_format.test @@ -1,5 +1,9 @@ -- source include/have_innodb.inc -set @old_innodb_file_format=@@innodb_file_format; + +call mtr.add_suppression("InnoDB: invalid innodb_file_format_check value"); + +let $format=`select @@innodb_file_format`; +let $innodb_file_format_check_orig=`select @@innodb_file_format_check`; select @@innodb_file_format; select @@innodb_file_format_check; @@ -28,5 +32,11 @@ set global innodb_file_format=on; set global innodb_file_format=off; select @@innodb_file_format_check; -set global innodb_file_format=@old_innodb_file_format; -set global innodb_file_format_check=Antelope; +# +# 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_format_check=$innodb_file_format_check_orig; +-- enable_query_log diff --git a/mysql-test/innodb_xtradb_bug317074.result b/mysql-test/innodb_xtradb_bug317074.result index 52c758a5eed..82a98844652 100644 --- a/mysql-test/innodb_xtradb_bug317074.result +++ b/mysql-test/innodb_xtradb_bug317074.result @@ -1,5 +1,4 @@ SET @old_innodb_file_format=@@innodb_file_format; SET @old_innodb_file_per_table=@@innodb_file_per_table; -SET @old_innodb_file_format_check=@@innodb_file_format_check; SET GLOBAL innodb_file_format='Barracuda'; SET GLOBAL innodb_file_per_table=ON; diff --git a/mysql-test/innodb_xtradb_bug317074.test b/mysql-test/innodb_xtradb_bug317074.test index a15d64d6bb5..757ac87bf18 100644 --- a/mysql-test/innodb_xtradb_bug317074.test +++ b/mysql-test/innodb_xtradb_bug317074.test @@ -2,7 +2,7 @@ SET @old_innodb_file_format=@@innodb_file_format; SET @old_innodb_file_per_table=@@innodb_file_per_table; -SET @old_innodb_file_format_check=@@innodb_file_format_check; +let $innodb_file_format_check_orig=`select @@innodb_file_format_check`; SET GLOBAL innodb_file_format='Barracuda'; SET GLOBAL innodb_file_per_table=ON; @@ -41,4 +41,4 @@ ALTER TABLE test1 ENGINE=MyISAM; DROP TABLE test1; SET GLOBAL innodb_file_format=@old_innodb_file_format; SET GLOBAL innodb_file_per_table=@old_innodb_file_per_table; -SET GLOBAL innodb_file_format_check=@old_innodb_file_format_check; +eval set global innodb_file_format_check=$innodb_file_format_check_orig; diff --git a/mysql-test/patches/disabled.def.diff b/mysql-test/patches/disabled.def.diff index e2e20cd000a..b8b3ed2d02d 100644 --- a/mysql-test/patches/disabled.def.diff +++ b/mysql-test/patches/disabled.def.diff @@ -1,9 +1,8 @@ ---- mysql-test/t/disabled.def.orig 2009-09-21 20:12:29.000000000 +0000 -+++ mysql-test/t/disabled.def 2009-09-21 20:20:16.000000000 +0000 -@@ -13,4 +13,6 @@ - innodb_bug39438 : Bug#42383 2009-01-28 lsoares "This fails in embedded and on windows. Note that this test is not run on windows and on embedded in PB for main trees currently" +--- mysql-test/t/disabled.def.orig 2009-10-25 05:54:05.000000000 +0000 ++++ mysql-test/t/disabled.def 2009-10-25 05:54:25.000000000 +0000 +@@ -14,3 +14,5 @@ query_cache_28249 : Bug#43861 2009-03-25 main.query_cache_28249 fails sporadically - init_connect : Bug#44920 2009-07-06 pcrews MTR not processing master.opt input properly on Windows. *Must be done this way due to the nature of the bug* + partition_innodb_builtin : Bug#32430 2009-09-25 mattiasj Waiting for push of Innodb changes + partition_innodb_plugin : Bug#32430 2009-09-25 mattiasj Waiting for push of Innodb changes +read_many_rows_innodb : Bug#433409 2009-09-20 the test fails on 5.1.37 https://bugs.launchpad.net/bugs/433409 +innodb-zip : Bug#47495 2009-09-21 the test fails on ubuntu - diff --git a/mysql-test/patches/innodb_bug46000.diff b/mysql-test/patches/innodb_bug46000.diff new file mode 100644 index 00000000000..d57cbde387e --- /dev/null +++ b/mysql-test/patches/innodb_bug46000.diff @@ -0,0 +1,26 @@ +--- mysql-test/r/innodb_bug46000.result.orig 2009-10-07 03:21:43.000000000 +0900 ++++ mysql-test/r/innodb_bug46000.result 2009-10-28 14:08:55.000000000 +0900 +@@ -8,10 +8,10 @@ + Error 1005 Can't create table 'test.bug46000' (errno: -1) + create table bug46000(id int) engine=innodb; + create index GEN_CLUST_INDEX on bug46000(id); +-ERROR HY000: Can't create table '#sql-temporary' (errno: -1) ++ERROR HY000: Got error 1005 from storage engine + show errors; + Level Code Message + Error 1005 Cannot Create Index with name 'GEN_CLUST_INDEX'. The name is reserved for the system default primary index. +-Error 1005 Can't create table '#sql-temporary' (errno: -1) ++Error 1030 Got error 1005 from storage engine + create index idx on bug46000(id); + drop table bug46000; +--- mysql-test/t/innodb_bug46000.test.orig 2009-10-07 03:21:12.000000000 +0900 ++++ mysql-test/t/innodb_bug46000.test 2009-10-28 14:08:37.000000000 +0900 +@@ -20,7 +20,7 @@ + + # This 'create index' operation should fail. + --replace_regex /'[^']*test.#sql-[0-9a-f_]*'/'#sql-temporary'/ +---error ER_CANT_CREATE_TABLE ++--error ER_GET_ERRNO + create index GEN_CLUST_INDEX on bug46000(id); + + --replace_regex /'[^']*test.#sql-[0-9a-f_]*'/'#sql-temporary'/ -- cgit v1.2.1 From b97dacce925fd8c3565846768555f76b4a44f85d Mon Sep 17 00:00:00 2001 From: Aleksandr Kuzminsky Date: Mon, 9 Nov 2009 15:54:33 -0800 Subject: Sync with rev. 118 --- mysql-test/patches/information_schema.diff | 110 ++++++-------------------- mysql-test/patches/information_schema_db.diff | 24 ++++++ mysql-test/patches/mysqlshow.diff | 46 +++++++++++ 3 files changed, 93 insertions(+), 87 deletions(-) create mode 100644 mysql-test/patches/information_schema_db.diff create mode 100644 mysql-test/patches/mysqlshow.diff (limited to 'mysql-test') diff --git a/mysql-test/patches/information_schema.diff b/mysql-test/patches/information_schema.diff index 4c6359700a6..38111fbbe98 100644 --- a/mysql-test/patches/information_schema.diff +++ b/mysql-test/patches/information_schema.diff @@ -1,6 +1,6 @@ ---- mysql-test/r/information_schema.result.orig 2009-07-14 08:44:24.000000000 +0900 -+++ mysql-test/r/information_schema.result 2009-09-07 16:42:01.000000000 +0900 -@@ -71,6 +71,20 @@ +--- mysql-test/r/information_schema.result.orig 2009-11-09 11:19:50.000000000 -0800 ++++ mysql-test/r/information_schema.result 2009-11-09 11:21:21.000000000 -0800 +@@ -71,6 +71,21 @@ TRIGGERS USER_PRIVILEGES VIEWS @@ -10,18 +10,19 @@ +INNODB_BUFFER_POOL_PAGES +XTRADB_ENHANCEMENTS +INNODB_TRX -+INNODB_INDEX_STATS ++XTRADB_ADMIN_COMMAND +INNODB_LOCK_WAITS +INNODB_CMP_RESET +INNODB_CMP +INNODB_CMPMEM_RESET -+INNODB_BUFFER_POOL_PAGES_BLOB -+INNODB_CMPMEM +INNODB_TABLE_STATS ++INNODB_CMPMEM ++INNODB_INDEX_STATS ++INNODB_BUFFER_POOL_PAGES_BLOB columns_priv db event -@@ -799,6 +813,8 @@ +@@ -799,6 +814,8 @@ TABLES UPDATE_TIME datetime TABLES CHECK_TIME datetime TRIGGERS CREATED datetime @@ -30,24 +31,24 @@ event execute_at datetime event last_executed datetime event starts datetime -@@ -847,12 +863,15 @@ +@@ -847,12 +864,15 @@ TABLE_CONSTRAINTS TABLE_NAME select TABLE_PRIVILEGES TABLE_NAME select VIEWS TABLE_NAME select +INNODB_BUFFER_POOL_PAGES_INDEX table_name select -+INNODB_INDEX_STATS table_name select +INNODB_TABLE_STATS table_name select ++INNODB_INDEX_STATS table_name select delete from mysql.user where user='mysqltest_4'; delete from mysql.db where user='mysqltest_4'; flush privileges; 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 28 -+information_schema 42 ++information_schema 43 mysql 22 create table t1 (i int, j int); create trigger trg1 before insert on t1 for each row -@@ -1267,6 +1286,20 @@ +@@ -1267,6 +1287,21 @@ TRIGGERS TRIGGER_SCHEMA USER_PRIVILEGES GRANTEE VIEWS TABLE_SCHEMA @@ -57,18 +58,19 @@ +INNODB_BUFFER_POOL_PAGES page_type +XTRADB_ENHANCEMENTS name +INNODB_TRX trx_id -+INNODB_INDEX_STATS table_name ++XTRADB_ADMIN_COMMAND result_message +INNODB_LOCK_WAITS requesting_trx_id +INNODB_CMP_RESET page_size +INNODB_CMP page_size +INNODB_CMPMEM_RESET page_size -+INNODB_BUFFER_POOL_PAGES_BLOB space_id -+INNODB_CMPMEM page_size +INNODB_TABLE_STATS table_name ++INNODB_CMPMEM page_size ++INNODB_INDEX_STATS table_name ++INNODB_BUFFER_POOL_PAGES_BLOB space_id SELECT t.table_name, c1.column_name FROM information_schema.tables t INNER JOIN -@@ -1310,14 +1343,28 @@ +@@ -1310,14 +1345,29 @@ TRIGGERS TRIGGER_SCHEMA USER_PRIVILEGES GRANTEE VIEWS TABLE_SCHEMA @@ -78,14 +80,15 @@ +INNODB_BUFFER_POOL_PAGES page_type +XTRADB_ENHANCEMENTS name +INNODB_TRX trx_id -+INNODB_INDEX_STATS table_name ++XTRADB_ADMIN_COMMAND result_message +INNODB_LOCK_WAITS requesting_trx_id +INNODB_CMP_RESET page_size +INNODB_CMP page_size +INNODB_CMPMEM_RESET page_size -+INNODB_BUFFER_POOL_PAGES_BLOB space_id -+INNODB_CMPMEM page_size +INNODB_TABLE_STATS table_name ++INNODB_CMPMEM page_size ++INNODB_INDEX_STATS table_name ++INNODB_BUFFER_POOL_PAGES_BLOB space_id SELECT MAX(table_name) FROM information_schema.tables WHERE table_schema IN ('mysql', 'INFORMATION_SCHEMA', 'test'); MAX(table_name) -VIEWS @@ -99,7 +102,7 @@ DROP TABLE IF EXISTS bug23037; DROP FUNCTION IF EXISTS get_value; SELECT COLUMN_NAME, MD5(COLUMN_DEFAULT), LENGTH(COLUMN_DEFAULT) FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME='bug23037'; -@@ -1386,6 +1433,19 @@ +@@ -1386,6 +1436,19 @@ FILES information_schema.FILES 1 GLOBAL_STATUS information_schema.GLOBAL_STATUS 1 GLOBAL_VARIABLES information_schema.GLOBAL_VARIABLES 1 @@ -119,7 +122,7 @@ KEY_COLUMN_USAGE information_schema.KEY_COLUMN_USAGE 1 PARTITIONS information_schema.PARTITIONS 1 PLUGINS information_schema.PLUGINS 1 -@@ -1404,6 +1464,7 @@ +@@ -1404,6 +1467,7 @@ TRIGGERS information_schema.TRIGGERS 1 USER_PRIVILEGES information_schema.USER_PRIVILEGES 1 VIEWS information_schema.VIEWS 1 @@ -127,70 +130,3 @@ create table t1(f1 int); create view v1 as select f1+1 as a from t1; create table t2 (f1 int, f2 int); ---- mysql-test/r/information_schema_db.result.orig 2009-07-14 08:44:24.000000000 +0900 -+++ mysql-test/r/information_schema_db.result 2009-09-07 16:42:26.000000000 +0900 -@@ -33,6 +33,20 @@ - TRIGGERS - USER_PRIVILEGES - VIEWS -+INNODB_BUFFER_POOL_PAGES_INDEX -+INNODB_RSEG -+INNODB_LOCKS -+INNODB_BUFFER_POOL_PAGES -+XTRADB_ENHANCEMENTS -+INNODB_TRX -+INNODB_INDEX_STATS -+INNODB_LOCK_WAITS -+INNODB_CMP_RESET -+INNODB_CMP -+INNODB_CMPMEM_RESET -+INNODB_BUFFER_POOL_PAGES_BLOB -+INNODB_CMPMEM -+INNODB_TABLE_STATS - show tables from INFORMATION_SCHEMA like 'T%'; - Tables_in_information_schema (T%) - TABLES ---- mysql-test/r/mysqlshow.result.orig 2009-07-14 08:44:28.000000000 +0900 -+++ mysql-test/r/mysqlshow.result 2009-09-07 16:42:52.000000000 +0900 -@@ -107,6 +107,20 @@ - | TRIGGERS | - | USER_PRIVILEGES | - | VIEWS | -+| INNODB_BUFFER_POOL_PAGES_INDEX | -+| INNODB_RSEG | -+| INNODB_LOCKS | -+| INNODB_BUFFER_POOL_PAGES | -+| XTRADB_ENHANCEMENTS | -+| INNODB_TRX | -+| INNODB_INDEX_STATS | -+| INNODB_LOCK_WAITS | -+| INNODB_CMP_RESET | -+| INNODB_CMP | -+| INNODB_CMPMEM_RESET | -+| INNODB_BUFFER_POOL_PAGES_BLOB | -+| INNODB_CMPMEM | -+| INNODB_TABLE_STATS | - +---------------------------------------+ - Database: INFORMATION_SCHEMA - +---------------------------------------+ -@@ -140,6 +154,20 @@ - | TRIGGERS | - | USER_PRIVILEGES | - | VIEWS | -+| INNODB_BUFFER_POOL_PAGES_INDEX | -+| INNODB_RSEG | -+| INNODB_LOCKS | -+| INNODB_BUFFER_POOL_PAGES | -+| XTRADB_ENHANCEMENTS | -+| INNODB_TRX | -+| INNODB_INDEX_STATS | -+| INNODB_LOCK_WAITS | -+| INNODB_CMP_RESET | -+| INNODB_CMP | -+| INNODB_CMPMEM_RESET | -+| INNODB_BUFFER_POOL_PAGES_BLOB | -+| INNODB_CMPMEM | -+| INNODB_TABLE_STATS | - +---------------------------------------+ - Wildcard: inf_rmation_schema - +--------------------+ diff --git a/mysql-test/patches/information_schema_db.diff b/mysql-test/patches/information_schema_db.diff new file mode 100644 index 00000000000..1f93612b318 --- /dev/null +++ b/mysql-test/patches/information_schema_db.diff @@ -0,0 +1,24 @@ +--- mysql-test/r/information_schema_db.result.orig 2009-11-09 14:40:34.000000000 -0800 ++++ mysql-test/r/information_schema_db.result 2009-11-09 14:41:37.000000000 -0800 +@@ -33,6 +33,21 @@ + TRIGGERS + USER_PRIVILEGES + VIEWS ++INNODB_BUFFER_POOL_PAGES_INDEX ++INNODB_RSEG ++INNODB_LOCKS ++INNODB_BUFFER_POOL_PAGES ++XTRADB_ENHANCEMENTS ++INNODB_TRX ++XTRADB_ADMIN_COMMAND ++INNODB_LOCK_WAITS ++INNODB_CMP_RESET ++INNODB_CMP ++INNODB_CMPMEM_RESET ++INNODB_TABLE_STATS ++INNODB_CMPMEM ++INNODB_INDEX_STATS ++INNODB_BUFFER_POOL_PAGES_BLOB + show tables from INFORMATION_SCHEMA like 'T%'; + Tables_in_information_schema (T%) + TABLES diff --git a/mysql-test/patches/mysqlshow.diff b/mysql-test/patches/mysqlshow.diff new file mode 100644 index 00000000000..78965e75da4 --- /dev/null +++ b/mysql-test/patches/mysqlshow.diff @@ -0,0 +1,46 @@ +--- mysql-test/r/mysqlshow.result.orig 2009-11-09 15:17:43.000000000 -0800 ++++ mysql-test/r/mysqlshow.result 2009-11-09 15:17:53.000000000 -0800 +@@ -107,6 +107,21 @@ + | TRIGGERS | + | USER_PRIVILEGES | + | VIEWS | ++| INNODB_BUFFER_POOL_PAGES_INDEX | ++| INNODB_RSEG | ++| INNODB_LOCKS | ++| INNODB_BUFFER_POOL_PAGES | ++| XTRADB_ENHANCEMENTS | ++| INNODB_TRX | ++| XTRADB_ADMIN_COMMAND | ++| INNODB_LOCK_WAITS | ++| INNODB_CMP_RESET | ++| INNODB_CMP | ++| INNODB_CMPMEM_RESET | ++| INNODB_TABLE_STATS | ++| INNODB_CMPMEM | ++| INNODB_INDEX_STATS | ++| INNODB_BUFFER_POOL_PAGES_BLOB | + +---------------------------------------+ + Database: INFORMATION_SCHEMA + +---------------------------------------+ +@@ -140,6 +155,21 @@ + | TRIGGERS | + | USER_PRIVILEGES | + | VIEWS | ++| INNODB_BUFFER_POOL_PAGES_INDEX | ++| INNODB_RSEG | ++| INNODB_LOCKS | ++| INNODB_BUFFER_POOL_PAGES | ++| XTRADB_ENHANCEMENTS | ++| INNODB_TRX | ++| XTRADB_ADMIN_COMMAND | ++| INNODB_LOCK_WAITS | ++| INNODB_CMP_RESET | ++| INNODB_CMP | ++| INNODB_CMPMEM_RESET | ++| INNODB_TABLE_STATS | ++| INNODB_CMPMEM | ++| INNODB_INDEX_STATS | ++| INNODB_BUFFER_POOL_PAGES_BLOB | + +---------------------------------------+ + Wildcard: inf_rmation_schema + +--------------------+ -- cgit v1.2.1 From 5b0ab60a4bfb4d5b603cd929b7ceb0d9fd1bac22 Mon Sep 17 00:00:00 2001 From: Aleksandr Kuzminsky Date: Wed, 6 Jan 2010 04:00:14 -0800 Subject: Synced with extensions-1.0.6 Rev. 135 --- mysql-test/innodb-analyze.test | 4 +- mysql-test/innodb-autoinc.result | 243 ++++++++++++++++++++- mysql-test/innodb-autoinc.test | 118 ++++++++++ mysql-test/innodb-consistent-master.opt | 1 + mysql-test/innodb-consistent.result | 35 +++ mysql-test/innodb-consistent.test | 58 +++++ mysql-test/innodb-index.result | 12 +- mysql-test/innodb-index.test | 24 +- mysql-test/innodb-master.opt | 2 +- mysql-test/innodb-semi-consistent-master.opt | 2 +- mysql-test/innodb-use-sys-malloc-master.opt | 3 +- mysql-test/innodb-zip.result | 100 ++++----- mysql-test/innodb-zip.test | 48 ++-- mysql-test/innodb.result | 4 +- mysql-test/innodb.test | 2 +- mysql-test/innodb_bug34300.test | 3 +- mysql-test/innodb_bug36169.result | 2 - mysql-test/innodb_bug36169.test | 8 +- mysql-test/innodb_bug36172.test | 11 +- mysql-test/innodb_bug42101-nonzero-master.opt | 2 +- mysql-test/innodb_bug44369.result | 6 + mysql-test/innodb_bug44369.test | 17 ++ mysql-test/innodb_bug44571.result | 7 + mysql-test/innodb_bug44571.test | 13 ++ mysql-test/innodb_bug46000.result | 19 ++ mysql-test/innodb_bug46000.test | 32 +++ mysql-test/innodb_bug46676.result | 9 + mysql-test/innodb_bug46676.test | 16 ++ mysql-test/innodb_bug47167.result | 24 ++ mysql-test/innodb_bug47167.test | 45 ++++ mysql-test/innodb_bug47777.result | 13 ++ mysql-test/innodb_bug47777.test | 24 ++ mysql-test/innodb_file_format.result | 4 +- mysql-test/innodb_file_format.test | 15 +- mysql-test/innodb_information_schema.test | 16 +- mysql-test/patches/disabled.def.diff | 12 +- mysql-test/patches/index_merge_innodb-explain.diff | 31 +++ mysql-test/patches/index_merge_innodb.diff | 57 ----- mysql-test/patches/information_schema.diff | 74 ++++++- mysql-test/patches/information_schema_db.diff | 24 -- mysql-test/patches/innodb_bug46000.diff | 26 --- mysql-test/patches/mysqlshow.diff | 46 ---- 42 files changed, 923 insertions(+), 289 deletions(-) create mode 100644 mysql-test/innodb-consistent-master.opt create mode 100644 mysql-test/innodb-consistent.result create mode 100644 mysql-test/innodb-consistent.test create mode 100644 mysql-test/innodb_bug44369.result create mode 100644 mysql-test/innodb_bug44369.test create mode 100644 mysql-test/innodb_bug44571.result create mode 100644 mysql-test/innodb_bug44571.test create mode 100644 mysql-test/innodb_bug46000.result create mode 100644 mysql-test/innodb_bug46000.test create mode 100644 mysql-test/innodb_bug46676.result create mode 100644 mysql-test/innodb_bug46676.test create mode 100644 mysql-test/innodb_bug47167.result create mode 100644 mysql-test/innodb_bug47167.test create mode 100644 mysql-test/innodb_bug47777.result create mode 100644 mysql-test/innodb_bug47777.test create mode 100644 mysql-test/patches/index_merge_innodb-explain.diff delete mode 100644 mysql-test/patches/index_merge_innodb.diff delete mode 100644 mysql-test/patches/information_schema_db.diff delete mode 100644 mysql-test/patches/innodb_bug46000.diff delete mode 100644 mysql-test/patches/mysqlshow.diff (limited to 'mysql-test') diff --git a/mysql-test/innodb-analyze.test b/mysql-test/innodb-analyze.test index de5a486a355..9bdb9db697c 100644 --- a/mysql-test/innodb-analyze.test +++ b/mysql-test/innodb-analyze.test @@ -11,7 +11,7 @@ -- disable_result_log -- enable_warnings -SET @old_innodb_stats_sample_pages=@@innodb_stats_sample_pages; +let $sample_pages=`select @@innodb_stats_sample_pages`; SET GLOBAL innodb_stats_sample_pages=0; # check that the value has been adjusted to 1 @@ -62,4 +62,4 @@ SET GLOBAL innodb_stats_sample_pages=16; ANALYZE TABLE innodb_analyze; DROP TABLE innodb_analyze; -SET GLOBAL innodb_stats_sample_pages=@old_innodb_stats_sample_pages; +EVAL SET GLOBAL innodb_stats_sample_pages=$sample_pages; diff --git a/mysql-test/innodb-autoinc.result b/mysql-test/innodb-autoinc.result index d2e8eb19e0c..abb8f3da072 100644 --- a/mysql-test/innodb-autoinc.result +++ b/mysql-test/innodb-autoinc.result @@ -867,6 +867,7 @@ INSERT INTO t2 SELECT NULL FROM t1; Got one of the listed errors DROP TABLE t1; DROP TABLE t2; +SET @@SESSION.AUTO_INCREMENT_INCREMENT=1, @@SESSION.AUTO_INCREMENT_OFFSET=1; CREATE TABLE t1 (c1 INT PRIMARY KEY AUTO_INCREMENT) ENGINE=InnoDB; INSERT INTO t1 VALUES (null); INSERT INTO t1 VALUES (null); @@ -874,18 +875,254 @@ ALTER TABLE t1 CHANGE c1 d1 INT NOT NULL AUTO_INCREMENT; SELECT * FROM t1; d1 1 -3 +2 SELECT * FROM t1; d1 1 -3 +2 INSERT INTO t1 VALUES(null); Got one of the listed errors ALTER TABLE t1 AUTO_INCREMENT = 3; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `d1` int(11) NOT NULL AUTO_INCREMENT, + PRIMARY KEY (`d1`) +) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1 INSERT INTO t1 VALUES(null); SELECT * FROM t1; d1 1 +2 3 -4 DROP TABLE t1; +SET @@SESSION.AUTO_INCREMENT_INCREMENT=1, @@SESSION.AUTO_INCREMENT_OFFSET=1; +SHOW VARIABLES LIKE "%auto_inc%"; +Variable_name Value +auto_increment_increment 1 +auto_increment_offset 1 +CREATE TABLE t1 (c1 TINYINT PRIMARY KEY AUTO_INCREMENT, c2 VARCHAR(10)) ENGINE=InnoDB; +INSERT INTO t1 VALUES (1, NULL); +INSERT INTO t1 VALUES (-1, 'innodb'); +INSERT INTO t1 VALUES (-127, 'innodb'); +INSERT INTO t1 VALUES (NULL, NULL); +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c1` tinyint(4) NOT NULL AUTO_INCREMENT, + `c2` varchar(10) DEFAULT NULL, + PRIMARY KEY (`c1`) +) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1 +SELECT * FROM t1; +c1 c2 +-127 innodb +-1 innodb +1 NULL +2 NULL +DROP TABLE t1; +CREATE TABLE t1 (c1 TINYINT UNSIGNED PRIMARY KEY AUTO_INCREMENT, c2 VARCHAR(10)) ENGINE=InnoDB; +INSERT INTO t1 VALUES (1, NULL); +INSERT INTO t1 VALUES (-1, 'innodb'); +Warnings: +Warning 1264 Out of range value for column 'c1' at row 1 +INSERT INTO t1 VALUES (-127, 'innodb'); +Warnings: +Warning 1264 Out of range value for column 'c1' at row 1 +INSERT INTO t1 VALUES (NULL, NULL); +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c1` tinyint(3) unsigned NOT NULL AUTO_INCREMENT, + `c2` varchar(10) DEFAULT NULL, + PRIMARY KEY (`c1`) +) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=latin1 +SELECT * FROM t1; +c1 c2 +1 NULL +2 innodb +3 innodb +4 NULL +DROP TABLE t1; +CREATE TABLE t1 (c1 SMALLINT PRIMARY KEY AUTO_INCREMENT, c2 VARCHAR(10)) ENGINE=InnoDB; +INSERT INTO t1 VALUES (1, NULL); +INSERT INTO t1 VALUES (-1, 'innodb'); +INSERT INTO t1 VALUES (-32767, 'innodb'); +INSERT INTO t1 VALUES (NULL, NULL); +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c1` smallint(6) NOT NULL AUTO_INCREMENT, + `c2` varchar(10) DEFAULT NULL, + PRIMARY KEY (`c1`) +) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1 +SELECT * FROM t1; +c1 c2 +-32767 innodb +-1 innodb +1 NULL +2 NULL +DROP TABLE t1; +CREATE TABLE t1 (c1 SMALLINT UNSIGNED PRIMARY KEY AUTO_INCREMENT, c2 VARCHAR(10)) ENGINE=InnoDB; +INSERT INTO t1 VALUES (1, NULL); +INSERT INTO t1 VALUES (-1, 'innodb'); +Warnings: +Warning 1264 Out of range value for column 'c1' at row 1 +INSERT INTO t1 VALUES (-32757, 'innodb'); +Warnings: +Warning 1264 Out of range value for column 'c1' at row 1 +INSERT INTO t1 VALUES (NULL, NULL); +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c1` smallint(5) unsigned NOT NULL AUTO_INCREMENT, + `c2` varchar(10) DEFAULT NULL, + PRIMARY KEY (`c1`) +) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=latin1 +SELECT * FROM t1; +c1 c2 +1 NULL +2 innodb +3 innodb +4 NULL +DROP TABLE t1; +CREATE TABLE t1 (c1 MEDIUMINT PRIMARY KEY AUTO_INCREMENT, c2 VARCHAR(10)) ENGINE=InnoDB; +INSERT INTO t1 VALUES (1, NULL); +INSERT INTO t1 VALUES (-1, 'innodb'); +INSERT INTO t1 VALUES (-8388607, 'innodb'); +INSERT INTO t1 VALUES (NULL, NULL); +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c1` mediumint(9) NOT NULL AUTO_INCREMENT, + `c2` varchar(10) DEFAULT NULL, + PRIMARY KEY (`c1`) +) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1 +SELECT * FROM t1; +c1 c2 +-8388607 innodb +-1 innodb +1 NULL +2 NULL +DROP TABLE t1; +CREATE TABLE t1 (c1 MEDIUMINT UNSIGNED PRIMARY KEY AUTO_INCREMENT, c2 VARCHAR(10)) ENGINE=InnoDB; +INSERT INTO t1 VALUES (1, NULL); +INSERT INTO t1 VALUES (-1, 'innodb'); +Warnings: +Warning 1264 Out of range value for column 'c1' at row 1 +INSERT INTO t1 VALUES (-8388607, 'innodb'); +Warnings: +Warning 1264 Out of range value for column 'c1' at row 1 +INSERT INTO t1 VALUES (NULL, NULL); +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c1` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `c2` varchar(10) DEFAULT NULL, + PRIMARY KEY (`c1`) +) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=latin1 +SELECT * FROM t1; +c1 c2 +1 NULL +2 innodb +3 innodb +4 NULL +DROP TABLE t1; +CREATE TABLE t1 (c1 INT PRIMARY KEY AUTO_INCREMENT, c2 VARCHAR(10)) ENGINE=InnoDB; +INSERT INTO t1 VALUES (1, NULL); +INSERT INTO t1 VALUES (-1, 'innodb'); +INSERT INTO t1 VALUES (-2147483647, 'innodb'); +INSERT INTO t1 VALUES (NULL, NULL); +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c1` int(11) NOT NULL AUTO_INCREMENT, + `c2` varchar(10) DEFAULT NULL, + PRIMARY KEY (`c1`) +) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1 +SELECT * FROM t1; +c1 c2 +-2147483647 innodb +-1 innodb +1 NULL +2 NULL +DROP TABLE t1; +CREATE TABLE t1 (c1 INT UNSIGNED PRIMARY KEY AUTO_INCREMENT, c2 VARCHAR(10)) ENGINE=InnoDB; +INSERT INTO t1 VALUES (1, NULL); +INSERT INTO t1 VALUES (-1, 'innodb'); +Warnings: +Warning 1264 Out of range value for column 'c1' at row 1 +INSERT INTO t1 VALUES (-2147483647, 'innodb'); +Warnings: +Warning 1264 Out of range value for column 'c1' at row 1 +INSERT INTO t1 VALUES (NULL, NULL); +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c1` int(10) unsigned NOT NULL AUTO_INCREMENT, + `c2` varchar(10) DEFAULT NULL, + PRIMARY KEY (`c1`) +) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=latin1 +SELECT * FROM t1; +c1 c2 +1 NULL +2 innodb +3 innodb +4 NULL +DROP TABLE t1; +CREATE TABLE t1 (c1 BIGINT PRIMARY KEY AUTO_INCREMENT, c2 VARCHAR(10)) ENGINE=InnoDB; +INSERT INTO t1 VALUES (1, NULL); +INSERT INTO t1 VALUES (-1, 'innodb'); +INSERT INTO t1 VALUES (-9223372036854775807, 'innodb'); +INSERT INTO t1 VALUES (NULL, NULL); +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c1` bigint(20) NOT NULL AUTO_INCREMENT, + `c2` varchar(10) DEFAULT NULL, + PRIMARY KEY (`c1`) +) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1 +SELECT * FROM t1; +c1 c2 +-9223372036854775807 innodb +-1 innodb +1 NULL +2 NULL +DROP TABLE t1; +CREATE TABLE t1 (c1 BIGINT UNSIGNED PRIMARY KEY AUTO_INCREMENT, c2 VARCHAR(10)) ENGINE=InnoDB; +INSERT INTO t1 VALUES (1, NULL); +INSERT INTO t1 VALUES (-1, 'innodb'); +Warnings: +Warning 1264 Out of range value for column 'c1' at row 1 +INSERT INTO t1 VALUES (-9223372036854775807, 'innodb'); +Warnings: +Warning 1264 Out of range value for column 'c1' at row 1 +INSERT INTO t1 VALUES (NULL, NULL); +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c1` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `c2` varchar(10) DEFAULT NULL, + PRIMARY KEY (`c1`) +) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=latin1 +SELECT * FROM t1; +c1 c2 +1 NULL +2 innodb +3 innodb +4 NULL +DROP TABLE t1; +CREATE TABLE T1 (c1 INT AUTO_INCREMENT, c2 INT, PRIMARY KEY(c1)) AUTO_INCREMENT=10 ENGINE=InnoDB; +CREATE INDEX i1 on T1(c2); +SHOW CREATE TABLE T1; +Table Create Table +T1 CREATE TABLE `T1` ( + `c1` int(11) NOT NULL AUTO_INCREMENT, + `c2` int(11) DEFAULT NULL, + PRIMARY KEY (`c1`), + KEY `i1` (`c2`) +) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=latin1 +INSERT INTO T1 (c2) values (0); +SELECT * FROM T1; +c1 c2 +10 0 +DROP TABLE T1; diff --git a/mysql-test/innodb-autoinc.test b/mysql-test/innodb-autoinc.test index 61c42f45733..558de6a1060 100644 --- a/mysql-test/innodb-autoinc.test +++ b/mysql-test/innodb-autoinc.test @@ -482,6 +482,7 @@ DROP TABLE t2; # 44030: Error: (1500) Couldn't read the MAX(ID) autoinc value from # the index (PRIMARY) # This test requires a restart of the server +SET @@SESSION.AUTO_INCREMENT_INCREMENT=1, @@SESSION.AUTO_INCREMENT_OFFSET=1; CREATE TABLE t1 (c1 INT PRIMARY KEY AUTO_INCREMENT) ENGINE=InnoDB; INSERT INTO t1 VALUES (null); INSERT INTO t1 VALUES (null); @@ -495,6 +496,123 @@ SELECT * FROM t1; -- error ER_AUTOINC_READ_FAILED,1467 INSERT INTO t1 VALUES(null); ALTER TABLE t1 AUTO_INCREMENT = 3; +SHOW CREATE TABLE t1; INSERT INTO t1 VALUES(null); SELECT * FROM t1; DROP TABLE t1; + +# If the user has specified negative values for an AUTOINC column then +# InnoDB should ignore those values when setting the table's max value. +SET @@SESSION.AUTO_INCREMENT_INCREMENT=1, @@SESSION.AUTO_INCREMENT_OFFSET=1; +SHOW VARIABLES LIKE "%auto_inc%"; +# TINYINT +CREATE TABLE t1 (c1 TINYINT PRIMARY KEY AUTO_INCREMENT, c2 VARCHAR(10)) ENGINE=InnoDB; +INSERT INTO t1 VALUES (1, NULL); +INSERT INTO t1 VALUES (-1, 'innodb'); +INSERT INTO t1 VALUES (-127, 'innodb'); +INSERT INTO t1 VALUES (NULL, NULL); +SHOW CREATE TABLE t1; +SELECT * FROM t1; +DROP TABLE t1; + +CREATE TABLE t1 (c1 TINYINT UNSIGNED PRIMARY KEY AUTO_INCREMENT, c2 VARCHAR(10)) ENGINE=InnoDB; +INSERT INTO t1 VALUES (1, NULL); +INSERT INTO t1 VALUES (-1, 'innodb'); +INSERT INTO t1 VALUES (-127, 'innodb'); +INSERT INTO t1 VALUES (NULL, NULL); +SHOW CREATE TABLE t1; +SELECT * FROM t1; +DROP TABLE t1; +# +# SMALLINT +# +CREATE TABLE t1 (c1 SMALLINT PRIMARY KEY AUTO_INCREMENT, c2 VARCHAR(10)) ENGINE=InnoDB; +INSERT INTO t1 VALUES (1, NULL); +INSERT INTO t1 VALUES (-1, 'innodb'); +INSERT INTO t1 VALUES (-32767, 'innodb'); +INSERT INTO t1 VALUES (NULL, NULL); +SHOW CREATE TABLE t1; +SELECT * FROM t1; +DROP TABLE t1; + +CREATE TABLE t1 (c1 SMALLINT UNSIGNED PRIMARY KEY AUTO_INCREMENT, c2 VARCHAR(10)) ENGINE=InnoDB; +INSERT INTO t1 VALUES (1, NULL); +INSERT INTO t1 VALUES (-1, 'innodb'); +INSERT INTO t1 VALUES (-32757, 'innodb'); +INSERT INTO t1 VALUES (NULL, NULL); +SHOW CREATE TABLE t1; +SELECT * FROM t1; +DROP TABLE t1; +# +# MEDIUMINT +# +CREATE TABLE t1 (c1 MEDIUMINT PRIMARY KEY AUTO_INCREMENT, c2 VARCHAR(10)) ENGINE=InnoDB; +INSERT INTO t1 VALUES (1, NULL); +INSERT INTO t1 VALUES (-1, 'innodb'); +INSERT INTO t1 VALUES (-8388607, 'innodb'); +INSERT INTO t1 VALUES (NULL, NULL); +SHOW CREATE TABLE t1; +SELECT * FROM t1; +DROP TABLE t1; + +CREATE TABLE t1 (c1 MEDIUMINT UNSIGNED PRIMARY KEY AUTO_INCREMENT, c2 VARCHAR(10)) ENGINE=InnoDB; +INSERT INTO t1 VALUES (1, NULL); +INSERT INTO t1 VALUES (-1, 'innodb'); +INSERT INTO t1 VALUES (-8388607, 'innodb'); +INSERT INTO t1 VALUES (NULL, NULL); +SHOW CREATE TABLE t1; +SELECT * FROM t1; +DROP TABLE t1; +# +# INT +# +CREATE TABLE t1 (c1 INT PRIMARY KEY AUTO_INCREMENT, c2 VARCHAR(10)) ENGINE=InnoDB; +INSERT INTO t1 VALUES (1, NULL); +INSERT INTO t1 VALUES (-1, 'innodb'); +INSERT INTO t1 VALUES (-2147483647, 'innodb'); +INSERT INTO t1 VALUES (NULL, NULL); +SHOW CREATE TABLE t1; +SELECT * FROM t1; +DROP TABLE t1; + +CREATE TABLE t1 (c1 INT UNSIGNED PRIMARY KEY AUTO_INCREMENT, c2 VARCHAR(10)) ENGINE=InnoDB; +INSERT INTO t1 VALUES (1, NULL); +INSERT INTO t1 VALUES (-1, 'innodb'); +INSERT INTO t1 VALUES (-2147483647, 'innodb'); +INSERT INTO t1 VALUES (NULL, NULL); +SHOW CREATE TABLE t1; +SELECT * FROM t1; +DROP TABLE t1; +# +# BIGINT +# +CREATE TABLE t1 (c1 BIGINT PRIMARY KEY AUTO_INCREMENT, c2 VARCHAR(10)) ENGINE=InnoDB; +INSERT INTO t1 VALUES (1, NULL); +INSERT INTO t1 VALUES (-1, 'innodb'); +INSERT INTO t1 VALUES (-9223372036854775807, 'innodb'); +INSERT INTO t1 VALUES (NULL, NULL); +SHOW CREATE TABLE t1; +SELECT * FROM t1; +DROP TABLE t1; + +CREATE TABLE t1 (c1 BIGINT UNSIGNED PRIMARY KEY AUTO_INCREMENT, c2 VARCHAR(10)) ENGINE=InnoDB; +INSERT INTO t1 VALUES (1, NULL); +INSERT INTO t1 VALUES (-1, 'innodb'); +INSERT INTO t1 VALUES (-9223372036854775807, 'innodb'); +INSERT INTO t1 VALUES (NULL, NULL); +SHOW CREATE TABLE t1; +SELECT * FROM t1; +DROP TABLE t1; +# +# End negative number check + +## +# 47125: auto_increment start value is ignored if an index is created +# and engine=innodb +# +CREATE TABLE T1 (c1 INT AUTO_INCREMENT, c2 INT, PRIMARY KEY(c1)) AUTO_INCREMENT=10 ENGINE=InnoDB; +CREATE INDEX i1 on T1(c2); +SHOW CREATE TABLE T1; +INSERT INTO T1 (c2) values (0); +SELECT * FROM T1; +DROP TABLE T1; diff --git a/mysql-test/innodb-consistent-master.opt b/mysql-test/innodb-consistent-master.opt new file mode 100644 index 00000000000..cb48f1aaf60 --- /dev/null +++ b/mysql-test/innodb-consistent-master.opt @@ -0,0 +1 @@ +--loose-innodb_lock_wait_timeout=2 diff --git a/mysql-test/innodb-consistent.result b/mysql-test/innodb-consistent.result new file mode 100644 index 00000000000..9115791b99c --- /dev/null +++ b/mysql-test/innodb-consistent.result @@ -0,0 +1,35 @@ +drop table if exists t1; +set session transaction isolation level read committed; +create table t1(a int not null) engine=innodb DEFAULT CHARSET=latin1; +create table t2 like t1; +insert into t2 values (1),(2),(3),(4),(5),(6),(7); +set autocommit=0; +begin; +replace into t1 select * from t2; +set session transaction isolation level read committed; +set autocommit=0; +delete from t2 where a=5; +commit; +delete from t2; +commit; +commit; +begin; +insert into t1 select * from t2; +set session transaction isolation level read committed; +set autocommit=0; +delete from t2 where a=5; +commit; +delete from t2; +commit; +commit; +select * from t1; +a +1 +2 +3 +4 +5 +6 +7 +drop table t1; +drop table t2; diff --git a/mysql-test/innodb-consistent.test b/mysql-test/innodb-consistent.test new file mode 100644 index 00000000000..5a7f4dc392d --- /dev/null +++ b/mysql-test/innodb-consistent.test @@ -0,0 +1,58 @@ +-- source include/not_embedded.inc +-- source include/have_innodb.inc + +--disable_warnings +drop table if exists t1; +--enable_warnings + +# REPLACE INTO ... SELECT and INSERT INTO ... SELECT should do +# a consistent read of the source table. + +connect (a,localhost,root,,); +connect (b,localhost,root,,); +connection a; +set session transaction isolation level read committed; +create table t1(a int not null) engine=innodb DEFAULT CHARSET=latin1; +create table t2 like t1; +insert into t2 values (1),(2),(3),(4),(5),(6),(7); +set autocommit=0; + +# REPLACE INTO ... SELECT case +begin; +# this should not result in any locks on t2. +replace into t1 select * from t2; + +connection b; +set session transaction isolation level read committed; +set autocommit=0; +# should not cuase a lock wait. +delete from t2 where a=5; +commit; +delete from t2; +commit; +connection a; +commit; + +# INSERT INTO ... SELECT case +begin; +# this should not result in any locks on t2. +insert into t1 select * from t2; + +connection b; +set session transaction isolation level read committed; +set autocommit=0; +# should not cuase a lock wait. +delete from t2 where a=5; +commit; +delete from t2; +commit; +connection a; +commit; + +select * from t1; +drop table t1; +drop table t2; + +connection default; +disconnect a; +disconnect b; diff --git a/mysql-test/innodb-index.result b/mysql-test/innodb-index.result index f2c90c54df8..93a4123809d 100644 --- a/mysql-test/innodb-index.result +++ b/mysql-test/innodb-index.result @@ -46,6 +46,13 @@ t1 CREATE TABLE `t1` ( KEY `d2` (`d`), KEY `b` (`b`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 +CREATE TABLE `t1#1`(a INT PRIMARY KEY) ENGINE=InnoDB; +alter table t1 add unique index (c), add index (d); +ERROR HY000: Table 'test.t1#1' already exists +rename table `t1#1` to `t1#2`; +alter table t1 add unique index (c), add index (d); +ERROR HY000: Table 'test.t1#2' already exists +drop table `t1#2`; alter table t1 add unique index (c), add index (d); show create table t1; Table Create Table @@ -620,7 +627,7 @@ drop table t1; create table t1(a int not null, b int, c char(10), d varchar(20), primary key (a)) engine = innodb; insert into t1 values (1,1,'ab','ab'),(2,2,'ac','ac'),(3,3,'ac','ac'),(4,4,'afe','afe'),(5,4,'affe','affe'); alter table t1 add unique index (b), add unique index (c), add unique index (d); -ERROR 23000: Duplicate entry '4' for key 'b' +ERROR 23000: Duplicate entry 'ac' for key 'c' alter table t1 add unique index (c), add unique index (b), add index (d); ERROR 23000: Duplicate entry 'ac' for key 'c' show create table t1; @@ -961,6 +968,7 @@ create index t1u on t1 (u(1)); drop table t1; set global innodb_file_per_table=0; set global innodb_file_format=Antelope; +set global innodb_file_format_check=Antelope; SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0; SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0; CREATE TABLE t1( @@ -1125,7 +1133,6 @@ t2 CREATE TABLE `t2` ( ) ENGINE=InnoDB DEFAULT CHARSET=latin1 DROP TABLE t2; DROP TABLE t1; -call mtr.add_suppression("InnoDB: insufficient history for index"); CREATE TABLE t1 (a INT, b CHAR(1)) ENGINE=InnoDB; INSERT INTO t1 VALUES (3,'a'),(3,'b'),(1,'c'),(0,'d'),(1,'e'); BEGIN; @@ -1162,4 +1169,3 @@ a b 3 a 3 b DROP TABLE t1; -set global innodb_file_format_check=Antelope; diff --git a/mysql-test/innodb-index.test b/mysql-test/innodb-index.test index 1ec1a503c63..64ee52dd722 100644 --- a/mysql-test/innodb-index.test +++ b/mysql-test/innodb-index.test @@ -1,4 +1,7 @@ -- source include/have_innodb.inc + +let $innodb_file_format_check_orig=`select @@innodb_file_format_check`; + create table t1(a int not null, b int, c char(10) not null, d varchar(20)) engine = innodb; insert into t1 values (5,5,'oo','oo'),(4,4,'tr','tr'),(3,4,'ad','ad'),(2,3,'ak','ak'); commit; @@ -16,6 +19,16 @@ show create table t1; alter table t1 add index (b); show create table t1; +# Check how existing tables interfere with temporary tables. +CREATE TABLE `t1#1`(a INT PRIMARY KEY) ENGINE=InnoDB; + +--error 156 +alter table t1 add unique index (c), add index (d); +rename table `t1#1` to `t1#2`; +--error 156 +alter table t1 add unique index (c), add index (d); +drop table `t1#2`; + alter table t1 add unique index (c), add index (d); show create table t1; explain select * from t1 force index(c) order by c; @@ -387,6 +400,7 @@ create index t1u on t1 (u(1)); drop table t1; eval set global innodb_file_per_table=$per_table; eval set global innodb_file_format=$format; +eval set global innodb_file_format_check=$format; # # Test to check whether CREATE INDEX handles implicit foreign key @@ -499,8 +513,6 @@ SHOW CREATE TABLE t2; DROP TABLE t2; DROP TABLE t1; -call mtr.add_suppression("InnoDB: insufficient history for index"); - connect (a,localhost,root,,); connect (b,localhost,root,,); connection a; @@ -523,4 +535,10 @@ disconnect a; disconnect b; DROP TABLE t1; -set global innodb_file_format_check=Antelope; + +# +# restore environment to the state it was before this test execution +# + +-- disable_query_log +eval SET GLOBAL innodb_file_format_check=$innodb_file_format_check_orig; diff --git a/mysql-test/innodb-master.opt b/mysql-test/innodb-master.opt index 4901efb416c..72c88068345 100644 --- a/mysql-test/innodb-master.opt +++ b/mysql-test/innodb-master.opt @@ -1 +1 @@ ---binlog_cache_size=32768 --innodb_lock_wait_timeout=1 +--binlog_cache_size=32768 --loose_innodb_lock_wait_timeout=1 diff --git a/mysql-test/innodb-semi-consistent-master.opt b/mysql-test/innodb-semi-consistent-master.opt index e76299453d3..cb48f1aaf60 100644 --- a/mysql-test/innodb-semi-consistent-master.opt +++ b/mysql-test/innodb-semi-consistent-master.opt @@ -1 +1 @@ ---innodb_lock_wait_timeout=2 +--loose-innodb_lock_wait_timeout=2 diff --git a/mysql-test/innodb-use-sys-malloc-master.opt b/mysql-test/innodb-use-sys-malloc-master.opt index 889834add01..fc8582b5887 100644 --- a/mysql-test/innodb-use-sys-malloc-master.opt +++ b/mysql-test/innodb-use-sys-malloc-master.opt @@ -1,2 +1 @@ ---innodb-use-sys-malloc=true ---innodb-use-sys-malloc=true +--loose-innodb-use-sys-malloc=true diff --git a/mysql-test/innodb-zip.result b/mysql-test/innodb-zip.result index c81401743a5..21396d81ba8 100644 --- a/mysql-test/innodb-zip.result +++ b/mysql-test/innodb-zip.result @@ -141,7 +141,7 @@ drop table t1; CREATE TABLE t1(c TEXT, PRIMARY KEY (c(440))) ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1 CHARSET=ASCII; ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. You have to change some columns to TEXT or BLOBs -CREATE TABLE t1(c TEXT, PRIMARY KEY (c(439))) +CREATE TABLE t1(c TEXT, PRIMARY KEY (c(438))) ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1 CHARSET=ASCII; INSERT INTO t1 VALUES(REPEAT('A',512)),(REPEAT('B',512)); DROP TABLE t1; @@ -196,15 +196,15 @@ drop table t1; set innodb_strict_mode = on; create table t1 (id int primary key) engine = innodb key_block_size = 0; ERROR HY000: Can't create table 'test.t1' (errno: 1478) -show errors; +show warnings; Level Code Message -Error 1478 InnoDB: invalid KEY_BLOCK_SIZE = 0. Valid values are [1, 2, 4, 8, 16] +Warning 1478 InnoDB: invalid KEY_BLOCK_SIZE = 0. Valid values are [1, 2, 4, 8, 16] Error 1005 Can't create table 'test.t1' (errno: 1478) create table t2 (id int primary key) engine = innodb key_block_size = 9; ERROR HY000: Can't create table 'test.t2' (errno: 1478) -show errors; +show warnings; Level Code Message -Error 1478 InnoDB: invalid KEY_BLOCK_SIZE = 9. Valid values are [1, 2, 4, 8, 16] +Warning 1478 InnoDB: invalid KEY_BLOCK_SIZE = 9. Valid values are [1, 2, 4, 8, 16] Error 1005 Can't create table 'test.t2' (errno: 1478) create table t3 (id int primary key) engine = innodb key_block_size = 1; create table t4 (id int primary key) engine = innodb key_block_size = 2; @@ -233,30 +233,30 @@ key_block_size = 8 row_format = compressed; create table t2 (id int primary key) engine = innodb key_block_size = 8 row_format = redundant; ERROR HY000: Can't create table 'test.t2' (errno: 1478) -show errors; +show warnings; Level Code Message -Error 1478 InnoDB: cannot specify ROW_FORMAT = REDUNDANT with KEY_BLOCK_SIZE. +Warning 1478 InnoDB: cannot specify ROW_FORMAT = REDUNDANT with KEY_BLOCK_SIZE. Error 1005 Can't create table 'test.t2' (errno: 1478) create table t3 (id int primary key) engine = innodb key_block_size = 8 row_format = compact; ERROR HY000: Can't create table 'test.t3' (errno: 1478) -show errors; +show warnings; Level Code Message -Error 1478 InnoDB: cannot specify ROW_FORMAT = COMPACT with KEY_BLOCK_SIZE. +Warning 1478 InnoDB: cannot specify ROW_FORMAT = COMPACT with KEY_BLOCK_SIZE. Error 1005 Can't create table 'test.t3' (errno: 1478) create table t4 (id int primary key) engine = innodb key_block_size = 8 row_format = dynamic; ERROR HY000: Can't create table 'test.t4' (errno: 1478) -show errors; +show warnings; Level Code Message -Error 1478 InnoDB: cannot specify ROW_FORMAT = DYNAMIC with KEY_BLOCK_SIZE. +Warning 1478 InnoDB: cannot specify ROW_FORMAT = DYNAMIC with KEY_BLOCK_SIZE. Error 1005 Can't create table 'test.t4' (errno: 1478) create table t5 (id int primary key) engine = innodb key_block_size = 8 row_format = default; ERROR HY000: Can't create table 'test.t5' (errno: 1478) -show errors; +show warnings; Level Code Message -Error 1478 InnoDB: cannot specify ROW_FORMAT = COMPACT with KEY_BLOCK_SIZE. +Warning 1478 InnoDB: cannot specify ROW_FORMAT = COMPACT with KEY_BLOCK_SIZE. Error 1005 Can't create table 'test.t5' (errno: 1478) SELECT table_schema, table_name, row_format FROM information_schema.tables WHERE engine='innodb'; @@ -266,26 +266,26 @@ drop table t1; create table t1 (id int primary key) engine = innodb key_block_size = 9 row_format = redundant; ERROR HY000: Can't create table 'test.t1' (errno: 1478) -show errors; +show warnings; Level Code Message -Error 1478 InnoDB: invalid KEY_BLOCK_SIZE = 9. Valid values are [1, 2, 4, 8, 16] -Error 1478 InnoDB: cannot specify ROW_FORMAT = REDUNDANT with KEY_BLOCK_SIZE. +Warning 1478 InnoDB: invalid KEY_BLOCK_SIZE = 9. Valid values are [1, 2, 4, 8, 16] +Warning 1478 InnoDB: cannot specify ROW_FORMAT = REDUNDANT with KEY_BLOCK_SIZE. Error 1005 Can't create table 'test.t1' (errno: 1478) create table t2 (id int primary key) engine = innodb key_block_size = 9 row_format = compact; ERROR HY000: Can't create table 'test.t2' (errno: 1478) -show errors; +show warnings; Level Code Message -Error 1478 InnoDB: invalid KEY_BLOCK_SIZE = 9. Valid values are [1, 2, 4, 8, 16] -Error 1478 InnoDB: cannot specify ROW_FORMAT = COMPACT with KEY_BLOCK_SIZE. +Warning 1478 InnoDB: invalid KEY_BLOCK_SIZE = 9. Valid values are [1, 2, 4, 8, 16] +Warning 1478 InnoDB: cannot specify ROW_FORMAT = COMPACT with KEY_BLOCK_SIZE. Error 1005 Can't create table 'test.t2' (errno: 1478) create table t2 (id int primary key) engine = innodb key_block_size = 9 row_format = dynamic; ERROR HY000: Can't create table 'test.t2' (errno: 1478) -show errors; +show warnings; Level Code Message -Error 1478 InnoDB: invalid KEY_BLOCK_SIZE = 9. Valid values are [1, 2, 4, 8, 16] -Error 1478 InnoDB: cannot specify ROW_FORMAT = DYNAMIC with KEY_BLOCK_SIZE. +Warning 1478 InnoDB: invalid KEY_BLOCK_SIZE = 9. Valid values are [1, 2, 4, 8, 16] +Warning 1478 InnoDB: cannot specify ROW_FORMAT = DYNAMIC with KEY_BLOCK_SIZE. Error 1005 Can't create table 'test.t2' (errno: 1478) SELECT table_schema, table_name, row_format FROM information_schema.tables WHERE engine='innodb'; @@ -293,45 +293,45 @@ table_schema table_name row_format set global innodb_file_per_table = off; create table t1 (id int primary key) engine = innodb key_block_size = 1; ERROR HY000: Can't create table 'test.t1' (errno: 1478) -show errors; +show warnings; Level Code Message -Error 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table. +Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table. Error 1005 Can't create table 'test.t1' (errno: 1478) create table t2 (id int primary key) engine = innodb key_block_size = 2; ERROR HY000: Can't create table 'test.t2' (errno: 1478) -show errors; +show warnings; Level Code Message -Error 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table. +Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table. Error 1005 Can't create table 'test.t2' (errno: 1478) create table t3 (id int primary key) engine = innodb key_block_size = 4; ERROR HY000: Can't create table 'test.t3' (errno: 1478) -show errors; +show warnings; Level Code Message -Error 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table. +Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table. Error 1005 Can't create table 'test.t3' (errno: 1478) create table t4 (id int primary key) engine = innodb key_block_size = 8; ERROR HY000: Can't create table 'test.t4' (errno: 1478) -show errors; +show warnings; Level Code Message -Error 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table. +Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table. Error 1005 Can't create table 'test.t4' (errno: 1478) create table t5 (id int primary key) engine = innodb key_block_size = 16; ERROR HY000: Can't create table 'test.t5' (errno: 1478) -show errors; +show warnings; Level Code Message -Error 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table. +Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table. Error 1005 Can't create table 'test.t5' (errno: 1478) create table t6 (id int primary key) engine = innodb row_format = compressed; ERROR HY000: Can't create table 'test.t6' (errno: 1478) -show errors; +show warnings; Level Code Message -Error 1478 InnoDB: ROW_FORMAT=COMPRESSED requires innodb_file_per_table. +Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED requires innodb_file_per_table. Error 1005 Can't create table 'test.t6' (errno: 1478) create table t7 (id int primary key) engine = innodb row_format = dynamic; ERROR HY000: Can't create table 'test.t7' (errno: 1478) -show errors; +show warnings; Level Code Message -Error 1478 InnoDB: ROW_FORMAT=DYNAMIC requires innodb_file_per_table. +Warning 1478 InnoDB: ROW_FORMAT=DYNAMIC requires innodb_file_per_table. Error 1005 Can't create table 'test.t7' (errno: 1478) create table t8 (id int primary key) engine = innodb row_format = compact; create table t9 (id int primary key) engine = innodb row_format = redundant; @@ -345,45 +345,45 @@ set global innodb_file_per_table = on; set global innodb_file_format = `0`; create table t1 (id int primary key) engine = innodb key_block_size = 1; ERROR HY000: Can't create table 'test.t1' (errno: 1478) -show errors; +show warnings; Level Code Message -Error 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope. +Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope. Error 1005 Can't create table 'test.t1' (errno: 1478) create table t2 (id int primary key) engine = innodb key_block_size = 2; ERROR HY000: Can't create table 'test.t2' (errno: 1478) -show errors; +show warnings; Level Code Message -Error 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope. +Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope. Error 1005 Can't create table 'test.t2' (errno: 1478) create table t3 (id int primary key) engine = innodb key_block_size = 4; ERROR HY000: Can't create table 'test.t3' (errno: 1478) -show errors; +show warnings; Level Code Message -Error 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope. +Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope. Error 1005 Can't create table 'test.t3' (errno: 1478) create table t4 (id int primary key) engine = innodb key_block_size = 8; ERROR HY000: Can't create table 'test.t4' (errno: 1478) -show errors; +show warnings; Level Code Message -Error 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope. +Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope. Error 1005 Can't create table 'test.t4' (errno: 1478) create table t5 (id int primary key) engine = innodb key_block_size = 16; ERROR HY000: Can't create table 'test.t5' (errno: 1478) -show errors; +show warnings; Level Code Message -Error 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope. +Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope. Error 1005 Can't create table 'test.t5' (errno: 1478) create table t6 (id int primary key) engine = innodb row_format = compressed; ERROR HY000: Can't create table 'test.t6' (errno: 1478) -show errors; +show warnings; Level Code Message -Error 1478 InnoDB: ROW_FORMAT=COMPRESSED requires innodb_file_format > Antelope. +Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED requires innodb_file_format > Antelope. Error 1005 Can't create table 'test.t6' (errno: 1478) create table t7 (id int primary key) engine = innodb row_format = dynamic; ERROR HY000: Can't create table 'test.t7' (errno: 1478) -show errors; +show warnings; Level Code Message -Error 1478 InnoDB: ROW_FORMAT=DYNAMIC requires innodb_file_format > Antelope. +Warning 1478 InnoDB: ROW_FORMAT=DYNAMIC requires innodb_file_format > Antelope. Error 1005 Can't create table 'test.t7' (errno: 1478) create table t8 (id int primary key) engine = innodb row_format = compact; create table t9 (id int primary key) engine = innodb row_format = redundant; diff --git a/mysql-test/innodb-zip.test b/mysql-test/innodb-zip.test index ddc39d44487..fdb9b89e37a 100644 --- a/mysql-test/innodb-zip.test +++ b/mysql-test/innodb-zip.test @@ -105,7 +105,7 @@ drop table t1; --error ER_TOO_BIG_ROWSIZE CREATE TABLE t1(c TEXT, PRIMARY KEY (c(440))) ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1 CHARSET=ASCII; -CREATE TABLE t1(c TEXT, PRIMARY KEY (c(439))) +CREATE TABLE t1(c TEXT, PRIMARY KEY (c(438))) ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1 CHARSET=ASCII; INSERT INTO t1 VALUES(REPEAT('A',512)),(REPEAT('B',512)); DROP TABLE t1; @@ -174,11 +174,11 @@ set innodb_strict_mode = on; --error ER_CANT_CREATE_TABLE create table t1 (id int primary key) engine = innodb key_block_size = 0; -show errors; +show warnings; --error ER_CANT_CREATE_TABLE create table t2 (id int primary key) engine = innodb key_block_size = 9; -show errors; +show warnings; create table t3 (id int primary key) engine = innodb key_block_size = 1; @@ -204,22 +204,22 @@ key_block_size = 8 row_format = compressed; --error ER_CANT_CREATE_TABLE create table t2 (id int primary key) engine = innodb key_block_size = 8 row_format = redundant; -show errors; +show warnings; --error ER_CANT_CREATE_TABLE create table t3 (id int primary key) engine = innodb key_block_size = 8 row_format = compact; -show errors; +show warnings; --error ER_CANT_CREATE_TABLE create table t4 (id int primary key) engine = innodb key_block_size = 8 row_format = dynamic; -show errors; +show warnings; --error ER_CANT_CREATE_TABLE create table t5 (id int primary key) engine = innodb key_block_size = 8 row_format = default; -show errors; +show warnings; SELECT table_schema, table_name, row_format FROM information_schema.tables WHERE engine='innodb'; @@ -229,17 +229,17 @@ drop table t1; --error ER_CANT_CREATE_TABLE create table t1 (id int primary key) engine = innodb key_block_size = 9 row_format = redundant; -show errors; +show warnings; --error ER_CANT_CREATE_TABLE create table t2 (id int primary key) engine = innodb key_block_size = 9 row_format = compact; -show errors; +show warnings; --error ER_CANT_CREATE_TABLE create table t2 (id int primary key) engine = innodb key_block_size = 9 row_format = dynamic; -show errors; +show warnings; SELECT table_schema, table_name, row_format FROM information_schema.tables WHERE engine='innodb'; @@ -249,25 +249,25 @@ set global innodb_file_per_table = off; --error ER_CANT_CREATE_TABLE create table t1 (id int primary key) engine = innodb key_block_size = 1; -show errors; +show warnings; --error ER_CANT_CREATE_TABLE create table t2 (id int primary key) engine = innodb key_block_size = 2; -show errors; +show warnings; --error ER_CANT_CREATE_TABLE create table t3 (id int primary key) engine = innodb key_block_size = 4; -show errors; +show warnings; --error ER_CANT_CREATE_TABLE create table t4 (id int primary key) engine = innodb key_block_size = 8; -show errors; +show warnings; --error ER_CANT_CREATE_TABLE create table t5 (id int primary key) engine = innodb key_block_size = 16; -show errors; +show warnings; --error ER_CANT_CREATE_TABLE create table t6 (id int primary key) engine = innodb row_format = compressed; -show errors; +show warnings; --error ER_CANT_CREATE_TABLE create table t7 (id int primary key) engine = innodb row_format = dynamic; -show errors; +show warnings; create table t8 (id int primary key) engine = innodb row_format = compact; create table t9 (id int primary key) engine = innodb row_format = redundant; @@ -281,25 +281,25 @@ set global innodb_file_format = `0`; --error ER_CANT_CREATE_TABLE create table t1 (id int primary key) engine = innodb key_block_size = 1; -show errors; +show warnings; --error ER_CANT_CREATE_TABLE create table t2 (id int primary key) engine = innodb key_block_size = 2; -show errors; +show warnings; --error ER_CANT_CREATE_TABLE create table t3 (id int primary key) engine = innodb key_block_size = 4; -show errors; +show warnings; --error ER_CANT_CREATE_TABLE create table t4 (id int primary key) engine = innodb key_block_size = 8; -show errors; +show warnings; --error ER_CANT_CREATE_TABLE create table t5 (id int primary key) engine = innodb key_block_size = 16; -show errors; +show warnings; --error ER_CANT_CREATE_TABLE create table t6 (id int primary key) engine = innodb row_format = compressed; -show errors; +show warnings; --error ER_CANT_CREATE_TABLE create table t7 (id int primary key) engine = innodb row_format = dynamic; -show errors; +show warnings; create table t8 (id int primary key) engine = innodb row_format = compact; create table t9 (id int primary key) engine = innodb row_format = redundant; diff --git a/mysql-test/innodb.result b/mysql-test/innodb.result index bdae7633fd1..6cdaeb5dd3c 100644 --- a/mysql-test/innodb.result +++ b/mysql-test/innodb.result @@ -1970,7 +1970,7 @@ explain select count(*) from t1 where v between 'a' and 'a ' and v between 'a ' id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 ref v v 13 const # Using where; Using index alter table t1 add unique(v); -ERROR 23000: Duplicate entry 'v' for key 'v_2' +ERROR 23000: Duplicate entry '{ ' for key 'v_2' alter table t1 add key(v); select concat('*',v,'*',c,'*',t,'*') as qq from t1 where v='a'; qq @@ -3088,7 +3088,7 @@ ERROR HY000: Lock wait timeout exceeded; try restarting transaction commit; drop table t1, t2, t3, t5, t6, t8, t9; CREATE TABLE t1 (DB_ROW_ID int) engine=innodb; -ERROR HY000: Can't create table 'test.t1' (errno: -1) +ERROR 42000: Incorrect column name 'DB_ROW_ID' CREATE TABLE t1 ( a BIGINT(20) NOT NULL, PRIMARY KEY (a) diff --git a/mysql-test/innodb.test b/mysql-test/innodb.test index f46a3a70b56..fe588316535 100644 --- a/mysql-test/innodb.test +++ b/mysql-test/innodb.test @@ -2264,7 +2264,7 @@ disconnect j; drop table t1, t2, t3, t5, t6, t8, t9; # bug 18934, "InnoDB crashes when table uses column names like DB_ROW_ID" ---error 1005 +--error ER_WRONG_COLUMN_NAME CREATE TABLE t1 (DB_ROW_ID int) engine=innodb; # diff --git a/mysql-test/innodb_bug34300.test b/mysql-test/innodb_bug34300.test index 14918f55490..68c385fd72a 100644 --- a/mysql-test/innodb_bug34300.test +++ b/mysql-test/innodb_bug34300.test @@ -9,6 +9,7 @@ -- disable_result_log # set packet size and reconnect +let $max_packet=`select @@global.max_allowed_packet`; SET @@global.max_allowed_packet=16777216; --connect (newconn, localhost, root,,) @@ -30,4 +31,4 @@ ALTER TABLE bug34300 ADD COLUMN (f10 INT); SELECT f4, f8 FROM bug34300; DROP TABLE bug34300; -SET @@global.max_allowed_packet=1048576; +EVAL SET @@global.max_allowed_packet=$max_packet; diff --git a/mysql-test/innodb_bug36169.result b/mysql-test/innodb_bug36169.result index 0f43ab23f7a..aa80e4d7aa4 100644 --- a/mysql-test/innodb_bug36169.result +++ b/mysql-test/innodb_bug36169.result @@ -1,4 +1,2 @@ -set @old_innodb_file_format=@@innodb_file_format; -set @old_innodb_file_per_table=@@innodb_file_per_table; SET GLOBAL innodb_file_format='Barracuda'; SET GLOBAL innodb_file_per_table=ON; diff --git a/mysql-test/innodb_bug36169.test b/mysql-test/innodb_bug36169.test index 22a2f6ddada..5bf55193b5c 100644 --- a/mysql-test/innodb_bug36169.test +++ b/mysql-test/innodb_bug36169.test @@ -4,9 +4,9 @@ # -- source include/have_innodb.inc -set @old_innodb_file_format=@@innodb_file_format; -set @old_innodb_file_per_table=@@innodb_file_per_table; +let $file_format=`select @@innodb_file_format`; +let $file_per_table=`select @@innodb_file_per_table`; SET GLOBAL innodb_file_format='Barracuda'; SET GLOBAL innodb_file_per_table=ON; @@ -1155,5 +1155,5 @@ DROP TABLE IF EXISTS table4; DROP TABLE IF EXISTS table5; DROP TABLE IF EXISTS table6; -set global innodb_file_format=@old_innodb_file_format; -set global innodb_file_per_table=@old_innodb_file_per_table; +EVAL SET GLOBAL innodb_file_format=$file_format; +EVAL SET GLOBAL innodb_file_per_table=$file_per_table; diff --git a/mysql-test/innodb_bug36172.test b/mysql-test/innodb_bug36172.test index d2e79a90710..c6c4e6fae47 100644 --- a/mysql-test/innodb_bug36172.test +++ b/mysql-test/innodb_bug36172.test @@ -13,9 +13,10 @@ SET storage_engine=InnoDB; -- disable_query_log -- disable_result_log -set @old_innodb_file_per_table=@@innodb_file_per_table; -set @old_innodb_file_format=@@innodb_file_format; +let $file_format=`select @@innodb_file_format`; +let $file_format_check=`select @@innodb_file_format_check`; +let $file_per_table=`select @@innodb_file_per_table`; SET GLOBAL innodb_file_format='Barracuda'; SET GLOBAL innodb_file_per_table=on; @@ -26,6 +27,6 @@ CHECK TABLE table0 EXTENDED; INSERT IGNORE INTO `table0` SET `col19` = '19940127002709', `col20` = 2383927.9055146948, `col21` = 4293243420.5621204000, `col22` = '20511211123705', `col23` = 4289899778.6573381000, `col24` = 4293449279.0540481000, `col25` = 'emphysemic', `col26` = 'dentally', `col27` = '2347406', `col28` = 'eruct', `col30` = 1222, `col31` = 4294372994.9941406000, `col32` = 4291385574.1173744000, `col33` = 'borrowing\'s', `col34` = 'septics', `col35` = 'ratter\'s', `col36` = 'Kaye', `col37` = 'Florentia', `col38` = 'allium', `col39` = 'barkeep', `col40` = '19510407003441', `col41` = 4293559200.4215522000, `col42` = 22482, `col43` = 'decussate', `col44` = 'Brom\'s', `col45` = 'violated', `col46` = 4925506.4635456400, `col47` = 930549, `col48` = '51296066', `col49` = 'voluminously', `col50` = '29306676', `col51` = -88, `col52` = -2153690, `col53` = 4290250202.1464887000, `col54` = 'expropriation', `col55` = 'Aberdeen\'s', `col56` = 20343, `col58` = '19640415171532', `col59` = 'extern', `col60` = 'Ubana', `col61` = 4290487961.8539081000, `col62` = '2147', `col63` = -24271, `col64` = '20750801194548', `col65` = 'Cunaxa\'s', `col66` = 'pasticcio', `col67` = 2795817, `col68` = 'Indore\'s', `col70` = 6864127, `col71` = '1817832', `col72` = '20540506114211', `col73` = '20040101012300', `col74` = 'rationalized', `col75` = '45522', `col76` = 'indene', `col77` = -6964559, `col78` = 4247535.5266884370, `col79` = '20720416124357', `col80` = '2143', `col81` = 4292060102.4466386000, `col82` = 'striving', `col83` = 'boneblack\'s', `col84` = 'redolent', `col85` = 6489697.9009369183, `col86` = 4287473465.9731131000, `col87` = 7726015, `col88` = 'perplexed', `col89` = '17153791', `col90` = 5478587.1108127078, `col91` = 4287091404.7004304000, `col92` = 'Boulez\'s', `col93` = '2931278'; CHECK TABLE table0 EXTENDED; DROP TABLE table0; -set global innodb_file_per_table=@old_innodb_file_per_table; -set global innodb_file_format=@old_innodb_file_format; -set global innodb_file_format_check=Antelope; +EVAL SET GLOBAL innodb_file_format=$file_format; +EVAL SET GLOBAL innodb_file_format_check=$file_format_check; +EVAL SET GLOBAL innodb_file_per_table=$file_per_table; diff --git a/mysql-test/innodb_bug42101-nonzero-master.opt b/mysql-test/innodb_bug42101-nonzero-master.opt index d71dbe17d5b..455d66a06b8 100644 --- a/mysql-test/innodb_bug42101-nonzero-master.opt +++ b/mysql-test/innodb_bug42101-nonzero-master.opt @@ -1 +1 @@ ---innodb_commit_concurrency=1 +--loose_innodb_commit_concurrency=1 diff --git a/mysql-test/innodb_bug44369.result b/mysql-test/innodb_bug44369.result new file mode 100644 index 00000000000..ff25c774aa2 --- /dev/null +++ b/mysql-test/innodb_bug44369.result @@ -0,0 +1,6 @@ +create table bug44369 (DB_ROW_ID int) engine=innodb; +ERROR 42000: Incorrect column name 'DB_ROW_ID' +create table bug44369 (db_row_id int) engine=innodb; +ERROR 42000: Incorrect column name 'db_row_id' +create table bug44369 (db_TRX_Id int) engine=innodb; +ERROR 42000: Incorrect column name 'db_TRX_Id' diff --git a/mysql-test/innodb_bug44369.test b/mysql-test/innodb_bug44369.test new file mode 100644 index 00000000000..f5d85cd5815 --- /dev/null +++ b/mysql-test/innodb_bug44369.test @@ -0,0 +1,17 @@ +# This is the test for bug 44369. We should +# block table creation with columns match +# some innodb internal reserved key words, +# both case sensitively and insensitely. + +--source include/have_innodb.inc + +# This create table operation should fail. +--error ER_WRONG_COLUMN_NAME +create table bug44369 (DB_ROW_ID int) engine=innodb; + +# This create should fail as well +--error ER_WRONG_COLUMN_NAME +create table bug44369 (db_row_id int) engine=innodb; + +--error ER_WRONG_COLUMN_NAME +create table bug44369 (db_TRX_Id int) engine=innodb; diff --git a/mysql-test/innodb_bug44571.result b/mysql-test/innodb_bug44571.result new file mode 100644 index 00000000000..955b55ac673 --- /dev/null +++ b/mysql-test/innodb_bug44571.result @@ -0,0 +1,7 @@ +CREATE TABLE bug44571 (foo INT) ENGINE=InnoDB; +ALTER TABLE bug44571 CHANGE foo bar INT; +ALTER TABLE bug44571 ADD INDEX bug44571b (foo); +ERROR 42000: Key column 'foo' doesn't exist in table +ALTER TABLE bug44571 ADD INDEX bug44571b (bar); +CREATE INDEX bug44571c ON bug44571 (bar); +DROP TABLE bug44571; diff --git a/mysql-test/innodb_bug44571.test b/mysql-test/innodb_bug44571.test new file mode 100644 index 00000000000..f5d79e3070a --- /dev/null +++ b/mysql-test/innodb_bug44571.test @@ -0,0 +1,13 @@ +# +# Bug#44571 InnoDB Plugin crashes on ADD INDEX +# http://bugs.mysql.com/44571 +# +-- source include/have_innodb.inc + +CREATE TABLE bug44571 (foo INT) ENGINE=InnoDB; +ALTER TABLE bug44571 CHANGE foo bar INT; +-- error ER_KEY_COLUMN_DOES_NOT_EXITS +ALTER TABLE bug44571 ADD INDEX bug44571b (foo); +ALTER TABLE bug44571 ADD INDEX bug44571b (bar); +CREATE INDEX bug44571c ON bug44571 (bar); +DROP TABLE bug44571; diff --git a/mysql-test/innodb_bug46000.result b/mysql-test/innodb_bug46000.result new file mode 100644 index 00000000000..c8e3db8d641 --- /dev/null +++ b/mysql-test/innodb_bug46000.result @@ -0,0 +1,19 @@ +create table bug46000(`id` int,key `GEN_CLUST_INDEX`(`id`))engine=innodb; +ERROR 42000: Incorrect index name 'GEN_CLUST_INDEX' +create table bug46000(`id` int, key `GEN_clust_INDEX`(`id`))engine=innodb; +ERROR 42000: Incorrect index name 'GEN_CLUST_INDEX' +show warnings; +Level Code Message +Warning 1280 Cannot Create Index with name 'GEN_CLUST_INDEX'. The name is reserved for the system default primary index. +Error 1280 Incorrect index name 'GEN_CLUST_INDEX' +Error 1005 Can't create table 'test.bug46000' (errno: -1) +create table bug46000(id int) engine=innodb; +create index GEN_CLUST_INDEX on bug46000(id); +ERROR 42000: Incorrect index name 'GEN_CLUST_INDEX' +show warnings; +Level Code Message +Warning 1280 Cannot Create Index with name 'GEN_CLUST_INDEX'. The name is reserved for the system default primary index. +Error 1280 Incorrect index name 'GEN_CLUST_INDEX' +Error 1030 Got error -1 from storage engine +create index idx on bug46000(id); +drop table bug46000; diff --git a/mysql-test/innodb_bug46000.test b/mysql-test/innodb_bug46000.test new file mode 100644 index 00000000000..5a3c666326e --- /dev/null +++ b/mysql-test/innodb_bug46000.test @@ -0,0 +1,32 @@ +# This is the test for bug 46000. We shall +# block any index creation with the name of +# "GEN_CLUST_INDEX", which is the reserved +# name for innodb default primary index. + +--source include/have_innodb.inc + +# This 'create table' operation should fail because of +# using the reserve name as its index name. +--error ER_WRONG_NAME_FOR_INDEX +create table bug46000(`id` int,key `GEN_CLUST_INDEX`(`id`))engine=innodb; + +# Mixed upper/lower case of the reserved key words +--error ER_WRONG_NAME_FOR_INDEX +create table bug46000(`id` int, key `GEN_clust_INDEX`(`id`))engine=innodb; + +show warnings; + +create table bug46000(id int) engine=innodb; + +# This 'create index' operation should fail. +--error ER_WRONG_NAME_FOR_INDEX +create index GEN_CLUST_INDEX on bug46000(id); + +show warnings; + +# This 'create index' operation should succeed, no +# temp table left from last failed create index +# operation. +create index idx on bug46000(id); + +drop table bug46000; diff --git a/mysql-test/innodb_bug46676.result b/mysql-test/innodb_bug46676.result new file mode 100644 index 00000000000..996799ce931 --- /dev/null +++ b/mysql-test/innodb_bug46676.result @@ -0,0 +1,9 @@ +SET foreign_key_checks=0; +CREATE TABLE t1 (id int, foreign key (id) references t2(id)) ENGINE=INNODB; +CREATE TABLE t2 (id int, foreign key (id) references t1(id)) ENGINE=INNODB; +SET foreign_key_checks=1; +SELECT COUNT(*) FROM information_schema.key_column_usage WHERE REFERENCED_TABLE_NAME in ('t1', 't2'); +COUNT(*) +2 +SET foreign_key_checks=0; +DROP TABLE t1, t2; diff --git a/mysql-test/innodb_bug46676.test b/mysql-test/innodb_bug46676.test new file mode 100644 index 00000000000..440666c4226 --- /dev/null +++ b/mysql-test/innodb_bug46676.test @@ -0,0 +1,16 @@ +# This is the test for bug 46676: mysqld got exception 0xc0000005 +# It is reproducible with InnoDB plugin 1.0.4 + MySQL 5.1.37. +# But no longer reproducible after MySQL 5.1.38 (with plugin 1.0.5). + +--source include/have_innodb.inc + +SET foreign_key_checks=0; +CREATE TABLE t1 (id int, foreign key (id) references t2(id)) ENGINE=INNODB; +CREATE TABLE t2 (id int, foreign key (id) references t1(id)) ENGINE=INNODB; +SET foreign_key_checks=1; + +# Server crashes +SELECT COUNT(*) FROM information_schema.key_column_usage WHERE REFERENCED_TABLE_NAME in ('t1', 't2'); + +SET foreign_key_checks=0; +DROP TABLE t1, t2; diff --git a/mysql-test/innodb_bug47167.result b/mysql-test/innodb_bug47167.result new file mode 100644 index 00000000000..cbec363d78f --- /dev/null +++ b/mysql-test/innodb_bug47167.result @@ -0,0 +1,24 @@ +set @old_innodb_file_format_check=@@innodb_file_format_check; +select @old_innodb_file_format_check; +@old_innodb_file_format_check +Antelope +set global innodb_file_format_check = Barracuda; +select @@innodb_file_format_check; +@@innodb_file_format_check +Barracuda +set global innodb_file_format_check = DEFAULT; +select @@innodb_file_format_check; +@@innodb_file_format_check +Barracuda +set global innodb_file_format_check = @old_innodb_file_format_check; +select @@innodb_file_format_check; +@@innodb_file_format_check +Antelope +set global innodb_file_format_check = cheetah; +ERROR HY000: Incorrect arguments to SET +set global innodb_file_format_check = Bear; +ERROR HY000: Incorrect arguments to SET +set global innodb_file_format_check = on; +ERROR HY000: Incorrect arguments to SET +set global innodb_file_format_check = off; +ERROR HY000: Incorrect arguments to SET diff --git a/mysql-test/innodb_bug47167.test b/mysql-test/innodb_bug47167.test new file mode 100644 index 00000000000..88e927c01bd --- /dev/null +++ b/mysql-test/innodb_bug47167.test @@ -0,0 +1,45 @@ +# This is the unit test for bug *47167. +# It tests setting the global variable +# "innodb_file_format_check" with a +# user-Defined Variable. + +--source include/have_innodb.inc + +# Save the value (Antelope) in 'innodb_file_format_check' to +# 'old_innodb_file_format_check' +set @old_innodb_file_format_check=@@innodb_file_format_check; + +# @old_innodb_file_format_check shall have the value of 'Antelope' +select @old_innodb_file_format_check; + +# Reset the value in 'innodb_file_format_check' to 'Barracuda' +set global innodb_file_format_check = Barracuda; + +select @@innodb_file_format_check; + +# Set 'innodb_file_format_check' to its default value, which +# is the latest file format supported in the current release. +set global innodb_file_format_check = DEFAULT; + +select @@innodb_file_format_check; + +# Put the saved value back to 'innodb_file_format_check' +set global innodb_file_format_check = @old_innodb_file_format_check; + +# Check whether 'innodb_file_format_check' get its original value. +select @@innodb_file_format_check; + +# Following are negative tests, all should fail. +--disable_warnings +--error ER_WRONG_ARGUMENTS +set global innodb_file_format_check = cheetah; + +--error ER_WRONG_ARGUMENTS +set global innodb_file_format_check = Bear; + +--error ER_WRONG_ARGUMENTS +set global innodb_file_format_check = on; + +--error ER_WRONG_ARGUMENTS +set global innodb_file_format_check = off; +--enable_warnings diff --git a/mysql-test/innodb_bug47777.result b/mysql-test/innodb_bug47777.result new file mode 100644 index 00000000000..fbba47edcfc --- /dev/null +++ b/mysql-test/innodb_bug47777.result @@ -0,0 +1,13 @@ +create table bug47777(c2 linestring not null, primary key (c2(1))) engine=innodb; +insert into bug47777 values (geomfromtext('linestring(1 2,3 4,5 6,7 8,9 10)')); +select count(*) from bug47777 where c2 =geomfromtext('linestring(1 2,3 4,5 6,7 8,9 10)'); +count(*) +1 +update bug47777 set c2=GeomFromText('POINT(1 1)'); +select count(*) from bug47777 where c2 =geomfromtext('linestring(1 2,3 4,5 6,7 8,9 10)'); +count(*) +0 +select count(*) from bug47777 where c2 = GeomFromText('POINT(1 1)'); +count(*) +1 +drop table bug47777; diff --git a/mysql-test/innodb_bug47777.test b/mysql-test/innodb_bug47777.test new file mode 100644 index 00000000000..8f2985b2cf0 --- /dev/null +++ b/mysql-test/innodb_bug47777.test @@ -0,0 +1,24 @@ +# This is the test for bug 47777. GEOMETRY +# data is treated as BLOB data in innodb. +# Consequently, its key value generation/storing +# should follow the process for the BLOB +# datatype as well. + +--source include/have_innodb.inc + +create table bug47777(c2 linestring not null, primary key (c2(1))) engine=innodb; + +insert into bug47777 values (geomfromtext('linestring(1 2,3 4,5 6,7 8,9 10)')); + +# Verify correct row get inserted. +select count(*) from bug47777 where c2 =geomfromtext('linestring(1 2,3 4,5 6,7 8,9 10)'); + +# Update table bug47777 should be successful. +update bug47777 set c2=GeomFromText('POINT(1 1)'); + +# Verify the row get updated successfully. The original +# c2 value should be changed to GeomFromText('POINT(1 1)'). +select count(*) from bug47777 where c2 =geomfromtext('linestring(1 2,3 4,5 6,7 8,9 10)'); +select count(*) from bug47777 where c2 = GeomFromText('POINT(1 1)'); + +drop table bug47777; diff --git a/mysql-test/innodb_file_format.result b/mysql-test/innodb_file_format.result index fbc67ada1bb..86d60706084 100644 --- a/mysql-test/innodb_file_format.result +++ b/mysql-test/innodb_file_format.result @@ -1,4 +1,3 @@ -call mtr.add_suppression("InnoDB: invalid innodb_file_format_check value"); select @@innodb_file_format; @@innodb_file_format Antelope @@ -31,8 +30,6 @@ select @@innodb_file_format_check; @@innodb_file_format_check Barracuda set global innodb_file_format_check=default; -Warnings: -Warning 1210 Ignoring SET innodb_file_format=on select @@innodb_file_format_check; @@innodb_file_format_check Barracuda @@ -43,3 +40,4 @@ ERROR HY000: Incorrect arguments to SET select @@innodb_file_format_check; @@innodb_file_format_check Barracuda +set global innodb_file_format_check=antelope; diff --git a/mysql-test/innodb_file_format.test b/mysql-test/innodb_file_format.test index 3bd1dd2fa6f..d63c9b0228f 100644 --- a/mysql-test/innodb_file_format.test +++ b/mysql-test/innodb_file_format.test @@ -1,10 +1,5 @@ -- source include/have_innodb.inc -call mtr.add_suppression("InnoDB: invalid innodb_file_format_check value"); - -let $format=`select @@innodb_file_format`; -let $innodb_file_format_check_orig=`select @@innodb_file_format_check`; - select @@innodb_file_format; select @@innodb_file_format_check; set global innodb_file_format=antelope; @@ -31,12 +26,4 @@ set global innodb_file_format=on; --error ER_WRONG_ARGUMENTS set global innodb_file_format=off; select @@innodb_file_format_check; - -# -# 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_format_check=$innodb_file_format_check_orig; --- enable_query_log +set global innodb_file_format_check=antelope; diff --git a/mysql-test/innodb_information_schema.test b/mysql-test/innodb_information_schema.test index eaed653854a..fc1d38d8d14 100644 --- a/mysql-test/innodb_information_schema.test +++ b/mysql-test/innodb_information_schema.test @@ -109,14 +109,18 @@ SELECT * FROM ```t'\"_str` WHERE c1 = '3' FOR UPDATE; -- send SELECT * FROM ```t'\"_str` WHERE c1 = '4' FOR UPDATE; -# Give time to the above 2 queries to execute before continuing. -# Without this sleep it sometimes happens that the SELECT from innodb_locks -# executes before some of them, resulting in less than expected number -# of rows being selected from innodb_locks. --- sleep 0.1 - -- enable_result_log -- connection con_verify_innodb_locks +# Wait for the above queries to execute before continuing. +# Without this, it sometimes happens that the SELECT from innodb_locks +# executes before some of them, resulting in less than expected number +# of rows being selected from innodb_locks. If there is a bug and there +# are no 14 rows in innodb_locks then this test will fail with timeout. +let $count = 14; +let $table = INFORMATION_SCHEMA.INNODB_LOCKS; +-- source include/wait_until_rows_count.inc +# the above enables the query log, re-disable it +-- disable_query_log SELECT lock_mode, lock_type, lock_table, lock_index, lock_rec, lock_data FROM INFORMATION_SCHEMA.INNODB_LOCKS ORDER BY lock_data; diff --git a/mysql-test/patches/disabled.def.diff b/mysql-test/patches/disabled.def.diff index b8b3ed2d02d..58466e2b6db 100644 --- a/mysql-test/patches/disabled.def.diff +++ b/mysql-test/patches/disabled.def.diff @@ -1,8 +1,8 @@ ---- mysql-test/t/disabled.def.orig 2009-10-25 05:54:05.000000000 +0000 -+++ mysql-test/t/disabled.def 2009-10-25 05:54:25.000000000 +0000 -@@ -14,3 +14,5 @@ +--- mysql-test/t/disabled.def.orig 2009-12-16 13:21:00.000000000 -0500 ++++ mysql-test/t/disabled.def 2010-01-03 11:58:54.000000000 -0500 +@@ -13,3 +13,5 @@ query_cache_28249 : Bug#43861 2009-03-25 main.query_cache_28249 fails sporadically - partition_innodb_builtin : Bug#32430 2009-09-25 mattiasj Waiting for push of Innodb changes - partition_innodb_plugin : Bug#32430 2009-09-25 mattiasj Waiting for push of Innodb changes + rpl_killed_ddl : Bug#45520: rpl_killed_ddl fails sporadically in pb2 + innodb-autoinc : Bug#49267 2009-12-02 test fails on windows because of different case mode +read_many_rows_innodb : Bug#433409 2009-09-20 the test fails on 5.1.37 https://bugs.launchpad.net/bugs/433409 -+innodb-zip : Bug#47495 2009-09-21 the test fails on ubuntu ++log_tables-big : Bug#48646 2009-12-12 mysql-test main.log_tables-big fails on 5.1.40 diff --git a/mysql-test/patches/index_merge_innodb-explain.diff b/mysql-test/patches/index_merge_innodb-explain.diff new file mode 100644 index 00000000000..d1ed8afc778 --- /dev/null +++ b/mysql-test/patches/index_merge_innodb-explain.diff @@ -0,0 +1,31 @@ +InnoDB's estimate for the index cardinality depends on a pseudo random +number generator (it picks up random pages to sample). After an +optimization that was made in r2625 the following EXPLAINs started +returning a different number of rows (3 instead of 4). + +This patch adjusts the result file. + +This patch cannot be proposed to MySQL because the failures occur only +in this tree and do not occur in the standard InnoDB 5.1. Furthermore, +the file index_merge2.inc is used by other engines too. + +--- mysql-test/r/index_merge_innodb.result.orig 2008-09-30 18:32:13.000000000 +0300 ++++ mysql-test/r/index_merge_innodb.result 2008-09-30 18:33:01.000000000 +0300 +@@ -111,7 +111,7 @@ + explain select count(*) from t1 where + key1a = 2 and key1b is null and key2a = 2 and key2b is null; + id select_type table type possible_keys key key_len ref rows Extra +-1 SIMPLE t1 index_merge i1,i2 i1,i2 10,10 NULL 4 Using intersect(i1,i2); Using where; Using index ++1 SIMPLE t1 index_merge i1,i2 i1,i2 10,10 NULL 3 Using intersect(i1,i2); Using where; Using index + select count(*) from t1 where + key1a = 2 and key1b is null and key2a = 2 and key2b is null; + count(*) +@@ -119,7 +119,7 @@ + explain select count(*) from t1 where + key1a = 2 and key1b is null and key3a = 2 and key3b is null; + id select_type table type possible_keys key key_len ref rows Extra +-1 SIMPLE t1 index_merge i1,i3 i1,i3 10,10 NULL 4 Using intersect(i1,i3); Using where; Using index ++1 SIMPLE t1 index_merge i1,i3 i1,i3 10,10 NULL 3 Using intersect(i1,i3); Using where; Using index + select count(*) from t1 where + key1a = 2 and key1b is null and key3a = 2 and key3b is null; + count(*) diff --git a/mysql-test/patches/index_merge_innodb.diff b/mysql-test/patches/index_merge_innodb.diff deleted file mode 100644 index 3abfd0df523..00000000000 --- a/mysql-test/patches/index_merge_innodb.diff +++ /dev/null @@ -1,57 +0,0 @@ ---- mysql-test/r/index_merge_innodb.result.orig 2009-09-19 20:51:58.000000000 +0000 -+++ mysql-test/r/index_merge_innodb.result 2009-09-19 20:52:25.000000000 +0000 -@@ -111,7 +111,7 @@ - explain select count(*) from t1 where - key1a = 2 and key1b is null and key2a = 2 and key2b is null; - id select_type table type possible_keys key key_len ref rows Extra --1 SIMPLE t1 index_merge i1,i2 i1,i2 10,10 NULL 4 Using intersect(i1,i2); Using where; Using index -+1 SIMPLE t1 index_merge i1,i2 i1,i2 10,10 NULL REF Using intersect(i1,i2); Using where; Using index - select count(*) from t1 where - key1a = 2 and key1b is null and key2a = 2 and key2b is null; - count(*) -@@ -119,7 +119,7 @@ - explain select count(*) from t1 where - key1a = 2 and key1b is null and key3a = 2 and key3b is null; - id select_type table type possible_keys key key_len ref rows Extra --1 SIMPLE t1 index_merge i1,i3 i1,i3 10,10 NULL 4 Using intersect(i1,i3); Using where; Using index -+1 SIMPLE t1 index_merge i1,i3 i1,i3 10,10 NULL REF Using intersect(i1,i3); Using where; Using index - select count(*) from t1 where - key1a = 2 and key1b is null and key3a = 2 and key3b is null; - count(*) ---- mysql-test/include/index_merge2.inc.orig 2009-09-19 20:50:04.000000000 +0000 -+++ mysql-test/include/index_merge2.inc 2009-09-19 21:03:11.000000000 +0000 -@@ -122,12 +122,14 @@ - analyze table t1; - select count(*) from t1; - -+--replace_column 9 REF - explain select count(*) from t1 where - key1a = 2 and key1b is null and key2a = 2 and key2b is null; - - select count(*) from t1 where - key1a = 2 and key1b is null and key2a = 2 and key2b is null; - -+--replace_column 9 REF - explain select count(*) from t1 where - key1a = 2 and key1b is null and key3a = 2 and key3b is null; - ---- mysql-test/r/index_merge_myisam.result.orig 2009-09-20 07:00:29.000000000 +0000 -+++ mysql-test/r/index_merge_myisam.result 2009-09-20 07:00:48.000000000 +0000 -@@ -945,7 +945,7 @@ - explain select count(*) from t1 where - key1a = 2 and key1b is null and key2a = 2 and key2b is null; - id select_type table type possible_keys key key_len ref rows Extra --1 SIMPLE t1 index_merge i1,i2 i1,i2 10,10 NULL 2 Using intersect(i1,i2); Using where; Using index -+1 SIMPLE t1 index_merge i1,i2 i1,i2 10,10 NULL REF Using intersect(i1,i2); Using where; Using index - select count(*) from t1 where - key1a = 2 and key1b is null and key2a = 2 and key2b is null; - count(*) -@@ -953,7 +953,7 @@ - explain select count(*) from t1 where - key1a = 2 and key1b is null and key3a = 2 and key3b is null; - id select_type table type possible_keys key key_len ref rows Extra --1 SIMPLE t1 index_merge i1,i3 i1,i3 10,10 NULL 2 Using intersect(i1,i3); Using where; Using index -+1 SIMPLE t1 index_merge i1,i3 i1,i3 10,10 NULL REF Using intersect(i1,i3); Using where; Using index - select count(*) from t1 where - key1a = 2 and key1b is null and key3a = 2 and key3b is null; - count(*) diff --git a/mysql-test/patches/information_schema.diff b/mysql-test/patches/information_schema.diff index 38111fbbe98..a91eac75cff 100644 --- a/mysql-test/patches/information_schema.diff +++ b/mysql-test/patches/information_schema.diff @@ -1,5 +1,5 @@ ---- mysql-test/r/information_schema.result.orig 2009-11-09 11:19:50.000000000 -0800 -+++ mysql-test/r/information_schema.result 2009-11-09 11:21:21.000000000 -0800 +--- mysql-test/r/information_schema.result.orig 2009-12-04 16:08:19.000000000 +0900 ++++ mysql-test/r/information_schema.result 2009-12-04 16:09:12.000000000 +0900 @@ -71,6 +71,21 @@ TRIGGERS USER_PRIVILEGES @@ -130,3 +130,73 @@ create table t1(f1 int); create view v1 as select f1+1 as a from t1; create table t2 (f1 int, f2 int); +--- mysql-test/r/information_schema_db.result.orig 2009-12-04 16:08:03.000000000 +0900 ++++ mysql-test/r/information_schema_db.result 2009-12-04 16:09:28.000000000 +0900 +@@ -33,6 +33,21 @@ + TRIGGERS + USER_PRIVILEGES + VIEWS ++INNODB_BUFFER_POOL_PAGES_INDEX ++INNODB_RSEG ++INNODB_LOCKS ++INNODB_BUFFER_POOL_PAGES ++XTRADB_ENHANCEMENTS ++INNODB_TRX ++XTRADB_ADMIN_COMMAND ++INNODB_LOCK_WAITS ++INNODB_CMP_RESET ++INNODB_CMP ++INNODB_CMPMEM_RESET ++INNODB_TABLE_STATS ++INNODB_CMPMEM ++INNODB_INDEX_STATS ++INNODB_BUFFER_POOL_PAGES_BLOB + show tables from INFORMATION_SCHEMA like 'T%'; + Tables_in_information_schema (T%) + TABLES +--- mysql-test/r/mysqlshow.result.orig 2009-12-04 16:07:43.000000000 +0900 ++++ mysql-test/r/mysqlshow.result 2009-12-04 16:09:40.000000000 +0900 +@@ -107,6 +107,21 @@ + | TRIGGERS | + | USER_PRIVILEGES | + | VIEWS | ++| INNODB_BUFFER_POOL_PAGES_INDEX | ++| INNODB_RSEG | ++| INNODB_LOCKS | ++| INNODB_BUFFER_POOL_PAGES | ++| XTRADB_ENHANCEMENTS | ++| INNODB_TRX | ++| XTRADB_ADMIN_COMMAND | ++| INNODB_LOCK_WAITS | ++| INNODB_CMP_RESET | ++| INNODB_CMP | ++| INNODB_CMPMEM_RESET | ++| INNODB_TABLE_STATS | ++| INNODB_CMPMEM | ++| INNODB_INDEX_STATS | ++| INNODB_BUFFER_POOL_PAGES_BLOB | + +---------------------------------------+ + Database: INFORMATION_SCHEMA + +---------------------------------------+ +@@ -140,6 +155,21 @@ + | TRIGGERS | + | USER_PRIVILEGES | + | VIEWS | ++| INNODB_BUFFER_POOL_PAGES_INDEX | ++| INNODB_RSEG | ++| INNODB_LOCKS | ++| INNODB_BUFFER_POOL_PAGES | ++| XTRADB_ENHANCEMENTS | ++| INNODB_TRX | ++| XTRADB_ADMIN_COMMAND | ++| INNODB_LOCK_WAITS | ++| INNODB_CMP_RESET | ++| INNODB_CMP | ++| INNODB_CMPMEM_RESET | ++| INNODB_TABLE_STATS | ++| INNODB_CMPMEM | ++| INNODB_INDEX_STATS | ++| INNODB_BUFFER_POOL_PAGES_BLOB | + +---------------------------------------+ + Wildcard: inf_rmation_schema + +--------------------+ diff --git a/mysql-test/patches/information_schema_db.diff b/mysql-test/patches/information_schema_db.diff deleted file mode 100644 index 1f93612b318..00000000000 --- a/mysql-test/patches/information_schema_db.diff +++ /dev/null @@ -1,24 +0,0 @@ ---- mysql-test/r/information_schema_db.result.orig 2009-11-09 14:40:34.000000000 -0800 -+++ mysql-test/r/information_schema_db.result 2009-11-09 14:41:37.000000000 -0800 -@@ -33,6 +33,21 @@ - TRIGGERS - USER_PRIVILEGES - VIEWS -+INNODB_BUFFER_POOL_PAGES_INDEX -+INNODB_RSEG -+INNODB_LOCKS -+INNODB_BUFFER_POOL_PAGES -+XTRADB_ENHANCEMENTS -+INNODB_TRX -+XTRADB_ADMIN_COMMAND -+INNODB_LOCK_WAITS -+INNODB_CMP_RESET -+INNODB_CMP -+INNODB_CMPMEM_RESET -+INNODB_TABLE_STATS -+INNODB_CMPMEM -+INNODB_INDEX_STATS -+INNODB_BUFFER_POOL_PAGES_BLOB - show tables from INFORMATION_SCHEMA like 'T%'; - Tables_in_information_schema (T%) - TABLES diff --git a/mysql-test/patches/innodb_bug46000.diff b/mysql-test/patches/innodb_bug46000.diff deleted file mode 100644 index d57cbde387e..00000000000 --- a/mysql-test/patches/innodb_bug46000.diff +++ /dev/null @@ -1,26 +0,0 @@ ---- mysql-test/r/innodb_bug46000.result.orig 2009-10-07 03:21:43.000000000 +0900 -+++ mysql-test/r/innodb_bug46000.result 2009-10-28 14:08:55.000000000 +0900 -@@ -8,10 +8,10 @@ - Error 1005 Can't create table 'test.bug46000' (errno: -1) - create table bug46000(id int) engine=innodb; - create index GEN_CLUST_INDEX on bug46000(id); --ERROR HY000: Can't create table '#sql-temporary' (errno: -1) -+ERROR HY000: Got error 1005 from storage engine - show errors; - Level Code Message - Error 1005 Cannot Create Index with name 'GEN_CLUST_INDEX'. The name is reserved for the system default primary index. --Error 1005 Can't create table '#sql-temporary' (errno: -1) -+Error 1030 Got error 1005 from storage engine - create index idx on bug46000(id); - drop table bug46000; ---- mysql-test/t/innodb_bug46000.test.orig 2009-10-07 03:21:12.000000000 +0900 -+++ mysql-test/t/innodb_bug46000.test 2009-10-28 14:08:37.000000000 +0900 -@@ -20,7 +20,7 @@ - - # This 'create index' operation should fail. - --replace_regex /'[^']*test.#sql-[0-9a-f_]*'/'#sql-temporary'/ ----error ER_CANT_CREATE_TABLE -+--error ER_GET_ERRNO - create index GEN_CLUST_INDEX on bug46000(id); - - --replace_regex /'[^']*test.#sql-[0-9a-f_]*'/'#sql-temporary'/ diff --git a/mysql-test/patches/mysqlshow.diff b/mysql-test/patches/mysqlshow.diff deleted file mode 100644 index 78965e75da4..00000000000 --- a/mysql-test/patches/mysqlshow.diff +++ /dev/null @@ -1,46 +0,0 @@ ---- mysql-test/r/mysqlshow.result.orig 2009-11-09 15:17:43.000000000 -0800 -+++ mysql-test/r/mysqlshow.result 2009-11-09 15:17:53.000000000 -0800 -@@ -107,6 +107,21 @@ - | TRIGGERS | - | USER_PRIVILEGES | - | VIEWS | -+| INNODB_BUFFER_POOL_PAGES_INDEX | -+| INNODB_RSEG | -+| INNODB_LOCKS | -+| INNODB_BUFFER_POOL_PAGES | -+| XTRADB_ENHANCEMENTS | -+| INNODB_TRX | -+| XTRADB_ADMIN_COMMAND | -+| INNODB_LOCK_WAITS | -+| INNODB_CMP_RESET | -+| INNODB_CMP | -+| INNODB_CMPMEM_RESET | -+| INNODB_TABLE_STATS | -+| INNODB_CMPMEM | -+| INNODB_INDEX_STATS | -+| INNODB_BUFFER_POOL_PAGES_BLOB | - +---------------------------------------+ - Database: INFORMATION_SCHEMA - +---------------------------------------+ -@@ -140,6 +155,21 @@ - | TRIGGERS | - | USER_PRIVILEGES | - | VIEWS | -+| INNODB_BUFFER_POOL_PAGES_INDEX | -+| INNODB_RSEG | -+| INNODB_LOCKS | -+| INNODB_BUFFER_POOL_PAGES | -+| XTRADB_ENHANCEMENTS | -+| INNODB_TRX | -+| XTRADB_ADMIN_COMMAND | -+| INNODB_LOCK_WAITS | -+| INNODB_CMP_RESET | -+| INNODB_CMP | -+| INNODB_CMPMEM_RESET | -+| INNODB_TABLE_STATS | -+| INNODB_CMPMEM | -+| INNODB_INDEX_STATS | -+| INNODB_BUFFER_POOL_PAGES_BLOB | - +---------------------------------------+ - Wildcard: inf_rmation_schema - +--------------------+ -- cgit v1.2.1