Bug #4798 Missing column when exporting in sql (2)
Export failure when the comments contains reserved keywords (KEY, CONSTRAINT) To resolve, I removed the SQL comment from the current line before checking the presence of reserved keywords. Signed-off-by: Andrea Vallorani <andrea.vallorani@gmail.com>
This commit is contained in:
parent
6493129130
commit
364b26b0dd
@ -1435,9 +1435,10 @@ class ExportSql extends ExportPlugin
|
||||
// lets find first line with constraints
|
||||
$first_occur = -1;
|
||||
for ($i = 0; $i < $sql_count; $i++) {
|
||||
$sql_line = current(explode(' COMMENT ', $sql_lines[$i], 2));
|
||||
if (preg_match(
|
||||
'@[\s]+(CONSTRAINT|KEY)@',
|
||||
$sql_lines[$i]
|
||||
$sql_line
|
||||
) && $first_occur == -1) {
|
||||
$first_occur = $i;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user