~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/myisam/ha_myisam.cc

  • Committer: Brian Aker
  • Date: 2009-06-05 18:49:23 UTC
  • mfrom: (1039.3.19 handler-cleanup)
  • Revision ID: brian@gaz-20090605184923-36mbxlsxkocuco1w
Merge Stewart, fix LOCK (it was dead, only for dead RENAME SCHEMA code), and
fixed Sun Studio failure.

Show diffs side-by-side

added added

removed removed

Lines of Context:
60
60
** MyISAM tables
61
61
*****************************************************************************/
62
62
 
 
63
static const char *ha_myisam_exts[] = {
 
64
  ".MYI",
 
65
  ".MYD",
 
66
  NULL
 
67
};
 
68
 
63
69
class MyisamEngine : public StorageEngine
64
70
{
65
71
public:
71
77
  {
72
78
    return new (mem_root) ha_myisam(this, table);
73
79
  }
 
80
 
 
81
  const char **bas_ext() const {
 
82
    return ha_myisam_exts;
 
83
  }
 
84
 
 
85
  int createTableImpl(Session *, const char *table_name,
 
86
                      Table *table_arg, HA_CREATE_INFO *ha_create_info);
 
87
 
 
88
  int renameTableImpl(Session*, const char *from, const char *to);
 
89
 
 
90
  int deleteTableImpl(Session*, const string table_name);
74
91
};
75
92
 
76
93
// collect errors printed by mi_check routines
506
523
  return new_handler;
507
524
}
508
525
 
509
 
 
510
 
static const char *ha_myisam_exts[] = {
511
 
  ".MYI",
512
 
  ".MYD",
513
 
  NULL
514
 
};
515
 
 
516
 
const char **ha_myisam::bas_ext() const
517
 
{
518
 
  return ha_myisam_exts;
519
 
}
520
 
 
521
 
 
522
526
const char *ha_myisam::index_type(uint32_t )
523
527
{
524
528
  return "BTREE";
1601
1605
  return mi_delete_all_rows(file);
1602
1606
}
1603
1607
 
1604
 
int ha_myisam::delete_table(const char *name)
 
1608
int MyisamEngine::deleteTableImpl(Session*, const string table_name)
1605
1609
{
1606
 
  return mi_delete_table(name);
 
1610
  return mi_delete_table(table_name.c_str());
1607
1611
}
1608
1612
 
1609
1613
 
1638
1642
}
1639
1643
 
1640
1644
 
1641
 
int ha_myisam::create(const char *name, register Table *table_arg,
1642
 
                      HA_CREATE_INFO *ha_create_info)
 
1645
int MyisamEngine::createTableImpl(Session *, const char *table_name,
 
1646
                                  Table *table_arg,
 
1647
                                  HA_CREATE_INFO *ha_create_info)
1643
1648
{
1644
1649
  int error;
1645
1650
  uint32_t create_flags= 0, create_records;
1676
1681
    create_flags|= HA_CREATE_DELAY_KEY_WRITE;
1677
1682
 
1678
1683
  /* TODO: Check that the following fn_format is really needed */
1679
 
  error= mi_create(fn_format(buff, name, "", "",
 
1684
  error= mi_create(fn_format(buff, table_name, "", "",
1680
1685
                             MY_UNPACK_FILENAME|MY_APPEND_EXT),
1681
1686
                   share->keys, keydef,
1682
1687
                   create_records, recinfo,
1687
1692
}
1688
1693
 
1689
1694
 
1690
 
int ha_myisam::rename_table(const char * from, const char * to)
 
1695
int MyisamEngine::renameTableImpl(Session*, const char *from, const char *to)
1691
1696
{
1692
1697
  return mi_rename(from,to);
1693
1698
}