[MDEV-32687] After the drop table, only the ibd file remains, and the frm file has been deleted Created: 2023-11-06  Updated: 2024-01-08  Resolved: 2024-01-08

Status: Closed
Project: MariaDB Server
Component/s: Storage Engine - InnoDB
Affects Version/s: 10.5.17
Fix Version/s: N/A

Type: Bug Priority: Major
Reporter: kennyliao Assignee: Unassigned
Resolution: Incomplete Votes: 0
Labels: None
Environment:

windows



 Description   

After the drop table, only the ibd file remains, and the frm file has been deleted

err log info:

2023-08-07 4:33:32 0 [Note] InnoDB: Uses event mutexes
2023-08-07 4:33:32 0 [Note] InnoDB: Compressed tables use zlib 1.2.12
2023-08-07 4:33:32 0 [Note] InnoDB: Number of pools: 1
2023-08-07 4:33:32 0 [Note] InnoDB: Using crc32 + pclmulqdq instructions
2023-08-07 4:33:32 0 [Note] InnoDB: Initializing buffer pool, total size = 3221225472, chunk size = 134217728
2023-08-07 4:33:32 0 [Note] InnoDB: Completed initialization of buffer pool
2023-08-07 4:33:33 0 [Note] InnoDB: 128 rollback segments are active.
2023-08-07 4:37:05 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2023-08-07 4:37:05 0 [Note] InnoDB: Setting file '.\ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2023-08-07 4:37:05 0 [Note] InnoDB: File '.\ibtmp1' size is now 12 MB.
2023-08-07 4:37:05 0 [Note] InnoDB: 10.5.17 started; log sequence number 1294478171862; transaction id 1677378100
2023-08-07 4:37:05 0 [Note] InnoDB: Loading buffer pool(s) from D:\DSS\DSS Server\mysql\data\ib_buffer_pool
2023-08-07 4:37:09 0 [Note] Server socket created on IP: '::'.
2023-08-07 4:37:09 2 [Note] Event Scheduler: scheduler thread started with id 2
2023-08-07 4:37:09 0 [Note] D:\DSS\DSS Server\mysql\bin\mysqld.exe: ready for connections.
Version: '10.5.17-MariaDB-log' socket: '' port: 3306 mariadb.org binary distribution
2023-08-07 4:37:18 77 [Note] Detected table cache mutex contention at instance 1: 45% waits. Additional table cache instance activated. Number of instances after activation: 2.
2023-08-07 4:38:05 0 [Note] InnoDB: Buffer pool(s) load completed at 230807 4:38:05
2023-08-07 5:03:00 548 [ERROR] InnoDB: Table `shop`.`adm_face_device_record_20230714_0` does not exist in the InnoDB internal data dictionary though MariaDB is trying to drop it. Have you copied the .frm file of the table to the MariaDB database directory from another database? Please refer to https://mariadb.com/kb/en/innodb-troubleshooting/ for how to resolve the issue.
2023-08-07 5:03:00 548 [ERROR] InnoDB: Table `shop`.`adm_face_device_record_20230714_1` does not exist in the InnoDB internal data dictionary though MariaDB is trying to drop it. Have you copied the .frm file of the table to the MariaDB database directory from another database? Please refer to https://mariadb.com/kb/en/innodb-troubleshooting/ for how to resolve the issue.
2023-08-07 5:03:00 548 [ERROR] InnoDB: Table `shop`.`adm_face_device_record_20230714_2` does not exist in the InnoDB internal data dictionary though MariaDB is trying to drop it. Have you copied the .frm file of the table to the MariaDB database directory from another database? Please refer to https://mariadb.com/kb/en/innodb-troubleshooting/ for how to resolve the issue.
2023-08-07 5:03:00 548 [ERROR] InnoDB: Table `shop`.`adm_face_device_record_20230714_3` does not exist in the InnoDB internal data dictionary though MariaDB is trying to drop it. Have you copied the .frm file of the table to the MariaDB database directory from another database? Please refer to https://mariadb.com/kb/en/innodb-troubleshooting/ for how to resolve the issue.
2023-08-07 5:03:00 548 [ERROR] InnoDB: Table `shop`.`adm_face_device_record_20230714_4` does not exist in the InnoDB internal data dictionary though MariaDB is trying to drop it. Have you copied the .frm file of the table to the MariaDB database directory from another database? Please refer to https://mariadb.com/kb/en/innodb-troubleshooting/ for how to resolve the issue.



 Comments   
Comment by Marko Mäkelä [ 2023-11-06 ]

Because InnoDB reports that the table does no exist in its data dictionary, it should be safe to remove the .ibd file from the data directory.

Before MariaDB Server 10.6, DDL operations such as DROP TABLE were not crash safe.

What exactly happened the first time when table was attempted to be dropped? Was the server killed?

Comment by kennyliao [ 2023-11-11 ]

markoMarko Mäkelä ,Group commit is an optimization method for MYSQL to process logs(binlog/redo log), mainly to solve the problem of frequent disk flushing during log writing. Has mariadb done this optimization?

Comment by Sergei Golubchik [ 2023-12-11 ]

kennyliao, yes, binlog in MariaDB can group commits. Is it relevant for this bug?
Could you answer the question in the first comment, please?

Generated at Thu Feb 08 10:33:14 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.