summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKiyoshiTakeda <d8sk4ueum@gmail.com>2022-04-13 06:21:15 +0000
committerGitHub <noreply@github.com>2022-04-13 15:21:15 +0900
commite87c710dfc802254a59fa1bb0f9f43afaf3ef301 (patch)
tree7b9749fd2cf10d8665e60a2a70a773d19c49a4f1
parentaa3a9d1ef58a0993971cde672dafc56bca71a71e (diff)
downloadmariadb-git-e87c710dfc802254a59fa1bb0f9f43afaf3ef301.tar.gz
MDEV-27981 Deprecate spider_internal_limit
The variable spider_internal_limit is for specifying the number of records acquired by Spider from each remote server. There seems not to be much use of the variable. Thus, we deprecate it and the corresponding table options. Reviewed-by: Nayuta Yanagisawa <nayuta.yanagisawa@hey.com>
-rw-r--r--storage/spider/mysql-test/spider/r/variable_deprecation.result17
-rw-r--r--storage/spider/mysql-test/spider/t/variable_deprecation.test12
-rw-r--r--storage/spider/spd_param.cc2
-rw-r--r--storage/spider/spd_table.cc2
4 files changed, 32 insertions, 1 deletions
diff --git a/storage/spider/mysql-test/spider/r/variable_deprecation.result b/storage/spider/mysql-test/spider/r/variable_deprecation.result
index b9c7fb17839..6d715d95b9f 100644
--- a/storage/spider/mysql-test/spider/r/variable_deprecation.result
+++ b/storage/spider/mysql-test/spider/r/variable_deprecation.result
@@ -26,6 +26,8 @@ Warning 1287 The table parameter 'uhd' is deprecated and will be removed in a fu
CREATE TABLE tbl_b (a INT) ENGINE=Spider COMMENT='use_handler "3"';
Warnings:
Warning 1287 The table parameter 'use_handler' is deprecated and will be removed in a future release
+DROP TABLE tbl_a;
+DROP TABLE tbl_b;
# MDEV-28005 Deprecate Spider plugin variables regarding UDFs
SET GLOBAL spider_udf_ds_bulk_insert_rows = 1;
Warnings:
@@ -57,6 +59,21 @@ Warning 1287 '@@spider_udf_ct_bulk_insert_rows' is deprecated and will be remove
SHOW VARIABLES LIKE "spider_udf_ct_bulk_insert_rows";
Variable_name Value
spider_udf_ct_bulk_insert_rows 1
+# MDEV-27981 Deprecate spider_internal_limit
+SET spider_internal_limit = 1;
+Warnings:
+Warning 1287 '@@spider_internal_limit' is deprecated and will be removed in a future release
+SHOW VARIABLES LIKE "spider_internal_limit";
+Variable_name Value
+spider_internal_limit 9223372032559808513
+CREATE TABLE tbl_a (a INT) ENGINE=Spider COMMENT='ilm "1"';
+Warnings:
+Warning 1287 The table parameter 'ilm' is deprecated and will be removed in a future release
+CREATE TABLE tbl_b (a INT) ENGINE=Spider COMMENT='internal_limit "1"';
+Warnings:
+Warning 1287 The table parameter 'internal_limit' 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
diff --git a/storage/spider/mysql-test/spider/t/variable_deprecation.test b/storage/spider/mysql-test/spider/t/variable_deprecation.test
index 23519be146e..8521f5595d1 100644
--- a/storage/spider/mysql-test/spider/t/variable_deprecation.test
+++ b/storage/spider/mysql-test/spider/t/variable_deprecation.test
@@ -18,6 +18,9 @@ SHOW VARIABLES LIKE "spider_use_handler";
eval CREATE TABLE tbl_a (a INT) $MASTER_1_ENGINE COMMENT='uhd "3"';
eval CREATE TABLE tbl_b (a INT) $MASTER_1_ENGINE COMMENT='use_handler "3"';
+DROP TABLE tbl_a;
+DROP TABLE tbl_b;
+
--echo # MDEV-28005 Deprecate Spider plugin variables regarding UDFs
SET GLOBAL spider_udf_ds_bulk_insert_rows = 1;
SHOW VARIABLES LIKE "spider_udf_ds_bulk_insert_rows";
@@ -34,6 +37,15 @@ SHOW VARIABLES LIKE "spider_udf_ct_bulk_insert_interval";
SET GLOBAL spider_udf_ct_bulk_insert_rows = 1;
SHOW VARIABLES LIKE "spider_udf_ct_bulk_insert_rows";
+--echo # MDEV-27981 Deprecate spider_internal_limit
+SET spider_internal_limit = 1;
+SHOW VARIABLES LIKE "spider_internal_limit";
+eval CREATE TABLE tbl_a (a INT) $MASTER_1_ENGINE COMMENT='ilm "1"';
+eval CREATE TABLE tbl_b (a INT) $MASTER_1_ENGINE COMMENT='internal_limit "1"';
+
+DROP TABLE tbl_a;
+DROP TABLE tbl_b;
+
DROP DATABASE auto_test_local;
--disable_query_log
diff --git a/storage/spider/spd_param.cc b/storage/spider/spd_param.cc
index c20b36bab33..cf91d8f3085 100644
--- a/storage/spider/spd_param.cc
+++ b/storage/spider/spd_param.cc
@@ -494,7 +494,7 @@ longlong spider_param_internal_offset(
*/
static MYSQL_THDVAR_LONGLONG(
internal_limit, /* name */
- PLUGIN_VAR_RQCMDARG, /* opt */
+ PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_DEPRECATED, /* opt */
"Internal limit", /* comment */
NULL, /* check */
spider_use_table_value_deprecated, /* update */
diff --git a/storage/spider/spd_table.cc b/storage/spider/spd_table.cc
index 497bad63102..d09f12352ff 100644
--- a/storage/spider/spd_table.cc
+++ b/storage/spider/spd_table.cc
@@ -2375,6 +2375,7 @@ int spider_parse_connect_info(
#endif
SPIDER_PARAM_INT("isa", init_sql_alloc_size, 0);
SPIDER_PARAM_INT_WITH_MAX("idl", internal_delayed, 0, 1);
+ SPIDER_PARAM_DEPRECATED_WARNING("ilm");
SPIDER_PARAM_LONGLONG("ilm", internal_limit, 0);
SPIDER_PARAM_LONGLONG("ios", internal_offset, 0);
SPIDER_PARAM_INT_WITH_MAX("iom", internal_optimize, 0, 1);
@@ -2563,6 +2564,7 @@ int spider_parse_connect_info(
error_num = connect_string_parse.print_param_error();
goto error;
case 14:
+ SPIDER_PARAM_DEPRECATED_WARNING("internal_limit");
SPIDER_PARAM_LONGLONG("internal_limit", internal_limit, 0);
#ifndef WITHOUT_SPIDER_BG_SEARCH
SPIDER_PARAM_LONGLONG("bgs_first_read", bgs_first_read, 0);