diff options
Diffstat (limited to 'mysql-test/main/query_cache.test')
-rw-r--r-- | mysql-test/main/query_cache.test | 27 |
1 files changed, 13 insertions, 14 deletions
diff --git a/mysql-test/main/query_cache.test b/mysql-test/main/query_cache.test index 1b1e24bc6f4..389aa0de2fa 100644 --- a/mysql-test/main/query_cache.test +++ b/mysql-test/main/query_cache.test @@ -1534,22 +1534,21 @@ SET GLOBAL query_cache_size= default; # CREATE TABLE t1( a INT ); ---error ER_PARSE_ERROR +--error ER_CANT_USE_OPTION_HERE SET @v = ( SELECT SQL_CACHE 1 ); ---error ER_PARSE_ERROR +--error ER_CANT_USE_OPTION_HERE SET @v = ( SELECT SQL_NO_CACHE 1 ); # -# Keywords 'SQL_CACHE' and 'SQL_NO_CACHE' are allowed as column names. -# Hence the error messages are not intuitive. +# Keywords 'SQL_CACHE' and 'SQL_NO_CACHE'. # ---error ER_BAD_FIELD_ERROR +--error ER_CANT_USE_OPTION_HERE SELECT a FROM t1 WHERE a IN ( SELECT SQL_CACHE a FROM t1 ); ---error ER_BAD_FIELD_ERROR +--error ER_CANT_USE_OPTION_HERE SELECT a FROM t1 WHERE a IN ( SELECT SQL_NO_CACHE a FROM t1 ); ---error ER_BAD_FIELD_ERROR +--error ER_CANT_USE_OPTION_HERE SELECT ( SELECT SQL_CACHE a FROM t1 ); ---error ER_BAD_FIELD_ERROR +--error ER_CANT_USE_OPTION_HERE SELECT ( SELECT SQL_NO_CACHE a FROM t1 ); SELECT SQL_CACHE * FROM t1; @@ -1560,16 +1559,16 @@ SELECT SQL_NO_CACHE * FROM t1; SELECT * FROM t1 UNION SELECT SQL_CACHE * FROM t1; --error ER_CANT_USE_OPTION_HERE SELECT * FROM t1 UNION SELECT SQL_NO_CACHE * FROM t1; ---error ER_BAD_FIELD_ERROR +--error ER_CANT_USE_OPTION_HERE SELECT * FROM t1 WHERE a IN (SELECT SQL_CACHE a FROM t1); ---error ER_BAD_FIELD_ERROR +--error ER_CANT_USE_OPTION_HERE SELECT * FROM t1 WHERE a IN (SELECT a FROM t1 UNION SELECT SQL_CACHE a FROM t1); --error ER_CANT_USE_OPTION_HERE SELECT * FROM t1 UNION SELECT SQL_NO_CACHE * FROM t1; ---error ER_BAD_FIELD_ERROR +--error ER_CANT_USE_OPTION_HERE SELECT * FROM t1 WHERE a IN (SELECT SQL_NO_CACHE a FROM t1); ---error ER_BAD_FIELD_ERROR +--error ER_CANT_USE_OPTION_HERE SELECT * FROM t1 WHERE a IN (SELECT a FROM t1 UNION SELECT SQL_NO_CACHE a FROM t1); --error ER_WRONG_USAGE @@ -1584,10 +1583,10 @@ SELECT SQL_CACHE * FROM t1 UNION SELECT SQL_NO_CACHE * FROM t1; SELECT SQL_NO_CACHE * FROM t1 UNION SELECT SQL_CACHE * FROM t1; --error ER_CANT_USE_OPTION_HERE SELECT SQL_NO_CACHE * FROM t1 UNION SELECT SQL_NO_CACHE * FROM t1; ---error ER_BAD_FIELD_ERROR +--error ER_CANT_USE_OPTION_HERE SELECT SQL_CACHE * FROM t1 WHERE a IN (SELECT SQL_NO_CACHE a FROM t1); ---error ER_BAD_FIELD_ERROR +--error ER_CANT_USE_OPTION_HERE SELECT SQL_CACHE * FROM t1 WHERE a IN (SELECT a FROM t1 UNION SELECT SQL_NO_CACHE a FROM t1); |