summaryrefslogtreecommitdiff
path: root/mysql-test/main/servers.test
blob: 645206c376e172cb1bb90dfc94388f6e5d59d0d4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# 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;