aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorConstantin Michael <constantin@codesynthesis.com>2011-07-24 19:33:18 +0200
committerConstantin Michael <constantin@codesynthesis.com>2011-07-24 19:33:18 +0200
commit4f2497446d20ac418f0f3a5269dbd53331de2615 (patch)
tree071b6515f6762eb6acd08a93a594c939a764eee6
parentf6593b683cf0d7a7294697adfde12163f1e1c701 (diff)
Always initialize format and size values in native_bind
-rw-r--r--odb/pgsql/statement.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/odb/pgsql/statement.cxx b/odb/pgsql/statement.cxx
index a9c7d9b..3f5b340 100644
--- a/odb/pgsql/statement.cxx
+++ b/odb/pgsql/statement.cxx
@@ -86,6 +86,9 @@ namespace odb
{
const bind& current_bind (b.bind[i]);
+ n.formats[i] = 1;
+ n.lengths[i] = 0;
+
if (current_bind.is_null != 0 && *current_bind.is_null)
{
n.values[i] = 0;
@@ -93,7 +96,6 @@ namespace odb
}
n.values[i] = reinterpret_cast<char*> (current_bind.buffer);
- n.formats[i] = 1;
size_t l;