Fix: IDO tries to execute empty UPDATE queries

fixes #10473
This commit is contained in:
Gunnar Beutner 2015-10-28 07:45:18 +01:00
parent 4763dea571
commit 5ad0c67485
2 changed files with 6 additions and 0 deletions

View File

@ -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;

View File

@ -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;