List:Commits« Previous MessageNext Message »
From:mattiasj Date:December 3 2007 3:12pm
Subject:bk commit into 5.1 tree (mattiasj:1.2675) BUG#30480
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of mattiasj. When mattiasj does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet@stripped, 2007-12-03 16:12:25+01:00, mattiasj@witty. +1 -0
  Bug#30480: Falcon: searches fail if LIKE and key partition
  (also fixes the bugs: Bug#29320, Bug#29493 and Bug#30536)
  
  Problem: Partitioning did not handle unordered scans correctly
  for engines with unordered read order.
  
  Solution: do not stop scanning fi a recored is out of range, since
  there can be more records within the range afterwards.
  
  Note: this is the patch that fixes the bug, but since there are no
  storage engines shipped with mysql 5.1 (falcon comes in 6.0) there
  are no test cases (it is a separate patch that only goes into 6.0)

  sql/ha_partition.cc@stripped, 2007-12-03 16:12:22+01:00, mattiasj@witty. +4 -2
    Bug#30480: Falcon: searches fail if LIKE and key partition
    
    Problem was that partitioning did not handle unordered scans correctly
    for engines with unordered read order.
    
    Solution: do not stop if a recored is out of range, since it can come
    more records within the range afterwards

diff -Nrup a/sql/ha_partition.cc b/sql/ha_partition.cc
--- a/sql/ha_partition.cc	2007-11-14 14:28:18 +01:00
+++ b/sql/ha_partition.cc	2007-12-03 16:12:22 +01:00
@@ -3983,7 +3983,8 @@ int ha_partition::handle_unordered_next(
   }
   else if (!(error= file->index_next(buf)))
   {
-    if (compare_key(end_range) <= 0)
+    if (!(file->table_flags() & HA_READ_ORDER) ||
+        compare_key(end_range) <= 0)
     {
       m_last_part= m_part_spec.start_part;
       DBUG_RETURN(0);                           // Row was in range
@@ -4060,7 +4061,8 @@ int ha_partition::handle_unordered_scan_
     }
     if (!error)
     {
-      if (compare_key(end_range) <= 0)
+      if (!(file->table_flags() & HA_READ_ORDER) ||
+          compare_key(end_range) <= 0)
       {
         m_last_part= i;
         DBUG_RETURN(0);
Thread
bk commit into 5.1 tree (mattiasj:1.2675) BUG#30480mattiasj3 Dec