Bug #86274 Workbench Migrate from Sybase v16.0 to MySQL doesn't handle server version
Submitted: 10 May 2017 18:13 Modified: 17 May 2019 16:02
Reporter: Brian Durbin Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Workbench: Migration Severity:S3 (Non-critical)
Version:6.3.9 OS:Any
Assigned to: CPU Architecture:Any
Tags: migration, sybase

[10 May 2017 18:13] Brian Durbin
Description:
When attempting to migrate a Sybase v16.0 SP01 PL03 schema to MySQL, the Python code doesn't handle the string returned in getServerVersion.  With this, then entire migration fails.  Errors are below:

Starting...
Connect to source DBMS...
- Connecting to source...
Connecting to Sybase@PhBIT Tadpole...
Opening ODBC connection to DSN=PhBIT Tadpole;DATABASE=tadpole;UID=phbit;PWD=XXXX...
ERROR: Connection failed: No open connection to Sybase@PhBIT Tadpole
Traceback (most recent call last):
  File "C:\Program Files\MySQL\MySQL Workbench 6.3 CE\modules\db_sybase_re_grt.py", line 195, in connect
    con = db_driver.connect(connection, password)
  File "C:\Program Files\MySQL\MySQL Workbench 6.3 CE\workbench\db_driver.py", line 91, in connect
    connection = library.connect(connection_string, password=password)
pyodbc.Error: ('ZZZZZ', '[ZZZZZ] [SAP][ASE ODBC Driver][Adaptive Server Enterprise]Login failed.\n (4002) (SQLDriverConnect); [ZZZZZ] [SAP][ASE ODBC Driver][Adaptive Server Enterprise]Login failed.\n (4002)')
Connecting to Sybase@PhBIT Tadpole...
Opening ODBC connection to DSN=PhBIT Tadpole;DATABASE=tadpole;UID=phbit;PWD=XXXX...
Traceback (most recent call last):
  File "C:\Program Files\MySQL\MySQL Workbench 6.3 CE\modules\db_sybase_re_grt.py", line 222, in connect
    _connections[connection.__id__]["version"] = getServerVersion(connection)
  File "C:\Program Files\MySQL\MySQL Workbench 6.3 CE\modules\db_sybase_re_grt.py", line 255, in getServerVersion
    ver_parts = [ int(part) for part in ver_string.split('.') ] + 4*[ 0 ]
ValueError: invalid literal for int() with base 10: '0 SP01 PL03'

Traceback (most recent call last):
  File "C:\Program Files\MySQL\MySQL Workbench 6.3 CE\workbench\wizard_progress_page_widget.py", line 66, in run
    self.func()
  File "C:\Program Files\MySQL\MySQL Workbench 6.3 CE\modules\migration_source_selection.py", line 444, in task_connect
    raise e
SystemError: ValueError("invalid literal for int() with base 10: '0 SP01 PL03'"): error calling Python module function DbSybaseRE.connect
ERROR: Error during Connect to source DBMS: ValueError("invalid literal for int() with base 10: '0 SP01 PL03'"): error calling Python module function DbSybaseRE.connect
ERROR: Exception in task 'Connect to source DBMS': SystemError('ValueError("invalid literal for int() with base 10: \'0 SP01 PL03\'"): error calling Python module function DbSybaseRE.connect',)

Failed

How to repeat:
Define an ODBC source to a Sybase V16.0 database.  Choose either "ODBC Data Source" or "ODBC (Native)".  When migration initiates, the above error will occur.

Suggested fix:
It looks like the Python code for the Sybase version can only handle numeric results, but v16.0 is now returning a string.  Not sure what version validation is performed, but it looks like a string now needs to be handled.
[24 Aug 2018 21:41] MySQL Verification Team
https://bugs.mysql.com/bug.php?id=92184 marked as duplicate of this one.
[17 Apr 2019 16:02] MySQL Verification Team
Please try version 8.0.15.
[18 May 2019 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".