summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/create.result28
-rw-r--r--mysql-test/r/key_cache.result4
-rw-r--r--mysql-test/r/variables.result24
-rw-r--r--mysql-test/r/warnings.result3
-rw-r--r--mysql-test/t/create.test20
-rw-r--r--mysql-test/t/key_cache.test2
-rw-r--r--mysql-test/t/variables.test16
-rw-r--r--mysql-test/t/warnings.test5
8 files changed, 55 insertions, 47 deletions
diff --git a/mysql-test/r/create.result b/mysql-test/r/create.result
index 78433c10014..940c9e9a50b 100644
--- a/mysql-test/r/create.result
+++ b/mysql-test/r/create.result
@@ -189,9 +189,9 @@ select * from t1;
if('2002'='2002','Y','N')
Y
drop table if exists t1;
-SET SESSION table_type="heap";
-SELECT @@table_type;
-@@table_type
+SET SESSION storage_engine="heap";
+SELECT @@storage_engine;
+@@storage_engine
HEAP
CREATE TABLE t1 (a int not null);
show create table t1;
@@ -200,10 +200,10 @@ t1 CREATE TABLE `t1` (
`a` int(11) NOT NULL default '0'
) ENGINE=HEAP DEFAULT CHARSET=latin1
drop table t1;
-SET SESSION table_type="gemini";
+SET SESSION storage_engine="gemini";
ERROR 42000: Unknown table engine 'gemini'
-SELECT @@table_type;
-@@table_type
+SELECT @@storage_engine;
+@@storage_engine
HEAP
CREATE TABLE t1 (a int not null);
show create table t1;
@@ -211,7 +211,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) NOT NULL default '0'
) ENGINE=HEAP DEFAULT CHARSET=latin1
-SET SESSION table_type=default;
+SET SESSION storage_engine=default;
drop table t1;
create table t1 ( k1 varchar(2), k2 int, primary key(k1,k2));
insert into t1 values ("a", 1), ("b", 2);
@@ -334,9 +334,9 @@ ERROR 42000: Incorrect table name 'a/a'
drop table t1, t2, t3;
drop table t3;
drop database test_$1;
-SET SESSION table_type="heap";
-SELECT @@table_type;
-@@table_type
+SET SESSION storage_engine="heap";
+SELECT @@storage_engine;
+@@storage_engine
HEAP
CREATE TABLE t1 (a int not null);
show create table t1;
@@ -345,10 +345,10 @@ t1 CREATE TABLE `t1` (
`a` int(11) NOT NULL default '0'
) ENGINE=HEAP DEFAULT CHARSET=latin1
drop table t1;
-SET SESSION table_type="gemini";
+SET SESSION storage_engine="gemini";
ERROR 42000: Unknown table engine 'gemini'
-SELECT @@table_type;
-@@table_type
+SELECT @@storage_engine;
+@@storage_engine
HEAP
CREATE TABLE t1 (a int not null);
show create table t1;
@@ -356,7 +356,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) NOT NULL default '0'
) ENGINE=HEAP DEFAULT CHARSET=latin1
-SET SESSION table_type=default;
+SET SESSION storage_engine=default;
drop table t1;
create table t1(a int,b int,c int unsigned,d date,e char,f datetime,g time,h blob);
insert into t1(a)values(1);
diff --git a/mysql-test/r/key_cache.result b/mysql-test/r/key_cache.result
index 394099b363c..af3cf956222 100644
--- a/mysql-test/r/key_cache.result
+++ b/mysql-test/r/key_cache.result
@@ -40,8 +40,8 @@ SELECT @@medium.key_buffer_size;
SET @@global.key_buffer_size=@save_key_buffer;
SELECT @@default.key_buffer_size;
ERROR 42000: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'default.key_buffer_size' at line 1
-SELECT @@skr.table_type="test";
-ERROR HY000: Variable 'table_type' is not a variable component (Can't be used as XXXX.variable_name)
+SELECT @@skr.storage_engine="test";
+ERROR HY000: Variable 'storage_engine' is not a variable component (Can't be used as XXXX.variable_name)
select @@keycache1.key_cache_block_size;
@@keycache1.key_cache_block_size
0
diff --git a/mysql-test/r/variables.result b/mysql-test/r/variables.result
index 8face0ce2b7..c0f1bc5df02 100644
--- a/mysql-test/r/variables.result
+++ b/mysql-test/r/variables.result
@@ -115,13 +115,13 @@ set global concurrent_insert=DEFAULT;
show variables like 'concurrent_insert';
Variable_name Value
concurrent_insert ON
-set table_type=MYISAM, table_type="HEAP", global table_type="INNODB";
-show local variables like 'table_type';
+set storage_engine=MYISAM, storage_engine="HEAP", global storage_engine="INNODB";
+show local variables like 'storage_engine';
Variable_name Value
-table_type HEAP
-show global variables like 'table_type';
+storage_engine HEAP
+show global variables like 'storage_engine';
Variable_name Value
-table_type InnoDB
+storage_engine InnoDB
set GLOBAL query_cache_size=100000;
set GLOBAL myisam_max_sort_file_size=2000000;
show global variables like 'myisam_max_sort_file_size';
@@ -218,17 +218,17 @@ set unknown_variable=1;
ERROR HY000: Unknown system variable 'unknown_variable'
set max_join_size="hello";
ERROR 42000: Wrong argument type to variable 'max_join_size'
-set table_type=UNKNOWN_TABLE_TYPE;
+set storage_engine=UNKNOWN_TABLE_TYPE;
ERROR 42000: Unknown table engine 'UNKNOWN_TABLE_TYPE'
-set table_type=INNODB, big_tables=2;
+set storage_engine=INNODB, big_tables=2;
ERROR 42000: Variable 'big_tables' can't be set to the value of '2'
-show local variables like 'table_type';
+show local variables like 'storage_engine';
Variable_name Value
-table_type HEAP
+storage_engine HEAP
set SESSION query_cache_size=10000;
ERROR HY000: Variable 'query_cache_size' is a GLOBAL variable and should be set with SET GLOBAL
-set GLOBAL table_type=DEFAULT;
-ERROR 42000: Variable 'table_type' doesn't have a default value
+set GLOBAL storage_engine=DEFAULT;
+ERROR 42000: Variable 'storage_engine' doesn't have a default value
set character_set_client=UNKNOWN_CHARACTER_SET;
ERROR 42000: Unknown character set: 'UNKNOWN_CHARACTER_SET'
set collation_connection=UNKNOWN_COLLATION;
@@ -348,7 +348,7 @@ set sql_select_limit=1;
set global sql_slave_skip_counter=100;
set sql_warnings=1;
set global table_cache=100;
-set table_type=myisam;
+set storage_engine=myisam;
set global thread_cache_size=100;
set timestamp=1, timestamp=default;
set tmp_table_size=100;
diff --git a/mysql-test/r/warnings.result b/mysql-test/r/warnings.result
index 2769e284a95..39435d24ee1 100644
--- a/mysql-test/r/warnings.result
+++ b/mysql-test/r/warnings.result
@@ -133,3 +133,6 @@ alter table t1 type=myisam;
Warnings:
Warning 1286 'TYPE=database_engine' is deprecated. Use 'ENGINE=database_engine' instead.
drop table t1;
+set table_type=MYISAM;
+Warnings:
+Warning 1286 'table_type' is deprecated. Use 'storage_engine' instead.
diff --git a/mysql-test/t/create.test b/mysql-test/t/create.test
index 35b6070d10d..64134fe9990 100644
--- a/mysql-test/t/create.test
+++ b/mysql-test/t/create.test
@@ -152,17 +152,17 @@ drop table if exists t1;
#
# Test default table type
#
-SET SESSION table_type="heap";
-SELECT @@table_type;
+SET SESSION storage_engine="heap";
+SELECT @@storage_engine;
CREATE TABLE t1 (a int not null);
show create table t1;
drop table t1;
--error 1285
-SET SESSION table_type="gemini";
-SELECT @@table_type;
+SET SESSION storage_engine="gemini";
+SELECT @@storage_engine;
CREATE TABLE t1 (a int not null);
show create table t1;
-SET SESSION table_type=default;
+SET SESSION storage_engine=default;
drop table t1;
@@ -272,17 +272,17 @@ drop database test_$1;
#
# Test default table type
#
-SET SESSION table_type="heap";
-SELECT @@table_type;
+SET SESSION storage_engine="heap";
+SELECT @@storage_engine;
CREATE TABLE t1 (a int not null);
show create table t1;
drop table t1;
--error 1285
-SET SESSION table_type="gemini";
-SELECT @@table_type;
+SET SESSION storage_engine="gemini";
+SELECT @@storage_engine;
CREATE TABLE t1 (a int not null);
show create table t1;
-SET SESSION table_type=default;
+SET SESSION storage_engine=default;
drop table t1;
#
diff --git a/mysql-test/t/key_cache.test b/mysql-test/t/key_cache.test
index df16e11daae..b2bc57f3804 100644
--- a/mysql-test/t/key_cache.test
+++ b/mysql-test/t/key_cache.test
@@ -42,7 +42,7 @@ SET @@global.key_buffer_size=@save_key_buffer;
--error 1064
SELECT @@default.key_buffer_size;
--error 1271
-SELECT @@skr.table_type="test";
+SELECT @@skr.storage_engine="test";
select @@keycache1.key_cache_block_size;
select @@keycache1.key_buffer_size;
diff --git a/mysql-test/t/variables.test b/mysql-test/t/variables.test
index b5c402fe962..e2537532eb4 100644
--- a/mysql-test/t/variables.test
+++ b/mysql-test/t/variables.test
@@ -70,9 +70,9 @@ show variables like 'concurrent_insert';
set global concurrent_insert=DEFAULT;
show variables like 'concurrent_insert';
-set table_type=MYISAM, table_type="HEAP", global table_type="INNODB";
-show local variables like 'table_type';
-show global variables like 'table_type';
+set storage_engine=MYISAM, storage_engine="HEAP", global storage_engine="INNODB";
+show local variables like 'storage_engine';
+show global variables like 'storage_engine';
set GLOBAL query_cache_size=100000;
set GLOBAL myisam_max_sort_file_size=2000000;
@@ -125,14 +125,14 @@ set unknown_variable=1;
--error 1232
set max_join_size="hello";
--error 1285
-set table_type=UNKNOWN_TABLE_TYPE;
+set storage_engine=UNKNOWN_TABLE_TYPE;
--error 1231
-set table_type=INNODB, big_tables=2;
-show local variables like 'table_type';
+set storage_engine=INNODB, big_tables=2;
+show local variables like 'storage_engine';
--error 1229
set SESSION query_cache_size=10000;
--error 1230
-set GLOBAL table_type=DEFAULT;
+set GLOBAL storage_engine=DEFAULT;
--error 1115
set character_set_client=UNKNOWN_CHARACTER_SET;
--error 1272
@@ -235,7 +235,7 @@ set sql_select_limit=1;
set global sql_slave_skip_counter=100;
set sql_warnings=1;
set global table_cache=100;
-set table_type=myisam;
+set storage_engine=myisam;
set global thread_cache_size=100;
set timestamp=1, timestamp=default;
set tmp_table_size=100;
diff --git a/mysql-test/t/warnings.test b/mysql-test/t/warnings.test
index a94380db221..0456ca8c1fe 100644
--- a/mysql-test/t/warnings.test
+++ b/mysql-test/t/warnings.test
@@ -91,3 +91,8 @@ create table t1 (id int) type=heap;
alter table t1 type=myisam;
drop table t1;
+#
+# Test for deprecated table_type variable
+#
+set table_type=MYISAM;
+