~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_table.cc

  • Committer: Stewart Smith
  • Date: 2009-07-20 02:15:36 UTC
  • mto: (1093.1.29 captain)
  • mto: This revision was merged to the branch mainline in revision 1102.
  • Revision ID: stewart@flamingspork.com-20090720021536-b4nvezac9oo8gdbn
remove ha_table_exists_in_engine and use StorageEngine::getTableProto() instead.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1839
1839
  {
1840
1840
    bool create_if_not_exists =
1841
1841
      create_info->options & HA_LEX_CREATE_IF_NOT_EXISTS;
1842
 
    int retcode = ha_table_exists_in_engine(session, db, table_name);
 
1842
 
 
1843
    char table_path[FN_REFLEN];
 
1844
    uint32_t          table_path_length;
 
1845
 
 
1846
    table_path_length= build_table_filename(table_path, sizeof(table_path),
 
1847
                                            db, table_name, false);
 
1848
 
 
1849
    int retcode= StorageEngine::getTableProto(table_path, NULL);
1843
1850
    switch (retcode)
1844
1851
    {
1845
 
      case HA_ERR_NO_SUCH_TABLE:
 
1852
      case ENOENT:
1846
1853
        /* Normal case, no table exists. we can go and create it */
1847
1854
        break;
1848
 
      case HA_ERR_TABLE_EXIST:
 
1855
      case EEXIST:
1849
1856
        if (create_if_not_exists)
1850
1857
        {
1851
1858
          error= false;