Menu

#2710 (ok 2.11.8) SQL Parser removes essential SPACE

fixed
1
2013-06-11
2008-06-13
No

executing:

CREATE FUNCTION `ProperCase`(cInput TEXT)
RETURNS text
NOT DETERMINISTIC
CONTAINS SQL
SQL SECURITY DEFINER
COMMENT ''
BEGIN
Declare cReturn Text;
Set cReturn = CONCAT(UPPER(LEFT(cInput,1)),LOWER(SUBSTRING(cInput, 2)));
RETURN cReturn;
END;

results in SQL error:

missing spave between DETERMINISTICCONTAINS

CREATE FUNCTION `ProperCase` (
cInput TEXT
) RETURNS text NOT DETERMINISTICCONTAINS SQLSQL SECURITY DEFINER COMMENT '' BEGIN Declare cReturn Text;

#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 8

Discussion

  • Sebastian Mendel

    Logged In: YES
    user_id=326580
    Originator: YES

    sorry, not an error in the parser, the error was my mistake

    but the pretty printer still removes this space

     
  • Sebastian Mendel

    • labels: 438488 --> SQL Query Pretty-Printer
     
  • Marc Delisle

    Marc Delisle - 2008-06-24
    • assigned_to: nobody --> lem9
     
  • Marc Delisle

    Marc Delisle - 2008-06-24

    Logged In: YES
    user_id=210714
    Originator: NO

    Fixed in subversion, thanks for reporting.

     
  • Marc Delisle

    Marc Delisle - 2008-06-24
    • priority: 5 --> 1
    • summary: SQL Parser removes essential SPACE --> (ok 2.11.8) SQL Parser removes essential SPACE
    • status: open --> open-fixed
     
  • Marc Delisle

    Marc Delisle - 2008-07-28
    • status: open-fixed --> closed-fixed
     
  • Michal Čihař

    Michal Čihař - 2013-06-11
    • Status: closed-fixed --> fixed