diff options
author | Georgi Kodinov <joro@sun.com> | 2009-10-16 13:29:42 +0300 |
---|---|---|
committer | Georgi Kodinov <joro@sun.com> | 2009-10-16 13:29:42 +0300 |
commit | 7b4ef910f7830e85e2bc240b0803b994d6e0446b (patch) | |
tree | 4a635fd50a6abdd9b0c814cb889d2996fc60eb3e /sql/sql_udf.cc | |
parent | d7cc9194e0d657fb475cf14a3463a976d336b63a (diff) | |
download | mariadb-git-7b4ef910f7830e85e2bc240b0803b994d6e0446b.tar.gz |
Bug #40877: multi statement execution fails in 5.1.30
Implemented the server infrastructure for the fix:
1. Added a function LEX_STRING *thd_query_string(THD) to return
a LEX_STRING structure instead of char *.
This is the function that must be called in innodb instead of
thd_query()
2. Did some encapsulation in THD : aggregated thd_query and
thd_query_length into a LEX_STRING and made accessor and mutator
methods for easy code updating.
3. Updated the server code to use the new methods where applicable.
Diffstat (limited to 'sql/sql_udf.cc')
-rw-r--r-- | sql/sql_udf.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sql/sql_udf.cc b/sql/sql_udf.cc index c60dac42fb8..c6b41b59a3f 100644 --- a/sql/sql_udf.cc +++ b/sql/sql_udf.cc @@ -506,7 +506,7 @@ int mysql_create_function(THD *thd,udf_func *udf) rw_unlock(&THR_LOCK_udf); /* Binlog the create function. */ - write_bin_log(thd, TRUE, thd->query, thd->query_length); + write_bin_log(thd, TRUE, thd->query(), thd->query_length()); DBUG_RETURN(0); @@ -581,7 +581,7 @@ int mysql_drop_function(THD *thd,const LEX_STRING *udf_name) rw_unlock(&THR_LOCK_udf); /* Binlog the drop function. */ - write_bin_log(thd, TRUE, thd->query, thd->query_length); + write_bin_log(thd, TRUE, thd->query(), thd->query_length()); DBUG_RETURN(0); err: |