Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
29b06fd0
Commit
29b06fd0
authored
Oct 15, 2007
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-5.0-maint
into mysql.com:/home/ram/work/b30885/b30885.5.0
parents
432d42e7
01b3b778
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
0 deletions
+23
-0
heap/hp_hash.c
heap/hp_hash.c
+6
-0
mysql-test/r/heap_btree.result
mysql-test/r/heap_btree.result
+8
-0
mysql-test/t/heap_btree.test
mysql-test/t/heap_btree.test
+9
-0
No files found.
heap/hp_hash.c
View file @
29b06fd0
...
@@ -808,6 +808,12 @@ uint hp_rb_pack_key(HP_KEYDEF *keydef, uchar *key, const uchar *old,
...
@@ -808,6 +808,12 @@ uint hp_rb_pack_key(HP_KEYDEF *keydef, uchar *key, const uchar *old,
if
(
!
(
*
key
++=
(
char
)
1
-
*
old
++
))
if
(
!
(
*
key
++=
(
char
)
1
-
*
old
++
))
{
{
k_len
-=
seg
->
length
;
k_len
-=
seg
->
length
;
/*
Take into account length (2 bytes) of varchar key parts
stored before the data.
*/
if
(
seg
->
flag
&
(
HA_VAR_LENGTH_PART
|
HA_BLOB_PART
))
k_len
-=
2
;
continue
;
continue
;
}
}
}
}
...
...
mysql-test/r/heap_btree.result
View file @
29b06fd0
...
@@ -321,4 +321,12 @@ DROP TABLE t1;
...
@@ -321,4 +321,12 @@ DROP TABLE t1;
CREATE TABLE t1 (a INT, UNIQUE USING BTREE(a)) ENGINE=MEMORY;
CREATE TABLE t1 (a INT, UNIQUE USING BTREE(a)) ENGINE=MEMORY;
INSERT INTO t1 VALUES(NULL),(NULL);
INSERT INTO t1 VALUES(NULL),(NULL);
DROP TABLE t1;
DROP TABLE t1;
create table t1(a varchar(255), b varchar(255),
key using btree (a,b)) engine=memory;
insert into t1 values (1, 1), (3, 3), (2, 2), (NULL, 1), (NULL, NULL), (0, 0);
select * from t1 where a is null;
a b
NULL NULL
NULL 1
drop table t1;
End of 5.0 tests
End of 5.0 tests
mysql-test/t/heap_btree.test
View file @
29b06fd0
...
@@ -235,5 +235,14 @@ CREATE TABLE t1 (a INT, UNIQUE USING BTREE(a)) ENGINE=MEMORY;
...
@@ -235,5 +235,14 @@ CREATE TABLE t1 (a INT, UNIQUE USING BTREE(a)) ENGINE=MEMORY;
INSERT
INTO
t1
VALUES
(
NULL
),(
NULL
);
INSERT
INTO
t1
VALUES
(
NULL
),(
NULL
);
DROP
TABLE
t1
;
DROP
TABLE
t1
;
#
# Bug #30885: MEMORY returns incorrect data if BTREE index is used for NULL lookup
#
create
table
t1
(
a
varchar
(
255
),
b
varchar
(
255
),
key
using
btree
(
a
,
b
))
engine
=
memory
;
insert
into
t1
values
(
1
,
1
),
(
3
,
3
),
(
2
,
2
),
(
NULL
,
1
),
(
NULL
,
NULL
),
(
0
,
0
);
select
*
from
t1
where
a
is
null
;
drop
table
t1
;
--
echo
End
of
5.0
tests
--
echo
End
of
5.0
tests
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment