~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/db.cc

Merge of HA_CREATE_INFO simplifications.

AKA... proto now working better!

You start these things... and then you wonder. What problem did I start out
today to solve? Was the store_lock() issues, or was it related to 
TableIdentifiers.

Show diffs side-by-side

added added

removed removed

Lines of Context:
186
186
 
187
187
*/
188
188
 
189
 
bool mysql_create_db(Session *session, const char *db, HA_CREATE_INFO *create_info)
 
189
bool mysql_create_db(Session *session, const char *db, HA_CREATE_INFO *create_info, bool is_if_not_exists)
190
190
{
191
191
  ReplicationServices &replication_services= ReplicationServices::singleton();
192
192
  char   path[FN_REFLEN+16];
193
193
  long result= 1;
194
194
  int error_erno;
195
195
  bool error= false;
196
 
  uint32_t create_options= create_info ? create_info->options : 0;
197
196
  uint32_t path_len;
198
197
 
199
198
  /* do not create 'information_schema' db */
231
230
  {
232
231
    if (errno == EEXIST)
233
232
    {
234
 
      if (!(create_options & HA_LEX_CREATE_IF_NOT_EXISTS))
 
233
      if (! is_if_not_exists)
235
234
      {
236
235
        my_error(ER_DB_CREATE_EXISTS, MYF(0), db);
237
236
        error= true;