1. Chew LM
  2. Valentina Studio
  3. Tuesday, August 07 2018, 01:15 PM
  4.  Subscribe via email
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.
Comment
There are no comments made yet.
Chew LM Accepted Answer
Oh so that's why. Good find.
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Studio
  3. # 1
Sergey Pashkov Accepted Answer
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.
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Studio
  3. # 2
Chew LM Accepted Answer
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',
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Studio
  3. # 3
Sergey Pashkov Accepted Answer
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.
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Studio
  3. # 4
  • Page :
  • 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