fix mysql_prepare function
authorChristophe Genevey Metat <genevey.christophe@gmail.com>
Fri, 22 Jul 2016 14:00:13 +0000 (14:00 +0000)
committerChristophe Genevey Metat <genevey.christophe@gmail.com>
Fri, 22 Jul 2016 14:00:13 +0000 (14:00 +0000)
src/psycstore/plugin_psycstore_mysql.c

index 2c06b9b297c6a77ac29396ac6968787d65780d6e..6e6b9ac13db6dee85e653b10626ffbe8152473da 100644 (file)
@@ -255,37 +255,12 @@ mysql_prepare (struct GNUNET_MYSQL_Context *mc,
   if(NULL == *stmt)
     LOG(GNUNET_ERROR_TYPE_ERROR,
    _("Error preparing SQL query: %s\n  %s\n"),
-   mysql_stmt_error (GNUNET_MYSQL_statement_get_stmt (stmt)), sql);
+   mysql_stmt_error (GNUNET_MYSQL_statement_get_stmt (*stmt)), sql);
 
   return 0;
 }
 
 
-/**
- * @brief Prepare a SQL statement
- *
- * @param dbh handle to the database
- * @param sql SQL statement, UTF-8 encoded
- * @return 0 on success
- */
-static int
-mysql_exec (struct GNUNET_MYSQL_Context *mc,
-            struct GNUNET_MYSQL_StatementHandle *sh,
-            struct GNUNET_MY_QueryParam *qp)
-{
-  int result;
-
-  result = GNUNET_MY_exec_prepared (mc, sh, qp);
-  LOG(GNUNET_ERROR_TYPE_DEBUG,
-       "Executed `GNUNET_MY_exec_prepared`' / %d\n", result);
-  if (GNUNET_OK != result)
-    LOG(GNUNET_ERROR_TYPE_ERROR,
-   _("Error executing SQL query: %s\n"),
-   mysql_stmt_error (GNUNET_MYSQL_statement_get_stmt (sh)));
-  return result;
-}
-
-
 /**
  * Initialize the database connections and associated
  * data structures (create tables and indices