diff options
Diffstat (limited to 'test')
-rwxr-xr-x | test/it_dbi.t | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/it_dbi.t b/test/it_dbi.t index 70d7f6f..89df3b8 100755 --- a/test/it_dbi.t +++ b/test/it_dbi.t @@ -349,6 +349,17 @@ $r->update(['key4' => "val4'"]); is($r->_writes, 0); is($r- $r->update(['key4' => "val4'", 'key5' => "val5'"]); is($r->_writes, 1); is($r->key4, "val4'"); is($r->key5, "val5'"); $r->update(['key4' => "val4'", 'key5' => "val5'"]); is($r->_writes, 1); is($r->key4, "val4'"); is($r->key5, "val5'"); +# Check if iterator clears dynfields left over from previous record +$r->delete(["WHERE 1"]); +$r->replace(['ID' => 1, 'key1' => "a"]); +$r->replace(['ID' => 2, 'key2' => "b"]); +$r->clear(false); +$r->select("WHERE 1 ORDER BY ID"); +$r->iterate(); +is($r->key1, "a"); is($r->key2, null); +$r->iterate(); +is($r->key1, null); is($r->key2, "b"); + # # Test tracked update # |