mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Fix for bug #9796 "Query Cache caches queries with CURRENT_USER()
function". We should not cache queries using CURRENT_USER() function as we do it for some other functions, e.g. USER() function.
This commit is contained in:
@ -297,6 +297,7 @@ Item *create_func_current_user()
|
||||
char buff[HOSTNAME_LENGTH+USERNAME_LENGTH+2];
|
||||
uint length;
|
||||
|
||||
thd->safe_to_cache_query= 0;
|
||||
length= (uint) (strxmov(buff, thd->priv_user, "@", thd->priv_host, NullS) -
|
||||
buff);
|
||||
return new Item_string(NullS, thd->memdup(buff, length), length);
|
||||
|
Reference in New Issue
Block a user