mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
MDEV-10766: Queries which start with WITH clause do not get inserted into query cache
Added conditions so that the WITH queries are also added to the query cache
This commit is contained in:
@ -1828,7 +1828,10 @@ Query_cache::send_result_to_client(THD *thd, char *org_sql, uint query_length)
|
||||
}
|
||||
if ((my_toupper(system_charset_info, sql[0]) != 'S' ||
|
||||
my_toupper(system_charset_info, sql[1]) != 'E' ||
|
||||
my_toupper(system_charset_info, sql[2]) != 'L'))
|
||||
my_toupper(system_charset_info, sql[2]) != 'L') &&
|
||||
(my_toupper(system_charset_info, sql[0]) != 'W' ||
|
||||
my_toupper(system_charset_info, sql[1]) != 'I' ||
|
||||
my_toupper(system_charset_info, sql[2]) != 'T'))
|
||||
{
|
||||
DBUG_PRINT("qcache", ("The statement is not a SELECT; Not cached"));
|
||||
goto err;
|
||||
|
Reference in New Issue
Block a user