mysql lexical analysis and parsing

If you do not hit the query cache, you must start to really execute the statement. First, MySQL need to know what you have to do,
and therefore needs to be done to resolve the SQL statement.
First analyzer will do "lexical analysis." Your input is a SQL statement from a plurality of strings and spaces,
MySQL need to identify what is inside strings are what representatives.
MySQL identified from your input "select" keyword, which is a query. It should also character
string "T" is identified as "table T", the character string "ID" identified as "column ID."
After identifying these done, it is done "parsing." According to the results of lexical analysis, syntax parser will be based on
the rules you enter determine the SQL statement meets the MySQL syntax.
If your statement is wrong, will receive the "You have an error in your SQL syntax" error alerts, than
as the following statement select few dozen letters beginning with "s".

 

Question: Why does not elect lexical analysis did not find, and throw this error in parsing?

Guess you like

Origin www.cnblogs.com/laphome/p/11652263.html