summaryrefslogtreecommitdiff
path: root/mysql-test/r/sp.result
diff options
context:
space:
mode:
authorunknown <Kristofer.Pettersson@naruto.>2007-03-23 19:14:13 +0100
committerunknown <Kristofer.Pettersson@naruto.>2007-03-23 19:14:13 +0100
commitcec241f456cfeac6ea5c81fab060d77722c3dea3 (patch)
treef5760bd222ccd7ea92dd5bdb74543609866df491 /mysql-test/r/sp.result
parent54a0f623c733b10f03308edae5503b7bcb81fcf9 (diff)
parentffc605aad563c7634ea6b5ac8cb480793fcb9258 (diff)
downloadmariadb-git-cec241f456cfeac6ea5c81fab060d77722c3dea3.tar.gz
Merge naruto.:C:/cpp/bug20777/my50-bug20777
into naruto.:C:/cpp/mysql-5.0-runtime mysql-test/r/sp.result: manual merge mysql-test/t/sp.test: manual merge sql/item_func.cc: manual merge
Diffstat (limited to 'mysql-test/r/sp.result')
-rw-r--r--mysql-test/r/sp.result88
1 files changed, 88 insertions, 0 deletions
diff --git a/mysql-test/r/sp.result b/mysql-test/r/sp.result
index cf3cf07630a..a30584b3ef2 100644
--- a/mysql-test/r/sp.result
+++ b/mysql-test/r/sp.result
@@ -5969,4 +5969,92 @@ SUM(f2) bug25373(f1)
21.300000071526 NULL
DROP FUNCTION bug25373|
DROP TABLE t3|
+drop function if exists bug20777|
+drop table if exists examplebug20777|
+create function bug20777(f1 bigint unsigned) returns bigint unsigned
+begin
+set f1 = (f1 - 10); set f1 = (f1 + 10);
+return f1;
+end|
+select bug20777(9223372036854775803) as '9223372036854775803 2**63-5';
+9223372036854775803 2**63-5
+9223372036854775803
+select bug20777(9223372036854775804) as '9223372036854775804 2**63-4';
+9223372036854775804 2**63-4
+9223372036854775804
+select bug20777(9223372036854775805) as '9223372036854775805 2**63-3';
+9223372036854775805 2**63-3
+9223372036854775805
+select bug20777(9223372036854775806) as '9223372036854775806 2**63-2';
+9223372036854775806 2**63-2
+9223372036854775806
+select bug20777(9223372036854775807) as '9223372036854775807 2**63-1';
+9223372036854775807 2**63-1
+9223372036854775807
+select bug20777(9223372036854775808) as '9223372036854775808 2**63+0';
+9223372036854775808 2**63+0
+9223372036854775808
+select bug20777(9223372036854775809) as '9223372036854775809 2**63+1';
+9223372036854775809 2**63+1
+9223372036854775809
+select bug20777(9223372036854775810) as '9223372036854775810 2**63+2';
+9223372036854775810 2**63+2
+9223372036854775810
+select bug20777(-9223372036854775808) as 'lower bounds signed bigint';
+lower bounds signed bigint
+0
+select bug20777(9223372036854775807) as 'upper bounds signed bigint';
+upper bounds signed bigint
+9223372036854775807
+select bug20777(0) as 'lower bounds unsigned bigint';
+lower bounds unsigned bigint
+0
+select bug20777(18446744073709551615) as 'upper bounds unsigned bigint';
+upper bounds unsigned bigint
+18446744073709551615
+select bug20777(18446744073709551616) as 'upper bounds unsigned bigint + 1';
+upper bounds unsigned bigint + 1
+18446744073709551615
+select bug20777(-1) as 'lower bounds unsigned bigint - 1';
+lower bounds unsigned bigint - 1
+0
+select bug20777(1.84e+19) as 'submitter value, 1.84e19';
+submitter value, 1.84e19
+9223372036854775808
+create table examplebug20777 as select
+0 as 'i',
+bug20777(9223372036854775806) as '2**63-2',
+bug20777(9223372036854775807) as '2**63-1',
+bug20777(9223372036854775808) as '2**63',
+bug20777(9223372036854775809) as '2**63+1',
+bug20777(18446744073709551614) as '2**64-2',
+bug20777(18446744073709551615) as '2**64-1',
+bug20777(18446744073709551616) as '2**64',
+bug20777(0) as '0',
+bug20777(-1) as '-1';
+insert into examplebug20777 values (1, 9223372036854775806, 9223372036854775807, 223372036854775808, 9223372036854775809, 18446744073709551614, 18446744073709551615, 8446744073709551616, 0, -1);
+show create table examplebug20777;
+Table Create Table
+examplebug20777 CREATE TABLE `examplebug20777` (
+ `i` int(1) NOT NULL default '0',
+ `2**63-2` bigint(20) unsigned default NULL,
+ `2**63-1` bigint(20) unsigned default NULL,
+ `2**63` bigint(20) unsigned default NULL,
+ `2**63+1` bigint(20) unsigned default NULL,
+ `2**64-2` bigint(20) unsigned default NULL,
+ `2**64-1` bigint(20) unsigned default NULL,
+ `2**64` bigint(20) unsigned default NULL,
+ `0` bigint(20) unsigned default NULL,
+ `-1` bigint(20) unsigned default NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+select * from examplebug20777 order by i;
+i 2**63-2 2**63-1 2**63 2**63+1 2**64-2 2**64-1 2**64 0 -1
+0 9223372036854775806 9223372036854775807 9223372036854775808 9223372036854775809 18446744073709551614 18446744073709551615 18446744073709551615 0 0
+1 9223372036854775806 9223372036854775807 223372036854775808 9223372036854775809 18446744073709551614 18446744073709551615 8446744073709551616 0 0
+drop table examplebug20777;
+select bug20777(18446744073709551613)+1;
+bug20777(18446744073709551613)+1
+18446744073709551614
+drop function bug20777;
+End of 5.0 tests.
drop table t1,t2;