--let $include= ../storage/spider/mysql-test/spider/include
|
--error 0,1
|
--file_exists $include/init_spider.inc
|
if ($errno)
|
{
|
--let $include= plugin/spider/spider/include
|
}
|
|
--source $include/init_spider.inc
|
--source include/have_partition.inc
|
|
SET spider_same_server_link= on;
|
eval create server s foreign data wrapper mysql options (host "127.0.0.1", database "test", user "root", port $MASTER_MYPORT);
|
|
CREATE TABLE t1 (a INT);
|
INSERT INTO t1 VALUES (1),(2);
|
CREATE TABLE t2 (a INT);
|
INSERT INTO t2 VALUES (3),(4);
|
|
CREATE TABLE t_spider (a INT) ENGINE=SPIDER
|
PARTITION BY HASH (a) (
|
PARTITION p1 COMMENT='srv "s", table "t1"',
|
PARTITION P2 COMMENT='srv "s", table "t2"'
|
);
|
|
CHECK TABLE t_spider;
|
|
# Cleanup
|
|
DROP TABLE t_spider, t1, t2;
|
DROP SERVER s;
|
|
--source $include/deinit_spider.inc
|