mirror of
https://github.com/MariaDB/server.git
synced 2025-01-27 09:14:17 +01:00
f862fe8b2b
TABLE::use_all_columns turn on all bits of read_set, which is interpreted by innodb as a request to read all columns. Without doing so before calling init_read_record(), innodb will not retrieve any columns if mysql.servers table has been altered to use innodb as the engine, and any foreign servers stored in the table are "lost".
52 lines
1.8 KiB
Text
52 lines
1.8 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-33783 CREATE SERVER segfaults on wrong mysql.servers
|
|
--echo #
|
|
create server s1 foreign data wrapper foo options(user 'a');
|
|
alter server s1 options(host 'server.example.org');
|
|
rename table mysql.servers to mysql.servers_save;
|
|
create table mysql.servers (x int);
|
|
--error ER_FOREIGN_SERVER_DOESNT_EXIST
|
|
alter server s1 options(host 'server.example.org');
|
|
--error ER_CANT_FIND_SYSTEM_REC
|
|
create server s2 foreign data wrapper foo options(user 'a');
|
|
drop table mysql.servers;
|
|
rename table mysql.servers_save to mysql.servers;
|
|
drop server s1;
|
|
|
|
--echo #
|
|
--echo # MDEV-35641 foreign server "disappears" after ALTERing the servers system table to use innodb and FLUSH PRIVILEGES
|
|
--echo #
|
|
--source include/have_innodb.inc
|
|
CREATE SERVER s1 FOREIGN DATA WRAPPER mysql OPTIONS (HOST '127.0.0.1');
|
|
ALTER TABLE mysql.servers ENGINE=innodb;
|
|
FLUSH PRIVILEGES;
|
|
drop server s1;
|