List:Internals« Previous MessageNext Message »
From:Joseph Lukas Date:May 14 2009 8:53pm
Subject:Question on parser and variable
View as plain text  
So far I have the parser looking at mysql_set_variable as a SELECT <option>
and it can make it past the parser so long as you do not use a *.  This is
my issue so far as I declared mysql_set_variable as requiring opt_option
much like the SET behavior and the * parser thinks it is part of an

I do not yet know how to get around this, any suggestions? I was thinking of
a delimiter to declare to the parser where the set variable section ends but
I am unsure.  

I was going to ask if I could move the command out in front of the select as
it seems to get confusing with the select terms.  Such as

MYSQL_SET_VARIABLE set_buffer_size=100000 SELECT * FROM test;

This may allow me to clump parser code modifications in a single area as
with no delimiter to separate the select column names it will get sloppy for


SELECT DISTINCT MYSQL_SET_VARIABLE set_join_buffer_size=100000,
set_read_rnd_buffer_size=200000, columnName1, columnName2, columnName3 FROM
test WHERE ... ;

MYSQL_SET_VARIABLE set_join_buffer_size=100000,
set_read_rnd_buffer_size=200000 SELECT DISTINCT  columnName1, columnName2,
columnName3 FROM test WHERE ... ;

I like version 2 better it just looks simpler and better defined with less
chances for user error. Yes/no


Question on parser and variableJoseph Lukas14 May
  • Re: Question on parser and variableSergei Golubchik15 May