projects
/
dbsrgits/SQL-Translator.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
(parent:
2282f0e
)
MariaDB allows defaults of column names
Ed J [Sat, 7 Mar 2020 20:16:24 +0000 (20:16 +0000)]
lib/SQL/Translator/Parser/MySQL.pm
patch
|
blob
|
blame
|
history
t/data/mysql/create.sql
patch
|
blob
|
blame
|
history
diff --git
a/lib/SQL/Translator/Parser/MySQL.pm
b/lib/SQL/Translator/Parser/MySQL.pm
index
c3a60bb
..
eedf583
100644
(file)
--- a/
lib/SQL/Translator/Parser/MySQL.pm
+++ b/
lib/SQL/Translator/Parser/MySQL.pm
@@
-692,6
+692,11
@@
default_val :
{
$return = $item[2];
}
+ |
+ /default/i NAME # column value, allowed in MariaDB
+ {
+ $return = $item[2];
+ }
auto_inc : /auto_increment/i { 1 }
diff --git
a/t/data/mysql/create.sql
b/t/data/mysql/create.sql
index
64ab685
..
e13eab0
100644
(file)
--- a/
t/data/mysql/create.sql
+++ b/
t/data/mysql/create.sql
@@
-4,7
+4,7
@@
create table person (
age integer,
weight double(11,2),
iq tinyint default '0',
- description text,
+ description text default `name`,
UNIQUE KEY UC_age_name (age)
) ENGINE=MyISAM;