List:Internals« Previous MessageNext Message »
From:Sergey Petrunia Date:September 30 2005 8:23am
Subject:bk commit into 5.0 tree (sergefp:1.2028) BUG#13081
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of psergey. When psergey 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
  1.2028 05/09/30 10:23:05 sergefp@stripped +3 -0
  Proposed fix for BUG#13081 (ROR-index_merge produces incorrect results for NDB tables):

  sql/opt_range.cc
    1.190 05/09/30 10:23:00 sergefp@stripped +3 -0
    Proposed fix for BUG#13081: Add/use HA_INDEX_SCANS_NOT_ROR flag.

  sql/handler.h
    1.155 05/09/30 10:23:00 sergefp@stripped +2 -0
    Proposed fix for BUG#13081: Add/use HA_INDEX_SCANS_NOT_ROR flag.

  sql/ha_ndbcluster.cc
    1.210 05/09/30 10:23:00 sergefp@stripped +1 -1
    Proposed fix for BUG#13081: Add/use HA_INDEX_SCANS_NOT_ROR flag.

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	sergefp
# Host:	newbox.mylan
# Root:	/home/psergey/mysql-5.0-sept30-test

--- 1.154/sql/handler.h	2005-09-23 03:58:04 +04:00
+++ 1.155/sql/handler.h	2005-09-30 10:23:00 +04:00
@@ -89,6 +89,8 @@
 #define HA_NEED_READ_RANGE_BUFFER (1 << 29) /* for read_multi_range */
 #define HA_ANY_INDEX_MAY_BE_UNIQUE (1 << 30)
 
+/* Ordered index scans do not return records in rowid order */
+#define HA_INDEX_SCANS_NOT_ROR (1 << 31)
 
 /* bits in index_flags(index_number) for what you can do with index */
 #define HA_READ_NEXT            1       /* TODO really use this flag */

--- 1.189/sql/opt_range.cc	2005-09-21 21:36:11 +04:00
+++ 1.190/sql/opt_range.cc	2005-09-30 10:23:00 +04:00
@@ -5117,6 +5117,9 @@
     if (cpk_scan)
       param->is_ror_scan= TRUE;
   }
+
+  if (param->table->file->table_flags() & HA_INDEX_SCANS_NOT_ROR)
+    param->is_ror_scan= FALSE;
   DBUG_PRINT("exit", ("Records: %lu", (ulong) records));
   DBUG_RETURN(records);
 }

--- 1.209/sql/ha_ndbcluster.cc	2005-09-28 13:34:49 +04:00
+++ 1.210/sql/ha_ndbcluster.cc	2005-09-30 10:23:00 +04:00
@@ -4203,7 +4203,7 @@
                 HA_AUTO_PART_KEY |
                 HA_NO_PREFIX_CHAR_KEYS |
                 HA_NEED_READ_RANGE_BUFFER |
-                HA_CAN_BIT_FIELD),
+                HA_CAN_BIT_FIELD | HA_INDEX_SCANS_NOT_ROR),
   m_share(0),
   m_use_write(FALSE),
   m_ignore_dup_key(FALSE),
Thread
bk commit into 5.0 tree (sergefp:1.2028) BUG#13081Sergey Petrunia30 Sep