~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/item/cmpfunc.cc

  • Committer: Brian Aker
  • Date: 2010-12-22 08:40:40 UTC
  • mto: This revision was merged to the branch mainline in revision 2018.
  • Revision ID: brian@tangent.org-20101222084040-tr0s7t0l61clwzeo
Fix for 693309.

Show diffs side-by-side

added added

removed removed

Lines of Context:
463
463
      the call to save_in_field below overrides that value.
464
464
    */
465
465
    if (field_item->depended_from)
 
466
    {
466
467
      orig_field_val= field->val_int();
 
468
    }
 
469
 
467
470
    if (!(*item)->is_null() && !(*item)->save_in_field(field, 1))
468
471
    {
469
472
      Item *tmp= new Item_int_with_ref(field->val_int(), *item,
472
475
        session->change_item_tree(item, tmp);
473
476
      result= 1;                                        // Item was replaced
474
477
    }
 
478
 
475
479
    /* Restore the original field value. */
476
480
    if (field_item->depended_from)
477
481
    {
478
 
      result= field->store(orig_field_val, true);
 
482
      result= field->store(orig_field_val, field->isUnsigned());
479
483
      /* orig_field_val must be a valid value that can be restored back. */
480
484
      assert(!result);
481
485
    }