push: multistatement parse fixes
This commit is contained in:
parent
f8c5c5eaeb
commit
112e346e2e
|
@ -469,6 +469,7 @@ class Push {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let delimiterFound = false;
|
||||||
while (i < sql.length) {
|
while (i < sql.length) {
|
||||||
char = sql[i];
|
char = sql[i];
|
||||||
|
|
||||||
|
@ -480,7 +481,8 @@ class Push {
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (begins(delimiter)) break;
|
delimiterFound = begins(delimiter);
|
||||||
|
if (delimiterFound) break;
|
||||||
|
|
||||||
const tok = tokenIndex.get(char);
|
const tok = tokenIndex.get(char);
|
||||||
if (tok && begins(tok.start))
|
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);
|
const stmt = sql.substr(stmtStart, len);
|
||||||
|
|
||||||
if (!/^\s*$/.test(stmt))
|
if (!/^\s*$/.test(stmt))
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "myvc",
|
"name": "myvc",
|
||||||
"version": "1.3.12",
|
"version": "1.3.13",
|
||||||
"author": "Verdnatura Levante SL",
|
"author": "Verdnatura Levante SL",
|
||||||
"description": "MySQL Version Control",
|
"description": "MySQL Version Control",
|
||||||
"license": "GPL-3.0",
|
"license": "GPL-3.0",
|
||||||
|
|
Loading…
Reference in New Issue