Bug #31630 debug assert with explain extended select ... from i_s
Submitted: 16 Oct 2007 9:05 Modified: 19 Nov 2007 5:15
Reporter: Shane Bester (Platinum Quality Contributor) Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Information schema Severity:S2 (Serious)
Version:5.1.23-debug, 5.2 OS:Any
Assigned to: Sergei Glukhov CPU Architecture:Any
Tags: assert

[16 Oct 2007 9:05] Shane Bester
Description:
Version: '5.1.23-beta-debug'  socket: '/tmp/mysql.sock'  port: 3306  yes
mysqld: protocol.cc:831: virtual bool Protocol_text::store(const char*, unsigned int, CHARSET_INFO*): Assertion `field_types == 0 || field_types[field_pos] == MYSQL_TYPE_DECIMAL || field_types[field_pos] == MYSQL_TYPE_BIT || field_types[field_pos] == MYSQL_TYPE_NEWDECIMAL || (field_types[field_pos] >= MYSQL_TYPE_ENUM && field_types[field_pos] <= MYSQL_TYPE_GEOMETRY)' failed.
071016 10:40:12 - 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=8388572
read_buffer_size=131072
max_used_connections=1
max_threads=151
threads_connected=1
It is possible that mysqld could use up to 
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 337620 K
bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

thd: 0x8dbc4a8
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=0x429cae64, backtrace may not be correct.
Stack range sanity check OK, backtrace follows:
0x820147b handle_segfault + 541
0xffffe410 _end + -142171840
0x400edb75 _end + 932550821
0x400e5903 _end + 932517427
0x81f8f59 Protocol_text::store(char const*, unsigned int, charset_info_st*) + 101
0x815badd Item::send(Protocol*, String*) + 231
0x81eec37 select_send::send_data(List<Item>&) + 241
0x827e57c select_describe(JOIN*, bool, bool, bool, char const*) + 9200
0x82600b4 JOIN::exec() + 1570
0x8261b7e _Z12mysql_selectP3THDPPP4ItemP10TABLE_LISTjR4ListIS1_ES2_jP8st_orderSB_S2_SB_yP13select_resultP18st_select_lex_unitP13st_select + 638
0x827e993 mysql_explain_union(THD*, st_select_lex_unit*, select_result*) + 593
0x8215c88 execute_sqlcom_select(THD*, TABLE_LIST*) + 312
0x820eb35 mysql_execute_command(THD*) + 1701
0x82178b0 mysql_parse(THD*, char const*, unsigned int, char const**) + 372
0x820cf60 dispatch_command(enum_server_command, THD*, char*, unsigned int) + 2354
0x820c622 do_command(THD*) + 600
0x820b01d handle_one_connection + 255
0x40038aa7 _end + 931809239
0x4017ec2e _end + 933144926

How to repeat:
#run debug build of mysqld.
explain extended select 1 from information_schema.TABLES;
[16 Oct 2007 10:15] Sveta Smirnova
Thank you for the report.

Verified as described.
[29 Oct 2007 10:28] 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/36533

ChangeSet@1.2596, 2007-10-29 14:23:11+04:00, gluh@mysql.com +3 -0
  Bug#31630 debug assert with explain extended select ... from i_s
  added 'in_rows' column value for 'describe extended'
[29 Oct 2007 12:19] Timour Katchaounov
Approved, please add CSet comment as discussed.
[2 Nov 2007 8:43] 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/36948

ChangeSet@1.2619, 2007-11-02 12:39:14+04:00, gluh@mysql.com +3 -0
  Bug#31630 debug assert with explain extended select ... from i_s
  added 'in_rows' column value for 'describe extended' for the case 
  when 'describe' handles I_S table
[16 Nov 2007 9:33] Bugs System
Pushed into 5.1.23-rc
[16 Nov 2007 9:35] Bugs System
Pushed into 6.0.4-alpha
[19 Nov 2007 5:15] Paul DuBois
Noted in 5.1.23, 6.0.4 changelogs.

EXPLAIN EXTENDED for SELECT from INFORMATION_SCHEMA tables caused an
assertion failure.