Bug #45865 assertion failure during maria tmp table destruction after group by and distinct
Submitted: 30 Jun 2009 21:14 Modified: 26 May 2010 17:53
Reporter: Shane Bester (Platinum Quality Contributor) Email Updates:
Status: Unsupported Impact on me:
None 
Category:MySQL Server: Maria storage engine Severity:S1 (Critical)
Version:6.0.9-debug, 6.0.12-debug OS:Linux (32-bit fc8)
Assigned to: CPU Architecture:Any
Triage: Triaged: D1 (Critical)

[30 Jun 2009 21:14] Shane Bester
Description:
Version: '6.0.12-alpha-debug'  socket: '/tmp/mysql.sock'  port: 3306  yes
090614 13:57:40 [ERROR] Got an error from unknown thread, ma_delete.c:141
mysqld: ../../sql/handler.h:1530: virtual handler::~handler(): Assertion `inited == NONE' failed.
090614 13:57:40 - mysqld got signal 6 ;

#6  in abort () from /lib/i686/nosegneg/libc.so.6
#7  in __assert_fail () from /lib/i686/nosegneg/libc.so.6
#8  in ~ha_maria (this=0xb99d548) at ../../sql/handler.h:1530
#9  in free_tmp_table (thd=0xb947ba8, entry=0xb99c930) at sql_select.cc:15680
#10 in JOIN::destroy (this=0xb9aad28) at sql_select.cc:2939
#11 in st_select_lex::cleanup (this=0xb948ef8) at sql_union.cc:791
#12 in mysql_select  at sql_select.cc:3089
#13 in handle_select  at sql_select.cc:310
#14 in execute_sqlcom_select  at sql_parse.cc:4964
#15 in mysql_execute_command (thd=0xb947ba8) at sql_parse.cc:2172
#16 in mysql_parse  at sql_parse.cc:5979
#17 in dispatch_command  at sql_parse.cc:1064
#18 in do_command (thd=0xb947ba8) at sql_parse.cc:746
#19 in handle_one_connection (arg=0xb947ba8) at sql_connect.cc:1146
#20 in start_thread () from /lib/i686/nosegneg/libpthread.so.0
#21 in clone () from /lib/i686/nosegneg/libc.so.6

How to repeat:
drop table if exists `t1`;
create table `t1`(`a` blob,`b` int)engine=myisam;
insert into `t1`values (null,null),('a',-1),(null,1),(null,2);
select distinct `a` from t1 group by `b`;
[1 Jul 2009 5:51] Sveta Smirnova
Thank you for the report.

Verified as described.