summaryrefslogtreecommitdiff
path: root/mysql-test/r/user_var.result
diff options
context:
space:
mode:
authormonty@mysql.com <>2005-04-30 03:14:42 +0300
committermonty@mysql.com <>2005-04-30 03:14:42 +0300
commit129c604032af4b86f7bf23bb06f4223795f75b61 (patch)
tree0f9fb389faa0f7571636772439feae0aabc53252 /mysql-test/r/user_var.result
parent215be0264b55029cdacf4ae3b30dae3ec910ad8f (diff)
downloadmariadb-git-129c604032af4b86f7bf23bb06f4223795f75b61.tar.gz
Setting a variable to CAST(NULL as X) set the result type of the variable to X. (Bug #6598)
Diffstat (limited to 'mysql-test/r/user_var.result')
-rw-r--r--mysql-test/r/user_var.result41
1 files changed, 41 insertions, 0 deletions
diff --git a/mysql-test/r/user_var.result b/mysql-test/r/user_var.result
index 68eae111111..d9a647ce2c3 100644
--- a/mysql-test/r/user_var.result
+++ b/mysql-test/r/user_var.result
@@ -182,3 +182,44 @@ coercibility(@v1) coercibility(@v2) coercibility(@v3) coercibility(@v4)
set session @honk=99;
set one_shot @honk=99;
ERROR HY000: The 'SET ONE_SHOT' syntax is reserved for purposes internal to the MySQL server
+set @first_var= NULL;
+create table t1 select @first_var;
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `@first_var` longblob
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+drop table t1;
+set @first_var= cast(NULL as signed integer);
+create table t1 select @first_var;
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `@first_var` bigint(20) default NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+drop table t1;
+set @first_var= NULL;
+create table t1 select @first_var;
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `@first_var` bigint(20) default NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+drop table t1;
+set @first_var= concat(NULL);
+create table t1 select @first_var;
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `@first_var` longblob
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+drop table t1;
+set @first_var=1;
+set @first_var= cast(NULL as CHAR);
+create table t1 select @first_var;
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `@first_var` longtext
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+drop table t1;