Skip to content

Commit cd00d03

Browse files
committed
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.
1 parent 3955d2a commit cd00d03

File tree

3 files changed

+12
-20
lines changed

3 files changed

+12
-20
lines changed

mysql-test/suite/sys_vars/r/sysvars_server_embedded,32bit.rdiff

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -507,15 +507,6 @@
507507
VARIABLE_COMMENT Maximum stored procedure recursion depth
508508
NUMERIC_MIN_VALUE 0
509509
NUMERIC_MAX_VALUE 255
510-
@@ -2261,7 +2261,7 @@
511-
VARIABLE_TYPE BIGINT UNSIGNED
512-
VARIABLE_COMMENT The maximum size of the container of a rowid filter
513-
NUMERIC_MIN_VALUE 1024
514-
-NUMERIC_MAX_VALUE 18446744073709551615
515-
+NUMERIC_MAX_VALUE 4294967295
516-
NUMERIC_BLOCK_SIZE 1
517-
ENUM_VALUE_LIST NULL
518-
READ_ONLY NO
519510
@@ -2284,7 +2284,7 @@
520511
GLOBAL_VALUE_ORIGIN COMPILE-TIME
521512
DEFAULT_VALUE 32

sql/ha_partition.cc

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6346,32 +6346,33 @@ ha_rows ha_partition::multi_range_read_info(uint keyno, uint n_ranges,
63466346
uint i;
63476347
handler **file;
63486348
ha_rows rows;
6349+
Cost_estimate part_cost;
63496350
DBUG_ENTER("ha_partition::multi_range_read_info");
63506351
DBUG_PRINT("enter", ("partition this: %p", this));
63516352

6353+
cost->reset();
6354+
63526355
m_mrr_new_full_buffer_size= 0;
63536356
file= m_file;
63546357
do
63556358
{
63566359
i= (uint)(file - m_file);
63576360
if (bitmap_is_set(&(m_part_info->read_partitions), (i)))
63586361
{
6362+
ha_rows tmp_rows;
63596363
m_mrr_buffer_size[i]= 0;
6360-
if ((rows= (*file)->multi_range_read_info(keyno, n_ranges, keys,
6361-
key_parts,
6362-
&m_mrr_buffer_size[i],
6363-
mrr_mode, cost)))
6364+
part_cost.reset();
6365+
if ((tmp_rows= (*file)->multi_range_read_info(keyno, n_ranges, keys,
6366+
key_parts,
6367+
&m_mrr_buffer_size[i],
6368+
mrr_mode, &part_cost)))
63646369
DBUG_RETURN(rows);
6370+
cost->add(&part_cost);
6371+
rows+= tmp_rows;
63656372
m_mrr_new_full_buffer_size+= m_mrr_buffer_size[i];
63666373
}
63676374
} while (*(++file));
63686375

6369-
cost->reset();
6370-
cost->avg_io_cost= 1;
6371-
if (*mrr_mode & HA_MRR_INDEX_ONLY)
6372-
cost->io_count= keyread_time(keyno, n_ranges, (uint) rows);
6373-
else
6374-
cost->io_count= read_time(keyno, n_ranges, rows);
63756376
DBUG_RETURN(0);
63766377
}
63776378

storage/connect/mysql-test/connect/r/xml.result

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ HEX(c) 3F3F3F3F3F3F3F
323323
Warnings:
324324
Level Warning
325325
Code 1366
326-
Message Incorrect string value: '\xC3\x81\xC3\x82\xC3\x83...' for column 'c' at row 1
326+
Message Incorrect string value: '\xC3\x81\xC3\x82\xC3\x83...' for column `test`.`t1`.`c` at row 1
327327
Level Warning
328328
Code 1105
329329
Message Out of range value ÁÂÃÄÅÆÇ for column 'c' at row 1

0 commit comments

Comments
 (0)