Commit 1a76d751 authored by Yuchen Pei's avatar Yuchen Pei

MDEV-32804 Remove references to spider_rewrite_plugin tables

They are not used. The code paths are never reached.
parent ed0ab6e1
......@@ -139,27 +139,6 @@ let $PLUGIN_VERSION=
`SELECT SUBSTRING_INDEX(plugin_version, '.', 1)
FROM information_schema.plugins
WHERE plugin_name = 'SPIDER'`;
if (`SELECT IF($PLUGIN_VERSION = 3, 1, 0)`)
{
let $HAS_REWRITE=
`SELECT IF (STRCMP('$SERVER_NAME', 'MariaDB') = 0,
IF ($SERVER_MAJOR_VERSION = 10,
IF ($SERVER_MINOR_VERSION < 4, 0, 1),
IF ($SERVER_MAJOR_VERSION < 10, 0, 1)),
0)`;
let $HAS_REWRITE= 0;
if ($HAS_REWRITE)
{
let $PLUGIN_NAME= spider_flush_rewrite_cache;
let $PLUGIN_EXIST=
`SELECT COUNT(*) FROM mysql.func WHERE name = '$PLUGIN_NAME'`;
while (!$PLUGIN_EXIST)
{
let $PLUGIN_EXIST=
`SELECT COUNT(*) FROM mysql.func WHERE name = '$PLUGIN_NAME'`;
}
}
}
let $PLUGIN_NAME= spider_flush_table_mon_cache;
let $PLUGIN_EXIST=
`SELECT COUNT(*) FROM mysql.func WHERE name = '$PLUGIN_NAME'`;
......
......@@ -339,24 +339,6 @@ TABLE *spider_open_sys_table(
}
DBUG_ASSERT(0);
break;
case 21:
if (!memcmp(table_name, SPIDER_SYS_RW_TBLS_TABLE_NAME_STR,
SPIDER_SYS_RW_TBLS_TABLE_NAME_LEN))
{
DBUG_PRINT("info",("spider checking for SYS_RW_TBLS"));
if (table->s->fields != SPIDER_SYS_RW_TBLS_COL_CNT)
{
spider_close_sys_table(thd, table, open_tables_backup, need_lock);
table = NULL;
my_printf_error(ER_SPIDER_SYS_TABLE_VERSION_NUM,
ER_SPIDER_SYS_TABLE_VERSION_STR, MYF(0),
SPIDER_SYS_RW_TBLS_TABLE_NAME_STR);
*error_num = ER_SPIDER_SYS_TABLE_VERSION_NUM;
goto error_col_num_chk;
}
}
DBUG_ASSERT(0);
break;
case 22:
if (!memcmp(table_name, SPIDER_SYS_LINK_FAILED_TABLE_NAME_STR,
SPIDER_SYS_LINK_FAILED_TABLE_NAME_LEN))
......@@ -393,60 +375,6 @@ TABLE *spider_open_sys_table(
}
break;
}
if (!memcmp(table_name, SPIDER_SYS_RWN_TBLS_TABLE_NAME_STR,
SPIDER_SYS_RWN_TBLS_TABLE_NAME_LEN))
{
DBUG_PRINT("info",("spider checking for SYS_RWN_TBLS"));
if (table->s->fields != SPIDER_SYS_RWN_TBLS_COL_CNT)
{
spider_close_sys_table(thd, table, open_tables_backup, need_lock);
table = NULL;
my_printf_error(ER_SPIDER_SYS_TABLE_VERSION_NUM,
ER_SPIDER_SYS_TABLE_VERSION_STR, MYF(0),
SPIDER_SYS_RWN_TBLS_TABLE_NAME_STR);
*error_num = ER_SPIDER_SYS_TABLE_VERSION_NUM;
goto error_col_num_chk;
}
break;
}
DBUG_ASSERT(0);
break;
case 27:
if (!memcmp(table_name, SPIDER_SYS_RW_TBL_TBLS_TABLE_NAME_STR,
SPIDER_SYS_RW_TBL_TBLS_TABLE_NAME_LEN))
{
DBUG_PRINT("info",("spider checking for SYS_RW_TBL_TBLS"));
if (table->s->fields != SPIDER_SYS_RW_TBL_TBLS_COL_CNT)
{
spider_close_sys_table(thd, table, open_tables_backup, need_lock);
table = NULL;
my_printf_error(ER_SPIDER_SYS_TABLE_VERSION_NUM,
ER_SPIDER_SYS_TABLE_VERSION_STR, MYF(0),
SPIDER_SYS_RW_TBL_TBLS_TABLE_NAME_STR);
*error_num = ER_SPIDER_SYS_TABLE_VERSION_NUM;
goto error_col_num_chk;
}
break;
}
DBUG_ASSERT(0);
break;
case 31:
if (!memcmp(table_name, SPIDER_SYS_RW_TBL_PTTS_TABLE_NAME_STR,
SPIDER_SYS_RW_TBL_PTTS_TABLE_NAME_LEN))
{
DBUG_PRINT("info",("spider checking for SYS_RW_TBL_PTTS"));
if (table->s->fields != SPIDER_SYS_RW_TBL_PTTS_COL_CNT)
{
spider_close_sys_table(thd, table, open_tables_backup, need_lock);
table = NULL;
my_printf_error(ER_SPIDER_SYS_TABLE_VERSION_NUM,
ER_SPIDER_SYS_TABLE_VERSION_STR, MYF(0),
SPIDER_SYS_RW_TBL_PTTS_TABLE_NAME_STR);
*error_num = ER_SPIDER_SYS_TABLE_VERSION_NUM;
goto error_col_num_chk;
}
break;
}
DBUG_ASSERT(0);
break;
case 34:
......@@ -466,22 +394,6 @@ TABLE *spider_open_sys_table(
}
break;
}
if (!memcmp(table_name, SPIDER_SYS_RW_TBL_SPTTS_TABLE_NAME_STR,
SPIDER_SYS_RW_TBL_SPTTS_TABLE_NAME_LEN))
{
DBUG_PRINT("info",("spider checking for SYS_RW_TBL_SPTTS"));
if (table->s->fields != SPIDER_SYS_RW_TBL_SPTTS_COL_CNT)
{
spider_close_sys_table(thd, table, open_tables_backup, need_lock);
table = NULL;
my_printf_error(ER_SPIDER_SYS_TABLE_VERSION_NUM,
ER_SPIDER_SYS_TABLE_VERSION_STR, MYF(0),
SPIDER_SYS_RW_TBL_SPTTS_TABLE_NAME_STR);
*error_num = ER_SPIDER_SYS_TABLE_VERSION_NUM;
goto error_col_num_chk;
}
break;
}
DBUG_ASSERT(0);
break;
default:
......
......@@ -32,16 +32,6 @@
#define SPIDER_SYS_TABLE_STS_TABLE_NAME_LEN 16
#define SPIDER_SYS_TABLE_CRD_TABLE_NAME_STR "spider_table_crd"
#define SPIDER_SYS_TABLE_CRD_TABLE_NAME_LEN 16
#define SPIDER_SYS_RW_TBLS_TABLE_NAME_STR "spider_rewrite_tables"
#define SPIDER_SYS_RW_TBLS_TABLE_NAME_LEN 21
#define SPIDER_SYS_RW_TBL_TBLS_TABLE_NAME_STR "spider_rewrite_table_tables"
#define SPIDER_SYS_RW_TBL_TBLS_TABLE_NAME_LEN 27
#define SPIDER_SYS_RW_TBL_PTTS_TABLE_NAME_STR "spider_rewrite_table_partitions"
#define SPIDER_SYS_RW_TBL_PTTS_TABLE_NAME_LEN 31
#define SPIDER_SYS_RW_TBL_SPTTS_TABLE_NAME_STR "spider_rewrite_table_subpartitions"
#define SPIDER_SYS_RW_TBL_SPTTS_TABLE_NAME_LEN 34
#define SPIDER_SYS_RWN_TBLS_TABLE_NAME_STR "spider_rewritten_tables"
#define SPIDER_SYS_RWN_TBLS_TABLE_NAME_LEN 23
#define SPIDER_SYS_XA_PREPARED_STR "PREPARED"
#define SPIDER_SYS_XA_NOT_YET_STR "NOT YET"
......@@ -65,11 +55,6 @@
#define SPIDER_SYS_TABLE_STS_PK_COL_CNT 2
#define SPIDER_SYS_TABLE_CRD_COL_CNT 4
#define SPIDER_SYS_TABLE_CRD_PK_COL_CNT 3
#define SPIDER_SYS_RW_TBLS_COL_CNT 3
#define SPIDER_SYS_RW_TBL_TBLS_COL_CNT 8
#define SPIDER_SYS_RW_TBL_PTTS_COL_CNT 7
#define SPIDER_SYS_RW_TBL_SPTTS_COL_CNT 8
#define SPIDER_SYS_RWN_TBLS_COL_CNT 4
#define SPIDER_SYS_LINK_MON_TABLE_DB_NAME_SIZE 64
#define SPIDER_SYS_LINK_MON_TABLE_TABLE_NAME_SIZE 64
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment