1 #ifndef __LOG_MYSQL_P_H__
2 #define __LOG_MYSQL_P_H__ 1
3 
4 #include <mysql.h>
5 
6 #ifdef MYSQL_VERSION_ID
7 # if MYSQL_VERSION_ID < 32224
8 #  define mysql_field_count(X) mysql_num_fields(X)
9 # endif
10 #endif
11 
12 static char *server;
13 static char *port_s;
14 static int port;
15 static char *socket_path;
16 static char *user;
17 static char *pw;
18 static char *db;
19 static char *crypto;
20 static char *transactions;
21 static char *sqlreq_getpw;
22 static char *sqlreq_getuid;
23 static char *sql_default_uid;
24 static char *sqlreq_getgid;
25 static char *sql_default_gid;
26 static char *sqlreq_getdir;
27 static char *tildexp_s;
28 static int tildexp;
29 #ifdef QUOTAS
30 static char *sqlreq_getqta_sz;
31 static char *sqlreq_getqta_fs;
32 #endif
33 #ifdef RATIOS
34 static char *sqlreq_getratio_ul;
35 static char *sqlreq_getratio_dl;
36 #endif
37 #ifdef THROTTLING
38 static char *sqlreq_getbandwidth_ul;
39 static char *sqlreq_getbandwidth_dl;
40 #endif
41 static signed char server_down;
42 
43 static ConfigKeywords mysql_config_keywords[] = {
44     { "MYSQLServer", &server },
45     { "MYSQLPort", &port_s },
46     { "MYSQLSocket", &socket_path },
47     { "MYSQLUser", &user },
48     { "MYSQLPassword", &pw },
49     { "MYSQLDatabase", &db },
50     { "MYSQLCrypt", &crypto },
51     { "MYSQLTransactions", &transactions },
52     { "MYSQLGetPW", &sqlreq_getpw },
53     { "MYSQLGetUID", &sqlreq_getuid },
54     { "MYSQLDefaultUID", &sql_default_uid },
55     { "MYSQLGetGID", &sqlreq_getgid },
56     { "MYSQLDefaultGID", &sql_default_gid },
57     { "MYSQLGetDir", &sqlreq_getdir },
58     { "MYSQLForceTildeExpansion", &tildexp_s },
59 #ifdef QUOTAS
60     { "MYSQLGetQTAFS", &sqlreq_getqta_fs },
61     { "MYSQLGetQTASZ", &sqlreq_getqta_sz },
62 #endif
63 #ifdef RATIOS
64     { "MYSQLGetRatioUL", &sqlreq_getratio_ul },
65     { "MYSQLGetRatioDL", &sqlreq_getratio_dl },
66 #endif
67 #ifdef THROTTLING
68     { "MYSQLGetBandwidthUL", &sqlreq_getbandwidth_ul },
69     { "MYSQLGetBandwidthDL", &sqlreq_getbandwidth_dl },
70 #endif
71     { NULL, NULL }
72 };
73 
74 #ifdef HAVE_MY_MAKE_SCRAMBLED_PASSWORD
75 extern void my_make_scrambled_password(char *to, const char *password,
76                                        size_t pass_len);
77 #endif
78 
79 #endif
80