mirror of
https://github.com/MariaDB/server.git
synced 2025-01-17 04:22:27 +01:00
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).
This commit is contained in:
parent
29a46b4cf9
commit
56fb9592e9
26 changed files with 152 additions and 89 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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),
|
||||
|
|
|
@ -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
|
||||
+--------------------+
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
||||
#
|
||||
|
|
|
@ -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%`;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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. #
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -16,6 +16,9 @@
|
|||
# This is the CMakeLists for InnoDB Plugin
|
||||
|
||||
|
||||
# TODO: remove the two FLAGS_DEBUG settings when merging into
|
||||
# 6.0-based trees, like is already the case for other engines in
|
||||
# those trees.
|
||||
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX")
|
||||
SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX")
|
||||
INCLUDE("${PROJECT_SOURCE_DIR}/storage/mysql_storage_engine.cmake")
|
||||
|
@ -36,10 +39,10 @@ INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include
|
|||
|
||||
# Removing compiler optimizations for innodb/mem/* files on 64-bit Windows
|
||||
# due to 64-bit compiler error, See MySQL Bug #19424, #36366, #34297
|
||||
IF(MSVC AND $(WIN64))
|
||||
IF(MSVC AND ${WIN64})
|
||||
SET_SOURCE_FILES_PROPERTIES(mem/mem0mem.c mem/mem0pool.c
|
||||
PROPERTIES COMPILE_FLAGS -Od)
|
||||
ENDIF(MSVC AND $(WIN64))
|
||||
ENDIF(MSVC AND ${WIN64})
|
||||
|
||||
SET(INNOBASE_SOURCES btr/btr0btr.c btr/btr0cur.c btr/btr0pcur.c btr/btr0sea.c
|
||||
buf/buf0buddy.c buf/buf0buf.c buf/buf0flu.c buf/buf0lru.c buf/buf0rea.c
|
||||
|
|
Loading…
Reference in a new issue