diff options
author | unknown <jani@ua141d10.elisa.omakaista.fi> | 2005-03-01 22:19:19 +0200 |
---|---|---|
committer | unknown <jani@ua141d10.elisa.omakaista.fi> | 2005-03-01 22:19:19 +0200 |
commit | 53bfeb48442ed04c8498cb4118b3715fd1dbeb42 (patch) | |
tree | 701e55a57172693eb5cc80b3d8c70b8a5e5305f2 /mysql-test | |
parent | 425573747f54cf54187a0985e21fddf580c8e924 (diff) | |
download | mariadb-git-53bfeb48442ed04c8498cb4118b3715fd1dbeb42.tar.gz |
Fix for Bug#5615 and merge from 4.1
mysql-test/r/func_group.result:
Added some tests and fix for Bug#5615.
mysql-test/r/show_check.result:
Fix for Bug#5615.
mysql-test/t/func_group.test:
Added some tests.
sql/item_sum.cc:
Fix for Bug#5615.
sql/item_sum.h:
Fix for Bug#5615.
sql/sql_select.cc:
Fix for Bug#5615.
sql/sql_select.h:
Fix for Bug#5615.
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/r/func_group.result | 16 | ||||
-rw-r--r-- | mysql-test/r/show_check.result | 4 | ||||
-rw-r--r-- | mysql-test/t/func_group.test | 4 |
3 files changed, 19 insertions, 5 deletions
diff --git a/mysql-test/r/func_group.result b/mysql-test/r/func_group.result index 6aadcd359b7..ea299455364 100644 --- a/mysql-test/r/func_group.result +++ b/mysql-test/r/func_group.result @@ -669,12 +669,24 @@ select charset(max(a)), coercibility(max(a)), charset(min(a)), coercibility(min(a)) from t1; charset(max(a)) coercibility(max(a)) charset(min(a)) coercibility(min(a)) latin2 2 latin2 2 +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` char(1) character set latin2 default NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 create table t2 select max(a),min(a) from t1; show create table t2; Table Create Table t2 CREATE TABLE `t2` ( - `max(a)` varchar(1) character set latin2 default NULL, - `min(a)` varchar(1) character set latin2 default NULL + `max(a)` char(1) character set latin2 default NULL, + `min(a)` char(1) character set latin2 default NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +drop table t2; +create table t2 select concat(a) from t1; +show create table t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `concat(a)` varchar(1) character set latin2 default NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t2,t1; create table t1 (a int); diff --git a/mysql-test/r/show_check.result b/mysql-test/r/show_check.result index a2b2eebf628..15cae7646f9 100644 --- a/mysql-test/r/show_check.result +++ b/mysql-test/r/show_check.result @@ -252,11 +252,9 @@ type_bool type_tiny type_short type_mediumint type_bigint type_decimal type_nume drop table t1; create table t1 (a int not null); create table t2 select max(a) from t1; -Warnings: -Warning 1263 Data truncated; NULL supplied to NOT NULL column 'max(a)' at row 1 show columns from t2; Field Type Null Key Default Extra -max(a) int(11) 0 +max(a) int(11) YES NULL drop table t1,t2; create table t1 (c decimal, d double, f float, r real); show columns from t1; diff --git a/mysql-test/t/func_group.test b/mysql-test/t/func_group.test index 51528be8952..96fd297dc20 100644 --- a/mysql-test/t/func_group.test +++ b/mysql-test/t/func_group.test @@ -395,8 +395,12 @@ create table t1 (a char character set latin2); insert into t1 values ('a'),('b'); select charset(max(a)), coercibility(max(a)), charset(min(a)), coercibility(min(a)) from t1; +show create table t1; create table t2 select max(a),min(a) from t1; show create table t2; +drop table t2; +create table t2 select concat(a) from t1; +show create table t2; drop table t2,t1; # |