summaryrefslogtreecommitdiff
path: root/sql/item_subselect.cc
diff options
context:
space:
mode:
authorunknown <gkodinov@mysql.com>2006-05-25 10:39:18 +0300
committerunknown <gkodinov@mysql.com>2006-05-25 10:39:18 +0300
commita2f861f5ad7a0a5610667dc1aeb275785f3d8470 (patch)
treefca1eea3498e6afeb23f9850c96a66089566b74f /sql/item_subselect.cc
parentfc2e96ee7b5bf2c0370310c12ec260705dfe0318 (diff)
downloadmariadb-git-a2f861f5ad7a0a5610667dc1aeb275785f3d8470.tar.gz
Bug #19700: subselect returning BIGINT always returned it as SIGNED
The unsigned flag in Item was not propagated through the single value subqueries. This caused the result to be treated as signed. mysql-test/r/subselect.result: Added testcases for bug #19700 mysql-test/t/subselect.test: Added testcases for bug #19700 sql/item.h: Preserved the unsigned flag in Item_subselect sql/item_subselect.cc: Preserved the unsigned flag in Item_subselect
Diffstat (limited to 'sql/item_subselect.cc')
-rw-r--r--sql/item_subselect.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/sql/item_subselect.cc b/sql/item_subselect.cc
index 87ef0fc080e..dda1b46ab10 100644
--- a/sql/item_subselect.cc
+++ b/sql/item_subselect.cc
@@ -404,6 +404,7 @@ void Item_singlerow_subselect::fix_length_and_dec()
engine->fix_length_and_dec(row);
value= *row;
}
+ unsigned_flag= value->unsigned_flag;
/*
If there are not tables in subquery then ability to have NULL value
depends on SELECT list (if single row subquery have tables then it