Will only proceed with the deletion if
1. The solution to MDEV-29739 is removing the only calls to update the
table
2. Investigation shows the tables are indeed useless
Initial analysis shows that both the in-memory and persistent table
stats can be stale.
Consider the following:
11.0 4d8167563e79f2657454a9f410e9cf2a2673bf76
|
--disable_query_log
|
--disable_result_log
|
--source ../../t/test_init.inc
|
--enable_result_log
|
--enable_query_log
|
evalp CREATE SERVER srv FOREIGN DATA WRAPPER mysql
|
OPTIONS (SOCKET "$MASTER_1_MYSOCK", DATABASE 'test',user 'root');
|
create table t2 (c int);
|
create table t1 (c int) ENGINE=Spider
|
COMMENT='WRAPPER "mysql", srv "srv",TABLE "t2"';
|
|
insert into t1 values (1), (2), (3);
|
/* 1 */ show table status like "t1";
|
/* 2 */ show table status like "t2";
|
insert into t1 values (4), (5);
|
/* 3 */ show table status like "t1";
|
/* 4 */ show table status like "t2";
|
select * from mysql.spider_table_sts;
|
|
--source include/restart_mysqld.inc
|
select * from mysql.spider_table_sts;
|
/* 5 */ show table status like "t1";
|
/* 6 */ show table status like "t2";
|
|
drop table t1, t2;
|
drop server srv;
|
--disable_query_log
|
--disable_result_log
|
--source ../../t/test_deinit.inc
|
--enable_result_log
|
--enable_query_log
|
All show table status like "t1" outputs number of rows to be 2,
but the show table status like "t2" statements output accurate
numbers of rows, 3 the first time, and 5 the second and the third
times.
The first select * from mysql.spider_table_sts outputs no rows, as
expected (stats are written only on ha_close() which happens e.g. at
shutdown). The second one outputs number of rows to be 2, consistently
wrong.
If we replace the table in the first insert statement by t2, then
spider consistently reports row numbers to be 3, less wrong than 2,
but still wrong after the two extra rows are inserted.
This seems to be another instance where spider is not doing something
intended, and what is intended is unclear either... In any case,
further investigation is needed to decide what to do with these system
tables.
Will only proceed with the deletion if
1. The solution to MDEV-29739 is removing the only calls to update the
table
2. Investigation shows the tables are indeed useless
Initial analysis shows that both the in-memory and persistent table
stats can be stale.
Consider the following:
11.0 4d8167563e79f2657454a9f410e9cf2a2673bf76
--disable_query_log
--disable_result_log
--source ../../t/test_init.inc
--enable_result_log
--enable_query_log
--source include/restart_mysqld.inc
--disable_query_log
--disable_result_log
--source ../../t/test_deinit.inc
--enable_result_log
--enable_query_log
All show table status like "t1" outputs number of rows to be 2,
but the show table status like "t2" statements output accurate
numbers of rows, 3 the first time, and 5 the second and the third
times.
The first select * from mysql.spider_table_sts outputs no rows, as
expected (stats are written only on ha_close() which happens e.g. at
shutdown). The second one outputs number of rows to be 2, consistently
wrong.
If we replace the table in the first insert statement by t2, then
spider consistently reports row numbers to be 3, less wrong than 2,
but still wrong after the two extra rows are inserted.
This seems to be another instance where spider is not doing something
intended, and what is intended is unclear either... In any case,
further investigation is needed to decide what to do with these system
tables.