mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Manual merge of mysql-trunk into mysql-trunk-merge.
Conflicts: Text conflict in client/mysqlbinlog.cc Text conflict in mysql-test/Makefile.am Text conflict in mysql-test/collections/default.daily Text conflict in mysql-test/r/mysqlbinlog_row_innodb.result Text conflict in mysql-test/suite/rpl/r/rpl_typeconv_innodb.result Text conflict in mysql-test/suite/rpl/t/rpl_get_master_version_and_clock.test Text conflict in mysql-test/suite/rpl/t/rpl_row_create_table.test Text conflict in mysql-test/suite/rpl/t/rpl_slave_skip.test Text conflict in mysql-test/suite/rpl/t/rpl_typeconv_innodb.test Text conflict in mysys/charset.c Text conflict in sql/field.cc Text conflict in sql/field.h Text conflict in sql/item.h Text conflict in sql/item_func.cc Text conflict in sql/log.cc Text conflict in sql/log_event.cc Text conflict in sql/log_event_old.cc Text conflict in sql/mysqld.cc Text conflict in sql/rpl_utility.cc Text conflict in sql/rpl_utility.h Text conflict in sql/set_var.cc Text conflict in sql/share/Makefile.am Text conflict in sql/sql_delete.cc Text conflict in sql/sql_plugin.cc Text conflict in sql/sql_select.cc Text conflict in sql/sql_table.cc Text conflict in storage/example/ha_example.h Text conflict in storage/federated/ha_federated.cc Text conflict in storage/myisammrg/ha_myisammrg.cc Text conflict in storage/myisammrg/myrg_open.c
This commit is contained in:
@ -18,10 +18,25 @@
|
||||
|
||||
/*
|
||||
On Windows, exports from DLL need to be declared
|
||||
Also, plugin needs to be declared as extern "C" because MSVC
|
||||
unlike other compilers, uses C++ mangling for variables not only
|
||||
for functions.
|
||||
*/
|
||||
#if (defined(_WIN32) && defined(MYSQL_DYNAMIC_PLUGIN))
|
||||
#define MYSQL_PLUGIN_EXPORT extern "C" __declspec(dllexport)
|
||||
#else
|
||||
#if defined(_MSC_VER)
|
||||
#if defined(MYSQL_DYNAMIC_PLUGIN)
|
||||
#ifdef __cplusplus
|
||||
#define MYSQL_PLUGIN_EXPORT extern "C" __declspec(dllexport)
|
||||
#else
|
||||
#define MYSQL_PLUGIN_EXPORT __declspec(dllexport)
|
||||
#endif
|
||||
#else /* MYSQL_DYNAMIC_PLUGIN */
|
||||
#ifdef __cplusplus
|
||||
#define MYSQL_PLUGIN_EXPORT extern "C"
|
||||
#else
|
||||
#define MYSQL_PLUGIN_EXPORT
|
||||
#endif
|
||||
#endif /*MYSQL_DYNAMIC_PLUGIN */
|
||||
#else /*_MSC_VER */
|
||||
#define MYSQL_PLUGIN_EXPORT
|
||||
#endif
|
||||
|
||||
@ -88,9 +103,9 @@ typedef struct st_mysql_xid MYSQL_XID;
|
||||
|
||||
#ifndef MYSQL_DYNAMIC_PLUGIN
|
||||
#define __MYSQL_DECLARE_PLUGIN(NAME, VERSION, PSIZE, DECLS) \
|
||||
int VERSION= MYSQL_PLUGIN_INTERFACE_VERSION; \
|
||||
int PSIZE= sizeof(struct st_mysql_plugin); \
|
||||
struct st_mysql_plugin DECLS[]= {
|
||||
MYSQL_PLUGIN_EXPORT int VERSION= MYSQL_PLUGIN_INTERFACE_VERSION; \
|
||||
MYSQL_PLUGIN_EXPORT int PSIZE= sizeof(struct st_mysql_plugin); \
|
||||
MYSQL_PLUGIN_EXPORT struct st_mysql_plugin DECLS[]= {
|
||||
#else
|
||||
#define __MYSQL_DECLARE_PLUGIN(NAME, VERSION, PSIZE, DECLS) \
|
||||
MYSQL_PLUGIN_EXPORT int _mysql_plugin_interface_version_= MYSQL_PLUGIN_INTERFACE_VERSION; \
|
||||
@ -404,191 +419,7 @@ struct st_mysql_plugin
|
||||
/*************************************************************************
|
||||
API for Full-text parser plugin. (MYSQL_FTPARSER_PLUGIN)
|
||||
*/
|
||||
|
||||
#define MYSQL_FTPARSER_INTERFACE_VERSION 0x0100
|
||||
|
||||
/* Parsing modes. Set in MYSQL_FTPARSER_PARAM::mode */
|
||||
enum enum_ftparser_mode
|
||||
{
|
||||
/*
|
||||
Fast and simple mode. This mode is used for indexing, and natural
|
||||
language queries.
|
||||
|
||||
The parser is expected to return only those words that go into the
|
||||
index. Stopwords or too short/long words should not be returned. The
|
||||
'boolean_info' argument of mysql_add_word() does not have to be set.
|
||||
*/
|
||||
MYSQL_FTPARSER_SIMPLE_MODE= 0,
|
||||
|
||||
/*
|
||||
Parse with stopwords mode. This mode is used in boolean searches for
|
||||
"phrase matching."
|
||||
|
||||
The parser is not allowed to ignore words in this mode. Every word
|
||||
should be returned, including stopwords and words that are too short
|
||||
or long. The 'boolean_info' argument of mysql_add_word() does not
|
||||
have to be set.
|
||||
*/
|
||||
MYSQL_FTPARSER_WITH_STOPWORDS= 1,
|
||||
|
||||
/*
|
||||
Parse in boolean mode. This mode is used to parse a boolean query string.
|
||||
|
||||
The parser should provide a valid MYSQL_FTPARSER_BOOLEAN_INFO
|
||||
structure in the 'boolean_info' argument to mysql_add_word().
|
||||
Usually that means that the parser should recognize boolean operators
|
||||
in the parsing stream and set appropriate fields in
|
||||
MYSQL_FTPARSER_BOOLEAN_INFO structure accordingly. As for
|
||||
MYSQL_FTPARSER_WITH_STOPWORDS mode, no word should be ignored.
|
||||
Instead, use FT_TOKEN_STOPWORD for the token type of such a word.
|
||||
*/
|
||||
MYSQL_FTPARSER_FULL_BOOLEAN_INFO= 2
|
||||
};
|
||||
|
||||
/*
|
||||
Token types for boolean mode searching (used for the type member of
|
||||
MYSQL_FTPARSER_BOOLEAN_INFO struct)
|
||||
|
||||
FT_TOKEN_EOF: End of data.
|
||||
FT_TOKEN_WORD: Regular word.
|
||||
FT_TOKEN_LEFT_PAREN: Left parenthesis (start of group/sub-expression).
|
||||
FT_TOKEN_RIGHT_PAREN: Right parenthesis (end of group/sub-expression).
|
||||
FT_TOKEN_STOPWORD: Stopword.
|
||||
*/
|
||||
|
||||
enum enum_ft_token_type
|
||||
{
|
||||
FT_TOKEN_EOF= 0,
|
||||
FT_TOKEN_WORD= 1,
|
||||
FT_TOKEN_LEFT_PAREN= 2,
|
||||
FT_TOKEN_RIGHT_PAREN= 3,
|
||||
FT_TOKEN_STOPWORD= 4
|
||||
};
|
||||
|
||||
/*
|
||||
This structure is used in boolean search mode only. It conveys
|
||||
boolean-mode metadata to the MySQL search engine for every word in
|
||||
the search query. A valid instance of this structure must be filled
|
||||
in by the plugin parser and passed as an argument in the call to
|
||||
mysql_add_word (the callback function in the MYSQL_FTPARSER_PARAM
|
||||
structure) when a query is parsed in boolean mode.
|
||||
|
||||
type: The token type. Should be one of the enum_ft_token_type values.
|
||||
|
||||
yesno: Whether the word must be present for a match to occur:
|
||||
>0 Must be present
|
||||
<0 Must not be present
|
||||
0 Neither; the word is optional but its presence increases the relevance
|
||||
With the default settings of the ft_boolean_syntax system variable,
|
||||
>0 corresponds to the '+' operator, <0 corrresponds to the '-' operator,
|
||||
and 0 means neither operator was used.
|
||||
|
||||
weight_adjust: A weighting factor that determines how much a match
|
||||
for the word counts. Positive values increase, negative - decrease the
|
||||
relative word's importance in the query.
|
||||
|
||||
wasign: The sign of the word's weight in the query. If it's non-negative
|
||||
the match for the word will increase document relevance, if it's
|
||||
negative - decrease (the word becomes a "noise word", the less of it the
|
||||
better).
|
||||
|
||||
trunc: Corresponds to the '*' operator in the default setting of the
|
||||
ft_boolean_syntax system variable.
|
||||
*/
|
||||
|
||||
typedef struct st_mysql_ftparser_boolean_info
|
||||
{
|
||||
enum enum_ft_token_type type;
|
||||
int yesno;
|
||||
int weight_adjust;
|
||||
char wasign;
|
||||
char trunc;
|
||||
/* These are parser state and must be removed. */
|
||||
char prev;
|
||||
char *quot;
|
||||
} MYSQL_FTPARSER_BOOLEAN_INFO;
|
||||
|
||||
/*
|
||||
The following flag means that buffer with a string (document, word)
|
||||
may be overwritten by the caller before the end of the parsing (that is
|
||||
before st_mysql_ftparser::deinit() call). If one needs the string
|
||||
to survive between two successive calls of the parsing function, she
|
||||
needs to save a copy of it. The flag may be set by MySQL before calling
|
||||
st_mysql_ftparser::parse(), or it may be set by a plugin before calling
|
||||
st_mysql_ftparser_param::mysql_parse() or
|
||||
st_mysql_ftparser_param::mysql_add_word().
|
||||
*/
|
||||
#define MYSQL_FTFLAGS_NEED_COPY 1
|
||||
|
||||
/*
|
||||
An argument of the full-text parser plugin. This structure is
|
||||
filled in by MySQL server and passed to the parsing function of the
|
||||
plugin as an in/out parameter.
|
||||
|
||||
mysql_parse: A pointer to the built-in parser implementation of the
|
||||
server. It's set by the server and can be used by the parser plugin
|
||||
to invoke the MySQL default parser. If plugin's role is to extract
|
||||
textual data from .doc, .pdf or .xml content, it might extract
|
||||
plaintext from the content, and then pass the text to the default
|
||||
MySQL parser to be parsed.
|
||||
|
||||
mysql_add_word: A server callback to add a new word. When parsing
|
||||
a document, the server sets this to point at a function that adds
|
||||
the word to MySQL full-text index. When parsing a search query,
|
||||
this function will add the new word to the list of words to search
|
||||
for. The boolean_info argument can be NULL for all cases except
|
||||
when mode is MYSQL_FTPARSER_FULL_BOOLEAN_INFO.
|
||||
|
||||
ftparser_state: A generic pointer. The plugin can set it to point
|
||||
to information to be used internally for its own purposes.
|
||||
|
||||
mysql_ftparam: This is set by the server. It is used by MySQL functions
|
||||
called via mysql_parse() and mysql_add_word() callback. The plugin
|
||||
should not modify it.
|
||||
|
||||
cs: Information about the character set of the document or query string.
|
||||
|
||||
doc: A pointer to the document or query string to be parsed.
|
||||
|
||||
length: Length of the document or query string, in bytes.
|
||||
|
||||
flags: See MYSQL_FTFLAGS_* constants above.
|
||||
|
||||
mode: The parsing mode. With boolean operators, with stopwords, or
|
||||
nothing. See enum_ftparser_mode above.
|
||||
*/
|
||||
|
||||
typedef struct st_mysql_ftparser_param
|
||||
{
|
||||
int (*mysql_parse)(struct st_mysql_ftparser_param *,
|
||||
char *doc, int doc_len);
|
||||
int (*mysql_add_word)(struct st_mysql_ftparser_param *,
|
||||
char *word, int word_len,
|
||||
MYSQL_FTPARSER_BOOLEAN_INFO *boolean_info);
|
||||
void *ftparser_state;
|
||||
void *mysql_ftparam;
|
||||
struct charset_info_st *cs;
|
||||
char *doc;
|
||||
int length;
|
||||
int flags;
|
||||
enum enum_ftparser_mode mode;
|
||||
} MYSQL_FTPARSER_PARAM;
|
||||
|
||||
/*
|
||||
Full-text parser descriptor.
|
||||
|
||||
interface_version is, e.g., MYSQL_FTPARSER_INTERFACE_VERSION.
|
||||
The parsing, initialization, and deinitialization functions are
|
||||
invoked per SQL statement for which the parser is used.
|
||||
*/
|
||||
|
||||
struct st_mysql_ftparser
|
||||
{
|
||||
int interface_version;
|
||||
int (*parse)(MYSQL_FTPARSER_PARAM *param);
|
||||
int (*init)(MYSQL_FTPARSER_PARAM *param);
|
||||
int (*deinit)(MYSQL_FTPARSER_PARAM *param);
|
||||
};
|
||||
#include "plugin_ftparser.h"
|
||||
|
||||
/*************************************************************************
|
||||
API for Storage Engine plugin. (MYSQL_DAEMON_PLUGIN)
|
||||
@ -597,6 +428,17 @@ struct st_mysql_ftparser
|
||||
/* handlertons of different MySQL releases are incompatible */
|
||||
#define MYSQL_DAEMON_INTERFACE_VERSION (MYSQL_VERSION_ID << 8)
|
||||
|
||||
/*
|
||||
Here we define only the descriptor structure, that is referred from
|
||||
st_mysql_plugin.
|
||||
*/
|
||||
|
||||
struct st_mysql_daemon
|
||||
{
|
||||
int interface_version;
|
||||
};
|
||||
|
||||
|
||||
/*************************************************************************
|
||||
API for I_S plugin. (MYSQL_INFORMATION_SCHEMA_PLUGIN)
|
||||
*/
|
||||
@ -604,6 +446,17 @@ struct st_mysql_ftparser
|
||||
/* handlertons of different MySQL releases are incompatible */
|
||||
#define MYSQL_INFORMATION_SCHEMA_INTERFACE_VERSION (MYSQL_VERSION_ID << 8)
|
||||
|
||||
/*
|
||||
Here we define only the descriptor structure, that is referred from
|
||||
st_mysql_plugin.
|
||||
*/
|
||||
|
||||
struct st_mysql_information_schema
|
||||
{
|
||||
int interface_version;
|
||||
};
|
||||
|
||||
|
||||
/*************************************************************************
|
||||
API for Storage Engine plugin. (MYSQL_STORAGE_ENGINE_PLUGIN)
|
||||
*/
|
||||
@ -624,25 +477,6 @@ struct st_mysql_storage_engine
|
||||
|
||||
struct handlerton;
|
||||
|
||||
/*
|
||||
Here we define only the descriptor structure, that is referred from
|
||||
st_mysql_plugin.
|
||||
*/
|
||||
|
||||
struct st_mysql_daemon
|
||||
{
|
||||
int interface_version;
|
||||
};
|
||||
|
||||
/*
|
||||
Here we define only the descriptor structure, that is referred from
|
||||
st_mysql_plugin.
|
||||
*/
|
||||
|
||||
struct st_mysql_information_schema
|
||||
{
|
||||
int interface_version;
|
||||
};
|
||||
|
||||
/*
|
||||
API for Replication plugin. (MYSQL_REPLICATION_PLUGIN)
|
||||
@ -656,7 +490,7 @@ struct st_mysql_information_schema
|
||||
int interface_version;
|
||||
};
|
||||
|
||||
/*
|
||||
/*************************************************************************
|
||||
st_mysql_value struct for reading values from mysqld.
|
||||
Used by server variables framework to parse user-provided values.
|
||||
Will be used for arguments when implementing UDFs.
|
||||
@ -676,6 +510,7 @@ struct st_mysql_value
|
||||
const char *(*val_str)(struct st_mysql_value *, char *buffer, int *length);
|
||||
int (*val_real)(struct st_mysql_value *, double *realbuf);
|
||||
int (*val_int)(struct st_mysql_value *, long long *intbuf);
|
||||
int (*is_unsigned)(struct st_mysql_value *);
|
||||
};
|
||||
|
||||
|
||||
|
@ -76,6 +76,8 @@ struct st_mysql_plugin
|
||||
struct st_mysql_sys_var **system_vars;
|
||||
void * __reserved1;
|
||||
};
|
||||
#include "plugin_ftparser.h"
|
||||
#include "plugin.h"
|
||||
enum enum_ftparser_mode
|
||||
{
|
||||
MYSQL_FTPARSER_SIMPLE_MODE= 0,
|
||||
@ -122,11 +124,6 @@ struct st_mysql_ftparser
|
||||
int (*init)(MYSQL_FTPARSER_PARAM *param);
|
||||
int (*deinit)(MYSQL_FTPARSER_PARAM *param);
|
||||
};
|
||||
struct st_mysql_storage_engine
|
||||
{
|
||||
int interface_version;
|
||||
};
|
||||
struct handlerton;
|
||||
struct st_mysql_daemon
|
||||
{
|
||||
int interface_version;
|
||||
@ -135,6 +132,11 @@ struct st_mysql_information_schema
|
||||
{
|
||||
int interface_version;
|
||||
};
|
||||
struct st_mysql_storage_engine
|
||||
{
|
||||
int interface_version;
|
||||
};
|
||||
struct handlerton;
|
||||
struct Mysql_replication {
|
||||
int interface_version;
|
||||
};
|
||||
@ -144,6 +146,7 @@ struct st_mysql_value
|
||||
const char *(*val_str)(struct st_mysql_value *, char *buffer, int *length);
|
||||
int (*val_real)(struct st_mysql_value *, double *realbuf);
|
||||
int (*val_int)(struct st_mysql_value *, long long *intbuf);
|
||||
int (*is_unsigned)(struct st_mysql_value *);
|
||||
};
|
||||
int thd_in_lock_tables(const void* thd);
|
||||
int thd_tablespace_op(const void* thd);
|
||||
|
97
include/mysql/plugin_audit.h
Normal file
97
include/mysql/plugin_audit.h
Normal file
@ -0,0 +1,97 @@
|
||||
/* Copyright (C) 2007 MySQL AB
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
||||
|
||||
#ifndef _my_audit_h
|
||||
#define _my_audit_h
|
||||
|
||||
/*************************************************************************
|
||||
API for Audit plugin. (MYSQL_AUDIT_PLUGIN)
|
||||
*/
|
||||
|
||||
#include "plugin.h"
|
||||
|
||||
#define MYSQL_AUDIT_CLASS_MASK_SIZE 1
|
||||
|
||||
#define MYSQL_AUDIT_INTERFACE_VERSION 0x0100
|
||||
|
||||
/*
|
||||
The first word in every event class struct indicates the specific
|
||||
class of the event.
|
||||
*/
|
||||
struct mysql_event
|
||||
{
|
||||
int event_class;
|
||||
};
|
||||
|
||||
|
||||
/*************************************************************************
|
||||
AUDIT CLASS : GENERAL
|
||||
|
||||
LOG events occurs before emitting to the general query log.
|
||||
ERROR events occur before transmitting errors to the user.
|
||||
RESULT events occur after transmitting a resultset to the user.
|
||||
*/
|
||||
|
||||
#define MYSQL_AUDIT_GENERAL_CLASS 0
|
||||
#define MYSQL_AUDIT_GENERAL_CLASSMASK (1 << MYSQL_AUDIT_GENERAL_CLASS)
|
||||
#define MYSQL_AUDIT_GENERAL_LOG 0
|
||||
#define MYSQL_AUDIT_GENERAL_ERROR 1
|
||||
#define MYSQL_AUDIT_GENERAL_RESULT 2
|
||||
|
||||
struct mysql_event_general
|
||||
{
|
||||
int event_class;
|
||||
int general_error_code;
|
||||
unsigned long general_thread_id;
|
||||
const char *general_user;
|
||||
unsigned int general_user_length;
|
||||
const char *general_command;
|
||||
unsigned int general_command_length;
|
||||
const char *general_query;
|
||||
unsigned int general_query_length;
|
||||
struct charset_info_st *general_charset;
|
||||
unsigned long long general_time;
|
||||
unsigned long long general_rows;
|
||||
};
|
||||
|
||||
|
||||
/*************************************************************************
|
||||
Here we define the descriptor structure, that is referred from
|
||||
st_mysql_plugin.
|
||||
|
||||
release_thd() event occurs when the event class consumer is to be
|
||||
disassociated from the specified THD. This would typically occur
|
||||
before some operation which may require sleeping - such as when
|
||||
waiting for the next query from the client.
|
||||
|
||||
event_notify() is invoked whenever an event occurs which is of any
|
||||
class for which the plugin has interest. The first word of the
|
||||
mysql_event argument indicates the specific event class and the
|
||||
remainder of the structure is as required for that class.
|
||||
|
||||
class_mask is an array of bits used to indicate what event classes
|
||||
that this plugin wants to receive.
|
||||
*/
|
||||
|
||||
struct st_mysql_audit
|
||||
{
|
||||
int interface_version;
|
||||
void (*release_thd)(MYSQL_THD);
|
||||
void (*event_notify)(MYSQL_THD, const struct mysql_event *);
|
||||
unsigned long class_mask[MYSQL_AUDIT_CLASS_MASK_SIZE];
|
||||
};
|
||||
|
||||
|
||||
#endif
|
211
include/mysql/plugin_ftparser.h
Normal file
211
include/mysql/plugin_ftparser.h
Normal file
@ -0,0 +1,211 @@
|
||||
/* Copyright (C) 2005 MySQL AB
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
||||
|
||||
#ifndef _my_plugin_ftparser_h
|
||||
#define _my_plugin_ftparser_h
|
||||
#include "plugin.h"
|
||||
|
||||
/*************************************************************************
|
||||
API for Full-text parser plugin. (MYSQL_FTPARSER_PLUGIN)
|
||||
*/
|
||||
|
||||
#define MYSQL_FTPARSER_INTERFACE_VERSION 0x0100
|
||||
|
||||
/* Parsing modes. Set in MYSQL_FTPARSER_PARAM::mode */
|
||||
enum enum_ftparser_mode
|
||||
{
|
||||
/*
|
||||
Fast and simple mode. This mode is used for indexing, and natural
|
||||
language queries.
|
||||
|
||||
The parser is expected to return only those words that go into the
|
||||
index. Stopwords or too short/long words should not be returned. The
|
||||
'boolean_info' argument of mysql_add_word() does not have to be set.
|
||||
*/
|
||||
MYSQL_FTPARSER_SIMPLE_MODE= 0,
|
||||
|
||||
/*
|
||||
Parse with stopwords mode. This mode is used in boolean searches for
|
||||
"phrase matching."
|
||||
|
||||
The parser is not allowed to ignore words in this mode. Every word
|
||||
should be returned, including stopwords and words that are too short
|
||||
or long. The 'boolean_info' argument of mysql_add_word() does not
|
||||
have to be set.
|
||||
*/
|
||||
MYSQL_FTPARSER_WITH_STOPWORDS= 1,
|
||||
|
||||
/*
|
||||
Parse in boolean mode. This mode is used to parse a boolean query string.
|
||||
|
||||
The parser should provide a valid MYSQL_FTPARSER_BOOLEAN_INFO
|
||||
structure in the 'boolean_info' argument to mysql_add_word().
|
||||
Usually that means that the parser should recognize boolean operators
|
||||
in the parsing stream and set appropriate fields in
|
||||
MYSQL_FTPARSER_BOOLEAN_INFO structure accordingly. As for
|
||||
MYSQL_FTPARSER_WITH_STOPWORDS mode, no word should be ignored.
|
||||
Instead, use FT_TOKEN_STOPWORD for the token type of such a word.
|
||||
*/
|
||||
MYSQL_FTPARSER_FULL_BOOLEAN_INFO= 2
|
||||
};
|
||||
|
||||
/*
|
||||
Token types for boolean mode searching (used for the type member of
|
||||
MYSQL_FTPARSER_BOOLEAN_INFO struct)
|
||||
|
||||
FT_TOKEN_EOF: End of data.
|
||||
FT_TOKEN_WORD: Regular word.
|
||||
FT_TOKEN_LEFT_PAREN: Left parenthesis (start of group/sub-expression).
|
||||
FT_TOKEN_RIGHT_PAREN: Right parenthesis (end of group/sub-expression).
|
||||
FT_TOKEN_STOPWORD: Stopword.
|
||||
*/
|
||||
|
||||
enum enum_ft_token_type
|
||||
{
|
||||
FT_TOKEN_EOF= 0,
|
||||
FT_TOKEN_WORD= 1,
|
||||
FT_TOKEN_LEFT_PAREN= 2,
|
||||
FT_TOKEN_RIGHT_PAREN= 3,
|
||||
FT_TOKEN_STOPWORD= 4
|
||||
};
|
||||
|
||||
/*
|
||||
This structure is used in boolean search mode only. It conveys
|
||||
boolean-mode metadata to the MySQL search engine for every word in
|
||||
the search query. A valid instance of this structure must be filled
|
||||
in by the plugin parser and passed as an argument in the call to
|
||||
mysql_add_word (the callback function in the MYSQL_FTPARSER_PARAM
|
||||
structure) when a query is parsed in boolean mode.
|
||||
|
||||
type: The token type. Should be one of the enum_ft_token_type values.
|
||||
|
||||
yesno: Whether the word must be present for a match to occur:
|
||||
>0 Must be present
|
||||
<0 Must not be present
|
||||
0 Neither; the word is optional but its presence increases the relevance
|
||||
With the default settings of the ft_boolean_syntax system variable,
|
||||
>0 corresponds to the '+' operator, <0 corrresponds to the '-' operator,
|
||||
and 0 means neither operator was used.
|
||||
|
||||
weight_adjust: A weighting factor that determines how much a match
|
||||
for the word counts. Positive values increase, negative - decrease the
|
||||
relative word's importance in the query.
|
||||
|
||||
wasign: The sign of the word's weight in the query. If it's non-negative
|
||||
the match for the word will increase document relevance, if it's
|
||||
negative - decrease (the word becomes a "noise word", the less of it the
|
||||
better).
|
||||
|
||||
trunc: Corresponds to the '*' operator in the default setting of the
|
||||
ft_boolean_syntax system variable.
|
||||
*/
|
||||
|
||||
typedef struct st_mysql_ftparser_boolean_info
|
||||
{
|
||||
enum enum_ft_token_type type;
|
||||
int yesno;
|
||||
int weight_adjust;
|
||||
char wasign;
|
||||
char trunc;
|
||||
/* These are parser state and must be removed. */
|
||||
char prev;
|
||||
char *quot;
|
||||
} MYSQL_FTPARSER_BOOLEAN_INFO;
|
||||
|
||||
/*
|
||||
The following flag means that buffer with a string (document, word)
|
||||
may be overwritten by the caller before the end of the parsing (that is
|
||||
before st_mysql_ftparser::deinit() call). If one needs the string
|
||||
to survive between two successive calls of the parsing function, she
|
||||
needs to save a copy of it. The flag may be set by MySQL before calling
|
||||
st_mysql_ftparser::parse(), or it may be set by a plugin before calling
|
||||
st_mysql_ftparser_param::mysql_parse() or
|
||||
st_mysql_ftparser_param::mysql_add_word().
|
||||
*/
|
||||
#define MYSQL_FTFLAGS_NEED_COPY 1
|
||||
|
||||
/*
|
||||
An argument of the full-text parser plugin. This structure is
|
||||
filled in by MySQL server and passed to the parsing function of the
|
||||
plugin as an in/out parameter.
|
||||
|
||||
mysql_parse: A pointer to the built-in parser implementation of the
|
||||
server. It's set by the server and can be used by the parser plugin
|
||||
to invoke the MySQL default parser. If plugin's role is to extract
|
||||
textual data from .doc, .pdf or .xml content, it might extract
|
||||
plaintext from the content, and then pass the text to the default
|
||||
MySQL parser to be parsed.
|
||||
|
||||
mysql_add_word: A server callback to add a new word. When parsing
|
||||
a document, the server sets this to point at a function that adds
|
||||
the word to MySQL full-text index. When parsing a search query,
|
||||
this function will add the new word to the list of words to search
|
||||
for. The boolean_info argument can be NULL for all cases except
|
||||
when mode is MYSQL_FTPARSER_FULL_BOOLEAN_INFO.
|
||||
|
||||
ftparser_state: A generic pointer. The plugin can set it to point
|
||||
to information to be used internally for its own purposes.
|
||||
|
||||
mysql_ftparam: This is set by the server. It is used by MySQL functions
|
||||
called via mysql_parse() and mysql_add_word() callback. The plugin
|
||||
should not modify it.
|
||||
|
||||
cs: Information about the character set of the document or query string.
|
||||
|
||||
doc: A pointer to the document or query string to be parsed.
|
||||
|
||||
length: Length of the document or query string, in bytes.
|
||||
|
||||
flags: See MYSQL_FTFLAGS_* constants above.
|
||||
|
||||
mode: The parsing mode. With boolean operators, with stopwords, or
|
||||
nothing. See enum_ftparser_mode above.
|
||||
*/
|
||||
|
||||
typedef struct st_mysql_ftparser_param
|
||||
{
|
||||
int (*mysql_parse)(struct st_mysql_ftparser_param *,
|
||||
char *doc, int doc_len);
|
||||
int (*mysql_add_word)(struct st_mysql_ftparser_param *,
|
||||
char *word, int word_len,
|
||||
MYSQL_FTPARSER_BOOLEAN_INFO *boolean_info);
|
||||
void *ftparser_state;
|
||||
void *mysql_ftparam;
|
||||
struct charset_info_st *cs;
|
||||
char *doc;
|
||||
int length;
|
||||
int flags;
|
||||
enum enum_ftparser_mode mode;
|
||||
} MYSQL_FTPARSER_PARAM;
|
||||
|
||||
/*
|
||||
Full-text parser descriptor.
|
||||
|
||||
interface_version is, e.g., MYSQL_FTPARSER_INTERFACE_VERSION.
|
||||
The parsing, initialization, and deinitialization functions are
|
||||
invoked per SQL statement for which the parser is used.
|
||||
*/
|
||||
|
||||
struct st_mysql_ftparser
|
||||
{
|
||||
int interface_version;
|
||||
int (*parse)(MYSQL_FTPARSER_PARAM *param);
|
||||
int (*init)(MYSQL_FTPARSER_PARAM *param);
|
||||
int (*deinit)(MYSQL_FTPARSER_PARAM *param);
|
||||
};
|
||||
|
||||
|
||||
#endif
|
||||
|
1398
include/mysql/psi/mysql_file.h
Normal file
1398
include/mysql/psi/mysql_file.h
Normal file
File diff suppressed because it is too large
Load Diff
1164
include/mysql/psi/mysql_thread.h
Normal file
1164
include/mysql/psi/mysql_thread.h
Normal file
File diff suppressed because it is too large
Load Diff
1091
include/mysql/psi/psi.h
Normal file
1091
include/mysql/psi/psi.h
Normal file
File diff suppressed because it is too large
Load Diff
26
include/mysql/psi/psi_abi_v1.h
Normal file
26
include/mysql/psi/psi_abi_v1.h
Normal file
@ -0,0 +1,26 @@
|
||||
/* Copyright (C) 2008-2009 Sun Microsystems, Inc
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
||||
|
||||
/**
|
||||
@file mysql/psi/psi_abi_v1.h
|
||||
ABI check for mysql/psi/psi.h, when using PSI_VERSION_1.
|
||||
This file is only used to automate detection of changes between versions.
|
||||
Do not include this file, include mysql/psi/psi.h instead.
|
||||
*/
|
||||
#define USE_PSI_1
|
||||
#define HAVE_PSI_INTERFACE
|
||||
#define _global_h
|
||||
#include "mysql/psi/psi.h"
|
||||
|
244
include/mysql/psi/psi_abi_v1.h.pp
Normal file
244
include/mysql/psi/psi_abi_v1.h.pp
Normal file
@ -0,0 +1,244 @@
|
||||
#include "mysql/psi/psi.h"
|
||||
C_MODE_START
|
||||
struct PSI_mutex;
|
||||
struct PSI_rwlock;
|
||||
struct PSI_cond;
|
||||
struct PSI_table_share;
|
||||
struct PSI_table;
|
||||
struct PSI_thread;
|
||||
struct PSI_file;
|
||||
struct PSI_bootstrap
|
||||
{
|
||||
void* (*get_interface)(int version);
|
||||
};
|
||||
struct PSI_mutex_locker;
|
||||
struct PSI_rwlock_locker;
|
||||
struct PSI_cond_locker;
|
||||
struct PSI_file_locker;
|
||||
enum PSI_mutex_operation
|
||||
{
|
||||
PSI_MUTEX_LOCK= 0,
|
||||
PSI_MUTEX_TRYLOCK= 1
|
||||
};
|
||||
enum PSI_rwlock_operation
|
||||
{
|
||||
PSI_RWLOCK_READLOCK= 0,
|
||||
PSI_RWLOCK_WRITELOCK= 1,
|
||||
PSI_RWLOCK_TRYREADLOCK= 2,
|
||||
PSI_RWLOCK_TRYWRITELOCK= 3
|
||||
};
|
||||
enum PSI_cond_operation
|
||||
{
|
||||
PSI_COND_WAIT= 0,
|
||||
PSI_COND_TIMEDWAIT= 1
|
||||
};
|
||||
enum PSI_file_operation
|
||||
{
|
||||
PSI_FILE_CREATE= 0,
|
||||
PSI_FILE_CREATE_TMP= 1,
|
||||
PSI_FILE_OPEN= 2,
|
||||
PSI_FILE_STREAM_OPEN= 3,
|
||||
PSI_FILE_CLOSE= 4,
|
||||
PSI_FILE_STREAM_CLOSE= 5,
|
||||
PSI_FILE_READ= 6,
|
||||
PSI_FILE_WRITE= 7,
|
||||
PSI_FILE_SEEK= 8,
|
||||
PSI_FILE_TELL= 9,
|
||||
PSI_FILE_FLUSH= 10,
|
||||
PSI_FILE_STAT= 11,
|
||||
PSI_FILE_FSTAT= 12,
|
||||
PSI_FILE_CHSIZE= 13,
|
||||
PSI_FILE_DELETE= 14,
|
||||
PSI_FILE_RENAME= 15,
|
||||
PSI_FILE_SYNC= 16
|
||||
};
|
||||
struct PSI_table_locker;
|
||||
typedef unsigned int PSI_mutex_key;
|
||||
typedef unsigned int PSI_rwlock_key;
|
||||
typedef unsigned int PSI_cond_key;
|
||||
typedef unsigned int PSI_thread_key;
|
||||
typedef unsigned int PSI_file_key;
|
||||
struct PSI_mutex_info_v1
|
||||
{
|
||||
PSI_mutex_key *m_key;
|
||||
const char *m_name;
|
||||
int m_flags;
|
||||
};
|
||||
struct PSI_rwlock_info_v1
|
||||
{
|
||||
PSI_rwlock_key *m_key;
|
||||
const char *m_name;
|
||||
int m_flags;
|
||||
};
|
||||
struct PSI_cond_info_v1
|
||||
{
|
||||
PSI_cond_key *m_key;
|
||||
const char *m_name;
|
||||
int m_flags;
|
||||
};
|
||||
struct PSI_thread_info_v1
|
||||
{
|
||||
PSI_thread_key *m_key;
|
||||
const char *m_name;
|
||||
int m_flags;
|
||||
};
|
||||
struct PSI_file_info_v1
|
||||
{
|
||||
PSI_file_key *m_key;
|
||||
const char *m_name;
|
||||
int m_flags;
|
||||
};
|
||||
typedef void (*register_mutex_v1_t)
|
||||
(const char *category, struct PSI_mutex_info_v1 *info, int count);
|
||||
typedef void (*register_rwlock_v1_t)
|
||||
(const char *category, struct PSI_rwlock_info_v1 *info, int count);
|
||||
typedef void (*register_cond_v1_t)
|
||||
(const char *category, struct PSI_cond_info_v1 *info, int count);
|
||||
typedef void (*register_thread_v1_t)
|
||||
(const char *category, struct PSI_thread_info_v1 *info, int count);
|
||||
typedef void (*register_file_v1_t)
|
||||
(const char *category, struct PSI_file_info_v1 *info, int count);
|
||||
typedef struct PSI_mutex* (*init_mutex_v1_t)
|
||||
(PSI_mutex_key key, const void *identity);
|
||||
typedef void (*destroy_mutex_v1_t)(struct PSI_mutex *mutex);
|
||||
typedef struct PSI_rwlock* (*init_rwlock_v1_t)
|
||||
(PSI_rwlock_key key, const void *identity);
|
||||
typedef void (*destroy_rwlock_v1_t)(struct PSI_rwlock *rwlock);
|
||||
typedef struct PSI_cond* (*init_cond_v1_t)
|
||||
(PSI_cond_key key, const void *identity);
|
||||
typedef void (*destroy_cond_v1_t)(struct PSI_cond *cond);
|
||||
typedef struct PSI_table_share* (*get_table_share_v1_t)
|
||||
(const char *schema_name, int schema_name_length, const char *table_name,
|
||||
int table_name_length, const void *identity);
|
||||
typedef void (*release_table_share_v1_t)(struct PSI_table_share *share);
|
||||
typedef struct PSI_table* (*open_table_v1_t)
|
||||
(struct PSI_table_share *share, const void *identity);
|
||||
typedef void (*close_table_v1_t)(struct PSI_table *table);
|
||||
typedef void (*create_file_v1_t)(PSI_file_key key, const char *name,
|
||||
File file);
|
||||
typedef int (*spawn_thread_v1_t)(PSI_thread_key key,
|
||||
pthread_t *thread,
|
||||
const pthread_attr_t *attr,
|
||||
void *(*start_routine)(void*), void *arg);
|
||||
typedef struct PSI_thread* (*new_thread_v1_t)
|
||||
(PSI_thread_key key, const void *identity, ulong thread_id);
|
||||
typedef void (*set_thread_id_v1_t)(struct PSI_thread *thread,
|
||||
unsigned long id);
|
||||
typedef struct PSI_thread* (*get_thread_v1_t)(void);
|
||||
typedef void (*set_thread_v1_t)(struct PSI_thread *thread);
|
||||
typedef void (*delete_current_thread_v1_t)(void);
|
||||
typedef void (*delete_thread_v1_t)(struct PSI_thread *thread);
|
||||
typedef struct PSI_mutex_locker* (*get_thread_mutex_locker_v1_t)
|
||||
(struct PSI_mutex *mutex, enum PSI_mutex_operation op);
|
||||
typedef struct PSI_rwlock_locker* (*get_thread_rwlock_locker_v1_t)
|
||||
(struct PSI_rwlock *rwlock, enum PSI_rwlock_operation op);
|
||||
typedef struct PSI_cond_locker* (*get_thread_cond_locker_v1_t)
|
||||
(struct PSI_cond *cond, struct PSI_mutex *mutex,
|
||||
enum PSI_cond_operation op);
|
||||
typedef struct PSI_table_locker* (*get_thread_table_locker_v1_t)
|
||||
(struct PSI_table *table);
|
||||
typedef struct PSI_file_locker* (*get_thread_file_name_locker_v1_t)
|
||||
(PSI_file_key key, enum PSI_file_operation op, const char *name,
|
||||
const void *identity);
|
||||
typedef struct PSI_file_locker* (*get_thread_file_stream_locker_v1_t)
|
||||
(struct PSI_file *file, enum PSI_file_operation op);
|
||||
typedef struct PSI_file_locker* (*get_thread_file_descriptor_locker_v1_t)
|
||||
(File file, enum PSI_file_operation op);
|
||||
typedef void (*unlock_mutex_v1_t)
|
||||
(struct PSI_thread *thread, struct PSI_mutex *mutex);
|
||||
typedef void (*unlock_rwlock_v1_t)
|
||||
(struct PSI_thread *thread, struct PSI_rwlock *rwlock);
|
||||
typedef void (*signal_cond_v1_t)
|
||||
(struct PSI_thread *thread, struct PSI_cond *cond);
|
||||
typedef void (*broadcast_cond_v1_t)
|
||||
(struct PSI_thread *thread, struct PSI_cond *cond);
|
||||
typedef void (*start_mutex_wait_v1_t)
|
||||
(struct PSI_mutex_locker *locker, const char *src_file, uint src_line);
|
||||
typedef void (*end_mutex_wait_v1_t)
|
||||
(struct PSI_mutex_locker *locker, int rc);
|
||||
typedef void (*start_rwlock_rdwait_v1_t)
|
||||
(struct PSI_rwlock_locker *locker, const char *src_file, uint src_line);
|
||||
typedef void (*end_rwlock_rdwait_v1_t)
|
||||
(struct PSI_rwlock_locker *locker, int rc);
|
||||
typedef void (*start_rwlock_wrwait_v1_t)
|
||||
(struct PSI_rwlock_locker *locker, const char *src_file, uint src_line);
|
||||
typedef void (*end_rwlock_wrwait_v1_t)
|
||||
(struct PSI_rwlock_locker *locker, int rc);
|
||||
typedef void (*start_cond_wait_v1_t)
|
||||
(struct PSI_cond_locker *locker, const char *src_file, uint src_line);
|
||||
typedef void (*end_cond_wait_v1_t)
|
||||
(struct PSI_cond_locker *locker, int rc);
|
||||
typedef void (*start_table_wait_v1_t)
|
||||
(struct PSI_table_locker *locker, const char *src_file, uint src_line);
|
||||
typedef void (*end_table_wait_v1_t)(struct PSI_table_locker *locker);
|
||||
typedef struct PSI_file* (*start_file_open_wait_v1_t)
|
||||
(struct PSI_file_locker *locker, const char *src_file, uint src_line);
|
||||
typedef void (*end_file_open_wait_v1_t)(struct PSI_file_locker *locker);
|
||||
typedef void (*end_file_open_wait_and_bind_to_descriptor_v1_t)
|
||||
(struct PSI_file_locker *locker, File file);
|
||||
typedef void (*start_file_wait_v1_t)
|
||||
(struct PSI_file_locker *locker, size_t count,
|
||||
const char *src_file, uint src_line);
|
||||
typedef void (*end_file_wait_v1_t)
|
||||
(struct PSI_file_locker *locker, size_t count);
|
||||
struct PSI_v1
|
||||
{
|
||||
register_mutex_v1_t register_mutex;
|
||||
register_rwlock_v1_t register_rwlock;
|
||||
register_cond_v1_t register_cond;
|
||||
register_thread_v1_t register_thread;
|
||||
register_file_v1_t register_file;
|
||||
init_mutex_v1_t init_mutex;
|
||||
destroy_mutex_v1_t destroy_mutex;
|
||||
init_rwlock_v1_t init_rwlock;
|
||||
destroy_rwlock_v1_t destroy_rwlock;
|
||||
init_cond_v1_t init_cond;
|
||||
destroy_cond_v1_t destroy_cond;
|
||||
get_table_share_v1_t get_table_share;
|
||||
release_table_share_v1_t release_table_share;
|
||||
open_table_v1_t open_table;
|
||||
close_table_v1_t close_table;
|
||||
create_file_v1_t create_file;
|
||||
spawn_thread_v1_t spawn_thread;
|
||||
new_thread_v1_t new_thread;
|
||||
set_thread_id_v1_t set_thread_id;
|
||||
get_thread_v1_t get_thread;
|
||||
set_thread_v1_t set_thread;
|
||||
delete_current_thread_v1_t delete_current_thread;
|
||||
delete_thread_v1_t delete_thread;
|
||||
get_thread_mutex_locker_v1_t get_thread_mutex_locker;
|
||||
get_thread_rwlock_locker_v1_t get_thread_rwlock_locker;
|
||||
get_thread_cond_locker_v1_t get_thread_cond_locker;
|
||||
get_thread_table_locker_v1_t get_thread_table_locker;
|
||||
get_thread_file_name_locker_v1_t get_thread_file_name_locker;
|
||||
get_thread_file_stream_locker_v1_t get_thread_file_stream_locker;
|
||||
get_thread_file_descriptor_locker_v1_t get_thread_file_descriptor_locker;
|
||||
unlock_mutex_v1_t unlock_mutex;
|
||||
unlock_rwlock_v1_t unlock_rwlock;
|
||||
signal_cond_v1_t signal_cond;
|
||||
broadcast_cond_v1_t broadcast_cond;
|
||||
start_mutex_wait_v1_t start_mutex_wait;
|
||||
end_mutex_wait_v1_t end_mutex_wait;
|
||||
start_rwlock_rdwait_v1_t start_rwlock_rdwait;
|
||||
end_rwlock_rdwait_v1_t end_rwlock_rdwait;
|
||||
start_rwlock_wrwait_v1_t start_rwlock_wrwait;
|
||||
end_rwlock_wrwait_v1_t end_rwlock_wrwait;
|
||||
start_cond_wait_v1_t start_cond_wait;
|
||||
end_cond_wait_v1_t end_cond_wait;
|
||||
start_table_wait_v1_t start_table_wait;
|
||||
end_table_wait_v1_t end_table_wait;
|
||||
start_file_open_wait_v1_t start_file_open_wait;
|
||||
end_file_open_wait_v1_t end_file_open_wait;
|
||||
end_file_open_wait_and_bind_to_descriptor_v1_t
|
||||
end_file_open_wait_and_bind_to_descriptor;
|
||||
start_file_wait_v1_t start_file_wait;
|
||||
end_file_wait_v1_t end_file_wait;
|
||||
};
|
||||
typedef struct PSI_v1 PSI;
|
||||
typedef struct PSI_mutex_info_v1 PSI_mutex_info;
|
||||
typedef struct PSI_rwlock_info_v1 PSI_rwlock_info;
|
||||
typedef struct PSI_cond_info_v1 PSI_cond_info;
|
||||
typedef struct PSI_thread_info_v1 PSI_thread_info;
|
||||
typedef struct PSI_file_info_v1 PSI_file_info;
|
||||
extern MYSQL_PLUGIN_IMPORT PSI *PSI_server;
|
||||
C_MODE_END
|
26
include/mysql/psi/psi_abi_v2.h
Normal file
26
include/mysql/psi/psi_abi_v2.h
Normal file
@ -0,0 +1,26 @@
|
||||
/* Copyright (C) 2008-2009 Sun Microsystems, Inc
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
||||
|
||||
/**
|
||||
@file mysql/psi/psi_abi_v1.h
|
||||
ABI check for mysql/psi/psi.h, when using PSI_VERSION_2.
|
||||
This file is only used to automate detection of changes between versions.
|
||||
Do not include this file, include mysql/psi/psi.h instead.
|
||||
*/
|
||||
#define USE_PSI_2
|
||||
#define HAVE_PSI_INTERFACE
|
||||
#define _global_h
|
||||
#include "mysql/psi/psi.h"
|
||||
|
92
include/mysql/psi/psi_abi_v2.h.pp
Normal file
92
include/mysql/psi/psi_abi_v2.h.pp
Normal file
@ -0,0 +1,92 @@
|
||||
#include "mysql/psi/psi.h"
|
||||
C_MODE_START
|
||||
struct PSI_mutex;
|
||||
struct PSI_rwlock;
|
||||
struct PSI_cond;
|
||||
struct PSI_table_share;
|
||||
struct PSI_table;
|
||||
struct PSI_thread;
|
||||
struct PSI_file;
|
||||
struct PSI_bootstrap
|
||||
{
|
||||
void* (*get_interface)(int version);
|
||||
};
|
||||
struct PSI_mutex_locker;
|
||||
struct PSI_rwlock_locker;
|
||||
struct PSI_cond_locker;
|
||||
struct PSI_file_locker;
|
||||
enum PSI_mutex_operation
|
||||
{
|
||||
PSI_MUTEX_LOCK= 0,
|
||||
PSI_MUTEX_TRYLOCK= 1
|
||||
};
|
||||
enum PSI_rwlock_operation
|
||||
{
|
||||
PSI_RWLOCK_READLOCK= 0,
|
||||
PSI_RWLOCK_WRITELOCK= 1,
|
||||
PSI_RWLOCK_TRYREADLOCK= 2,
|
||||
PSI_RWLOCK_TRYWRITELOCK= 3
|
||||
};
|
||||
enum PSI_cond_operation
|
||||
{
|
||||
PSI_COND_WAIT= 0,
|
||||
PSI_COND_TIMEDWAIT= 1
|
||||
};
|
||||
enum PSI_file_operation
|
||||
{
|
||||
PSI_FILE_CREATE= 0,
|
||||
PSI_FILE_CREATE_TMP= 1,
|
||||
PSI_FILE_OPEN= 2,
|
||||
PSI_FILE_STREAM_OPEN= 3,
|
||||
PSI_FILE_CLOSE= 4,
|
||||
PSI_FILE_STREAM_CLOSE= 5,
|
||||
PSI_FILE_READ= 6,
|
||||
PSI_FILE_WRITE= 7,
|
||||
PSI_FILE_SEEK= 8,
|
||||
PSI_FILE_TELL= 9,
|
||||
PSI_FILE_FLUSH= 10,
|
||||
PSI_FILE_STAT= 11,
|
||||
PSI_FILE_FSTAT= 12,
|
||||
PSI_FILE_CHSIZE= 13,
|
||||
PSI_FILE_DELETE= 14,
|
||||
PSI_FILE_RENAME= 15,
|
||||
PSI_FILE_SYNC= 16
|
||||
};
|
||||
struct PSI_table_locker;
|
||||
typedef unsigned int PSI_mutex_key;
|
||||
typedef unsigned int PSI_rwlock_key;
|
||||
typedef unsigned int PSI_cond_key;
|
||||
typedef unsigned int PSI_thread_key;
|
||||
typedef unsigned int PSI_file_key;
|
||||
struct PSI_v2
|
||||
{
|
||||
int placeholder;
|
||||
};
|
||||
struct PSI_mutex_info_v2
|
||||
{
|
||||
int placeholder;
|
||||
};
|
||||
struct PSI_rwlock_info_v2
|
||||
{
|
||||
int placeholder;
|
||||
};
|
||||
struct PSI_cond_info_v2
|
||||
{
|
||||
int placeholder;
|
||||
};
|
||||
struct PSI_thread_info_v2
|
||||
{
|
||||
int placeholder;
|
||||
};
|
||||
struct PSI_file_info_v2
|
||||
{
|
||||
int placeholder;
|
||||
};
|
||||
typedef struct PSI_v2 PSI;
|
||||
typedef struct PSI_mutex_info_v2 PSI_mutex_info;
|
||||
typedef struct PSI_rwlock_info_v2 PSI_rwlock_info;
|
||||
typedef struct PSI_cond_info_v2 PSI_cond_info;
|
||||
typedef struct PSI_thread_info_v2 PSI_thread_info;
|
||||
typedef struct PSI_file_info_v2 PSI_file_info;
|
||||
extern MYSQL_PLUGIN_IMPORT PSI *PSI_server;
|
||||
C_MODE_END
|
@ -53,7 +53,7 @@
|
||||
<length modifier> can be 'l', 'll', or 'z'.
|
||||
|
||||
Supported formats are 's' (null pointer is accepted, printed as
|
||||
"(null)"), 'b' (extension, see below), 'c', 'd', 'u', 'x',
|
||||
"(null)"), 'b' (extension, see below), 'c', 'd', 'u', 'x', 'o',
|
||||
'X', 'p' (works as 0x%x).
|
||||
|
||||
Standard syntax for positional arguments $n is supported.
|
||||
|
Reference in New Issue
Block a user