Commit 04ea656d authored by unknown's avatar unknown

sql_cache.cc:

  After merge fix


sql/sql_cache.cc:
  After merge fix
parent 4fc48f31
...@@ -977,18 +977,6 @@ Query_cache::send_result_to_client(THD *thd, char *sql, uint query_length) ...@@ -977,18 +977,6 @@ Query_cache::send_result_to_client(THD *thd, char *sql, uint query_length)
goto err; goto err;
} }
/*
Test if the query is a SELECT
(pre-space is removed in dispatch_command).
First '/' looks like comment before command it is not
frequently appeared in real lihe, consequently we can
check all such queries, too.
*/
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') &&
sql[0] != '/')
{ {
uint i= 0; uint i= 0;
/* /*
...@@ -998,13 +986,19 @@ Query_cache::send_result_to_client(THD *thd, char *sql, uint query_length) ...@@ -998,13 +986,19 @@ Query_cache::send_result_to_client(THD *thd, char *sql, uint query_length)
while (sql[i]=='(') while (sql[i]=='(')
i++; i++;
/* /*
Test if the query is a SELECT Test if the query is a SELECT
(pre-space is removed in dispatch_command) (pre-space is removed in dispatch_command).
First '/' looks like comment before command it is not
frequently appeared in real lihe, consequently we can
check all such queries, too.
*/ */
if (my_toupper(system_charset_info, sql[i]) != 'S' || if ((my_toupper(system_charset_info, sql[i]) != 'S' ||
my_toupper(system_charset_info, sql[i + 1]) != 'E' || my_toupper(system_charset_info, sql[i + 1]) != 'E' ||
my_toupper(system_charset_info, sql[i + 2]) != 'L') my_toupper(system_charset_info, sql[i + 2]) != 'L') &&
sql[0] != '/')
{ {
DBUG_PRINT("qcache", ("The statement is not a SELECT; Not cached")); DBUG_PRINT("qcache", ("The statement is not a SELECT; Not cached"));
goto err; goto err;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment