logo       
Google Custom Search
    AddThis Social Bookmark Button
-->

bk commit into 4.0 tree (1.1576): msg#00232

Subject: bk commit into 4.0 tree (1.1576)
Below is the list of changes that have just been committed into a local
4.0 repository of ram. When ram 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://www.mysql.com/doc/I/n/Installing_source_tree.html

ChangeSet
  1.1576 03/09/18 11:26:23 ram@xxxxxxxxxxxxxxx +4 -0
  Better fix for the bug #1296 IGNORE INDEX does not work in case of ORDER BY.
  Test case.
  Small optimization (thans Igor for suggestion).

  BitKeeper/etc/logging_ok
    1.288 03/09/18 11:26:22 ram@xxxxxxxxxxxxxxx +1 -0
    Logging to logging@xxxxxxxxxxxxxxx accepted

  sql/sql_select.cc
    1.259 03/09/18 11:25:53 ram@xxxxxxxxxxxxxxx +5 -4
    Better fix for the bug #1296 IGNORE INDEX does not work in case of ORDER BY.
    Small optimization (thans Igor for suggestion).

  mysql-test/t/select.test
    1.22 03/09/18 11:25:53 ram@xxxxxxxxxxxxxxx +9 -0
    Test for the bug #1296 IGNORE INDEX does not work in case of ORDER BY

  mysql-test/r/select.result
    1.30 03/09/18 11:25:53 ram@xxxxxxxxxxxxxxx +9 -0
    Test for the bug #1296 IGNORE INDEX does not work in case of ORDER BY

# 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: ram
# Host: gw.mysql.r18.ru
# Root: /usr/home/ram/work/4.0

--- 1.258/sql/sql_select.cc     Wed Sep 17 22:52:04 2003
+++ 1.259/sql/sql_select.cc     Thu Sep 18 11:25:53 2003
@@ -5847,15 +5847,16 @@
   DBUG_ENTER("test_if_skip_sort_order");
 
   /* Check which keys can be used to resolve ORDER BY */
-  usable_keys= ~(key_map) 0;
-  for (ORDER *tmp_order=order; tmp_order ; tmp_order=tmp_order->next)
+  usable_keys= table->keys_in_use_for_query;
+  for (ORDER *tmp_order= order; tmp_order && usable_keys;
+       tmp_order= tmp_order->next)
   {
     if ((*tmp_order->item)->type() != Item::FIELD_ITEM)
     {
-      usable_keys=0;
+      usable_keys= 0;
       break;
     }
-    usable_keys&=((Item_field*) (*tmp_order->item))->field->part_of_sortkey;
+    usable_keys&= ((Item_field*) (*tmp_order->item))->field->part_of_sortkey;
   }
 
   ref_key= -1;

--- 1.287/BitKeeper/etc/logging_ok      Fri Sep  5 17:44:20 2003
+++ 1.288/BitKeeper/etc/logging_ok      Thu Sep 18 11:26:22 2003
@@ -85,6 +85,7 @@
 peter@xxxxxxxxx
 peterg@xxxxxxxxx
 pgulutzan@xxxxxxxxxxx
+ram@xxxxxxxxxxxxxxx
 ram@xxxxxxxxxxxx
 ram@ram.(none)
 ranger@xxxxxxxxxxxxxx

--- 1.29/mysql-test/r/select.result     Tue Sep 16 21:28:12 2003
+++ 1.30/mysql-test/r/select.result     Thu Sep 18 11:25:53 2003
@@ -2307,3 +2307,12 @@
 id1    id2     id3     id4     id44
 1      1       NULL    NULL    NULL
 drop table t1,t2,t3,t4;
+CREATE TABLE t1 (i INT NOT NULL, KEY i (i));
+INSERT INTO t1 VALUES (10), (2), (3), (4), (5), (6), (7), (8), (9), (1);
+EXPLAIN SELECT i from t1 IGNORE INDEX (i) ORDER BY i;
+table  type    possible_keys   key     key_len ref     rows    Extra
+t1     ALL     NULL    NULL    NULL    NULL    10      Using filesort
+EXPLAIN SELECT i from t1 IGNORE INDEX (i) ORDER BY i LIMIT 0,1;
+table  type    possible_keys   key     key_len ref     rows    Extra
+t1     ALL     NULL    NULL    NULL    NULL    10      Using filesort
+DROP TABLE t1;

--- 1.21/mysql-test/t/select.test       Tue Sep 16 21:28:12 2003
+++ 1.22/mysql-test/t/select.test       Thu Sep 18 11:25:53 2003
@@ -1858,3 +1858,12 @@
 
 drop table t1,t2,t3,t4;
 
+#
+# 'ignore index' and 'order by' (Bug #1296)
+#
+
+CREATE TABLE t1 (i INT NOT NULL, KEY i (i));
+INSERT INTO t1 VALUES (10), (2), (3), (4), (5), (6), (7), (8), (9), (1);
+EXPLAIN SELECT i from t1 IGNORE INDEX (i) ORDER BY i;
+EXPLAIN SELECT i from t1 IGNORE INDEX (i) ORDER BY i LIMIT 0,1;
+DROP TABLE t1;

-- 
MySQL Internals Mailing List
For list archives: http://lists.mysql.com/internals
To unsubscribe:    
http://lists.mysql.com/internals?unsub=gcdmd-internals@xxxxxxxxxxx




<Prev in Thread] Current Thread [Next in Thread>