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
cbd98c01
Commit
cbd98c01
authored
Jan 26, 2006
by
serg@serg.mylan
Browse files
Options
Browse Files
Download
Plain Diff
Merge bk-internal.mysql.com:/home/bk/mysql-5.1-new
into serg.mylan:/usr/home/serg/Abk/mysql-5.1
parents
86096789
028c7a26
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
24 additions
and
25 deletions
+24
-25
include/plugin.h
include/plugin.h
+10
-10
plugin/fulltext/plugin_example.c
plugin/fulltext/plugin_example.c
+3
-4
sql/Makefile.am
sql/Makefile.am
+1
-1
storage/myisam/ft_boolean_search.c
storage/myisam/ft_boolean_search.c
+10
-10
No files found.
include/plugin.h
View file @
cbd98c01
...
@@ -75,7 +75,7 @@ struct st_mysql_plugin
...
@@ -75,7 +75,7 @@ struct st_mysql_plugin
const
char
*
descr
;
/* general descriptive text (for SHOW PLUGINS ) */
const
char
*
descr
;
/* general descriptive text (for SHOW PLUGINS ) */
int
(
*
init
)(
void
);
/* the function to invoke when plugin is loaded */
int
(
*
init
)(
void
);
/* the function to invoke when plugin is loaded */
int
(
*
deinit
)(
void
);
/* the function to invoke when plugin is unloaded */
int
(
*
deinit
)(
void
);
/* the function to invoke when plugin is unloaded */
u
int
version
;
/* plugin version (for SHOW PLUGINS) */
u
nsigned
int
version
;
/* plugin version (for SHOW PLUGINS) */
struct
st_mysql_show_var
*
status_vars
;
struct
st_mysql_show_var
*
status_vars
;
};
};
...
@@ -176,11 +176,11 @@ typedef struct st_mysql_ftparser_boolean_info
...
@@ -176,11 +176,11 @@ typedef struct st_mysql_ftparser_boolean_info
enum
enum_ft_token_type
type
;
enum
enum_ft_token_type
type
;
int
yesno
;
int
yesno
;
int
weight_adjust
;
int
weight_adjust
;
bool
wasign
;
char
wasign
;
bool
trunc
;
char
trunc
;
/* These are parser state and must be removed. */
/* These are parser state and must be removed. */
byte
prev
;
char
prev
;
byte
*
quot
;
char
*
quot
;
}
MYSQL_FTPARSER_BOOLEAN_INFO
;
}
MYSQL_FTPARSER_BOOLEAN_INFO
;
...
@@ -224,14 +224,14 @@ typedef struct st_mysql_ftparser_boolean_info
...
@@ -224,14 +224,14 @@ typedef struct st_mysql_ftparser_boolean_info
typedef
struct
st_mysql_ftparser_param
typedef
struct
st_mysql_ftparser_param
{
{
int
(
*
mysql_parse
)(
void
*
param
,
byte
*
doc
,
u
int
doc_len
);
int
(
*
mysql_parse
)(
void
*
param
,
char
*
doc
,
int
doc_len
);
int
(
*
mysql_add_word
)(
void
*
param
,
byte
*
word
,
u
int
word_len
,
int
(
*
mysql_add_word
)(
void
*
param
,
char
*
word
,
int
word_len
,
MYSQL_FTPARSER_BOOLEAN_INFO
*
boolean_info
);
MYSQL_FTPARSER_BOOLEAN_INFO
*
boolean_info
);
void
*
ftparser_state
;
void
*
ftparser_state
;
void
*
mysql_ftparam
;
void
*
mysql_ftparam
;
CHARSET_INFO
*
cs
;
struct
charset_info_st
*
cs
;
byte
*
doc
;
char
*
doc
;
u
int
length
;
int
length
;
int
mode
;
int
mode
;
}
MYSQL_FTPARSER_PARAM
;
}
MYSQL_FTPARSER_PARAM
;
...
...
plugin/fulltext/plugin_example.c
View file @
cbd98c01
...
@@ -13,9 +13,8 @@
...
@@ -13,9 +13,8 @@
along with this program; if not, write to the Free Software
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
#include <my_global.h>
#include <stdlib.h>
#include <m_string.h>
#include <ctype.h>
#include <m_ctype.h>
#include <plugin.h>
#include <plugin.h>
long
number_of_calls
=
0
;
/* for SHOW STATUS, see below */
long
number_of_calls
=
0
;
/* for SHOW STATUS, see below */
...
@@ -181,7 +180,7 @@ int simple_parser_parse(MYSQL_FTPARSER_PARAM *param)
...
@@ -181,7 +180,7 @@ int simple_parser_parse(MYSQL_FTPARSER_PARAM *param)
add_word
(
param
,
start
,
end
-
start
);
add_word
(
param
,
start
,
end
-
start
);
break
;
break
;
}
}
else
if
(
my_isspace
(
param
->
cs
,
*
end
))
else
if
(
isspace
(
*
end
))
{
{
if
(
end
>
start
)
if
(
end
>
start
)
add_word
(
param
,
start
,
end
-
start
);
add_word
(
param
,
start
,
end
-
start
);
...
...
sql/Makefile.am
View file @
cbd98c01
...
@@ -124,7 +124,7 @@ DEFS = -DMYSQL_SERVER \
...
@@ -124,7 +124,7 @@ DEFS = -DMYSQL_SERVER \
BUILT_SOURCES
=
sql_yacc.cc sql_yacc.h lex_hash.h
BUILT_SOURCES
=
sql_yacc.cc sql_yacc.h lex_hash.h
EXTRA_DIST
=
udf_example.cc handlerton-win.cc
$(BUILT_SOURCES)
EXTRA_DIST
=
udf_example.cc handlerton-win.cc
$(BUILT_SOURCES)
DISTCLEANFILES
=
lex_hash
.h
CLEANFILES
=
lex_hash.h sql_yacc.cc sql_yacc
.h
AM_YFLAGS
=
-d
AM_YFLAGS
=
-d
mysql_tzinfo_to_sql.cc
:
mysql_tzinfo_to_sql.cc
:
...
...
storage/myisam/ft_boolean_search.c
View file @
cbd98c01
...
@@ -165,7 +165,7 @@ typedef struct st_my_ftb_param
...
@@ -165,7 +165,7 @@ typedef struct st_my_ftb_param
}
MY_FTB_PARAM
;
}
MY_FTB_PARAM
;
static
int
ftb_query_add_word
(
void
*
param
,
byte
*
word
,
u
int
word_len
,
static
int
ftb_query_add_word
(
void
*
param
,
char
*
word
,
int
word_len
,
MYSQL_FTPARSER_BOOLEAN_INFO
*
info
)
MYSQL_FTPARSER_BOOLEAN_INFO
*
info
)
{
{
MY_FTB_PARAM
*
ftb_param
=
(
MY_FTB_PARAM
*
)
param
;
MY_FTB_PARAM
*
ftb_param
=
(
MY_FTB_PARAM
*
)
param
;
...
@@ -264,13 +264,13 @@ static int ftb_query_add_word(void *param, byte *word, uint word_len,
...
@@ -264,13 +264,13 @@ static int ftb_query_add_word(void *param, byte *word, uint word_len,
}
}
static
int
ftb_parse_query_internal
(
void
*
param
,
byte
*
query
,
u
int
len
)
static
int
ftb_parse_query_internal
(
void
*
param
,
char
*
query
,
int
len
)
{
{
MY_FTB_PARAM
*
ftb_param
=
(
MY_FTB_PARAM
*
)
param
;
MY_FTB_PARAM
*
ftb_param
=
(
MY_FTB_PARAM
*
)
param
;
MYSQL_FTPARSER_BOOLEAN_INFO
info
;
MYSQL_FTPARSER_BOOLEAN_INFO
info
;
CHARSET_INFO
*
cs
=
ftb_param
->
ftb
->
charset
;
CHARSET_INFO
*
cs
=
ftb_param
->
ftb
->
charset
;
byte
**
start
=
&
query
;
char
**
start
=
&
query
;
byte
*
end
=
query
+
len
;
char
*
end
=
query
+
len
;
FT_WORD
w
;
FT_WORD
w
;
info
.
prev
=
' '
;
info
.
prev
=
' '
;
...
@@ -571,7 +571,7 @@ typedef struct st_my_ftb_phrase_param
...
@@ -571,7 +571,7 @@ typedef struct st_my_ftb_phrase_param
}
MY_FTB_PHRASE_PARAM
;
}
MY_FTB_PHRASE_PARAM
;
static
int
ftb_phrase_add_word
(
void
*
param
,
byte
*
word
,
u
int
word_len
,
static
int
ftb_phrase_add_word
(
void
*
param
,
char
*
word
,
int
word_len
,
MYSQL_FTPARSER_BOOLEAN_INFO
*
boolean_info
__attribute__
((
unused
)))
MYSQL_FTPARSER_BOOLEAN_INFO
*
boolean_info
__attribute__
((
unused
)))
{
{
MY_FTB_PHRASE_PARAM
*
phrase_param
=
(
MY_FTB_PHRASE_PARAM
*
)
param
;
MY_FTB_PHRASE_PARAM
*
phrase_param
=
(
MY_FTB_PHRASE_PARAM
*
)
param
;
...
@@ -601,11 +601,11 @@ static int ftb_phrase_add_word(void *param, byte *word, uint word_len,
...
@@ -601,11 +601,11 @@ static int ftb_phrase_add_word(void *param, byte *word, uint word_len,
}
}
static
int
ftb_check_phrase_internal
(
void
*
param
,
byte
*
document
,
u
int
len
)
static
int
ftb_check_phrase_internal
(
void
*
param
,
char
*
document
,
int
len
)
{
{
FT_WORD
word
;
FT_WORD
word
;
MY_FTB_PHRASE_PARAM
*
phrase_param
=
(
MY_FTB_PHRASE_PARAM
*
)
param
;
MY_FTB_PHRASE_PARAM
*
phrase_param
=
(
MY_FTB_PHRASE_PARAM
*
)
param
;
const
byte
*
docend
=
document
+
len
;
const
char
*
docend
=
document
+
len
;
while
(
ft_simple_get_word
(
phrase_param
->
cs
,
&
document
,
docend
,
&
word
,
FALSE
))
while
(
ft_simple_get_word
(
phrase_param
->
cs
,
&
document
,
docend
,
&
word
,
FALSE
))
{
{
ftb_phrase_add_word
(
param
,
word
.
pos
,
word
.
len
,
0
);
ftb_phrase_add_word
(
param
,
word
.
pos
,
word
.
len
,
0
);
...
@@ -812,7 +812,7 @@ typedef struct st_my_ftb_find_param
...
@@ -812,7 +812,7 @@ typedef struct st_my_ftb_find_param
}
MY_FTB_FIND_PARAM
;
}
MY_FTB_FIND_PARAM
;
static
int
ftb_find_relevance_add_word
(
void
*
param
,
byte
*
word
,
u
int
len
,
static
int
ftb_find_relevance_add_word
(
void
*
param
,
char
*
word
,
int
len
,
MYSQL_FTPARSER_BOOLEAN_INFO
*
boolean_info
__attribute__
((
unused
)))
MYSQL_FTPARSER_BOOLEAN_INFO
*
boolean_info
__attribute__
((
unused
)))
{
{
MY_FTB_FIND_PARAM
*
ftb_param
=
(
MY_FTB_FIND_PARAM
*
)
param
;
MY_FTB_FIND_PARAM
*
ftb_param
=
(
MY_FTB_FIND_PARAM
*
)
param
;
...
@@ -845,10 +845,10 @@ static int ftb_find_relevance_add_word(void *param, byte *word, uint len,
...
@@ -845,10 +845,10 @@ static int ftb_find_relevance_add_word(void *param, byte *word, uint len,
}
}
static
int
ftb_find_relevance_parse
(
void
*
param
,
byte
*
doc
,
u
int
len
)
static
int
ftb_find_relevance_parse
(
void
*
param
,
char
*
doc
,
int
len
)
{
{
FT_INFO
*
ftb
=
((
MY_FTB_FIND_PARAM
*
)
param
)
->
ftb
;
FT_INFO
*
ftb
=
((
MY_FTB_FIND_PARAM
*
)
param
)
->
ftb
;
byte
*
end
=
doc
+
len
;
char
*
end
=
doc
+
len
;
FT_WORD
w
;
FT_WORD
w
;
while
(
ft_simple_get_word
(
ftb
->
charset
,
&
doc
,
end
,
&
w
,
TRUE
))
while
(
ft_simple_get_word
(
ftb
->
charset
,
&
doc
,
end
,
&
w
,
TRUE
))
ftb_find_relevance_add_word
(
param
,
w
.
pos
,
w
.
len
,
0
);
ftb_find_relevance_add_word
(
param
,
w
.
pos
,
w
.
len
,
0
);
...
...
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