Skip to content
Permalink
Browse files
MDEV-28479 Deprecate Spider's high availability feature
Deprecate the high availability feature of Spider as the feature is
beyond the scope of the federated storage engine and it complicates
the implementation of Spider.
  • Loading branch information
nayuta-yanagisawa committed Jun 27, 2022
1 parent 2c83fc8 commit 8e6c896
Show file tree
Hide file tree
Showing 4 changed files with 86 additions and 24 deletions.
@@ -62,6 +62,10 @@ b CHAR(1),
c DATETIME,
PRIMARY KEY(a)
) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_HA_2_1
Warnings:
Warning 138 The high availability feature of Spider has been deprecated and will be removed in a future release
Warning 138 The high availability feature of Spider has been deprecated and will be removed in a future release
Warning 138 The high availability feature of Spider has been deprecated and will be removed in a future release
INSERT INTO ta_l (a, b, c) VALUES
(1, 'a', '2008-08-01 10:21:39'),
(2, 'b', '2000-01-01 00:00:00'),
@@ -117,6 +121,10 @@ ALTER TABLE ta_l
CONNECTION='host "localhost", user "root", password "",
msi "5", mkd "2",
database "auto_test_remote auto_test_remote2", lst "0 2"';
Warnings:
Warning 138 The high availability feature of Spider has been deprecated and will be removed in a future release
Warning 138 The high availability feature of Spider has been deprecated and will be removed in a future release
Warning 138 The high availability feature of Spider has been deprecated and will be removed in a future release
SELECT db_name, table_name, link_id, link_status FROM mysql.spider_tables
ORDER BY db_name, table_name, link_id;
db_name table_name link_id link_status
@@ -130,6 +138,10 @@ ALTER TABLE ta_l
CONNECTION='host "localhost", user "root", password "",
msi "5", mkd "2",
database "auto_test_remote auto_test_remote2", lst "0 1"';
Warnings:
Warning 138 The high availability feature of Spider has been deprecated and will be removed in a future release
Warning 138 The high availability feature of Spider has been deprecated and will be removed in a future release
Warning 138 The high availability feature of Spider has been deprecated and will be removed in a future release
SELECT db_name, table_name, link_id, link_status FROM mysql.spider_tables
ORDER BY db_name, table_name, link_id;
db_name table_name link_id link_status
@@ -162,6 +174,10 @@ b CHAR(1),
c DATETIME,
PRIMARY KEY(a)
) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_HA_AS_2_1
Warnings:
Warning 138 The high availability feature of Spider has been deprecated and will be removed in a future release
Warning 138 The high availability feature of Spider has been deprecated and will be removed in a future release
Warning 138 The high availability feature of Spider has been deprecated and will be removed in a future release
INSERT INTO ta_l (a, b, c) VALUES
(1, 'a', '2008-08-01 10:21:39'),
(2, 'b', '2000-01-01 00:00:00'),
@@ -213,6 +229,10 @@ ALTER TABLE ta_l
CONNECTION='host "localhost", user "root", password "",
msi "5", mkd "2", alc "1",
database "auto_test_remote auto_test_remote2", lst "1 0"';
Warnings:
Warning 138 The high availability feature of Spider has been deprecated and will be removed in a future release
Warning 138 The high availability feature of Spider has been deprecated and will be removed in a future release
Warning 138 The high availability feature of Spider has been deprecated and will be removed in a future release
SELECT db_name, table_name, link_id, link_status FROM mysql.spider_tables
ORDER BY db_name, table_name, link_id;
db_name table_name link_id link_status
@@ -62,6 +62,11 @@ b CHAR(1),
c DATETIME,
PRIMARY KEY(a)
) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_HA_P_2_1
Warnings:
Warning 138 The high availability feature of Spider has been deprecated and will be removed in a future release
Warning 138 The high availability feature of Spider has been deprecated and will be removed in a future release
Warning 138 The high availability feature of Spider has been deprecated and will be removed in a future release
Warning 138 The high availability feature of Spider has been deprecated and will be removed in a future release
INSERT INTO ta_l2 (a, b, c) VALUES
(1, 'a', '2008-08-01 10:21:39'),
(2, 'b', '2000-01-01 00:00:00'),
@@ -122,6 +127,11 @@ PARTITION pt1 COMMENT='srv "s_2_1 s_2_2", tbl "ta_r ta_r3",
PARTITION pt2 COMMENT='srv "s_2_1 s_2_3", tbl "ta_r2 ta_r4",
priority "1000001", lst "0 2"'
);
Warnings:
Warning 138 The high availability feature of Spider has been deprecated and will be removed in a future release
Warning 138 The high availability feature of Spider has been deprecated and will be removed in a future release
Warning 138 The high availability feature of Spider has been deprecated and will be removed in a future release
Warning 138 The high availability feature of Spider has been deprecated and will be removed in a future release
SELECT db_name, table_name, link_id, link_status FROM mysql.spider_tables
ORDER BY db_name, table_name, link_id;
db_name table_name link_id link_status
@@ -140,6 +150,11 @@ PARTITION pt1 COMMENT='srv "s_2_1 s_2_2", tbl "ta_r ta_r3",
PARTITION pt2 COMMENT='srv "s_2_1 s_2_3", tbl "ta_r2 ta_r4",
priority "1000001", lst "0 1"'
);
Warnings:
Warning 138 The high availability feature of Spider has been deprecated and will be removed in a future release
Warning 138 The high availability feature of Spider has been deprecated and will be removed in a future release
Warning 138 The high availability feature of Spider has been deprecated and will be removed in a future release
Warning 138 The high availability feature of Spider has been deprecated and will be removed in a future release
SELECT db_name, table_name, link_id, link_status FROM mysql.spider_tables
ORDER BY db_name, table_name, link_id;
db_name table_name link_id link_status
@@ -171,6 +186,11 @@ b CHAR(1),
c DATETIME,
PRIMARY KEY(a)
) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_HA_AS_P_2_1
Warnings:
Warning 138 The high availability feature of Spider has been deprecated and will be removed in a future release
Warning 138 The high availability feature of Spider has been deprecated and will be removed in a future release
Warning 138 The high availability feature of Spider has been deprecated and will be removed in a future release
Warning 138 The high availability feature of Spider has been deprecated and will be removed in a future release
INSERT INTO ta_l2 (a, b, c) VALUES
(1, 'a', '2008-08-01 10:21:39'),
(2, 'b', '2000-01-01 00:00:00'),
@@ -230,6 +250,11 @@ PARTITION pt1 COMMENT='srv "s_2_1 s_2_2", tbl "ta_r ta_r3",
PARTITION pt2 COMMENT='srv "s_2_1 s_2_3", tbl "ta_r2 ta_r4",
priority "1000001", lst "1 0"'
);
Warnings:
Warning 138 The high availability feature of Spider has been deprecated and will be removed in a future release
Warning 138 The high availability feature of Spider has been deprecated and will be removed in a future release
Warning 138 The high availability feature of Spider has been deprecated and will be removed in a future release
Warning 138 The high availability feature of Spider has been deprecated and will be removed in a future release
SELECT db_name, table_name, link_id, link_status FROM mysql.spider_tables
ORDER BY db_name, table_name, link_id;
db_name table_name link_id link_status
@@ -297,10 +297,16 @@ CREATE TABLE t1 (
id int(11) NOT NULL,
PRIMARY KEY (id)
) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_LOCK1
Warnings:
Warning 138 The high availability feature of Spider has been deprecated and will be removed in a future release
Warning 138 The high availability feature of Spider has been deprecated and will be removed in a future release
CREATE TABLE t2 (
id int(11) NOT NULL,
PRIMARY KEY (id)
) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_LOCK2
Warnings:
Warning 138 The high availability feature of Spider has been deprecated and will be removed in a future release
Warning 138 The high availability feature of Spider has been deprecated and will be removed in a future release
LOCK TABLES t1 READ, t2 READ;
UNLOCK TABLES;

