mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-21 14:50:08 +03:00
bug #2544: Use REPLACE to insert monitoring values
This commit is contained in:
parent
bd0cb167d6
commit
dc79dd2c38
@ -495,7 +495,7 @@ int Host::update_monitoring(SqlDB * db)
|
||||
goto error_xml;
|
||||
}
|
||||
|
||||
oss << "INSERT INTO " << monit_table << " ("<< monit_db_names <<") VALUES ("
|
||||
oss << "REPLACE INTO " << monit_table << " ("<< monit_db_names <<") VALUES ("
|
||||
<< oid << ","
|
||||
<< last_monitored << ","
|
||||
<< "'" << sql_xml << "')";
|
||||
|
@ -1346,7 +1346,7 @@ int VirtualMachine::update_monitoring(SqlDB * db)
|
||||
goto error_xml;
|
||||
}
|
||||
|
||||
oss << "INSERT INTO " << monit_table << " ("<< monit_db_names <<") VALUES ("
|
||||
oss << "REPLACE INTO " << monit_table << " ("<< monit_db_names <<") VALUES ("
|
||||
<< oid << ","
|
||||
<< last_poll << ","
|
||||
<< "'" << sql_xml << "')";
|
||||
|
Loading…
x
Reference in New Issue
Block a user