It's safe to lock SC_set_prepared() itself.
authorHiroshi Inoue <inoue@tpf.co.jp>
Sat, 22 Feb 2014 03:49:02 +0000 (12:49 +0900)
committerHiroshi Inoue <inoue@tpf.co.jp>
Sat, 22 Feb 2014 03:49:02 +0000 (12:49 +0900)
statement.c

index 603a77a9aa73c0d2a35fe5af17ef4d730d370176..a7dad74df783f884e9670d0fd903ceab87ca7bbd 100644 (file)
@@ -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);