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/t | |
parent | 275c0a7f96502b33f763fb9388dcc1c289e4792b (diff) | |
parent | 2bde0c5e6d31583e5197e3b513f572a693161f62 (diff) | |
download | mariadb-git-898f6f48b79d1f2c334fb559225b2b0fade5ea93.tar.gz |
Merge XtraDB 8 into MariaDB.
Diffstat (limited to 'mysql-test/t')
-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 | 13 | ||||
-rw-r--r-- | mysql-test/t/innodb_file_format.test | 32 |
7 files changed, 97 insertions, 9 deletions
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/t/innodb_bug44032.test b/mysql-test/t/innodb_bug44032.test new file mode 100644 index 00000000000..a963cb8b68f --- /dev/null +++ b/mysql-test/t/innodb_bug44032.test @@ -0,0 +1,13 @@ +# Bug44032 no update-in-place of UTF-8 columns in ROW_FORMAT=REDUNDANT +# (btr_cur_update_in_place not invoked when updating from/to NULL; +# the update is performed by delete and insert instead) + +-- source include/have_innodb.inc + +CREATE TABLE bug44032(c CHAR(3) CHARACTER SET UTF8) ROW_FORMAT=REDUNDANT +ENGINE=InnoDB; +INSERT INTO bug44032 VALUES('abc'),(0xEFBCA4EFBCA4EFBCA4); +UPDATE bug44032 SET c='DDD' WHERE c=0xEFBCA4EFBCA4EFBCA4; +UPDATE bug44032 SET c=NULL WHERE c='DDD'; +UPDATE bug44032 SET c='DDD' WHERE c IS NULL; +DROP TABLE bug44032; diff --git a/mysql-test/t/innodb_file_format.test b/mysql-test/t/innodb_file_format.test new file mode 100644 index 00000000000..62f8468a818 --- /dev/null +++ b/mysql-test/t/innodb_file_format.test @@ -0,0 +1,32 @@ +-- source include/have_innodb.inc +set @old_innodb_file_format=@@innodb_file_format; + +select @@innodb_file_format; +select @@innodb_file_format_check; +set global innodb_file_format=antelope; +set global innodb_file_format=barracuda; +--error ER_WRONG_ARGUMENTS +set global innodb_file_format=cheetah; +select @@innodb_file_format; +set global innodb_file_format=default; +select @@innodb_file_format; +--error ER_WRONG_ARGUMENTS +set global innodb_file_format=on; +--error ER_WRONG_ARGUMENTS +set global innodb_file_format=off; +select @@innodb_file_format; +set global innodb_file_format_check=antelope; +set global innodb_file_format_check=barracuda; +--error ER_WRONG_ARGUMENTS +set global innodb_file_format_check=cheetah; +select @@innodb_file_format_check; +set global innodb_file_format_check=default; +select @@innodb_file_format_check; +--error ER_WRONG_ARGUMENTS +set global innodb_file_format=on; +--error ER_WRONG_ARGUMENTS +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; |