mirror of
https://github.com/MariaDB/server.git
synced 2025-01-16 03:52:35 +01:00
MDEV-28010 Deprecate spider_crd_type and spider_crd_weight
Deprecate the variables spider_crd_type and spider_crd_weight. The value should be defined by the engine developers.
This commit is contained in:
parent
075c94fe2b
commit
cc13ab0ffc
4 changed files with 52 additions and 2 deletions
|
@ -137,6 +137,35 @@ Warnings:
|
|||
Warning 1287 The table parameter 'sts_mode' is deprecated and will be removed in a future release
|
||||
DROP TABLE tbl_a;
|
||||
DROP TABLE tbl_b;
|
||||
# MDEV-28010 Deprecate spider_crd_type and spider_crd_weight
|
||||
SET spider_crd_type = 1;
|
||||
Warnings:
|
||||
Warning 1287 '@@spider_crd_type' is deprecated and will be removed in a future release
|
||||
SHOW VARIABLES LIKE "spider_crd_type";
|
||||
Variable_name Value
|
||||
spider_crd_type 1
|
||||
CREATE TABLE tbl_a (a INT) ENGINE=Spider COMMENT='ctp "1"';
|
||||
Warnings:
|
||||
Warning 1287 The table parameter 'ctp' is deprecated and will be removed in a future release
|
||||
CREATE TABLE tbl_b (a INT) ENGINE=Spider COMMENT='crd_type "1"';
|
||||
Warnings:
|
||||
Warning 1287 The table parameter 'crd_type' is deprecated and will be removed in a future release
|
||||
DROP TABLE tbl_a;
|
||||
DROP TABLE tbl_b;
|
||||
SET spider_crd_weight = 1;
|
||||
Warnings:
|
||||
Warning 1287 '@@spider_crd_weight' is deprecated and will be removed in a future release
|
||||
SHOW VARIABLES LIKE "spider_crd_weight";
|
||||
Variable_name Value
|
||||
spider_crd_weight 1
|
||||
CREATE TABLE tbl_a (a INT) ENGINE=Spider COMMENT='cwg "1"';
|
||||
Warnings:
|
||||
Warning 1287 The table parameter 'cwg' is deprecated and will be removed in a future release
|
||||
CREATE TABLE tbl_b (a INT) ENGINE=Spider COMMENT='crd_weight "1"';
|
||||
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;
|
||||
DROP DATABASE auto_test_local;
|
||||
for master_1
|
||||
for child2
|
||||
|
|
|
@ -83,6 +83,23 @@ eval CREATE TABLE tbl_b (a INT) $MASTER_1_ENGINE COMMENT='sts_mode "3"';
|
|||
DROP TABLE tbl_a;
|
||||
DROP TABLE tbl_b;
|
||||
|
||||
--echo # MDEV-28010 Deprecate spider_crd_type and spider_crd_weight
|
||||
SET spider_crd_type = 1;
|
||||
SHOW VARIABLES LIKE "spider_crd_type";
|
||||
eval CREATE TABLE tbl_a (a INT) $MASTER_1_ENGINE COMMENT='ctp "1"';
|
||||
eval CREATE TABLE tbl_b (a INT) $MASTER_1_ENGINE COMMENT='crd_type "1"';
|
||||
|
||||
DROP TABLE tbl_a;
|
||||
DROP TABLE tbl_b;
|
||||
|
||||
SET spider_crd_weight = 1;
|
||||
SHOW VARIABLES LIKE "spider_crd_weight";
|
||||
eval CREATE TABLE tbl_a (a INT) $MASTER_1_ENGINE COMMENT='cwg "1"';
|
||||
eval CREATE TABLE tbl_b (a INT) $MASTER_1_ENGINE COMMENT='crd_weight "1"';
|
||||
|
||||
DROP TABLE tbl_a;
|
||||
DROP TABLE tbl_b;
|
||||
|
||||
DROP DATABASE auto_test_local;
|
||||
|
||||
--disable_query_log
|
||||
|
|
|
@ -1707,7 +1707,7 @@ int spider_param_crd_sync(
|
|||
*/
|
||||
static MYSQL_THDVAR_INT(
|
||||
crd_type, /* name */
|
||||
PLUGIN_VAR_RQCMDARG, /* opt */
|
||||
PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_DEPRECATED, /* opt */
|
||||
"Type of cardinality calculation.", /* comment */
|
||||
NULL, /* check */
|
||||
spider_use_table_value_deprecated, /* update */
|
||||
|
@ -1732,7 +1732,7 @@ int spider_param_crd_type(
|
|||
*/
|
||||
static MYSQL_THDVAR_INT(
|
||||
crd_weight, /* name */
|
||||
PLUGIN_VAR_RQCMDARG, /* opt */
|
||||
PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_DEPRECATED, /* opt */
|
||||
"Weight coefficient to calculate effectiveness of index from cardinality of column.", /* comment */
|
||||
NULL, /* check */
|
||||
spider_use_table_value_deprecated, /* update */
|
||||
|
|
|
@ -2344,7 +2344,9 @@ int spider_parse_connect_info(
|
|||
#endif
|
||||
SPIDER_PARAM_LONG_LIST_WITH_MAX("cto", connect_timeouts, 0,
|
||||
2147483647);
|
||||
SPIDER_PARAM_DEPRECATED_WARNING("ctp");
|
||||
SPIDER_PARAM_INT_WITH_MAX("ctp", crd_type, 0, 2);
|
||||
SPIDER_PARAM_DEPRECATED_WARNING("cwg");
|
||||
SPIDER_PARAM_DOUBLE("cwg", crd_weight, 1);
|
||||
SPIDER_PARAM_INT_WITH_MAX("dat", delete_all_rows_type, 0, 1);
|
||||
SPIDER_PARAM_INT_WITH_MAX("ddi", direct_dup_insert, 0, 1);
|
||||
|
@ -2503,6 +2505,7 @@ int spider_parse_connect_info(
|
|||
#ifdef WITH_PARTITION_STORAGE_ENGINE
|
||||
SPIDER_PARAM_INT_WITH_MAX("crd_sync", crd_sync, 0, 2);
|
||||
#endif
|
||||
SPIDER_PARAM_DEPRECATED_WARNING("crd_type");
|
||||
SPIDER_PARAM_INT_WITH_MAX("crd_type", crd_type, 0, 2);
|
||||
SPIDER_PARAM_LONGLONG("priority", priority, 0);
|
||||
#ifndef WITHOUT_SPIDER_BG_SEARCH
|
||||
|
@ -2520,6 +2523,7 @@ int spider_parse_connect_info(
|
|||
error_num = connect_string_parse.print_param_error();
|
||||
goto error;
|
||||
case 10:
|
||||
SPIDER_PARAM_DEPRECATED_WARNING("crd_weight");
|
||||
SPIDER_PARAM_DOUBLE("crd_weight", crd_weight, 1);
|
||||
SPIDER_PARAM_LONGLONG("split_read", split_read, 0);
|
||||
SPIDER_PARAM_INT_WITH_MAX("quick_mode", quick_mode, 0, 3);
|
||||
|
|
Loading…
Reference in a new issue