mirror of
https://github.com/MariaDB/server.git
synced 2026-05-15 19:37:16 +02:00
MDEV-736 LP:1004615 - Unexpected warnings "Encountered illegal value '' when converting to DECIMAL" on a query with aggregate functions and GROUP BY
fix: don't call field->val_decimal() if the field->is_null() because the buffer at field->ptr might not hold a valid decimal value sql/item_sum.cc: do not call field->val_decimal() if the field->is_null() storage/maria/ma_blockrec.c: cleanup storage/maria/ma_rrnd.c: cleanup strings/decimal.c: typo
This commit is contained in:
parent
ecf04668a2
commit
13ba0dd286
6 changed files with 38 additions and 12 deletions
|
|
@ -4676,7 +4676,7 @@ int _ma_read_block_record2(MARIA_HA *info, uchar *record,
|
|||
uchar *data, uchar *end_of_data)
|
||||
{
|
||||
MARIA_SHARE *share= info->s;
|
||||
uchar *field_length_data, *blob_buffer, *start_of_data;
|
||||
uchar *UNINIT_VAR(field_length_data), *UNINIT_VAR(blob_buffer), *start_of_data;
|
||||
uint flag, null_bytes, cur_null_bytes, row_extents, field_lengths;
|
||||
my_bool found_blob= 0;
|
||||
MARIA_EXTENT_CURSOR extent;
|
||||
|
|
@ -4684,9 +4684,6 @@ int _ma_read_block_record2(MARIA_HA *info, uchar *record,
|
|||
MARIA_ROW *cur_row= &info->cur_row;
|
||||
DBUG_ENTER("_ma_read_block_record2");
|
||||
|
||||
LINT_INIT(field_length_data);
|
||||
LINT_INIT(blob_buffer);
|
||||
|
||||
start_of_data= data;
|
||||
flag= (uint) (uchar) data[0];
|
||||
cur_null_bytes= share->base.original_null_bytes;
|
||||
|
|
@ -5114,6 +5111,7 @@ int _ma_read_block_record(MARIA_HA *info, uchar *record,
|
|||
uchar *data, *end_of_data, *buff;
|
||||
uint offset;
|
||||
uint block_size= share->block_size;
|
||||
int ret;
|
||||
DBUG_ENTER("_ma_read_block_record");
|
||||
DBUG_PRINT("enter", ("rowid: %lu page: %lu rownr: %u",
|
||||
(ulong) record_pos,
|
||||
|
|
@ -5135,7 +5133,8 @@ int _ma_read_block_record(MARIA_HA *info, uchar *record,
|
|||
my_errno= HA_ERR_RECORD_DELETED; /* File crashed */
|
||||
DBUG_RETURN(HA_ERR_RECORD_DELETED);
|
||||
}
|
||||
DBUG_RETURN(_ma_read_block_record2(info, record, data, end_of_data));
|
||||
ret= _ma_read_block_record2(info, record, data, end_of_data);
|
||||
DBUG_RETURN(ret);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@
|
|||
|
||||
int maria_rrnd(MARIA_HA *info, uchar *buf, MARIA_RECORD_POS filepos)
|
||||
{
|
||||
int ret;
|
||||
DBUG_ENTER("maria_rrnd");
|
||||
|
||||
DBUG_ASSERT(filepos != HA_OFFSET_ERROR);
|
||||
|
|
@ -40,5 +41,6 @@ int maria_rrnd(MARIA_HA *info, uchar *buf, MARIA_RECORD_POS filepos)
|
|||
DBUG_RETURN(my_errno);
|
||||
|
||||
info->cur_row.lastpos= filepos; /* Remember for update */
|
||||
DBUG_RETURN((*info->s->read_record)(info, buf, filepos));
|
||||
ret= (*info->s->read_record)(info, buf, filepos);
|
||||
DBUG_RETURN(ret);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue