From 1e44259440f19d76c2422b64761530d57ec49a10 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 13 Jul 2006 20:48:26 -0700 Subject: Fixed bug #19714. DESCRIBE returned the type BIGINT for a column of a view if the column was specified by an expression over values of the type INT. E.g. for the view defined as follows: CREATE VIEW v1 SELECT COALESCE(f1,f2) FROM t1 DESCRIBE returned type BIGINT for the only column of the view if f1,f2 are columns of the INT type. At the same time DESCRIBE returned type INT for the only column of the table defined by the statement: CREATE TABLE t2 SELECT COALESCE(f1,f2) FROM t1. This inconsistency was removed by the patch. Now the code chooses between INT/BIGINT depending on the precision of the aggregated column type. Thus both DESCRIBE commands above returns type INT for v1 and t2. mysql-test/r/analyse.result: Adjusted the results after having fixed bug #19714. mysql-test/r/bigint.result: Adjusted the results after having fixed bug #19714. mysql-test/r/create.result: Adjusted the results after having fixed bug #19714. mysql-test/r/olap.result: Adjusted the results after having fixed bug #19714. mysql-test/r/ps_2myisam.result: Adjusted the results after having fixed bug #19714. mysql-test/r/ps_3innodb.result: Adjusted the results after having fixed bug #19714. mysql-test/r/ps_4heap.result: Adjusted the results after having fixed bug #19714. mysql-test/r/ps_5merge.result: Adjusted the results after having fixed bug #19714. mysql-test/r/ps_6bdb.result: Adjusted the results after having fixed bug #19714. mysql-test/r/ps_7ndb.result: Adjusted the results after having fixed bug #19714. mysql-test/r/sp.result: Adjusted the results after having fixed bug #19714. mysql-test/r/subselect.result: Adjusted the results after having fixed bug #19714. mysql-test/r/type_ranges.result: Adjusted the results after having fixed bug #19714. mysql-test/r/view.result: Added a test case for bug #19714. mysql-test/t/view.test: Added a test case for bug #19714. --- mysql-test/r/create.result | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'mysql-test/r/create.result') diff --git a/mysql-test/r/create.result b/mysql-test/r/create.result index c5b77ea4925..aa8c6d3d277 100644 --- a/mysql-test/r/create.result +++ b/mysql-test/r/create.result @@ -668,7 +668,7 @@ Table Create Table t1 CREATE TABLE `t1` ( `b` int(11) NOT NULL, `a` varchar(12) character set utf8 collate utf8_bin NOT NULL, - `c` bigint(1) NOT NULL default '0', + `c` int(1) NOT NULL default '0', PRIMARY KEY (`a`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; @@ -681,7 +681,7 @@ Table Create Table t1 CREATE TABLE `t1` ( `b` int(11) default NULL, `a` varchar(12) character set utf8 collate utf8_bin NOT NULL, - `c` bigint(1) NOT NULL default '0', + `c` int(1) NOT NULL default '0', PRIMARY KEY (`a`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; -- cgit v1.2.1