~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/definition/table.cc

  • Committer: Brian Aker
  • Date: 2010-12-23 07:37:59 UTC
  • mto: (2026.1.1 build)
  • mto: This revision was merged to the branch mainline in revision 2027.
  • Revision ID: brian@tangent.org-20101223073759-h1w3pjhhq63qvmsr
Additional encapsulation around the SE api. 

Show diffs side-by-side

added added

removed removed

Lines of Context:
1054
1054
    {
1055
1055
      my_error(ER_CORRUPT_TABLE_DEFINITION_ENUM, MYF(0), table.name().c_str());
1056
1056
 
1057
 
      return ER_CORRUPT_TABLE_DEFINITION; // Historical
 
1057
      return ER_CORRUPT_TABLE_DEFINITION_ENUM; // Historical
1058
1058
    }
1059
1059
 
1060
1060
 
1670
1670
 
1671
1671
  local_error= plugin::StorageEngine::getTableDefinition(session, identifier, table);
1672
1672
 
1673
 
  if (local_error != EEXIST)
1674
 
  {
1675
 
    if (local_error > 0)
1676
 
    {
1677
 
      errno= local_error;
1678
 
      local_error= 1;
1679
 
    }
1680
 
    else
1681
 
    {
1682
 
      if (not table->IsInitialized())
1683
 
      {
1684
 
        local_error= 4;
1685
 
      }
1686
 
    }
1687
 
    goto err_not_open;
1688
 
  }
1689
 
 
1690
 
  local_error= parse_table_proto(session, *table);
1691
 
 
1692
 
  setTableCategory(TABLE_CATEGORY_USER);
1693
 
 
1694
 
err_not_open:
 
1673
  do {
 
1674
    if (local_error != EEXIST)
 
1675
    {
 
1676
      if (local_error > 0)
 
1677
      {
 
1678
        errno= local_error;
 
1679
        local_error= 1;
 
1680
      }
 
1681
      else
 
1682
      {
 
1683
        if (not table->IsInitialized())
 
1684
        {
 
1685
          local_error= 4;
 
1686
        }
 
1687
      }
 
1688
      break;
 
1689
    }
 
1690
 
 
1691
    local_error= parse_table_proto(session, *table);
 
1692
 
 
1693
    setTableCategory(TABLE_CATEGORY_USER);
 
1694
  } while (0);
 
1695
 
1695
1696
  if (local_error && !error_given)
1696
1697
  {
1697
1698
    error= local_error;