Bug #74041 Cannot delete empty InnoDB database
Submitted: 23 Sep 2014 20:41 Modified: 27 Feb 2016 19:55
Reporter: Matthijs Olislagers Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Server: InnoDB storage engine Severity:S2 (Serious)
Version:5.5.39 OS:Linux (CentOs)
Assigned to: CPU Architecture:Any

[23 Sep 2014 20:41] Matthijs Olislagers
Description:
Deleted all tables in database (through phpMyAdmin). Then tried to delete database. Server crashes every time I try:

140923 22:21:32  InnoDB: Waiting for the background threads to start
140923 22:21:33 InnoDB: 5.5.39 started; log sequence number 114974939819
140923 22:21:33 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306
140923 22:21:33 [Note]   - '0.0.0.0' resolves to '0.0.0.0';
140923 22:21:33 [Note] Server socket created on IP: '0.0.0.0'.
140923 22:21:33 [Note] Event Scheduler: Loaded 0 events
140923 22:21:33 [Note] /usr/sbin/mysqld: ready for connections.
Version: '5.5.39'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  MySQL Community Server (GPL)
InnoDB: Error: trying to load index PRIMARY for table preview_para/Product_has_ProductCategory
InnoDB: but the index tree has been freed!
140923 22:22:04  InnoDB: Assertion failure in thread 47543565707584 in file row0mysql.c line 3683
InnoDB: Failing assertion: table
InnoDB: We intentionally generate a memory trap.
InnoDB: Submit a detailed bug report to http://bugs.mysql.com.
InnoDB: If you get repeated assertion failures or crashes, even
InnoDB: immediately after the mysqld startup, there may be
InnoDB: corruption in the InnoDB tablespace. Please refer to
InnoDB: http://dev.mysql.com/doc/refman/5.5/en/forcing-innodb-recovery.html
InnoDB: about forcing recovery.
20:22:04 UTC - mysqld got signal 6 ;
This could be because you hit a bug. It is also possible that this binary
or one of the libraries it was linked against is corrupt, improperly built,
or misconfigured. This error can also be caused by malfunctioning hardware.
We will try our best to scrape up some info that will hopefully help
diagnose the problem, but since we have already crashed,
something is definitely wrong and this may fail.

key_buffer_size=268435456
read_buffer_size=1048576
max_used_connections=5
max_threads=151
thread_count=1
connection_count=1
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 573135 K  bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

Thread pointer: 0xe7d5600
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 = 2b3d995860e8 thread_stack 0x40000
/usr/sbin/mysqld(my_print_stacktrace+0x35)[0x7a6fa5]
/usr/sbin/mysqld(handle_fatal_signal+0x403)[0x674793]
/lib64/libpthread.so.0[0x395e80eca0]
/lib64/libc.so.6(gsignal+0x35)[0x395e030265]
/lib64/libc.so.6(abort+0x110)[0x395e031d10]
/usr/sbin/mysqld[0x7d407e]
/usr/sbin/mysqld[0x7bd57f]
/usr/sbin/mysqld[0x67488f]
/usr/sbin/mysqld(_Z24plugin_foreach_with_maskP3THDPFcS0_P13st_plugin_intPvEijS3_+0x1ee)[0x586bfe]
/usr/sbin/mysqld(_Z11mysql_rm_dbP3THDPcbb+0xa5d)[0x55ce8d]
/usr/sbin/mysqld(_Z21mysql_execute_commandP3THD+0x2ae1)[0x57c9a1]
/usr/sbin/mysqld(_Z11mysql_parseP3THDPcjP12Parser_state+0x18a)[0x57e78a]
/usr/sbin/mysqld(_Z16dispatch_command19enum_server_commandP3THDPcj+0x1acd)[0x580add]
/usr/sbin/mysqld(_Z24do_handle_one_connectionP3THD+0x167)[0x6193a7]
/usr/sbin/mysqld(handle_one_connection+0x54)[0x619414]
/lib64/libpthread.so.0[0x395e80683d]
/lib64/libc.so.6(clone+0x6d)[0x395e0d526d]

Trying to get some variables.
Some pointers may be invalid and cause the dump to abort.
Query (ea4d0d0): DROP DATABASE `preview_para`
Connection ID (thread ID): 40
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.
140923 22:22:04 mysqld_safe Number of processes running now: 0
140923 22:22:04 mysqld_safe mysqld restarted
140923 22:22:04 [Note] Plugin 'FEDERATED' is disabled.
140923 22:22:04 InnoDB: The InnoDB memory heap is disabled
140923 22:22:04 InnoDB: Mutexes and rw_locks use GCC atomic builtins
140923 22:22:04 InnoDB: Compressed tables use zlib 1.2.3
140923 22:22:04 InnoDB: Using Linux native AIO
140923 22:22:04 InnoDB: Initializing buffer pool, size = 128.0M
140923 22:22:04 InnoDB: Completed initialization of buffer pool
140923 22:22:04 InnoDB: highest supported file format is Barracuda.
InnoDB: The log sequence number in ibdata files does not match
InnoDB: the log sequence number in the ib_logfiles!
140923 22:22:04  InnoDB: Database was not shut down normally!
InnoDB: Starting crash recovery.
InnoDB: Reading tablespace information from the .ibd files...
InnoDB: Restoring possible half-written data pages from the doublewrite
InnoDB: buffer...

How to repeat:
DROP DATABASE `preview_para`
[25 Sep 2014 10:13] Hartmut Holzgraefe
Check the $data_dir/preview_para directory for files that may prevent it from being removed ...:

  cd $your_mysql_data_dir
  ls -a preview_para
[27 Jan 2016 19:55] MySQL Verification Team
Have you checked what Harmut asked?. Thanks.
[28 Feb 2016 1:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".