~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/plugin/storage_engine.cc

  • Committer: Brian Aker
  • Date: 2011-01-11 20:32:48 UTC
  • mto: This revision was merged to the branch mainline in revision 2075.
  • Revision ID: brian@tangent.org-20110111203248-0kyusqlkqd2xqvs7
Cleanup issue of OR in tests.

Show diffs side-by-side

added added

removed removed

Lines of Context:
101
101
}
102
102
 
103
103
 
104
 
int StorageEngine::renameTable(Session &session, const identifier::Table &from, const identifier::Table &to)
 
104
int StorageEngine::renameTable(Session &session, const TableIdentifier &from, const TableIdentifier &to)
105
105
{
106
106
  int error;
107
107
  setTransactionReadWrite(session);
137
137
  @retval
138
138
    !0  Error
139
139
*/
140
 
int StorageEngine::doDropTable(Session&, const identifier::Table &identifier)
 
140
int StorageEngine::doDropTable(Session&, const TableIdentifier &identifier)
141
141
                               
142
142
{
143
143
  int error= 0;
287
287
class StorageEngineGetTableDefinition: public std::unary_function<StorageEngine *,bool>
288
288
{
289
289
  Session& session;
290
 
  const identifier::Table &identifier;
 
290
  const TableIdentifier &identifier;
291
291
  message::Table &table_message;
292
 
  drizzled::error_t &err;
 
292
  int &err;
293
293
 
294
294
public:
295
295
  StorageEngineGetTableDefinition(Session& session_arg,
296
 
                                  const identifier::Table &identifier_arg,
 
296
                                  const TableIdentifier &identifier_arg,
297
297
                                  message::Table &table_message_arg,
298
 
                                  drizzled::error_t &err_arg) :
 
298
                                  int &err_arg) :
299
299
    session(session_arg), 
300
300
    identifier(identifier_arg),
301
301
    table_message(table_message_arg), 
306
306
    int ret= engine->doGetTableDefinition(session, identifier, table_message);
307
307
 
308
308
    if (ret != ENOENT)
309
 
      err= static_cast<drizzled::error_t>(ret);
 
309
      err= ret;
310
310
 
311
 
    return err == static_cast<drizzled::error_t>(EEXIST) or err != static_cast<drizzled::error_t>(ENOENT);
 
311
    return err == EEXIST || err != ENOENT;
312
312
  }
313
313
};
314
314
 
