~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/item_cmpfunc.cc

  • Committer: Brian Aker
  • Date: 2008-08-18 20:57:01 UTC
  • mto: This revision was merged to the branch mainline in revision 352.
  • Revision ID: brian@tangent.org-20080818205701-rzeyd4qw4xj7wx7l
Refactoring of class Table

Show diffs side-by-side

added added

removed removed

Lines of Context:
386
386
 
387
387
  if (!(*item)->with_subselect && (*item)->const_item())
388
388
  {
389
 
    Table *table= field->table;
390
389
    ulong orig_sql_mode= thd->variables.sql_mode;
391
390
    enum_check_fields orig_count_cuted_fields= thd->count_cuted_fields;
392
 
    my_bitmap_map *old_write_map;
393
 
    my_bitmap_map *old_read_map;
394
391
    uint64_t orig_field_val= 0; /* original field value if valid */
395
392
 
396
 
    if (table)
397
 
    {
398
 
      old_write_map= dbug_tmp_use_all_columns(table, table->write_set);
399
 
      old_read_map= dbug_tmp_use_all_columns(table, table->read_set);
400
 
    }
401
393
    /* For comparison purposes allow invalid dates like 2000-01-32 */
402
394
    thd->variables.sql_mode= (orig_sql_mode & ~MODE_NO_ZERO_DATE) | 
403
395
                             MODE_INVALID_DATES;
426
418
    }
427
419
    thd->variables.sql_mode= orig_sql_mode;
428
420
    thd->count_cuted_fields= orig_count_cuted_fields;
429
 
    if (table)
430
 
    {
431
 
      dbug_tmp_restore_column_map(table->write_set, old_write_map);
432
 
      dbug_tmp_restore_column_map(table->read_set, old_read_map);
433
 
    }
434
421
  }
435
422
  return result;
436
423
}