Bug #30322 Server crashes on selecting from i_s.columns when cluster is running -regression
Submitted: 8 Aug 2007 21:23 Modified: 9 Aug 2007 17:40
Reporter: Omer Barnir (OCA) Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Information schema Severity:S1 (Critical)
Version:5.1.21 OS:Any
Assigned to: Sergei Glukhov CPU Architecture:Any

[8 Aug 2007 21:23] Omer Barnir
Description:
Running a 
select * from information_schema.columns
crashes the mysql server

The crash is not oserved when cluster is not running

Stack Trace:
0x8220c28 handle_segfault + 808
0x8172d46 _Z22mysql_unpack_partitionP3THDPKcjS2_jP8st_tablebP10handlertonPb + 982
0x827a1db _Z21open_table_from_shareP3THDP14st_table_sharePKcjjjP8st_tableb + 699
0x8330efb _Z14get_all_tablesP3THDP10TABLE_LISTP4Item + 3195
0x832a94f _Z24get_schema_tables_resultP4JOIN23enum_schema_table_state + 143
0x82a0192 _ZN4JOIN4execEv + 898
0x82a2c4f _Z12mysql_selectP3THDPPP4ItemP10TABLE_LISTjR4ListIS1_ES2_jP8st_orderSB_S2_SB_yP13select_resultP18st_select_lex_unitP13st_select + 1407
0x82a315f _Z13handle_selectP3THDP6st_lexP13select_resultm + 335
0x822c331 _Z21execute_sqlcom_selectP3THDP10TABLE_LIST + 209
0x822fe9a _Z21mysql_execute_commandP3THD + 1610
0x8238c11 _Z11mysql_parseP3THDPKcjPS2_ + 721
0x823915d _Z16dispatch_command19enum_server_commandP3THDPcj + 1309
0x823a55f _Z10do_commandP3THD + 159
0x8229c0b handle_one_connection + 267
0x40032297 _end + 931261351
0x4018437e _end + 932646030

See attached error file as well

How to repeat:
Use attached test file and run the following:
cd mysql-test
perl ./mysql-test-run.pl --do-test=I_S_crash

This will result in the following message:

Errors are (from /home/omer/source/bld51_806/mysql-test/var/log/mysqltest-time) :
mysqltest: At line 5: query 'select * from columns' failed: 2013: Lost connection to MySQL server during query

Suggested fix:
Not to crash
[8 Aug 2007 21:24] Omer Barnir
master.err file at the time of the crash

Attachment: error.log_crash (application/octet-stream, text), 3.00 KiB.

[8 Aug 2007 21:25] Omer Barnir
Test case for the above

Attachment: I_S_crash.test (application/octet-stream, text), 80 bytes.

[9 Aug 2007 5:33] Mikael Ronström
When running mysql-test-run with --manual-gdb I could see
that the creation of the ndb_schema kept failing which seems
natural when cluster isn't up.
[9 Aug 2007 6:11] Stewart Smith
appears to be timing depndt
[9 Aug 2007 6:47] Stewart Smith
scratch that last idea... mostly... all to do if we have a handler created
[9 Aug 2007 11:18] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/32292

ChangeSet@1.2560, 2007-08-09 16:15:01+05:00, gluh@mysql.com +1 -0
  Bug#30322 Server crashes on selecting from i_s.columns when cluster is running -regression(suggested fix)
  disable partition processing if we open frm file only
[9 Aug 2007 16:20] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/32310

ChangeSet@1.2560, 2007-08-09 21:17:27+05:00, gluh@mysql.com +4 -0
  Bug#30322 Server crashes on selecting from i_s.columns when cluster is running -regression(suggested fix)
    disable partition processing if we open frm file only
[9 Aug 2007 17:09] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/32313

ChangeSet@1.2565, 2007-08-09 22:05:56+05:00, gluh@mysql.com +3 -0
  Bug#30322 Server crashes on selecting from i_s.columns when cluster is running -regression
  disable partition processing if we open frm file only
[9 Aug 2007 17:17] Sergei Glukhov
fixed in 5.1.21
[9 Aug 2007 17:40] Paul DuBois
Noted in 5.1.21 changelog.

Selecting from INFORMATION_SCHEMA.COLUMNS caused a server crash if
Cluster was running.
[9 Aug 2007 17:53] Paul DuBois
Changelog entry was removed: This problem appeared in no released version.
[9 Aug 2007 21:39] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/32334

ChangeSet@1.2563, 2007-08-09 23:39:23+02:00, mskold@mysql.com +3 -0
  Bug #30322 Server crashes on selecting from i_s.columns when cluster is running -regression: Passed openflags to partition calls to check for OPEN_FRM_FILE_ONLY and not call handler
[24 Aug 2007 21:58] Bugs System
Pushed into 5.1.23-beta