diff options
author | unknown <gkodinov@mysql.com> | 2006-05-25 10:39:18 +0300 |
---|---|---|
committer | unknown <gkodinov@mysql.com> | 2006-05-25 10:39:18 +0300 |
commit | a2f861f5ad7a0a5610667dc1aeb275785f3d8470 (patch) | |
tree | fca1eea3498e6afeb23f9850c96a66089566b74f /sql | |
parent | fc2e96ee7b5bf2c0370310c12ec260705dfe0318 (diff) | |
download | mariadb-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')
-rw-r--r-- | sql/item.h | 1 | ||||
-rw-r--r-- | sql/item_subselect.cc | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/sql/item.h b/sql/item.h index 28b1f54add7..3c93ca2bc55 100644 --- a/sql/item.h +++ b/sql/item.h @@ -2243,6 +2243,7 @@ public: max_length= item->max_length; decimals= item->decimals; collation.set(item->collation); + unsigned_flag= item->unsigned_flag; return 0; }; virtual void store(Item *)= 0; 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 |