mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Fixed bug#15409: Columns with 64-element SET may not be updated with integers.
SET column storing procedure has been modified to be 64bit-clean.
This commit is contained in:
@ -7871,10 +7871,10 @@ int Field_set::store(const char *from,uint length,CHARSET_INFO *cs)
|
||||
int Field_set::store(longlong nr, bool unsigned_val)
|
||||
{
|
||||
int error= 0;
|
||||
if ((ulonglong) nr > (ulonglong) (((longlong) 1 << typelib->count) -
|
||||
(longlong) 1))
|
||||
ulonglong max_nr= set_bits(ulonglong, typelib->count);
|
||||
if ((ulonglong) nr > max_nr)
|
||||
{
|
||||
nr&= (longlong) (((longlong) 1 << typelib->count) - (longlong) 1);
|
||||
nr&= max_nr;
|
||||
set_warning(MYSQL_ERROR::WARN_LEVEL_WARN, WARN_DATA_TRUNCATED, 1);
|
||||
error=1;
|
||||
}
|
||||
|
Reference in New Issue
Block a user