Skip to content

Commit 36e020a

Browse files
committed
Adjust storage_engine suite according to server changes in 10.2
1 parent aad8cef commit 36e020a

35 files changed

+338
-840
lines changed

mysql-test/suite/storage_engine/alter_table.result

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ ALTER TABLE t1 ALTER COLUMN a SET DEFAULT '0';
1313
SHOW CREATE TABLE t1;
1414
Table Create Table
1515
t1 CREATE TABLE `t1` (
16-
`a` int(11) DEFAULT '0',
16+
`a` int(11) DEFAULT 0,
1717
`c` char(8) DEFAULT NULL,
1818
`b` int(11) DEFAULT NULL
1919
) ENGINE=<STORAGE_ENGINE> DEFAULT CHARSET=latin1

mysql-test/suite/storage_engine/alter_tablespace.result

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ a
1010
2
1111
ALTER TABLE t1 DISCARD TABLESPACE;
1212
SELECT a FROM t1;
13-
ERROR HY000: Tablespace has been discarded for table 't1'
13+
ERROR HY000: Tablespace has been discarded for table `t1`
1414
ALTER TABLE t1 IMPORT TABLESPACE;
1515
Warnings:
1616
Warning 1810 IO Read error: (2, No such file or directory) Error opening './test/t1.cfg', will attempt to import without schema verification

mysql-test/suite/storage_engine/create_table.result

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ CREATE TABLE t1 ENGINE=<STORAGE_ENGINE> <CUSTOM_TABLE_OPTIONS> AS SELECT 1 UNION
2727
SHOW CREATE TABLE t1;
2828
Table Create Table
2929
t1 CREATE TABLE `t1` (
30-
`1` bigint(20) NOT NULL DEFAULT '0'
30+
`1` bigint(20) NOT NULL DEFAULT 0
3131
) ENGINE=<STORAGE_ENGINE> DEFAULT CHARSET=latin1
3232
SELECT * FROM t1;
3333
1
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
alter_table_online : MDEV-9705 - Field type conversion warnings have changed to worse
2+
col_opt_null : MDEV-10252 - Row count in 'out of range' warnings is off
3+
col_opt_not_null : MDEV-10252 - Row count in 'out of range' warnings is off
4+
col_opt_unsigned : MDEV-10252 - Row count in 'out of range' warnings is off
5+
col_opt_zerofill : MDEV-10252 - Row count in 'out of range' warnings is off
6+
type_binary : MDEV-10252 - Row count in 'out of range' warnings is off
7+
type_char : MDEV-10252 - Row count in 'out of range' warnings is off
8+
type_fixed : MDEV-10252 - Row count in 'out of range' warnings is off
9+
type_float : MDEV-10252 - Row count in 'out of range' warnings is off
10+
type_int : MDEV-10252 - Row count in 'out of range' warnings is off
11+
type_varbinary : MDEV-10252 - Row count in 'out of range' warnings is off
12+
type_varchar : MDEV-10252 - Row count in 'out of range' warnings is off

mysql-test/suite/storage_engine/insert_delayed.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#
1+
#
22
# INSERT DELAYED
33
#
44

mysql-test/suite/storage_engine/repair_table.inc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,9 @@ if ($have_default_index)
9191
call mtr.add_suppression(" '\..test.t1'");
9292
call mtr.add_suppression("Couldn't repair table: test.t1");
9393

94+
# In 10.2 with log_warnings=2 the error message is printed to the error log
95+
call mtr.add_suppression("Table 't1' is marked as crashed.*");
96+
9497
--let $create_definition = a $int_indexed_col, b $char_col, $default_index (a)
9598
--source create_table.inc
9699
REPAIR TABLE t1;

mysql-test/suite/storage_engine/repair_table.result

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ call mtr.add_suppression("Got an error from thread_id=.*");
5959
call mtr.add_suppression("MySQL thread id .*, query id .* localhost.*root Checking table");
6060
call mtr.add_suppression(" '\..test.t1'");
6161
call mtr.add_suppression("Couldn't repair table: test.t1");
62+
call mtr.add_suppression("Table 't1' is marked as crashed.*");
6263
CREATE TABLE t1 (a <INT_COLUMN>, b <CHAR_COLUMN>, <CUSTOM_INDEX> (a)) ENGINE=<STORAGE_ENGINE> <CUSTOM_TABLE_OPTIONS>;
6364
REPAIR TABLE t1;
6465
Table Op Msg_type Msg_text
@@ -85,7 +86,7 @@ Table Op Msg_type Msg_text
8586
test.t1 check error Size of datafile is: 39 Should be: 65
8687
test.t1 check error Corrupt
8788
SELECT a,b FROM t1;
88-
ERROR HY000: Incorrect key file for table 't1'; try to repair it
89+
ERROR HY000: Index for table 't1' is corrupt; try to repair it
8990
# Statement ended with one of expected results (0,ER_NOT_KEYFILE,144).
9091
# If you got a difference in error message, just add it to rdiff file
9192
INSERT INTO t1 (a,b) VALUES (14,'n'),(15,'o');
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,19 @@
11
DROP TABLE IF EXISTS t1;
2+
# Running CREATE TABLE .. DATA DIRECTORY = <>
23
SHOW CREATE TABLE t1;
34
Table Create Table
45
t1 CREATE TABLE `t1` (
56
`a` int(11) DEFAULT NULL,
67
`b` char(8) DEFAULT NULL
7-
) ENGINE=<STORAGE_ENGINE> DEFAULT CHARSET=latin1 DATA DIRECTORY='<DATA_DIR>' INDEX DIRECTORY='<INDEX_DIR>'
8+
) ENGINE=<STORAGE_ENGINE> DEFAULT CHARSET=latin1 DATA DIRECTORY='<DATA_DIR_1>'
9+
# For ALTER TABLE the option is ignored
10+
# Running ALTER TABLE .. DATA DIRECTORY = <>
811
Warnings:
9-
Warning 1618 <INDEX DIRECTORY> option ignored
12+
Warning 1618 <DATA DIRECTORY> option ignored
1013
SHOW CREATE TABLE t1;
1114
Table Create Table
1215
t1 CREATE TABLE `t1` (
1316
`a` int(11) DEFAULT NULL,
1417
`b` char(8) DEFAULT NULL
15-
) ENGINE=<STORAGE_ENGINE> DEFAULT CHARSET=latin1 DATA DIRECTORY='<DATA_DIR>' INDEX DIRECTORY='<INDEX_DIR>'
18+
) ENGINE=<STORAGE_ENGINE> DEFAULT CHARSET=latin1 DATA DIRECTORY='<DATA_DIR_1>'
1619
DROP TABLE t1;
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
#
2+
# Check whether DATA DIRECTORY is supported in CREATE and ALTER TABLE
3+
#
4+
# Note: the test does not check whether the option
5+
# has any real effect on the table, only that it is accepted
6+
#
7+
8+
--source include/have_symlink.inc
9+
--source have_engine.inc
10+
11+
--let $data_dir1 = $MYSQLTEST_VARDIR/storage_engine_data_dir1/
12+
--let $data_dir2 = $MYSQLTEST_VARDIR/storage_engine_data_dir2/
13+
--mkdir $data_dir1
14+
--mkdir $data_dir2
15+
16+
--disable_warnings
17+
DROP TABLE IF EXISTS t1;
18+
--enable_warnings
19+
20+
--let $table_options = DATA DIRECTORY = '$data_dir1'
21+
# We cannot mask the folder name here and further, but we can switch off query logging
22+
--let $disable_query_log = 1
23+
--echo # Running CREATE TABLE .. DATA DIRECTORY = <>
24+
--source create_table.inc
25+
26+
--source mask_engine.inc
27+
--replace_result $data_dir1 <DATA_DIR_1>
28+
SHOW CREATE TABLE t1;
29+
30+
--echo # For ALTER TABLE the option is ignored
31+
32+
--let $alter_definition = DATA DIRECTORY = '$data_dir2'
33+
--disable_query_log
34+
--echo # Running ALTER TABLE .. DATA DIRECTORY = <>
35+
--source alter_table.inc
36+
if ($mysql_errname)
37+
{
38+
--let $my_last_stmt = $alter_statement
39+
--let $functionality = ALTER TABLE
40+
--source unexpected_result.inc
41+
}
42+
--enable_query_log
43+
--source mask_engine.inc
44+
--replace_result $data_dir1 <DATA_DIR_1>
45+
SHOW CREATE TABLE t1;
46+
47+
DROP TABLE t1;
48+
49+
--source cleanup_engine.inc
50+
51+
--rmdir $data_dir1
52+
--rmdir $data_dir2

mysql-test/suite/storage_engine/tbl_opt_data_index_dir.test

Lines changed: 0 additions & 52 deletions
This file was deleted.

0 commit comments

Comments
 (0)