~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_select.cc

Replace macros around unireg.h, store_record,restore_record,cmp_record,empty_record

Show diffs side-by-side

added added

removed removed

Lines of Context:
10589
10589
  if (table)
10590
10590
  {
10591
10591
    table->file->extra(HA_EXTRA_WRITE_CACHE);
10592
 
    empty_record(table);
 
10592
    table->emptyRecord();
10593
10593
    if (table->group && join->tmp_table_param.sum_func_count &&
10594
10594
        table->s->keys && !table->file->inited)
10595
10595
      table->file->ha_index_init(0, 0);
11154
11154
    join_tab->found= 1;
11155
11155
    join_tab->not_null_compl= 0;
11156
11156
    /* The outer row is complemented by nulls for each inner tables */
11157
 
    restore_record(join_tab->table,s->default_values);  // Make empty record
 
11157
    join_tab->table->restoreRecordAsDefault();  // Make empty record
11158
11158
    join_tab->table->mark_as_null_row();       // For group by without error
11159
11159
    select_cond= join_tab->select_cond;
11160
11160
    /* Check all attached conditions for inner table rows. */
11382
11382
      if (error != HA_ERR_END_OF_FILE)
11383
11383
        return table->report_error(error);
11384
11384
      tab->table->mark_as_null_row();
11385
 
      empty_record(table);                      // Make empty record
 
11385
      table->emptyRecord();                     // Make empty record
11386
11386
      return -1;
11387
11387
    }
11388
11388
    update_virtual_fields_marked_for_write(table);
11389
 
    store_record(table,record[1]);
 
11389
    table->storeRecord();
11390
11390
  }
11391
11391
  else if (!table->status)                      // Only happens with left join
11392
 
    restore_record(table,record[1]);                    // restore old record
 
11392
    table->restoreRecord();                     // restore old record
11393
11393
  table->null_row=0;
11394
11394
  return table->status ? -1 : 0;
11395
11395
}
11429
11429
    {
11430
11430
      table->status= STATUS_NOT_FOUND;
11431
11431
      tab->table->mark_as_null_row();
11432
 
      empty_record(table);
 
11432
      table->emptyRecord();
11433
11433
      if (error != HA_ERR_KEY_NOT_FOUND && error != HA_ERR_END_OF_FILE)
11434
11434
        return table->report_error(error);
11435
11435
      return -1;
11436
11436
    }
11437
11437
    update_virtual_fields_marked_for_write(table);
11438
 
    store_record(table,record[1]);
 
11438
    table->storeRecord();
11439
11439
  }
11440
11440
  else if (!(table->status & ~STATUS_NULL_ROW)) // Only happens with left join
11441
11441
  {
11442
11442
    table->status=0;
11443
 
    restore_record(table,record[1]);                    // restore old record
 
11443
    table->restoreRecord();                     // restore old record
11444
11444
  }
11445
11445
  table->null_row=0;
11446
11446
  return table->status ? -1 : 0;
12115
12115
                                   HA_WHOLE_KEY,
12116
12116
                                   HA_READ_KEY_EXACT))
12117
12117
  {                                             /* Update old record */
12118
 
    restore_record(table,record[1]);
 
12118
    table->restoreRecord();
12119
12119
    update_tmptable_sum_func(join->sum_funcs,table);
12120
12120
    if ((error=table->file->ha_update_row(table->record[1],
12121
12121
                                          table->record[0])))
12192
12192
      table->file->print_error(error,MYF(0));   /* purecov: inspected */
12193
12193
      return(NESTED_LOOP_ERROR);            /* purecov: inspected */
12194
12194
    }
12195
 
    restore_record(table,record[1]);
 
12195
    table->restoreRecord();
12196
12196
    update_tmptable_sum_func(join->sum_funcs,table);
12197
12197
    if ((error=table->file->ha_update_row(table->record[1],
12198
12198
                                          table->record[0])))