summaryrefslogtreecommitdiff
path: root/sql/item_func.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/item_func.cc')
-rw-r--r--sql/item_func.cc20
1 files changed, 19 insertions, 1 deletions
diff --git a/sql/item_func.cc b/sql/item_func.cc
index 9c29280970b..d275dbaa50d 100644
--- a/sql/item_func.cc
+++ b/sql/item_func.cc
@@ -1765,7 +1765,7 @@ static void calc_hash_for_unique(ulong &nr1, ulong &nr2, String *str)
cs->coll->hash_sort(cs, (uchar *)str->ptr(), str->length(), &nr1, &nr2);
}
-longlong Item_func_hash::val_int()
+longlong Item_func_hash_mariadb_100403::val_int()
{
DBUG_EXECUTE_IF("same_long_unique_hash", return 9;);
unsigned_flag= true;
@@ -1786,6 +1786,24 @@ longlong Item_func_hash::val_int()
}
+longlong Item_func_hash::val_int()
+{
+ DBUG_EXECUTE_IF("same_long_unique_hash", return 9;);
+ unsigned_flag= true;
+ Hasher hasher;
+ for(uint i= 0;i<arg_count;i++)
+ {
+ if (args[i]->hash_not_null(&hasher))
+ {
+ null_value= 1;
+ return 0;
+ }
+ }
+ null_value= 0;
+ return (longlong) hasher.finalize();
+}
+
+
bool Item_func_hash::fix_length_and_dec()
{
decimals= 0;