diff options
author | unknown <anozdrin/alik@station.> | 2007-10-11 17:11:12 +0400 |
---|---|---|
committer | unknown <anozdrin/alik@station.> | 2007-10-11 17:11:12 +0400 |
commit | 3ca34c102a363d41ce7ee7de2a15de288654e967 (patch) | |
tree | 0fe0c93ca75967b614fb1aaa1b624feb63405102 /sql/sql_class.cc | |
parent | 27e2f30e05e89a4926f5b03661168d572e7153da (diff) | |
download | mariadb-git-3ca34c102a363d41ce7ee7de2a15de288654e967.tar.gz |
A patch for BUG#31418: User locks misfunctioning after
mysql_change_user().
The problem was that THD::ull was not reset in THD::cleanup().
The fix is to reset it.
sql/sql_class.cc:
Reset THD::ull after cleanup to prevent memory corruption.
tests/mysql_client_test.c:
Add test case for BUG#31418.
Diffstat (limited to 'sql/sql_class.cc')
-rw-r--r-- | sql/sql_class.cc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sql/sql_class.cc b/sql/sql_class.cc index 490aedad0ef..09c8a79c15e 100644 --- a/sql/sql_class.cc +++ b/sql/sql_class.cc @@ -698,6 +698,7 @@ void THD::cleanup(void) pthread_mutex_lock(&LOCK_user_locks); item_user_lock_release(ull); pthread_mutex_unlock(&LOCK_user_locks); + ull= NULL; } cleanup_done=1; |