summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rwxr-xr-xtest/it_dbi.t5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/it_dbi.t b/test/it_dbi.t
index faac5a3..bf5d0f0 100755
--- a/test/it_dbi.t
+++ b/test/it_dbi.t
@@ -352,12 +352,17 @@ $r->update(['key4' => "val4'", 'key5' => "val5'"]); is($r->_writes, 1); is($r-
$r->delete(["WHERE 1"]);
$r->replace(['ID' => 1, 'key1' => "a"]);
$r->replace(['ID' => 2, 'key2' => "b"]);
+$r->replace(['ID' => 3]);
$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");
+$r->iterate();
+is($r->_dyndata, [], '_dyndata for record with empty dyncols should be empty');
+$r->update(['key3' => 'c']);
+is($r->key3, 'c', 'dynamic column for record with empty dyncols whould be correctly created');
# don't do dyncols stuff in where when we select form multiple tables (column names are unknown then)
is($r->_where(['FROM' => 'it_dbi_test AS a, it_dbi_test AS b', '-a.ID' => 'b.ID']), 'WHERE a.ID = b.ID', "don't do JSON_EXTRACT when we have multiple tables in FROM");