Description:
I can't repair, delete, truncate the damaged table. The problem originated on MySQL 8.0.29, and I can't do anything with it on MySQL 8.0.30 either.
How to repeat:
mysql> drop database my_base;
ERROR 1812 (HY000): Tablespace is missing for table my_base/my_table.
mysql> use my_base;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
mysql> truncate my_table;
ERROR 2013 (HY000): Lost connection to MySQL server during query
No connection. Trying to reconnect...
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111)
ERROR:
Can't connect to the server
error.log:
11:42:34 UTC - mysqld got signal 11 ;
Most likely, you have hit a bug, but this error can also be caused by malfunctioning hardware.
Thread pointer: 0x7f6550deb350
Attempting backtrace. You can use the following information to find out
where mysqld died. If you see no messages after this, something went
terribly wrong...
stack_bottom = 7f65e8227b40 thread_stack 0x100000
/usr/sbin/mysqld-debug(my_print_stacktrace(unsigned char const*, unsigned long)+0x41) [0x55f986619131]
/usr/sbin/mysqld-debug(print_fatal_signal(int)+0x2f4) [0x55f985b0e9e4]
/usr/sbin/mysqld-debug(handle_fatal_signal+0x95) [0x55f985b0ea85]
/lib/x86_64-linux-gnu/libc.so.6(+0x42520) [0x7f65fd495520]
/usr/sbin/mysqld-debug(ha_innobase::truncate_impl(char const*, TABLE*, dd::Table*)+0x224) [0x55f98669eb74]
/usr/sbin/mysqld-debug(ha_create_table(THD*, char const*, char const*, char const*, HA_CREATE_INFO*, bool, bool, dd::Table*)+0x75f) [0x55f985c3a06f]
/usr/sbin/mysqld-debug(Sql_cmd_truncate_table::truncate_base(THD*, TABLE_LIST*)+0x3f6) [0x55f985ec7726]
/usr/sbin/mysqld-debug(Sql_cmd_truncate_table::execute(THD*)+0x8f) [0x55f985ec7f2f]
/usr/sbin/mysqld-debug(mysql_execute_command(THD*, bool)+0xbe0) [0x55f9859ba050]
/usr/sbin/mysqld-debug(dispatch_sql_command(THD*, Parser_state*)+0x5b6) [0x55f9859be366]
/usr/sbin/mysqld-debug(dispatch_command(THD*, COM_DATA const*, enum_server_command)+0x1753) [0x55f98599c363]
/usr/sbin/mysqld-debug(do_command(THD*)+0x2ad) [0x55f98599d50d]
/usr/sbin/mysqld-debug(+0xca5e20) [0x55f985b09e20]
/usr/sbin/mysqld-debug(+0x1cd106d) [0x55f986b3506d]
/lib/x86_64-linux-gnu/libc.so.6(+0x94b43) [0x7f65fd4e7b43]
/lib/x86_64-linux-gnu/libc.so.6(+0x126a00) [0x7f65fd579a00]
Trying to get some variables.
Some pointers may be invalid and cause the dump to abort.
Query (7f655109a5e0): truncate my_table
Connection ID (thread ID): 9
Status: NOT_KILLED
The manual page at http://dev.mysql.com/doc/mysql/en/crashing.html contains
information that should help you find out what is causing the crash.
-----
user@host:/var/lib/mysql/my_base$ ls -alh
razem 308K
drwxrwxr-x 2 mysql mysql 4,0K paź 7 00:02 .
drwxrwxr-x 5610 mysql mysql 188K paź 9 13:37 ..
-rw-rw-r-- 1 mysql mysql 112K paź 1 10:40 my_table.ibd
my_base.my_table
repair
Error
Tablespace is missing for my_base.my_tab...
my_base.my_table
repair
Error
Table 'my_base.my_table' d...
my_base.my_table
repair
error
Corrupt