mirror of
https://github.com/OpenNebula/one.git
synced 2026-11-16 17:53:08 +09:00
bug #2544: Use REPLACE to insert monitoring values
(cherry picked from commit dc79dd2c38)
This commit is contained in:
1 parent
cde56bfb6f
commit
59e97c4ea8
2 files changed
+2
-2
No files matched your search
+1
-1
@@ -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 << "')";
|
||||
|
||||
Reference in new issue
Block a user