Default ignored on database comparison

Discussion of open issues, suggestions and bugs regarding database management and administration tools for MySQL
Post Reply
molino
Posts: 33
Joined: Mon 06 Jul 2015 12:07

Default ignored on database comparison

Post by molino » Tue 02 Oct 2018 10:22

Hello,

just compared two databases. First database has default values on some columns set to 0, the other database has no default values declared. In the options it is not set to ignore default values.
The comparison returns no differences on both tables.

alexa
Devart Team
Posts: 2497
Joined: Fri 24 Jun 2011 14:17

Re: Default ignored on database comparison

Post by alexa » Thu 04 Oct 2018 14:34

If the table was created without DEFAULT, by default it will be given DEFAULT NULL value. When adding data into such a table, the column will contain an empty value.

If, you have set DEFAULT 0 for such a column, the default value will be 0 upon adding data into the table.

In case you want to ignore the differences, you have to select the "Ignore column default values" option.

mirunek
Posts: 1
Joined: Thu 08 Nov 2018 08:23

Re: Default ignored on database comparison

Post by mirunek » Thu 08 Nov 2018 08:41

alexa wrote:
Thu 04 Oct 2018 14:34
If the table was created without DEFAULT, by default it will be given DEFAULT NULL value. When adding data into such a table, the column will contain an empty value.

If, you have set DEFAULT 0 for such a column, the default value will be 0 upon adding data into the table.

In case you want to ignore the differences, you have to select the "Ignore column default values" option.
Hello alexa,
molino ask for some different... I have the same problem:

Table1: (sql text in comparison result)
phone2 VARCHAR(100) CHARACTER SET utf8 COLLATE utf8_czech_ci NOT NULL DEFAULT '',
Table2: (sql text in comparison result)
phone2 VARCHAR(100) CHARACTER SET utf8 COLLATE utf8_czech_ci NOT NULL,

Comparison result show "no diferrences", table is the same and its not posible generate diferrence script, but this is huge difference (and in text fields is seen that table declaration is different).
Comparison have "Ignore column default values" UNCHECKED, so comparator should see this difference and see it (at least in text), but table is inaccurately included in section EQUAL.

dbForge studio for Mysql version 8.0.108 trial.

alexa
Devart Team
Posts: 2497
Joined: Fri 24 Jun 2011 14:17

Re: Default ignored on database comparison

Post by alexa » Thu 08 Nov 2018 16:13

Thank you for the information.

We were able to reproduce this issue and will fix it in one of the next product builds. We will notify you once it's available for downloading.

Post Reply