Comment 3 for bug 942377

Revision history for this message
Baron Schwartz (baron-xaprb) wrote :

What's happening here is that pt-upgrade is trying to create a temporary table with the SELECT:

CREATE TEMPORARY TABLE ... AS SELECT ...

MySQL will allow you to write a SELECT statement with duplicate columns, but not create a table with duplicates. The best way to handle this is to fix the original statement, because it is likely to cause all kinds of problems, now or in the future. For example, imagine if MySQL gets more strict in the future? Or, what if there is some code that fetches each row and puts it into a hash table or dictionary, and then accesses the 'Name' column?