summaryrefslogtreecommitdiff
path: root/storage
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2013-11-10 17:51:01 +0100
committerSergei Golubchik <sergii@pisem.net>2013-11-10 17:51:01 +0100
commit5e2b5510a40732412b8ff68f352bf621683a714c (patch)
tree68dc3e60ae5df895f70000d510b17e5e69e8ce5d /storage
parent09b63917be4cfb5f5af9c74c8d0d8b7b4307cb1c (diff)
downloadmariadb-git-5e2b5510a40732412b8ff68f352bf621683a714c.tar.gz
MDEV-5260 discovery with sql is too restrictive
allow ENGINE=FOOBAR in the discovering create table statement, as long as the discovering engine is FOOBAR too
Diffstat (limited to 'storage')
-rw-r--r--storage/test_sql_discovery/mysql-test/sql_discovery/simple.result22
-rw-r--r--storage/test_sql_discovery/mysql-test/sql_discovery/simple.test4
2 files changed, 17 insertions, 9 deletions
diff --git a/storage/test_sql_discovery/mysql-test/sql_discovery/simple.result b/storage/test_sql_discovery/mysql-test/sql_discovery/simple.result
index 94589744ca8..7e5baf560b3 100644
--- a/storage/test_sql_discovery/mysql-test/sql_discovery/simple.result
+++ b/storage/test_sql_discovery/mysql-test/sql_discovery/simple.result
@@ -99,6 +99,10 @@ a
select * from t2;
ERROR 42S02: Table 'test.t2' doesn't exist
drop table t1;
+set @@test_sql_discovery_statement='t1:create table t1 (a int) engine=test_sql_discovery';
+select * from t1;
+a
+drop table t1;
set @@test_sql_discovery_statement='t1:
create table t1 (
a int not null default 5 primary key,
@@ -114,7 +118,7 @@ create table t1 (
) comment="abc" default character set utf8 max_rows=100 min_rows=10 checksum=1';
show status like 'handler_discover';
Variable_name Value
-Handler_discover 14
+Handler_discover 15
show create table t1;
Table Create Table
t1 CREATE TABLE t1 (
@@ -132,7 +136,7 @@ t1 CREATE TABLE t1 (
) ENGINE=TEST_SQL_DISCOVERY DEFAULT CHARSET=utf8 MIN_ROWS=10 MAX_ROWS=100 CHECKSUM=1 COMMENT='abc'
show status like 'handler_discover';
Variable_name Value
-Handler_discover 15
+Handler_discover 16
----
t1.frm
----
@@ -143,19 +147,19 @@ select * from t1;
a b c d e f
show status like 'handler_discover';
Variable_name Value
-Handler_discover 15
+Handler_discover 16
flush tables;
select * from t1;
a b c d e f
show status like 'handler_discover';
Variable_name Value
-Handler_discover 15
+Handler_discover 16
drop table t1;
set @@test_sql_discovery_write_frm=0;
set @@test_sql_discovery_statement='t1:create table t1 (a int)';
show status like 'handler_discover';
Variable_name Value
-Handler_discover 15
+Handler_discover 16
show create table t1;
Table Create Table
t1 CREATE TABLE t1 (
@@ -163,7 +167,7 @@ t1 CREATE TABLE t1 (
) ENGINE=TEST_SQL_DISCOVERY DEFAULT CHARSET=latin1
show status like 'handler_discover';
Variable_name Value
-Handler_discover 16
+Handler_discover 17
----
----
show open tables from test;
@@ -173,14 +177,14 @@ select * from t1;
a
show status like 'handler_discover';
Variable_name Value
-Handler_discover 16
+Handler_discover 17
flush tables;
select * from t1;
a
show status like 'handler_discover';
Variable_name Value
-Handler_discover 17
+Handler_discover 18
drop table t1;
show status like 'handler_discover';
Variable_name Value
-Handler_discover 17
+Handler_discover 18
diff --git a/storage/test_sql_discovery/mysql-test/sql_discovery/simple.test b/storage/test_sql_discovery/mysql-test/sql_discovery/simple.test
index b8dea42297a..2b5364c9982 100644
--- a/storage/test_sql_discovery/mysql-test/sql_discovery/simple.test
+++ b/storage/test_sql_discovery/mysql-test/sql_discovery/simple.test
@@ -91,6 +91,10 @@ select * from t1;
select * from t2;
drop table t1;
+set @@test_sql_discovery_statement='t1:create table t1 (a int) engine=test_sql_discovery';
+select * from t1;
+drop table t1;
+
# and something more complex
set @@test_sql_discovery_statement='t1:
create table t1 (