diff --git a/lib/db_ido_mysql/idomysqlconnection.cpp b/lib/db_ido_mysql/idomysqlconnection.cpp index a189220c2..237cf6f2e 100644 --- a/lib/db_ido_mysql/idomysqlconnection.cpp +++ b/lib/db_ido_mysql/idomysqlconnection.cpp @@ -805,6 +805,9 @@ void IdoMysqlConnection::InternalExecuteQuery(const DbQuery& query, DbQueryType if (type == DbQueryInsert || type == DbQueryUpdate) { std::ostringstream colbuf, valbuf; + if (type == DbQueryUpdate && query.Fields->GetLength() == 0) + return; + ObjectLock olock(query.Fields); bool first = true; diff --git a/lib/db_ido_pgsql/idopgsqlconnection.cpp b/lib/db_ido_pgsql/idopgsqlconnection.cpp index 7866c1c1f..8c7a10487 100644 --- a/lib/db_ido_pgsql/idopgsqlconnection.cpp +++ b/lib/db_ido_pgsql/idopgsqlconnection.cpp @@ -684,6 +684,9 @@ void IdoPgsqlConnection::InternalExecuteQuery(const DbQuery& query, DbQueryType if (type == DbQueryInsert || type == DbQueryUpdate) { std::ostringstream colbuf, valbuf; + if (type == DbQueryUpdate && query.Fields->GetLength() == 0) + return; + ObjectLock olock(query.Fields); Value value;