mariadb/storage/spider/mysql-test/spider/t/alter_server.test
Yuchen Pei 77c9917663
MDEV-34716 Fix mysql.servers socket max length too short
The limit of socket length on unix according to libc is 108, see
sockaddr_un::sun_path, but in the table it is a string of max length
64, which results in truncation of socket and failure to connect by
plugins using servers such as spider.
2024-12-17 10:40:57 +11:00

27 lines
757 B
Text

--disable_query_log
--disable_result_log
--source test_init.inc
--enable_result_log
--enable_query_log
set spider_same_server_link= 1;
# Test long socket length
evalp CREATE SERVER srv FOREIGN DATA WRAPPER mysql
OPTIONS (SOCKET "$MASTER_1_MYSOCK", DATABASE 'test',user 'root');
select Socket from mysql.servers where Server_name = "srv";
create table t2 (c int);
# triggers a table read into the server object
alter SERVER srv OPTIONS (DATABASE 'test');
create table t1 (c int) ENGINE=Spider
COMMENT='WRAPPER "mysql", srv "srv",TABLE "t2"';
insert into t1 values (1), (2), (3);
select * from t1;
select * from t2;
drop table t1, t2;
drop server srv;
--disable_query_log
--disable_result_log
--source test_deinit.inc
--enable_result_log
--enable_query_log