From b3e368df195fdaefa3d33fd279fe6e1e7414b054 Mon Sep 17 00:00:00 2001 From: "tnurnberg@mysql.com" <> Date: Mon, 3 Jul 2006 21:41:15 +0200 Subject: [PATCH] Bug#20783: Valgrind uninitialised warning in test case ctype_uca Two functions have different ideas of what a string should look like; one of them reads memory it assumes the other one may have written. And "if you assume ..." We now use a more defensive variety of the assuming function, this fixes a warning thrown by the valgrind tool. --- sql/item_cmpfunc.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc index ffacddd534a..98453899375 100644 --- a/sql/item_cmpfunc.cc +++ b/sql/item_cmpfunc.cc @@ -3303,7 +3303,7 @@ longlong Item_func_regex::val_int() } } null_value=0; - return my_regexec(&preg,res->c_ptr(),0,(my_regmatch_t*) 0,0) ? 0 : 1; + return my_regexec(&preg,res->c_ptr_safe(),0,(my_regmatch_t*) 0,0) ? 0 : 1; }