Skip to content

Commit 1a76d75

Browse files
MDEV-32804 Remove references to spider_rewrite_plugin tables
They are not used. The code paths are never reached.
1 parent ed0ab6e commit 1a76d75

File tree

3 files changed

+0
-124
lines changed

3 files changed

+0
-124
lines changed

storage/spider/mysql-test/spider/include/init_spider.inc

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -139,27 +139,6 @@ let $PLUGIN_VERSION=
139139
`SELECT SUBSTRING_INDEX(plugin_version, '.', 1)
140140
FROM information_schema.plugins
141141
WHERE plugin_name = 'SPIDER'`;
142-
if (`SELECT IF($PLUGIN_VERSION = 3, 1, 0)`)
143-
{
144-
let $HAS_REWRITE=
145-
`SELECT IF (STRCMP('$SERVER_NAME', 'MariaDB') = 0,
146-
IF ($SERVER_MAJOR_VERSION = 10,
147-
IF ($SERVER_MINOR_VERSION < 4, 0, 1),
148-
IF ($SERVER_MAJOR_VERSION < 10, 0, 1)),
149-
0)`;
150-
let $HAS_REWRITE= 0;
151-
if ($HAS_REWRITE)
152-
{
153-
let $PLUGIN_NAME= spider_flush_rewrite_cache;
154-
let $PLUGIN_EXIST=
155-
`SELECT COUNT(*) FROM mysql.func WHERE name = '$PLUGIN_NAME'`;
156-
while (!$PLUGIN_EXIST)
157-
{
158-
let $PLUGIN_EXIST=
159-
`SELECT COUNT(*) FROM mysql.func WHERE name = '$PLUGIN_NAME'`;
160-
}
161-
}
162-
}
163142
let $PLUGIN_NAME= spider_flush_table_mon_cache;
164143
let $PLUGIN_EXIST=
165144
`SELECT COUNT(*) FROM mysql.func WHERE name = '$PLUGIN_NAME'`;

storage/spider/spd_sys_table.cc

Lines changed: 0 additions & 88 deletions
Original file line numberDiff line numberDiff line change
@@ -339,24 +339,6 @@ TABLE *spider_open_sys_table(
339339
}
340340
DBUG_ASSERT(0);
341341
break;
342-
case 21:
343-
if (!memcmp(table_name, SPIDER_SYS_RW_TBLS_TABLE_NAME_STR,
344-
SPIDER_SYS_RW_TBLS_TABLE_NAME_LEN))
345-
{
346-
DBUG_PRINT("info",("spider checking for SYS_RW_TBLS"));
347-
if (table->s->fields != SPIDER_SYS_RW_TBLS_COL_CNT)
348-
{
349-
spider_close_sys_table(thd, table, open_tables_backup, need_lock);
350-
table = NULL;
351-
my_printf_error(ER_SPIDER_SYS_TABLE_VERSION_NUM,
352-
ER_SPIDER_SYS_TABLE_VERSION_STR, MYF(0),
353-
SPIDER_SYS_RW_TBLS_TABLE_NAME_STR);
354-
*error_num = ER_SPIDER_SYS_TABLE_VERSION_NUM;
355-
goto error_col_num_chk;
356-
}
357-
}
358-
DBUG_ASSERT(0);
359-
break;
360342
case 22:
361343
if (!memcmp(table_name, SPIDER_SYS_LINK_FAILED_TABLE_NAME_STR,
362344
SPIDER_SYS_LINK_FAILED_TABLE_NAME_LEN))
@@ -393,60 +375,6 @@ TABLE *spider_open_sys_table(
393375
}
394376
break;
395377
}
396-
if (!memcmp(table_name, SPIDER_SYS_RWN_TBLS_TABLE_NAME_STR,
397-
SPIDER_SYS_RWN_TBLS_TABLE_NAME_LEN))
398-
{
399-
DBUG_PRINT("info",("spider checking for SYS_RWN_TBLS"));
400-
if (table->s->fields != SPIDER_SYS_RWN_TBLS_COL_CNT)
401-
{
402-
spider_close_sys_table(thd, table, open_tables_backup, need_lock);
403-
table = NULL;
404-
my_printf_error(ER_SPIDER_SYS_TABLE_VERSION_NUM,
405-
ER_SPIDER_SYS_TABLE_VERSION_STR, MYF(0),
406-
SPIDER_SYS_RWN_TBLS_TABLE_NAME_STR);
407-
*error_num = ER_SPIDER_SYS_TABLE_VERSION_NUM;
408-
goto error_col_num_chk;
409-
}
410-
break;
411-
}
412-
DBUG_ASSERT(0);
413-
break;
414-
case 27:
415-
if (!memcmp(table_name, SPIDER_SYS_RW_TBL_TBLS_TABLE_NAME_STR,
416-
SPIDER_SYS_RW_TBL_TBLS_TABLE_NAME_LEN))
417-
{
418-
DBUG_PRINT("info",("spider checking for SYS_RW_TBL_TBLS"));
419-
if (table->s->fields != SPIDER_SYS_RW_TBL_TBLS_COL_CNT)
420-
{
421-
spider_close_sys_table(thd, table, open_tables_backup, need_lock);
422-
table = NULL;
423-
my_printf_error(ER_SPIDER_SYS_TABLE_VERSION_NUM,
424-
ER_SPIDER_SYS_TABLE_VERSION_STR, MYF(0),
425-
SPIDER_SYS_RW_TBL_TBLS_TABLE_NAME_STR);
426-
*error_num = ER_SPIDER_SYS_TABLE_VERSION_NUM;
427-
goto error_col_num_chk;
428-
}
429-
break;
430-
}
431-
DBUG_ASSERT(0);
432-
break;
433-
case 31:
434-
if (!memcmp(table_name, SPIDER_SYS_RW_TBL_PTTS_TABLE_NAME_STR,
435-
SPIDER_SYS_RW_TBL_PTTS_TABLE_NAME_LEN))
436-
{
437-
DBUG_PRINT("info",("spider checking for SYS_RW_TBL_PTTS"));
438-
if (table->s->fields != SPIDER_SYS_RW_TBL_PTTS_COL_CNT)
439-
{
440-
spider_close_sys_table(thd, table, open_tables_backup, need_lock);
441-
table = NULL;
442-
my_printf_error(ER_SPIDER_SYS_TABLE_VERSION_NUM,
443-
ER_SPIDER_SYS_TABLE_VERSION_STR, MYF(0),
444-
SPIDER_SYS_RW_TBL_PTTS_TABLE_NAME_STR);
445-
*error_num = ER_SPIDER_SYS_TABLE_VERSION_NUM;
446-
goto error_col_num_chk;
447-
}
448-
break;
449-
}
450378
DBUG_ASSERT(0);
451379
break;
452380
case 34:
@@ -466,22 +394,6 @@ TABLE *spider_open_sys_table(
466394
}
467395
break;
468396
}
469-
if (!memcmp(table_name, SPIDER_SYS_RW_TBL_SPTTS_TABLE_NAME_STR,
470-
SPIDER_SYS_RW_TBL_SPTTS_TABLE_NAME_LEN))
471-
{
472-
DBUG_PRINT("info",("spider checking for SYS_RW_TBL_SPTTS"));
473-
if (table->s->fields != SPIDER_SYS_RW_TBL_SPTTS_COL_CNT)
474-
{
475-
spider_close_sys_table(thd, table, open_tables_backup, need_lock);
476-
table = NULL;
477-
my_printf_error(ER_SPIDER_SYS_TABLE_VERSION_NUM,
478-
ER_SPIDER_SYS_TABLE_VERSION_STR, MYF(0),
479-
SPIDER_SYS_RW_TBL_SPTTS_TABLE_NAME_STR);
480-
*error_num = ER_SPIDER_SYS_TABLE_VERSION_NUM;
481-
goto error_col_num_chk;
482-
}
483-
break;
484-
}
485397
DBUG_ASSERT(0);
486398
break;
487399
default:

