#include "ovsdb-error.h"
#include "row.h"
#include "table.h"
+#include "timeval.h"
#include "transaction.h"
#include "uuid.h"
#include "util.h"
table = shash_find_data(&db->tables, table_name);
if (!table) {
+ if (!strcmp(table_name, "_date")
+ || !strcmp(table_name, "_comment")) {
+ continue;
+ }
+
error = ovsdb_syntax_error(json, "unknown table",
"No table named %s.", table_name);
goto error;
struct ovsdb_file_replica *r = ovsdb_file_replica_cast(r_);
struct ovsdb_file_replica_aux aux;
struct ovsdb_error *error;
+ const char *comment;
aux.json = NULL;
aux.table_json = NULL;
return NULL;
}
+ comment = ovsdb_txn_get_comment(txn);
+ if (comment) {
+ json_object_put_string(aux.json, "_comment", comment);
+ }
+
+ json_object_put(aux.json, "_date", json_integer_create(time_now()));
+
error = ovsdb_log_write(r->log, aux.json);
json_destroy(aux.json);
if (error) {