mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
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
This commit is contained in:
@ -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;
|
||||
|
Reference in New Issue
Block a user