mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Portability fixes
Don't define crc32 if we are not linking with gzip cmd-line-utils/libedit/libedit_term.h: Rename: cmd-line-utils/libedit/term.h -> cmd-line-utils/libedit/libedit_term.h BitKeeper/etc/ignore: added scripts/make_win_src_distribution client/connect_test.c: Removed wrong include file (my_global.h should never be included by an external client) client/insert_test.c: Removed wrong include file (my_global.h should never be included by an external client) client/select_test.c: Removed wrong include file (my_global.h should never be included by an external client) cmd-line-utils/libedit/Makefile.am: Portability fixes (for HPUX11 and AIX) cmd-line-utils/libedit/el.h: Portability fixes (for HPUX11 and AIX) cmd-line-utils/libedit/key.h: Portability fixes (for HPUX11 and AIX) cmd-line-utils/libedit/makelist: Portability fixes (for HPUX11 and AIX) cmd-line-utils/libedit/read.c: Portability fixes (for HPUX11 and AIX) cmd-line-utils/libedit/readline.c: Portability fixes (for HPUX11 and AIX) cmd-line-utils/libedit/readline/readline.h: Systems that has sys/cdefs may not have __BEGIN_DECLS cmd-line-utils/libedit/sig.c: sig_t is not portable cmd-line-utils/libedit/sig.h: sig_t is not portable cmd-line-utils/libedit/term.c: Portablity fixes Fixed core dump when using a terminal without arrow key definitions heap/_check.c: Portability fix heap/hp_hash.c: Portability fix heap/hp_rkey.c: Portability fix include/my_global.h: Portability fixes for HPUX11 libmysql/libmysql.c: Removed wrong cast mysql-test/r/union.result: New union tests mysql-test/t/union.test: New union tests sql/gen_lex_hash.cc: Fixed portability bug. sql/gstream.h: Portablity fix sql/item_create.cc: Don't define crc32 if we are not linking with gzip sql/item_create.h: Don't define crc32 if we are not linking with gzip sql/item_func.cc: Don't define crc32 if we are not linking with gzip sql/item_func.h: Don't define crc32 if we are not linking with gzip sql/lex.h: Don't define crc32 if we are not linking with gzip sql/sql_show.cc: Name can't be NULL
This commit is contained in:
@ -230,3 +230,36 @@ id_master id text1 text2
|
||||
1 3 NULL bar3
|
||||
1 4 foo4 bar4
|
||||
drop table if exists t1,t2;
|
||||
create table t1 (a int not null primary key auto_increment, b int, key(b));
|
||||
create table t2 (a int not null primary key auto_increment, b int);
|
||||
insert into t1 (b) values (1),(2),(2),(3);
|
||||
insert into t2 (b) values (10),(11),(12),(13);
|
||||
explain (select * from t1 where a=1) union (select * from t2 where a=1);
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 PRIMARY t1 const PRIMARY PRIMARY 4 const 1
|
||||
2 UNION t2 const PRIMARY PRIMARY 4 const 1
|
||||
(select * from t1 where a=5) union (select * from t2 where a=1);
|
||||
a b
|
||||
1 10
|
||||
(select * from t1 where a=5 and a=6) union (select * from t2 where a=1);
|
||||
a b
|
||||
1 10
|
||||
(select t1.a,t1.b from t1,t2 where t1.a=5) union (select * from t2 where a=1);
|
||||
a b
|
||||
1 10
|
||||
(select * from t1 where a=1) union (select t1.a,t2.a from t1,t2 where t1.a=t2.a);
|
||||
a b
|
||||
1 1
|
||||
2 2
|
||||
3 3
|
||||
4 4
|
||||
explain (select * from t1 where a=1 and b=10) union (select t1.a,t2.a from t1,t2 where t1.a=t2.a);
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
|
||||
2 UNION t1 index PRIMARY PRIMARY 4 NULL 4 Using index
|
||||
2 UNION t2 index PRIMARY PRIMARY 4 NULL 4 Using where; Using index
|
||||
explain (select * from t1 where a=1) union (select * from t1 where b=1);
|
||||
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;
|
||||
|
Reference in New Issue
Block a user