mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
privent crash on temporary table during indexes lookup (BUG#4677)
mysql-test/r/view.result: check 'use index' on view with temporary table mysql-test/t/view.test: check 'use index' on view with temporary table sql/sql_base.cc: privent crash on temporary table
This commit is contained in:
@ -977,3 +977,9 @@ ERROR HY000: View 'test.v1' references invalid table(s) or column(s)
|
||||
drop view v1;
|
||||
create view v1 (a,a) as select 'a','a';
|
||||
ERROR 42S21: Duplicate column name 'a'
|
||||
create table t1 (a int, b int);
|
||||
create view v1 as select a, sum(b) from t1 group by a;
|
||||
select b from v1 use index (some_index) where b=1;
|
||||
ERROR 42000: Key column 'some_index' doesn't exist in table
|
||||
drop view v1;
|
||||
drop table t1;
|
||||
|
@ -900,3 +900,13 @@ drop view v1;
|
||||
#
|
||||
-- error 1060
|
||||
create view v1 (a,a) as select 'a','a';
|
||||
|
||||
#
|
||||
# check 'use index' on view with temporary table
|
||||
#
|
||||
create table t1 (a int, b int);
|
||||
create view v1 as select a, sum(b) from t1 group by a;
|
||||
-- error 1072
|
||||
select b from v1 use index (some_index) where b=1;
|
||||
drop view v1;
|
||||
drop table t1;
|
||||
|
Reference in New Issue
Block a user