mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Merge spetrunia@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into mysql.com:/home/psergey/mysql-5.0-opt2
This commit is contained in:
@ -452,7 +452,7 @@ t2 CREATE TABLE `t2` (
|
||||
`ifnull(h,h)` decimal(5,4) default NULL,
|
||||
`ifnull(i,i)` year(4) default NULL,
|
||||
`ifnull(j,j)` date default NULL,
|
||||
`ifnull(k,k)` datetime NOT NULL default '0000-00-00 00:00:00',
|
||||
`ifnull(k,k)` timestamp NOT NULL default '0000-00-00 00:00:00',
|
||||
`ifnull(l,l)` datetime default NULL,
|
||||
`ifnull(m,m)` varchar(1) default NULL,
|
||||
`ifnull(n,n)` varchar(3) default NULL,
|
||||
|
@ -1473,8 +1473,8 @@ Error 1146 Table 'test.t4' doesn't exist
|
||||
drop table t1,t2,t3;
|
||||
create table t1 (id int, name char(10) not null, name2 char(10) not null) engine=innodb;
|
||||
insert into t1 values(1,'first','fff'),(2,'second','sss'),(3,'third','ttt');
|
||||
select name2 from t1 union all select name from t1 union all select id from t1;
|
||||
name2
|
||||
select trim(name2) from t1 union all select trim(name) from t1 union all select trim(id) from t1;
|
||||
trim(name2)
|
||||
fff
|
||||
sss
|
||||
ttt
|
||||
|
@ -691,9 +691,9 @@ t1 CREATE TABLE `t1` (
|
||||
`da` datetime default NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
drop table t1;
|
||||
create table t1 SELECT dt from t2 UNION select sc from t2;
|
||||
select * from t1;
|
||||
dt
|
||||
create table t1 SELECT dt from t2 UNION select trim(sc) from t2;
|
||||
select trim(dt) from t1;
|
||||
trim(dt)
|
||||
1972-10-22 11:50:00
|
||||
testc
|
||||
show create table t1;
|
||||
@ -732,7 +732,7 @@ tetetetetest
|
||||
show create table t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`dt` longblob
|
||||
`dt` blob
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
drop table t1;
|
||||
create table t1 SELECT sv from t2 UNION select b from t2;
|
||||
@ -743,7 +743,7 @@ tetetetetest
|
||||
show create table t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`sv` longblob
|
||||
`sv` blob
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
drop table t1;
|
||||
create table t1 SELECT i from t2 UNION select d from t2 UNION select b from t2;
|
||||
@ -755,7 +755,7 @@ tetetetetest
|
||||
show create table t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`i` longblob
|
||||
`i` blob
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
drop table t1;
|
||||
create table t1 SELECT sv from t2 UNION select tx from t2;
|
||||
@ -766,7 +766,7 @@ teeeeeeeeeeeest
|
||||
show create table t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`sv` longtext
|
||||
`sv` text
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
drop table t1;
|
||||
create table t1 SELECT b from t2 UNION select tx from t2;
|
||||
@ -777,7 +777,7 @@ teeeeeeeeeeeest
|
||||
show create table t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`b` longblob
|
||||
`b` blob
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
drop table t1,t2;
|
||||
create table t1 select 1 union select -1;
|
||||
@ -1306,6 +1306,21 @@ id
|
||||
5
|
||||
99
|
||||
drop table t1;
|
||||
create table t1(f1 char(1), f2 char(5), f3 binary(1), f4 binary(5), f5 timestamp, f6 varchar(1) character set utf8 collate utf8_general_ci, f7 text);
|
||||
create table t2 as select *, f6 as f8 from t1 union select *, f7 from t1;
|
||||
show create table t2;
|
||||
Table Create Table
|
||||
t2 CREATE TABLE `t2` (
|
||||
`f1` char(1) default NULL,
|
||||
`f2` char(5) default NULL,
|
||||
`f3` binary(1) default NULL,
|
||||
`f4` binary(5) default NULL,
|
||||
`f5` timestamp NOT NULL default '0000-00-00 00:00:00',
|
||||
`f6` varchar(1) character set utf8 default NULL,
|
||||
`f7` text,
|
||||
`f8` text character set utf8
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
drop table t1, t2;
|
||||
(select avg(1)) union (select avg(1)) union (select avg(1)) union
|
||||
(select avg(1)) union (select avg(1)) union (select avg(1)) union
|
||||
(select avg(1)) union (select avg(1)) union (select avg(1)) union
|
||||
|
@ -1079,7 +1079,7 @@ drop table t1,t2,t3;
|
||||
#
|
||||
create table t1 (id int, name char(10) not null, name2 char(10) not null) engine=innodb;
|
||||
insert into t1 values(1,'first','fff'),(2,'second','sss'),(3,'third','ttt');
|
||||
select name2 from t1 union all select name from t1 union all select id from t1;
|
||||
select trim(name2) from t1 union all select trim(name) from t1 union all select trim(id) from t1;
|
||||
drop table t1;
|
||||
|
||||
#
|
||||
|
@ -390,8 +390,8 @@ create table t1 SELECT da from t2 UNION select dt from t2;
|
||||
select * from t1;
|
||||
show create table t1;
|
||||
drop table t1;
|
||||
create table t1 SELECT dt from t2 UNION select sc from t2;
|
||||
select * from t1;
|
||||
create table t1 SELECT dt from t2 UNION select trim(sc) from t2;
|
||||
select trim(dt) from t1;
|
||||
show create table t1;
|
||||
drop table t1;
|
||||
create table t1 SELECT dt from t2 UNION select sv from t2;
|
||||
@ -794,6 +794,14 @@ drop table t1;
|
||||
|
||||
# End of 4.1 tests
|
||||
|
||||
#
|
||||
# Bug#12185: Data type aggregation may produce wrong result
|
||||
#
|
||||
create table t1(f1 char(1), f2 char(5), f3 binary(1), f4 binary(5), f5 timestamp, f6 varchar(1) character set utf8 collate utf8_general_ci, f7 text);
|
||||
create table t2 as select *, f6 as f8 from t1 union select *, f7 from t1;
|
||||
show create table t2;
|
||||
drop table t1, t2;
|
||||
|
||||
#
|
||||
# Bug#18175: Union select over 129 tables with a sum function fails.
|
||||
#
|
||||
|
Reference in New Issue
Block a user