Bug #70175 Workbench - Migration Gives Integer overflow on large number of records
Submitted: 28 Aug 2013 13:59 Modified: 8 Nov 2015 0:44
Reporter: johan jordaan Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Workbench: Migration Severity:S1 (Critical)
Version:6.0 OS:Windows
Assigned to: CPU Architecture:Any
Tags: INTEGER, migration, overflow, workbench

[28 Aug 2013 13:59] johan jordaan
Description:
When migrating a large number of records from SQL Server, the step counting records to migrate, 'Determine number of rows to copy' fails with 'Arithmetic overflow error converting expression to data type int'.

The number of rows exceeds 2,000,000,000.

Cannot continue.

How to repeat:
Migrate more than say 2,500,000,000 rows to mySQL. 

Suggested fix:
Use long data type rather than an int for the variable where the 'Determine number of rows to copy' are accumelated.
[28 Aug 2013 14:46] Alfredo Kojima
Hi Johan

Did the rest of migration work correctly? Can you send the log files in the log directory (locate it from the Help menu)? Can you also include the full error of the text?
[29 Aug 2013 10:04] johan jordaan
Log File

Attachment: wb.log (application/octet-stream, text), 14.38 KiB.

[29 Aug 2013 10:05] johan jordaan
Starting...
Prepare information for data copy...
Prepare information for data copy done
Determine number of rows to copy....
Counting number of rows in tables...
wbcopytables.exe --count-only --passwords-from-stdin --odbc-source="DSN=BMSI05_ODBC;DATABASE=;UID=TRID_ADM" --table-file=c:\users\jj\appdata\local\temp\tmpgnivw_
11:47:54 [INF][      copytable]: --table [Archives]	[dbo].[WHTableMaster]
11:47:54 [INF][      copytable]: --table [Archives]	[dbo].[WHImportStats]
11:47:54 [INF][      copytable]: --table [Archives]	[dbo].[AuditArchive]
11:47:54 [INF][      copytable]: --table [Archives]	[dbo].[WHArchive]
11:47:54 [INF][      copytable]: --table [Archives]	[dbo].[WHDataBases]
11:47:54 [INF][      copytable]: --table [Archives]	[dbo].[WHDailyImportLog]
11:47:54 [INF][      copytable]: --table [Archives]	[dbo].[WHArchiveOldData]
11:47:54 [INF][      copytable]: --table [Archives]	[dbo].[NeonImport]
11:47:54 [INF][      copytable]: --table [Archives]	[dbo].[AuditTablesMaster]
11:47:54 [INF][      copytable]: Opening ODBC connection to 'DSN=BMSI05_ODBC;DATABASE=;UID=TRID_ADM;PWD=XXX'
11:47:54 [INF][      copytable]: ODBC connection to 'DSN=BMSI05_ODBC;DATABASE=;UID=TRID_ADM;PWD=' opened
11:56:09 [ERR][      copytable]: Exception: SQLExecDirect(SELECT count(*) FROM [Archives].[dbo].[WHArchive]): 22003:18115:[Microsoft][SQL Server Native Client 11.0][SQL Server]Arithmetic overflow error converting expression to data type int.

ERROR: Determine number of rows to copy: Error getting row count from source tables
Failed
[8 Oct 2015 0:44] MySQL Verification Team
Please try version 6.3.4. Thanks.
[8 Nov 2015 1:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".