~ubuntu-branches/ubuntu/trusty/mariadb-5.5/trusty-proposed

« back to all changes in this revision

Viewing changes to include/mysql/plugin_ftparser.h.pp

  • Committer: Package Import Robot
  • Author(s): Otto Kekäläinen
  • Date: 2013-12-22 10:27:05 UTC
  • Revision ID: package-import@ubuntu.com-20131222102705-mndw7s12mz0szrcn
Tags: upstream-5.5.32
Import upstream version 5.5.32

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#include "plugin.h"
 
2
#include <mysql/services.h>
 
3
#include <mysql/service_my_snprintf.h>
 
4
extern struct my_snprintf_service_st {
 
5
  size_t (*my_snprintf_type)(char*, size_t, const char*, ...);
 
6
  size_t (*my_vsnprintf_type)(char *, size_t, const char*, va_list);
 
7
} *my_snprintf_service;
 
8
size_t my_snprintf(char* to, size_t n, const char* fmt, ...);
 
9
size_t my_vsnprintf(char *to, size_t n, const char* fmt, va_list ap);
 
10
#include <mysql/service_thd_alloc.h>
 
11
struct st_mysql_lex_string
 
12
{
 
13
  char *str;
 
14
  size_t length;
 
15
};
 
16
typedef struct st_mysql_lex_string MYSQL_LEX_STRING;
 
17
extern struct thd_alloc_service_st {
 
18
  void *(*thd_alloc_func)(void*, unsigned int);
 
19
  void *(*thd_calloc_func)(void*, unsigned int);
 
20
  char *(*thd_strdup_func)(void*, const char *);
 
21
  char *(*thd_strmake_func)(void*, const char *, unsigned int);
 
22
  void *(*thd_memdup_func)(void*, const void*, unsigned int);
 
23
  MYSQL_LEX_STRING *(*thd_make_lex_string_func)(void*, MYSQL_LEX_STRING *,
 
24
                                        const char *, unsigned int, int);
 
25
} *thd_alloc_service;
 
26
void *thd_alloc(void* thd, unsigned int size);
 
27
void *thd_calloc(void* thd, unsigned int size);
 
28
char *thd_strdup(void* thd, const char *str);
 
29
char *thd_strmake(void* thd, const char *str, unsigned int size);
 
30
void *thd_memdup(void* thd, const void* str, unsigned int size);
 
31
MYSQL_LEX_STRING *thd_make_lex_string(void* thd, MYSQL_LEX_STRING *lex_str,
 
32
                                      const char *str, unsigned int size,
 
33
                                      int allocate_lex_string);
 
34
#include <mysql/service_thd_wait.h>
 
35
typedef enum _thd_wait_type_e {
 
36
  THD_WAIT_SLEEP= 1,
 
37
  THD_WAIT_DISKIO= 2,
 
38
  THD_WAIT_ROW_LOCK= 3,
 
39
  THD_WAIT_GLOBAL_LOCK= 4,
 
40
  THD_WAIT_META_DATA_LOCK= 5,
 
41
  THD_WAIT_TABLE_LOCK= 6,
 
42
  THD_WAIT_USER_LOCK= 7,
 
43
  THD_WAIT_BINLOG= 8,
 
44
  THD_WAIT_GROUP_COMMIT= 9,
 
45
  THD_WAIT_SYNC= 10,
 
46
  THD_WAIT_LAST= 11
 
47
} thd_wait_type;
 
48
extern struct thd_wait_service_st {
 
49
  void (*thd_wait_begin_func)(void*, int);
 
50
  void (*thd_wait_end_func)(void*);
 
51
} *thd_wait_service;
 
52
void thd_wait_begin(void* thd, int wait_type);
 
53
void thd_wait_end(void* thd);
 
54
#include <mysql/service_thread_scheduler.h>
 
55
struct scheduler_functions;
 
56
extern struct my_thread_scheduler_service {
 
57
  int (*set)(struct scheduler_functions *scheduler);
 
58
  int (*reset)();
 
59
} *my_thread_scheduler_service;
 
60
int my_thread_scheduler_set(struct scheduler_functions *scheduler);
 
61
int my_thread_scheduler_reset();
 
62
#include <mysql/service_progress_report.h>
 
