diff options
author | unknown <bell@sanja.is.com.ua> | 2003-11-23 21:26:43 +0200 |
---|---|---|
committer | unknown <bell@sanja.is.com.ua> | 2003-11-23 21:26:43 +0200 |
commit | 381a8db6a63aa70ddb49c3145bcff36d628da176 (patch) | |
tree | fc26a723bc704982f8240c2041552c93c9488f90 /mysql-test | |
parent | 105087127ed6f05c03b34f79402341cebfb8b71a (diff) | |
download | mariadb-git-381a8db6a63aa70ddb49c3145bcff36d628da176.tar.gz |
after review fixes
mysql-test/r/union.result:
new tests, more correct results for old one
mysql-test/t/union.test:
new tests, more correct results for old one
sql/field.cc:
new way to make field types csting
sql/field.h:
new way to make field types csting
sql/item.cc:
new way to make field types csting
sql/sql_derived.cc:
fixed typo
sql/sql_lex.h:
comment added
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/r/union.result | 30 | ||||
-rw-r--r-- | mysql-test/t/union.test | 12 |
2 files changed, 36 insertions, 6 deletions
diff --git a/mysql-test/r/union.result b/mysql-test/r/union.result index cf5920481b2..16640c78cb8 100644 --- a/mysql-test/r/union.result +++ b/mysql-test/r/union.result @@ -556,8 +556,8 @@ t1 CREATE TABLE `t1` ( `a` double(4,1) NOT NULL default '0.0' ) TYPE=MyISAM DEFAULT CHARSET=latin1 drop table t1; -create table t2 (it1 tinyint, it2 tinyint not null, i int not null, f float, d double, y year, da date, dt datetime, sc char(10), sv varchar(10), b blob); -insert into t2 values (NULL, 1, 3, 1.5, 2.5, 1972, '1972-10-22', '1972-10-22 11:50', 'testc', 'testv', 'tetetetetest'); +create table t2 (it1 tinyint, it2 tinyint not null, i int not null, ib bigint, f float, d double, y year, da date, dt datetime, sc char(10), sv varchar(10), b blob); +insert into t2 values (NULL, 1, 3, 4, 1.5, 2.5, 1972, '1972-10-22', '1972-10-22 11:50', 'testc', 'testv', 'tetetetetest'); create table t1 SELECT it2 from t2 UNION select it1 from t2; select * from t1; it2 @@ -588,7 +588,7 @@ i show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `i` float default NULL + `i` double default NULL ) TYPE=MyISAM DEFAULT CHARSET=latin1 drop table t1; create table t1 SELECT f from t2 UNION select d from t2; @@ -602,6 +602,28 @@ t1 CREATE TABLE `t1` ( `f` double default NULL ) TYPE=MyISAM DEFAULT CHARSET=latin1 drop table t1; +create table t1 SELECT ib from t2 UNION select f from t2; +select * from t1; +ib +4 +1.5 +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `ib` double default NULL +) TYPE=MyISAM DEFAULT CHARSET=latin1 +drop table t1; +create table t1 SELECT ib from t2 UNION select d from t2; +select * from t1; +ib +4 +2.5 +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `ib` double default NULL +) TYPE=MyISAM DEFAULT CHARSET=latin1 +drop table t1; create table t1 SELECT f from t2 UNION select y from t2; select * from t1; f @@ -610,7 +632,7 @@ f show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `f` double default NULL + `f` float default NULL ) TYPE=MyISAM DEFAULT CHARSET=latin1 drop table t1; create table t1 SELECT f from t2 UNION select da from t2; diff --git a/mysql-test/t/union.test b/mysql-test/t/union.test index af511d18ecc..9e02daf22fa 100644 --- a/mysql-test/t/union.test +++ b/mysql-test/t/union.test @@ -321,8 +321,8 @@ select * from t1; show create table t1; drop table t1; -create table t2 (it1 tinyint, it2 tinyint not null, i int not null, f float, d double, y year, da date, dt datetime, sc char(10), sv varchar(10), b blob); -insert into t2 values (NULL, 1, 3, 1.5, 2.5, 1972, '1972-10-22', '1972-10-22 11:50', 'testc', 'testv', 'tetetetetest'); +create table t2 (it1 tinyint, it2 tinyint not null, i int not null, ib bigint, f float, d double, y year, da date, dt datetime, sc char(10), sv varchar(10), b blob); +insert into t2 values (NULL, 1, 3, 4, 1.5, 2.5, 1972, '1972-10-22', '1972-10-22 11:50', 'testc', 'testv', 'tetetetetest'); create table t1 SELECT it2 from t2 UNION select it1 from t2; select * from t1; @@ -340,6 +340,14 @@ create table t1 SELECT f from t2 UNION select d from t2; select * from t1; show create table t1; drop table t1; +create table t1 SELECT ib from t2 UNION select f from t2; +select * from t1; +show create table t1; +drop table t1; +create table t1 SELECT ib from t2 UNION select d from t2; +select * from t1; +show create table t1; +drop table t1; create table t1 SELECT f from t2 UNION select y from t2; select * from t1; show create table t1; |