mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-25 22:54:57 +02:00
Fix assertion failure in IdoMysqlConnection::FieldToEscapedString
fixes #8865
This commit is contained in:
parent
aaafbcbbac
commit
a4852dae67
@ -683,7 +683,8 @@ bool IdoMysqlConnection::FieldToEscapedString(const String& key, const Value& va
|
|||||||
if (DbValue::IsObjectInsertID(value)) {
|
if (DbValue::IsObjectInsertID(value)) {
|
||||||
dbrefcol = GetInsertID(dbobjcol);
|
dbrefcol = GetInsertID(dbobjcol);
|
||||||
|
|
||||||
ASSERT(dbrefcol.IsValid());
|
if (!dbrefcol.IsValid())
|
||||||
|
return false;
|
||||||
} else {
|
} else {
|
||||||
dbrefcol = GetObjectID(dbobjcol);
|
dbrefcol = GetObjectID(dbobjcol);
|
||||||
|
|
||||||
@ -750,8 +751,10 @@ void IdoMysqlConnection::InternalExecuteQuery(const DbQuery& query, DbQueryType
|
|||||||
bool first = true;
|
bool first = true;
|
||||||
|
|
||||||
BOOST_FOREACH(const Dictionary::Pair& kv, query.WhereCriteria) {
|
BOOST_FOREACH(const Dictionary::Pair& kv, query.WhereCriteria) {
|
||||||
if (!FieldToEscapedString(kv.first, kv.second, &value))
|
if (!FieldToEscapedString(kv.first, kv.second, &value)) {
|
||||||
|
m_QueryQueue.Enqueue(boost::bind(&IdoMysqlConnection::InternalExecuteQuery, this, query, (DbQueryType *)NULL));
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (!first)
|
if (!first)
|
||||||
where << " AND ";
|
where << " AND ";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user