mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0
into moonbone.local:/work/mysql-5.0-bug-7422 mysql-test/r/view.result: SCCS merged mysql-test/t/view.test: SCCS merged
This commit is contained in:
@ -1726,6 +1726,20 @@ sum(a)
|
||||
drop procedure p1;
|
||||
drop view v1;
|
||||
drop table t1;
|
||||
CREATE TABLE t1(a char(2) primary key, b char(2));
|
||||
CREATE TABLE t2(a char(2), b char(2), index i(a));
|
||||
INSERT INTO t1 VALUES ('a','1'), ('b','2');
|
||||
INSERT INTO t2 VALUES ('a','5'), ('a','6'), ('b','5'), ('b','6');
|
||||
CREATE VIEW v1 AS
|
||||
SELECT t1.b as c, t2.b as d FROM t1,t2 WHERE t1.a=t2.a;
|
||||
SELECT d, c FROM v1 ORDER BY d;
|
||||
d c
|
||||
5 1
|
||||
5 2
|
||||
6 1
|
||||
6 2
|
||||
DROP VIEW v1;
|
||||
DROP TABLE t1, t2;
|
||||
create table t1 (s1 int);
|
||||
create view v1 as select sum(distinct s1) from t1;
|
||||
select * from v1;
|
||||
|
@ -1569,6 +1569,18 @@ drop procedure p1;
|
||||
drop view v1;
|
||||
drop table t1;
|
||||
|
||||
#
|
||||
# Bug#7422 "order by" doesn't work
|
||||
#
|
||||
CREATE TABLE t1(a char(2) primary key, b char(2));
|
||||
CREATE TABLE t2(a char(2), b char(2), index i(a));
|
||||
INSERT INTO t1 VALUES ('a','1'), ('b','2');
|
||||
INSERT INTO t2 VALUES ('a','5'), ('a','6'), ('b','5'), ('b','6');
|
||||
CREATE VIEW v1 AS
|
||||
SELECT t1.b as c, t2.b as d FROM t1,t2 WHERE t1.a=t2.a;
|
||||
SELECT d, c FROM v1 ORDER BY d;
|
||||
DROP VIEW v1;
|
||||
DROP TABLE t1, t2;
|
||||
#
|
||||
# using sum(distinct ) & avg(distinct ) in views (BUG#7015)
|
||||
#
|
||||
|
Reference in New Issue
Block a user