List:Internals« Previous MessageNext Message »
From:ramil Date:April 26 2005 4:46pm
Subject:bk commit into 5.0 tree (ramil:1.1872) BUG#10176
View as plain text  
Below is the list of changes that have just been committed into a local
5.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://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet
  1.1872 05/04/26 19:46:52 ramil@stripped +5 -0
  A fix (bug #10176: problem with varchar keys).

  mysql-test/r/myisam.result
    1.60 05/04/26 19:46:46 ramil@stripped +9 -0
    A fix (bug #10176: problem with varchar keys).

  mysql-test/r/innodb.result
    1.109 05/04/26 19:46:46 ramil@stripped +9 -0
    A fix (bug #10176: problem with varchar keys).

  mysql-test/r/bdb.result
    1.41 05/04/26 19:46:46 ramil@stripped +9 -0
    A fix (bug #10176: problem with varchar keys).

  mysql-test/include/varchar.inc
    1.7 05/04/26 19:46:46 ramil@stripped +10 -0
    A fix (bug #10176: problem with varchar keys).

  myisam/mi_key.c
    1.39 05/04/26 19:46:46 ramil@stripped +3 -0
    A fix (bug #10176: problem with varchar keys).
    Should skip key pack length for 'old' too.

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

--- 1.38/myisam/mi_key.c	2005-02-25 18:53:15 +04:00
+++ 1.39/myisam/mi_key.c	2005-04-26 19:46:46 +05:00
@@ -242,7 +242,10 @@
       {
 	k_length-=length;
         if (keyseg->flag & (HA_VAR_LENGTH_PART | HA_BLOB_PART))
+        {
           k_length-=2;                                  /* Skip length */
+          old+= 2;
+        }
 	continue;					/* Found NULL */
       }
     }

--- 1.108/mysql-test/r/innodb.result	2005-04-16 20:57:14 +05:00
+++ 1.109/mysql-test/r/innodb.result	2005-04-26 19:46:46 +05:00
@@ -2359,6 +2359,15 @@
 length(v)
 65530
 drop table t1;
+create table t1(a int, b varchar(12), key ba(b, a));
+insert into t1 values (1, 'A'), (20, NULL);
+explain select * from t1 where a=20 and b is null;
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	SIMPLE	t1	ref	ba	ba	20	const,const	1	Using where; Using index
+select * from t1 where a=20 and b is null;
+a	b
+20	NULL
+drop table t1;
 create table t1 (v varchar(65530), key(v));
 ERROR HY000: Can't create table './test/t1' (errno: 139)
 create table t1 (v varchar(65536));

--- 1.59/mysql-test/r/myisam.result	2005-04-16 20:58:09 +05:00
+++ 1.60/mysql-test/r/myisam.result	2005-04-26 19:46:46 +05:00
@@ -1157,6 +1157,15 @@
 length(v)
 65530
 drop table t1;
+create table t1(a int, b varchar(12), key ba(b, a));
+insert into t1 values (1, 'A'), (20, NULL);
+explain select * from t1 where a=20 and b is null;
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	SIMPLE	t1	ref	ba	ba	20	const,const	1	Using where; Using index
+select * from t1 where a=20 and b is null;
+a	b
+20	NULL
+drop table t1;
 create table t1 (v varchar(65530), key(v));
 Warnings:
 Warning	1071	Specified key was too long; max key length is 1000 bytes

--- 1.6/mysql-test/include/varchar.inc	2005-03-17 03:22:07 +04:00
+++ 1.7/mysql-test/include/varchar.inc	2005-04-26 19:46:46 +05:00
@@ -226,3 +226,13 @@
 insert into t1 values(repeat('a',65530));
 select length(v) from t1 where v=repeat('a',65530);
 drop table t1;
+
+#
+# Bug #9489: problem with hash indexes
+#
+
+create table t1(a int, b varchar(12), key ba(b, a));
+insert into t1 values (1, 'A'), (20, NULL);
+explain select * from t1 where a=20 and b is null;
+select * from t1 where a=20 and b is null;
+drop table t1;

--- 1.40/mysql-test/r/bdb.result	2005-02-14 21:45:24 +04:00
+++ 1.41/mysql-test/r/bdb.result	2005-04-26 19:46:46 +05:00
@@ -1858,6 +1858,15 @@
 length(v)
 65530
 drop table t1;
+create table t1(a int, b varchar(12), key ba(b, a));
+insert into t1 values (1, 'A'), (20, NULL);
+explain select * from t1 where a=20 and b is null;
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	SIMPLE	t1	ref	ba	ba	20	const,const	1	Using where
+select * from t1 where a=20 and b is null;
+a	b
+20	NULL
+drop table t1;
 create table t1 (v varchar(65530), key(v));
 Warnings:
 Warning	1071	Specified key was too long; max key length is 255 bytes
Thread
bk commit into 5.0 tree (ramil:1.1872) BUG#10176ramil26 Apr