1. Chew LM
  2. Valentina Studio
  3. Dienstag, August 07 2018, 01:15 PM
  4.  Abonnieren via E-Mail
Hi,

When i try to restore the dump created by VStudio, I got the following error:
Error in query (1067): Invalid default value for 'country_code'

Upon checking, i noticed that the default value contain the escape character(\'):
`country_code` Char( 2 ) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL DEFAULT '\'-\'' COMMENT 'country unique id',

Once i removed both escape character(\') it works.
Kommentar
There are no comments made yet.
Chew LM Akzeptierte Antwort
Oh so that's why. Good find.
Kommentar
There are no comments made yet.
Sergey Pashkov Akzeptierte Antwort
That's a MariaDB change in version 10.2.7 - string values in INFORMATION_SCHEMA.COLUMNS are quoted.
So we have to add the version check.
Kommentar
There are no comments made yet.
Chew LM Akzeptierte Antwort
Thanks.
The actual default value that the user will see is just the dash without the quote - .

In the Adminer the following is generated:
`country_code` char(2) NOT NULL DEFAULT '-' COMMENT 'country unique id',
Kommentar
There are no comments made yet.
Sergey Pashkov Akzeptierte Antwort
Hello,

So the default value should be '-', right?

In MySQL, it is necessary to either escape the quotes or duplicate, so it will look like DEFAULT '''-'''
I'll check the MariaDB Server, most probably we need an adjustment here.
Kommentar
There are no comments made yet.
  • Seite :
  • 1


There are no replies made for this post yet.
However, you are not allowed to reply to this post.

Categories

Announcements & News
  1. 0 subcategories
Valentina Studio
  1. 2 subcategories
Valentina Server
  1. 4 subcategories
Valentina Database ADK
  1. 0 subcategories
Valentina Reports ADK
  1. 0 subcategories
Other Discussions
  1. 2 subcategories
BETA Testing
  1. 0 subcategories
Education & Research
  1. 0 subcategories