From 6dd33fa751622bbde8b51b66960e48ab5447e53f Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Mon, 23 Feb 2015 15:24:07 +0100 Subject: [PATCH] Make sure to not ignore fields which are set to an empty string fixes #8496 --- lib/db_ido_mysql/idomysqlconnection.cpp | 2 +- lib/db_ido_pgsql/idopgsqlconnection.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/db_ido_mysql/idomysqlconnection.cpp b/lib/db_ido_mysql/idomysqlconnection.cpp index ab2295277..560f8f8a0 100644 --- a/lib/db_ido_mysql/idomysqlconnection.cpp +++ b/lib/db_ido_mysql/idomysqlconnection.cpp @@ -673,7 +673,7 @@ void IdoMysqlConnection::InternalExecuteQuery(const DbQuery& query, DbQueryType BOOST_FOREACH(const Dictionary::Pair& kv, query.Fields) { Value value; - if (kv.second.IsEmpty()) + if (kv.second.IsEmpty() && !kv.second.IsString()) continue; if (!FieldToEscapedString(kv.first, kv.second, &value)) diff --git a/lib/db_ido_pgsql/idopgsqlconnection.cpp b/lib/db_ido_pgsql/idopgsqlconnection.cpp index 5faf4dfd1..e401b75cd 100644 --- a/lib/db_ido_pgsql/idopgsqlconnection.cpp +++ b/lib/db_ido_pgsql/idopgsqlconnection.cpp @@ -668,7 +668,7 @@ void IdoPgsqlConnection::InternalExecuteQuery(const DbQuery& query, DbQueryType Value value; bool first = true; BOOST_FOREACH(const Dictionary::Pair& kv, query.Fields) { - if (kv.second.IsEmpty()) + if (kv.second.IsEmpty() && !kv.second.IsString()) continue; if (!FieldToEscapedString(kv.first, kv.second, &value)) -- 2.40.0