diff options
author | evgen@moonbone.local <> | 2005-07-30 05:53:35 +0400 |
---|---|---|
committer | evgen@moonbone.local <> | 2005-07-30 05:53:35 +0400 |
commit | fa0ea36507e886f270ce11ffea67af031febb88d (patch) | |
tree | dcb6725978d9c6687be4f2891dc7c4e48a2d17dc /mysql-test/r | |
parent | f4d27c75e6ffe947711429deff34402e66b7ba56 (diff) | |
download | mariadb-git-fa0ea36507e886f270ce11ffea67af031febb88d.tar.gz |
Fix bug #11335 View redefines TinyInt(1) column definition
Item_type_holder doesn't store information about length and exact type of
original item which results in redefining length to max_length and geometry
type to longtext.
Changed the way derived tables except unions are built. Now they are created
from original field list instead of list of Item_type_holder.
Diffstat (limited to 'mysql-test/r')
-rw-r--r-- | mysql-test/r/subselect.result | 12 | ||||
-rw-r--r-- | mysql-test/r/view.result | 13 | ||||
-rw-r--r-- | mysql-test/r/view_grant.result | 8 |
3 files changed, 22 insertions, 11 deletions
diff --git a/mysql-test/r/subselect.result b/mysql-test/r/subselect.result index 693146c869e..bbca9c905df 100644 --- a/mysql-test/r/subselect.result +++ b/mysql-test/r/subselect.result @@ -1087,24 +1087,24 @@ CREATE TABLE t1 SELECT * FROM (SELECT 1 as a,(SELECT 1)) a; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` bigint(20) NOT NULL default '0', - `(SELECT 1)` bigint(20) NOT NULL default '0' + `a` bigint(1) NOT NULL default '0', + `(SELECT 1)` bigint(1) NOT NULL default '0' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; CREATE TABLE t1 SELECT * FROM (SELECT 1 as a,(SELECT a)) a; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` bigint(20) NOT NULL default '0', - `(SELECT a)` bigint(20) NOT NULL default '0' + `a` bigint(1) NOT NULL default '0', + `(SELECT a)` bigint(1) NOT NULL default '0' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; CREATE TABLE t1 SELECT * FROM (SELECT 1 as a,(SELECT a+0)) a; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` bigint(20) NOT NULL default '0', - `(SELECT a+0)` bigint(20) NOT NULL default '0' + `a` bigint(1) NOT NULL default '0', + `(SELECT a+0)` bigint(3) NOT NULL default '0' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; CREATE TABLE t1 SELECT (SELECT 1 as a UNION SELECT 1+1 limit 1,1) as a; diff --git a/mysql-test/r/view.result b/mysql-test/r/view.result index ef40a408932..d3270661b52 100644 --- a/mysql-test/r/view.result +++ b/mysql-test/r/view.result @@ -566,7 +566,7 @@ select * from v1; col1 describe v1; Field Type Null Key Default Extra -col1 varchar(2) YES NULL +col1 char(2) YES NULL drop view v1; drop table `t1a``b`; create table t1 (col1 char(5),col2 char(5)); @@ -1977,3 +1977,14 @@ A B DROP VIEW v1; DROP TABLE t1; +create table t1 (f1 tinyint(1), f2 char(1), f3 varchar(1), f4 geometry, f5 datetime); +create view v1 as select * from t1; +desc v1; +Field Type Null Key Default Extra +f1 tinyint(1) YES NULL +f2 char(1) YES NULL +f3 varchar(1) YES NULL +f4 geometry YES NULL +f5 datetime YES NULL +drop view v1; +drop table t1; diff --git a/mysql-test/r/view_grant.result b/mysql-test/r/view_grant.result index b77ee59b3ff..71f0f28e59f 100644 --- a/mysql-test/r/view_grant.result +++ b/mysql-test/r/view_grant.result @@ -72,12 +72,12 @@ select c from mysqltest.v4; c show columns from mysqltest.v1; Field Type Null Key Default Extra -c bigint(20) YES NULL -d bigint(20) YES NULL +c bigint(12) YES NULL +d bigint(12) YES NULL show columns from mysqltest.v2; Field Type Null Key Default Extra -c bigint(20) YES NULL -d bigint(20) YES NULL +c bigint(12) YES NULL +d bigint(12) YES NULL explain select c from mysqltest.v1; ERROR HY000: EXPLAIN/SHOW can not be issued; lacking privileges for underlying table show create view mysqltest.v1; |