mdb: fix the delete wrong line bug when updating the table.
authorIsmo Puustinen <ismo.puustinen@intel.com>
Mon, 20 Jan 2014 13:41:51 +0000 (15:41 +0200)
committerIsmo Puustinen <ismo.puustinen@intel.com>
Mon, 20 Jan 2014 14:01:29 +0000 (16:01 +0200)
src/murphy-db/mdb/table.c

index 6ab0066..21ef74c 100644 (file)
@@ -766,7 +766,7 @@ static int update_single_row(mdb_table_t       *tbl,
     changed = mdb_row_update(tbl, row, cds, data, index_update, &cmask);
 
     if (changed <= 0) {
-        mdb_row_delete(tbl, row, 0, 1);
+        mdb_row_delete(tbl, before, 0, 1);
         return changed;
     }