mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Fix for bug#12905 show fields from view behaving erratically with current database
use saved view db name in case of view
This commit is contained in:
@ -979,3 +979,14 @@ WHERE TABLE_SCHEMA='test' AND TABLE_TYPE='BASE TABLE');
|
||||
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
|
||||
t1 MyISAM 10 Fixed 0 0 0 # 1024 0 NULL # # NULL latin1_swedish_ci NULL
|
||||
t2 MyISAM 10 Fixed 0 0 0 # 1024 0 NULL # # NULL latin1_swedish_ci NULL
|
||||
DROP TABLE t1,t2;
|
||||
create table t1(f1 int);
|
||||
create view v1 (c) as select f1 from t1;
|
||||
select database();
|
||||
database()
|
||||
NULL
|
||||
show fields from test.v1;
|
||||
Field Type Null Key Default Extra
|
||||
c int(11) YES NULL
|
||||
drop view v1;
|
||||
drop table t1;
|
||||
|
@ -665,4 +665,16 @@ SHOW TABLE STATUS FROM test
|
||||
WHERE name IN ( SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES
|
||||
WHERE TABLE_SCHEMA='test' AND TABLE_TYPE='BASE TABLE');
|
||||
|
||||
DROP TABLE t1,t2
|
||||
DROP TABLE t1,t2;
|
||||
|
||||
#
|
||||
# Bug #12905 show fields from view behaving erratically with current database
|
||||
#
|
||||
create table t1(f1 int);
|
||||
create view v1 (c) as select f1 from t1;
|
||||
connect (con5,localhost,root,,*NO-ONE*);
|
||||
select database();
|
||||
show fields from test.v1;
|
||||
connection default;
|
||||
drop view v1;
|
||||
drop table t1;
|
||||
|
Reference in New Issue
Block a user