summaryrefslogtreecommitdiff
path: root/sql/item_strfunc.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/item_strfunc.cc')
-rw-r--r--sql/item_strfunc.cc13
1 files changed, 13 insertions, 0 deletions
diff --git a/sql/item_strfunc.cc b/sql/item_strfunc.cc
index d4bf28a9c21..a29580b7a54 100644
--- a/sql/item_strfunc.cc
+++ b/sql/item_strfunc.cc
@@ -4387,6 +4387,19 @@ longlong Item_func_crc32::val_int()
return (longlong) my_checksum(0L, (uchar*)res->ptr(), res->length());
}
+longlong Item_func_crc32c::val_int()
+{
+ DBUG_ASSERT(fixed());
+ String *res=args[0]->val_str(&value);
+ if (!res)
+ {
+ null_value=1;
+ return 0; /* purecov: inspected */
+ }
+ null_value=0;
+ return my_crc32c(0, res->ptr(), res->length());
+}
+
#ifdef HAVE_COMPRESS
#include "zlib.h"