Hi All,

I want to ask , if there is any way of knowing that 'IF NOT EXIST' clause
was included in the CREATE statement sent by the client to drizzle server.

The way it is checked in MySQL is that in '*st_ha_create_information*'
struct, there is a variable '*uint options*' that was used for this purpose.
and if I am not wrong, it was updated while parsing ( in sql_yacc.cc ) and
after performing a bit wise '*AND*' operation of '*options*' with ' *
HA_LEX_CREATE_IF_NOT_EXISTS* ' ( in sql_parse:2436 )
we could know that CREATE statement was used with 'IF NOT EXIST' clause.

where HA_LEX_CREATE_IF_NOT_EXISTS is defined as* '#defined
HA_LEX_CREATE_IF_NOT_EXISTS 2 '*


but in Drizzle there is no such thing that can be used for this purpose. If
this information is provided then we can easily make changes in such a way
that server will return

*        warning* on CREATE TABLE IF NOT EXIST t1 ( id int );
and   *error*      on CREATE TABLE  t1 (id int );
        provided the table t1 is already present.


I am asking in context of  bug#626893.

Regards,
Kinaan Khan sherwani
_______________________________________________
Mailing list: https://launchpad.net/~drizzle-discuss
Post to     : drizzle-discuss@lists.launchpad.net
Unsubscribe : https://launchpad.net/~drizzle-discuss
More help   : https://help.launchpad.net/ListHelp

Reply via email to