Skip to content

Commit 2577ff2

Browse files
authored
MDEV-28560 Deprecate spider_buffer_size
The variable, spider_buffer_size, is used nowhere in the MariaDB Community Server.
1 parent 3fe2d8e commit 2577ff2

File tree

4 files changed

+27
-1
lines changed

4 files changed

+27
-1
lines changed

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

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,21 @@ Warnings:
181181
Warning 1287 The table parameter 'crd_weight' is deprecated and will be removed in a future release
182182
DROP TABLE tbl_a;
183183
DROP TABLE tbl_b;
184+
# MDEV-28560 Deprecate spider_buffer_size
185+
SET spider_buffer_size = 1;
186+
Warnings:
187+
Warning 1287 '@@spider_buffer_size' is deprecated and will be removed in a future release
188+
SHOW VARIABLES LIKE "spider_buffer_size";
189+
Variable_name Value
190+
spider_buffer_size 1
191+
CREATE TABLE tbl_a (a INT) ENGINE=Spider COMMENT='bfz "1"';
192+
Warnings:
193+
Warning 1287 The table parameter 'bfz' is deprecated and will be removed in a future release
194+
CREATE TABLE tbl_b (a INT) ENGINE=Spider COMMENT='buffer_size "1"';
195+
Warnings:
196+
Warning 1287 The table parameter 'buffer_size' is deprecated and will be removed in a future release
197+
DROP TABLE tbl_a;
198+
DROP TABLE tbl_b;
184199
DROP DATABASE auto_test_local;
185200
for master_1
186201
for child2

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,15 @@ eval CREATE TABLE tbl_b (a INT) $MASTER_1_ENGINE COMMENT='crd_weight "1"';
108108
DROP TABLE tbl_a;
109109
DROP TABLE tbl_b;
110110

111+
--echo # MDEV-28560 Deprecate spider_buffer_size
112+
SET spider_buffer_size = 1;
113+
SHOW VARIABLES LIKE "spider_buffer_size";
114+
eval CREATE TABLE tbl_a (a INT) $MASTER_1_ENGINE COMMENT='bfz "1"';
115+
eval CREATE TABLE tbl_b (a INT) $MASTER_1_ENGINE COMMENT='buffer_size "1"';
116+
117+
DROP TABLE tbl_a;
118+
DROP TABLE tbl_b;
119+
111120
DROP DATABASE auto_test_local;
112121

113122
--disable_query_log

storage/spider/spd_param.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1073,7 +1073,7 @@ int spider_param_bulk_update_size(
10731073
*/
10741074
static MYSQL_THDVAR_INT(
10751075
buffer_size, /* name */
1076-
PLUGIN_VAR_RQCMDARG, /* opt */
1076+
PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_DEPRECATED, /* opt */
10771077
"Buffer size", /* comment */
10781078
NULL, /* check */
10791079
spider_use_table_value_deprecated, /* update */

storage/spider/spd_table.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2319,6 +2319,7 @@ int spider_parse_connect_info(
23192319
#ifdef HA_CAN_BULK_ACCESS
23202320
SPIDER_PARAM_INT_WITH_MAX("baf", bulk_access_free, 0, 1);
23212321
#endif
2322+
SPIDER_PARAM_DEPRECATED_WARNING("bfz");
23222323
SPIDER_PARAM_INT("bfz", buffer_size, 0);
23232324
#ifndef WITHOUT_SPIDER_BG_SEARCH
23242325
SPIDER_PARAM_LONGLONG("bfr", bgs_first_read, 0);
@@ -2547,6 +2548,7 @@ int spider_parse_connect_info(
25472548
SPIDER_PARAM_LONG_LIST_WITH_MAX("use_hs_read", use_hs_reads, 0, 1);
25482549
#endif
25492550
SPIDER_PARAM_INT_WITH_MAX("casual_read", casual_read, 0, 63);
2551+
SPIDER_PARAM_DEPRECATED_WARNING("buffer_size");
25502552
SPIDER_PARAM_INT("buffer_size", buffer_size, 0);
25512553
error_num = connect_string_parse.print_param_error();
25522554
goto error;

0 commit comments

Comments
 (0)