Commit d3134c14 authored by Matthieu Muffato's avatar Matthieu Muffato

Merge branch 'version/2.1' into version/2.2

* version/2.1:
  Allow the IF NOT EXISTS of CREATE DATABASE
parents e49786f3 d8d687ca
...@@ -124,7 +124,7 @@ sub dbc_hash_to_cmd { ...@@ -124,7 +124,7 @@ sub dbc_hash_to_cmd {
} }
$dbc_hash->{dbname} = ''; $dbc_hash->{dbname} = '';
} }
} elsif($sqlcmd =~ /(CREATE\s+DATABASE\s*?)(?:\s+(\w+))?/i ) { } elsif($sqlcmd =~ /(CREATE\s+DATABASE(?:\s+IF\s+NOT\s+EXISTS)?\s*?)(?:\s+(\w+))?/i ) {
my $dbname = $2 || $dbc_hash->{dbname}; my $dbname = $2 || $dbc_hash->{dbname};
if($driver eq 'sqlite') { if($driver eq 'sqlite') {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment