1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

Bug# 15968 - Partitions: crash when insert with f1 = -1 into partition by hash(f1)

fixed
This commit is contained in:
reggie@linux.site
2006-01-06 18:52:49 -06:00
parent dca852ff68
commit 557a68327f
3 changed files with 17 additions and 1 deletions

View File

@@ -2327,7 +2327,8 @@ static uint32 get_part_id_hash(uint no_parts,
Item *part_expr)
{
DBUG_ENTER("get_part_id_hash");
DBUG_RETURN((uint32)(part_expr->val_int() % no_parts));
longlong int_hash_id= part_expr->val_int() % no_parts;
DBUG_RETURN(int_hash_id < 0 ? -int_hash_id : int_hash_id);
}