Commit 7ba944c4 authored by Gleb Shchepa's avatar Gleb Shchepa

auto-merge 5.1-->5.5 (bug 11766094)

parents 8e2b0dc6 7aa81e2a
......@@ -1737,6 +1737,15 @@ SELECT MIN(GET_LOCK('aaaaaaaaaaaaaaaaa',0) / '0b11111111111111111111111111111111
SELECT MIN(GET_LOCK('aaaaaaaaaaaaaaaaa',0) / '0b1111111111111111111111111111111111111111111111111111111111111111111111111' ^ (RAND()));
SELECT RELEASE_LOCK('aaaaaaaaaaaaaaaaa');
#
# Bug #11766094 - 59132: MIN() AND MAX() REMOVE UNSIGNEDNESS
#
CREATE TABLE t1 (a BIGINT UNSIGNED);
INSERT INTO t1 VALUES (18446668621106209655);
SELECT MAX(LENGTH(a)), LENGTH(MAX(a)), MIN(a), MAX(a), CONCAT(MIN(a)), CONCAT(MAX(a)) FROM t1;
MAX(LENGTH(a)) LENGTH(MAX(a)) MIN(a) MAX(a) CONCAT(MIN(a)) CONCAT(MAX(a))
20 20 18446668621106209655 18446668621106209655 18446668621106209655 18446668621106209655
DROP TABLE t1;
#
End of 5.1 tests
#
# Bug#52123 Assertion failed: aggregator == aggr->Aggrtype(),
......
......@@ -1117,6 +1117,16 @@ SELECT RELEASE_LOCK('aaaaaaaaaaaaaaaaa');
--enable_result_log
--echo #
--echo # Bug #11766094 - 59132: MIN() AND MAX() REMOVE UNSIGNEDNESS
--echo #
CREATE TABLE t1 (a BIGINT UNSIGNED);
INSERT INTO t1 VALUES (18446668621106209655);
SELECT MAX(LENGTH(a)), LENGTH(MAX(a)), MIN(a), MAX(a), CONCAT(MIN(a)), CONCAT(MAX(a)) FROM t1;
DROP TABLE t1;
--echo #
--echo End of 5.1 tests
......
......@@ -7472,7 +7472,7 @@ String *Item_cache_int::val_str(String *str)
DBUG_ASSERT(fixed == 1);
if (!has_value())
return NULL;
str->set(value, default_charset());
str->set_int(value, unsigned_flag, default_charset());
return str;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment