~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/table.cc

  • Committer: Brian Aker
  • Date: 2009-04-28 21:46:57 UTC
  • mto: This revision was merged to the branch mainline in revision 1001.
  • Revision ID: brian@gaz-20090428214657-8vxn7n9dc6epb3zy
Renamed TABLE_SHARE to TableShare

Show diffs side-by-side

added added

removed removed

Lines of Context:
51
51
 
52
52
/* Functions defined in this file */
53
53
 
54
 
void open_table_error(TABLE_SHARE *share, int error, int db_errno,
 
54
void open_table_error(TableShare *share, int error, int db_errno,
55
55
                      myf errortype, int errarg);
56
56
static void fix_type_pointers(const char ***array, TYPELIB *point_to_type,
57
57
                              uint32_t types, char **names);
114
114
 
115
115
 
116
116
/*
117
 
  Allocate a setup TABLE_SHARE structure
 
117
  Allocate a setup TableShare structure
118
118
 
119
119
  SYNOPSIS
120
120
    alloc_table_share()
127
127
    #  Share
128
128
*/
129
129
 
130
 
TABLE_SHARE *alloc_table_share(TableList *table_list, char *key,
 
130
TableShare *alloc_table_share(TableList *table_list, char *key,
131
131
                               uint32_t key_length)
132
132
{
133
133
  MEM_ROOT mem_root;
134
 
  TABLE_SHARE *share;
 
134
  TableShare *share;
135
135
  char *key_buff, *path_buff;
136
136
  char path[FN_REFLEN];
137
137
  uint32_t path_length;
188
188
    use key_length= 0 as neither table_cache_key or key_length will be used).
189
189
*/
190
190
 
191
 
void init_tmp_table_share(TABLE_SHARE *share, const char *key,
 
191
void init_tmp_table_share(TableShare *share, const char *key,
192
192
                          uint32_t key_length, const char *table_name,
193
193
                          const char *path)
194
194
{
222
222
    share->mutex must be locked when we come here if it's not a temp table
223
223
*/
224
224
 
225
 
void free_table_share(TABLE_SHARE *share)
 
225
void free_table_share(TableShare *share)
226
226
{
227
227
  MEM_ROOT mem_root;
228
228
  assert(share->ref_count == 0);
366
366
  return default_item;
367
367
}
368
368
 
369
 
int parse_table_proto(Session *session, drizzled::message::Table &table, TABLE_SHARE *share)
 
369
int parse_table_proto(Session *session, drizzled::message::Table &table, TableShare *share)
370
370
{
371
371
  int error= 0;
372
372
  handler *handler_file= NULL;
1344
1344
   6    Unknown .frm version
1345
1345
*/
1346
1346
 
1347
 
int open_table_def(Session *session, TABLE_SHARE *share, uint32_t)
 
1347
int open_table_def(Session *session, TableShare *share, uint32_t)
1348
1348
{
1349
1349
  int error;
1350
1350
  bool error_given;
1396
1396
 
1397
1397
 
1398
1398
/*
1399
 
  Open a table based on a TABLE_SHARE
 
1399
  Open a table based on a TableShare
1400
1400
 
1401
1401
  SYNOPSIS
1402
1402
    open_table_from_share()
1423
1423
   7    Table definition has changed in engine
1424
1424
*/
1425
1425
 
1426
 
int open_table_from_share(Session *session, TABLE_SHARE *share, const char *alias,
 
1426
int open_table_from_share(Session *session, TableShare *share, const char *alias,
1427
1427
                          uint32_t db_stat, uint32_t prgflag, uint32_t ha_open_flags,
1428
1428
                          Table *outparam, open_table_mode open_mode)
1429
1429
{
1849
1849
 
1850
1850
        /* error message when opening a form file */
1851
1851
 
1852
 
void open_table_error(TABLE_SHARE *share, int error, int db_errno, int errarg)
 
1852
void open_table_error(TableShare *share, int error, int db_errno, int errarg)
1853
1853
{
1854
1854
  int err_no;
1855
1855
  char buff[FN_REFLEN];
3318
3318
{
3319
3319
  MEM_ROOT *mem_root_save, own_root;
3320
3320
  Table *table;
3321
 
  TABLE_SHARE *share;
 
3321
  TableShare *share;
3322
3322
  uint  i,field_count,null_count,null_pack_length;
3323
3323
  uint32_t  copy_func_count= param->func_count;
3324
3324
  uint32_t  hidden_null_count, hidden_null_pack_length, hidden_field_count;
4017
4017
  uint32_t *blob_field;
4018
4018
  unsigned char *bitmaps;
4019
4019
  Table *table;
4020
 
  TABLE_SHARE *share;
 
4020
  TableShare *share;
4021
4021
 
4022
4022
  if (!multi_alloc_root(session->mem_root,
4023
4023
                        &table, sizeof(*table),
4164
4164
  int error;
4165
4165
  MI_KEYDEF keydef;
4166
4166
  MI_UNIQUEDEF uniquedef;
4167
 
  TABLE_SHARE *share= s;
 
4167
  TableShare *share= s;
4168
4168
 
4169
4169
  if (share->keys)
4170
4170
  {                                             // Get keys for ni_create
4309
4309
                             int error, bool ignore_last_dupp_key_error)
4310
4310
{
4311
4311
  Table new_table;
4312
 
  TABLE_SHARE share;
 
4312
  TableShare share;
4313
4313
  const char *save_proc_info;
4314
4314
  int write_err;
4315
4315