So far I have managed to get the SET STATEMENT to work in setting the
session variables as well as getting the query to execute. A little
trial and error was done here but your help Sergei on clarifying the
order of execution from the parser was a big help to solve my issues
here as well. The 2 main things to get to work are getting the
variables and resetting the variables that are left. (depending on if
the current implementation is ok)
Here is how I implemented so far.
I manually call the set function. I plan on noting and copying the
SQLCOM_SET case functions in order to ensure the same checks are used
on the set statements. I however am copying the SET case in order to
prevent too many my_ok statements to be output. I will note in both
sections that the contents is copied elsewhere. I did however do a
mysql_execute_command recursive call to perform the select statement.
I figured in order to ensure it will work with any future changes to
the select methods the overhead of a single recursive call was
acceptable. SET statements seem less likely to change as they are not
really dependent on creating new methods for optimization etc. that
would cause possible implementation changes.
please let me know if this is acceptable.
I pushed what is working again to launchpad. I have yet to look into
the get command and how I am going to reset the variables but I am
getting familiar with SET commands I should be fine so far.
Joe
launchpad branch : ~jlukas79/+junk/mysql-server/