mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Merge of mysql-5.1-bugteam into mysql-trunk-merge.
This commit is contained in:
@ -8280,7 +8280,13 @@ int Field_set::store(longlong nr, bool unsigned_val)
|
||||
{
|
||||
ASSERT_COLUMN_MARKED_FOR_WRITE;
|
||||
int error= 0;
|
||||
ulonglong max_nr= set_bits(ulonglong, typelib->count);
|
||||
ulonglong max_nr;
|
||||
|
||||
if (sizeof(ulonglong)*8 <= typelib->count)
|
||||
max_nr= ULONGLONG_MAX;
|
||||
else
|
||||
max_nr= (ULL(1) << typelib->count) - 1;
|
||||
|
||||
if ((ulonglong) nr > max_nr)
|
||||
{
|
||||
nr&= max_nr;
|
||||
|
Reference in New Issue
Block a user