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
fab9fcb0
Commit
fab9fcb0
authored
Aug 01, 2004
by
serg@serg.mylan
Browse files
Options
Browse Files
Download
Plain Diff
Merge bk-internal:/home/bk/mysql-4.0/
into serg.mylan:/usr/home/serg/Abk/mysql-4.0
parents
9de59ad8
f4244cd0
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
0 deletions
+21
-0
myisam/mi_key.c
myisam/mi_key.c
+2
-0
mysql-test/r/myisam.result
mysql-test/r/myisam.result
+9
-0
mysql-test/t/myisam.test
mysql-test/t/myisam.test
+10
-0
No files found.
myisam/mi_key.c
View file @
fab9fcb0
...
...
@@ -177,6 +177,8 @@ uint _mi_pack_key(register MI_INFO *info, uint keynr, uchar *key, uchar *old,
if
(
!
(
*
key
++=
(
char
)
1
-*
old
++
))
/* Copy null marker */
{
k_length
-=
length
;
if
(
keyseg
->
flag
&
(
HA_VAR_LENGTH
|
HA_BLOB_PART
))
k_length
-=
2
;
/* Skip length */
continue
;
/* Found NULL */
}
}
...
...
mysql-test/r/myisam.result
View file @
fab9fcb0
...
...
@@ -453,3 +453,12 @@ table type possible_keys key key_len ref rows Extra
t1 system NULL NULL NULL NULL 1 Using temporary
t2 index NULL PRIMARY 4 NULL 2 Using index; Distinct
drop table t1,t2;
create table t1 ( a tinytext, b char(1), index idx (a(1),b) );
insert into t1 values (null,''), (null,'');
explain select count(*) from t1 where a is null;
table type possible_keys key key_len ref rows Extra
t1 ref idx idx 4 const 1 Using where
select count(*) from t1 where a is null;
count(*)
2
drop table t1;
mysql-test/t/myisam.test
View file @
fab9fcb0
...
...
@@ -436,3 +436,13 @@ select sql_big_result distinct t1.a from t1,t2;
explain
select
sql_big_result
distinct
t1
.
a
from
t1
,
t2
order
by
t2
.
a
;
explain
select
distinct
t1
.
a
from
t1
,
t2
order
by
t2
.
a
;
drop
table
t1
,
t2
;
#
# index search for NULL in blob. Bug #4816
#
create
table
t1
(
a
tinytext
,
b
char
(
1
),
index
idx
(
a
(
1
),
b
)
);
insert
into
t1
values
(
null
,
''
),
(
null
,
''
);
explain
select
count
(
*
)
from
t1
where
a
is
null
;
select
count
(
*
)
from
t1
where
a
is
null
;
drop
table
t1
;
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