From 2f4f8eabf6ce685c38d69da3e98132b77d38d188 Mon Sep 17 00:00:00 2001 From: Hiroshi Inoue Date: Sat, 22 Feb 2014 12:49:02 +0900 Subject: [PATCH] It's safe to lock SC_set_prepared() itself. --- statement.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/statement.c b/statement.c index 603a77a..a7dad74 100644 --- a/statement.c +++ b/statement.c @@ -683,6 +683,7 @@ SC_set_prepared(StatementClass *stmt, int prepared) { ConnectionClass *conn = SC_get_conn(stmt); + ENTER_CONN_CS(conn); if (conn && CONN_CONNECTED == conn->status) { if (CC_is_in_error_trans(conn)) @@ -699,6 +700,7 @@ SC_set_prepared(StatementClass *stmt, int prepared) QR_Destructor(res); } } + LEAVE_CONN_CS(conn); } if (NOT_YET_PREPARED == prepared) SC_set_planname(stmt, NULL); -- 2.39.5