~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_insert.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:
350
350
  {
351
351
    if (fields.elements || !value_count)
352
352
    {
353
 
      restore_record(table,s->default_values);  // Get empty record
 
353
      table->restoreRecordAsDefault();  // Get empty record
354
354
      if (fill_record(session, fields, *values, 0))
355
355
      {
356
356
        if (values_list.elements != 1 && ! session->is_error())
370
370
    else
371
371
    {
372
372
      if (session->used_tables)                 // Column used in values()
373
 
        restore_record(table,s->default_values);        // Get empty record
 
373
        table->restoreRecordAsDefault();        // Get empty record
374
374
      else
375
375
      {
376
376
        /*
813
813
          an error is returned
814
814
        */
815
815
        assert(table->insert_values != NULL);
816
 
        store_record(table,insert_values);
817
 
        restore_record(table,record[1]);
 
816
        table->storeRecordAsInsert();
 
817
        table->restoreRecord();
818
818
        assert(info->update_fields->elements ==
819
819
                    info->update_values->elements);
820
820
        if (fill_record(session, *info->update_fields,
1184
1184
    */
1185
1185
    table->file->ha_start_bulk_insert((ha_rows) 0);
1186
1186
  }
1187
 
  restore_record(table,s->default_values);              // Get empty record
 
1187
  table->restoreRecordAsDefault();              // Get empty record
1188
1188
  table->next_number_field=table->found_next_number_field;
1189
1189
 
1190
1190
  session->cuted_fields=0;
1279
1279
        originally touched by INSERT ... SELECT, so we have to restore
1280
1280
        their original values for the next row.
1281
1281
      */
1282
 
      restore_record(table, s->default_values);
 
1282
      table->restoreRecordAsDefault();
1283
1283
    }
1284
1284
    if (table->next_number_field)
1285
1285
    {
1673
1673
  table->timestamp_field_type= TIMESTAMP_NO_AUTO_SET;
1674
1674
  table->next_number_field=table->found_next_number_field;
1675
1675
 
1676
 
  restore_record(table,s->default_values);      // Get empty record
 
1676
  table->restoreRecordAsDefault();      // Get empty record
1677
1677
  session->cuted_fields=0;
1678
1678
  if (info.ignore || info.handle_duplicates != DUP_ERROR)
1679
1679
    table->file->extra(HA_EXTRA_IGNORE_DUP_KEY);