File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed
Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -283,6 +283,10 @@ public function extract($end = false)
283283 * `strtoupper(substr($this->query, $i, 9)) === 'DELIMITER'`
284284 *
285285 * This optimization makes the code about 3 times faster.
286+ *
287+ * `DELIMITER` is not being considered a keyword. The only context
288+ * it has a special meaning is when it is the beginning of a
289+ * statement. This is the reason for the last condition.
286290 */
287291 if (($ i + 9 < $ len )
288292 && (($ this ->query [$ i ] === 'D ' ) || ($ this ->query [$ i ] === 'd ' ))
@@ -295,6 +299,7 @@ public function extract($end = false)
295299 && (($ this ->query [$ i + 7 ] === 'E ' ) || ($ this ->query [$ i + 7 ] === 'e ' ))
296300 && (($ this ->query [$ i + 8 ] === 'R ' ) || ($ this ->query [$ i + 8 ] === 'r ' ))
297301 && (Context::isWhitespace ($ this ->query [$ i + 9 ]))
302+ && (trim ($ this ->current ) === '' )
298303 ) {
299304 // Saving the current index to be able to revert any parsing
300305 // done in this block.
You can’t perform that action at this time.
0 commit comments