Bug #25646 User-id without correct privilege appears to migrate data, gets no error
Submitted: 16 Jan 2007 11:09 Modified: 30 Apr 2007 9:42
Reporter: Nigel Knowles Email Updates:
Status: Won't fix Impact on me:
None 
Category:MySQL Migration Toolkit Severity:S2 (Serious)
Version:1.1.8 OS:Windows (Windows XP Prof)
Assigned to: CPU Architecture:Any
Tags: data transfer, migration, privilege, UserID

[16 Jan 2007 11:09] Nigel Knowles
Description:
I attempted to migrate a SQL Server database to MySQL, with a UserID that did not have the privilege to insert data into MySQL. The Migration Toolkit reported an error on not being able to Drop a table, which I ignored as it didn't have a table to drop, and then continued to appear to transfer data (about a million rows) and completed succesfully. At the end of the procedure there was no database created. 
The log (attached) shows repeated failures of the insert for each table. It should report the failure and then stop the attempt.

How to repeat:
Set up a migration using a UserID which does not have insert privilege.
[16 Jan 2007 11:10] Nigel Knowles
Migration report with repeated insert failures

Attachment: Migration report.txt (text/plain), 98.30 KiB.

[16 Jan 2007 13:14] MySQL Verification Team
Thank you for the bug report.

2. Data Bulk Transfer
---------------------

      `dbx`.`tb`
      ----------
          INSERT command denied to user 'jose'@'localhost' for table 'tb'
          0 row(s) transfered.
[30 Apr 2007 9:42] Michael G. Zinner
The behavior of the tool during the data bulk transfer is intentional. The idea behind this is, that even if some INSERT statement fail, some might go through. 

In your case this is unnecessary of course, because the user does not has write access to the database it is trying to create and all CREATEs or INSERTs will fail.

The error message that should have stopped you was the very first error message for the schema, which should have been:

Access denied for user 'someuser'@'%' to database 'somedatabase'

It is true that we should try to prevent our users from shooting them self in their foot whenever possible, but as the migration process can lead to hundred of thousands of different error scenarios that require manual interaction it is out of the scope of the tool to prevent any possible mistakes. I hope this is reasonable to you.
[13 Aug 2008 22:02] Steve Tomczyk
But why is the command denied in the first place?