Skip to content

Commit f78fdf0

Browse files
MDEV-28005 Deprecate Spider plugin variables regarding UDFs
Configuring UDFs via plugin variables looks not a good idea. The more variables Spider has, the more complex it becomes. Further, I expect that only a few users use Spider UDFs. Deprecate the following plugin variables regarding Spider UDFs: * spider_udf_ds_bulk_insert_rows * spider_udf_ds_table_loop_mode * spider_udf_ds_use_real_table * spider_udf_ct_bulk_insert_interval * spider_udf_ct_bulk_insert_rows spider_udf_table_lock_mutex_count and spider_udf_table_mon_mutex_count are also for tweaking UDFs but they are already read-only. So, there is no need to deprecate them.
1 parent a4d7537 commit f78fdf0

File tree

3 files changed

+54
-7
lines changed

3 files changed

+54
-7
lines changed

storage/spider/mysql-test/spider/r/variable_deprecation.result

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ connection master_1;
1414
CREATE DATABASE auto_test_local;
1515
USE auto_test_local;
1616
# MDEV-27923 Deprecate spider_use_handler
17-
SET spider_use_handler= 3;
17+
SET spider_use_handler = 3;
1818
Warnings:
1919
Warning 1287 '@@spider_use_handler' is deprecated and will be removed in a future release
2020
SHOW VARIABLES LIKE "spider_use_handler";
@@ -26,6 +26,37 @@ Warning 1287 The table parameter 'uhd' is deprecated and will be removed in a fu
2626
CREATE TABLE tbl_b (a INT) ENGINE=Spider COMMENT='use_handler "3"';
2727
Warnings:
2828
Warning 1287 The table parameter 'use_handler' is deprecated and will be removed in a future release
29+
# MDEV-28005 Deprecate Spider plugin variables regarding UDFs
30+
SET GLOBAL spider_udf_ds_bulk_insert_rows = 1;
31+
Warnings:
32+
Warning 1287 '@@spider_udf_ds_bulk_insert_rows' is deprecated and will be removed in a future release
33+
SHOW VARIABLES LIKE "spider_udf_ds_bulk_insert_rows";
34+
Variable_name Value
35+
spider_udf_ds_bulk_insert_rows -1
36+
SET spider_udf_ds_table_loop_mode = 1;
37+
Warnings:
38+
Warning 1287 '@@spider_udf_ds_table_loop_mode' is deprecated and will be removed in a future release
39+
SHOW VARIABLES LIKE "spider_udf_ds_table_loop_mode";
40+
Variable_name Value
41+
spider_udf_ds_table_loop_mode 1
42+
SET spider_udf_ds_use_real_table = 1;
43+
Warnings:
44+
Warning 1287 '@@spider_udf_ds_use_real_table' is deprecated and will be removed in a future release
45+
SHOW VARIABLES LIKE "spider_udf_ds_use_real_table";
46+
Variable_name Value
47+
spider_udf_ds_use_real_table 1
48+
SET GLOBAL spider_udf_ct_bulk_insert_interval = 1;
49+
Warnings:
50+
Warning 1287 '@@spider_udf_ct_bulk_insert_interval' is deprecated and will be removed in a future release
51+
SHOW VARIABLES LIKE "spider_udf_ct_bulk_insert_interval";
52+
Variable_name Value
53+
spider_udf_ct_bulk_insert_interval 1
54+
SET GLOBAL spider_udf_ct_bulk_insert_rows = 1;
55+
Warnings:
56+
Warning 1287 '@@spider_udf_ct_bulk_insert_rows' is deprecated and will be removed in a future release
57+
SHOW VARIABLES LIKE "spider_udf_ct_bulk_insert_rows";
58+
Variable_name Value
59+
spider_udf_ct_bulk_insert_rows 1
2960
DROP DATABASE auto_test_local;
3061
for master_1
3162
for child2

storage/spider/mysql-test/spider/t/variable_deprecation.test

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,27 @@ CREATE DATABASE auto_test_local;
1313
USE auto_test_local;
1414