@@ -1833,30 +1833,41 @@ int st_spider_param_string_parse::print_param_error()
}
#define SPIDER_PARAM_STR_LENS(name) name ## _lengths
#define SPIDER_PARAM_STR_CHARLEN(name) name ## _charlen
#define SPIDER_PARAM_STR_LIST(title_name, param_name) \
if (!strncasecmp(tmp_ptr, title_name, title_length)) \
{ \
DBUG_PRINT("info",("spider " title_name " start")); \
if (!share->param_name) \
{ \
if ((tmp_ptr2 = spider_get_string_between_quote( \
start_ptr, FALSE))) \
{ \
share->SPIDER_PARAM_STR_CHARLEN(param_name) = strlen(tmp_ptr2); \
if ((error_num = spider_create_string_list( \
&share->param_name, \
&share->SPIDER_PARAM_STR_LENS(param_name), \
&share->SPIDER_PARAM_STR_LEN(param_name), \
tmp_ptr2, \
share->SPIDER_PARAM_STR_CHARLEN(param_name), \
&connect_string_parse))) \
goto error; \
} else { \
error_num = connect_string_parse.print_param_error(); \
goto error; \
} \
} \
break; \
#define SPIDER_PARAM_STR_LIST(title_name, param_name) \
if (!strncasecmp(tmp_ptr, title_name, title_length)) \
{ \
DBUG_PRINT("info", ("spider " title_name " start")); \
if (!share->param_name) \
{ \
if ((tmp_ptr2= spider_get_string_between_quote(start_ptr, FALSE))) \
{ \
share->SPIDER_PARAM_STR_CHARLEN(param_name)= strlen(tmp_ptr2); \
if ((error_num= spider_create_string_list( \
&share->param_name, \
&share->SPIDER_PARAM_STR_LENS(param_name), \
&share->SPIDER_PARAM_STR_LEN(param_name), tmp_ptr2, \
share->SPIDER_PARAM_STR_CHARLEN(param_name), \
&connect_string_parse))) \
{ \
goto error; \
} \
THD *thd= current_thd; \
if (share->SPIDER_PARAM_STR_LEN(param_name) > 1 && create_table) \
{ \
push_warning_printf(thd, Sql_condition::WARN_LEVEL_WARN, \
HA_ERR_UNSUPPORTED, \
"The high availability feature of Spider " \
"has been deprecated " \
"and will be removed in a future release"); \
} \
} \
else \
{ \
error_num= connect_string_parse.print_param_error(); \
goto error; \
} \
} \
break; \
}
#define SPIDER_PARAM_HINT(title_name, param_name, check_length, max_size, append_method) \
if (!strncasecmp(tmp_ptr, title_name, check_length)) \

0 comments on commit 8e6c896

Please sign in to comment.