From acc5c7f262cf92c5e15fd61b3e3ad742cef39de1 Mon Sep 17 00:00:00 2001 From: Aki Tuomi Date: Sat, 9 Jan 2016 16:42:40 +0200 Subject: [PATCH] Do not erase all metadata --- modules/remotebackend/regression-tests/backend.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/remotebackend/regression-tests/backend.rb b/modules/remotebackend/regression-tests/backend.rb index a7c9f5dbe..3da5d4ef6 100755 --- a/modules/remotebackend/regression-tests/backend.rb +++ b/modules/remotebackend/regression-tests/backend.rb @@ -196,11 +196,12 @@ class Handler d_id = db.get_first_value("SELECT id FROM domains WHERE name = ?", args["name"]) return false if d_id.nil? db do |tx| - sql = "DELETE FROM domainmetadata WHERE domain_id = ?" - tx.execute(sql, [d_id]) + sql = "DELETE FROM domainmetadata WHERE domain_id = ? AND kind = ?" + tx.execute(sql, [d_id, args["kind"]]) unless args["value"].nil? sql = "INSERT INTO domainmetadata (domain_id,kind,content) VALUES(?,?,?)" args["value"].each do |value| + STDERR.puts"Executing INSERT INTO domainmetadata (domain_id,kind,content) VALUES(#{d_id}, #{args["kind"]}, #{value})" tx.execute(sql,[d_id, args["kind"], value]) end end -- 2.40.0