Row.delete() handled the case of deleting a row that was added within the
current transaction, but not yet committed, but it did not correctly handle
the case of deleting a row that belonged to the database before the
transaction started. This fixes the problem.
Reported-by: Yeming Zhao <zhaoyeming@gmail.com>
Tested-by: Yeming Zhao <zhaoyeming@gmail.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Vjekoslav Brajkovic balkan@cs.washington.edu
Voravit T. voravit@kth.se
YAMAMOTO Takashi yamamoto@valinux.co.jp
Vjekoslav Brajkovic balkan@cs.washington.edu
Voravit T. voravit@kth.se
YAMAMOTO Takashi yamamoto@valinux.co.jp
+Yeming Zhao zhaoyeming@gmail.com
Yongqiang Liu liuyq7809@gmail.com
kk yap yapkke@stanford.edu
likunyun kunyunli@hotmail.com
Yongqiang Liu liuyq7809@gmail.com
kk yap yapkke@stanford.edu
likunyun kunyunli@hotmail.com
-# Copyright (c) 2009, 2010, 2011, 2012 Nicira, Inc.
+# Copyright (c) 2009, 2010, 2011, 2012, 2013 Nicira, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
assert self._changes is not None
if self._data is None:
del self._idl.txn._txn_rows[self.uuid]
assert self._changes is not None
if self._data is None:
del self._idl.txn._txn_rows[self.uuid]
+ else:
+ self._idl.txn._txn_rows[self.uuid] = self
self.__dict__["_changes"] = None
del self._table.rows[self.uuid]
self.__dict__["_changes"] = None
del self._table.rows[self.uuid]