Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0-opt

into  moonbone.local:/mnt/gentoo64/work/30020-bug-5.0-opt-mysql
This commit is contained in:
unknown 2007-07-28 21:39:03 +04:00
commit da2652884c
3 changed files with 31 additions and 1 deletions

View file

@ -3547,4 +3547,19 @@ a b
6 6
DROP VIEW v1;
DROP TABLE t1,t2,t3;
create table t1 (i int);
insert into t1 values (1), (2), (1), (3), (2), (4);
create view v1 as select distinct i from t1;
select * from v1;
i
1
2
3
4
select table_name, is_updatable from information_schema.views
where table_name = 'v1';
table_name is_updatable
v1 NO
drop view v1;
drop table t1;
End of 5.0 tests.

View file

@ -3402,5 +3402,18 @@ SELECT t.person_id AS a, t.person_id AS b FROM v1 t WHERE t.person_id=6;
DROP VIEW v1;
DROP TABLE t1,t2,t3;
#
# Bug#30020: Insufficient check led to a wrong info provided by the
# information schema table.
#
create table t1 (i int);
insert into t1 values (1), (2), (1), (3), (2), (4);
create view v1 as select distinct i from t1;
select * from v1;
select table_name, is_updatable from information_schema.views
where table_name = 'v1';
drop view v1;
drop table t1;
--echo End of 5.0 tests.