1 | /* Copyright (C) 2006-2008 MySQL AB |
2 | |
3 | This program is free software; you can redistribute it and/or modify |
4 | it under the terms of the GNU General Public License as published by |
5 | the Free Software Foundation; version 2 of the License. |
6 | |
7 | This program is distributed in the hope that it will be useful, |
8 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
9 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
10 | GNU General Public License for more details. |
11 | |
12 | You should have received a copy of the GNU General Public License |
13 | along with this program; if not, write to the Free Software |
14 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA */ |
15 | |
16 | #include "../maria_def.h" |
17 | |
18 | static LOG_DESC INIT_LOGREC_FIXED_RECORD_0LSN_EXAMPLE= |
19 | {LOGRECTYPE_FIXEDLENGTH, 6, 6, NULL, NULL, NULL, 0, |
20 | "fixed0example" , LOGREC_NOT_LAST_IN_GROUP, NULL, NULL}; |
21 | |
22 | static LOG_DESC INIT_LOGREC_VARIABLE_RECORD_0LSN_EXAMPLE= |
23 | {LOGRECTYPE_VARIABLE_LENGTH, 0, 9, NULL, NULL, NULL, 0, |
24 | "variable0example" , LOGREC_NOT_LAST_IN_GROUP, NULL, NULL}; |
25 | |
26 | static LOG_DESC INIT_LOGREC_FIXED_RECORD_1LSN_EXAMPLE= |
27 | {LOGRECTYPE_PSEUDOFIXEDLENGTH, 7, 7, NULL, NULL, NULL, 1, |
28 | "fixed1example" , LOGREC_NOT_LAST_IN_GROUP, NULL, NULL}; |
29 | |
30 | static LOG_DESC INIT_LOGREC_VARIABLE_RECORD_1LSN_EXAMPLE= |
31 | {LOGRECTYPE_VARIABLE_LENGTH, 0, 12, NULL, NULL, NULL, 1, |
32 | "variable1example" , LOGREC_NOT_LAST_IN_GROUP, NULL, NULL}; |
33 | |
34 | static LOG_DESC INIT_LOGREC_FIXED_RECORD_2LSN_EXAMPLE= |
35 | {LOGRECTYPE_PSEUDOFIXEDLENGTH, 23, 23, NULL, NULL, NULL, 2, |
36 | "fixed2example" , LOGREC_NOT_LAST_IN_GROUP, NULL, NULL}; |
37 | |
38 | static LOG_DESC INIT_LOGREC_VARIABLE_RECORD_2LSN_EXAMPLE= |
39 | {LOGRECTYPE_VARIABLE_LENGTH, 0, 19, NULL, NULL, NULL, 2, |
40 | "variable2example" , LOGREC_NOT_LAST_IN_GROUP, NULL, NULL}; |
41 | |
42 | |
43 | void translog_example_table_init() |
44 | { |
45 | int i; |
46 | log_record_type_descriptor[LOGREC_FIXED_RECORD_0LSN_EXAMPLE]= |
47 | INIT_LOGREC_FIXED_RECORD_0LSN_EXAMPLE; |
48 | log_record_type_descriptor[LOGREC_VARIABLE_RECORD_0LSN_EXAMPLE]= |
49 | INIT_LOGREC_VARIABLE_RECORD_0LSN_EXAMPLE; |
50 | log_record_type_descriptor[LOGREC_FIXED_RECORD_1LSN_EXAMPLE]= |
51 | INIT_LOGREC_FIXED_RECORD_1LSN_EXAMPLE; |
52 | log_record_type_descriptor[LOGREC_VARIABLE_RECORD_1LSN_EXAMPLE]= |
53 | INIT_LOGREC_VARIABLE_RECORD_1LSN_EXAMPLE; |
54 | log_record_type_descriptor[LOGREC_FIXED_RECORD_2LSN_EXAMPLE]= |
55 | INIT_LOGREC_FIXED_RECORD_2LSN_EXAMPLE; |
56 | log_record_type_descriptor[LOGREC_VARIABLE_RECORD_2LSN_EXAMPLE]= |
57 | INIT_LOGREC_VARIABLE_RECORD_2LSN_EXAMPLE; |
58 | for (i= LOGREC_VARIABLE_RECORD_2LSN_EXAMPLE + 1; |
59 | i < LOGREC_NUMBER_OF_TYPES; |
60 | i++) |
61 | log_record_type_descriptor[i].rclass= LOGRECTYPE_NOT_ALLOWED; |
62 | #ifndef DBUG_OFF |
63 | check_translog_description_table(LOGREC_VARIABLE_RECORD_2LSN_EXAMPLE); |
64 | #endif |
65 | } |
66 | |
67 | |
68 | |
69 | |