mirror of
https://github.com/MariaDB/server.git
synced 2025-03-24 16:08:42 +01:00
Bug #28005 Partitions: can't use -9223372036854775808
the Item_neg changes INT_RESULT with DECIMAL_RESULT when it gets this border value, what is not necessary. mysql-test/r/partition.result: result added mysql-test/t/partition.test: testcase sql/item_func.cc: we can handle '==' case in ordinary way - no need to use DECIMAL_RESULT
This commit is contained in:
parent
0c835da803
commit
e449dcfe66
3 changed files with 9 additions and 1 deletions
|
@ -1233,4 +1233,6 @@ select * from t1;
|
|||
c1 c2
|
||||
aaa 2
|
||||
drop table t1;
|
||||
create table t1 (s1 bigint) partition by list (s1) (partition p1 values in (-9223372036854775808));
|
||||
drop table t1;
|
||||
End of 5.1 tests
|
||||
|
|
|
@ -1441,5 +1441,11 @@ insert into t1 values ('aaa','1') on duplicate key update c2 = c2 + 1;
|
|||
select * from t1;
|
||||
drop table t1;
|
||||
|
||||
#
|
||||
# Bug #28005 Partitions: can't use -9223372036854775808
|
||||
#
|
||||
|
||||
create table t1 (s1 bigint) partition by list (s1) (partition p1 values in (-9223372036854775808));
|
||||
drop table t1;
|
||||
|
||||
--echo End of 5.1 tests
|
||||
|
|
|
@ -1483,7 +1483,7 @@ void Item_func_neg::fix_length_and_dec()
|
|||
*/
|
||||
if (hybrid_type == INT_RESULT &&
|
||||
args[0]->type() == INT_ITEM &&
|
||||
((ulonglong) args[0]->val_int() >= (ulonglong) LONGLONG_MIN))
|
||||
((ulonglong) args[0]->val_int() > (ulonglong) LONGLONG_MIN))
|
||||
{
|
||||
/*
|
||||
Ensure that result is converted to DECIMAL, as longlong can't hold
|
||||
|
|
Loading…
Add table
Reference in a new issue