diff options
author | unknown <monty@mashka.mysql.fi> | 2003-08-07 21:19:43 +0300 |
---|---|---|
committer | unknown <monty@mashka.mysql.fi> | 2003-08-07 21:19:43 +0300 |
commit | f4646c0d063fb541f48dd2824ecccea464a9958d (patch) | |
tree | ae1adf314b74af9f9885cef15ab9ffb8974d3e2d /mysql-test/r/union.result | |
parent | 553daa5e40b413489431d5d21b512c6b529bccac (diff) | |
parent | b9aa175cb282ce92e733412a74e23ba750f8dd80 (diff) | |
download | mariadb-git-f4646c0d063fb541f48dd2824ecccea464a9958d.tar.gz |
Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into mashka.mysql.fi:/home/my/mysql-4.1
BitKeeper/etc/logging_ok:
auto-union
sql/item_func.cc:
Auto merged
Diffstat (limited to 'mysql-test/r/union.result')
-rw-r--r-- | mysql-test/r/union.result | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/mysql-test/r/union.result b/mysql-test/r/union.result index 5b7b26bc1bb..6d8bd263546 100644 --- a/mysql-test/r/union.result +++ b/mysql-test/r/union.result @@ -328,3 +328,16 @@ id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY t1 const PRIMARY PRIMARY 4 const 1 2 UNION t1 ref b b 5 const 1 Using where drop table t1,t2; +create table t1 ( id int not null auto_increment, primary key (id) ,user_name text ); +create table t2 ( id int not null auto_increment, primary key (id) ,group_name text ); +create table t3 ( id int not null auto_increment, primary key (id) ,user_id int ,index user_idx (user_id) ,foreign key (user_id) references users(id) ,group_id int ,index group_idx (group_id) ,foreign key (group_id) references groups(id) ); +insert into t1 (user_name) values ('Tester'); +insert into t2 (group_name) values ('Group A'); +insert into t2 (group_name) values ('Group B'); +insert into t3 (user_id, group_id) values (1,1); +select 1 'is_in_group', a.user_name, c.group_name, b.id from t1 a, t3 b, t2 c where a.id = b.user_id and b.group_id = c.id UNION select 0 'is_in_group', a.user_name, c.group_name, null from t1 a, t2 c; +is_in_group user_name group_name id +1 Tester Group A 1 +0 Tester Group A NULL +0 Tester Group B NULL +drop table t1, t2, t3; |