~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/plugin/storage_engine.cc

  • Committer: Brian Aker
  • Date: 2010-11-29 04:42:53 UTC
  • mto: (2017.3.1 catalogs)
  • mto: This revision was merged to the branch mainline in revision 1962.
  • Revision ID: brian@tangent.org-20101129044253-e46xw0y04xv7nx3a
Remove dead code in wait, pass session.

Show diffs side-by-side

added added

removed removed

Lines of Context:
370
370
*/
371
371
int StorageEngine::getTableDefinition(Session& session,
372
372
                                      const TableIdentifier &identifier,
373
 
                                      message::TablePtr &table_message,
 
373
                                      message::table::shared_ptr &table_message,
374
374
                                      bool include_temporary_tables)
375
375
{
376
376
  int err= ENOENT;
385
385
    }
386
386
  }
387
387
 
388
 
  drizzled::message::TablePtr table_ptr;
 
388
  drizzled::message::table::shared_ptr table_ptr;
389
389
  if ((table_ptr= drizzled::message::Cache::singleton().find(identifier)))
390
390
  {
391
391
    table_message= table_ptr;
445
445
{
446
446
  int error= 0;
447
447
  int error_proto;
448
 
  message::TablePtr src_proto;
 
448
  message::table::shared_ptr src_proto;
449
449
  StorageEngine *engine;
450
450
 
451
451
  error_proto= StorageEngine::getTableDefinition(session, identifier, src_proto);
453
453
  if (error_proto == ER_CORRUPT_TABLE_DEFINITION)
454
454
  {
455
455
    string error_message;
 
456
    identifier.getSQLPath(error_message);
456
457
 
457
 
    error_message.append(const_cast<TableIdentifier &>(identifier).getSQLPath());
458
458
    error_message.append(" : ");
459
459
    error_message.append(src_proto->InitializationErrorString());
460
460
 
470
470
 
471
471
  if (not engine)
472
472
  {
473
 
    my_error(ER_CORRUPT_TABLE_DEFINITION, MYF(0), const_cast<TableIdentifier &>(identifier).getSQLPath().c_str());
 
473
    string error_message;
 
474
    identifier.getSQLPath(error_message);
 
475
    my_error(ER_CORRUPT_TABLE_DEFINITION, MYF(0), error_message.c_str());
474
476
 
475
477
    return ER_CORRUPT_TABLE_DEFINITION;
476
478
  }
556
558
 
557
559
    if (error)
558
560
    {
559
 
      my_error(ER_CANT_CREATE_TABLE, MYF(ME_BELL+ME_WAITTANG), const_cast<TableIdentifier &>(identifier).getSQLPath().c_str(), error);
 
561
      std::string path;
 
562
      identifier.getSQLPath(path);
 
563
      my_error(ER_CANT_CREATE_TABLE, MYF(ME_BELL+ME_WAITTANG), path.c_str(), error);
560
564
    }
561
565
 
562
566
    table.delete_table();
610
614
    {
611
615
      errno= directory.getError();
612
616
      if (errno == ENOENT)
613
 
        my_error(ER_BAD_DB_ERROR, MYF(ME_BELL+ME_WAITTANG), const_cast<SchemaIdentifier &>(schema_identifier).getSQLPath().c_str());
 
617
      {
 
618
        std::string path;
 
619
        schema_identifier.getSQLPath(path);
 
620
        my_error(ER_BAD_DB_ERROR, MYF(ME_BELL+ME_WAITTANG), path.c_str());
 
621
      }
614
622
      else
 
623
      {
615
624
        my_error(ER_CANT_READ_DIR, MYF(ME_BELL+ME_WAITTANG), directory.getPath(), errno);
 
625
      }
 
626
 
616
627
      return;
617
628
    }
618
629
  }