diff options
author | Michael Meskes <meskes@postgresql.org> | 2011-09-01 15:27:38 +0200 |
---|---|---|
committer | Michael Meskes <meskes@postgresql.org> | 2011-09-01 15:36:34 +0200 |
commit | 12613cb6b83cac1aa1e7882e84902c445fce3e74 (patch) | |
tree | 414331a35b1bf19e42f343266f60d922248e7faa /src | |
parent | c42438364c940bb29ce2d0b2daf5c0a3f3a7b5a0 (diff) |
In ecpglib restore LC_NUMERIC in case of an error.
Diffstat (limited to 'src')
-rw-r--r-- | src/interfaces/ecpg/ecpglib/execute.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/interfaces/ecpg/ecpglib/execute.c b/src/interfaces/ecpg/ecpglib/execute.c index 51c5cdf8d80..0c4e0cc730c 100644 --- a/src/interfaces/ecpg/ecpglib/execute.c +++ b/src/interfaces/ecpg/ecpglib/execute.c @@ -1492,7 +1492,11 @@ ECPGdo(const int lineno, const int compat, const int force_indicator, const char if (statement_type == ECPGst_prepnormal) { if (!ecpg_auto_prepare(lineno, connection_name, compat, questionmarks, &prepname, query)) + setlocale(LC_NUMERIC, oldlocale); + ecpg_free(oldlocale); + va_end(args); return (false); + } /* * statement is now prepared, so instead of the query we have to |