mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Bug #57203 Assertion `field_length <= 255' failed.
After the fix for Bug #55077 Assertion failed: width > 0 && to != ((void *)0), file .\dtoa.c we no longer try to allocate a string of length 'field_length' so the asserts are relevant only for ZEROFILL columns. mysql-test/r/select.result: Add test case for Bug#57203 mysql-test/t/select.test: Add test case for Bug#57203 sql/field.cc: Rewrite the DBUG_ASSERTS on field_length.
This commit is contained in:
@ -4189,7 +4189,7 @@ String *Field_float::val_str(String *val_buffer,
|
||||
String *val_ptr __attribute__((unused)))
|
||||
{
|
||||
ASSERT_COLUMN_MARKED_FOR_READ;
|
||||
DBUG_ASSERT(field_length <= MAX_FIELD_CHARLENGTH);
|
||||
DBUG_ASSERT(!zerofill || field_length <= MAX_FIELD_CHARLENGTH);
|
||||
float nr;
|
||||
#ifdef WORDS_BIGENDIAN
|
||||
if (table->s->db_low_byte_first)
|
||||
@ -4512,7 +4512,7 @@ String *Field_double::val_str(String *val_buffer,
|
||||
String *val_ptr __attribute__((unused)))
|
||||
{
|
||||
ASSERT_COLUMN_MARKED_FOR_READ;
|
||||
DBUG_ASSERT(field_length <= MAX_FIELD_CHARLENGTH);
|
||||
DBUG_ASSERT(!zerofill || field_length <= MAX_FIELD_CHARLENGTH);
|
||||
double nr;
|
||||
#ifdef WORDS_BIGENDIAN
|
||||
if (table->s->db_low_byte_first)
|
||||
|
Reference in New Issue
Block a user