diff options
Diffstat (limited to 'src/mysql')
-rw-r--r-- | src/mysql/mysql.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mysql/mysql.c b/src/mysql/mysql.c index bebbfbe0f..157ce5275 100644 --- a/src/mysql/mysql.c +++ b/src/mysql/mysql.c | |||
@@ -1,3 +1,4 @@ | |||
1 | |||
1 | /* | 2 | /* |
2 | This file is part of GNUnet | 3 | This file is part of GNUnet |
3 | Copyright (C) 2012 GNUnet e.V. | 4 | Copyright (C) 2012 GNUnet e.V. |
@@ -38,7 +39,7 @@ | |||
38 | * a failure of the command 'cmd' with the message given | 39 | * a failure of the command 'cmd' with the message given |
39 | * by strerror(errno). | 40 | * by strerror(errno). |
40 | */ | 41 | */ |
41 | #define DIE_MYSQL(cmd, dbh) do { GNUNET_log_from (GNUNET_ERROR_TYPE__ERROR, "mysql", _("`%s' failed at %s:%d with error: %s\n"), cmd, __FILE__, __LINE__, mysql_error((dbh)->dbf)); GNUNET_assert (0); } while(0); | 42 | #define DIE_MYSQL(cmd, dbh) do { GNUNET_log_from (GNUNET_ERROR_TYPE_ERROR, "mysql", _("`%s' failed at %s:%d with error: %s\n"), cmd, __FILE__, __LINE__, mysql_error((dbh)->dbf)); GNUNET_assert (0); } while(0); |
42 | 43 | ||
43 | /** | 44 | /** |
44 | * Log an error message at log-level 'level' that indicates | 45 | * Log an error message at log-level 'level' that indicates |
@@ -431,6 +432,8 @@ prepare_statement (struct GNUNET_MYSQL_StatementHandle *sh) | |||
431 | } | 432 | } |
432 | if (0 != mysql_stmt_prepare (sh->statement, sh->query, strlen (sh->query))) | 433 | if (0 != mysql_stmt_prepare (sh->statement, sh->query, strlen (sh->query))) |
433 | { | 434 | { |
435 | GNUNET_log_from (GNUNET_ERROR_TYPE_ERROR, "mysql", | ||
436 | "prepare_statement: %s\n", sh->query); | ||
434 | LOG_MYSQL (GNUNET_ERROR_TYPE_ERROR, "mysql_stmt_prepare", mc); | 437 | LOG_MYSQL (GNUNET_ERROR_TYPE_ERROR, "mysql_stmt_prepare", mc); |
435 | mysql_stmt_close (sh->statement); | 438 | mysql_stmt_close (sh->statement); |
436 | sh->statement = NULL; | 439 | sh->statement = NULL; |