1
0
mirror of https://github.com/MariaDB/server.git synced 2025-12-24 11:21:21 +03:00

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.
This commit is contained in:
unknown
2007-10-11 17:11:12 +04:00
parent 27e2f30e05
commit 3ca34c102a
2 changed files with 134 additions and 31 deletions

View File

@@ -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;