push: multistatement parse fixes

This commit is contained in:
Juan Ferrer 2022-04-20 20:23:52 +02:00
parent f8c5c5eaeb
commit 112e346e2e
2 changed files with 6 additions and 3 deletions

View File

@ -469,6 +469,7 @@ class Push {
continue;
}
let delimiterFound = false;
while (i < sql.length) {
char = sql[i];
@ -480,7 +481,8 @@ class Push {
i++;
}
} else {
if (begins(delimiter)) break;
delimiterFound = begins(delimiter);
if (delimiterFound) break;
const tok = tokenIndex.get(char);
if (tok && begins(tok.start))
@ -490,7 +492,8 @@ class Push {
}
}
const len = i - stmtStart;
let len = i - stmtStart;
if (delimiterFound) len -= delimiter.length;
const stmt = sql.substr(stmtStart, len);
if (!/^\s*$/.test(stmt))

View File

@ -1,6 +1,6 @@
{
"name": "myvc",
"version": "1.3.12",
"version": "1.3.13",
"author": "Verdnatura Levante SL",
"description": "MySQL Version Control",
"license": "GPL-3.0",