Bug #943 wrong table name in subquery of UPDATE lead to server crash
Submitted: 29 Jul 2003 3:05 Modified: 1 Aug 2003 9:09
Reporter: Oleksandr Byelkin Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S2 (Serious)
Version:4.1 OS:Any (any)
Assigned to: Oleksandr Byelkin CPU Architecture:Any

[29 Jul 2003 3:05] Oleksandr Byelkin
Description:
wrong table name in subquery of UPDATE lead to server crash 

How to repeat:
mysql> create table t1 (s1 int); 
Query OK, 0 rows affected (0.00 sec) 
 
mysql> create table t2 (s1 int); 
Query OK, 0 rows affected (0.00 sec) 
 
mysql> insert into t1 values (1); 
Query OK, 1 row affected (0.00 sec) 
 
mysql> insert into t2 values (1); 
Query OK, 1 row affected (0.00 sec) 
 
mysql> update t1 set  s1 = s1 + 1 where 1 = (select sum(x.s1) as A from 
t2 WHERE t2.s1 > x.s1 order by A); 
ERROR 2013 (HY000): Lost connection to MySQL server during query
[29 Jul 2003 7:02] Oleksandr Byelkin
ChangeSet 
  1.1591 03/07/29 16:59:46 bell@sanja.is.com.ua +7 -0 
  prevented finding references in item_list for non-SELECT st_select_lex 
  (fixed BUG#943)