Bug #59503 explain extended crash in get_mm_leaf
Submitted: 14 Jan 2011 13:55 Modified: 17 Mar 2011 17:09
Reporter: Shane Bester (Platinum Quality Contributor) Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Partitions Severity:S1 (Critical)
Version:5.6.2 OS:Any
Assigned to: Mattias Jonsson
Tags: regression
Triage: Triaged: D1 (Critical)

[14 Jan 2011 13:55] Shane Bester
Description:
mysql-trunk:
Version: '5.6.2-m5-valgrind-max-debug'  socket: '/tmp/mysql.sock'  port: 3306  Source distribution
[New Thread 0x7fffe3f98710 (LWP 22738)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffe3f98710 (LWP 22738)]
get_mm_leaf (param=0x7fffe3f937d0, conf_func=0x7fffbc005420, field=0x7fffbc0087c0, key_part=0x7fffbc00b0c0, type=Item_func::GT_FUNC, value=0x7fffbc008f10) at ./sql/opt_range.cc:5917
5917                  field->field_name);
(gdb) bt
#0  in get_mm_leaf at ./sql/opt_range.cc:5917
#1  in get_mm_parts at ./sql/opt_range.cc:5688
#2  in get_func_mm_tree at ./sql/opt_range.cc:5363
#3  in get_full_func_mm_tree at ./sql/opt_range.cc:5462
#4  in get_mm_tree at ./sql/opt_range.cc:5656
#5  in prune_partitions at ./sql/opt_range.cc:2730
#6  in JOIN::optimize at ./sql/sql_select.cc:1868
#7  in mysql_select  at ./sql/sql_select.cc:3540
#8  in mysql_explain_union at ./sql/sql_select.cc:23166
#9  in execute_sqlcom_select at ./sql/sql_parse.cc:4487
#10 in mysql_execute_command at ./sql/sql_parse.cc:2096
#11 in mysql_parse at ./sql/sql_parse.cc:5550
#12 in dispatch_command at ./sql/sql_parse.cc:1078
#13 in do_command at ./sql/sql_parse.cc:815
#14 in do_handle_one_connection at ./sql/sql_connect.cc:748
#15 in handle_one_connection at ./sql/sql_connect.cc:684
#16 in start_thread at pthread_create.c:301
#17 in clone

How to repeat:
#pull recent mysql-trunk from bk-internal, then run:

drop table if exists `t1`;
create table `t1` (`a` varchar(51) character set latin1) engine=myisam partition by key (a) partitions 1;
insert into `t1` values ('a'),('b'),('c');
explain extended select 1 from `t1` where `a` > 1;
[20 Jan 2011 11:48] 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/129270

3532 Mattias Jonsson	2011-01-20
      bug#59503: explain extended crash in get_mm_leaf
      
      The problem was during partitioning pruning, which does not
      use any real indexes (instead uses the partitioning function)
      so one must check if real indexes is in use before trying to
      use them.
[21 Jan 2011 10:19] 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/129314

3532 Mattias Jonsson	2011-01-21
      bug#59503: explain extended crash in get_mm_leaf
      
      The problem was during partitioning pruning.
      Partitioning pruning does not use any real indexes
      (instead uses the partitioning function)
      so one must check if real indexes is in use before trying to
      reference them.
[17 Mar 2011 17:09] Jon Stephens
Doesn't appear in a release. Closed without further action.