maria-developers team mailing list archive
-
maria-developers team
-
Mailing list archive
-
Message #07540
[GSoC] Suggestions on adding a new method
Hi All,
I was thinking of adding two new inline methods in struct LEX as follows
inline bool is_create_or_replace() {
return (create_info.options & HA_LEX_CREATE_REPLACE);
}
inline bool is_create_if_not_exists() {
return (create_info.options & HA_LEX_CREATE_IF_NOT_EXISTS);
}
With these, statements like
if(lex->create_info.options & HA_LEX_CREATE_REPLACE)
will be changed to
if(lex->is_create_or_replace())
which definitely is more readable. This kind of statements are used in
sql_yacc.yy, sql_parse.cc and many object specific implementation .cc files.
Should I make the changes or is it unnecessary?
Thanks,
Sriram