[Commits] 409ed60bb84: Fix compile failure on Windows: use explicit type casts

psergey sergey at mariadb.com
Sat Nov 16 12:18:24 EET 2019


revision-id: 409ed60bb844252d46127c5df37d23fecf52159f (mariadb-10.3.20-10-g409ed60bb84)
parent(s): 86167e908fe5de6f6e9f5076b4ea8041514d0820
author: Sergei Petrunia
committer: Sergei Petrunia
timestamp: 2019-11-16 13:18:24 +0300
message:

Fix compile failure on Windows: use explicit type casts

---
 sql/multi_range_read.cc | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/sql/multi_range_read.cc b/sql/multi_range_read.cc
index 6d62ea07dfa..5e0afd6edb2 100644
--- a/sql/multi_range_read.cc
+++ b/sql/multi_range_read.cc
@@ -1714,9 +1714,9 @@ bool DsMrr_impl::get_disk_sweep_mrr_cost(uint keynr, ha_rows rows, uint flags,
       Request memory to finish the scan in one pass but do not request
       more than @@mrr_buff_size.
     */
-    *buffer_size = MY_MIN(extra_mem_overhead + rows*elem_size,
-                          MY_MAX(table->in_use->variables.mrr_buff_size,
-                                 extra_mem_overhead));
+    *buffer_size= (uint) MY_MIN(extra_mem_overhead + elem_size*(ulong)rows,
+                                MY_MAX(table->in_use->variables.mrr_buff_size,
+                                       extra_mem_overhead));
   }
 
   if (elem_size + extra_mem_overhead > *buffer_size)


More information about the commits mailing list