1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

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
This commit is contained in:
Sergei Golubchik
2013-11-10 17:51:01 +01:00
parent 09b63917be
commit 5e2b5510a4
3 changed files with 23 additions and 13 deletions

View File

@@ -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

View File

@@ -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 (