View Issue Details

IDProjectCategoryView StatusLast Update
0008923VALENTINA STUDIODump (SQL)public2021-03-08 20:42
Reporternimrod cohen Assigned ToSergey Pashkov  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
PlatformINTELOSMAC OS OS Version*
Product Version10.6.x 
Target Version11.2.xFixed in Version11.2.x 
Summary0008923: DB sql dump creates file that Dump loading will find not valid and create errors
DescriptionAfter every dump I make, I have to run the exported sql file via 2 regex changes to replace all non-quoted string to quoted string.

export creates this:
CREATE TABLE...
        `comment_type` VarChar( 20 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT comment
    `action_date` Timestamp NOT NULL DEFAULT 0000-00-00 00:00:00,

but, during import - loading default value without quotes fails.
and I must do this in order to repair file:
regex replace this for strings:
(DateTime|Timestamp) NOT NULL DEFAULT (\d+-\d+-\d+(:?\s\d+:\d+(:?:\d+)?)?)
with this:
$1 NOT NULL DEFAULT '$2'

and for timestamps/datetime:
NULL DEFAULT ((?!(CURRENT_TIMESTAMP|[\'\d\.]+)).*),
with this:
NULL DEFAULT '$1',

hope this is clear...

Steps To ReproduceI'm exporting from MariaDB 10.1.44
export to sql, use a table that has a varchar field with default string value, and a datetime field with default current_timestamp
see the export file, the default values are unquoted.
TagsNo tags attached.
Working with DB:mySQL Server
Version of your DB:10.1.44

Activities

Sergey Pashkov

Sergey Pashkov

2021-03-08 20:05

developer   ~0011528

The fix will be available in version 11.2

Issue History

Date Modified Username Field Change
2021-02-21 13:10 nimrod cohen New Issue
2021-02-21 13:12 Sergey Pashkov Assigned To => Sergey Pashkov
2021-02-21 13:12 Sergey Pashkov Status new => assigned
2021-03-08 20:05 Sergey Pashkov Status assigned => resolved
2021-03-08 20:05 Sergey Pashkov Resolution open => fixed
2021-03-08 20:05 Sergey Pashkov Fixed in Version => 11.0.x
2021-03-08 20:05 Sergey Pashkov Target Version => 11.0.x
2021-03-08 20:05 Sergey Pashkov Note Added: 0011528
2021-03-08 20:42 Ruslan Zasukhin Fixed in Version 11.0.x => 11.2.x
2021-03-08 20:42 Ruslan Zasukhin Target Version 11.0.x => 11.2.x