| 1 |
source include/federated.inc; |
| 2 |
source have_federatedx.inc; |
| 3 |
|
| 4 |
connection slave; |
| 5 |
|
| 6 |
CREATE TABLE t1 ( |
| 7 |
`id` int(20) primary key, |
| 8 |
`group` int NOT NULL default 1, |
| 9 |
`a\\b` int NOT NULL default 2, |
| 10 |
`a\\` int unsigned, |
| 11 |
`name` varchar(32) default 'name') |
| 12 |
DEFAULT CHARSET=latin1; |
| 13 |
|
| 14 |
connection master; |
| 15 |
|
| 16 |
evalp CREATE TABLE t1 ENGINE=FEDERATED CONNECTION='mysql://[email protected]:$SLAVE_MYPORT/test/t1'; |
| 17 |
|
| 18 |
--replace_result $SLAVE_MYPORT SLAVE_PORT |
| 19 |
SHOW CREATE TABLE t1; |
| 20 |
INSERT INTO t1 (id, name) VALUES (1, 'foo'); |
| 21 |
INSERT INTO t1 (id, name) VALUES (2, 'fee'); |
| 22 |
--sorted_result |
| 23 |
SELECT * FROM t1; |
| 24 |
DROP TABLE t1; |
| 25 |
|
| 26 |
connection slave; |
| 27 |
--sorted_result |
| 28 |
SELECT * FROM t1; |
| 29 |
DROP TABLE t1; |
| 30 |
|
| 31 |
--echo # |
| 32 |
--echo # MDEV-11311 Create federated table does not work as expected |
| 33 |
--echo # |
| 34 |
create table t1 ( |
| 35 |
a bigint(20) not null auto_increment, |
| 36 |
b bigint(20) not null, |
| 37 |
c tinyint(4) not null, |
| 38 |
d varchar(4096) not null, |
| 39 |
primary key (a), |
| 40 |
key (b,c,d(200)) |
| 41 |
); |
| 42 |
show create table t1; |
| 43 |
|
| 44 |
connection master; |
| 45 |
evalp create table t1 engine=federated connection='mysql://[email protected]:$SLAVE_MYPORT/test/t1'; |
| 46 |
--replace_result $SLAVE_MYPORT SLAVE_PORT |
| 47 |
show create table t1; |
| 48 |
drop table t1; |
| 49 |
|
| 50 |
connection slave; |
| 51 |
drop table t1; |
| 52 |
|
| 53 |
--echo # |
| 54 |
--echo # MDEV-17227 Server crash in TABLE_SHARE::init_from_sql_statement_string upon table discovery with non-existent database |
| 55 |
--echo # |
| 56 |
connection master; |
| 57 |
--error ER_CONNECT_TO_FOREIGN_DATA_SOURCE |
| 58 |
evalp create table t1 engine=federated connection='mysql://[email protected]:$SLAVE_MYPORT/test/t1'; |
| 59 |
|
| 60 |
source include/federated_cleanup.inc; |
| 61 |
|