MySQL 5.6.14 Source Code Document
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
innodb_cb_api.h
Go to the documentation of this file.
1 /***********************************************************************
2 
3 Copyright (c) 2013, Oracle and/or its affiliates. All Rights Reserved.
4 
5 This program is free software; you can redistribute it and/or modify it
6 under the terms of the GNU General Public License as published by the
7 Free Software Foundation; version 2 of the License.
8 
9 This program is distributed in the hope that it will be useful, but
10 WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
12 Public License for more details.
13 
14 You should have received a copy of the GNU General Public License along
15 with this program; if not, write to the Free Software Foundation, Inc.,
16 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA
17 
18 ***********************************************************************/
19 /**************************************************/
25 #ifndef innodb_cb_api_h
26 #define innodb_cb_api_h
27 
28 #include "api0api.h"
29 
33 typedef
36 /*===============*/
37  const char* name,
38  ib_trx_t ib_trx,
39  ib_crsr_t* ib_crsr);
40 
41 typedef
43 (*cb_read_row_t)(
44 /*=============*/
45  ib_crsr_t ib_crsr,
46  ib_tpl_t ib_tpl);
47 
48 typedef
50 (*cb_insert_row_t)(
51 /*===============*/
52  ib_crsr_t ib_crsr,
53  const ib_tpl_t ib_tpl);
54 
55 typedef
57 (*cb_cursor_delete_row_t)(
58 /*======================*/
59  ib_crsr_t ib_crsr);
60 
61 typedef
63 (*cb_cursor_update_row_t)(
64 /*======================*/
65  ib_crsr_t ib_crsr,
66  const ib_tpl_t ib_old_tpl,
67  const ib_tpl_t ib_new_tpl);
68 
69 typedef
71 (*cb_cursor_moveto_t)(
72 /*==================*/
73  ib_crsr_t ib_crsr,
74  ib_tpl_t ib_tpl,
75  ib_srch_mode_t ib_srch_mode);
76 
77 typedef
79 (*cb_sec_search_tuple_create_t)(
80 /*============================*/
81  ib_crsr_t ib_crsr) ;
82 
83 typedef
85 (*cb_sec_read_tuple_create_t)(
86 /*==========================*/
87  ib_crsr_t ib_crsr);
88 
89 typedef
90 void
91 (*cb_tuple_delete_t)(
92 /*=================*/
93  ib_tpl_t ib_tpl);
94 
95 typedef
97 (*cb_tuple_copy_t)(
98 /*===============*/
99  ib_tpl_t ib_dst_tpl,
100  const ib_tpl_t ib_src_tpl);
101 
102 typedef
103 ib_err_t
104 (*cb_tuple_read_u8_t)(
105 /*==================*/
106  ib_tpl_t ib_tpl,
107  ib_ulint_t i,
108  ib_u8_t* ival) ;
109 
110 typedef
111 ib_err_t
112 (*cb_tuple_read_u16_t)(
113 /*===================*/
114  ib_tpl_t ib_tpl,
115  ib_ulint_t i,
116  ib_u16_t* ival) ;
117 
118 typedef
119 ib_err_t
120 (*cb_tuple_read_u32_t)(
121 /*===================*/
122  ib_tpl_t ib_tpl,
123  ib_ulint_t i,
124  ib_u32_t* ival) ;
125 
126 typedef
127 ib_err_t
128 (*cb_tuple_read_u64_t)(
129 /*===================*/
130  ib_tpl_t ib_tpl,
131  ib_ulint_t i,
132  ib_u64_t* ival) ;
133 
134 typedef
135 ib_err_t
136 (*cb_tuple_write_u8_t)(
137 /*===================*/
138  ib_tpl_t ib_tpl,
139  int col_no,
140  ib_u8_t val) ;
141 
142 typedef
143 ib_err_t
144 (*cb_tuple_write_u16_t)(
145 /*====================*/
146  ib_tpl_t ib_tpl,
147  int col_no,
148  ib_u16_t val) ;
149 
150 typedef
151 ib_err_t
152 (*cb_tuple_write_u32_t)(
153 /*====================*/
154  ib_tpl_t ib_tpl,
155  int col_no,
156  ib_u32_t val) ;
157 
158 typedef
159 ib_err_t
160 (*cb_tuple_write_u64_t)(
161 /*====================*/
162  ib_tpl_t ib_tpl,
163  int col_no,
164  ib_u64_t val);
165 
166 typedef
167 ib_err_t
168 (*cb_tuple_read_i8_t)(
169 /*==================*/
170  ib_tpl_t ib_tpl,
171  ib_ulint_t i,
172  ib_i8_t* ival);
173 
174 typedef
175 ib_err_t
176 (*cb_tuple_read_i16_t)(
177 /*===================*/
178  ib_tpl_t ib_tpl,
179  ib_ulint_t i,
180  ib_i16_t* ival);
181 
182 typedef
183 ib_err_t
184 (*cb_tuple_read_i32_t)(
185 /*===================*/
186  ib_tpl_t ib_tpl,
187  ib_ulint_t i,
188  ib_i32_t* ival);
189 
190 typedef
191 ib_err_t
192 (*cb_tuple_read_i64_t)(
193 /*===================*/
194  ib_tpl_t ib_tpl,
195  ib_ulint_t i,
196  ib_i64_t* ival);
197 
198 typedef
199 ib_err_t
200 (*cb_tuple_write_i8_t)(
201 /*===================*/
202  ib_tpl_t ib_tpl,
203  int col_no,
204  ib_i8_t val);
205 
206 typedef
207 ib_err_t
208 (*cb_tuple_write_i16_t)(
209 /*====================*/
210  ib_tpl_t ib_tpl,
211  int col_no,
212  ib_i16_t val);
213 
214 typedef
215 ib_err_t
216 (*cb_tuple_write_i32_t)(
217 /*====================*/
218  ib_tpl_t ib_tpl,
219  int col_no,
220  ib_i32_t val);
221 
222 typedef
223 ib_err_t
224 (*cb_tuple_write_i64_t)(
225 /*====================*/
226  ib_tpl_t ib_tpl,
227  int col_no,
228  ib_i64_t val);
229 
230 typedef
231 ib_err_t
232 (*cb_col_set_value_t)(
233 /*==================*/
234  ib_tpl_t ib_tpl,
235  ib_ulint_t col_no,
236  const void* src,
237  ib_ulint_t len,
238  bool need_cpy) ;
239 
240 typedef
241 const void*
242 (*cb_col_get_value_t)(
243 /*==================*/
244  ib_tpl_t ib_tpl,
245  ib_ulint_t i);
246 
247 typedef
249 (*cb_col_get_meta_t)(
250 /*=================*/
251  ib_tpl_t ib_tpl,
252  ib_ulint_t i,
253  ib_col_meta_t* ib_col_meta);
254 
255 typedef
256 ib_trx_t
257 (*cb_trx_begin_t)(
258 /*==============*/
259  ib_trx_level_t ib_trx_level);
260 
261 typedef
262 ib_err_t
263 (*cb_trx_commit_t)(
264 /*===============*/
265  ib_trx_t ib_trx);
266 
267 typedef
268 ib_err_t
269 (*cb_trx_rollback_t)(
270 /*=================*/
271  ib_trx_t ib_trx);
272 
273 typedef
274 ib_err_t
275 (*cb_trx_start_t)(
276 /*==============*/
277  ib_trx_t ib_trx,
278  ib_trx_level_t ib_trx_level);
279 
280 typedef
282 (*cb_trx_state_t)(
283 /*==============*/
284  ib_trx_t ib_trx);
285 
286 typedef
288 (*cb_trx_release_t)(
289 /*================*/
290  ib_trx_t ib_trx);
291 
292 typedef
294 (*cb_tuple_get_n_cols_t)(
295 /*=====================*/
296  const ib_tpl_t ib_tpl);
297 
298 typedef
299 void
300 (*cb_cursor_set_match_mode_t)(
301 /*==========================*/
302  ib_crsr_t ib_crsr,
303  ib_match_mode_t match_mode);
304 
305 typedef
306 ib_err_t
307 (*cb_cursor_lock_t)(
308 /*================*/
309  ib_crsr_t ib_crsr,
310  ib_lck_mode_t ib_lck_mode);
311 
312 typedef
313 ib_err_t
314 (*cb_cursor_set_lock_t)(
315 /*====================*/
316  ib_crsr_t ib_crsr,
317  ib_lck_mode_t ib_lck_mode);
318 
319 typedef
320 ib_err_t
321 (*cb_cursor_close_t)(
322 /*=================*/
323  ib_crsr_t ib_crsr);
324 
325 typedef
326 void*
327 (*cb_open_table_by_name_t)(
328 /*=======================*/
329  const char* name);
330 
331 typedef
332 ib_err_t
333 (*cb_cursor_new_trx_t)(
334 /*===================*/
335  ib_crsr_t ib_crsr,
336  ib_trx_t ib_trx);
337 
338 typedef
339 ib_err_t
340 (*cb_cursor_reset_t)(
341 /*=================*/
342  ib_crsr_t ib_crsr);
343 
344 typedef
345 char*
346 (*cb_col_get_name_t)(
347 /*=================*/
348  ib_crsr_t ib_crsr,
349  ib_ulint_t i);
350 
351 typedef
352 char*
353 (*cb_get_idx_field_name)(
354 /*=====================*/
355  ib_crsr_t ib_crsr,
356  ib_ulint_t i);
357 
358 typedef
359 ib_err_t
360 (*cb_table_truncate_t)(
361 /*===================*/
362  const char* table_name,
363  ib_id_u64_t* table_id);
364 
365 typedef
366 ib_err_t
367 (*cb_cursor_first_t)(
368 /*=================*/
369  ib_crsr_t ib_crsr);
370 
371 typedef
372 ib_err_t
373 (*cb_cursor_next_t)(
374 /*================*/
375  ib_crsr_t ib_crsr);
376 
377 typedef
378 ib_err_t
379 (*cb_cursor_last_t)(
380 /*================*/
381  ib_crsr_t ib_crsr);
382 
383 typedef
384 void
385 (*cb_cursor_clear_trx_t)(
386 /*=====================*/
387  ib_crsr_t ib_crsr);
388 
389 typedef
390 ib_err_t
391 (*cb_close_thd_t)(
392 /*==============*/
393  void* thd);
394 
395 typedef
396 int
397 (*cb_get_cfg_t)();
398 /*=============*/
399 
400 typedef
401 ib_err_t
402 (*cb_cursor_open_index_using_name_t)(
403 /*=================================*/
404  ib_crsr_t ib_open_crsr,
405  const char* index_name,
406  ib_crsr_t* ib_crsr,
407  int* idx_type,
408  ib_id_u64_t* idx_id);
409 
410 typedef
411 void
412 (*cb_cursor_set_cluster_access_t)(
413 /*==============================*/
414  ib_crsr_t ib_crsr);
415 
416 typedef
417 ib_err_t
418 (*cb_cursor_commit_trx_t)(
419 /*======================*/
420  ib_crsr_t ib_crsr,
421  ib_trx_t ib_trx);
422 
423 typedef
424 int
425 (*cb_cfg_trx_level_t)();
426 /*===================*/
427 
428 
429 typedef
431 (*cb_get_n_user_cols)(
432 /*==================*/
433  const ib_tpl_t ib_tpl);
434 
435 typedef
436 ib_err_t
437 (*cb_trx_get_start_time)(
438 /*======================*/
439  ib_trx_t ib_trx);
440 
441 typedef
443 (*cb_bk_commit_interval)();
444 /*======================*/
445 
446 cb_open_table_t ib_cb_open_table;
447 cb_read_row_t ib_cb_read_row;
448 cb_insert_row_t ib_cb_insert_row;
449 cb_cursor_delete_row_t ib_cb_delete_row;
450 cb_cursor_update_row_t ib_cb_update_row;
451 cb_cursor_moveto_t ib_cb_moveto;
452 cb_sec_search_tuple_create_t ib_cb_search_tuple_create;
453 cb_sec_read_tuple_create_t ib_cb_read_tuple_create;
454 cb_tuple_delete_t ib_cb_tuple_delete;
455 cb_tuple_copy_t ib_cb_tuple_copy;
456 cb_tuple_read_u8_t ib_cb_tuple_read_u8;
457 cb_tuple_read_u16_t ib_cb_tuple_read_u16;
458 cb_tuple_read_u32_t ib_cb_tuple_read_u32;
459 cb_tuple_read_u64_t ib_cb_tuple_read_u64;
460 cb_tuple_write_u8_t ib_cb_tuple_write_u8;
461 cb_tuple_write_u16_t ib_cb_tuple_write_u16;
462 cb_tuple_write_u32_t ib_cb_tuple_write_u32;
463 cb_tuple_write_u64_t ib_cb_tuple_write_u64;
464 cb_tuple_read_i8_t ib_cb_tuple_read_i8;
465 cb_tuple_read_i16_t ib_cb_tuple_read_i16;
466 cb_tuple_read_i32_t ib_cb_tuple_read_i32;
467 cb_tuple_read_i64_t ib_cb_tuple_read_i64;
468 cb_tuple_write_i8_t ib_cb_tuple_write_i8;
469 cb_tuple_write_i16_t ib_cb_tuple_write_i16;
470 cb_tuple_write_i32_t ib_cb_tuple_write_i32;
471 cb_tuple_write_i64_t ib_cb_tuple_write_i64;
472 cb_col_set_value_t ib_cb_col_set_value;
473 cb_col_get_value_t ib_cb_col_get_value;
474 cb_col_get_meta_t ib_cb_col_get_meta;
475 cb_trx_begin_t ib_cb_trx_begin;
476 cb_trx_commit_t ib_cb_trx_commit;
477 cb_trx_rollback_t ib_cb_trx_rollback;
478 cb_trx_start_t ib_cb_trx_start;
479 cb_trx_state_t ib_cb_trx_state;
480 cb_trx_release_t ib_cb_trx_release;
481 cb_tuple_get_n_cols_t ib_cb_tuple_get_n_cols;
482 cb_cursor_set_match_mode_t ib_cb_cursor_set_match_mode;
483 cb_cursor_lock_t ib_cb_cursor_lock;
484 cb_cursor_close_t ib_cb_cursor_close;
485 cb_cursor_new_trx_t ib_cb_cursor_new_trx;
486 cb_open_table_by_name_t ib_cb_open_table_by_name;
487 cb_cursor_reset_t ib_cb_cursor_reset;
488 cb_col_get_name_t ib_cb_col_get_name;
489 cb_get_idx_field_name ib_cb_get_idx_field_name;
490 cb_table_truncate_t ib_cb_table_truncate;
491 cb_cursor_first_t ib_cb_cursor_first;
492 cb_cursor_next_t ib_cb_cursor_next;
493 cb_cursor_last_t ib_cb_cursor_last;
494 cb_cursor_open_index_using_name_t ib_cb_cursor_open_index_using_name;
495 cb_close_thd_t ib_cb_close_thd;
496 cb_get_cfg_t ib_cb_get_cfg;
497 cb_cursor_set_cluster_access_t ib_cb_cursor_set_cluster_access;
498 cb_cursor_commit_trx_t ib_cb_cursor_commit_trx;
499 cb_cfg_trx_level_t ib_cb_cfg_trx_level;
500 cb_get_n_user_cols ib_cb_get_n_user_cols;
501 cb_cursor_set_lock_t ib_cb_cursor_set_lock;
502 cb_cursor_clear_trx_t ib_cb_cursor_clear_trx;
503 cb_trx_get_start_time ib_cb_trx_get_start_time;
504 cb_bk_commit_interval ib_cb_cfg_bk_commit_interval;
505 
506 #endif /* innodb_cb_api_h */