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
2f7595ea
Commit
2f7595ea
authored
Feb 16, 2005
by
dean@mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge mysql.com:/home/dellis/bkl/bug-4.1
into mysql.com:/home/dellis/bkl/bug-5.0
parents
877304c0
e7f410a1
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
1 deletion
+21
-1
BitKeeper/etc/logging_ok
BitKeeper/etc/logging_ok
+1
-0
myisam/ft_nlq_search.c
myisam/ft_nlq_search.c
+6
-1
mysql-test/r/fulltext.result
mysql-test/r/fulltext.result
+6
-0
mysql-test/t/fulltext.test
mysql-test/t/fulltext.test
+8
-0
No files found.
BitKeeper/etc/logging_ok
View file @
2f7595ea
...
@@ -38,6 +38,7 @@ brian@zim.(none)
...
@@ -38,6 +38,7 @@ brian@zim.(none)
carsten@tsort.bitbybit.dk
carsten@tsort.bitbybit.dk
cps@silver_beast.(none)
cps@silver_beast.(none)
davida@isil.mysql.com
davida@isil.mysql.com
dean@mysql.com
dellis@goetia.(none)
dellis@goetia.(none)
dlenev@brandersnatch.localdomain
dlenev@brandersnatch.localdomain
dlenev@build.mysql.com
dlenev@build.mysql.com
...
...
myisam/ft_nlq_search.c
View file @
2f7595ea
...
@@ -261,6 +261,10 @@ FT_INFO *ft_init_nlq_search(MI_INFO *info, uint keynr, byte *query,
...
@@ -261,6 +261,10 @@ FT_INFO *ft_init_nlq_search(MI_INFO *info, uint keynr, byte *query,
}
}
/*
If ndocs == 0, this will not allocate RAM for FT_INFO.doc[],
so if ndocs == 0, FT_INFO.doc[] must not be accessed.
*/
dlist
=
(
FT_INFO
*
)
my_malloc
(
sizeof
(
FT_INFO
)
+
dlist
=
(
FT_INFO
*
)
my_malloc
(
sizeof
(
FT_INFO
)
+
sizeof
(
FT_DOC
)
*
(
aio
.
dtree
.
elements_in_tree
-
1
),
sizeof
(
FT_DOC
)
*
(
aio
.
dtree
.
elements_in_tree
-
1
),
MYF
(
0
));
MYF
(
0
));
...
@@ -329,7 +333,8 @@ float ft_nlq_find_relevance(FT_INFO *handler,
...
@@ -329,7 +333,8 @@ float ft_nlq_find_relevance(FT_INFO *handler,
else
else
a
=
c
;
a
=
c
;
}
}
if
(
docs
[
a
].
dpos
==
docid
)
/* bounds check to avoid accessing unallocated handler->doc */
if
(
a
<
handler
->
ndocs
&&
docs
[
a
].
dpos
==
docid
)
return
(
float
)
docs
[
a
].
weight
;
return
(
float
)
docs
[
a
].
weight
;
else
else
return
0
.
0
;
return
0
.
0
;
...
...
mysql-test/r/fulltext.result
View file @
2f7595ea
...
@@ -402,6 +402,12 @@ select count(*) from t1;
...
@@ -402,6 +402,12 @@ select count(*) from t1;
count(*)
count(*)
1
1
drop table t1;
drop table t1;
CREATE TABLE t1 ( a TEXT, FULLTEXT (a) );
INSERT INTO t1 VALUES ('testing ft_nlq_find_relevance');
SELECT MATCH(a) AGAINST ('nosuchword') FROM t1;
MATCH(a) AGAINST ('nosuchword')
0
DROP TABLE t1;
create table t1 (a int primary key, b text, fulltext(b));
create table t1 (a int primary key, b text, fulltext(b));
create table t2 (a int, b text);
create table t2 (a int, b text);
insert t1 values (1, "aaaa"), (2, "bbbb");
insert t1 values (1, "aaaa"), (2, "bbbb");
...
...
mysql-test/t/fulltext.test
View file @
2f7595ea
...
@@ -309,6 +309,14 @@ REPAIR TABLE t1;
...
@@ -309,6 +309,14 @@ REPAIR TABLE t1;
select
count
(
*
)
from
t1
;
select
count
(
*
)
from
t1
;
drop
table
t1
;
drop
table
t1
;
#
# testing out of bounds memory access in ft_nlq_find_relevance()
# (bug#8522); visible in valgrind.
#
CREATE
TABLE
t1
(
a
TEXT
,
FULLTEXT
(
a
)
);
INSERT
INTO
t1
VALUES
(
'testing ft_nlq_find_relevance'
);
SELECT
MATCH
(
a
)
AGAINST
(
'nosuchword'
)
FROM
t1
;
DROP
TABLE
t1
;
#
#
# bug#6784
# bug#6784
# mi_flush_bulk_insert (on dup key error in mi_write)
# mi_flush_bulk_insert (on dup key error in mi_write)
...
...
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