summaryrefslogtreecommitdiff
path: root/sql/set_var.h
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2015-02-27 20:13:51 +0100
committerSergei Golubchik <serg@mariadb.org>2015-02-28 19:48:22 +0100
commitba80708f66fca32c7c2fbc66879177e5590e53fb (patch)
tree65dded9078148beac96f20bf5b833e2de231b306 /sql/set_var.h
parent7951bb16565e84a87d5289fa3eb4450bdf50ab96 (diff)
downloadmariadb-git-ba80708f66fca32c7c2fbc66879177e5590e53fb.tar.gz
MDEV-6960 Server crashes in check_alter_user on setting a default role via PS
There were two issues: * set_var_default_role::user was overwritten with a new value, allocated in the thd->mem_root, which is reset between executions. That was causing the crash. Solved by introducing set_var_default_role::real_user * when privilege tables were opened on EXECUTE, the reprepare_observer would abort the statement (as privilege tables are opened using the local TABLE_LIST that doesn't preserve metadata from PREPARE, so reprepare_observer thought they're changed). This issue also applied to SET PASSWORD. Solved by disabling reprepare_observer.
Diffstat (limited to 'sql/set_var.h')
-rw-r--r--sql/set_var.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/set_var.h b/sql/set_var.h
index 66d1bc4e983..15c89f1e2b4 100644
--- a/sql/set_var.h
+++ b/sql/set_var.h
@@ -344,7 +344,7 @@ public:
class set_var_default_role: public set_var_base
{
- LEX_USER *user;
+ LEX_USER *user, *real_user;
LEX_STRING role;
public:
set_var_default_role(LEX_USER *user_arg, LEX_STRING role_arg) :