Skip to content

Commit

Permalink
Fix bug during copy when in the config the value of pool_reserve_prep…
Browse files Browse the repository at this point in the history
…ared_statement is equal to yes (#562)

* fixed

* fmt

* fix
  • Loading branch information
NikitaUnisikhin authored Jan 28, 2024
1 parent 999672b commit 806aebd
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion sources/frontend.c
Original file line number Diff line number Diff line change
Expand Up @@ -997,6 +997,7 @@ static od_frontend_status_t od_frontend_remote_client(od_relay_t *relay,

od_frontend_status_t retstatus = OD_OK;
machine_msg_t *msg;
msg = NULL;
bool forwarded = 0;
switch (type) {
case KIWI_FE_COPY_DONE:
Expand Down Expand Up @@ -1513,7 +1514,8 @@ static od_frontend_status_t od_frontend_remote_client(od_relay_t *relay,
}

/* If the retstatus is not SKIP */
if (route->rule->pool->reserve_prepared_statement && forwarded != 1) {
if (route->rule->pool->reserve_prepared_statement && forwarded != 1 &&
msg != NULL) {
msg = kiwi_fe_copy_msg(msg, data, size);
od_write(&server->io, msg);
retstatus = OD_SKIP;
Expand Down

0 comments on commit 806aebd

Please sign in to comment.