diff options
Diffstat (limited to 'storage/rocksdb/mysql-test/rocksdb/t/tbl_opt_connection.test')
-rw-r--r-- | storage/rocksdb/mysql-test/rocksdb/t/tbl_opt_connection.test | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/storage/rocksdb/mysql-test/rocksdb/t/tbl_opt_connection.test b/storage/rocksdb/mysql-test/rocksdb/t/tbl_opt_connection.test new file mode 100644 index 00000000..b97b3dd9 --- /dev/null +++ b/storage/rocksdb/mysql-test/rocksdb/t/tbl_opt_connection.test @@ -0,0 +1,32 @@ +--source include/have_rocksdb.inc + +# +# Check whether CONNECTION option is supported +# is supported in CREATE and ALTER TABLE +# +# Note: the test does not check whether the option +# has any real effect on the table, only +# that it's accepted +# + +--disable_warnings +DROP TABLE IF EXISTS t1; +--enable_warnings + +CREATE DATABASE test_remote; +CREATE SERVER test_connection FOREIGN DATA WRAPPER mysql +OPTIONS (USER 'root', HOST 'localhost', DATABASE 'test_remote'); +CREATE SERVER test_connection2 FOREIGN DATA WRAPPER mysql +OPTIONS (USER 'root', HOST 'localhost', DATABASE 'test_remote'); + +CREATE TABLE t1 (a INT PRIMARY KEY, b CHAR(8)) ENGINE=rocksdb CONNECTION='test_connection'; +SHOW CREATE TABLE t1; +ALTER TABLE t1 CONNECTION='test_connection2'; +SHOW CREATE TABLE t1; + +DROP TABLE t1; + +DROP SERVER test_connection; +DROP SERVER test_connection2; +DROP DATABASE test_remote; + |