From bd3be447bee682ef53f5d300395d8f8add43b885 Mon Sep 17 00:00:00 2001 From: Hiroshi Inoue Date: Fri, 11 May 2018 18:42:08 +0900 Subject: [PATCH] Fix a crash bug when handling error messages. Also modified some error messages. --- results.c | 4 ++-- statement.c | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/results.c b/results.c index 131775f..00148ef 100644 --- a/results.c +++ b/results.c @@ -3058,7 +3058,7 @@ MYLOG(DETAIL_LOG_LEVEL, "entering bestitem=%s bestqual=%s\n", SAFE_NAME(ti->best */ else { - SC_set_error(stmt,STMT_INTERNAL_ERROR, "can't find the add and updating row because of the lack of oid", func); + SC_set_error(stmt,STMT_INTERNAL_ERROR, "can't find added and updating row because of the lack of oid", func); goto cleanup; } } @@ -3091,7 +3091,7 @@ MYLOG(DETAIL_LOG_LEVEL, "entering bestitem=%s bestqual=%s\n", SAFE_NAME(ti->best } else { - SC_set_error(stmt,STMT_INTERNAL_ERROR, "can't find the add and updating row because of the lack of oid", func); + SC_set_error(stmt,STMT_INTERNAL_ERROR, "can't find added and updating row because of the lack of oid", func); goto cleanup; } if (bestqual && oidint) diff --git a/statement.c b/statement.c index 6b11236..0a9623d 100644 --- a/statement.c +++ b/statement.c @@ -1428,6 +1428,8 @@ MYLOG(DETAIL_LOG_LEVEL, "entering %p->%p check=%i\n", from_res ,self, check); 0 < self->__error_number) return; } + if (!from_res) + return; self->__error_number = number; if (!check || message) { -- 2.39.5