Debian Codegraph @

storage/maria/ma_check_standalone.h

raw symbols SCIP
1 /* Copyright (C) 2007 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 02110-1335 USA */
15
16 #include <my_check_opt.h>cxx . . $ `<file>/include/my_check_opt.h`/
17
18 /* almost every standalone maria program will need it */
19 void _mi_report_crashedcxx . . $ _mi_report_crashed(95c058fb6d7e18aa).(void *file __attribute__((unused)),
20 const char *message __attribute__((unused)),
21 const char *sfile __attribute__((unused)),
22 uintcxx . . $ uint# sline __attribute__((unused)))
23 {
24 }
25
26 static unsigned int no_keycxx . . $ no_key(2141b656ce2cc063).(unsigned int not_used __attribute__((unused)))
27 {
28 return ENCRYPTION_KEY_VERSION_INVALIDcxx . . $ `include/mysql/service_encryption.h:44:9`!;
29 }
30
31 struct encryption_service_stcxx . . $ encryption_service_st# encryption_handlercxx . . $ encryption_handler.=
32 {
33 no_keycxx . . $ no_key(2141b656ce2cc063)., 0, 0, 0, 0, 0, 0
34 };
35
36 int encryption_scheme_encryptcxx . . $ encryption_scheme_encrypt(3cf8c39ae6a68d91).(const unsigned char* src __attribute__((unused)),
37 unsigned int slen __attribute__((unused)),
38 unsigned char* dst __attribute__((unused)),
39 unsigned int* dlen __attribute__((unused)),
40 struct st_encryption_schemecxx . . $ st_encryption_scheme# *scheme __attribute__((unused)),
41 unsigned int key_version __attribute__((unused)),
42 unsigned int i32_1 __attribute__((unused)),
43 unsigned int i32_2 __attribute__((unused)),
44 unsigned long long i64 __attribute__((unused)))
45 {
46 return -1;
47 }
48
49
50 int encryption_scheme_decryptcxx . . $ encryption_scheme_decrypt(3cf8c39ae6a68d91).(const unsigned char* src __attribute__((unused)),
51 unsigned int slen __attribute__((unused)),
52 unsigned char* dst __attribute__((unused)),
53 unsigned int* dlen __attribute__((unused)),
54 struct st_encryption_schemecxx . . $ st_encryption_scheme# *scheme __attribute__((unused)),
55 unsigned int key_version __attribute__((unused)),
56 unsigned int i32_1 __attribute__((unused)),
57 unsigned int i32_2 __attribute__((unused)),
58 unsigned long long i64 __attribute__((unused)))
59 {
60 return -1;
61 }
62
63 /* only those that included myisamchk.h may need and can use the below */
64 #ifdef _myisamchk_hcxx . . $ `include/myisamchk.h:21:9`!
65 /*
66 All standalone programs which need to use functions from ma_check.c
67 (like maria_repair()) must define their version of _ma_killed_ptr()
68 and _ma_check_print_info|warning|error(). Indeed, linking with ma_check.o
69 brings in the dependencies of ma_check.o which are definitions of the above
70 functions; if the program does not define them then the ones of
71 ha_maria.o are used i.e. ha_maria.o is linked into the program, and this
72 brings dependencies of ha_maria.o on mysqld.o into the program's linking
73 which thus fails, as the program is not linked with mysqld.o.
74 This file contains the versions of these functions used by maria_chk and
75 maria_read_log.
76 */
77
78 /*
79 Check if check/repair operation was killed by a signal
80 */
81
82 int _ma_killed_ptrcxx . . $ _ma_killed_ptr(cd1bcde0e80e819c).(HA_CHECKcxx . . $ HA_CHECK# *param __attribute__((unused)))
83 {
84 return 0;
85 }
86
87
88 void _ma_report_progresscxx . . $ _ma_report_progress(d124eb131dde86).(HA_CHECKcxx . . $ HA_CHECK# *param __attribute__((unused)),
89 ulonglongcxx . . $ ulonglong# progress __attribute__((unused)),
90 ulonglongcxx . . $ ulonglong# max_progress __attribute__((unused)))
91 {
92 }
93
94 /* print warnings and errors */
95 /* VARARGS */
96
97 void _ma_check_print_infocxx . . $ _ma_check_print_info(bf5988efca94507b).(HA_CHECKcxx . . $ HA_CHECK# *param __attribute__((unused)),
98 const char *fmt,...)
99 {
100 va_listcxx . . $ va_list# args;
101 DBUG_ENTERcxx . . $ `include/my_dbug.h:165:9`!("_ma_check_print_info");
102 DBUG_PRINTcxx . . $ `include/my_dbug.h:174:9`!("enter", ("format: %s", fmt));
103
104 va_startcxx . . $ `<external>/8105065126723003039/stdarg.h:50:9`!(args,fmt);
105 vfprintfcxx . . $ vfprintf(bded311e54d67f9c).(stdoutcxx . . $ `<external>/232824719582829767/stdio.h:154:9`!, fmt, args);
106 fputccxx . . $ fputc(b1cd03d6c470d1bd).('\n',stdoutcxx . . $ `<external>/232824719582829767/stdio.h:154:9`!);
107 va_endcxx . . $ `<external>/8105065126723003039/stdarg.h:52:9`!(args);
108 DBUG_VOID_RETURNcxx . . $ `include/my_dbug.h:169:9`!;
109 }
110
111 /* VARARGS */
112
113 void _ma_check_print_warningcxx . . $ _ma_check_print_warning(bf5988efca94507b).(HA_CHECKcxx . . $ HA_CHECK# *param, const char *fmt,...)
114 {
115 va_listcxx . . $ va_list# args;
116 DBUG_ENTERcxx . . $ `include/my_dbug.h:165:9`!("_ma_check_print_warning");
117 DBUG_PRINTcxx . . $ `include/my_dbug.h:174:9`!("enter", ("format: %s", fmt));
118
119 fflushcxx . . $ fflush(89bc1efcdac0ca22).(stdoutcxx . . $ `<external>/232824719582829767/stdio.h:154:9`!);
120 if (!param->warning_printedcxx . . $ st_handler_check_param#warning_printed. && !param->error_printedcxx . . $ st_handler_check_param#error_printed.)
121 {
122 if (param->testflagcxx . . $ st_handler_check_param#testflag. & T_SILENTcxx . . $ `include/my_check_opt.h:53:9`!)
123 fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!,"%s: Aria file %s\n",my_progname_shortcxx . . $ my_progname_short.,
124 param->isam_file_namecxx . . $ st_handler_check_param#isam_file_name.);
125 param->out_flagcxx . . $ st_handler_check_param#out_flag.|= O_DATA_LOSTcxx . . $ `include/myisamchk.h:37:9`!;
126 }
127 param->warning_printedcxx . . $ st_handler_check_param#warning_printed.++;
128 va_startcxx . . $ `<external>/8105065126723003039/stdarg.h:50:9`!(args,fmt);
129 fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!,"%s: warning: ",my_progname_shortcxx . . $ my_progname_short.);
130 vfprintfcxx . . $ vfprintf(bded311e54d67f9c).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, fmt, args);
131 fputccxx . . $ fputc(b1cd03d6c470d1bd).('\n',stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!);
132 fflushcxx . . $ fflush(89bc1efcdac0ca22).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!);
133 va_endcxx . . $ `<external>/8105065126723003039/stdarg.h:52:9`!(args);
134 DBUG_VOID_RETURNcxx . . $ `include/my_dbug.h:169:9`!;
135 }
136
137 /* VARARGS */
138
139 void _ma_check_print_errorcxx . . $ _ma_check_print_error(bf5988efca94507b).(HA_CHECKcxx . . $ HA_CHECK# *param, const char *fmt,...)
140 {
141 va_listcxx . . $ va_list# args;
142 DBUG_ENTERcxx . . $ `include/my_dbug.h:165:9`!("_ma_check_print_error");
143 DBUG_PRINTcxx . . $ `include/my_dbug.h:174:9`!("enter", ("format: %s", fmt));
144
145 fflushcxx . . $ fflush(89bc1efcdac0ca22).(stdoutcxx . . $ `<external>/232824719582829767/stdio.h:154:9`!);
146 if (!param->warning_printedcxx . . $ st_handler_check_param#warning_printed. && !param->error_printedcxx . . $ st_handler_check_param#error_printed.)
147 {
148 if (param->testflagcxx . . $ st_handler_check_param#testflag. & T_SILENTcxx . . $ `include/my_check_opt.h:53:9`!)
149 fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!,"%s: Aria file %s\n",my_progname_shortcxx . . $ my_progname_short.,param->isam_file_namecxx . . $ st_handler_check_param#isam_file_name.);
150 param->out_flagcxx . . $ st_handler_check_param#out_flag.|= O_DATA_LOSTcxx . . $ `include/myisamchk.h:37:9`!;
151 }
152 param->error_printedcxx . . $ st_handler_check_param#error_printed.++;
153 va_startcxx . . $ `<external>/8105065126723003039/stdarg.h:50:9`!(args,fmt);
154 fprintfcxx . . $ fprintf(bc216f8e5b1ebeac).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!,"%s: error: ",my_progname_shortcxx . . $ my_progname_short.);
155 vfprintfcxx . . $ vfprintf(bded311e54d67f9c).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!, fmt, args);
156 fputccxx . . $ fputc(b1cd03d6c470d1bd).('\n',stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!);
157 fflushcxx . . $ fflush(89bc1efcdac0ca22).(stderrcxx . . $ `<external>/232824719582829767/stdio.h:155:9`!);
158 va_endcxx . . $ `<external>/8105065126723003039/stdarg.h:52:9`!(args);
159 DBUG_VOID_RETURNcxx . . $ `include/my_dbug.h:169:9`!;
160 }
161
162 #endif
163