Bug #1598 insert ... select .... (in same table)
Submitted: 18 Oct 2003 23:06 Modified: 19 Oct 2003 9:56
Reporter: SeongNam Park Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S2 (Serious)
Version:4.1 OS:Windows (Win 2003)
Assigned to: CPU Architecture:Any

[18 Oct 2003 23:06] SeongNam Park
Description:
first, Sorry my english...

Please solve this problem, and let's me know ...

Have a nice day...

How to repeat:
use mysql;
insert into user (host,user,password)
   select host,user,password from user where user = 'root'

Well done in MySQL 4.0
after I installed MySQL 4.1, above sql statements occurs Error

Error Code : 1066
Not unique table/alias: 'user'
(0 ms taken)

the other Query is ...

insert into user (host,user,password)
	select b.host,b.user,b.password from user as b
		where user = 'root'
Returned Error is ...

Error Code : 1093
You can't specify target table 'user' for update in FROM clause
(0 ms taken)
[19 Oct 2003 9:56] Alexander Keremidarski
Thank you for your bug report. This issue has already been fixed
in the latest released version of that product, which you can download at 
http://www.mysql.com/downloads/

Insert into same table as specified in select was added to 4.0 tree after 4.1.0 was released and is included in 4.1.1