63
extern struct progress_report_service_st {
 
64
  void (*thd_progress_init_func)(void* thd, unsigned int max_stage);
 
65
  void (*thd_progress_report_func)(void* thd,
 
66
                                   unsigned long long progress,
 
67
                                   unsigned long long max_progress);
 
68
  void (*thd_progress_next_stage_func)(void* thd);
 
69
  void (*thd_progress_end_func)(void* thd);
 
70
  const char *(*set_thd_proc_info_func)(void*, const char *info,
 
71
                                        const char *func,
 
72
                                        const char *file,
 
73
                                        unsigned int line);
 
74
} *progress_report_service;
 
75
void thd_progress_init(void* thd, unsigned int max_stage);
 
76
void thd_progress_report(void* thd,
 
77
                         unsigned long long progress,
 
78
                         unsigned long long max_progress);
 
79
void thd_progress_next_stage(void* thd);
 
80
void thd_progress_end(void* thd);
 
81
const char *set_thd_proc_info(void*, const char * info, const char *func,
 
82
                              const char *file, unsigned int line);
 
83
#include <mysql/service_debug_sync.h>
 
84
extern void (*debug_sync_C_callback_ptr)(void*, const char *, size_t);
 
85
#include <mysql/service_kill_statement.h>
 
86
enum thd_kill_levels {
 
87
  THD_IS_NOT_KILLED=0,
 
88
  THD_ABORT_SOFTLY=50,
 
89
  THD_ABORT_ASAP=100,
 
90
};
 
91
extern struct kill_statement_service_st {
 
92
  enum thd_kill_levels (*thd_kill_level_func)(const void*);
 
93
} *thd_kill_statement_service;
 
94
enum thd_kill_levels thd_kill_level(const void*);
 
95
struct st_mysql_xid {
 
96
  long formatID;
 
97
  long gtrid_length;
 
98
  long bqual_length;
 
99
  char data[128];
 
100
};
 
101
typedef struct st_mysql_xid MYSQL_XID;
 
102
enum enum_mysql_show_type
 
103
{
 
104
  SHOW_UNDEF, SHOW_BOOL, SHOW_UINT, SHOW_ULONG,
 
105
  SHOW_ULONGLONG, SHOW_CHAR, SHOW_CHAR_PTR,
 
106
  SHOW_ARRAY, SHOW_FUNC, SHOW_DOUBLE,
 
107
  SHOW_SINT, SHOW_SLONG, SHOW_SLONGLONG,
 
108
  SHOW_always_last
 
109
};
 
110
struct st_mysql_show_var {
 
111
  const char *name;
 
112
  char *value;
 
113
  enum enum_mysql_show_type type;
 
114
};
 
115
typedef int (*mysql_show_var_func)(void*, struct st_mysql_show_var*, char *);
 
116
struct st_mysql_sys_var;
 
117
struct st_mysql_value;
 
118
typedef int (*mysql_var_check_func)(void* thd,
 
119
                                    struct st_mysql_sys_var *var,
 
120
                                    void *save, struct st_mysql_value *value);
 
121
typedef void (*mysql_var_update_func)(void* thd,
 
122
                                      struct st_mysql_sys_var *var,
 
123
                                      void *var_ptr, const void *save);
 
124
struct st_mysql_plugin
 
125
{
 
126
  int type;
 
127
  void *info;
 
128
  const char *name;
 
129
  const char *author;
 
130
  const char *descr;
 
131
  int license;
 
132
  int (*init)(void *);
 
133
  int (*deinit)(void *);
 
134
  unsigned int version;
 
135
  struct st_mysql_show_var *status_vars;
 
136
  struct st_mysql_sys_var **system_vars;
 
137
  void * __reserved1;
 
138
  unsigned long flags;
 
139
};
 
140
struct st_maria_plugin
 
141
{
 
142
  int type;
 
143
  void *info;
 
144
  const char *name;
 
145
  const char *author;
 
146
  const char *descr;
 
147
  int license;
 
148
  int (*init)(void *);
 
149
  int (*deinit)(void *);
 
150
  unsigned int version;
 
151
  struct st_mysql_show_var *status_vars;
 
152
  struct st_mysql_sys_var **system_vars;
 
153
  const char *version_info;
 
154
  unsigned int maturity;
 
155
};
 
156
#include "plugin_ftparser.h"
 
