Details
-
Bug
-
Status: Closed (View Workflow)
-
Critical
-
Resolution: Fixed
-
10.11
Description
INSTALL PLUGIN Spider SONAME 'ha_spider.so'; |
CREATE SERVER srv FOREIGN DATA WRAPPER MYSQL OPTIONS (SOCKET'',DATABASE'',USER'',PASSWORD 'PWD0'); |
CREATE TABLE t (a INT KEY AUTO_INCREMENT) ENGINE=Spider COMMENT='WRAPPER "mysql",srv "srv",TABLE "t"'; |
ALTER TABLE t ADD b TEXT; |
CREATE OR REPLACE TABLE t (a INT) ENGINE=Spider; |
Leads to:
bb-10.11-midenok 80625038c703d46e2e01d32da5de234a6c31acb8 (Optimized) |
10.11.0-opt>CREATE OR REPLACE TABLE t (a INT) ENGINE=Spider;
|
ERROR 1062 (23000): Duplicate entry 'test-t-0' for key 'PRIMARY'
|
bb-10.11-midenok 80625038c703d46e2e01d32da5de234a6c31acb8 (Optimized) |
2022-10-15 16:40:29 25 [Warning] Access denied for user ''@'localhost' (using password: YES)
|
2022-10-15 16:40:29 4 [ERROR] mysqld: Can't find record in 'spider_tables'
|
2022-10-15 16:40:29 4 [ERROR] DDL_LOG: Got error 1032 when trying to execute action for entry 6 of type 'rename table'
|
Before MDEV-25292 it passes.
Attachments
Issue Links
- is caused by
-
MDEV-25292 Atomic CREATE OR REPLACE TABLE
-
- Stalled
-
- relates to
-
MDEV-29583 Disallow Spider self/dual/multi/cross-referencing tables, consider not executing/skipping/disabling init_connect for Spider user
-
- Closed
-
Failure happens here:
#0 0x00007f5f658ad404 in spider_update_sys_table_row (table=0x7f5f4c05de88, do_handle_error=true) at ../src/storage/spider/spd_sys_table.cc:191
#1 0x00007f5f658a3967 in spider_update_tables_name (table=0x7f5f4c05de88, from=0x7f5f640c6ed0 "./test/#sql-create-1811aa-17-t", to=0x7f5f640c6cd0 "./test/t", old_link_count=0x7f5f640c66e4) at ../src/storage/spider/spd_sys_table.cc:1799
#2 0x00007f5f659b7d0e in ha_spider::rename_table (this=0x7f5f4c0c7270, from=0x7f5f640c6ed0 "./test/#sql-create-1811aa-17-t", to=0x7f5f640c6cd0 "./test/t") at ../src/storage/spider/ha_spider.cc:8886
#3 0x000055d4f59156c7 in handler::ha_rename_table (this=0x7f5f4c0c7270, from=0x7f5f640c6ed0 "./test/#sql-create-1811aa-17-t", to=0x7f5f640c6cd0 "./test/t") at ../src/sql/handler.cc:5346
#4 0x000055d4f5de8538 in mysql_rename_table (base=0x55d4f8739728, old_db=0x7f5f640c7fc8, old_name=0x7f5f640c7850, new_db=0x7f5f640c7838, new_name=0x7f5f640c7860, id=0x7f5f640c7870, flags=1) at ../src/sql/sql_table.cc:5650
#5 0x000055d4f5d0bdec in rename_table_and_triggers (thd=0x7f5f4c03e978, param=0x7f5f640c7850, ddl_log_state=0x0, ren_table=0x7f5f640c7fc8, new_db=0x7f5f640c7838, skip_error=false, force_if_exists=0x7f5f640c784f) at ../src/sql/sql_rename.cc:385
#6 0x000055d4f5de5ed0 in HA_CREATE_INFO::finalize_atomic_replace (this=0x7f5f640c7d90, thd=0x7f5f4c03e978, orig_table=0x7f5f4c0b5c70) at ../src/sql/sql_table.cc:4562
#7 0x000055d4f5e01bde in mysql_create_table (thd=0x7f5f4c03e978, create_table=0x7f5f4c0b5c70, create_info=0x7f5f640c7d90, alter_info=0x7f5f640c7ca0) at ../src/sql/sql_table.cc:5369
#8 0x000055d4f5dff922 in Sql_cmd_create_table_like::execute (this=0x7f5f4c0ca230, thd=0x7f5f4c03e978) at ../src/sql/sql_table.cc:12994
#9 0x000055d4f5cb9f2a in mysql_execute_command (thd=0x7f5f4c03e978, is_called_from_prepared_stmt=false) at ../src/sql/sql_parse.cc:5997
#10 0x000055d4f5caafdf in mysql_parse (thd=0x7f5f4c03e978, rawbuf=0x7f5f4c0bcb30 "CREATE OR REPLACE TABLE t (a INT) ENGINE=Spider", length=47, parser_state=0x7f5f640ca288) at ../src/sql/sql_parse.cc:8023
(rr) p table->s->table_name
$9 = {
str = 0x7f5f582138fe "spider_tables",
length = 13
}
spider_tables is Aria tables.