* a failure of the command 'cmd' on file 'filename'
* with the message given by strerror(errno).
*/
-#define LOG_MYSQL(db, level, cmd, stmt) do { GNUNET_log_from (level, "psycstore-mysql", _("`%s' failed at %s:%d with error: %s\n"), cmd, __FILE__, __LINE__, mysql_stmt_error (stmt)); } while(0)
+#define LOG_MYSQL(db, level, cmd, stmt) do { GNUNET_log_from (level, "psycstore-mysql", _("`%s' failed at %s:%d with error: %s\n"), cmd, __FILE__, __LINE__, mysql_stmt_error (GNUNET_MYSQL_statement_get_stmt(stmt))); } while(0)
#define LOG(kind,...) GNUNET_log_from (kind, "psycstore-mysql", __VA_ARGS__)
exec_channel (struct Plugin *plugin, struct GNUNET_MYSQL_StatementHandle *stmt,
const struct GNUNET_CRYPTO_EddsaPublicKey *channel_key)
{
- MYSQL_STMT * statement = NULL;
- statement = GNUNET_MYSQL_statement_get_stmt (stmt);
-
- if (NULL == statement)
- {
- LOG_MYSQL(plugin, GNUNET_ERROR_TYPE_ERROR | GNUNET_ERROR_TYPE_BULK,
- "mysql statement invalide", statement);
- return GNUNET_SYSERR;
- }
-
struct GNUNET_MY_QueryParam params[] = {
GNUNET_MY_query_param_auto_from_type (channel_key),
GNUNET_MY_query_param_end
params))
{
LOG_MYSQL(plugin, GNUNET_ERROR_TYPE_ERROR | GNUNET_ERROR_TYPE_BULK,
- "mysql exec_channel", statement);
+ "mysql exec_channel", stmt);
}
- if (0 != mysql_stmt_reset (statement))
+ if (0 != mysql_stmt_reset (GNUNET_MYSQL_statement_get_stmt (stmt)))
{
LOG_MYSQL(plugin, GNUNET_ERROR_TYPE_ERROR | GNUNET_ERROR_TYPE_BULK,
- "mysql_stmt_reset", statement);
+ "mysql_stmt_reset", stmt);
return GNUNET_SYSERR;
}
transaction_begin (struct Plugin *plugin, enum Transactions transaction)
{
struct GNUNET_MYSQL_StatementHandle *stmt = plugin->transaction_begin;
- MYSQL_STMT * statement = NULL;
-
- statement = GNUNET_MYSQL_statement_get_stmt (stmt);
-
- if (NULL == statement)
- {
- LOG_MYSQL(plugin, GNUNET_ERROR_TYPE_ERROR | GNUNET_ERROR_TYPE_BULK,
- "mysql statement invalide", statement);
- return GNUNET_SYSERR;
- }
-
+
struct GNUNET_MY_QueryParam params[] = {
GNUNET_MY_query_param_end
};
params))
{
LOG_MYSQL(plugin, GNUNET_ERROR_TYPE_ERROR | GNUNET_ERROR_TYPE_BULK,
- "mysql extract_result", statement);
+ "mysql extract_result", stmt);
return GNUNET_SYSERR;
}
- if (0 != mysql_stmt_reset (statement))
+ if (0 != mysql_stmt_reset (GNUNET_MYSQL_statement_get_stmt(stmt)))
{
LOG_MYSQL(plugin, GNUNET_ERROR_TYPE_ERROR | GNUNET_ERROR_TYPE_BULK,
- "mysql_stmt_reset", statement);
+ "mysql_stmt_reset", stmt);
return GNUNET_SYSERR;
}
transaction_commit (struct Plugin *plugin)
{
struct GNUNET_MYSQL_StatementHandle *stmt = plugin->transaction_commit;
- MYSQL_STMT *statement = NULL;
-
- statement = GNUNET_MYSQL_statement_get_stmt (stmt);
-
- if (NULL == statement)
- {
- LOG_MYSQL(plugin, GNUNET_ERROR_TYPE_ERROR | GNUNET_ERROR_TYPE_BULK,
- "mysql statement invalide", statement);
- return GNUNET_SYSERR;
- }
struct GNUNET_MY_QueryParam params[] = {
GNUNET_MY_query_param_end
params))
{
LOG_MYSQL(plugin, GNUNET_ERROR_TYPE_ERROR | GNUNET_ERROR_TYPE_BULK,
- "mysql extract_result", statement);
+ "mysql extract_result", stmt);
return GNUNET_SYSERR;
}
- if (0 != mysql_stmt_reset (statement))
+ if (0 != mysql_stmt_reset (GNUNET_MYSQL_statement_get_stmt (stmt)))
{
LOG_MYSQL(plugin, GNUNET_ERROR_TYPE_ERROR | GNUNET_ERROR_TYPE_BULK,
- "mysql_stmt_reset", statement);
+ "mysql_stmt_reset", stmt);
return GNUNET_SYSERR;
}
transaction_rollback (struct Plugin *plugin)
{
struct GNUNET_MYSQL_StatementHandle *stmt = plugin->transaction_rollback;
- MYSQL_STMT* statement = NULL;
-
- statement = GNUNET_MYSQL_statement_get_stmt (stmt);
- if (NULL == statement)
- {
- LOG_MYSQL(plugin, GNUNET_ERROR_TYPE_ERROR | GNUNET_ERROR_TYPE_BULK,
- "mysql statement invalide", statement);
- return GNUNET_SYSERR;
- }
struct GNUNET_MY_QueryParam params[] = {
GNUNET_MY_query_param_end
params))
{
LOG_MYSQL(plugin, GNUNET_ERROR_TYPE_ERROR | GNUNET_ERROR_TYPE_BULK,
- "mysql extract_result", statement);
+ "mysql extract_result", stmt);
return GNUNET_SYSERR;
}
- if (0 != mysql_stmt_reset (statement))
+ if (0 != mysql_stmt_reset (GNUNET_MYSQL_statement_get_stmt (stmt)))
{
LOG_MYSQL(plugin, GNUNET_ERROR_TYPE_ERROR | GNUNET_ERROR_TYPE_BULK,
- "mysql_stmt_reset", statement);
+ "mysql_stmt_reset", stmt);
return GNUNET_SYSERR;
}
{
struct GNUNET_MYSQL_StatementHandle *stmt = plugin->insert_channel_key;
- MYSQL_STMT *statement = NULL;
- statement = GNUNET_MYSQL_statement_get_stmt (stmt);
-
- if(NULL == statement)
- {
- LOG_MYSQL(plugin, GNUNET_ERROR_TYPE_ERROR | GNUNET_ERROR_TYPE_BULK,
- "mysql statement invalide", statement);
- return GNUNET_SYSERR;
- }
-
struct GNUNET_MY_QueryParam params[] = {
GNUNET_MY_query_param_auto_from_type (channel_key),
GNUNET_MY_query_param_end
params))
{
LOG_MYSQL(plugin, GNUNET_ERROR_TYPE_ERROR | GNUNET_ERROR_TYPE_BULK,
- "mysql extract_result", statement);
+ "mysql extract_result", stmt);
return GNUNET_SYSERR;
}
- if (0 != mysql_stmt_reset (statement))
+ if (0 != mysql_stmt_reset (GNUNET_MYSQL_statement_get_stmt (stmt)))
{
LOG_MYSQL(plugin, GNUNET_ERROR_TYPE_ERROR | GNUNET_ERROR_TYPE_BULK,
- "mysql_stmt_reset", statement);
+ "mysql_stmt_reset", stmt);
return GNUNET_SYSERR;
}
{
struct GNUNET_MYSQL_StatementHandle *stmt = plugin->insert_slave_key;
- MYSQL_STMT *statement = NULL;
- statement = GNUNET_MYSQL_statement_get_stmt (stmt);
-
- if(NULL == statement)
- {
- LOG_MYSQL(plugin, GNUNET_ERROR_TYPE_ERROR | GNUNET_ERROR_TYPE_BULK,
- "mysql statement invalide", statement);
- return GNUNET_SYSERR;
- }
-
struct GNUNET_MY_QueryParam params[] = {
GNUNET_MY_query_param_auto_from_type (slave_key),
GNUNET_MY_query_param_end
params))
{
LOG_MYSQL(plugin, GNUNET_ERROR_TYPE_ERROR | GNUNET_ERROR_TYPE_BULK,
- "mysql extract_result", statement);
+ "mysql extract_result", stmt);
return GNUNET_SYSERR;
}
- if (0 != mysql_stmt_reset (statement))
+ if (0 != mysql_stmt_reset (GNUNET_MYSQL_statement_get_stmt (stmt)))
{
LOG_MYSQL(plugin, GNUNET_ERROR_TYPE_ERROR | GNUNET_ERROR_TYPE_BULK,
- "mysql_stmt_reset", statement);
+ "mysql_stmt_reset", stmt);
return GNUNET_SYSERR;
}
uint64_t igroup_generation = (uint64_t)group_generation;
struct GNUNET_MYSQL_StatementHandle *stmt = plugin->insert_membership;
- MYSQL_STMT *statement = NULL;
-
-/**** FAIL HERE ****/
- statement = GNUNET_MYSQL_statement_get_stmt (stmt);
GNUNET_assert (TRANSACTION_NONE == plugin->transaction);
params))
{
LOG_MYSQL(plugin, GNUNET_ERROR_TYPE_ERROR | GNUNET_ERROR_TYPE_BULK,
- "mysql extract_result", statement);
+ "mysql extract_result", stmt);
return GNUNET_SYSERR;
}
- if (0 != mysql_stmt_reset (statement))
+ if (0 != mysql_stmt_reset (GNUNET_MYSQL_statement_get_stmt (stmt)))
{
LOG_MYSQL(plugin, GNUNET_ERROR_TYPE_ERROR | GNUNET_ERROR_TYPE_BULK,
- "mysql_stmt_reset", statement);
+ "mysql_stmt_reset", stmt);
return GNUNET_SYSERR;
}
return GNUNET_OK;
struct Plugin *plugin = cls;
struct GNUNET_MYSQL_StatementHandle *stmt = plugin->select_membership;
- MYSQL_STMT *statement = NULL;
uint32_t did_join = 0;
- statement = GNUNET_MYSQL_statement_get_stmt (stmt);
-
- if(NULL == statement)
- {
- LOG_MYSQL(plugin, GNUNET_ERROR_TYPE_ERROR | GNUNET_ERROR_TYPE_BULK,
- "mysql statement invalide", statement);
- return GNUNET_SYSERR;
- }
-
int ret = GNUNET_SYSERR;
struct GNUNET_MY_QueryParam params_select[] = {
params_select))
{
LOG_MYSQL(plugin, GNUNET_ERROR_TYPE_ERROR | GNUNET_ERROR_TYPE_BULK,
- "mysql execute prepared", statement);
+ "mysql execute prepared", stmt);
return GNUNET_SYSERR;
}
results_select))
{
LOG_MYSQL(plugin, GNUNET_ERROR_TYPE_ERROR | GNUNET_ERROR_TYPE_BULK,
- "mysql extract_result", statement);
+ "mysql extract_result", stmt);
return GNUNET_SYSERR;
}
ret = GNUNET_NO;
}
- if (0 != mysql_stmt_reset (statement))
+ if (0 != mysql_stmt_reset (GNUNET_MYSQL_statement_get_stmt (stmt)))
{
LOG_MYSQL(plugin, GNUNET_ERROR_TYPE_ERROR | GNUNET_ERROR_TYPE_BULK,
- "mysql_stmt_reset", statement);
+ "mysql_stmt_reset", stmt);
return GNUNET_SYSERR;
}
struct Plugin *plugin = cls;
struct GNUNET_MYSQL_StatementHandle *stmt = plugin->insert_fragment;
- MYSQL_STMT *statement = NULL;
-
- statement = GNUNET_MYSQL_statement_get_stmt (stmt);
GNUNET_assert (TRANSACTION_NONE == plugin->transaction);
params_insert))
{
LOG_MYSQL(plugin, GNUNET_ERROR_TYPE_ERROR | GNUNET_ERROR_TYPE_BULK,
- "mysql execute prepared", statement);
+ "mysql execute prepared", stmt);
return GNUNET_SYSERR;
}
- if (0 != mysql_stmt_reset (statement))
+ if (0 != mysql_stmt_reset (GNUNET_MYSQL_statement_get_stmt (stmt)))
{
LOG_MYSQL(plugin, GNUNET_ERROR_TYPE_ERROR | GNUNET_ERROR_TYPE_BULK,
- "mysql_stmt_reset", statement);
+ "mysql_stmt_reset", stmt);
return GNUNET_SYSERR;
}
struct Plugin *plugin = cls;
struct GNUNET_MYSQL_StatementHandle *stmt = plugin->update_message_flags;
- MYSQL_STMT *statement = NULL;
-
- statement = GNUNET_MYSQL_statement_get_stmt (stmt);
int ret = GNUNET_SYSERR;
params_update))
{
LOG_MYSQL(plugin, GNUNET_ERROR_TYPE_ERROR | GNUNET_ERROR_TYPE_BULK,
- "mysql execute prepared", statement);
+ "mysql execute prepared", stmt);
return GNUNET_SYSERR;
}
- if (0 != mysql_stmt_reset (statement))
+ if (0 != mysql_stmt_reset (GNUNET_MYSQL_statement_get_stmt (stmt)))
{
LOG_MYSQL(plugin, GNUNET_ERROR_TYPE_ERROR | GNUNET_ERROR_TYPE_BULK,
- "mysql_stmt_reset", statement);
+ "mysql_stmt_reset", stmt);
return GNUNET_SYSERR;
}
int ret = GNUNET_SYSERR;
int sql_ret;
- MYSQL_STMT *statement = NULL;
-
- statement = GNUNET_MYSQL_statement_get_stmt (stmt);
-
uint32_t hop_counter = 0;
void *signature = NULL;
void *purpose = NULL;
break;
default:
LOG_MYSQL(plugin, GNUNET_ERROR_TYPE_ERROR | GNUNET_ERROR_TYPE_BULK,
- "mysql extract_result", statement);
+ "mysql extract_result", stmt);
}
}
while (sql_ret == GNUNET_YES);
struct Plugin *plugin = cls;
struct GNUNET_MYSQL_StatementHandle *stmt = plugin->select_fragments;
- MYSQL_STMT *statement = NULL;
-
- statement = GNUNET_MYSQL_statement_get_stmt (stmt);
- if (NULL == statement)
- {
- LOG_MYSQL(plugin, GNUNET_ERROR_TYPE_ERROR | GNUNET_ERROR_TYPE_BULK,
- "mysql get_stmt", statement);
- return GNUNET_SYSERR;
- }
int ret = GNUNET_SYSERR;
*returned_fragments = 0;
ret = fragment_select (plugin, stmt, params_select, returned_fragments, cb, cb_cls);
- if (0 != mysql_stmt_reset (statement))
+ if (0 != mysql_stmt_reset (GNUNET_MYSQL_statement_get_stmt (stmt)))
{
LOG_MYSQL (plugin, GNUNET_ERROR_TYPE_ERROR | GNUNET_ERROR_TYPE_BULK,
- "mysql_stmt_reset", statement);
+ "mysql_stmt_reset", stmt);
return GNUNET_SYSERR;
}
struct Plugin *plugin = cls;
struct GNUNET_MYSQL_StatementHandle *stmt = plugin->select_latest_fragments;
- MYSQL_STMT * statement = NULL;
-
- statement = GNUNET_MYSQL_statement_get_stmt (stmt);
int ret = GNUNET_SYSERR;
*returned_fragments = 0;
ret = fragment_select (plugin, stmt, params_select, returned_fragments, cb, cb_cls);
- if (0 != mysql_stmt_reset (statement))
+ if (0 != mysql_stmt_reset (GNUNET_MYSQL_statement_get_stmt (stmt)))
{
LOG_MYSQL(plugin, GNUNET_ERROR_TYPE_ERROR | GNUNET_ERROR_TYPE_BULK,
- "mysql_stmt_reset", statement);
+ "mysql_stmt_reset", stmt);
return GNUNET_SYSERR;
}
struct Plugin *plugin = cls;
struct GNUNET_MYSQL_StatementHandle *stmt = plugin->select_messages;
- MYSQL_STMT *statement = NULL;
-
- statement = GNUNET_MYSQL_statement_get_stmt (stmt);
int ret = GNUNET_SYSERR;
*returned_fragments = 0;
ret = fragment_select (plugin, stmt, params_select, returned_fragments, cb, cb_cls);
- if (0 != mysql_stmt_reset (statement))
+ if (0 != mysql_stmt_reset (GNUNET_MYSQL_statement_get_stmt (stmt)))
{
LOG_MYSQL(plugin, GNUNET_ERROR_TYPE_ERROR | GNUNET_ERROR_TYPE_BULK,
- "mysql_stmt_reset", statement);
+ "mysql_stmt_reset", stmt);
return GNUNET_SYSERR;
}
struct Plugin *plugin = cls;
struct GNUNET_MYSQL_StatementHandle *stmt = plugin->select_latest_messages;
- MYSQL_STMT *statement;
-
- statement = GNUNET_MYSQL_statement_get_stmt (stmt);
int ret = GNUNET_SYSERR;
*returned_fragments = 0;
ret = fragment_select (plugin, stmt, params_select, returned_fragments, cb, cb_cls);
- if (0 != mysql_stmt_reset (statement))
+ if (0 != mysql_stmt_reset (GNUNET_MYSQL_statement_get_stmt (stmt)))
{
LOG_MYSQL(plugin, GNUNET_ERROR_TYPE_ERROR | GNUNET_ERROR_TYPE_BULK,
- "mysql_stmt_reset", statement);
+ "mysql_stmt_reset", stmt);
return GNUNET_SYSERR;
}
struct Plugin *plugin = cls;
struct GNUNET_MYSQL_StatementHandle *stmt = plugin->select_message_fragment;
- MYSQL_STMT *statement = NULL;
-
- statement = GNUNET_MYSQL_statement_get_stmt (stmt);
int ret = GNUNET_SYSERR;
params_select))
{
LOG_MYSQL(plugin, GNUNET_ERROR_TYPE_ERROR | GNUNET_ERROR_TYPE_BULK,
- "mysql execute prepared", statement);
+ "mysql execute prepared", stmt);
return GNUNET_SYSERR;
}
-/****** CHANGER ICI ****/
+
ret = fragment_row (stmt, cb, cb_cls);
- if (0 != mysql_stmt_reset (statement))
+ if (0 != mysql_stmt_reset (GNUNET_MYSQL_statement_get_stmt (stmt)))
{
LOG_MYSQL(plugin, GNUNET_ERROR_TYPE_ERROR | GNUNET_ERROR_TYPE_BULK,
- "mysql_stmt_reset", statement);
+ "mysql_stmt_reset", stmt);
return GNUNET_SYSERR;
}
struct Plugin *plugin = cls;
struct GNUNET_MYSQL_StatementHandle *stmt = plugin->select_counters_message;
- MYSQL_STMT *statement = NULL;
-
- statement = GNUNET_MYSQL_statement_get_stmt (stmt);
- if (NULL == statement)
- {
- LOG_MYSQL(plugin, GNUNET_ERROR_TYPE_ERROR | GNUNET_ERROR_TYPE_BULK,
- "mysql get statement", statement);
- return GNUNET_SYSERR;
- }
int ret = GNUNET_SYSERR;
params_select))
{
LOG_MYSQL(plugin, GNUNET_ERROR_TYPE_ERROR | GNUNET_ERROR_TYPE_BULK,
- "mysql execute prepared", statement);
+ "mysql execute prepared", stmt);
return GNUNET_SYSERR;
}
if (GNUNET_OK != ret)
{
LOG_MYSQL(plugin, GNUNET_ERROR_TYPE_ERROR | GNUNET_ERROR_TYPE_BULK,
- "mysql extract_result", statement);
+ "mysql extract_result", stmt);
return GNUNET_SYSERR;
}
- if (0 != mysql_stmt_reset (statement))
+ if (0 != mysql_stmt_reset (GNUNET_MYSQL_statement_get_stmt (stmt)))
{
LOG_MYSQL(plugin, GNUNET_ERROR_TYPE_ERROR | GNUNET_ERROR_TYPE_BULK,
- "mysql_stmt_reset", statement);
+ "mysql_stmt_reset", stmt);
return GNUNET_SYSERR;
}
struct Plugin *plugin = cls;
struct GNUNET_MYSQL_StatementHandle *stmt = plugin->select_counters_state;
- MYSQL_STMT *statement = NULL;
-
- statement = GNUNET_MYSQL_statement_get_stmt (stmt);
- if (NULL == statement)
- {
- LOG_MYSQL(plugin, GNUNET_ERROR_TYPE_ERROR | GNUNET_ERROR_TYPE_BULK,
- "mysql get_stmt", statement);
- return GNUNET_SYSERR;
- }
int ret = GNUNET_SYSERR;
params_select))
{
LOG_MYSQL(plugin, GNUNET_ERROR_TYPE_ERROR | GNUNET_ERROR_TYPE_BULK,
- "mysql execute prepared", statement);
+ "mysql execute prepared", stmt);
return GNUNET_SYSERR;
}
if (GNUNET_OK != ret)
{
LOG_MYSQL(plugin, GNUNET_ERROR_TYPE_ERROR | GNUNET_ERROR_TYPE_BULK,
- "mysql extract_result", statement);
+ "mysql extract_result", stmt);
return GNUNET_SYSERR;
}
- if (0 != mysql_stmt_reset (statement))
+ if (0 != mysql_stmt_reset (GNUNET_MYSQL_statement_get_stmt (stmt)))
{
LOG_MYSQL(plugin, GNUNET_ERROR_TYPE_ERROR | GNUNET_ERROR_TYPE_BULK,
- "mysql_stmt_reset", statement);
+ "mysql_stmt_reset", stmt);
return GNUNET_SYSERR;
}
{
int ret = GNUNET_SYSERR;
- MYSQL_STMT *statement = NULL;
- statement = GNUNET_MYSQL_statement_get_stmt (stmt);
-
- if (NULL == statement)
- {
- LOG_MYSQL(plugin, GNUNET_ERROR_TYPE_ERROR | GNUNET_ERROR_TYPE_BULK,
- "mysql get_stmt", statement);
- return GNUNET_SYSERR;
- }
-
struct GNUNET_MY_QueryParam params[] = {
GNUNET_MY_query_param_auto_from_type (channel_key),
GNUNET_MY_query_param_string (name),
if (GNUNET_OK != ret)
{
LOG_MYSQL(plugin, GNUNET_ERROR_TYPE_ERROR | GNUNET_ERROR_TYPE_BULK,
- "mysql execute prepared", statement);
+ "mysql execute prepared", stmt);
return GNUNET_SYSERR;
}
- if (0 != mysql_stmt_reset (statement))
+ if (0 != mysql_stmt_reset (GNUNET_MYSQL_statement_get_stmt (stmt)))
{
LOG_MYSQL(plugin, GNUNET_ERROR_TYPE_ERROR | GNUNET_ERROR_TYPE_BULK,
- "mysql_stmt_reset", statement);
+ "mysql_stmt_reset", stmt);
return GNUNET_SYSERR;
}
const struct GNUNET_CRYPTO_EddsaPublicKey *channel_key,
uint64_t message_id)
{
- MYSQL_STMT *statement = NULL;
- statement = GNUNET_MYSQL_statement_get_stmt (stmt);
-
- if (NULL == statement)
- {
- LOG_MYSQL(plugin, GNUNET_ERROR_TYPE_ERROR | GNUNET_ERROR_TYPE_BULK,
- "mysql get_stmt", statement);
- return GNUNET_SYSERR;
- }
-
struct GNUNET_MY_QueryParam params[] = {
GNUNET_MY_query_param_uint64 (&message_id),
GNUNET_MY_query_param_auto_from_type (channel_key),
params))
{
LOG_MYSQL(plugin, GNUNET_ERROR_TYPE_ERROR | GNUNET_ERROR_TYPE_BULK,
- "mysql execute prepared", statement);
+ "mysql execute prepared", stmt);
return GNUNET_SYSERR;
}
- if (0 != mysql_stmt_reset (statement))
+ if (0 != mysql_stmt_reset (GNUNET_MYSQL_statement_get_stmt (stmt)))
{
LOG_MYSQL(plugin, GNUNET_ERROR_TYPE_ERROR | GNUNET_ERROR_TYPE_BULK,
- "mysql_stmt_reset", statement);
+ "mysql_stmt_reset", stmt);
return GNUNET_SYSERR;
}
int sql_ret ;
struct GNUNET_MYSQL_StatementHandle *stmt = plugin->select_state_one;
- MYSQL_STMT *statement = NULL;
-
- statement = GNUNET_MYSQL_statement_get_stmt (stmt);
struct GNUNET_MY_QueryParam params_select[] = {
GNUNET_MY_query_param_auto_from_type (channel_key),
break;
default:
LOG_MYSQL(plugin, GNUNET_ERROR_TYPE_ERROR | GNUNET_ERROR_TYPE_BULK,
- "mysql extract_result", statement);
+ "mysql extract_result", stmt);
}
- if (0 != mysql_stmt_reset (statement))
+ if (0 != mysql_stmt_reset (GNUNET_MYSQL_statement_get_stmt (stmt)))
{
LOG_MYSQL(plugin, GNUNET_ERROR_TYPE_ERROR | GNUNET_ERROR_TYPE_BULK,
- "mysql_stmt_reset", statement);
+ "mysql_stmt_reset", stmt);
return GNUNET_SYSERR;
}
int ret = GNUNET_SYSERR;
struct GNUNET_MYSQL_StatementHandle *stmt = plugin->select_state_prefix;
- MYSQL_STMT *statement = NULL;
- statement = GNUNET_MYSQL_statement_get_stmt (stmt);
-
- if (NULL == statement)
- {
- LOG_MYSQL(plugin, GNUNET_ERROR_TYPE_ERROR | GNUNET_ERROR_TYPE_BULK,
- "mysql get_stmt", statement);
- return GNUNET_SYSERR;
- }
uint32_t name_len = (uint32_t) strlen (name);
break;
default:
LOG_MYSQL(plugin, GNUNET_ERROR_TYPE_ERROR | GNUNET_ERROR_TYPE_BULK,
- "mysql extract_result", statement);
+ "mysql extract_result", stmt);
}
}
while (sql_ret == GNUNET_YES);
- if (0 != mysql_stmt_reset (statement))
+ if (0 != mysql_stmt_reset (GNUNET_MYSQL_statement_get_stmt (stmt)))
{
LOG_MYSQL(plugin, GNUNET_ERROR_TYPE_ERROR | GNUNET_ERROR_TYPE_BULK,
- "mysql_stmt_reset", statement);
+ "mysql_stmt_reset", stmt);
return GNUNET_SYSERR;
}
int ret = GNUNET_SYSERR;
struct GNUNET_MYSQL_StatementHandle *stmt = plugin->select_state_signed;
- MYSQL_STMT *statement = NULL;
-
- statement = GNUNET_MYSQL_statement_get_stmt (stmt);
- if (NULL == statement)
- {
- LOG_MYSQL(plugin, GNUNET_ERROR_TYPE_ERROR | GNUNET_ERROR_TYPE_BULK,
- "mysql get_stmt", statement);
- return GNUNET_SYSERR;
- }
struct GNUNET_MY_QueryParam params_select[] = {
GNUNET_MY_query_param_auto_from_type (channel_key),
break;
default:
LOG_MYSQL(plugin, GNUNET_ERROR_TYPE_ERROR | GNUNET_ERROR_TYPE_BULK,
- "mysql extract_result", statement);
+ "mysql extract_result", stmt);
}
}
while (sql_ret == GNUNET_YES);
- if (0 != mysql_stmt_reset (statement))
+ if (0 != mysql_stmt_reset (GNUNET_MYSQL_statement_get_stmt (stmt)))
{
LOG_MYSQL(plugin, GNUNET_ERROR_TYPE_ERROR | GNUNET_ERROR_TYPE_BULK,
- "mysql_stmt_reset", statement);
+ "mysql_stmt_reset", stmt);
return GNUNET_SYSERR;
}