MDEV-14789 Creating federated table on versioned table fails
don't allow to discover WITH SYSTEM VERSIONING clause originally by: Aleksey Midenkov
This commit is contained in:
parent
5f6b3f9c07
commit
221d010f3e
@ -72,6 +72,14 @@ t1 CREATE TABLE `t1` (
|
|||||||
drop table t1;
|
drop table t1;
|
||||||
connection slave;
|
connection slave;
|
||||||
drop table t1;
|
drop table t1;
|
||||||
|
create or replace table t1 (x int) with system versioning;
|
||||||
|
connection master;
|
||||||
|
create table t1 engine=federated connection='mysql://root@127.0.0.1:SLAVE_MYPORT/test/t1';
|
||||||
|
ERROR HY000: Engine FEDERATED failed to discover table `test`.`t1` with 'CREATE TABLE `t1` (
|
||||||
|
`x` int(11) DEFAULT NULL
|
||||||
|
) WITH SYSTEM VERSIONING CONNECTION='mysql://root@127.0.0.1:SLAVE_MYPORT/test/t1''
|
||||||
|
connection slave;
|
||||||
|
drop table t1;
|
||||||
connection master;
|
connection master;
|
||||||
DROP TABLE IF EXISTS federated.t1;
|
DROP TABLE IF EXISTS federated.t1;
|
||||||
DROP DATABASE IF EXISTS federated;
|
DROP DATABASE IF EXISTS federated;
|
||||||
|
@ -54,5 +54,14 @@ drop table t1;
|
|||||||
connection slave;
|
connection slave;
|
||||||
drop table t1;
|
drop table t1;
|
||||||
|
|
||||||
|
create or replace table t1 (x int) with system versioning;
|
||||||
|
connection master;
|
||||||
|
--replace_result $SLAVE_MYPORT SLAVE_MYPORT
|
||||||
|
--error ER_SQL_DISCOVER_ERROR
|
||||||
|
eval create table t1 engine=federated connection='mysql://root@127.0.0.1:$SLAVE_MYPORT/test/t1';
|
||||||
|
|
||||||
|
connection slave;
|
||||||
|
drop table t1;
|
||||||
|
|
||||||
source include/federated_cleanup.inc;
|
source include/federated_cleanup.inc;
|
||||||
|
|
||||||
|
@ -2728,6 +2728,9 @@ static bool sql_unusable_for_discovery(THD *thd, handlerton *engine,
|
|||||||
// ... engine
|
// ... engine
|
||||||
if (create_info->db_type && create_info->db_type != engine)
|
if (create_info->db_type && create_info->db_type != engine)
|
||||||
return 1;
|
return 1;
|
||||||
|
// ... WITH SYSTEM VERSIONING
|
||||||
|
if (create_info->versioned())
|
||||||
|
return 1;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user