[Commits] 8dc2a5f: Fix testcase to use only MyISAM and MEMORY.

Jan Lindström jan.lindstrom at mariadb.com
Thu Mar 12 11:56:49 EET 2015


revision-id: 8dc2a5fff56fb3ac29dfa60cb76edf1432d6432e
parent(s): 828a7b67768c7e7a72c2a687f5a3ff77bc61536b
committer: Jan Lindström
branch nick: 10.1-innodb
timestamp: 2015-03-12 11:56:25 +0200
message:

Fix testcase to use only MyISAM and MEMORY.

---
 mysql-test/r/enforce_storage_engine.result | 56 +++++++++++++++++++++---------
 mysql-test/t/enforce_storage_engine.test   | 25 ++++++++-----
 2 files changed, 57 insertions(+), 24 deletions(-)

diff --git a/mysql-test/r/enforce_storage_engine.result b/mysql-test/r/enforce_storage_engine.result
index 38d5c5d..3b29d5e 100644
--- a/mysql-test/r/enforce_storage_engine.result
+++ b/mysql-test/r/enforce_storage_engine.result
@@ -1,53 +1,49 @@
 drop table if exists t1;
-SET SESSION enforce_storage_engine=InnoDB;
+SET SESSION enforce_storage_engine=MyISAM;
 select @@session.enforce_storage_engine;
 @@session.enforce_storage_engine
