diff options
author | unknown <mhansson@dl145s.mysql.com> | 2007-05-23 14:43:06 +0200 |
---|---|---|
committer | unknown <mhansson@dl145s.mysql.com> | 2007-05-23 14:43:06 +0200 |
commit | 8998080a379f64fc779e79f978e15b43a002e7c5 (patch) | |
tree | f8be640e16878e279b3ede71f412312052092b35 /mysql-test/t/cast.test | |
parent | 1e33cfb36a84b477a468dbcfc1ccc3035a9efb81 (diff) | |
download | mariadb-git-8998080a379f64fc779e79f978e15b43a002e7c5.tar.gz |
Bug #28250: Run-Time Check Failure #3 - The variable 'value' is
being used without being def
Inside method Item_func_unsigned::val_int, the variable value
can be returned without being initialized when the CAST argument
is of type DECIMAL and has a NULL value. This gives a run-time
error when building debug binaries using Visual C++ 2005.
Solution: Initialize value to 0
mysql-test/t/cast.test:
bug#28250: There is no need for an extra test case, but we
recognize that this one catches the bug.
sql/item_func.cc:
bug#28250: initialization of value.
Diffstat (limited to 'mysql-test/t/cast.test')
-rw-r--r-- | mysql-test/t/cast.test | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/mysql-test/t/cast.test b/mysql-test/t/cast.test index 004ef69182d..b665eb86656 100644 --- a/mysql-test/t/cast.test +++ b/mysql-test/t/cast.test @@ -10,7 +10,13 @@ select cast(-5 as unsigned) -1, cast(-5 as unsigned) + 1; select ~5, cast(~5 as signed); explain extended select ~5, cast(~5 as signed); select cast(5 as unsigned) -6.0; -select cast(NULL as signed), cast(1/0 as signed); +select cast(NULL as signed), cast(1/0 as signed); +# +# Bug #28250: Run-Time Check Failure #3 - The variable 'value' is being used +# without being def +# +# The following line causes Run-Time Check Failure on +# binaries built with Visual C++ 2005 select cast(NULL as unsigned), cast(1/0 as unsigned); select cast("A" as binary) = "a", cast(BINARY "a" as CHAR) = "A"; select cast("2001-1-1" as DATE), cast("2001-1-1" as DATETIME); |