storage/spider/spd_sys_table.h

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -32,16 +32,6 @@
3232
#define SPIDER_SYS_TABLE_STS_TABLE_NAME_LEN 16
3333
#define SPIDER_SYS_TABLE_CRD_TABLE_NAME_STR "spider_table_crd"
3434
#define SPIDER_SYS_TABLE_CRD_TABLE_NAME_LEN 16
35-
#define SPIDER_SYS_RW_TBLS_TABLE_NAME_STR "spider_rewrite_tables"
36-
#define SPIDER_SYS_RW_TBLS_TABLE_NAME_LEN 21
37-
#define SPIDER_SYS_RW_TBL_TBLS_TABLE_NAME_STR "spider_rewrite_table_tables"
38-
#define SPIDER_SYS_RW_TBL_TBLS_TABLE_NAME_LEN 27
39-
#define SPIDER_SYS_RW_TBL_PTTS_TABLE_NAME_STR "spider_rewrite_table_partitions"
40-
#define SPIDER_SYS_RW_TBL_PTTS_TABLE_NAME_LEN 31
41-
#define SPIDER_SYS_RW_TBL_SPTTS_TABLE_NAME_STR "spider_rewrite_table_subpartitions"
42-
#define SPIDER_SYS_RW_TBL_SPTTS_TABLE_NAME_LEN 34
43-
#define SPIDER_SYS_RWN_TBLS_TABLE_NAME_STR "spider_rewritten_tables"
44-
#define SPIDER_SYS_RWN_TBLS_TABLE_NAME_LEN 23
4535

4636
#define SPIDER_SYS_XA_PREPARED_STR "PREPARED"
4737
#define SPIDER_SYS_XA_NOT_YET_STR "NOT YET"
@@ -65,11 +55,6 @@
6555
#define SPIDER_SYS_TABLE_STS_PK_COL_CNT 2
6656
#define SPIDER_SYS_TABLE_CRD_COL_CNT 4
6757
#define SPIDER_SYS_TABLE_CRD_PK_COL_CNT 3
68-
#define SPIDER_SYS_RW_TBLS_COL_CNT 3
69-
#define SPIDER_SYS_RW_TBL_TBLS_COL_CNT 8
70-
#define SPIDER_SYS_RW_TBL_PTTS_COL_CNT 7
71-
#define SPIDER_SYS_RW_TBL_SPTTS_COL_CNT 8
72-
#define SPIDER_SYS_RWN_TBLS_COL_CNT 4
7358

7459
#define SPIDER_SYS_LINK_MON_TABLE_DB_NAME_SIZE 64
7560
#define SPIDER_SYS_LINK_MON_TABLE_TABLE_NAME_SIZE 64

0 commit comments

Comments
 (0)