~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_update.cc

  • Committer: Brian Aker
  • Date: 2009-12-01 02:39:03 UTC
  • mfrom: (1234.1.4 push)
  • Revision ID: brian@gaz-20091201023903-1id5z7xnup695jaq
Merge of Brian + Jay test fixes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
56
56
    If storage engine does always read all columns, we have the value alraedy.
57
57
  */
58
58
  if ((error != HA_ERR_FOUND_DUPP_KEY) ||
59
 
      !(table->cursor->ha_table_flags() & HA_PARTIAL_COLUMN_READ))
 
59
      !(table->cursor->getEngine()->check_flag(HTON_BIT_PARTIAL_COLUMN_READ)))
60
60
    return;
61
61
 
62
62
  /*
199
199
    update force the table handler to retrieve write-only fields to be able
200
200
    to compare records and detect data change.
201
201
  */
202
 
  if (table->cursor->ha_table_flags() & HA_PARTIAL_COLUMN_READ &&
 
202
  if (table->cursor->getEngine()->check_flag(HTON_BIT_PARTIAL_COLUMN_READ) &&
203
203
      table->timestamp_field &&
204
204
      (table->timestamp_field_type == TIMESTAMP_AUTO_SET_ON_UPDATE ||
205
205
       table->timestamp_field_type == TIMESTAMP_AUTO_SET_ON_BOTH))
429
429
    Assure that we can use position()
430
430
    if we need to create an error message.
431
431
  */
432
 
  if (table->cursor->ha_table_flags() & HA_PARTIAL_COLUMN_READ)
 
432
  if (table->cursor->getEngine()->check_flag(HTON_BIT_PARTIAL_COLUMN_READ))
433
433
    table->prepare_for_position();
434
434
 
435
435
  /*
437
437
    the table handler is returning all columns OR if
438
438
    if all updated columns are read
439
439
  */
440
 
  can_compare_record= (!(table->cursor->ha_table_flags() &
441
 
                         HA_PARTIAL_COLUMN_READ) ||
 
440
  can_compare_record= (!(table->cursor->getEngine()->check_flag(HTON_BIT_PARTIAL_COLUMN_READ)) ||
442
441
                       bitmap_is_subset(table->write_set, table->read_set));
443
442
 
444
443
  while (!(error=info.read_record(&info)) && !session->killed)