~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_update.cc

  • Committer: Brian Aker
  • Date: 2010-12-08 22:35:56 UTC
  • mfrom: (1819.9.158 update-innobase)
  • Revision ID: brian@tangent.org-20101208223556-37mi4omqg7lkjzf3
Merge in Stewart's changes, 1.3 changes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
136
136
  bool          using_limit= limit != HA_POS_ERROR;
137
137
  bool          used_key_is_modified;
138
138
  bool          transactional_table;
139
 
  bool          can_compare_record;
140
139
  int           error;
141
140
  uint          used_index= MAX_KEY, dup_key_found;
142
141
  bool          need_sort= true;
459
458
  if (table->cursor->getEngine()->check_flag(HTON_BIT_PARTIAL_COLUMN_READ))
460
459
    table->prepare_for_position();
461
460
 
462
 
  /*
463
 
    We can use compare_record() to optimize away updates if
464
 
    the table handler is returning all columns OR if
465
 
    if all updated columns are read
466
 
  */
467
 
  can_compare_record= (! (table->cursor->getEngine()->check_flag(HTON_BIT_PARTIAL_COLUMN_READ)) ||
468
 
                       table->write_set->is_subset_of(*table->read_set));
469
 
 
470
461
  while (not (error=info.read_record(&info)) && not session->getKilled())
471
462
  {
472
463
    if (not (select && select->skip_record()))
493
484
 
494
485
      found++;
495
486
 
496
 
      if (!can_compare_record || table->compare_record())
 
487
      if (! table->records_are_comparable() || table->compare_records())
497
488
      {
498
489
        /* Non-batched update */
499
490
        error= table->cursor->updateRecord(table->getUpdateRecord(),