Bug #5355 | INSERT ... SELECT with tables that have longblob columns | ||
---|---|---|---|
Submitted: | 1 Sep 2004 22:15 | Modified: | 2 Sep 2004 17:55 |
Reporter: | David Ishee | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | MySQL Server: MyISAM storage engine | Severity: | S2 (Serious) |
Version: | 3.23.58 | OS: | Other (IRIX 6.5) |
Assigned to: | CPU Architecture: | Any |
[1 Sep 2004 22:15]
David Ishee
[1 Sep 2004 22:34]
David Ishee
Calling out the specific columns is a workaround for this problem: e.g. INSERT INTO cp_binary_data (cp_parent_ID, name, type, data) SELECT cp_parent_ID,name,type,data FROM test_temp.cp_binary_data_1094066804518
[1 Sep 2004 22:36]
David Ishee
Note: The above workaround is for inserting the data back into permanent table from the temp table. The data gets into the temp table OK.
[2 Sep 2004 15:28]
MySQL Verification Team
Hi, I tested your example and also got "0 rows affected" for INSERT query, but it's expected behavior, because of duplicates. Original table 'cp_binary_data' already has rows with the same ID (PRIMARY KEY), that is why all rows from the temporary table are ignored.
[2 Sep 2004 16:40]
David Ishee
I researched my code further and found other examples where I cleared out the ID column in the temp table before reinserting into the permanent table. In this case I forgot to do that. I agree that this was programmer error, not a bug. (just don't tell anyone about it OK?)