summaryrefslogtreecommitdiff
path: root/sql/item_cmpfunc.cc
diff options
context:
space:
mode:
authorunknown <monty@mysql.com>2005-01-12 03:38:53 +0200
committerunknown <monty@mysql.com>2005-01-12 03:38:53 +0200
commit24a0275722914643a1a6498310bc5a04cea44a3b (patch)
tree6a8b1b01636a63430471b9c070075ba6ecaf9379 /sql/item_cmpfunc.cc
parent0b7895b9b14981926c34fbd833aed0d9235da68a (diff)
downloadmariadb-git-24a0275722914643a1a6498310bc5a04cea44a3b.tar.gz
Fixed memory reference errors found by valgrind
sql/ha_federated.cc: Change mode to -rw-rw-r-- myisam/mi_create.c: Ensure that all referenced memory is reset mysql-test/r/type_timestamp.result: More tests mysql-test/t/func_compress.test: Added comment mysql-test/t/type_timestamp.test: More tests sql/field.h: Count number of varchars in table sql/item_cmpfunc.cc: Safety fix (to avoid warning from valgrind) sql/opt_range.cc: Simple optimzation sql/sql_acl.cc: Safety fix (to avoid warning from valgrind) sql/sql_parse.cc: Safety fix for prepared statements sql/sql_show.cc: Move variable declarations first in function Remove hidden variable (it) Remove accessing freed memory (table_list->table_name) sql/sql_update.cc: Compare records with varchars correctly sql/table.cc: Safety fix when running with purify/valgrind Fix wrong memory reference in case of errors sql/table.h: Added counting of varchar fields strings/ctype-mb.c: Fill max_str properly
Diffstat (limited to 'sql/item_cmpfunc.cc')
-rw-r--r--sql/item_cmpfunc.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc
index aa98f1860b6..16a3e86e519 100644
--- a/sql/item_cmpfunc.cc
+++ b/sql/item_cmpfunc.cc
@@ -2519,7 +2519,7 @@ longlong Item_func_regex::val_int()
regfree(&preg);
regex_compiled=0;
}
- if (regcomp(&preg,res2->c_ptr(),
+ if (regcomp(&preg,res2->c_ptr_safe(),
((cmp_collation.collation->state &
(MY_CS_BINSORT | MY_CS_CSSORT)) ?
REG_EXTENDED | REG_NOSUB :