315
315
class StorageEngineDoesTableExist: public std::unary_function<StorageEngine *, bool>
316
316
{
317
317
  Session& session;
318
 
  const identifier::Table &identifier;
 
318
  const TableIdentifier &identifier;
319
319
 
320
320
public:
321
 
  StorageEngineDoesTableExist(Session& session_arg, const identifier::Table &identifier_arg) :
 
321
  StorageEngineDoesTableExist(Session& session_arg, const TableIdentifier &identifier_arg) :
322
322
    session(session_arg), 
323
323
    identifier(identifier_arg) 
324
324
  { }
333
333
  Utility method which hides some of the details of getTableDefinition()
334
334
*/
335
335
bool plugin::StorageEngine::doesTableExist(Session &session,
336
 
                                           const identifier::Table &identifier,
 
336
                                           const TableIdentifier &identifier,
337
337
                                           bool include_temporary_tables)
338
338
{
339
339
  if (include_temporary_tables)
354
354
  return true;
355
355
}
356
356
 
357
 
bool plugin::StorageEngine::doDoesTableExist(Session&, const drizzled::identifier::Table&)
 
357
bool plugin::StorageEngine::doDoesTableExist(Session&, const drizzled::TableIdentifier&)
358
358
{
359
359
  std::cerr << " Engine was called for doDoesTableExist() and does not implement it: " << this->getName() << "\n";
360
360
  assert(0);
367
367
  or any dropped tables that need to be removed from disk
368
368
*/
369
369
int StorageEngine::getTableDefinition(Session& session,
370
 
                                      const identifier::Table &identifier,
 
370
                                      const TableIdentifier &identifier,
371
371
                                      message::table::shared_ptr &table_message,
372
372
                                      bool include_temporary_tables)
373
373
{
374
 
  drizzled::error_t err= static_cast<drizzled::error_t>(ENOENT);
 
374
  int err= ENOENT;
375
375
 
376
376
  if (include_temporary_tables)
377
377
  {
378
378
    Table *table= session.find_temporary_table(identifier);
379
379
    if (table)
380
380
    {
381
 
      table_message.reset(new message::Table(*table->getShare()->getTableMessage()));
 
381
      table_message.reset(new message::Table(*table->getShare()->getTableProto()));
382
382
      return EEXIST;
383
383
    }
384
384
  }
405
405
  return err;
406
406
}
407
407
 
408
 
message::table::shared_ptr StorageEngine::getTableMessage(Session& session,
409
 
                                                          identifier::Table::const_reference identifier,
410
 
                                                          drizzled::error_t &error,
411
 
                                                          bool include_temporary_tables)
412
 
{
413
 
  error= static_cast<drizzled::error_t>(ENOENT);
414
 
 
415
 
  if (include_temporary_tables)
416
 
  {
417
 
    Table *table= session.find_temporary_table(identifier);
418
 
    if (table)
419
 
    {
420
 
      error= EE_OK;
421
 
      return message::table::shared_ptr(new message::Table(*table->getShare()->getTableMessage()));
422
 
    }
423
 
  }
424
 
 
425
 
  drizzled::message::table::shared_ptr table_ptr;
426
 
  if ((table_ptr= drizzled::message::Cache::singleton().find(identifier)))
427
 
  {
428
 
    (void)table_ptr;
429
 
  }
430
 
 
431
 
  message::Table message;
432
 
  EngineVector::iterator iter=
433
 
    std::find_if(vector_of_engines.begin(), vector_of_engines.end(),
434
 
                 StorageEngineGetTableDefinition(session, identifier, message, error));
435
 
 
436
 
  if (iter == vector_of_engines.end())
437
 
  {
438
 
    error= static_cast<drizzled::error_t>(ENOENT);
439
 
    return message::table::shared_ptr();
440
 
  }
441
 
  message::table::shared_ptr table_message(new message::Table(message));
442
 
 
443
 
  drizzled::message::Cache::singleton().insert(identifier, table_message);
444
 
 
445
 
  return table_message;
446
 
}
447
 
 
448
408
/**
449
409
  An interceptor to hijack the text of the error message without
450
410
  setting an error in the thread. We need the text to present it
455
415
{
456
416
public:
457
417
  Ha_delete_table_error_handler() : Internal_error_handler() {}
458
 
  virtual bool handle_error(drizzled::error_t sql_errno,
 
418
  virtual bool handle_error(uint32_t sql_errno,
459
419
                            const char *message,
460
420
                            DRIZZLE_ERROR::enum_warning_level level,
461
421
                            Session *session);
465
425
 
466
426
bool
467
427
Ha_delete_table_error_handler::
468
 
handle_error(drizzled::error_t ,
 
428
handle_error(uint32_t ,
469
429
             const char *message,
470
430
             DRIZZLE_ERROR::enum_warning_level ,
471
431
             Session *)
475
435
  return true;
476
436
}
477
437
 
478
 
class DropTableByIdentifier: public std::unary_function<EngineVector::value_type, bool>
479
 
{
480
 
  Session::reference session;
481
 
  identifier::Table::const_reference identifier;
482
 
  drizzled::error_t &error;
483
 
 
484
 
public:
485
 
 
486
 
  DropTableByIdentifier(Session::reference session_arg,
487
 
                        identifier::Table::const_reference identifier_arg,
488
 
                        drizzled::error_t &error_arg) :
489
 
    session(session_arg),
490
 
    identifier(identifier_arg),
491
 
    error(error_arg)
492
 
  { }
493
 
 
494
 
  result_type operator() (argument_type engine)
495
 
  {
496
 
    if (not engine->doDoesTableExist(session, identifier))
497
 
      return false;
498
 
 
499
 
    int local_error= engine->doDropTable(session, identifier);
500
 
 
501
 
 
502
 
    if (not local_error)
503
 
      return true;
504
 
 
505
 
    switch (local_error)
506
 
    {
507
 
    case HA_ERR_NO_SUCH_TABLE:
508
 
    case ENOENT:
509
 
      error= static_cast<drizzled::error_t>(HA_ERR_NO_SUCH_TABLE);
510
 
      return false;
511
 
 
512
 
    default:
513
 
      error= static_cast<drizzled::error_t>(local_error);
514
 
      return true;
515
 
    }
516
 
  } 
517
 
};
518
 
 
519
 
 
520
 
bool StorageEngine::dropTable(Session::reference session,
521
 
                              identifier::Table::const_reference identifier,
522
 
                              drizzled::error_t &error)
523
 
{
524
 
  error= EE_OK;
525
 
 
526
 
  EngineVector::const_iterator iter= std::find_if(vector_of_engines.begin(), vector_of_engines.end(),
527
 
                                                  DropTableByIdentifier(session, identifier, error));
528
 
 
529
 
  if (error)
530
 
  {
531
 
    return false;
532
 
  }
533
 
  else if (iter == vector_of_engines.end())
534
 
  {
535
 
    error= ER_BAD_TABLE_ERROR;
536
 
    return false;
537
 
  }
538
 
 
539
 
  drizzled::message::Cache::singleton().erase(identifier);
540
 
 
541
 
  return true;
542
 
}
543
 
 
544
 
bool StorageEngine::dropTable(Session& session,
545
 
                              const identifier::Table &identifier)
546
 
{
547
 
  drizzled::error_t error;
548
 
 
549
 
  if (not dropTable(session, identifier, error))
550
 
  {
551
 
    return false;
552
 
  }
553
 
 
554
 
  return true;
555
 
}
556
 
 
557
 
bool StorageEngine::dropTable(Session::reference session,
558
 
                              StorageEngine &engine,
559
 
                              identifier::Table::const_reference identifier,
560
 
                              drizzled::error_t &error)
561
 
{
562
 
  error= EE_OK;
 
438
/**
 
439
   returns ENOENT if the file doesn't exists.
 
440
*/
 
441
int StorageEngine::dropTable(Session& session,
 
442
                             const TableIdentifier &identifier)
 
443
{
 
444
  int error= 0;
 
445
  int error_proto;
 
446
  message::table::shared_ptr src_proto;
 
447
  StorageEngine *engine;
 
448
 
 
449
  error_proto= StorageEngine::getTableDefinition(session, identifier, src_proto);
 
450
 
 
451
  if (error_proto == ER_CORRUPT_TABLE_DEFINITION)
 
452
  {
 
453
    std::string error_message;
 
454
    identifier.getSQLPath(error_message);
 
455
 
 
456
    my_error(ER_CORRUPT_TABLE_DEFINITION, MYF(0),
 
457
             error_message.c_str(),
 
458
             src_proto->InitializationErrorString().c_str());
 
459
 
 
460
    return ER_CORRUPT_TABLE_DEFINITION;
 
461
  }
 
462
 
 
463
  if (src_proto)
 
464
    engine= StorageEngine::findByName(session, src_proto->engine().name());
 
465
  else
 
466
    engine= StorageEngine::findByName(session, "");
 
467
 
 
468
  if (not engine)
 
469
  {
 
470
    std::string error_message;
 
471
    identifier.getSQLPath(error_message);
 
472
 
 
473
    my_error(ER_CORRUPT_TABLE_DEFINITION, MYF(0), error_message.c_str(), "");
 
474
 
 
475
    return ER_CORRUPT_TABLE_DEFINITION;
 
476
  }
 
477
 
 
478
  error= StorageEngine::dropTable(session, *engine, identifier);
 
479
 
 
480
  if (error_proto && error == 0)
 
481
    return 0;
 
482
 
 
483
  return error;
 
484
}
 
485
 
 
486
int StorageEngine::dropTable(Session& session,
 
487
                             StorageEngine &engine,
 
488
                             const TableIdentifier &identifier)
 
489
{
 
490
  int error;
 
491
 
563
492
  engine.setTransactionReadWrite(session);
564
 
 
565
 
  assert(identifier.isTmp());
566
493
  
567
494
  if (unlikely(plugin::EventObserver::beforeDropTable(session, identifier)))
568
495
  {
570
497
  }
571
498
  else
572
499
  {
573
 
    error= static_cast<drizzled::error_t>(engine.doDropTable(session, identifier));
574
 
 
 
500
    error= engine.doDropTable(session, identifier);
575
501
    if (unlikely(plugin::EventObserver::afterDropTable(session, identifier, error)))
576
502
    {
577
503
      error= ER_EVENT_OBSERVER_PLUGIN;
580
506
 
581
507
  drizzled::message::Cache::singleton().erase(identifier);
582
508
 
583
 
  if (error)
584
 
  {
585
 
    return false;
586
 
  }
587
 
 
588
 
  return true;
 
509
  return error;
589
510
}
590
511
 
591
512
 
597
518
  @retval
598
519
   1  error
599
520
*/
600
 
bool StorageEngine::createTable(Session &session,
601
 
                                const identifier::Table &identifier,
602
 
                                message::Table& table_message)
 
521
int StorageEngine::createTable(Session &session,
 
522
                               const TableIdentifier &identifier,
 
523
                               message::Table& table_message)
603
524
{
604
 
  drizzled::error_t error= EE_OK;
605
 
 
 
525
  int error= 1;
606
526
  TableShare share(identifier);
607
527
  table::Shell table(share);
608
528
  message::Table tmp_proto;
610
530
  if (share.parse_table_proto(session, table_message) || share.open_table_from_share(&session, identifier, "", 0, 0, table))
611
531
  { 
612
532
    // @note Error occured, we should probably do a little more here.
613
 
    // ER_CORRUPT_TABLE_DEFINITION,ER_CORRUPT_TABLE_DEFINITION_ENUM 
614
 
    
615
 
    my_error(ER_CORRUPT_TABLE_DEFINITION_UNKNOWN, identifier);
616
 
 
617
 
    return false;
618
533
  }
619
534
  else
620
535
  {
633
548
    {
634
549
      share.storage_engine->setTransactionReadWrite(session);
635
550
 
636
 
      error= static_cast<drizzled::error_t>(share.storage_engine->doCreateTable(session,
637
 
                                                                                table,
638
 
                                                                                identifier,
639
 
                                                                                table_message));
 
551
      error= share.storage_engine->doCreateTable(session,
 
552
                                                 table,
 
553
                                                 identifier,
 
554
                                                 table_message);
640
555
    }
641
556
 
642
 
    if (error == ER_TABLE_PERMISSION_DENIED)
643
 
    {
644
 
      my_error(ER_TABLE_PERMISSION_DENIED, identifier);
645
 
    }
646
 
    else if (error)
 
557
    if (error)
647
558
    {
648
559
      std::string path;
649
560
      identifier.getSQLPath(path);
653
564
    table.delete_table();
654
565
  }
655
566
 
656
 
  return(error == EE_OK);
 
567
  return(error != 0);
657
568
}
658
569
 
659
570
Cursor *StorageEngine::getCursor(Table &arg)
665
576
  public std::unary_function<StorageEngine *, void>
666
577
{
667
578
  CachedDirectory &directory;
668
 
  const identifier::Schema &identifier;
669
 
  identifier::Table::vector &set_of_identifiers;
 
579
  const SchemaIdentifier &identifier;
 
580
  TableIdentifier::vector &set_of_identifiers;
670
581
 
671
582
public:
672
583
 
673
 
  AddTableIdentifier(CachedDirectory &directory_arg, const identifier::Schema &identifier_arg, identifier::Table::vector &of_names) :
 
584
  AddTableIdentifier(CachedDirectory &directory_arg, const SchemaIdentifier &identifier_arg, TableIdentifier::vector &of_names) :
674
585
    directory(directory_arg),
675
586
    identifier(identifier_arg),
676
587
    set_of_identifiers(of_names)
684
595
};
685
596
 
686
597
 
687
 
void StorageEngine::getIdentifiers(Session &session, const identifier::Schema &schema_identifier, identifier::Table::vector &set_of_identifiers)
 
598
void StorageEngine::getIdentifiers(Session &session, const SchemaIdentifier &schema_identifier, TableIdentifier::vector &set_of_identifiers)
688
599
{
 
600
  static SchemaIdentifier INFORMATION_SCHEMA_IDENTIFIER("information_schema");
 
601
  static SchemaIdentifier DATA_DICTIONARY_IDENTIFIER("data_dictionary");
 
602
 
689
603
  CachedDirectory directory(schema_identifier.getPath(), set_of_table_definition_ext);
690
604
 
691
605
  if (schema_identifier == INFORMATION_SCHEMA_IDENTIFIER)
718
632
  session.doGetTableIdentifiers(directory, schema_identifier, set_of_identifiers);
719
633
}
720
634
 
721
 
class DropTable: public std::unary_function<identifier::Table&, bool>
 
635
class DropTable: public std::unary_function<TableIdentifier&, bool>
722
636
{
723
637
  Session &session;
724
638
  StorageEngine *engine;
736
650
  } 
737
651
};
738
652
 
739
 
/* This will later be converted to identifier::Tables */
 
653
/* This will later be converted to TableIdentifiers */
740
654
class DropTables: public std::unary_function<StorageEngine *, void>
741
655
{
742
656
  Session &session;
743
 
  identifier::Table::vector &table_identifiers;
 
657
  TableIdentifier::vector &table_identifiers;
744
658
 
745
659
public:
746
660
 
747
 
  DropTables(Session &session_arg, identifier::Table::vector &table_identifiers_arg) :
 
661
  DropTables(Session &session_arg, TableIdentifier::vector &table_identifiers_arg) :
748
662
    session(session_arg),
749
663
    table_identifiers(table_identifiers_arg)
750
664
  { }
768
682
void StorageEngine::removeLostTemporaryTables(Session &session, const char *directory)
769
683
{
770
684
  CachedDirectory dir(directory, set_of_table_definition_ext);
771
 
  identifier::Table::vector table_identifiers;
 
685
  TableIdentifier::vector table_identifiers;
772
686
 
773
687
  if (dir.fail())
774
688
  {
797
711
    message::Table definition;
798
712
    if (StorageEngine::readTableFile(path, definition))
799
713
    {
800
 
      identifier::Table identifier(definition.schema(), definition.name(), path);
 
714
      TableIdentifier identifier(definition.schema(), definition.name(), path);
801
715
      table_identifiers.push_back(identifier);
802
716
    }
803
717
  }
847
761
    - table->getShare()->path
848
762
    - table->alias
849
763
*/
850
 
void StorageEngine::print_error(int error, myf errflag, const Table &table) const
 
764
void StorageEngine::print_error(int error, myf errflag, Table &table)
 
765
{
 
766
  print_error(error, errflag, &table);
 
767
}
 
768
 
 
769
void StorageEngine::print_error(int error, myf errflag, Table *table)
851
770
{
852
771
  drizzled::error_t textno= ER_GET_ERRNO;
853
772
  switch (error) {
870
789
    break;
871
790
  case HA_ERR_FOUND_DUPP_KEY:
872
791
  {
873
 
    uint32_t key_nr= table.get_dup_key(error);
 
792
    assert(table);
 
793
    uint32_t key_nr= table->get_dup_key(error);
874
794
    if ((int) key_nr >= 0)
875
795
    {
876
796
      const char *err_msg= ER(ER_DUP_ENTRY_WITH_KEY_NAME);
877
797
 
878
 
      print_keydup_error(key_nr, err_msg, table);
 
798
      print_keydup_error(key_nr, err_msg, *table);
879
799
 
880
800
      return;
881
801
    }
884
804
  }
885
805
  case HA_ERR_FOREIGN_DUPLICATE_KEY:
886
806
  {
887
 
    uint32_t key_nr= table.get_dup_key(error);
 
807
    assert(table);
 
808
    uint32_t key_nr= table->get_dup_key(error);
888
809
    if ((int) key_nr >= 0)
889
810
    {
890
811
      uint32_t max_length;
894
815
      String str(key,sizeof(key),system_charset_info);
895
816
 
896
817
      /* Table is opened and defined at this point */
897
 
      key_unpack(&str, &table,(uint32_t) key_nr);
 
818
      key_unpack(&str,table,(uint32_t) key_nr);
898
819
      max_length= (DRIZZLE_ERRMSG_SIZE-
899
820
                   (uint32_t) strlen(ER(ER_FOREIGN_DUPLICATE_KEY)));
900
821
      if (str.length() >= max_length)
902
823
        str.length(max_length-4);
903
824
        str.append(STRING_WITH_LEN("..."));
904
825
      }
905
 
      my_error(ER_FOREIGN_DUPLICATE_KEY, MYF(0), table.getShare()->getTableName(),
 
826
      my_error(ER_FOREIGN_DUPLICATE_KEY, MYF(0), table->getShare()->getTableName(),
906
827
        str.c_ptr(), key_nr+1);
907
828
      return;
908
829
    }
979
900
    textno=ER_TABLE_DEF_CHANGED;
980
901
    break;
981
902
  case HA_ERR_NO_SUCH_TABLE:
982
 
    {
983
 
      identifier::Table identifier(table.getShare()->getSchemaName(), table.getShare()->getTableName());
984
 
      my_error(ER_TABLE_UNKNOWN, identifier);
985
 
      return;
986
 
    }
 
903
    assert(table);
 
904
    my_error(ER_NO_SUCH_TABLE, MYF(0), table->getShare()->getSchemaName(),
 
905
             table->getShare()->getTableName());
 
906
    return;
987
907
  case HA_ERR_RBR_LOGGING_FAILED:
988
908
    textno= ER_BINLOG_ROW_LOGGING_FAILED;
989
909
    break;
990
910
  case HA_ERR_DROP_INDEX_FK:
991
911
  {
 
912
    assert(table);
992
913
    const char *ptr= "???";
993
 
    uint32_t key_nr= table.get_dup_key(error);
 
914
    uint32_t key_nr= table->get_dup_key(error);
994
915
    if ((int) key_nr >= 0)
995
 
      ptr= table.key_info[key_nr].name;
 
916
      ptr= table->key_info[key_nr].name;
996
917
    my_error(ER_DROP_INDEX_FK, MYF(0), ptr);
997
918
    return;
998
919
  }
1037
958
      return;
1038
959
    }
1039
960
  }
1040
 
 
1041
 
  my_error(textno, errflag, table.getShare()->getTableName(), error);
 
961
  my_error(textno, errflag, table->getShare()->getTableName(), error);
1042
962
}
1043
963
 
1044
964
 
1051
971
  @return
1052
972
    Returns true if this is a temporary error
1053
973
*/
1054
 
bool StorageEngine::get_error_message(int , String* ) const
 
974
bool StorageEngine::get_error_message(int , String* )
1055
975
{
1056
976
  return false;
1057
977
}
1058
978
 
1059
979
 
1060
 
void StorageEngine::print_keydup_error(uint32_t key_nr, const char *msg, const Table &table) const
 
980
void StorageEngine::print_keydup_error(uint32_t key_nr, const char *msg, Table &table)
1061
981
{
1062
982
  /* Write the duplicated key in the error message */
1063
983
  char key[MAX_KEY_LENGTH];
1085
1005
}
1086
1006
 
1087
1007
 
1088
 
int StorageEngine::deleteDefinitionFromPath(const identifier::Table &identifier)
 
1008
int StorageEngine::deleteDefinitionFromPath(const TableIdentifier &identifier)
1089
1009
{
1090
1010
  std::string path(identifier.getPath());
1091
1011
 
1094
1014
  return internal::my_delete(path.c_str(), MYF(0));
1095
1015
}
1096
1016
 
1097
 
int StorageEngine::renameDefinitionFromPath(const identifier::Table &dest, const identifier::Table &src)
 
1017
int StorageEngine::renameDefinitionFromPath(const TableIdentifier &dest, const TableIdentifier &src)
1098
1018
{
1099
1019
  message::Table table_message;
1100
1020
  std::string src_path(src.getPath());
1123
1043
  return error;
1124
1044
}
1125
1045
 
1126
 
int StorageEngine::writeDefinitionFromPath(const identifier::Table &identifier, message::Table &table_message)
 
1046
int StorageEngine::writeDefinitionFromPath(const TableIdentifier &identifier, message::Table &table_message)
1127
1047
{
1128
1048
  char definition_file_tmp[FN_REFLEN];
1129
1049
  std::string file_name(identifier.getPath());
1202
1122
 
1203
1123
class CanCreateTable: public std::unary_function<StorageEngine *, bool>
1204
1124
{
1205
 
  const identifier::Table &identifier;
 
1125
  const TableIdentifier &identifier;
1206
1126
 
1207
1127
public:
1208
 
  CanCreateTable(const identifier::Table &identifier_arg) :
 
1128
  CanCreateTable(const TableIdentifier &identifier_arg) :
1209
1129
    identifier(identifier_arg)
1210
1130
  { }
1211
1131
 
1219
1139
/**
1220
1140
  @note on success table can be created.
1221
1141
*/
1222
 
bool StorageEngine::canCreateTable(const identifier::Table &identifier)
 
1142
bool StorageEngine::canCreateTable(const TableIdentifier &identifier)
1223
1143
{
1224
1144
  EngineVector::iterator iter=
1225
1145
    std::find_if(vector_of_engines.begin(), vector_of_engines.end(),