~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_base.cc

Merge trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
267
267
        unused_tables= NULL;
268
268
    }
269
269
  }
270
 
 
271
270
  free(table);
272
271
}
273
272
 
780
779
  if (free_share)
781
780
  {
782
781
    table->s->free_table_share();
783
 
    delete table;
 
782
    /* This makes me sad, but we're allocating it via malloc */
 
783
    free(table);
784
784
  }
785
785
}
786
786
 
1435
1435
 
1436
1436
    if (table_list->create)
1437
1437
    {
1438
 
      if (ha_table_exists_in_engine(this, table_list->db,
1439
 
                                    table_list->table_name)
1440
 
          != HA_ERR_TABLE_EXIST)
 
1438
      char path[FN_REFLEN];
 
1439
      size_t length;
 
1440
 
 
1441
      length= build_table_filename(path, sizeof(path),
 
1442
                                   table_list->db, table_list->table_name,
 
1443
                                   false);
 
1444
 
 
1445
      if (StorageEngine::getTableProto(path, NULL) != EEXIST)
1441
1446
      {
1442
1447
        /*
1443
1448
          Table to be created, so we need to create placeholder in table-cache.
1463
1468
    }
1464
1469
 
1465
1470
    /* make a new table */
1466
 
    table= new Table;
 
1471
    table= (Table *)malloc(sizeof(Table));
1467
1472
    if (table == NULL)
1468
1473
    {
1469
1474
      pthread_mutex_unlock(&LOCK_open);