~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/pbxt/src/ha_pbxt.cc

  • Committer: Brian Aker
  • Date: 2010-10-10 02:00:34 UTC
  • mfrom: (1830.1.5 trunk-drizzle)
  • Revision ID: brian@tangent.org-20101010020034-d67x3d09fssxq1v6
Merge rollup of utf8 and table encapsulation.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2385
2385
                table->next_number_field = table->found_next_number_field;
2386
2386
 
2387
2387
                extra(HA_EXTRA_KEYREAD);
2388
 
                table->mark_columns_used_by_index_no_reset(TS(table)->next_number_index, *table->read_set);
 
2388
                table->mark_columns_used_by_index_no_reset(table->getShare()->next_number_index, *table->read_set);
2389
2389
                column_bitmaps_signal();
2390
 
                doStartIndexScan(TS(table)->next_number_index, 0);
2391
 
                if (!TS(table)->next_number_key_offset) {
 
2390
                doStartIndexScan(table->getShare()->next_number_index, 0);
 
2391
                if (!table->getShare()->next_number_key_offset) {
2392
2392
                        // Autoincrement at key-start
2393
2393
                        err = index_last(table->getUpdateRecord());
2394
 
                        if (!err && !table->next_number_field->is_null(TS(table)->rec_buff_length)) {
 
2394
                        if (!err && !table->next_number_field->is_null(table->getShare()->rec_buff_length)) {
2395
2395
                                /* {PRE-INC} */
2396
 
                                nr = (xtWord8) table->next_number_field->val_int_offset(TS(table)->rec_buff_length);
 
2396
                                nr = (xtWord8) table->next_number_field->val_int_offset(table->getShare()->rec_buff_length);
2397
2397
                        }
2398
2398
                }
2399
2399
                else {
2406
2406
                        err = index_first(table->getUpdateRecord());
2407
2407
                        while (!err) {
2408
2408
                                /* {PRE-INC} */
2409
 
                                val = (xtWord8) table->next_number_field->val_int_offset(TS(table)->rec_buff_length);
 
2409
                                val = (xtWord8) table->next_number_field->val_int_offset(table->getShare()->rec_buff_length);
2410
2410
                                if (val > nr)
2411
2411
                                        nr = val;
2412
2412
                                err = index_next(table->getUpdateRecord());
5612
5612
        try_(a) {
5613
5613
                xt_ha_open_database_of_table(self, (XTPathStrPtr) table_path);
5614
5614
 
5615
 
                for (uint i=0; i<table_arg.s->keys; i++) {
 
5615
                for (uint i=0; i<table_arg.getShare()->keys; i++) {
5616
5616
                        if (table_arg.key_info[i].key_length > XT_INDEX_MAX_KEY_SIZE)
5617
5617
                                xt_throw_sulxterr(XT_CONTEXT, XT_ERR_KEY_TOO_LARGE, table_arg.key_info[i].name, (u_long) XT_INDEX_MAX_KEY_SIZE);
5618
5618
                }
5629
5629
 
5630
5630
                StorageEngine::writeDefinitionFromPath(ident, proto);
5631
5631
 
5632
 
                tab_def = xt_ri_create_table(self, true, (XTPathStrPtr) table_path, const_cast<char *>(thd->getQueryString().c_str()), myxt_create_table_from_table(self, table_arg.s), &source_dic);
 
5632
                tab_def = xt_ri_create_table(self, true, (XTPathStrPtr) table_path, const_cast<char *>(thd->getQueryString().c_str()), myxt_create_table_from_table(self, table_arg.getMutableShare()), &source_dic);
5633
5633
                tab_def->checkForeignKeys(self, proto.type() == message::Table::TEMPORARY);
5634
5634
 
5635
5635
                dic.dic_table = tab_def;
5636
 
                dic.dic_my_table = table_arg.s;
 
5636
                dic.dic_my_table = table_arg.getMutableShare();
5637
5637
                dic.dic_tab_flags = source_dic.dic_tab_flags;
5638
5638
                //if (create_info.storage_media == HA_SM_MEMORY)
5639
5639
                //      dic.dic_tab_flags |= XT_TF_MEMORY_TABLE;