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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
833af924
Commit
833af924
authored
Nov 04, 2000
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge serg@work:/home/bk/mysql
into serg.mysql.com:/usr/home/serg/Abk/mysql
parents
c5bf28af
4fc59139
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
34 additions
and
28 deletions
+34
-28
include/ft_global.h
include/ft_global.h
+3
-2
sql/ha_myisam.cc
sql/ha_myisam.cc
+2
-1
sql/item_func.cc
sql/item_func.cc
+27
-23
sql/item_func.h
sql/item_func.h
+1
-1
sql/sql_select.cc
sql/sql_select.cc
+1
-1
No files found.
include/ft_global.h
View file @
833af924
...
...
@@ -49,6 +49,7 @@ FT_DOCLIST * ft_init_search(void *, uint, byte *, uint, my_bool);
int
ft_read_next
(
FT_DOCLIST
*
,
char
*
);
#define ft_close_search(handler) my_free(((gptr)(handler)),MYF(0))
#define ft_get_relevance(handler) ((handler)->doc[(handler)->curdoc].weight)
#define ft_reinit_search(handler) (((FT_DOCLIST *)(handler))->curdoc=-1)
#ifdef __cplusplus
}
...
...
sql/ha_myisam.cc
View file @
833af924
...
...
@@ -1088,7 +1088,8 @@ int ha_myisam::ft_read(byte * buf)
thread_safe_increment
(
ha_read_next_count
,
&
LOCK_status
);
// why ?
error
=
ft_read_next
((
FT_DOCLIST
*
)
ft_handler
,(
char
*
)
buf
);
if
(
error
=
ft_read_next
((
FT_DOCLIST
*
)
ft_handler
,(
char
*
)
buf
))
ft_handler
=
NULL
;
// Magic here ! See Item_func_match::val()
table
->
status
=
error
?
STATUS_NOT_FOUND
:
0
;
return
error
;
...
...
sql/item_func.cc
View file @
833af924
...
...
@@ -1846,10 +1846,12 @@ double Item_func_match::val()
if
(
join_key
)
{
if
(
table
->
file
->
ft_handler
)
return
ft_get_relevance
(
ft_handler
);
join_key
=
0
;
// Magic here ! See ha_myisam::ft_read()
}
else
{
/* we'll have to find ft_relevance manually in ft_handler array */
int
a
,
b
,
c
;
...
...
@@ -1872,17 +1874,18 @@ double Item_func_match::val()
return
docs
[
a
].
weight
;
else
return
0.0
;
}
}
void
Item_func_match
::
init_search
()
void
Item_func_match
::
init_search
(
bool
no_order
)
{
if
(
ft_handler
)
return
;
if
(
master
)
{
master
->
init_search
();
join_key
=
master
->
join_key
=
join_key
|
master
->
join_key
;
master
->
init_search
(
no_order
);
ft_handler
=
master
->
ft_handler
;
join_key
=
master
->
join_key
;
return
;
...
...
@@ -1894,7 +1897,8 @@ void Item_func_match::init_search()
ft_tmp
=
key_item
()
->
val_str
(
&
tmp2
);
ft_handler
=
(
FT_DOCLIST
*
)
table
->
file
->
ft_init_ext
(
key
,
(
byte
*
)
ft_tmp
->
ptr
(),
ft_tmp
->
length
(),
join_key
);
table
->
file
->
ft_init_ext
(
key
,
(
byte
*
)
ft_tmp
->
ptr
(),
ft_tmp
->
length
(),
join_key
&&
!
no_order
);
if
(
join_key
)
{
...
...
sql/item_func.h
View file @
833af924
...
...
@@ -863,5 +863,5 @@ class Item_func_match :public Item_real_func
longlong
val_int
()
{
return
val
()
!=
0.0
;
}
bool
fix_index
();
void
init_search
();
void
init_search
(
bool
no_order
);
};
sql/sql_select.cc
View file @
833af924
...
...
@@ -532,7 +532,7 @@ mysql_select(THD *thd,TABLE_LIST *tables,List<Item> &fields,COND *conds,
while
((
ifm
=
li
++
))
{
ifm
->
init_search
();
ifm
->
init_search
(
test
(
order
)
);
}
}
/* Create a tmp table if distinct or if the sort is too complicated */
...
...
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