~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to sql/opt_range.cc

  • Committer: Brian Aker
  • Date: 2008-07-08 16:17:31 UTC
  • Revision ID: brian@tangent.org-20080708161731-io36j7igglok79py
DATE cleanup.

Show diffs side-by-side

added added

removed removed

Lines of Context:
4568
4568
  /* For comparison purposes allow invalid dates like 2000-01-32 */
4569
4569
  orig_sql_mode= field->table->in_use->variables.sql_mode;
4570
4570
  if (value->real_item()->type() == Item::STRING_ITEM &&
4571
 
      (field->type() == MYSQL_TYPE_DATE ||
 
4571
      (field->type() == MYSQL_TYPE_NEWDATE ||
4572
4572
       field->type() == MYSQL_TYPE_DATETIME))
4573
4573
    field->table->in_use->variables.sql_mode|= MODE_INVALID_DATES;
4574
4574
  err= value->save_in_field_no_warnings(field, 1);
4591
4591
          for the cases like int_field > 999999999999999999999999 as well.
4592
4592
        */
4593
4593
        tree= 0;
4594
 
        if (err == 3 && field->type() == FIELD_TYPE_DATE &&
 
4594
        if (err == 3 && field->type() == FIELD_TYPE_NEWDATE &&
4595
4595
            (type == Item_func::GT_FUNC || type == Item_func::GE_FUNC ||
4596
4596
             type == Item_func::LT_FUNC || type == Item_func::LE_FUNC) )
4597
4597
        {