Commit 63d06ef5 authored by Michael Meskes's avatar Michael Meskes

In ecpglib restore LC_NUMERIC in case of an error.

parent 48fb49e3
...@@ -1772,8 +1772,12 @@ ECPGdo(const int lineno, const int compat, const int force_indicator, const char ...@@ -1772,8 +1772,12 @@ ECPGdo(const int lineno, const int compat, const int force_indicator, const char
*/ */
if (statement_type == ECPGst_prepnormal) if (statement_type == ECPGst_prepnormal)
{ {
if (!ecpg_auto_prepare(lineno, connection_name, compat, &prepname, query)) if (!ecpg_auto_prepare(lineno, connection_name, compat, &prepname, query)) {
setlocale(LC_NUMERIC, oldlocale);
ecpg_free(oldlocale);
va_end(args);
return (false); return (false);
}
/* /*
* statement is now prepared, so instead of the query we have to * statement is now prepared, so instead of the query we have to
...@@ -1800,6 +1804,9 @@ ECPGdo(const int lineno, const int compat, const int force_indicator, const char ...@@ -1800,6 +1804,9 @@ ECPGdo(const int lineno, const int compat, const int force_indicator, const char
else else
{ {
ecpg_raise(lineno, ECPG_INVALID_STMT, ECPG_SQLSTATE_INVALID_SQL_STATEMENT_NAME, stmt->command); ecpg_raise(lineno, ECPG_INVALID_STMT, ECPG_SQLSTATE_INVALID_SQL_STATEMENT_NAME, stmt->command);
setlocale(LC_NUMERIC, oldlocale);
ecpg_free(oldlocale);
va_end(args);
return (false); return (false);
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment