Hi!
Sergei Golubchik wrote:
> Hi!
>
> On Aug 26, Sergey Glukhov wrote:
>> #At file:///home/gluh/MySQL/bazaar/mysql-5.0-bug-37460/
>>
>> 2647 Sergey Glukhov 2008-08-26
>> The Bug#37460 Assertion failed: !table->file ||
> table->file->inited==handler::NONE(3rd version)
>
>> === modified file 'sql/sql_select.cc'
>> --- a/sql/sql_select.cc 2008-07-15 14:13:21 +0000
>> +++ b/sql/sql_select.cc 2008-08-26 11:15:30 +0000
>> @@ -6389,7 +6389,7 @@ void JOIN::join_free()
>> ... HAVING FALSE OR a IN (SELECT ...))
>> but all table cursors must be closed before the unlock.
>> */
>> - sl->cleanup_all_joins(full_local);
>> + sl->cleanup_all_joins(false);
>> /* Can't unlock if at least one JOIN is still needed */
>> can_unlock= can_unlock && full_local;
>> }
>
> Okay, two questions:
>
> 1. are you sure can_unlock is calculated correctly ? your change,
> basically, treats full_local as always false. But then you should
> probably make can_unlock=false too.
you are right, it should be 'can_unlock=false' here. I sent new commit.
>
> 2. when underlying joins will be cleaned up fully, if you never call
> cleanup_all_joins(true) ?
They are cleaned in JOIN::destroy().
For the bug test case the following chain works:
mysql_select() ->st_select_lex::cleanup()-> join->destroy() ->
join->cleanup(1);
Regards,
Gluh