1
0
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:
Davi Arnaut
2010-07-02 16:38:04 -03:00
60 changed files with 260 additions and 365 deletions

View File

@ -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;