aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/psycstore/plugin_psycstore_mysql.c27
1 files changed, 1 insertions, 26 deletions
diff --git a/src/psycstore/plugin_psycstore_mysql.c b/src/psycstore/plugin_psycstore_mysql.c
index 2c06b9b29..6e6b9ac13 100644
--- a/src/psycstore/plugin_psycstore_mysql.c
+++ b/src/psycstore/plugin_psycstore_mysql.c
@@ -255,38 +255,13 @@ mysql_prepare (struct GNUNET_MYSQL_Context *mc,
255 if(NULL == *stmt) 255 if(NULL == *stmt)
256 LOG(GNUNET_ERROR_TYPE_ERROR, 256 LOG(GNUNET_ERROR_TYPE_ERROR,
257 _("Error preparing SQL query: %s\n %s\n"), 257 _("Error preparing SQL query: %s\n %s\n"),
258 mysql_stmt_error (GNUNET_MYSQL_statement_get_stmt (stmt)), sql); 258 mysql_stmt_error (GNUNET_MYSQL_statement_get_stmt (*stmt)), sql);
259 259
260 return 0; 260 return 0;
261} 261}
262 262
263 263
264/** 264/**
265 * @brief Prepare a SQL statement
266 *
267 * @param dbh handle to the database
268 * @param sql SQL statement, UTF-8 encoded
269 * @return 0 on success
270 */
271static int
272mysql_exec (struct GNUNET_MYSQL_Context *mc,
273 struct GNUNET_MYSQL_StatementHandle *sh,
274 struct GNUNET_MY_QueryParam *qp)
275{
276 int result;
277
278 result = GNUNET_MY_exec_prepared (mc, sh, qp);
279 LOG(GNUNET_ERROR_TYPE_DEBUG,
280 "Executed `GNUNET_MY_exec_prepared`' / %d\n", result);
281 if (GNUNET_OK != result)
282 LOG(GNUNET_ERROR_TYPE_ERROR,
283 _("Error executing SQL query: %s\n"),
284 mysql_stmt_error (GNUNET_MYSQL_statement_get_stmt (sh)));
285 return result;
286}
287
288
289/**
290 * Initialize the database connections and associated 265 * Initialize the database connections and associated
291 * data structures (create tables and indices 266 * data structures (create tables and indices
292 * as needed as well). 267 * as needed as well).