Bug #68560 mysqldiff does not accept database names containing hyphens
Submitted: 4 Mar 2013 11:56 Modified: 24 May 2013 19:51
Reporter: Stefan Lingler Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Utilities Severity:S3 (Non-critical)
Version:5.2.41 Revision 9727 OS:MacOS
Assigned to: CPU Architecture:Any
Tags: Database name, hyphens, mysqldiff

[4 Mar 2013 11:56] Stefan Lingler
Description:
When using the mysql workbench plugin script 'mysqldiff' to compare two databases that contain hyphens in their database name it fails with the following error:

mysqldiff: error: Invalid format for object compare argument. Format should be: db1.object:db2:object or db1:db2.

How to repeat:
Use any existing database names that contain hyphens as arguments, f.e. 'mydb-common'

mysqldiff --server1=user:pass@host --server2=user:pass@host mydb-common:mydb-common 

Suggested fix:
Fix the regular expression in the mysqldiff python script by replacing line 118 with

m_obj = re.match("([\w\-]+)(?:\.([\w\-]+))?:([\w\-]+)(?:\.([\w\-]+))?", argument)

to also match hyphens.
[24 May 2013 19:51] Chuck Bell
Fixed in release-1.2.2