MySQL Forums
Forum List  »  Newbie

mysqldump quotes differently on Windows and Linux/Debian
Posted by: Tri Tro
Date: March 03, 2015 03:26AM

I'm trying to compare databases, but a mysqldump on the same content is different because mysqldump quotes field values differently.

Machine 1, Windows

> mysql --version
Ver 14.14 Distrib 5.6.21, for Win32 (x86)
> mysqldump --user=X --password --skip-extended-insert Database > Database.sql

Machine 2, Linux Debian

$ mysql --version
mysql Ver 14.14 Distrib 5.5.41, for debian-linux-gnu (i686) using readline 6.2
$ mysqldump --user=X --password --skip-extended-insert Database > Database.sql

Then I put both Database.sql files into a git archive and git-diff them. The problem is lines like this:

-INSERT INTO Table1 VALUES ('0.00');
+INSERT INTO Table1 VALUES (0.00);

Note: I shortened the statement for the purpose of this post, there is more fields in the actual table.

The type of that field is decimal(10,2).

So my questions are:

* What is the proper notation for a decimal(...,...) type value?
* How to create a diffable mysqldump on both machines?

Options: ReplyQuote


Subject
Written By
Posted
mysqldump quotes differently on Windows and Linux/Debian
March 03, 2015 03:26AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.