1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

MDEV-11584: GRANT inside an SP does not work well on 2nd execution

Allocate password hash in statment memory
This commit is contained in:
Oleksandr Byelkin
2016-12-21 17:41:48 +01:00
parent 143d512a22
commit 100f721c0a
3 changed files with 25 additions and 0 deletions

View File

@ -1064,7 +1064,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);