~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/statement/create_table.cc

  • Committer: Brian Aker
  • Date: 2010-11-30 00:29:39 UTC
  • mto: (1965.2.2 build)
  • mto: This revision was merged to the branch mainline in revision 1966.
  • Revision ID: brian@tangent.org-20101130002939-8bzz3xpa0aapbq2w
Fix sleep() so that a kill command will kill it.

Show diffs side-by-side

added added

removed removed

Lines of Context:
86
86
                                       create_table->getTableName(),
87
87
                                       create_table_message.type());
88
88
 
89
 
  if (not check(new_table_identifier))
 
89
  if (create_table_precheck(new_table_identifier))
90
90
  {
91
91
    /* put tables back for PS rexecuting */
92
92
    session->lex->link_first_table_back(create_table, link_to_local);
230
230
  return res;
231
231
}
232
232
 
233
 
bool statement::CreateTable::check(const TableIdentifier &identifier)
234
 
{
235
 
  // Check table name for validity
236
 
  if (not identifier.isValid())
237
 
    return false;
238
 
 
239
 
  // See if any storage engine objects to the name of the file
240
 
  if (not plugin::StorageEngine::canCreateTable(identifier))
241
 
  {
242
 
    my_error(ER_DBACCESS_DENIED_ERROR, MYF(0), "", "", identifier.getSchemaName().c_str());
243
 
 
244
 
    return false;
245
 
  }
246
 
 
247
 
  // Make sure the schema exists, we will do this again during the actual
248
 
  // create for the table.
249
 
  if (not plugin::StorageEngine::doesSchemaExist(identifier))
250
 
  {
251
 
    my_error(ER_BAD_DB_ERROR, MYF(0), identifier.getSchemaName().c_str());
252
 
 
253
 
    return false;
254
 
  }
255
 
 
256
 
  return true;
257
 
}
258
 
 
259
233
bool statement::CreateTable::validateCreateTableOption()
260
234
{
261
235
  bool rc= true;