mirror of
https://github.com/MariaDB/server.git
synced 2025-01-27 01:04:19 +01:00
35cebfdc51
One change is that if the port is not supplied or out of bound, the old behaviour is to print 3306. The new behaviour is to not print it (if not supplied) or the out of bound value.
66 lines
2 KiB
Text
66 lines
2 KiB
Text
# Generic tests for servers (do not require FEDERATED)
|
|
set sql_mode="";
|
|
|
|
--echo #
|
|
--echo # MDEV-4594 - CREATE SERVER crashes embedded
|
|
--echo #
|
|
CREATE SERVER s1 FOREIGN DATA WRAPPER mysql OPTIONS(HOST 'localhost');
|
|
SELECT * FROM mysql.servers;
|
|
DROP SERVER s1;
|
|
|
|
CREATE SERVER s1 FOREIGN DATA WRAPPER foo OPTIONS(USER 'bar');
|
|
SELECT * FROM mysql.servers;
|
|
DROP SERVER s1;
|
|
|
|
--error ER_CANT_CREATE_FEDERATED_TABLE
|
|
CREATE SERVER s1 FOREIGN DATA WRAPPER mysql OPTIONS(USER 'bar');
|
|
|
|
CREATE SERVER s1 FOREIGN DATA WRAPPER mysql OPTIONS(HOST 'bar');
|
|
SELECT * FROM mysql.servers;
|
|
DROP SERVER s1;
|
|
|
|
CREATE SERVER s1 FOREIGN DATA WRAPPER mysql OPTIONS(SOCKET 'bar');
|
|
SELECT * FROM mysql.servers;
|
|
DROP SERVER s1;
|
|
|
|
CREATE SERVER s1 FOREIGN DATA WRAPPER mysql OPTIONS(SOCKET '/tmp/1234567890_1234567890_1234567890_1234567890_1234567890_1234567890.sock');
|
|
SELECT Socket FROM mysql.servers where Server_name = 's1';
|
|
DROP SERVER s1;
|
|
|
|
--echo #
|
|
--echo # MDEV-34716 - Arbitrary OPTIONS for CREATE SERVER
|
|
--echo # MDEV-15696 - SHOW CREATE SERVER
|
|
--echo #
|
|
|
|
create server srv foreign data wrapper mysql options
|
|
(host "localhost", port 12345, wait_what "it's all good");
|
|
show create server srv;
|
|
|
|
create or replace server srv foreign data wrapper Foo options
|
|
(host "somewhere.else", port 54321, wait_what "it's all good", foo 'bar');
|
|
show create server srv;
|
|
|
|
alter server srv options (socket "sock", port 123, foo "", bar ")\"{");
|
|
show create server srv;
|
|
|
|
alter server srv options (socket "sock", port 123, bar "quux");
|
|
show create server srv;
|
|
|
|
create or replace server srv foreign data wrapper foo options
|
|
(host "localhost", port "12345");
|
|
|
|
--error ER_PARSE_ERROR
|
|
create or replace server srv foreign data wrapper mysql options
|
|
(host "localhost", port "bar321");
|
|
|
|
--error ER_PARSE_ERROR
|
|
create or replace server srv foreign data wrapper mysql options
|
|
(host "localhost", port "123bar");
|
|
|
|
create or replace server srv foreign data wrapper mysql options
|
|
(host "localhost", port "0");
|
|
|
|
--error ER_FOREIGN_SERVER_DOESNT_EXIST
|
|
show create server nonexist;
|
|
|
|
drop server srv;
|