1515
--echo # MDEV-27923 Deprecate spider_use_handler
16-
SET spider_use_handler= 3;
16+
SET spider_use_handler = 3;
1717
SHOW VARIABLES LIKE "spider_use_handler";
1818
eval CREATE TABLE tbl_a (a INT) $MASTER_1_ENGINE COMMENT='uhd "3"';
1919
eval CREATE TABLE tbl_b (a INT) $MASTER_1_ENGINE COMMENT='use_handler "3"';
2020

21+
--echo # MDEV-28005 Deprecate Spider plugin variables regarding UDFs
22+
SET GLOBAL spider_udf_ds_bulk_insert_rows = 1;
23+
SHOW VARIABLES LIKE "spider_udf_ds_bulk_insert_rows";
24+
25+
SET spider_udf_ds_table_loop_mode = 1;
26+
SHOW VARIABLES LIKE "spider_udf_ds_table_loop_mode";
27+
28+
SET spider_udf_ds_use_real_table = 1;
29+
SHOW VARIABLES LIKE "spider_udf_ds_use_real_table";
30+
31+
SET GLOBAL spider_udf_ct_bulk_insert_interval = 1;
32+
SHOW VARIABLES LIKE "spider_udf_ct_bulk_insert_interval";
33+
34+
SET GLOBAL spider_udf_ct_bulk_insert_rows = 1;
35+
SHOW VARIABLES LIKE "spider_udf_ct_bulk_insert_rows";
36+
2137
DROP DATABASE auto_test_local;
2238

2339
--disable_query_log

storage/spider/spd_param.cc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2111,7 +2111,7 @@ uint spider_param_udf_table_mon_mutex_count()
21112111
*/
21122112
static MYSQL_THDVAR_LONGLONG(
21132113
udf_ds_bulk_insert_rows, /* name */
2114-
PLUGIN_VAR_RQCMDARG, /* opt */
2114+
PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_DEPRECATED, /* opt */
21152115
"Number of rows for bulk inserting", /* comment */
21162116
NULL, /* check */
21172117
NULL, /* update */
@@ -2138,7 +2138,7 @@ longlong spider_param_udf_ds_bulk_insert_rows(
21382138
*/
21392139
static MYSQL_THDVAR_INT(
21402140
udf_ds_table_loop_mode, /* name */
2141-
PLUGIN_VAR_RQCMDARG, /* opt */
2141+
PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_DEPRECATED, /* opt */
21422142
"Table loop mode if the number of tables in table list are less than the number of result sets", /* comment */
21432143
NULL, /* check */
21442144
NULL, /* update */
@@ -2495,7 +2495,7 @@ static int spider_udf_ct_bulk_insert_interval;
24952495
static MYSQL_SYSVAR_INT(
24962496
udf_ct_bulk_insert_interval,
24972497
spider_udf_ct_bulk_insert_interval,
2498-
PLUGIN_VAR_RQCMDARG,
2498+
PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_DEPRECATED,
24992499
"The interval time between bulk insert and next bulk insert at coping",
25002500
NULL,
25012501
NULL,
@@ -2521,7 +2521,7 @@ static longlong spider_udf_ct_bulk_insert_rows;
25212521
static MYSQL_SYSVAR_LONGLONG(
25222522
udf_ct_bulk_insert_rows,
25232523
spider_udf_ct_bulk_insert_rows,
2524-
PLUGIN_VAR_RQCMDARG,
2524+
PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_DEPRECATED,
25252525
"The number of rows inserted with bulk insert of one time at coping",
25262526
NULL,
25272527
NULL,
@@ -2909,7 +2909,7 @@ int spider_param_bulk_access_free(
29092909
*/
29102910
static MYSQL_THDVAR_INT(
29112911
udf_ds_use_real_table, /* name */
2912-
PLUGIN_VAR_RQCMDARG, /* opt */
2912+
PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_DEPRECATED, /* opt */
29132913
"Use real table for temporary table list", /* comment */
29142914
NULL, /* check */
29152915
NULL, /* update */

0 commit comments

Comments
 (0)