diff options
author | Guilhem Bichot <guilhem@mysql.com> | 2009-08-07 22:04:53 +0200 |
---|---|---|
committer | Guilhem Bichot <guilhem@mysql.com> | 2009-08-07 22:04:53 +0200 |
commit | cffc4bd90b2d140dd7359440d706376c74c1042d (patch) | |
tree | c15df3a23bebcf9c6638bee8052c70225dca8ab8 /mysql-test | |
parent | 7ceb29ff17047a268d8e8670478f6e1669939904 (diff) | |
download | mariadb-git-cffc4bd90b2d140dd7359440d706376c74c1042d.tar.gz |
Fixes to tests and their results, to account for differences between InnoDB 1.0.4 and the old builtin.
All committed result differences have either been verified by me or copied from Oracle's provided
results (storage/innodb_plugin/mysql-test/*.result, storage/innodb_plugin/mysql-test/patches).
mysql-test/r/information_schema.result:
queries changed a bit
mysql-test/r/information_schema_db.result:
queries changed a bit
mysql-test/r/innodb-autoinc.result:
importing piece from storage/innodb_plugin/mysql-test/innodb-autoinc.result
mysql-test/r/innodb.result:
result close to storage/innodb_plugin/innodb.result, except 4095 pages instead of 8191, which makes
sense as Summit runs with a buffer pool of 64M, whereas the mentioned result file was made with
a buffer pool of 128M.
mysql-test/r/mysqlshow.result:
InnoDB I_S tables have arrived
mysql-test/suite/funcs_1/r/is_columns_is.result:
queries changed a bit
mysql-test/suite/funcs_1/r/is_columns_is_embedded.result:
queries changed a bit
mysql-test/suite/funcs_1/r/is_tables_is.result:
queries changed a bit
mysql-test/suite/funcs_1/t/is_columns_is.test:
making I_S queries ignore InnoDB I_S tables
mysql-test/suite/funcs_1/t/is_columns_is_embedded.test:
making I_S queries ignore InnoDB I_S tables
mysql-test/suite/funcs_1/t/is_tables_is.test:
making I_S queries ignore InnoDB I_S tables
mysql-test/suite/innodb/r/innodb-zip.result:
result update
mysql-test/suite/innodb/t/innodb-zip.test:
439, as size of prefix key, throws error with certain system zlib (ubuntu
"intrepid") but not with zlib bundled with MySQL, because zlib's
compressBound() are different (and used by InnoDB's page_zip_empty_size()).
mysql-test/suite/sys_vars/r/innodb_file_per_table_basic.result:
result update
mysql-test/suite/sys_vars/r/innodb_lock_wait_timeout_basic.result:
result update
mysql-test/suite/sys_vars/r/innodb_sync_spin_loops_basic_32.result:
result update (default value is 30 in the plugin, 20 in the builtin)
mysql-test/suite/sys_vars/r/innodb_sync_spin_loops_basic_64.result:
result update (default value is 30 in the plugin, 20 in the builtin)
mysql-test/suite/sys_vars/r/table_definition_cache_basic.result:
result update (default value is 400 in Summit)
mysql-test/suite/sys_vars/t/innodb_file_per_table_basic.test:
variable is writable in the plugin (patch from Oracle)
mysql-test/suite/sys_vars/t/innodb_lock_wait_timeout_basic.test:
variable is per-session in the plugin (patch from Oracle)
mysql-test/t/information_schema.test:
making I_S queries ignore InnoDB I_S tables
mysql-test/t/information_schema_db.test:
making I_S queries ignore InnoDB I_S tables
mysql-test/t/innodb-autoinc.test:
importing piece from storage/innodb_plugin/mysql-test/innodb-autoinc.test
mysql-test/t/innodb.test:
importing most of storage/innodb_plugin/t/innodb.test. Most replace_result were not needed (no path printed), some where (for --embedded).
mysql-test/t/mysqlshow.test:
output of test now depends on InnoDB or not InnoDB. As there is no way to make mysqlshow
produce a single output in those two cases (no way to make it exclude InnoDB I_S
tables), let the test depend on InnoDB, it isn't a very selective condition, and the
test is simple enough.
storage/innobase/CMakeLists.txt:
thanks Vlad for the noticing () vs {}
Diffstat (limited to 'mysql-test')
25 files changed, 147 insertions, 87 deletions
diff --git a/mysql-test/r/information_schema.result b/mysql-test/r/information_schema.result index 9a75e478264..ffa9b596d2f 100644 --- a/mysql-test/r/information_schema.result +++ b/mysql-test/r/information_schema.result @@ -39,8 +39,7 @@ insert into t5 values (10); create view v1 (c) as SELECT table_name 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'; +table_name not like 'ndb_%' AND table_name not like 'innodb_%'; select * from v1; c CHARACTER_SETS @@ -776,7 +775,7 @@ information_schema TRIGGERS ACTION_CONDITION information_schema TRIGGERS ACTION_STATEMENT information_schema VIEWS VIEW_DEFINITION select table_name, column_name, data_type from information_schema.columns -where data_type = 'datetime'; +where data_type = 'datetime' and table_name not like 'innodb_%'; table_name column_name data_type EVENTS EXECUTE_AT datetime EVENTS STARTS datetime @@ -850,7 +849,10 @@ VIEWS 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; +SELECT table_schema, count(*) FROM information_schema.TABLES WHERE +table_schema IN ('mysql', 'INFORMATION_SCHEMA', 'test', 'mysqltest') +AND table_name not like 'ndb%' AND table_name not like 'innodb_%' +GROUP BY TABLE_SCHEMA; table_schema count(*) information_schema 28 mysql 22 @@ -1237,7 +1239,8 @@ FROM information_schema.columns c2 WHERE c2.table_schema = t.table_schema AND c2.table_name = t.table_name AND c2.column_name LIKE '%SCHEMA%' - ); + ) +AND t.table_name not like 'innodb_%'; table_name column_name CHARACTER_SETS CHARACTER_SET_NAME COLLATIONS COLLATION_NAME @@ -1280,7 +1283,8 @@ FROM information_schema.columns c2 WHERE c2.table_schema = 'information_schema' AND c2.table_name = t.table_name AND c2.column_name LIKE '%SCHEMA%' - ); + ) +AND t.table_name not like 'innodb_%'; table_name column_name CHARACTER_SETS CHARACTER_SET_NAME COLLATIONS COLLATION_NAME @@ -1374,6 +1378,7 @@ from information_schema.columns c2 where c2.table_schema='information_schema' and (c2.column_type = 'varchar(7)' or c2.column_type = 'varchar(20)') group by c2.column_type order by num limit 1) +and t.table_name not like 'innodb_%' group by t.table_name order by num1, t.table_name; table_name group_concat(t.table_schema, '.', t.table_name) num1 CHARACTER_SETS information_schema.CHARACTER_SETS 1 diff --git a/mysql-test/r/information_schema_db.result b/mysql-test/r/information_schema_db.result index 6305f8cd47a..756c010843a 100644 --- a/mysql-test/r/information_schema_db.result +++ b/mysql-test/r/information_schema_db.result @@ -3,7 +3,7 @@ drop view if exists v1,v2; drop function if exists f1; drop function if exists f2; use INFORMATION_SCHEMA; -show tables; +show tables where Tables_in_information_schema not like "Innodb%"; Tables_in_information_schema CHARACTER_SETS COLLATIONS diff --git a/mysql-test/r/innodb-autoinc.result b/mysql-test/r/innodb-autoinc.result index ade4db35ce6..d2e8eb19e0c 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.result b/mysql-test/r/innodb.result index 7ff73826104..0b5f3361dd3 100644 --- a/mysql-test/r/innodb.result +++ b/mysql-test/r/innodb.result @@ -1508,7 +1508,7 @@ t2 CREATE TABLE `t2` ( ) ENGINE=InnoDB DEFAULT CHARSET=latin1 drop index id2 on t2; drop index id on t2; -Got one of the listed errors +ERROR HY000: Cannot drop index 'id': needed in a foreign key constraint show create table t2; Table Create Table t2 CREATE TABLE `t2` ( @@ -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 -4096 +4095 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 @@ -1970,7 +1972,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 '{ ' for key 'v_2' +ERROR 23000: Duplicate entry 'v' for key 'v_2' alter table t1 add key(v); select concat('*',v,'*',c,'*',t,'*') as qq from t1 where v='a'; qq @@ -2377,6 +2379,8 @@ t1 CREATE TABLE `t1` ( ) ENGINE=InnoDB DEFAULT CHARSET=latin1 drop table t1; create table t1 (v varchar(10), c char(10)) row_format=fixed; +Warnings: +Warning 1478 InnoDB: assuming ROW_FORMAT=COMPACT. show create table t1; Table Create Table t1 CREATE TABLE `t1` ( @@ -3190,6 +3194,7 @@ t1 CREATE TABLE `t1` ( CONSTRAINT `t1_t2` FOREIGN KEY (`id`) REFERENCES `t2` (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=349 DEFAULT CHARSET=latin1 DROP TABLE t1,t2; +set innodb_strict_mode=on; CREATE TABLE t1 ( c01 CHAR(255), c02 CHAR(255), c03 CHAR(255), c04 CHAR(255), c05 CHAR(255), c06 CHAR(255), c07 CHAR(255), c08 CHAR(255), diff --git a/mysql-test/r/mysqlshow.result b/mysql-test/r/mysqlshow.result index 42081c309d0..4eb3383952c 100644 --- a/mysql-test/r/mysqlshow.result +++ b/mysql-test/r/mysqlshow.result @@ -107,6 +107,13 @@ Database: information_schema | TRIGGERS | | USER_PRIVILEGES | | VIEWS | +| INNODB_CMP_RESET | +| INNODB_TRX | +| INNODB_CMPMEM_RESET | +| INNODB_LOCK_WAITS | +| INNODB_CMPMEM | +| INNODB_CMP | +| INNODB_LOCKS | +---------------------------------------+ Database: INFORMATION_SCHEMA +---------------------------------------+ @@ -140,6 +147,13 @@ Database: INFORMATION_SCHEMA | TRIGGERS | | USER_PRIVILEGES | | VIEWS | +| INNODB_CMP_RESET | +| INNODB_TRX | +| INNODB_CMPMEM_RESET | +| INNODB_LOCK_WAITS | +| INNODB_CMPMEM | +| INNODB_CMP | +| INNODB_LOCKS | +---------------------------------------+ Wildcard: inf_rmation_schema +--------------------+ diff --git a/mysql-test/suite/funcs_1/r/is_columns_is.result b/mysql-test/suite/funcs_1/r/is_columns_is.result index ccb94c63d46..fe2d5e7e5e5 100644 --- a/mysql-test/suite/funcs_1/r/is_columns_is.result +++ b/mysql-test/suite/funcs_1/r/is_columns_is.result @@ -1,6 +1,6 @@ SELECT * FROM information_schema.columns WHERE table_schema = 'information_schema' -AND table_name <> 'profiling' +AND table_name <> 'profiling' AND table_name not like 'innodb_%' ORDER BY table_schema, table_name, column_name; TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT NULL information_schema CHARACTER_SETS CHARACTER_SET_NAME 1 NO varchar 32 96 NULL NULL utf8 utf8_general_ci varchar(32) select @@ -310,7 +310,7 @@ CHARACTER_SET_NAME, COLLATION_NAME FROM information_schema.columns WHERE table_schema = 'information_schema' -AND table_name <> 'profiling' +AND table_name <> 'profiling' AND table_name not like 'innodb_%' AND CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH = 1 ORDER BY CHARACTER_SET_NAME, COLLATION_NAME, COL_CML; COL_CML DATA_TYPE CHARACTER_SET_NAME COLLATION_NAME @@ -322,7 +322,7 @@ CHARACTER_SET_NAME, COLLATION_NAME FROM information_schema.columns WHERE table_schema = 'information_schema' -AND table_name <> 'profiling' +AND table_name <> 'profiling' AND table_name not like 'innodb_%' AND CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH <> 1 ORDER BY CHARACTER_SET_NAME, COLLATION_NAME, COL_CML; COL_CML DATA_TYPE CHARACTER_SET_NAME COLLATION_NAME @@ -334,7 +334,7 @@ CHARACTER_SET_NAME, COLLATION_NAME FROM information_schema.columns WHERE table_schema = 'information_schema' -AND table_name <> 'profiling' +AND table_name <> 'profiling' AND table_name not like 'innodb_%' AND CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH IS NULL ORDER BY CHARACTER_SET_NAME, COLLATION_NAME, COL_CML; COL_CML DATA_TYPE CHARACTER_SET_NAME COLLATION_NAME @@ -355,7 +355,7 @@ COLLATION_NAME, COLUMN_TYPE FROM information_schema.columns WHERE table_schema = 'information_schema' -AND table_name <> 'profiling' +AND table_name <> 'profiling' AND table_name not like 'innodb_%' ORDER BY TABLE_SCHEMA, TABLE_NAME, ORDINAL_POSITION; COL_CML TABLE_SCHEMA TABLE_NAME COLUMN_NAME DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE 3.0000 information_schema CHARACTER_SETS CHARACTER_SET_NAME varchar 32 96 utf8 utf8_general_ci varchar(32) diff --git a/mysql-test/suite/funcs_1/r/is_columns_is_embedded.result b/mysql-test/suite/funcs_1/r/is_columns_is_embedded.result index 59ad695c413..0ac5e58d855 100644 --- a/mysql-test/suite/funcs_1/r/is_columns_is_embedded.result +++ b/mysql-test/suite/funcs_1/r/is_columns_is_embedded.result @@ -1,6 +1,6 @@ SELECT * FROM information_schema.columns WHERE table_schema = 'information_schema' -AND table_name <> 'profiling' +AND table_name <> 'profiling' AND table_name not like 'innodb_%' ORDER BY table_schema, table_name, column_name; TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT NULL information_schema CHARACTER_SETS CHARACTER_SET_NAME 1 NO varchar 32 96 NULL NULL utf8 utf8_general_ci varchar(32) @@ -310,7 +310,7 @@ CHARACTER_SET_NAME, COLLATION_NAME FROM information_schema.columns WHERE table_schema = 'information_schema' -AND table_name <> 'profiling' +AND table_name <> 'profiling' AND table_name not like 'innodb_%' AND CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH = 1 ORDER BY CHARACTER_SET_NAME, COLLATION_NAME, COL_CML; COL_CML DATA_TYPE CHARACTER_SET_NAME COLLATION_NAME @@ -322,7 +322,7 @@ CHARACTER_SET_NAME, COLLATION_NAME FROM information_schema.columns WHERE table_schema = 'information_schema' -AND table_name <> 'profiling' +AND table_name <> 'profiling' AND table_name not like 'innodb_%' AND CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH <> 1 ORDER BY CHARACTER_SET_NAME, COLLATION_NAME, COL_CML; COL_CML DATA_TYPE CHARACTER_SET_NAME COLLATION_NAME @@ -334,7 +334,7 @@ CHARACTER_SET_NAME, COLLATION_NAME FROM information_schema.columns WHERE table_schema = 'information_schema' -AND table_name <> 'profiling' +AND table_name <> 'profiling' AND table_name not like 'innodb_%' AND CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH IS NULL ORDER BY CHARACTER_SET_NAME, COLLATION_NAME, COL_CML; COL_CML DATA_TYPE CHARACTER_SET_NAME COLLATION_NAME @@ -355,7 +355,7 @@ COLLATION_NAME, COLUMN_TYPE FROM information_schema.columns WHERE table_schema = 'information_schema' -AND table_name <> 'profiling' +AND table_name <> 'profiling' AND table_name not like 'innodb_%' ORDER BY TABLE_SCHEMA, TABLE_NAME, ORDINAL_POSITION; COL_CML TABLE_SCHEMA TABLE_NAME COLUMN_NAME DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE 3.0000 information_schema CHARACTER_SETS CHARACTER_SET_NAME varchar 32 96 utf8 utf8_general_ci varchar(32) diff --git a/mysql-test/suite/funcs_1/r/is_tables_is.result b/mysql-test/suite/funcs_1/r/is_tables_is.result index 83eaef22e0c..95d56c2d41d 100644 --- a/mysql-test/suite/funcs_1/r/is_tables_is.result +++ b/mysql-test/suite/funcs_1/r/is_tables_is.result @@ -11,7 +11,7 @@ AS "user_comment", '-----------------------------------------------------' AS "Separator" FROM information_schema.tables WHERE table_schema = 'information_schema' -AND table_name <> 'profiling' +AND table_name <> 'profiling' AND table_name not like 'innodb_%' ORDER BY table_schema,table_name; TABLE_CATALOG NULL TABLE_SCHEMA information_schema @@ -649,7 +649,7 @@ AS "user_comment", '-----------------------------------------------------' AS "Separator" FROM information_schema.tables WHERE table_schema = 'information_schema' -AND table_name <> 'profiling' +AND table_name <> 'profiling' AND table_name not like 'innodb_%' ORDER BY table_schema,table_name; TABLE_CATALOG NULL TABLE_SCHEMA information_schema diff --git a/mysql-test/suite/funcs_1/t/is_columns_is.test b/mysql-test/suite/funcs_1/t/is_columns_is.test index 743b11d7bff..2bc0248b2bd 100644 --- a/mysql-test/suite/funcs_1/t/is_columns_is.test +++ b/mysql-test/suite/funcs_1/t/is_columns_is.test @@ -18,5 +18,5 @@ --source include/not_embedded.inc let $my_where = WHERE table_schema = 'information_schema' -AND table_name <> 'profiling'; +AND table_name <> 'profiling' AND table_name not like 'innodb_%'; --source suite/funcs_1/datadict/columns.inc diff --git a/mysql-test/suite/funcs_1/t/is_columns_is_embedded.test b/mysql-test/suite/funcs_1/t/is_columns_is_embedded.test index 7bc29624f1d..9c41aaa123b 100644 --- a/mysql-test/suite/funcs_1/t/is_columns_is_embedded.test +++ b/mysql-test/suite/funcs_1/t/is_columns_is_embedded.test @@ -19,5 +19,5 @@ if (`SELECT VERSION() NOT LIKE '%embedded%'`) } let $my_where = WHERE table_schema = 'information_schema' -AND table_name <> 'profiling'; +AND table_name <> 'profiling' AND table_name not like 'innodb_%'; --source suite/funcs_1/datadict/columns.inc diff --git a/mysql-test/suite/funcs_1/t/is_tables_is.test b/mysql-test/suite/funcs_1/t/is_tables_is.test index 66ad94f774b..bc10eaae94c 100644 --- a/mysql-test/suite/funcs_1/t/is_tables_is.test +++ b/mysql-test/suite/funcs_1/t/is_tables_is.test @@ -13,6 +13,6 @@ # let $my_where = WHERE table_schema = 'information_schema' -AND table_name <> 'profiling'; +AND table_name <> 'profiling' AND table_name not like 'innodb_%'; --source suite/funcs_1/datadict/tables1.inc diff --git a/mysql-test/suite/innodb/r/innodb-zip.result b/mysql-test/suite/innodb/r/innodb-zip.result index c81401743a5..b26c4112826 100644 --- a/mysql-test/suite/innodb/r/innodb-zip.result +++ b/mysql-test/suite/innodb/r/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; diff --git a/mysql-test/suite/innodb/t/innodb-zip.test b/mysql-test/suite/innodb/t/innodb-zip.test index ddc39d44487..bba5ccfbcd3 100644 --- a/mysql-test/suite/innodb/t/innodb-zip.test +++ b/mysql-test/suite/innodb/t/innodb-zip.test @@ -105,7 +105,13 @@ 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))) +# 439 throws error with certain system zlib (ubuntu "intrepid") +# but not with zlib bundled with MySQL, because zlib's compressBound() +# are different (and used by InnoDB's page_zip_empty_size()); see +# http://www.linux-archive.org/archlinux-development/119356-zlib-1-2-3-3-1-a.html +# "Fix compressBound(), was low for some pathological cases [Fearnley]". +# 438 works with both zlib-s. +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; diff --git a/mysql-test/suite/sys_vars/r/innodb_file_per_table_basic.result b/mysql-test/suite/sys_vars/r/innodb_file_per_table_basic.result index 77595639400..163eb31f686 100644 --- a/mysql-test/suite/sys_vars/r/innodb_file_per_table_basic.result +++ b/mysql-test/suite/sys_vars/r/innodb_file_per_table_basic.result @@ -4,18 +4,15 @@ COUNT(@@GLOBAL.innodb_file_per_table) 1 1 Expected '#---------------------BS_STVARS_028_02----------------------#' -SET @@GLOBAL.innodb_file_per_table=1; -ERROR HY000: Variable 'innodb_file_per_table' is a read only variable -Expected error 'Read only variable' SELECT COUNT(@@GLOBAL.innodb_file_per_table); COUNT(@@GLOBAL.innodb_file_per_table) 1 1 Expected '#---------------------BS_STVARS_028_03----------------------#' -SELECT @@GLOBAL.innodb_file_per_table = VARIABLE_VALUE +SELECT IF(@@GLOBAL.innodb_file_per_table,'ON','OFF') = VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME='innodb_file_per_table'; -@@GLOBAL.innodb_file_per_table = VARIABLE_VALUE +IF(@@GLOBAL.innodb_file_per_table,'ON','OFF') = VARIABLE_VALUE 1 1 Expected SELECT COUNT(@@GLOBAL.innodb_file_per_table); diff --git a/mysql-test/suite/sys_vars/r/innodb_lock_wait_timeout_basic.result b/mysql-test/suite/sys_vars/r/innodb_lock_wait_timeout_basic.result index ce46861b760..89960e5860f 100644 --- a/mysql-test/suite/sys_vars/r/innodb_lock_wait_timeout_basic.result +++ b/mysql-test/suite/sys_vars/r/innodb_lock_wait_timeout_basic.result @@ -4,9 +4,6 @@ COUNT(@@GLOBAL.innodb_lock_wait_timeout) 1 1 Expected '#---------------------BS_STVARS_032_02----------------------#' -SET @@GLOBAL.innodb_lock_wait_timeout=1; -ERROR HY000: Variable 'innodb_lock_wait_timeout' is a read only variable -Expected error 'Read only variable' SELECT COUNT(@@GLOBAL.innodb_lock_wait_timeout); COUNT(@@GLOBAL.innodb_lock_wait_timeout) 1 @@ -39,11 +36,11 @@ COUNT(@@innodb_lock_wait_timeout) 1 1 Expected SELECT COUNT(@@local.innodb_lock_wait_timeout); -ERROR HY000: Variable 'innodb_lock_wait_timeout' is a GLOBAL variable -Expected error 'Variable is a GLOBAL variable' +COUNT(@@local.innodb_lock_wait_timeout) +1 SELECT COUNT(@@SESSION.innodb_lock_wait_timeout); -ERROR HY000: Variable 'innodb_lock_wait_timeout' is a GLOBAL variable -Expected error 'Variable is a GLOBAL variable' +COUNT(@@SESSION.innodb_lock_wait_timeout) +1 SELECT COUNT(@@GLOBAL.innodb_lock_wait_timeout); COUNT(@@GLOBAL.innodb_lock_wait_timeout) 1 diff --git a/mysql-test/suite/sys_vars/r/innodb_sync_spin_loops_basic_32.result b/mysql-test/suite/sys_vars/r/innodb_sync_spin_loops_basic_32.result index 2b976e65b14..bde6040aa24 100644 --- a/mysql-test/suite/sys_vars/r/innodb_sync_spin_loops_basic_32.result +++ b/mysql-test/suite/sys_vars/r/innodb_sync_spin_loops_basic_32.result @@ -1,19 +1,19 @@ SET @global_start_value = @@global.innodb_sync_spin_loops; SELECT @global_start_value; @global_start_value -20 +30 '#--------------------FN_DYNVARS_046_01------------------------#' SET @@global.innodb_sync_spin_loops = 0; SET @@global.innodb_sync_spin_loops = DEFAULT; SELECT @@global.innodb_sync_spin_loops; @@global.innodb_sync_spin_loops -20 +30 '#---------------------FN_DYNVARS_046_02-------------------------#' SET innodb_sync_spin_loops = 1; ERROR HY000: Variable 'innodb_sync_spin_loops' is a GLOBAL variable and should be set with SET GLOBAL SELECT @@innodb_sync_spin_loops; @@innodb_sync_spin_loops -20 +30 SELECT local.innodb_sync_spin_loops; ERROR 42S02: Unknown table 'local' in field list SET global innodb_sync_spin_loops = 0; @@ -91,4 +91,4 @@ SELECT @@global.innodb_sync_spin_loops; SET @@global.innodb_sync_spin_loops = @global_start_value; SELECT @@global.innodb_sync_spin_loops; @@global.innodb_sync_spin_loops -20 +30 diff --git a/mysql-test/suite/sys_vars/r/innodb_sync_spin_loops_basic_64.result b/mysql-test/suite/sys_vars/r/innodb_sync_spin_loops_basic_64.result index 1b99ad8e3db..d40e529485b 100644 --- a/mysql-test/suite/sys_vars/r/innodb_sync_spin_loops_basic_64.result +++ b/mysql-test/suite/sys_vars/r/innodb_sync_spin_loops_basic_64.result @@ -1,19 +1,19 @@ SET @global_start_value = @@global.innodb_sync_spin_loops; SELECT @global_start_value; @global_start_value -20 +30 '#--------------------FN_DYNVARS_046_01------------------------#' SET @@global.innodb_sync_spin_loops = 0; SET @@global.innodb_sync_spin_loops = DEFAULT; SELECT @@global.innodb_sync_spin_loops; @@global.innodb_sync_spin_loops -20 +30 '#---------------------FN_DYNVARS_046_02-------------------------#' SET innodb_sync_spin_loops = 1; ERROR HY000: Variable 'innodb_sync_spin_loops' is a GLOBAL variable and should be set with SET GLOBAL SELECT @@innodb_sync_spin_loops; @@innodb_sync_spin_loops -20 +30 SELECT local.innodb_sync_spin_loops; ERROR 42S02: Unknown table 'local' in field list SET global innodb_sync_spin_loops = 0; @@ -89,4 +89,4 @@ SELECT @@global.innodb_sync_spin_loops; SET @@global.innodb_sync_spin_loops = @global_start_value; SELECT @@global.innodb_sync_spin_loops; @@global.innodb_sync_spin_loops -20 +30 diff --git a/mysql-test/suite/sys_vars/r/table_definition_cache_basic.result b/mysql-test/suite/sys_vars/r/table_definition_cache_basic.result index 611fda6f84a..9e523f44d4b 100644 --- a/mysql-test/suite/sys_vars/r/table_definition_cache_basic.result +++ b/mysql-test/suite/sys_vars/r/table_definition_cache_basic.result @@ -21,13 +21,13 @@ Warnings: Warning 1292 Truncated incorrect table_definition_cache value: '1' SELECT @@global.table_definition_cache; @@global.table_definition_cache -256 +400 SET @@global.table_definition_cache = 2; Warnings: Warning 1292 Truncated incorrect table_definition_cache value: '2' SELECT @@global.table_definition_cache; @@global.table_definition_cache -256 +400 SET @@global.table_definition_cache = 524287; SELECT @@global.table_definition_cache; @@global.table_definition_cache @@ -42,13 +42,13 @@ Warnings: Warning 1292 Truncated incorrect table_definition_cache value: '0' SELECT @@global.table_definition_cache; @@global.table_definition_cache -256 +400 SET @@global.table_definition_cache = -1024; Warnings: Warning 1292 Truncated incorrect table_definition_cache value: '-1024' SELECT @@global.table_definition_cache; @@global.table_definition_cache -256 +400 SET @@global.table_definition_cache = 524289; Warnings: Warning 1292 Truncated incorrect table_definition_cache value: '524289' @@ -83,13 +83,13 @@ Warnings: Warning 1292 Truncated incorrect table_definition_cache value: '1' SELECT @@global.table_definition_cache; @@global.table_definition_cache -256 +400 SET @@global.table_definition_cache = FALSE; Warnings: Warning 1292 Truncated incorrect table_definition_cache value: '0' SELECT @@global.table_definition_cache; @@global.table_definition_cache -256 +400 '#---------------------FN_DYNVARS_019_08----------------------#' SET @@global.table_definition_cache = 5; Warnings: diff --git a/mysql-test/suite/sys_vars/t/innodb_file_per_table_basic.test b/mysql-test/suite/sys_vars/t/innodb_file_per_table_basic.test index bc0e34c484e..76a50df8879 100644 --- a/mysql-test/suite/sys_vars/t/innodb_file_per_table_basic.test +++ b/mysql-test/suite/sys_vars/t/innodb_file_per_table_basic.test @@ -37,10 +37,6 @@ SELECT COUNT(@@GLOBAL.innodb_file_per_table); # Check if Value can set # #################################################################### ---error ER_INCORRECT_GLOBAL_LOCAL_VAR -SET @@GLOBAL.innodb_file_per_table=1; ---echo Expected error 'Read only variable' - SELECT COUNT(@@GLOBAL.innodb_file_per_table); --echo 1 Expected @@ -52,7 +48,7 @@ SELECT COUNT(@@GLOBAL.innodb_file_per_table); # Check if the value in GLOBAL Table matches value in variable # ################################################################# -SELECT @@GLOBAL.innodb_file_per_table = VARIABLE_VALUE +SELECT IF(@@GLOBAL.innodb_file_per_table,'ON','OFF') = VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME='innodb_file_per_table'; --echo 1 Expected diff --git a/mysql-test/suite/sys_vars/t/innodb_lock_wait_timeout_basic.test b/mysql-test/suite/sys_vars/t/innodb_lock_wait_timeout_basic.test index ed31fc9eb6b..8cfd23fd6e7 100644 --- a/mysql-test/suite/sys_vars/t/innodb_lock_wait_timeout_basic.test +++ b/mysql-test/suite/sys_vars/t/innodb_lock_wait_timeout_basic.test @@ -37,10 +37,6 @@ SELECT COUNT(@@GLOBAL.innodb_lock_wait_timeout); # Check if Value can set # #################################################################### ---error ER_INCORRECT_GLOBAL_LOCAL_VAR -SET @@GLOBAL.innodb_lock_wait_timeout=1; ---echo Expected error 'Read only variable' - SELECT COUNT(@@GLOBAL.innodb_lock_wait_timeout); --echo 1 Expected @@ -84,13 +80,9 @@ SELECT @@innodb_lock_wait_timeout = @@GLOBAL.innodb_lock_wait_timeout; SELECT COUNT(@@innodb_lock_wait_timeout); --echo 1 Expected ---Error ER_INCORRECT_GLOBAL_LOCAL_VAR SELECT COUNT(@@local.innodb_lock_wait_timeout); ---echo Expected error 'Variable is a GLOBAL variable' ---Error ER_INCORRECT_GLOBAL_LOCAL_VAR SELECT COUNT(@@SESSION.innodb_lock_wait_timeout); ---echo Expected error 'Variable is a GLOBAL variable' SELECT COUNT(@@GLOBAL.innodb_lock_wait_timeout); --echo 1 Expected diff --git a/mysql-test/t/information_schema.test b/mysql-test/t/information_schema.test index 392d1062492..6060c78f791 100644 --- a/mysql-test/t/information_schema.test +++ b/mysql-test/t/information_schema.test @@ -44,8 +44,7 @@ insert into t5 values (10); create view v1 (c) as SELECT table_name 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'; + table_name not like 'ndb_%' AND table_name not like 'innodb_%'; select * from v1; select c,table_name from v1 @@ -491,7 +490,7 @@ select table_schema,table_name, column_name from information_schema.columns where data_type = 'longtext'; select table_name, column_name, data_type from information_schema.columns -where data_type = 'datetime'; +where data_type = 'datetime' and table_name not like 'innodb_%'; # # Bug#8164 subquery with INFORMATION_SCHEMA.COLUMNS, 100 % CPU @@ -539,7 +538,10 @@ flush privileges; # Bug#9404 information_schema: Weird error messages # with SELECT SUM() ... GROUP BY queries # -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; +SELECT table_schema, count(*) FROM information_schema.TABLES WHERE +table_schema IN ('mysql', 'INFORMATION_SCHEMA', 'test', 'mysqltest') +AND table_name not like 'ndb%' AND table_name not like 'innodb_%' +GROUP BY TABLE_SCHEMA; # @@ -928,7 +930,8 @@ SELECT t.table_name, c1.column_name WHERE c2.table_schema = t.table_schema AND c2.table_name = t.table_name AND c2.column_name LIKE '%SCHEMA%' - ); + ) + AND t.table_name not like 'innodb_%'; SELECT t.table_name, c1.column_name FROM information_schema.tables t INNER JOIN @@ -942,7 +945,8 @@ SELECT t.table_name, c1.column_name WHERE c2.table_schema = 'information_schema' AND c2.table_name = t.table_name AND c2.column_name LIKE '%SCHEMA%' - ); + ) + AND t.table_name not like 'innodb_%'; # # Bug#2123 query with a simple non-correlated subquery over @@ -1041,6 +1045,7 @@ where t.table_schema = 'information_schema' and c2.table_schema='information_schema' and (c2.column_type = 'varchar(7)' or c2.column_type = 'varchar(20)') group by c2.column_type order by num limit 1) + and t.table_name not like 'innodb_%' group by t.table_name order by num1, t.table_name; # diff --git a/mysql-test/t/information_schema_db.test b/mysql-test/t/information_schema_db.test index 0ff1d05f364..52ec0d9272a 100644 --- a/mysql-test/t/information_schema_db.test +++ b/mysql-test/t/information_schema_db.test @@ -13,7 +13,7 @@ drop function if exists f2; use INFORMATION_SCHEMA; --replace_result Tables_in_INFORMATION_SCHEMA Tables_in_information_schema -show tables; +show tables where Tables_in_information_schema not like "Innodb%"; --replace_result 'Tables_in_INFORMATION_SCHEMA (T%)' 'Tables_in_information_schema (T%)' show tables from INFORMATION_SCHEMA like 'T%'; create database `inf%`; diff --git a/mysql-test/t/innodb-autoinc.test b/mysql-test/t/innodb-autoinc.test index d76b29a7dc8..0f4113ae3f2 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; +# +# BUG#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.test b/mysql-test/t/innodb.test index 42c24324ebc..8a2bc2b2d7f 100644 --- a/mysql-test/t/innodb.test +++ b/mysql-test/t/innodb.test @@ -15,6 +15,8 @@ -- source include/have_innodb.inc +let $MYSQLD_DATADIR= `select @@datadir`; + # Save the original values of some variables in order to be able to # estimate how much they have changed during the tests. Previously this # test assumed that e.g. rows_deleted is 0 here and after deleting 23 @@ -1149,7 +1151,7 @@ show create table t2; create index id2 on t2 (id); show create table t2; drop index id2 on t2; ---error 1025,1025 +--error ER_DROP_INDEX_FK drop index id on t2; show create table t2; drop table t2; @@ -1185,8 +1187,6 @@ drop table t2; # Test error handling -# Embedded server doesn't chdir to data directory ---replace_result $MYSQLTEST_VARDIR . mysqld.1/data/ '' --error ER_WRONG_FK_DEF create table t2 (id int(11) not null, id2 int(11) not null, constraint t1_id_fk foreign key (id2,id) references t1 (id)) engine = innodb; @@ -1317,6 +1317,8 @@ drop table t1; # Test for testable InnoDB status variables. This test # uses previous ones(pages_created, rows_deleted, ...). +# We get one of 4095 or 4096 randomly +--replace_result 4096 4095 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'; @@ -1331,6 +1333,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"; @@ -1338,6 +1341,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; @@ -1380,8 +1384,6 @@ source include/varchar.inc; # Some errors/warnings on create # -# Embedded server doesn't chdir to data directory ---replace_result $MYSQLTEST_VARDIR . mysqld.1/data/ '' create table t1 (v varchar(65530), key(v)); drop table t1; create table t1 (v varchar(65536)); @@ -1655,8 +1657,6 @@ disconnect b; set foreign_key_checks=0; create table t2 (a int primary key, b int, foreign key (b) references t1(a)) engine = innodb; -# Embedded server doesn't chdir to data directory ---replace_result $MYSQLTEST_VARDIR . mysqld.1/data/ '' -- error 1005 create table t1(a char(10) primary key, b varchar(20)) engine = innodb; set foreign_key_checks=1; @@ -1667,8 +1667,6 @@ drop table t2; set foreign_key_checks=0; create table t1(a varchar(10) primary key) engine = innodb DEFAULT CHARSET=latin1; -# Embedded server doesn't chdir to data directory ---replace_result $MYSQLTEST_VARDIR . mysqld.1/data/ '' -- error 1005 create table t2 (a varchar(10), foreign key (a) references t1(a)) engine = innodb DEFAULT CHARSET=utf8; set foreign_key_checks=1; @@ -1698,8 +1696,7 @@ drop table t2,t1; set foreign_key_checks=0; create table t2 (a varchar(10), foreign key (a) references t1(a)) engine = innodb DEFAULT CHARSET=latin1; create table t3(a varchar(10) primary key) engine = innodb DEFAULT CHARSET=utf8; -# Embedded server doesn't chdir to data directory ---replace_result $MYSQLTEST_VARDIR . mysqld.1/data/ '' +--replace_result $MYSQLD_DATADIR ./ -- error 1025 rename table t3 to t1; set foreign_key_checks=1; @@ -2338,8 +2335,7 @@ INSERT INTO t2 VALUES (1); ALTER TABLE t2 ADD FOREIGN KEY (a) REFERENCES t1 (a) ON DELETE SET NULL; # mysqltest first does replace_regex, then replace_result --replace_regex /'[^']*test\/#sql-[0-9a-f_]*'/'#sql-temporary'/ -# Embedded server doesn't chdir to data directory ---replace_result $MYSQLTEST_VARDIR . mysqld.1/data/ '' +--replace_result $MYSQLD_DATADIR ./ --error 1025 ALTER TABLE t2 MODIFY a INT NOT NULL; DELETE FROM t1; @@ -2380,6 +2376,7 @@ DROP TABLE t1,t2; # # Bug #21101 (Prints wrong error message if max row size is too large) # +set innodb_strict_mode=on; --error 1118 CREATE TABLE t1 ( c01 CHAR(255), c02 CHAR(255), c03 CHAR(255), c04 CHAR(255), @@ -2549,6 +2546,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/mysqlshow.test b/mysql-test/t/mysqlshow.test index 9ed93079f57..66ec8e22ab1 100644 --- a/mysql-test/t/mysqlshow.test +++ b/mysql-test/t/mysqlshow.test @@ -1,5 +1,7 @@ # Can't run test of external client with embedded server -- source include/not_embedded.inc +# Test lists tables in Information_schema, and InnoDB adds some +-- source include/have_innodb.inc --disable_warnings DROP TABLE IF EXISTS t1,t2,test1,test2; |