[ https://forge.continuent.org/jira/browse/SEQUOIA-354?page=all ]
     
Stephane Giron closed SEQUOIA-354:
----------------------------------


Closing as bug fixed and user did not report other problems

> "INSERT INTO " query assumption 
> --------------------------------
>
>          Key: SEQUOIA-354
>          URL: https://forge.continuent.org/jira/browse/SEQUOIA-354
>      Project: Sequoia
>         Type: Bug
>   Components: Core
>     Versions: Sequoia 2.7
>  Environment: MySQL 4.1
>     Reporter: Arron Bates
>     Assignee: Stephane Giron
>      Fix For: Sequoia 2.7

>
>
> Insert queries are identified by having them start with "INSERT "
> However, during processing the front of the query is removed assuming that it 
> in fact starts with "INSERT INTO "
> A query written as...   "INSERT example_table (...) VALUES (...)"
> will make the core procssing return the error... 'table  "le_table" does not 
> exist'
> this is because the query is identified by the "INSERT", but "INSERT INTO " 
> is assumed and then removed... literally the first 13 characters (length of 
> 'INSERT INTO') are taken off the front of the query. So if  "into" doesn't 
> exist, it starts hacking off the front of the table name.
> I feel that identifying by "INSERT " is correct, but removing the arbitrary 
> 13 characters of "INSERT INTO " being very incorrect. 13 characters is 
> dangerous not only because of MySQL supporting the removal of the "into" 
> part, but because of whitespace. If for some reason there were three spaces 
> in between "insert" and "into" the removal of 13 characters would once again 
> form a bad SQL statement.
> As a fix, the minimum and maximum amount of assumption that should happen is 
> the recognition of "INSERT ". It would not only support strange SQL engines 
> like MySQL, but be more consistent in that "INSERT " is recognised, so the 
> absolute safe assumption is that only "INSERT " can be removed.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   https://forge.continuent.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


_______________________________________________
Sequoia mailing list
[email protected]
https://forge.continuent.org/mailman/listinfo/sequoia

Reply via email to