summaryrefslogtreecommitdiff
path: root/sql/sql_udf.cc
diff options
context:
space:
mode:
authorunknown <monty@mashka.mysql.fi>2002-12-05 03:40:33 +0200
committerunknown <monty@mashka.mysql.fi>2002-12-05 03:40:33 +0200
commit591b058518dcbc736398d64e8bfd1ac43099323e (patch)
treeacbe11728f20cce01476a8928088773d8016fe76 /sql/sql_udf.cc
parent7280bddb710be4ac1c7acc9f9f7daaa2eea850ff (diff)
downloadmariadb-git-591b058518dcbc736398d64e8bfd1ac43099323e.tar.gz
Removed copying of parameters as this leads to memory leaks in embedded server.
Fixed 'not initialized' memory error. mysql-test/mysql-test-run.sh: Updates to be able to more easily use --valgrind mysql-test/r/alter_table.result: Added missing drop table mysql-test/t/alter_table.test: Added missing drop table sql/field.cc: Simple optimizations sql/ha_innodb.cc: Remove copying of parameters as this leads to memory leaks in MySQL. Should be instead fixed by, in embedded server, make a temporary copy of all parameters and free them on server-end sql/log.cc: Simple optimization sql/mysql_priv.h: Move external reference to struct to include file sql/mysqld.cc: Added safety asserts sql/sql_class.cc: Fixed non fatal 'not initialized memory reference error' in thread init sql/sql_udf.cc: Clear current_thd for global thread strings/strto.c: Simple optimization
Diffstat (limited to 'sql/sql_udf.cc')
-rw-r--r--sql/sql_udf.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/sql/sql_udf.cc b/sql/sql_udf.cc
index 420ec67f0c5..937d1e52656 100644
--- a/sql/sql_udf.cc
+++ b/sql/sql_udf.cc
@@ -202,6 +202,8 @@ void udf_init()
new_thd->version--; // Force close to free memory
close_thread_tables(new_thd);
delete new_thd;
+ /* Remember that we don't have a THD */
+ my_pthread_setspecific_ptr(THR_THD, 0);
DBUG_VOID_RETURN;
}