mirror of
https://github.com/MariaDB/server.git
synced 2025-01-16 03:52:35 +01:00
fa1f214cf8
NET can only store current_thd if this NET (or its MYSQL) is not moved between threads. In FederatedX MYSQL is part of the TABLE, and a TABLE can migrate between threads. Fix: associate NET with THD in txn->acquire() , and dissociate in txn->release()
17 lines
650 B
Text
17 lines
650 B
Text
#
|
|
# MDEV-12725 select on federated table crashes server
|
|
#
|
|
#
|
|
SET GLOBAL query_cache_size= 16*1024*1024;
|
|
SET GLOBAL query_cache_type= 1;
|
|
CREATE TABLE t1 (i INT);
|
|
--replace_result $MASTER_MYPORT MASTER_MYPORT
|
|
eval CREATE TABLE t2 (i INT) ENGINE=FEDERATED CONNECTION="mysql://root@localhost:$MASTER_MYPORT/test/t1";
|
|
--error ER_ILLEGAL_HA
|
|
ALTER TABLE t2 DISABLE KEYS;
|
|
--replace_result $MASTER_MYPORT MASTER_MYPORT
|
|
eval CREATE TABLE t3 (i INT) ENGINE=FEDERATED CONNECTION="mysql://root@localhost:$MASTER_MYPORT/test/t1";
|
|
source include/restart_mysqld.inc;
|
|
SET GLOBAL query_cache_size= default;
|
|
SET GLOBAL query_cache_type= default;
|
|
drop table t1, t2, t3;
|