1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

requre BASE TABLE for HANDLER (BUG#5277)

This commit is contained in:
bell@sanja.is.com.ua
2004-09-07 10:42:23 +03:00
parent 481e895494
commit 472de2636c
3 changed files with 20 additions and 0 deletions

View File

@ -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;

View File

@ -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;

View File

@ -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;