From ee1fb08158408d2cb77d7075b01aa9041985752c Mon Sep 17 00:00:00 2001 From: Francisco Ernesto Teixeira Date: Tue, 25 Sep 2007 02:13:03 +0000 Subject: [PATCH] SQL Process: handling of DELIMITER to mimic mysql CLI (minor fix) --- source/helpers.pas | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/source/helpers.pas b/source/helpers.pas index 09ee251d..4d4cbb99 100644 --- a/source/helpers.pas +++ b/source/helpers.pas @@ -456,9 +456,7 @@ begin if i + 1 < length(sql) then thdchar := sql[i + 2]; {$REGION 'DELIMITER command'} - // proccess a DELIMITER command (like MySQL Prompt Client) - // note: - // LENGTH(DELIMITER) = 10 + // process a DELIMITER command (like MySQL Prompt Client) // first, verify if could be a DELIMITER command // arrangement to don't decrease this parse speed @@ -510,9 +508,9 @@ begin end else begin - // now we jump this(these) space(s) + // now we jump this(these) space(s) and/or horizontal tab(s) j := i + 1; - while ( sql[j] = ' ' ) do + while ( ( sql[j] = ' ' ) or ( sql[j] = Char(VK_TAB) ) ) do j := j + 1; // start to get the new delimiter