summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorunknown <monty@narttu.mysql.fi>2003-03-19 21:43:41 +0200
committerunknown <monty@narttu.mysql.fi>2003-03-19 21:43:41 +0200
commit0847c4f90e732378b6e4b37fe819c92bda870067 (patch)
treef73f6b61f529766ab03043b3abb2c0584e9b0643 /mysql-test
parentcd4d7716f8b7638c11bde9861c21f5a0517ac416 (diff)
downloadmariadb-git-0847c4f90e732378b6e4b37fe819c92bda870067.tar.gz
Print right hostname or IP in SHOW PROCESSLIST
Use SESSION TABLE_HANDLER as default table handler if given table handler doesn't exists Docs/internals.texi: Updated description for how DATE, TIME and TIMESTAMP are stored mysql-test/r/create.result: New tests mysql-test/t/create.test: New tests sql/handler.cc: Use SESSION TABLE_HANDLER as default table handler if given table handler doesn't exists. sql/sql_parse.cc: Fix that we return hostname instead of IP in SHOW PROCESSLIST sql/sql_show.cc: Print right hostname or IP in SHOW PROCESSLIST
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/create.result23
-rw-r--r--mysql-test/t/create.test17
2 files changed, 40 insertions, 0 deletions
diff --git a/mysql-test/r/create.result b/mysql-test/r/create.result
index 0cc98c38d49..a2ab0e97905 100644
--- a/mysql-test/r/create.result
+++ b/mysql-test/r/create.result
@@ -148,3 +148,26 @@ select * from t1;
if('2002'='2002','Y','N')
Y
drop table if exists t1;
+SET SESSION table_type="heap";
+SELECT @@table_type;
+@@table_type
+HEAP
+CREATE TABLE t1 (a int not null);
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) NOT NULL default '0'
+) TYPE=HEAP
+drop table t1;
+SET SESSION table_type="gemini";
+SELECT @@table_type;
+@@table_type
+GEMINI
+CREATE TABLE t1 (a int not null);
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) NOT NULL default '0'
+) TYPE=MyISAM
+SET SESSION table_type=default;
+drop table t1;
diff --git a/mysql-test/t/create.test b/mysql-test/t/create.test
index 7d566cb89ac..68d68929f07 100644
--- a/mysql-test/t/create.test
+++ b/mysql-test/t/create.test
@@ -102,3 +102,20 @@ drop table t1;
create table t1 select if('2002'='2002','Y','N');
select * from t1;
drop table if exists t1;
+
+#
+# Test default table type
+#
+SET SESSION table_type="heap";
+SELECT @@table_type;
+CREATE TABLE t1 (a int not null);
+show create table t1;
+drop table t1;
+# Test what happens when using a non existing table type
+SET SESSION table_type="gemini";
+SELECT @@table_type;
+CREATE TABLE t1 (a int not null);
+show create table t1;
+SET SESSION table_type=default;
+drop table t1;
+