Below is the list of changes that have just been committed into a local
4.1 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.2451 05/10/28 23:31:32 sergefp@stripped +3 -0
Fix for BUG#13814: in mi_pack_key(), when processing NULL value for TINYBLOB key
segment,
do advance the source pointer over 2 bytes that specify value length.
mysql-test/t/myisam.test
1.43 05/10/28 23:31:25 sergefp@stripped +18 -0
Testcase for BUG#13814
mysql-test/r/myisam.result
1.55 05/10/28 23:31:25 sergefp@stripped +18 -0
Testcase for BUG#13814
myisam/mi_key.c
1.36 05/10/28 23:31:25 sergefp@stripped +3 -0
Fix for BUG#13814: in mi_pack_key(), when processing NULL value for TINYBLOB key
segment,
do advance the source pointer over 2 bytes that specify value length (for NULL value
the
format is: null_marker 0x01, value length 0x00 0x00, data: 0x00 keyseg->length
times).
We need to advance over 2 bytes separately as keyseg->length doesn't include them.
# 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-4.1-bug13814
--- 1.35/myisam/mi_key.c 2005-06-07 16:09:41 +04:00
+++ 1.36/myisam/mi_key.c 2005-10-28 23:31:25 +04:00
@@ -217,7 +217,10 @@
{
k_length-=length;
if (keyseg->flag & (HA_VAR_LENGTH | HA_BLOB_PART))
+ {
+ old+= 2;
k_length-=2; /* Skip length */
+ }
continue; /* Found NULL */
}
}
--- 1.54/mysql-test/r/myisam.result 2005-10-21 06:29:11 +04:00
+++ 1.55/mysql-test/r/myisam.result 2005-10-28 23:31:25 +04:00
@@ -702,3 +702,21 @@
t1 1 a 3 c A 0 NULL NULL YES BTREE
t1 1 a 4 d A 0 NULL NULL YES BTREE
set myisam_stats_method=DEFAULT;
+drop table t1;
+create table t1(
+cip INT NOT NULL,
+time TIME NOT NULL,
+score INT NOT NULL DEFAULT 0,
+bob TINYBLOB
+);
+insert into t1 (cip, time) VALUES (1, '00:01'), (2, '00:02'), (3,'00:03');
+insert into t1 (cip, bob, time) VALUES (4, 'a', '00:04'), (5, 'b', '00:05'),
+(6, 'c', '00:06');
+select * from t1 where bob is null and cip=1;
+cip time score bob
+1 00:01:00 0 NULL
+create index bug on t1 (bob(22), cip, time);
+select * from t1 where bob is null and cip=1;
+cip time score bob
+1 00:01:00 0 NULL
+drop table t1;
--- 1.42/mysql-test/t/myisam.test 2005-10-21 06:29:11 +04:00
+++ 1.43/mysql-test/t/myisam.test 2005-10-28 23:31:25 +04:00
@@ -656,4 +656,22 @@
show index from t1;
set myisam_stats_method=DEFAULT;
+drop table t1;
+
+# BUG#13814 - key value packed incorrectly for TINYBLOBs
+
+create table t1(
+ cip INT NOT NULL,
+ time TIME NOT NULL,
+ score INT NOT NULL DEFAULT 0,
+ bob TINYBLOB
+);
+
+insert into t1 (cip, time) VALUES (1, '00:01'), (2, '00:02'), (3,'00:03');
+insert into t1 (cip, bob, time) VALUES (4, 'a', '00:04'), (5, 'b', '00:05'),
+ (6, 'c', '00:06');
+select * from t1 where bob is null and cip=1;
+create index bug on t1 (bob(22), cip, time);
+select * from t1 where bob is null and cip=1;
+drop table t1;
# End of 4.1 tests
| Thread |
|---|
| • bk commit into 4.1 tree (sergefp:1.2451) BUG#13814 | Sergey Petrunia | 28 Oct |