21 May
2014
21 May
'14
5:47 a.m.
Hi Alexander, I have started working on "CREATE OR REPLACE DATABASE" implementation. I thought this one has the least complexity among all the other commands. I am getting my hand-on debugging the source code too. I have made the required changes in sql_yacc.yy. The command is parsed properly. Handled the error where CREATE OR REPLACE and IF NOT EXISTS cannot occur at the same time. This is how I am thinking of proceeding with the implementation, In method mysql_create_db after checking the flag HA_LEX_CREATE_REPLACE. I am removing the database by calling mysql_rm_db and then the current implementation will take care of creating the new db with the same name. This seems correct? Or is there anything I need to consider? Thanks, Sriram