Dear All

I'm trying to insert a bunch of data from TableA in TableB by doing

SELECT INTO TableB (fieldA, fieldB, ...)
SELECT fieldA, fieldB, ... FROM TableA GROUP BY fieldA, fieldC, ...
ON DUPLICATE KEY UPDATE fieldZ = VALUES(fieldZ);

On my PC this works fine. But on the Server, not all rows get inserted.

When I execute the Query multiple times, the following output is generated 
(there is the same data in the Tables on the Server and the PC):

===Server===
Run 1:
Query OK, 54 rows affected (0.11 sec)
Records: 864  Duplicates: 27  Warnings: 0
Run 2:
Query OK, 130 rows affected (0.07 sec)
Records: 864  Duplicates: 65  Warnings: 0


===PC===
Run 1:
Query OK, 558 rows affected (0.30 sec)
Records: 864  Duplicates: 232  Warnings: 0
Run 2:
Query OK, 0 rows affected (0.08 sec)
Records: 864  Duplicates: 0  Warnings: 0


On the PC, all data is inserted and the second run doesn't affect any rows. But 
on the Server, this is not the case.

Can someone help me to debug the problem further? Is there a known issue for 
the used mysql version? Do I have to tune the configuration?

The strange thing is, that I didn't notice any error-message in the logs or the 
query window.


Mysql versions used:
PC: Ver 5.0.51b-community-nt for Win32 on ia32 (MySQL Community Edition (GPL))
Server: mysqld  Ver 5.0.38-Ubuntu_0ubuntu1-log for pc-linux-gnu on i486 (Ubuntu 
7.04 distribution)

Thank you very much for any assistance and Kind regards

Andreas Müller


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/mysql?unsub=arch...@jab.org

Reply via email to