MDEV-16188 Fixed the code of ha_partition::multi_range_read_info()

The code was rewritten in the same way as the code of
ha_partition::multi_range_read_info_const() had been rewritten
earlier.

The fix allowed to run spider.partition_mrr.
This commit is contained in:
Igor Babaev 2019-02-10 21:15:48 -08:00
parent 3955d2a153
commit cd00d03fe2
3 changed files with 12 additions and 20 deletions

View file

@ -507,15 +507,6 @@
VARIABLE_COMMENT Maximum stored procedure recursion depth
NUMERIC_MIN_VALUE 0
NUMERIC_MAX_VALUE 255
@@ -2261,7 +2261,7 @@
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT The maximum size of the container of a rowid filter
NUMERIC_MIN_VALUE 1024
-NUMERIC_MAX_VALUE 18446744073709551615
+NUMERIC_MAX_VALUE 4294967295
NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY NO
@@ -2284,7 +2284,7 @@
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 32

View file

@ -6346,9 +6346,12 @@ ha_rows ha_partition::multi_range_read_info(uint keyno, uint n_ranges,
uint i;
handler **file;
ha_rows rows;
Cost_estimate part_cost;
DBUG_ENTER("ha_partition::multi_range_read_info");
DBUG_PRINT("enter", ("partition this: %p", this));
cost->reset();
m_mrr_new_full_buffer_size= 0;
file= m_file;
do
@ -6356,22 +6359,20 @@ ha_rows ha_partition::multi_range_read_info(uint keyno, uint n_ranges,
i= (uint)(file - m_file);
if (bitmap_is_set(&(m_part_info->read_partitions), (i)))
{
ha_rows tmp_rows;
m_mrr_buffer_size[i]= 0;
if ((rows= (*file)->multi_range_read_info(keyno, n_ranges, keys,
key_parts,
&m_mrr_buffer_size[i],
mrr_mode, cost)))
part_cost.reset();
if ((tmp_rows= (*file)->multi_range_read_info(keyno, n_ranges, keys,
key_parts,
&m_mrr_buffer_size[i],
mrr_mode, &part_cost)))
DBUG_RETURN(rows);
cost->add(&part_cost);
rows+= tmp_rows;
m_mrr_new_full_buffer_size+= m_mrr_buffer_size[i];
}
} while (*(++file));
cost->reset();
cost->avg_io_cost= 1;
if (*mrr_mode & HA_MRR_INDEX_ONLY)
cost->io_count= keyread_time(keyno, n_ranges, (uint) rows);
else
cost->io_count= read_time(keyno, n_ranges, rows);
DBUG_RETURN(0);
}

View file

@ -323,7 +323,7 @@ HEX(c) 3F3F3F3F3F3F3F
Warnings:
Level Warning
Code 1366
Message Incorrect string value: '\xC3\x81\xC3\x82\xC3\x83...' for column 'c' at row 1
Message Incorrect string value: '\xC3\x81\xC3\x82\xC3\x83...' for column `test`.`t1`.`c` at row 1
Level Warning
Code 1105
Message Out of range value ÁÂÃÄÅÆÇ for column 'c' at row 1