-InnoDB
-CREATE TABLE t1 (c1 INT PRIMARY KEY AUTO_INCREMENT, c2 VARCHAR(10)) ENGINE=InnoDB;
+MyISAM
+CREATE TABLE t1 (c1 INT PRIMARY KEY AUTO_INCREMENT, c2 VARCHAR(10)) ENGINE=Memory;
+Warnings:
+Note	1266	Using storage engine MyISAM for table 't1'
 SHOW CREATE TABLE t1;
 Table	Create Table
 t1	CREATE TABLE `t1` (
   `c1` int(11) NOT NULL AUTO_INCREMENT,
   `c2` varchar(10) DEFAULT NULL,
   PRIMARY KEY (`c1`)
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
 DROP TABLE t1;
 CREATE TABLE t1 (c1 INT PRIMARY KEY AUTO_INCREMENT, c2 VARCHAR(10)) ENGINE=MyISAM;
-Warnings:
-Note	1266	Using storage engine InnoDB for table 't1'
 SHOW CREATE TABLE t1;
 Table	Create Table
 t1	CREATE TABLE `t1` (
   `c1` int(11) NOT NULL AUTO_INCREMENT,
   `c2` varchar(10) DEFAULT NULL,
   PRIMARY KEY (`c1`)
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
 DROP TABLE t1;
 CREATE TABLE t1 (c1 INT PRIMARY KEY AUTO_INCREMENT, c2 VARCHAR(10));
-Warnings:
-Note	1266	Using storage engine InnoDB for table 't1'
 SHOW CREATE TABLE t1;
 Table	Create Table
 t1	CREATE TABLE `t1` (
   `c1` int(11) NOT NULL AUTO_INCREMENT,
   `c2` varchar(10) DEFAULT NULL,
   PRIMARY KEY (`c1`)
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
 DROP TABLE t1;
 SET SESSION sql_mode='NO_ENGINE_SUBSTITUTION';
-CREATE TABLE t1 (c1 INT PRIMARY KEY AUTO_INCREMENT, c2 VARCHAR(10)) ENGINE=InnoDB;
+CREATE TABLE t1 (c1 INT PRIMARY KEY AUTO_INCREMENT, c2 VARCHAR(10)) ENGINE=MyISAM;
 SHOW CREATE TABLE t1;
 Table	Create Table
 t1	CREATE TABLE `t1` (
   `c1` int(11) NOT NULL AUTO_INCREMENT,
   `c2` varchar(10) DEFAULT NULL,
   PRIMARY KEY (`c1`)
-) ENGINE=InnoDB DEFAULT CHARSET=latin1
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
 INSERT INTO t1 values (1,'abba');
-CREATE TABLE t2 (c1 INT PRIMARY KEY AUTO_INCREMENT, c2 VARCHAR(10)) ENGINE=MyISAM;
-ERROR 42000: Unknown storage engine 'MyISAM'
-CREATE TABLE t3 (c1 INT PRIMARY KEY AUTO_INCREMENT, c2 VARCHAR(10));
-ERROR 42000: Unknown storage engine 'MyISAM'
+CREATE TABLE t2 (c1 INT PRIMARY KEY AUTO_INCREMENT, c2 VARCHAR(10)) ENGINE=Memory;
+ERROR 42000: Unknown storage engine 'MEMORY'
 SET SESSION sql_mode='';
 SET SESSION enforce_storage_engine=MyISAM;
 select @@session.enforce_storage_engine;
@@ -74,5 +70,33 @@ MyISAM
 SET SESSION enforce_storage_engine=MyISAM;
 ERROR 42000: Access denied; you need (at least one of) the SUPER privilege(s) for this operation
 SET SESSION enforce_storage_engine=NULL;
+SET SESSION sql_mode='NO_ENGINE_SUBSTITUTION';
+CREATE TABLE t1 (c1 INT PRIMARY KEY AUTO_INCREMENT, c2 VARCHAR(10)) ENGINE=Memory;
+SHOW CREATE TABLE t1;
+Table	Create Table
+t1	CREATE TABLE `t1` (
+  `c1` int(11) NOT NULL AUTO_INCREMENT,
+  `c2` varchar(10) DEFAULT NULL,
+  PRIMARY KEY (`c1`)
+) ENGINE=MEMORY DEFAULT CHARSET=latin1
+DROP TABLE t1;
+CREATE TABLE t1 (c1 INT PRIMARY KEY AUTO_INCREMENT, c2 VARCHAR(10)) ENGINE=MyISAM;
+SHOW CREATE TABLE t1;
+Table	Create Table
+t1	CREATE TABLE `t1` (
+  `c1` int(11) NOT NULL AUTO_INCREMENT,
+  `c2` varchar(10) DEFAULT NULL,
+  PRIMARY KEY (`c1`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+DROP TABLE t1;
+CREATE TABLE t1 (c1 INT PRIMARY KEY AUTO_INCREMENT, c2 VARCHAR(10));
+SHOW CREATE TABLE t1;
+Table	Create Table
+t1	CREATE TABLE `t1` (
+  `c1` int(11) NOT NULL AUTO_INCREMENT,
+  `c2` varchar(10) DEFAULT NULL,
+  PRIMARY KEY (`c1`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+DROP TABLE t1;
 SET GLOBAL enforce_storage_engine=NULL;
 ERROR HY000: Variable 'enforce_storage_engine' is a SESSION variable and can't be used with SET GLOBAL
diff --git a/mysql-test/t/enforce_storage_engine.test b/mysql-test/t/enforce_storage_engine.test
index 80839e2..83deac0 100644
--- a/mysql-test/t/enforce_storage_engine.test
+++ b/mysql-test/t/enforce_storage_engine.test
@@ -1,13 +1,12 @@
--- source include/have_innodb.inc
 -- source include/not_embedded.inc
 
 --disable_warnings
 drop table if exists t1;
 --enable_warnings
 
-SET SESSION enforce_storage_engine=InnoDB;
+SET SESSION enforce_storage_engine=MyISAM;
 select @@session.enforce_storage_engine;
-CREATE TABLE t1 (c1 INT PRIMARY KEY AUTO_INCREMENT, c2 VARCHAR(10)) ENGINE=InnoDB;
+CREATE TABLE t1 (c1 INT PRIMARY KEY AUTO_INCREMENT, c2 VARCHAR(10)) ENGINE=Memory;
 SHOW CREATE TABLE t1;
 DROP TABLE t1;
 
@@ -20,15 +19,12 @@ SHOW CREATE TABLE t1;
 DROP TABLE t1;
 
 SET SESSION sql_mode='NO_ENGINE_SUBSTITUTION';
-CREATE TABLE t1 (c1 INT PRIMARY KEY AUTO_INCREMENT, c2 VARCHAR(10)) ENGINE=InnoDB;
+CREATE TABLE t1 (c1 INT PRIMARY KEY AUTO_INCREMENT, c2 VARCHAR(10)) ENGINE=MyISAM;
 SHOW CREATE TABLE t1;
 INSERT INTO t1 values (1,'abba');
 
 --error 1286
-CREATE TABLE t2 (c1 INT PRIMARY KEY AUTO_INCREMENT, c2 VARCHAR(10)) ENGINE=MyISAM;
-
---error 1286
-CREATE TABLE t3 (c1 INT PRIMARY KEY AUTO_INCREMENT, c2 VARCHAR(10));
+CREATE TABLE t2 (c1 INT PRIMARY KEY AUTO_INCREMENT, c2 VARCHAR(10)) ENGINE=Memory;
 
 SET SESSION sql_mode='';
 
@@ -60,5 +56,18 @@ connection default;
 
 SET SESSION enforce_storage_engine=NULL;
 
+SET SESSION sql_mode='NO_ENGINE_SUBSTITUTION';
+CREATE TABLE t1 (c1 INT PRIMARY KEY AUTO_INCREMENT, c2 VARCHAR(10)) ENGINE=Memory;
+SHOW CREATE TABLE t1;
+DROP TABLE t1;
+
+CREATE TABLE t1 (c1 INT PRIMARY KEY AUTO_INCREMENT, c2 VARCHAR(10)) ENGINE=MyISAM;
+SHOW CREATE TABLE t1;
+DROP TABLE t1;
+
+CREATE TABLE t1 (c1 INT PRIMARY KEY AUTO_INCREMENT, c2 VARCHAR(10));
+SHOW CREATE TABLE t1;
+DROP TABLE t1;
+
 --error 1228
 SET GLOBAL enforce_storage_engine=NULL;


More information about the commits mailing list