List:Internals« Previous MessageNext Message »
From:ingo Date:November 15 2005 3:07pm
Subject:bk commit into 4.1 tree (ingo:1.2472)
View as plain text  
Below is the list of changes that have just been committed into a local
4.1 repository of mydev. When mydev 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.2472 05/11/15 16:07:05 ingo@stripped +3 -0
  Merge mysql.com:/home/mydev/mysql-4.0-bug14616
  into  mysql.com:/home/mydev/mysql-4.1-4100

  sql/sql_select.cc
    1.444 05/11/15 16:07:02 ingo@stripped +0 -1
    Bug#14616 - Freshly imported table returns error 124 when using LIMIT
    Manual merge.

  mysql-test/t/myisam.test
    1.44 05/11/15 16:07:02 ingo@stripped +1 -1
    Bug#14616 - Freshly imported table returns error 124 when using LIMIT
    Manual merge.

  mysql-test/r/myisam.result
    1.56 05/11/15 16:07:01 ingo@stripped +1 -1
    Bug#14616 - Freshly imported table returns error 124 when using LIMIT
    Manual merge.

# 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:	ingo
# Host:	chilla.local
# Root:	/home/mydev/mysql-4.1-4100/RESYNC

--- 1.443/sql/sql_select.cc	2005-11-01 15:34:18 +01:00
+++ 1.444/sql/sql_select.cc	2005-11-15 16:07:02 +01:00
@@ -7354,8 +7354,12 @@
   DBUG_ENTER("test_if_skip_sort_order");
   LINT_INIT(ref_key_parts);
 
-  /* Check which keys can be used to resolve ORDER BY */
-  usable_keys.set_all();
+  /*
+    Check which keys can be used to resolve ORDER BY.
+    We must not try to use disabled keys.
+  */
+  usable_keys= table->keys_in_use;
+
   for (ORDER *tmp_order=order; tmp_order ; tmp_order=tmp_order->next)
   {
     if ((*tmp_order->item)->type() != Item::FIELD_ITEM)

--- 1.55/mysql-test/r/myisam.result	2005-10-28 21:31:25 +02:00
+++ 1.56/mysql-test/r/myisam.result	2005-11-15 16:07:01 +01:00
@@ -498,6 +498,16 @@
 1	SIMPLE	t1	system	NULL	NULL	NULL	NULL	1	Using temporary
 1	SIMPLE	t2	index	NULL	PRIMARY	4	NULL	2	Using index; Distinct
 drop table t1,t2;
+drop table t1;
+create table t1 (
+c1 varchar(32),
+key (c1)
+) engine=myisam;
+alter table t1 disable keys;
+insert into t1 values ('a'), ('b');
+select c1 from t1 order by c1 limit 1;
+c1
+a
 CREATE TABLE t1 (`a` int(11) NOT NULL default '0', `b` int(11) NOT NULL default '0', UNIQUE KEY `a` USING RTREE (`a`,`b`)) ENGINE=MyISAM;
 Got one of the listed errors
 create table t1 (a int, b varchar(200), c text not null) checksum=1;

--- 1.43/mysql-test/t/myisam.test	2005-10-28 21:31:25 +02:00
+++ 1.44/mysql-test/t/myisam.test	2005-11-15 16:07:02 +01:00
@@ -474,6 +474,18 @@
 drop table t1,t2;
 
 #
+# Bug#14616 - Freshly imported table returns error 124 when using LIMIT
+#
+create table t1 (
+  c1 varchar(32),
+  key (c1)
+) engine=myisam;
+alter table t1 disable keys;
+insert into t1 values ('a'), ('b');
+select c1 from t1 order by c1 limit 1;
+drop table t1;
+
+#
 # Test RTREE index
 #
 --error 1235, 1289
Thread
bk commit into 4.1 tree (ingo:1.2472)ingo15 Nov