diff options
author | unknown <knielsen@knielsen-hq.org> | 2009-11-13 22:26:08 +0100 |
---|---|---|
committer | unknown <knielsen@knielsen-hq.org> | 2009-11-13 22:26:08 +0100 |
commit | 898f6f48b79d1f2c334fb559225b2b0fade5ea93 (patch) | |
tree | 84df8eecd942b650f172cbd67050ee8984c0d52b /mysql-test | |
parent | 275c0a7f96502b33f763fb9388dcc1c289e4792b (diff) | |
parent | 2bde0c5e6d31583e5197e3b513f572a693161f62 (diff) | |
download | mariadb-git-898f6f48b79d1f2c334fb559225b2b0fade5ea93.tar.gz |
Merge XtraDB 8 into MariaDB.
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/r/innodb-autoinc.result | 22 | ||||
-rw-r--r-- | mysql-test/r/innodb-index.result | 36 | ||||
-rw-r--r-- | mysql-test/r/innodb.result | 6 | ||||
-rw-r--r-- | mysql-test/r/innodb_bug36169.result | 3 | ||||
-rw-r--r-- | mysql-test/r/innodb_bug44032.result (renamed from mysql-test/suite/innodb/r/innodb_bug44032.result) | 0 | ||||
-rw-r--r-- | mysql-test/r/innodb_file_format.result (renamed from mysql-test/suite/innodb/r/innodb_file_format.result) | 3 | ||||
-rw-r--r-- | mysql-test/t/innodb-autoinc.test | 20 | ||||
-rw-r--r-- | mysql-test/t/innodb-index.test | 24 | ||||
-rw-r--r-- | mysql-test/t/innodb.test | 6 | ||||
-rw-r--r-- | mysql-test/t/innodb_bug36169.test | 7 | ||||
-rw-r--r-- | mysql-test/t/innodb_bug36172.test | 4 | ||||
-rw-r--r-- | mysql-test/t/innodb_bug44032.test (renamed from mysql-test/suite/innodb/t/innodb_bug44032.test) | 0 | ||||
-rw-r--r-- | mysql-test/t/innodb_file_format.test (renamed from mysql-test/suite/innodb/t/innodb_file_format.test) | 15 |
13 files changed, 121 insertions, 25 deletions
diff --git a/mysql-test/r/innodb-autoinc.result b/mysql-test/r/innodb-autoinc.result index 8174ba52b41..bc6dddfdb74 100644 --- a/mysql-test/r/innodb-autoinc.result +++ b/mysql-test/r/innodb-autoinc.result @@ -867,3 +867,25 @@ INSERT INTO t2 SELECT NULL FROM t1; Got one of the listed errors DROP TABLE t1; DROP TABLE t2; +CREATE TABLE t1 (c1 INT PRIMARY KEY AUTO_INCREMENT) ENGINE=InnoDB; +INSERT INTO t1 VALUES (null); +INSERT INTO t1 VALUES (null); +ALTER TABLE t1 CHANGE c1 d1 INT NOT NULL AUTO_INCREMENT; +SELECT * FROM t1; +d1 +1 +3 +SELECT * FROM t1; +d1 +1 +3 +INSERT INTO t1 VALUES(null); +Got one of the listed errors +ALTER TABLE t1 AUTO_INCREMENT = 3; +INSERT INTO t1 VALUES(null); +SELECT * FROM t1; +d1 +1 +3 +4 +DROP TABLE t1; diff --git a/mysql-test/r/innodb-index.result b/mysql-test/r/innodb-index.result index cfa44e03bfb..dd4f926e524 100644 --- a/mysql-test/r/innodb-index.result +++ b/mysql-test/r/innodb-index.result @@ -1134,4 +1134,40 @@ t2 CREATE TABLE `t2` ( ) ENGINE=InnoDB DEFAULT CHARSET=latin1 DROP TABLE t2; DROP TABLE t1; +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; +SELECT * FROM t1; +a b +3 a +3 b +1 c +0 d +1 e +CREATE INDEX t1a ON t1(a); +SELECT * FROM t1; +a b +3 a +3 b +1 c +0 d +1 e +SELECT * FROM t1 FORCE INDEX(t1a) ORDER BY a; +ERROR HY000: Table definition has changed, please retry transaction +SELECT * FROM t1; +a b +3 a +3 b +1 c +0 d +1 e +COMMIT; +SELECT * FROM t1 FORCE INDEX(t1a) ORDER BY a; +a b +0 d +1 c +1 e +3 a +3 b +DROP TABLE t1; SET GLOBAL innodb_file_format_check=@save_innodb_file_format_check; diff --git a/mysql-test/r/innodb.result b/mysql-test/r/innodb.result index 44c436e00ff..845083af478 100644 --- a/mysql-test/r/innodb.result +++ b/mysql-test/r/innodb.result @@ -1738,7 +1738,7 @@ count(*) drop table t1; SELECT variable_value FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_buffer_pool_pages_total'; variable_value -511 +8191 SELECT variable_value FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_page_size'; variable_value 16384 @@ -1766,9 +1766,10 @@ variable_value - @innodb_row_lock_time_max_orig SELECT variable_value - @innodb_row_lock_time_avg_orig FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_row_lock_time_avg'; variable_value - @innodb_row_lock_time_avg_orig 0 +SET @innodb_sync_spin_loops_orig = @@innodb_sync_spin_loops; show variables like "innodb_sync_spin_loops"; Variable_name Value -innodb_sync_spin_loops 20 +innodb_sync_spin_loops 30 set global innodb_sync_spin_loops=1000; show variables like "innodb_sync_spin_loops"; Variable_name Value @@ -1781,6 +1782,7 @@ set global innodb_sync_spin_loops=20; show variables like "innodb_sync_spin_loops"; Variable_name Value innodb_sync_spin_loops 20 +set global innodb_sync_spin_loops=@innodb_sync_spin_loops_orig; SET @old_innodb_thread_concurrency= @@global.innodb_thread_concurrency; show variables like "innodb_thread_concurrency"; Variable_name Value diff --git a/mysql-test/r/innodb_bug36169.result b/mysql-test/r/innodb_bug36169.result index 48f5895bdbd..0f43ab23f7a 100644 --- a/mysql-test/r/innodb_bug36169.result +++ b/mysql-test/r/innodb_bug36169.result @@ -1,5 +1,4 @@ -set @old_innodb_file_per_table=@@innodb_file_per_table; set @old_innodb_file_format=@@innodb_file_format; -set @old_innodb_file_format_check=@@innodb_file_format_check; +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/suite/innodb/r/innodb_bug44032.result b/mysql-test/r/innodb_bug44032.result index da2a000b06e..da2a000b06e 100644 --- a/mysql-test/suite/innodb/r/innodb_bug44032.result +++ b/mysql-test/r/innodb_bug44032.result diff --git a/mysql-test/suite/innodb/r/innodb_file_format.result b/mysql-test/r/innodb_file_format.result index 9cfac5f001c..45285542936 100644 --- a/mysql-test/suite/innodb/r/innodb_file_format.result +++ b/mysql-test/r/innodb_file_format.result @@ -1,3 +1,4 @@ +set @old_innodb_file_format=@@innodb_file_format; select @@innodb_file_format; @@innodb_file_format Antelope @@ -42,3 +43,5 @@ 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/t/innodb-autoinc.test b/mysql-test/t/innodb-autoinc.test index 87ad470949d..88facb2855c 100644 --- a/mysql-test/t/innodb-autoinc.test +++ b/mysql-test/t/innodb-autoinc.test @@ -478,3 +478,23 @@ INSERT INTO t2 SELECT c1 FROM t1; INSERT INTO t2 SELECT NULL FROM t1; DROP TABLE t1; 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 +CREATE TABLE t1 (c1 INT PRIMARY KEY AUTO_INCREMENT) ENGINE=InnoDB; +INSERT INTO t1 VALUES (null); +INSERT INTO t1 VALUES (null); +ALTER TABLE t1 CHANGE c1 d1 INT NOT NULL AUTO_INCREMENT; +SELECT * FROM t1; +# Restart the server +-- source include/restart_mysqld.inc +# The MySQL and InnoDB data dictionaries should now be out of sync. +# The select should print message to the error log +SELECT * FROM t1; +-- error ER_AUTOINC_READ_FAILED,1467 +INSERT INTO t1 VALUES(null); +ALTER TABLE t1 AUTO_INCREMENT = 3; +INSERT INTO t1 VALUES(null); +SELECT * FROM t1; +DROP TABLE t1; diff --git a/mysql-test/t/innodb-index.test b/mysql-test/t/innodb-index.test index dd2c7f3f3c3..63fc5d5c7ad 100644 --- a/mysql-test/t/innodb-index.test +++ b/mysql-test/t/innodb-index.test @@ -515,4 +515,28 @@ SHOW CREATE TABLE t2; DROP TABLE t2; DROP TABLE t1; + +connect (a,localhost,root,,); +connect (b,localhost,root,,); +connection a; +CREATE TABLE t1 (a INT, b CHAR(1)) ENGINE=InnoDB; +INSERT INTO t1 VALUES (3,'a'),(3,'b'),(1,'c'),(0,'d'),(1,'e'); +connection b; +BEGIN; +SELECT * FROM t1; +connection a; +CREATE INDEX t1a ON t1(a); +connection b; +SELECT * FROM t1; +--error ER_TABLE_DEF_CHANGED +SELECT * FROM t1 FORCE INDEX(t1a) ORDER BY a; +SELECT * FROM t1; +COMMIT; +SELECT * FROM t1 FORCE INDEX(t1a) ORDER BY a; +connection default; +disconnect a; +disconnect b; + +DROP TABLE t1; + SET GLOBAL innodb_file_format_check=@save_innodb_file_format_check; diff --git a/mysql-test/t/innodb.test b/mysql-test/t/innodb.test index 220621a3576..6eb32b554bb 100644 --- a/mysql-test/t/innodb.test +++ b/mysql-test/t/innodb.test @@ -1321,7 +1321,7 @@ drop table t1; # InnoDB aligns the memory for the buffer pool to a page boundary. This may # cause actual pool size to be one less than requested depending on exact # alignment of obtained memory. ---replace_result 512 511 +--replace_result 8192 8191 SELECT variable_value FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_buffer_pool_pages_total'; SELECT variable_value FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_page_size'; SELECT variable_value - @innodb_rows_deleted_orig FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_rows_deleted'; @@ -1336,6 +1336,7 @@ SELECT variable_value - @innodb_row_lock_time_max_orig FROM information_schema.g SELECT variable_value - @innodb_row_lock_time_avg_orig FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_row_lock_time_avg'; # Test for innodb_sync_spin_loops variable +SET @innodb_sync_spin_loops_orig = @@innodb_sync_spin_loops; show variables like "innodb_sync_spin_loops"; set global innodb_sync_spin_loops=1000; show variables like "innodb_sync_spin_loops"; @@ -1343,6 +1344,7 @@ set global innodb_sync_spin_loops=0; show variables like "innodb_sync_spin_loops"; set global innodb_sync_spin_loops=20; show variables like "innodb_sync_spin_loops"; +set global innodb_sync_spin_loops=@innodb_sync_spin_loops_orig; # Test for innodb_thread_concurrency variable SET @old_innodb_thread_concurrency= @@global.innodb_thread_concurrency; @@ -2555,6 +2557,8 @@ CONNECTION default; SET GLOBAL innodb_thread_concurrency = @innodb_thread_concurrency_orig; +-- enable_query_log + ####################################################################### # # # Please, DO NOT TOUCH this file as well as the innodb.result file. # diff --git a/mysql-test/t/innodb_bug36169.test b/mysql-test/t/innodb_bug36169.test index b95e66fa34a..22a2f6ddada 100644 --- a/mysql-test/t/innodb_bug36169.test +++ b/mysql-test/t/innodb_bug36169.test @@ -4,9 +4,8 @@ # -- source include/have_innodb.inc -set @old_innodb_file_per_table=@@innodb_file_per_table; set @old_innodb_file_format=@@innodb_file_format; -set @old_innodb_file_format_check=@@innodb_file_format_check; +set @old_innodb_file_per_table=@@innodb_file_per_table; SET GLOBAL innodb_file_format='Barracuda'; SET GLOBAL innodb_file_per_table=ON; @@ -1156,7 +1155,5 @@ DROP TABLE IF EXISTS table4; DROP TABLE IF EXISTS table5; DROP TABLE IF EXISTS table6; -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=@old_innodb_file_format_check; - +set global innodb_file_per_table=@old_innodb_file_per_table; diff --git a/mysql-test/t/innodb_bug36172.test b/mysql-test/t/innodb_bug36172.test index 935e5c8d5c4..6fc6906be2f 100644 --- a/mysql-test/t/innodb_bug36172.test +++ b/mysql-test/t/innodb_bug36172.test @@ -15,7 +15,6 @@ SET storage_engine=InnoDB; -- disable_result_log set @old_innodb_file_per_table=@@innodb_file_per_table; set @old_innodb_file_format=@@innodb_file_format; -set @old_innodb_file_format_check=@@innodb_file_format_check; SET GLOBAL innodb_file_format='Barracuda'; SET GLOBAL innodb_file_per_table=on; @@ -30,5 +29,4 @@ 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=@old_innodb_file_format_check; - +set global innodb_file_format_check=Antelope; diff --git a/mysql-test/suite/innodb/t/innodb_bug44032.test b/mysql-test/t/innodb_bug44032.test index a963cb8b68f..a963cb8b68f 100644 --- a/mysql-test/suite/innodb/t/innodb_bug44032.test +++ b/mysql-test/t/innodb_bug44032.test diff --git a/mysql-test/suite/innodb/t/innodb_file_format.test b/mysql-test/t/innodb_file_format.test index 293e87a413e..62f8468a818 100644 --- a/mysql-test/suite/innodb/t/innodb_file_format.test +++ b/mysql-test/t/innodb_file_format.test @@ -1,8 +1,5 @@ -- source include/have_innodb.inc --- source suite/innodb/include/have_innodb_plugin.inc - -let $format=`select @@innodb_file_format`; -let $innodb_file_format_check_orig=`select @@innodb_file_format_check`; +set @old_innodb_file_format=@@innodb_file_format; select @@innodb_file_format; select @@innodb_file_format_check; @@ -31,11 +28,5 @@ set global innodb_file_format=on; 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=@old_innodb_file_format; +set global innodb_file_format_check=Antelope; |