Bug #52685 mysqld crashes on show create table on a view, when a table has been dropped
Submitted: 8 Apr 2010 9:39 Modified: 8 Apr 2010 10:24
Reporter: Chris OConnor Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server: DDL Severity:S1 (Critical)
Version:5.0.77 OS:Linux (Red Hat Enterprise Linux AS release 4 (Nahant Update 5))
Assigned to: CPU Architecture:Any

[8 Apr 2010 9:39] Chris OConnor
Description:
We've found with mysql 5.0.77 that if you create a view based on the tables in the "How to repeat" section, that dropping one of the underlying tables causes mysqld to crash when "show create table viewname" is executed:

100408  9:14:39 - mysqld got signal 11 ;
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=2147483648
read_buffer_size=10485760
max_used_connections=98
max_connections=300
threads_connected=73
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_connections = 8241152 K
bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

thd=0x2ac155f570
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...
Cannot determine thread, fp=0x4665c1b8, backtrace may not be correct.
Stack range sanity check OK, backtrace follows:
0x80000000285
New value of fp=0x4665b9a0 failed sanity check, terminating stack trace!
Please read http://dev.mysql.com/doc/mysql/en/using-stack-trace.html and follow instructions on how to resolve the stack trace. Resolved
stack trace is much more helpful in diagnosing the problem, so please do
resolve it
Trying to get some variables.
Some pointers may be invalid and cause the dump to abort...
thd->query at 0x22a1aa0 = show create table Calypso.MarginFloorPricingRequestView
thd->thread_id=58189
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.

Number of processes running now: 0
100408 09:14:39  mysqld restarted
InnoDB: Log scan progressed past the checkpoint lsn 4 820306468
100408  9:14:39  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...
InnoDB: Doing recovery: scanned up to log sequence number 4 820771801
100408  9:14:40  InnoDB: Starting an apply batch of log records to the database...
InnoDB: Progress in percents: 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99
InnoDB: Apply batch completed
InnoDB: Last MySQL binlog file position 0 461867, file name ./mysql-bin.000084
100408  9:14:41  InnoDB: Started; log sequence number 4 820771801
100408  9:14:41 [Note] Recovering after a crash using mysql-bin
100408  9:14:41 [Note] Starting crash recovery...
100408  9:14:41 [Note] Crash recovery finished.
100408  9:14:42 [Warning] Neither --relay-log nor --relay-log-index were used; so replication may break when this MySQL server acts as a slave and has h
is hostname changed!! Please use '--relay-log=ts2-relay-bin' to avoid this problem.

how to repeat sql creates the tables and views then executes the show create table MarginFloorPricingRequestView, which causes mysqld to crash every time on our setup

How to repeat:
Will attach sql file to repeat problem
[8 Apr 2010 9:40] Chris OConnor
SQL to create tables & view and cause mysqld crash

Attachment: calypso.sql (application/octet-stream, text), 57.58 KiB.

[8 Apr 2010 10:24] Sveta Smirnova
Thank you for the report.

I can not repeat described behavior with current development sources, although bug is repeatable with version 5.0.77. So closed as "Can't repeat".
[17 Nov 2011 11:32] MySQL Verification Team
Take a look at:
http://bugs.mysql.com/bug.php?id=43354
http://bugs.mysql.com/bug.php?id=44816