mirror of
https://github.com/MariaDB/server.git
synced 2025-01-17 04:22:27 +01:00
Fix for bug#7915: crash,JOIN VIEW, subquery, SELECT .. FROM INFORMATION_SCHEMA.COLUMNS
This commit is contained in:
parent
0a96ef4c90
commit
638dc7d9e9
3 changed files with 23 additions and 0 deletions
|
@ -604,3 +604,9 @@ Variable_name Value
|
|||
show global status like "Threads_running";
|
||||
Variable_name Value
|
||||
Threads_running 1
|
||||
create table t1(f1 int);
|
||||
create table t2(f2 int);
|
||||
create view v1 as select * from t1, t2;
|
||||
set @got_val= (select count(*) from information_schema.columns);
|
||||
drop view v1;
|
||||
drop table t1, t2;
|
||||
|
|
|
@ -352,3 +352,14 @@ show variables where variable_name like "skip_show_databas";
|
|||
# Bug #7981:SHOW GLOBAL STATUS crashes server
|
||||
#
|
||||
show global status like "Threads_running";
|
||||
|
||||
#
|
||||
# Bug #7915 crash,JOIN VIEW, subquery,
|
||||
# SELECT .. FROM INFORMATION_SCHEMA.COLUMNS
|
||||
#
|
||||
create table t1(f1 int);
|
||||
create table t2(f2 int);
|
||||
create view v1 as select * from t1, t2;
|
||||
set @got_val= (select count(*) from information_schema.columns);
|
||||
drop view v1;
|
||||
drop table t1, t2;
|
||||
|
|
|
@ -1733,6 +1733,12 @@ bool st_lex::can_not_use_merged()
|
|||
{
|
||||
case SQLCOM_CREATE_VIEW:
|
||||
case SQLCOM_SHOW_CREATE:
|
||||
/*
|
||||
SQLCOM_SHOW_FIELDS is necessary to make
|
||||
information schema tables working correctly with views.
|
||||
see get_schema_tables_result function
|
||||
*/
|
||||
case SQLCOM_SHOW_FIELDS:
|
||||
return TRUE;
|
||||
default:
|
||||
return FALSE;
|
||||
|
|
Loading…
Reference in a new issue