157
struct st_mysql_daemon
 
158
{
 
159
  int interface_version;
 
160
};
 
161
struct st_mysql_information_schema
 
162
{
 
163
  int interface_version;
 
164
};
 
165
struct st_mysql_storage_engine
 
166
{
 
167
  int interface_version;
 
168
};
 
169
struct handlerton;
 
170
 struct Mysql_replication {
 
171
   int interface_version;
 
172
 };
 
173
struct st_mysql_value
 
174
{
 
175
  int (*value_type)(struct st_mysql_value *);
 
176
  const char *(*val_str)(struct st_mysql_value *, char *buffer, int *length);
 
177
  int (*val_real)(struct st_mysql_value *, double *realbuf);
 
178
  int (*val_int)(struct st_mysql_value *, long long *intbuf);
 
179
  int (*is_unsigned)(struct st_mysql_value *);
 
180
};
 
181
int thd_in_lock_tables(const void* thd);
 
182
int thd_tablespace_op(const void* thd);
 
183
long long thd_test_options(const void* thd, long long test_options);
 
184
int thd_sql_command(const void* thd);
 
185
void **thd_ha_data(const void* thd, const struct handlerton *hton);
 
186
void thd_storage_lock_wait(void* thd, long long value);
 
187
int thd_tx_isolation(const void* thd);
 
188
char *thd_security_context(void* thd, char *buffer, unsigned int length,
 
189
                           unsigned int max_query_len);
 
190
void thd_inc_row_count(void* thd);
 
191
int mysql_tmpfile(const char *prefix);
 
192
unsigned long thd_get_thread_id(const void* thd);
 
193
void thd_get_xid(const void* thd, MYSQL_XID *xid);
 
194
void mysql_query_cache_invalidate4(void* thd,
 
195
                                   const char *key, unsigned int key_length,
 
196
                                   int using_trx);
 
197
void *thd_get_ha_data(const void* thd, const struct handlerton *hton);
 
198
void thd_set_ha_data(void* thd, const struct handlerton *hton,
 
199
                     const void *ha_data);
 
200
enum enum_ftparser_mode
 
201
{
 
202
  MYSQL_FTPARSER_SIMPLE_MODE= 0,
 
203
  MYSQL_FTPARSER_WITH_STOPWORDS= 1,
 
204
  MYSQL_FTPARSER_FULL_BOOLEAN_INFO= 2
 
205
};
 
206
enum enum_ft_token_type
 
207
{
 
208
  FT_TOKEN_EOF= 0,
 
209
  FT_TOKEN_WORD= 1,
 
210
  FT_TOKEN_LEFT_PAREN= 2,
 
211
  FT_TOKEN_RIGHT_PAREN= 3,
 
212
  FT_TOKEN_STOPWORD= 4
 
213
};
 
214
typedef struct st_mysql_ftparser_boolean_info
 
215
{
 
216
  enum enum_ft_token_type type;
 
217
  int yesno;
 
218
  int weight_adjust;
 
219
  char wasign;
 
220
  char trunc;
 
221
  char prev;
 
222
  char *quot;
 
223
} MYSQL_FTPARSER_BOOLEAN_INFO;
 
224
typedef struct st_mysql_ftparser_param
 
225
{
 
226
  int (*mysql_parse)(struct st_mysql_ftparser_param *,
 
227
                     const char *doc, int doc_len);
 
228
  int (*mysql_add_word)(struct st_mysql_ftparser_param *,
 
229
                        const char *word, int word_len,
 
230
                        MYSQL_FTPARSER_BOOLEAN_INFO *boolean_info);
 
231
  void *ftparser_state;
 
232
  void *mysql_ftparam;
 
233
  const struct charset_info_st *cs;
 
234
  const char *doc;
 
235
  int length;
 
236
  unsigned int flags;
 
237
  enum enum_ftparser_mode mode;
 
238
} MYSQL_FTPARSER_PARAM;
 
239
struct st_mysql_ftparser
 
240
{
 
241
  int interface_version;
 
242
  int (*parse)(MYSQL_FTPARSER_PARAM *param);
 
243
  int (*init)(MYSQL_FTPARSER_PARAM *param);
 
244
  int (*deinit)(MYSQL_FTPARSER_PARAM *param);
 
245
};