summaryrefslogtreecommitdiff
path: root/mysql-test/r/sp.result
diff options
context:
space:
mode:
authorunknown <pem@mysql.com>2005-09-27 17:07:28 +0200
committerunknown <pem@mysql.com>2005-09-27 17:07:28 +0200
commit06eabeeea83ebfeacd491acb1283a35522fad578 (patch)
tree68d8fac8d165ce2a6cb7fd9c841997b2ae8beee6 /mysql-test/r/sp.result
parent706731cf8d36936b3897168316c819e7b354e321 (diff)
downloadmariadb-git-06eabeeea83ebfeacd491acb1283a35522fad578.tar.gz
Fixed BUG#12589: Assert when creating temp. table from decimal stored
procedure variable Second version, after review. Keep the unsigned_flag in Item_decimal updated. Note that this also changed the result of several old test results - creating tables from decimal templates now gives unsigned columns and different sizes. (Several tests had Length > Max_length before.) mysql-test/r/case.result: Updated result (after fixing BUG#12589). mysql-test/r/metadata.result: Updated result (after fixing BUG#12589). mysql-test/r/ps_2myisam.result: Updated result (after fixing BUG#12589). mysql-test/r/ps_3innodb.result: Updated result (after fixing BUG#12589). mysql-test/r/ps_4heap.result: Updated result (after fixing BUG#12589). mysql-test/r/ps_5merge.result: Updated result (after fixing BUG#12589). mysql-test/r/ps_6bdb.result: Updated result (after fixing BUG#12589). mysql-test/r/ps_7ndb.result: Updated result (after fixing BUG#12589). mysql-test/r/sp.result: New test case for BUG#12589. mysql-test/r/type_newdecimal.result: Updated result (after fixing BUG#12589). mysql-test/t/sp.test: New test case for BUG#12589. sql/item.cc: Keep the unsigned_flag updated in Item_splocal and Item_decimal.
Diffstat (limited to 'mysql-test/r/sp.result')
-rw-r--r--mysql-test/r/sp.result45
1 files changed, 45 insertions, 0 deletions
diff --git a/mysql-test/r/sp.result b/mysql-test/r/sp.result
index f9e6eae7e57..1b8cde6d3db 100644
--- a/mysql-test/r/sp.result
+++ b/mysql-test/r/sp.result
@@ -3390,4 +3390,49 @@ s1
set sql_mode=@sm|
drop table t3|
drop procedure bug6127|
+drop procedure if exists bug12589_1|
+drop procedure if exists bug12589_2|
+drop procedure if exists bug12589_3|
+create procedure bug12589_1()
+begin
+declare spv1 decimal(3,3);
+set spv1= 123.456;
+set spv1 = 'test';
+create temporary table tm1 as select spv1;
+show create table tm1;
+drop temporary table tm1;
+end|
+create procedure bug12589_2()
+begin
+declare spv1 decimal(6,3);
+set spv1= 123.456;
+create temporary table tm1 as select spv1;
+show create table tm1;
+drop temporary table tm1;
+end|
+create procedure bug12589_3()
+begin
+declare spv1 decimal(6,3);
+set spv1= -123.456;
+create temporary table tm1 as select spv1;
+show create table tm1;
+drop temporary table tm1;
+end|
+call bug12589_1()|
+Table Create Table
+tm1 CREATE TEMPORARY TABLE `tm1` (
+ `spv1` decimal(1,0) unsigned default NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+Warnings:
+Warning 1292 Truncated incorrect DECIMAL value: 'test'
+call bug12589_2()|
+Table Create Table
+tm1 CREATE TEMPORARY TABLE `tm1` (
+ `spv1` decimal(6,3) unsigned default NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+call bug12589_3()|
+Table Create Table
+tm1 CREATE TEMPORARY TABLE `tm1` (
+ `spv1` decimal(6,3) default NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1,t2;