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
_______________________________________________
Mailing list: https://launchpad.net/~maria-developers
Post to     : maria-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~maria-developers
More help   : https://help.launchpad.net/ListHelp

Reply via email to