~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/plugin/storage_engine.cc

  • Committer: Brian Aker
  • Date: 2010-03-23 23:08:36 UTC
  • Revision ID: brian@gaz-20100323230836-p97twveqkt007r1j
Large reord in ALTER TABLE for RENAME.

Show diffs side-by-side

added added

removed removed

Lines of Context:
91
91
  statement_ctx.markModifiedNonTransData();
92
92
}
93
93
 
94
 
int StorageEngine::doRenameTable(Session *,
95
 
                                 const char *from,
96
 
                                 const char *to)
 
94
 
 
95
int StorageEngine::renameTable(Session &session, TableIdentifier &from, TableIdentifier &to)
97
96
{
98
 
  int error= 0;
99
 
  for (const char **ext= bas_ext(); *ext ; ext++)
100
 
  {
101
 
    if (rename_file_ext(from, to, *ext))
102
 
    {
103
 
      if ((error=errno) != ENOENT)
104
 
        break;
105
 
      error= 0;
106
 
    }
107
 
  }
108
 
  return error;
 
97
  setTransactionReadWrite(session);
 
98
 
 
99
  return doRenameTable(&session, from.getPath().c_str(), to.getPath().c_str());
109
100
}
110
101
 
111
 
 
112
102
/**
113
103
  Delete all files with extension from bas_ext().
114
104