1
0
mirror of https://github.com/MariaDB/server.git synced 2026-01-06 05:22:24 +03:00

Setting a variable to CAST(NULL as X) set the result type of the variable to X. (Bug #6598)

This commit is contained in:
monty@mysql.com
2005-04-30 03:14:42 +03:00
parent 215be0264b
commit 129c604032
7 changed files with 111 additions and 6 deletions

View File

@@ -128,3 +128,20 @@ t2.value64=t1.value64;
value64 value32 value64 value32
9223372036854775807 2 9223372036854775807 4
drop table t1, t2;
create table t1 select 1 as 'a';
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` bigint(1) NOT NULL default '0'
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
create table t1 select 9223372036854775809 as 'a';
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` bigint(19) unsigned NOT NULL default '0'
) ENGINE=MyISAM DEFAULT CHARSET=latin1
select * from t1;
a
9223372036854775809
drop table t1;