summaryrefslogtreecommitdiff
path: root/sql/sql_acl.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sql_acl.cc')
-rw-r--r--sql/sql_acl.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/sql/sql_acl.cc b/sql/sql_acl.cc
index 3f26bc2e08a..2accb3abc91 100644
--- a/sql/sql_acl.cc
+++ b/sql/sql_acl.cc
@@ -1067,7 +1067,12 @@ static bool fix_lex_user(THD *thd, LEX_USER *user)
make_scramble= my_make_scrambled_password;
}
+ Query_arena *arena, backup;
+ arena= thd->activate_stmt_arena_if_needed(&backup);
char *buff= (char *) thd->alloc(scramble_length + 1);
+ if (arena)
+ thd->restore_active_arena(arena, &backup);
+
if (buff == NULL)
return true;
make_scramble(buff, user->pwtext.str, user->pwtext.length);