summaryrefslogtreecommitdiff
path: root/mysql-test/r
diff options
context:
space:
mode:
authorMarc Alff <marc.alff@sun.com>2009-11-02 09:31:00 -0700
committerMarc Alff <marc.alff@sun.com>2009-11-02 09:31:00 -0700
commit587a696a82402dc246acfb0e41d40016c2c30ef8 (patch)
tree7a6bb218b937aaeaab0ee4794a23a8bea1bb2529 /mysql-test/r
parente1be32db5a9c1aaf3e193e9443b9af1742b67bac (diff)
downloadmariadb-git-587a696a82402dc246acfb0e41d40016c2c30ef8.tar.gz
Bug#9801 Views: imperfect error message
Backport for 5.5 The root cause of this bug is that the grammar for GROUP BY clauses, when using WITH CUBE or WITH ROLLUP, cause conflicts with the grammar for VIEW, when using WITH CHECK OPTION. The solution is to implement two token look ahead when parsing a WITH token, to disambiguate the non standard WITH CUBE and WITH ROLLUP syntaxes. Patch based on code from Marc Alff and Antony Curtis
Diffstat (limited to 'mysql-test/r')
-rw-r--r--mysql-test/r/fulltext.result2
-rw-r--r--mysql-test/r/view.result13
2 files changed, 14 insertions, 1 deletions
diff --git a/mysql-test/r/fulltext.result b/mysql-test/r/fulltext.result
index abab18e0e99..40f408b0fc8 100644
--- a/mysql-test/r/fulltext.result
+++ b/mysql-test/r/fulltext.result
@@ -49,7 +49,7 @@ a b
Full-text indexes are called collections
Only MyISAM tables support collections
select * from t1 where MATCH(a,b) AGAINST ("indexes" IN BOOLEAN MODE WITH QUERY EXPANSION);
-ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WITH QUERY EXPANSION)' at line 1
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'QUERY EXPANSION)' at line 1
explain select * from t1 where MATCH(a,b) AGAINST ("collections");
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 fulltext a a 0 1 Using where
diff --git a/mysql-test/r/view.result b/mysql-test/r/view.result
index 69bcf349f51..f9156d4ae70 100644
--- a/mysql-test/r/view.result
+++ b/mysql-test/r/view.result
@@ -3958,3 +3958,16 @@ DROP TABLE t1;
# -----------------------------------------------------------------
# -- End of 5.1 tests.
# -----------------------------------------------------------------
+drop table if exists t_9801;
+drop view if exists v_9801;
+create table t_9801 (s1 int);
+create view v_9801 as
+select sum(s1) from t_9801 with check option;
+ERROR HY000: CHECK OPTION on non-updatable view 'test.v_9801'
+create view v_9801 as
+select sum(s1) from t_9801 group by s1 with check option;
+ERROR HY000: CHECK OPTION on non-updatable view 'test.v_9801'
+create view v_9801 as
+select sum(s1) from t_9801 group by s1 with rollup with check option;
+ERROR HY000: CHECK OPTION on non-updatable view 'test.v_9801'
+drop table t_9801;