Lines Matching defs:mysql
15 /* ugly way to tell clang that mysql.h is a system header and we don't want
17 # 4 "driver-mysql.c" 3
19 #include <mysql.h>
21 # 4 "driver-mysql.c" 3
42 MYSQL *mysql;
75 return db->host == NULL ? "mysql" :
76 t_strdup_printf("mysql(%s)", db->host);
106 mysql_options(db->mysql, MYSQL_READ_DEFAULT_FILE,
110 mysql_options(db->mysql, MYSQL_OPT_CONNECT_TIMEOUT, &db->connect_timeout);
111 mysql_options(db->mysql, MYSQL_OPT_READ_TIMEOUT, &db->read_timeout);
112 mysql_options(db->mysql, MYSQL_OPT_WRITE_TIMEOUT, &db->write_timeout);
113 mysql_options(db->mysql, MYSQL_READ_DEFAULT_GROUP,
118 mysql_ssl_set(db->mysql, db->ssl_key, db->ssl_cert,
125 mysql_options(db->mysql, MYSQL_OPT_SSL_VERIFY_SERVER_CERT,
130 i_fatal("mysql: SSL support not compiled in "
140 failed = mysql_real_connect(db->mysql, host, db->user, db->password,
156 mysql_error(db->mysql), db->api.connect_delay);
185 i_fatal("mysql: Missing value in connect string: %s",
203 i_fatal("mysql: Invalid port number: %s", value);
206 i_fatal("mysql: Invalid client flags: %s", value);
209 i_fatal("mysql: Invalid read_timeout: %s", value);
212 i_fatal("mysql: Invalid read_timeout: %s", value);
215 i_fatal("mysql: Invalid read_timeout: %s", value);
232 i_fatal("mysql: Invalid boolean: %s", value);
238 i_fatal("mysql: Unknown connect string: %s", name);
245 i_fatal("mysql: No hosts given in connect string");
247 db->mysql = mysql_init(NULL);
248 if (db->mysql == NULL)
257 pool = pool_alloconly_create("mysql driver", 1024);
275 mysql_close(db->mysql);
282 if (mysql_query(db->mysql, query) == 0)
286 switch (mysql_errno(db->mysql)) {
309 if (db->mysql == NULL) {
323 len = mysql_real_escape_string(db->mysql, to, string, len);
334 mysql_prefix(db), query, mysql_error(db->mysql));
364 result->affected_rows = mysql_affected_rows(db->mysql);
365 result->result = mysql_store_result(db->mysql);
370 while ((ret = mysql_next_result(db->mysql)) == 0) ;
376 (result->result != NULL || mysql_errno(db->mysql) == 0)) {
419 if (mysql_errno(db->mysql) != 0)
518 err = mysql_errno(db->mysql);
519 errstr = mysql_error(db->mysql);
536 ctx->query_pool = pool_alloconly_create("mysql transaction", 1024);
662 .name = "mysql",