| 1 |
DROP TABLE IF EXISTS t1; |
| 2 |
CREATE DATABASE test_remote; |
| 3 |
CREATE SERVER test_connection FOREIGN DATA WRAPPER mysql |
| 4 |
OPTIONS (USER 'root', HOST 'localhost', DATABASE 'test_remote'); |
| 5 |
CREATE SERVER test_connection2 FOREIGN DATA WRAPPER mysql |
| 6 |
OPTIONS (USER 'root', HOST 'localhost', DATABASE 'test_remote'); |
| 7 |
CREATE TABLE t1 (a <INT_COLUMN>, b <CHAR_COLUMN>) ENGINE=<STORAGE_ENGINE> <CUSTOM_TABLE_OPTIONS> CONNECTION='test_connection'; |
| 8 |
SHOW CREATE TABLE t1; |
| 9 |
Table Create Table |
| 10 |
t1 CREATE TABLE `t1` ( |
| 11 |
`a` int(11) DEFAULT NULL, |
| 12 |
`b` char(8) DEFAULT NULL |
| 13 |
) ENGINE=<STORAGE_ENGINE> DEFAULT CHARSET=latin1 CONNECTION='test_connection' |
| 14 |
ALTER TABLE t1 CONNECTION='test_connection2'; |
| 15 |
SHOW CREATE TABLE t1; |
| 16 |
Table Create Table |
| 17 |
t1 CREATE TABLE `t1` ( |
| 18 |
`a` int(11) DEFAULT NULL, |
| 19 |
`b` char(8) DEFAULT NULL |
| 20 |
) ENGINE=<STORAGE_ENGINE> DEFAULT CHARSET=latin1 CONNECTION='test_connection2' |
| 21 |
DROP TABLE t1; |
| 22 |
DROP SERVER test_connection; |
| 23 |
DROP SERVER test_connection2; |
| 24 |
DROP DATABASE test_remote; |