~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-07-30 20:31:19 UTC
  • mto: This revision was merged to the branch mainline in revision 1679.
  • Revision ID: brian@gaz-20100730203119-89g2ye4zwnvcacxg
First pass in encapsulating row

Show diffs side-by-side

added added

removed removed

Lines of Context:
2456
2456
                doStartIndexScan(TS(table)->next_number_index, 0);
2457
2457
                if (!TS(table)->next_number_key_offset) {
2458
2458
                        // Autoincrement at key-start
2459
 
                        err = index_last(table->record[1]);
 
2459
                        err = index_last(table->getUpdateRecord());
2460
2460
                        if (!err && !table->next_number_field->is_null(TS(table)->rec_buff_length)) {
2461
2461
                                /* {PRE-INC} */
2462
2462
                                nr = (xtWord8) table->next_number_field->val_int_offset(TS(table)->rec_buff_length);
2469
2469
                         */
2470
2470
                        xtWord8 val;
2471
2471
 
2472
 
                        err = index_first(table->record[1]);
 
2472
                        err = index_first(table->getUpdateRecord());
2473
2473
                        while (!err) {
2474
2474
                                /* {PRE-INC} */
2475
2475
                                val = (xtWord8) table->next_number_field->val_int_offset(TS(table)->rec_buff_length);
2476
2476
                                if (val > nr)
2477
2477
                                        nr = val;
2478
 
                                err = index_next(table->record[1]);
 
2478
                                err = index_next(table->getUpdateRecord());
2479
2479
                        }
2480
2480
                }
2481
2481
 
2676
2676
                        pb_import_row_count++;
2677
2677
        }
2678
2678
 
2679
 
        if (table->next_number_field && buf == table->record[0]) {
 
2679
        if (table->next_number_field && buf == table->getInsertRecord()) {
2680
2680
                int update_err = update_auto_increment();
2681
2681
                if (update_err) {
2682
2682
                        ha_log_pbxt_thread_error_for_mysql(pb_ignore_dup_key);
2799
2799
         * update t1 set a=2 where a=1;
2800
2800
         * insert into t1 (val) values (1);
2801
2801
         */
2802
 
        if (table->found_next_number_field && new_data == table->record[0]) {
 
2802
        if (table->found_next_number_field && new_data == table->getInsertRecord()) {
2803
2803
                MX_LONGLONG_T   nr;
2804
2804
                my_bitmap_map   *old_map;
2805
2805
 
3553
3553
         *
3554
3554
     * if (!table->file->inited)
3555
3555
     *    table->file->startIndexScan(tab->index, tab->sorted);
3556
 
     *  if ((error=tab->table->file->index_first(tab->table->record[0])))
 
3556
     *  if ((error=tab->table->file->index_first(tab->table->getInsertRecord())))
3557
3557
         */
3558
3558
        if (active_index == MAX_KEY) {
3559
3559
                err = HA_ERR_WRONG_INDEX;