gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r38134 - gnunet/src/mysql


From: gnunet
Subject: [GNUnet-SVN] r38134 - gnunet/src/mysql
Date: Wed, 12 Oct 2016 18:41:39 +0200

Author: tg
Date: 2016-10-12 18:41:39 +0200 (Wed, 12 Oct 2016)
New Revision: 38134

Modified:
   gnunet/src/mysql/mysql.c
Log:
mysql: statement_prepare: log query on error

Modified: gnunet/src/mysql/mysql.c
===================================================================
--- gnunet/src/mysql/mysql.c    2016-10-12 16:41:37 UTC (rev 38133)
+++ gnunet/src/mysql/mysql.c    2016-10-12 16:41:39 UTC (rev 38134)
@@ -1,3 +1,4 @@
+
 /*
      This file is part of GNUnet
      Copyright (C) 2012 GNUnet e.V.
@@ -38,7 +39,7 @@
  * a failure of the command 'cmd' with the message given
  * by strerror(errno).
  */
-#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);
+#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);
 
 /**
  * Log an error message at log-level 'level' that indicates
@@ -431,6 +432,8 @@
   }
   if (0 != mysql_stmt_prepare (sh->statement, sh->query, strlen (sh->query)))
   {
+    GNUNET_log_from (GNUNET_ERROR_TYPE_ERROR, "mysql",
+                     "prepare_statement: %s\n", sh->query);
     LOG_MYSQL (GNUNET_ERROR_TYPE_ERROR, "mysql_stmt_prepare", mc);
     mysql_stmt_close (sh->statement);
     sh->statement = NULL;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]