requre BASE TABLE for HANDLER (BUG#5277)
mysql-test/r/view.result: HANDLER with VIEW mysql-test/t/view.test: HANDLER with VIEW sql/sql_handler.cc: requre BASE TABLE for HANDLER
This commit is contained in:
parent
fcbd2485e3
commit
6e0b468f18
@ -1270,3 +1270,9 @@ s1
|
||||
7
|
||||
drop view v1;
|
||||
drop table t1;
|
||||
create table t1 (s1 int);
|
||||
create view v1 as select * from t1;
|
||||
handler v1 open as xx;
|
||||
ERROR HY000: 'test.v1' is not BASE TABLE
|
||||
drop view v1;
|
||||
drop table t1;
|
||||
|
@ -1230,3 +1230,13 @@ insert into v1 values (1) on duplicate key update s1 = 7;
|
||||
select * from t1;
|
||||
drop view v1;
|
||||
drop table t1;
|
||||
|
||||
#
|
||||
# HANDLER with VIEW
|
||||
#
|
||||
create table t1 (s1 int);
|
||||
create view v1 as select * from t1;
|
||||
-- error 1346
|
||||
handler v1 open as xx;
|
||||
drop view v1;
|
||||
drop table t1;
|
||||
|
@ -51,7 +51,11 @@ int mysql_ha_open(THD *thd, TABLE_LIST *tables)
|
||||
{
|
||||
HANDLER_TABLES_HACK(thd);
|
||||
uint counter;
|
||||
|
||||
/* for now HANDLER can be used only for real TABLES */
|
||||
tables->required_type= FRMTYPE_TABLE;
|
||||
int err=open_tables(thd, tables, &counter);
|
||||
|
||||
HANDLER_TABLES_HACK(thd);
|
||||
if (err)
|
||||
return -1;
|
||||
|
Loading…
x
Reference in New Issue
Block a user