diff options
author | unknown <hf@deer.(none)> | 2004-01-07 21:30:15 +0400 |
---|---|---|
committer | unknown <hf@deer.(none)> | 2004-01-07 21:30:15 +0400 |
commit | 582886a3e971df2766411cdfe57c8a09f3c2e6b6 (patch) | |
tree | d20819ba4aaa9081734e46a63958402010176176 /sql | |
parent | 902c361910cdec368c5baec1be6079978a46f1a8 (diff) | |
download | mariadb-git-582886a3e971df2766411cdfe57c8a09f3c2e6b6.tar.gz |
Fix for 1224 (USER() CURRENT_USER() functions in embedded library)
Now we return user@host for USER() in embedded library
CURRENT_USER returns empty string if library compiled with
NO_EMBEDDED_ACCESS_CHECKS
libmysqld/embedded_priv.h:
function's declarations trimmed
libmysqld/lib_sql.cc:
user/host names handling added
libmysqld/libmysqld.c:
user/host names handling added
sql/sql_class.cc:
we shouldn't free user/host names in embedded library
Diffstat (limited to 'sql')
-rw-r--r-- | sql/sql_class.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sql/sql_class.cc b/sql/sql_class.cc index 60220ffc889..89b812eb205 100644 --- a/sql/sql_class.cc +++ b/sql/sql_class.cc @@ -323,12 +323,14 @@ THD::~THD() #endif DBUG_PRINT("info", ("freeing host")); +#ifndef EMBEDDED_LIBRARY if (host != my_localhost) // If not pointer to constant safeFree(host); if (user != delayed_user) safeFree(user); - safeFree(db); safeFree(ip); +#endif + safeFree(db); free_root(&warn_root,MYF(0)); free_root(&transaction.mem_root,MYF(0)); mysys_var=0; // Safety (shouldn't be needed) |