ovsdb_column_set_add(&columns, column);
}
} else {
- struct shash_node *node;
-
- SHASH_FOR_EACH (node, &table->columns) {
- const struct ovsdb_column *column = node->data;
- if (column->index != OVSDB_COL_UUID) {
+ const struct shash_node **nodes;
+ size_t i, n;
+
+ n = shash_count(&table->columns);
+ nodes = shash_sort(&table->columns);
+ for (i = 0; i < n; i++) {
+ const struct ovsdb_column *column = nodes[i]->data;
+ if (column->index != OVSDB_COL_UUID
+ && column->index != OVSDB_COL_VERSION) {
ovsdb_column_set_add(&columns, column);
}
}
+ free(nodes);
+
+ ovsdb_column_set_add(&columns,
+ ovsdb_table_schema_get_column(table, "_version"));
}
if (argc >= 6 && *argv[5] != '\0') {
{"op": "delete",
"table": "a",
"where": [["a", "==", 0]]}]]]],
- [[row,action,a,a2a,a2b,a2a1,_version
-<0>,initial,0,"[""set"",[]]","[""uuid"",""<1>""]","[""uuid"",""<0>""]","[""uuid"",""<2>""]"
-<3>,initial,1,"[""uuid"",""<0>""]","[""uuid"",""<1>""]","[""uuid"",""<3>""]","[""uuid"",""<4>""]"
+ [[row,action,a,a2a,a2a1,a2b,_version
+<0>,initial,0,"[""set"",[]]","[""uuid"",""<0>""]","[""uuid"",""<1>""]","[""uuid"",""<2>""]"
+<3>,initial,1,"[""uuid"",""<0>""]","[""uuid"",""<3>""]","[""uuid"",""<1>""]","[""uuid"",""<4>""]"
-row,action,a,a2a,a2b,a2a1,_version
-<0>,delete,0,"[""set"",[]]","[""uuid"",""<1>""]","[""uuid"",""<0>""]","[""uuid"",""<2>""]"
+row,action,a,a2a,a2a1,a2b,_version
+<0>,delete,0,"[""set"",[]]","[""uuid"",""<0>""]","[""uuid"",""<1>""]","[""uuid"",""<2>""]"
<3>,old,,"[""uuid"",""<0>""]",,,
-,new,1,"[""set"",[]]","[""uuid"",""<1>""]","[""uuid"",""<3>""]","[""uuid"",""<5>""]"
+,new,1,"[""set"",[]]","[""uuid"",""<3>""]","[""uuid"",""<1>""]","[""uuid"",""<5>""]"
]])