Bug #2463 Program using PS/subselect query hangs
Submitted: 20 Jan 2004 10:10 Modified: 8 Feb 2004 2:50
Reporter: Alexey Botchkov Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S2 (Serious)
Version:4.1 OS:Any (All)
Assigned to: Oleksandr Byelkin CPU Architecture:Any

[20 Jan 2004 10:10] Alexey Botchkov
Description:
Tables in subselect aren't unlocked right after mysql_prepare()
It puts thd_lock() in the endless loop on consequent mysql_execute call

How to repeat:
Data and test program are same as in Bug #2462
You just should comment or remove line 117 of the program:
  db_do_query(mysql, query); /* remove this line to get the bug with locks */

Suggested fix:
Dunno. Really
[8 Feb 2004 2:50] Oleksandr Byelkin
It was just incorrect reinitialization of tables (only tables of main SELECT 
was reinitialized) 
patch which fixed this bug is listed Bug #2633 description