From b0283afb9c19033047d304eb0d31b29b971bf971 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 30 Jan 2008 17:35:25 +0100 Subject: [PATCH] Fixing return value. sql/item_cmpfunc.cc: Minor fix to return correct value in case of error. sql/rpl_utility.cc: Minor fix to return correct value in case of error. --- sql/item_cmpfunc.cc | 2 +- sql/rpl_utility.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc index bca00b08f78..c16500a2712 100644 --- a/sql/item_cmpfunc.cc +++ b/sql/item_cmpfunc.cc @@ -947,7 +947,7 @@ get_datetime_value(THD *thd, Item ***item_arg, Item **cache_arg, *is_null= item->null_value; } if (*is_null) - return ~(ulonglong) -1; + return ~(ulonglong) 0; /* Convert strings to the integer DATE/DATETIME representation. Even if both dates provided in strings we can't compare them directly as diff --git a/sql/rpl_utility.cc b/sql/rpl_utility.cc index b548550ef54..4f4083d9b8f 100644 --- a/sql/rpl_utility.cc +++ b/sql/rpl_utility.cc @@ -164,7 +164,7 @@ uint32 table_def::calc_field_size(uint col, uchar *master_data) const break; } default: - length= ~(uint32) -1; + length= ~(uint32) 0; } return length; }