Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Won't Fix
-
10.1.0
-
None
-
all
Description
I have added support for SHOW TABLES discovery to the ScaleDB interface 'discover_table_names'
(ie show tables will now call into scaledb to get a list of tables in the database).
However, there seems to be a problem in mariadb.
The file based discovery is still getting called.
handler.cpp:5137
...
error= extension_based_table_discovery(dirp, reg_ext, result) ||
plugin_foreach(thd, discover_names,
MYSQL_STORAGE_ENGINE_PLUGIN, &args);
result->sort();
...
SHOW TABLES looks at both the directory contents (ie. the FRM files) as well as calling into ScaleDB to get the list, and then returns a list (excluding duplicates). In most cases this works fine (but not in a clustered environment like ScaleDB),
If the FRM is present, but the table does not exist in SCALEDB, then SHOW TABLES will report that the table still exists which is wrong.
This can occur in the following case,
1) i create table T on node 1, an FRM file is created on node 1:
2) on node 2 i drop table T.
The table now won't exists in scaledb anymore but there is still an FRM on node 1. So if I run SHOW TABLES against node 1 it will return table T.
fix: need to remove the file based discovery if discover_table_names is supported.