-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MDEV-29002 Spider: remove SPIDER_CONN::loop_check_meraged_last
The field is assigned but unused, and it causes heap-use-after-free.
- Loading branch information
1 parent
761d5c8
commit 7801c6d
Showing
4 changed files
with
66 additions
and
7 deletions.
There are no files selected for viewing
34 changes: 34 additions & 0 deletions
34
storage/spider/mysql-test/spider/bugfix/r/mdev_29002.result
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
for master_1 | ||
for child2 | ||
for child3 | ||
SET spider_same_server_link= on; | ||
CREATE SERVER s FOREIGN DATA WRAPPER mysql | ||
OPTIONS (SOCKET "$MASTER_1_MYSOCK", DATABASE 'test',user 'root'); | ||
CREATE TABLE t (a INT); | ||
CREATE TABLE t1_spider (a INT) ENGINE=SPIDER COMMENT = "wrapper 'mysql', srv 's', table 't'"; | ||
CREATE TABLE t2_spider (a INT) ENGINE=SPIDER COMMENT = "wrapper 'mysql', srv 's', table 't'"; | ||
SELECT * FROM t1_spider, t2_spider; | ||
a a | ||
SELECT table_name, index_name, cardinality FROM INFORMATION_SCHEMA.STATISTICS WHERE table_name IN ('t1_spider','t2_spider'); | ||
table_name index_name cardinality | ||
RENAME TABLE t1_spider TO t3_spider; | ||
SELECT * FROM t3_spider; | ||
a | ||
DROP TABLE t3_spider, t2_spider, t; | ||
drop server s; | ||
CREATE TABLE t1 (c INT) ENGINE=Spider COMMENT='WRAPPER "mysql",HOST "srv",TABLE "t"'; | ||
CREATE TABLE t2 (c INT) ENGINE=Spider COMMENT='WRAPPER "mysql",HOST "srv",TABLE "t"'; | ||
CREATE TABLE t3 (c INT) ENGINE=Spider COMMENT='WRAPPER "mysql",HOST "srv",TABLE "t"'; | ||
SHOW TABLE STATUS; | ||
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary | ||
t1 SPIDER 10 NULL 0 0 0 0 0 NULL NULL NULL NULL latin1_swedish_ci NULL Unable to connect to foreign data source: srv 0 | ||
t2 SPIDER 10 NULL 0 0 0 0 0 NULL NULL NULL NULL latin1_swedish_ci NULL Unable to connect to foreign data source: srv 0 | ||
t3 SPIDER 10 NULL 0 0 0 0 0 NULL NULL NULL NULL latin1_swedish_ci NULL Unable to connect to foreign data source: srv 0 | ||
Warnings: | ||
Warning 1429 Unable to connect to foreign data source: srv | ||
Warning 1429 Unable to connect to foreign data source: srv | ||
Warning 1429 Unable to connect to foreign data source: srv | ||
drop table t1, t2, t3; | ||
for master_1 | ||
for child2 | ||
for child3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
--disable_query_log | ||
--disable_result_log | ||
--source ../../t/test_init.inc | ||
--enable_result_log | ||
--enable_query_log | ||
SET spider_same_server_link= on; | ||
evalp CREATE SERVER s FOREIGN DATA WRAPPER mysql | ||
OPTIONS (SOCKET "$MASTER_1_MYSOCK", DATABASE 'test',user 'root'); | ||
|
||
CREATE TABLE t (a INT); | ||
CREATE TABLE t1_spider (a INT) ENGINE=SPIDER COMMENT = "wrapper 'mysql', srv 's', table 't'"; | ||
CREATE TABLE t2_spider (a INT) ENGINE=SPIDER COMMENT = "wrapper 'mysql', srv 's', table 't'"; | ||
SELECT * FROM t1_spider, t2_spider; | ||
SELECT table_name, index_name, cardinality FROM INFORMATION_SCHEMA.STATISTICS WHERE table_name IN ('t1_spider','t2_spider'); | ||
RENAME TABLE t1_spider TO t3_spider; | ||
SELECT * FROM t3_spider; | ||
|
||
DROP TABLE t3_spider, t2_spider, t; | ||
drop server s; | ||
|
||
# case by roel | ||
CREATE TABLE t1 (c INT) ENGINE=Spider COMMENT='WRAPPER "mysql",HOST "srv",TABLE "t"'; | ||
CREATE TABLE t2 (c INT) ENGINE=Spider COMMENT='WRAPPER "mysql",HOST "srv",TABLE "t"'; | ||
CREATE TABLE t3 (c INT) ENGINE=Spider COMMENT='WRAPPER "mysql",HOST "srv",TABLE "t"'; | ||
SHOW TABLE STATUS; | ||
drop table t1, t2, t3; | ||
|
||
--disable_query_log | ||
--disable_result_log | ||
--source ../../t/test_deinit.inc | ||
--enable_result_log | ||
--enable_query_log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters