1
0
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:
Ruben S. Montero 2014-01-03 00:52:21 +01:00
parent bd0cb167d6
commit dc79dd2c38
2 changed files with 2 additions and 2 deletions

View File

@ -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 << "')";

View File

@ -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 << "')";