Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MDEV-28560 Deprecate spider_buffer_size #2127

Merged
merged 2 commits into from May 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
15 changes: 15 additions & 0 deletions storage/spider/mysql-test/spider/r/variable_deprecation.result
Expand Up @@ -181,6 +181,21 @@ Warnings:
Warning 1287 The table parameter 'crd_weight' is deprecated and will be removed in a future release
DROP TABLE tbl_a;
DROP TABLE tbl_b;
# MDEV-28560 Deprecate spider_buffer_size
SET spider_buffer_size = 1;
Warnings:
Warning 1287 '@@spider_buffer_size' is deprecated and will be removed in a future release
SHOW VARIABLES LIKE "spider_buffer_size";
Variable_name Value
spider_buffer_size 1
CREATE TABLE tbl_a (a INT) ENGINE=Spider COMMENT='bfz "1"';
Warnings:
Warning 1287 The table parameter 'bfz' is deprecated and will be removed in a future release
CREATE TABLE tbl_b (a INT) ENGINE=Spider COMMENT='buffer_size "1"';
Warnings:
Warning 1287 The table parameter 'buffer_size' is deprecated and will be removed in a future release
DROP TABLE tbl_a;
DROP TABLE tbl_b;
DROP DATABASE auto_test_local;
for master_1
for child2
Expand Down
9 changes: 9 additions & 0 deletions storage/spider/mysql-test/spider/t/variable_deprecation.test
Expand Up @@ -108,6 +108,15 @@ eval CREATE TABLE tbl_b (a INT) $MASTER_1_ENGINE COMMENT='crd_weight "1"';
DROP TABLE tbl_a;
DROP TABLE tbl_b;

--echo # MDEV-28560 Deprecate spider_buffer_size
SET spider_buffer_size = 1;
SHOW VARIABLES LIKE "spider_buffer_size";
eval CREATE TABLE tbl_a (a INT) $MASTER_1_ENGINE COMMENT='bfz "1"';
eval CREATE TABLE tbl_b (a INT) $MASTER_1_ENGINE COMMENT='buffer_size "1"';

DROP TABLE tbl_a;
DROP TABLE tbl_b;

DROP DATABASE auto_test_local;

--disable_query_log
Expand Down
2 changes: 1 addition & 1 deletion storage/spider/spd_param.cc
Expand Up @@ -1073,7 +1073,7 @@ int spider_param_bulk_update_size(
*/
static MYSQL_THDVAR_INT(
buffer_size, /* name */
PLUGIN_VAR_RQCMDARG, /* opt */
PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_DEPRECATED, /* opt */
"Buffer size", /* comment */
NULL, /* check */
spider_use_table_value_deprecated, /* update */
Expand Down
2 changes: 2 additions & 0 deletions storage/spider/spd_table.cc
Expand Up @@ -2319,6 +2319,7 @@ int spider_parse_connect_info(
#ifdef HA_CAN_BULK_ACCESS
SPIDER_PARAM_INT_WITH_MAX("baf", bulk_access_free, 0, 1);
#endif
SPIDER_PARAM_DEPRECATED_WARNING("bfz");
SPIDER_PARAM_INT("bfz", buffer_size, 0);
#ifndef WITHOUT_SPIDER_BG_SEARCH
SPIDER_PARAM_LONGLONG("bfr", bgs_first_read, 0);
Expand Down Expand Up @@ -2547,6 +2548,7 @@ int spider_parse_connect_info(
SPIDER_PARAM_LONG_LIST_WITH_MAX("use_hs_read", use_hs_reads, 0, 1);
#endif
SPIDER_PARAM_INT_WITH_MAX("casual_read", casual_read, 0, 63);
SPIDER_PARAM_DEPRECATED_WARNING("buffer_size");
SPIDER_PARAM_INT("buffer_size", buffer_size, 0);
error_num = connect_string_parse.print_param_error();
goto error;
Expand Down