Details
-
Bug
-
Status: Closed (View Workflow)
-
Critical
-
Resolution: Fixed
-
10.4(EOL), 10.5, 10.6, 10.7(EOL)
Description
e.g. upgrade 10.2 -> latest 10.6
Phase 4/7: Running 'mysql_fix_privilege_tables'
|
ERROR 12609 (HY000) at line 786: System table spider_tables is different version
|
ERROR 12609 (HY000) at line 805: System table spider_tables is different version
|
ERROR 1007 (HY000) at line 810: Can't create database 'performance_schema'; database exists
|
Attachments
Issue Links
- is blocked by
-
MDEV-29870 Backport fixes to spider init bugs to 10.4-10.6 once they have SQL service
-
- Closed
-
- relates to
-
MDEV-22979 "mysqld --bootstrap" / mysql_install_db hangs when Spider is installed
-
- Closed
-
-
MDEV-27233 Server hangs when using --init-file which loads Spider and creates a Spider table
-
- Closed
-
I'm not sure how to debug this with gdb, so I added an abort();
where the failure is triggered.
10.6 90e11488ac1eafaede6e921133059bd2e08da2be
modified storage/spider/spd_sys_table.cc
@@ -359,6 +359,7 @@ TABLE *spider_open_sys_table(
{
spider_close_sys_table(thd, table, open_tables_backup, need_lock);
table = NULL;
+ abort();
my_printf_error(ER_SPIDER_SYS_TABLE_VERSION_NUM,
ER_SPIDER_SYS_TABLE_VERSION_STR, MYF(0),
SPIDER_SYS_TABLES_TABLE_NAME_STR);
and here's the trace at the abort
spider/spd_sys_table.cc:371(spider_open_sys_table(THD*, char const*, int, bool, start_new_trans**, bool, int*))[0x7ff50965c951]
spider/ha_spider.cc:11867(ha_spider::delete_table(char const*))[0x7ff509742f0c]
addr2line: 'sql/mysqld': No such file
sql/mysqld(+0xd074de)[0x5609613924de]
sql/mysqld(_Z15ha_delete_tableP3THDP10handlertonPKcPK25st_mysql_const_lex_stringS7_b+0x102)[0x560961398abb]
sql/mysqld(+0xd16515)[0x5609613a1515]
sql/mysqld(_Z24plugin_foreach_with_maskP3THDPFcS0_PP13st_plugin_intPvEijS4_+0x28f)[0x5609610100da]
sql/mysqld(_Z21ha_delete_table_forceP3THDPKcPK25st_mysql_const_lex_stringS5_+0xe2)[0x5609613a1683]
sql/mysqld(_Z23mysql_rm_table_no_locksP3THDP10TABLE_LISTPK25st_mysql_const_lex_stringP16st_ddl_log_statebbbbbb+0x13e3)[0x5609610e94fe]
sql/mysqld(_Z14mysql_rm_tableP3THDP10TABLE_LISTbbbb+0x3a3)[0x5609610e7f36]
sql/mysqld(_Z21mysql_execute_commandP3THDb+0x5099)[0x560960ff6646]
sql/mysqld(_Z11mysql_parseP3THDPcjP12Parser_state+0x2a7)[0x56096100065e]
sql/mysqld(_Z16dispatch_command19enum_server_commandP3THDPcjb+0x10b7)[0x560960feca67]
sql/mysqld(_Z10do_commandP3THDb+0x96a)[0x560960feb435]
sql/mysqld(_Z24do_handle_one_connectionP7CONNECTb+0x195)[0x5609611b0c56]
sql/mysqld(handle_one_connection+0x5b)[0x5609611b09c1]
sql/mysqld(+0x105134c)[0x5609616dc34c]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x7ea7)[0x7ff531998ea7]
/lib/x86_64-linux-gnu/libc.so.6(clone+0x3f)[0x7ff531216a2f]
So mysql_rm_table_no_locks() is iterating over all storage engines to
delete some table here, and somehow the spider system table
mysql.spider_tables has the 10.5 schema with 26 columns, rather
than the 10.6 schema with 28 columns.
So I suspect what happens is a race condition caused by the async
spider init during mysql_upgrade. That is, the spider init did not
complete when the server tries to delete some table. So the fix for
MDEV-22979where the spider init becomes synchronous should fix thisissue too. Given the versions for this issue is <=10.6, we have to
wait for
MDEV-29870.