Bug #38495 bool eq_ref_table(JOIN*, ORDER*, <cut> Assertion `!(order->used & map)' failed.
Submitted: 31 Jul 2008 17:30
Reporter: Shane Bester
Status: Analyzing
Category:Server: Optimizer Severity:S1 (Critical)
Version:5.0.74, mysql-5.1.26-rc-linux-i686-glibc23 OS:Any
Assigned to: Shane Bester Target Version:

[31 Jul 2008 17:30] Shane Bester
Description:
Got a crash with stored procedure, cut stack trace listed below:

mysqld-debug: sql_select.cc:6831: bool eq_ref_table(JOIN*, ORDER*, JOIN_TAB*): Assertion
`!(order->used & map)' failed.  
080724 15:26:34 - mysqld got signal 6 ;

mysqld-debug[0x8232ee4]                                                            
mysqld-debug[0x8232fd4]                                                            
mysqld-debug[0x823339c]                                                            
mysqld-debug(JOIN::optimize()+0x1094)[0x822723a]                                   
mysqld-debug(st_select_lex_unit::exec()+0x25b)[0x8309835]                          
mysqld-debug(mysql_derived_filling(THD*, st_lex*, TABLE_LIST*)+0x5c)[0x830a81a]    
mysqld-debug(mysql_handle_derived(st_lex*, bool (*)(THD*, st_lex*, TABLE_LIST*)
mysqld-debug(open_and_lock_tables_derived(THD*, TABLE_LIST*, bool)+0x141)[0x821
mysqld-debug[0x81e5d94]                                                            
mysqld-debug(mysql_execute_command(THD*)+0x477)[0x81e0ca5]                         
mysqld-debug(sp_instr_stmt::exec_core(THD*, unsigned int*)+0xe)[0x831fb6c]         
mysqld-debug(sp_lex_keeper::reset_lex_and_exec_core(THD*, unsigned int*, bool,
mysqld-debug(sp_instr_stmt::execute(THD*, unsigned int*)+0xf2)[0x831fa06]          
mysqld-debug(sp_head::execute(THD*)+0x513)[0x831c597]                              
mysqld-debug(sp_head::execute_procedure(THD*, List<Item>*)+0x4c3)[0x831dbf1]       
mysqld-debug(mysql_execute_command(THD*)+0x42e0)[0x81e4b0e]                        
mysqld-debug(mysql_parse(THD*, char const*, unsigned int, char const**)+0x14d)
mysqld-debug(dispatch_command(enum_server_command, THD*, char*, unsigned int)+
mysqld-debug(do_command(THD*)+0x212)[0x81ded46]                                    
mysqld-debug(handle_one_connection+0x10b)[0x81dd93f]                               

How to repeat:
very difficult