Bug #6756 Crash if SHOW INDEX
Submitted: 22 Nov 2004 22:18 Modified: 26 Nov 2004 13:22
Reporter: Peter Gulutzan Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:5.0.2-alpha-debug OS:Linux (SuSE 8.2)
Assigned to: Sergei Glukhov CPU Architecture:Any

[22 Nov 2004 22:18] Peter Gulutzan
Description:
If I say "show index;" the server crashes. 
 

How to repeat:
mysql> show index; 
ERROR 2013 (HY000): Lost connection to MySQL server during query
[23 Nov 2004 17:57] MySQL Verification Team
I can't repeat it with latest 5.0.2-debug-log
[23 Nov 2004 21:56] Sergei Golubchik
Thank you for your bug report. This issue has been committed to our
source repository of that product and will be incorporated into the
next release.

If necessary, you can access the source repository and build the latest
available version, including the bugfix, yourself. More information 
about accessing the source trees is available at
    http://www.mysql.com/doc/en/Installing_source_tree.html

Additional info:

fixed in 5.0.2
[24 Nov 2004 13:39] Peter Gulutzan
Nevertheless it crashes, on debug and non-debug versions. 
 
Perhaps you can repeat with this variant. 
  
mysql> create view vo as select 'a' union select 'a';  
Query OK, 0 rows affected (0.00 sec)  
  
mysql> show index from vo;  
ERROR 2013 (HY000): Lost connection to MySQL server during query
[24 Nov 2004 20:16] MySQL Verification Team
Verified with latest test case.

(gdb) bt
#0  0x08241bcf in get_schema_stat_record (thd=0x8d2db28, tables=0x8d3a9d8, table=0x8d2f530,
    res=false, base_name=0x85284bb "", file_name=0x8d39480 "/tmp/#sql_2705_2") at sql_show.cc:2654
#1  0x0823ee76 in get_all_tables (thd=0x8d2db28, tables=0x8d3b2b8, cond=0x0) at sql_show.cc:1950
#2  0x08243833 in get_schema_tables_result (join=0x8d40b48) at sql_show.cc:3236
#3  0x081ab3cc in JOIN::exec (this=0x8d40b48) at sql_select.cc:1230
#4  0x081ad1c9 in mysql_select (thd=0x8d2db28, rref_pointer_array=0x8d2de50, tables=0x8d3b2b8,
    wild_num=0, fields=@0x8d2dd9c, conds=0x0, og_num=0, order=0x0, group=0x0, having=0x0,
    proc_param=0x0, select_options=545540608, result=0x8d3c678, unit=0x8d2db74,
    select_lex=0x8d2dd30) at sql_select.cc:2025
#5  0x081a8cba in handle_select (thd=0x8d2db28, lex=0x8d2db68, result=0x8d3c678)
    at sql_select.cc:231
#6  0x0817fbe6 in mysql_execute_command (thd=0x8d2db28) at sql_parse.cc:2186
#7  0x0818544d in mysql_parse (thd=0x8d2db28, inBuf=0x8d3a820 "show index from vo", length=18)
    at sql_parse.cc:4588
#8  0x0817e36f in dispatch_command (command=COM_QUERY, thd=0x8d2db28,
    packet=0x8d253a9 "show index from vo", packet_length=19) at sql_parse.cc:1503
#9  0x0817dd28 in do_command (thd=0x8d2db28) at sql_parse.cc:1311
#10 0x0817d28a in handle_one_connection (arg=0x8d2db28) at sql_parse.cc:1047
#11 0xb7e4714b in pthread_start_thread () from /lib/libpthread.so.0
#12 0xb7e471df in pthread_start_thread_event () from /lib/libpthread.so.0
#13 0xb7d7a50a in clone () from /lib/libc.so.6
[26 Nov 2004 13:22] Sergei Glukhov
Fixed in 5.0 source tree