From b5e6608eb687be127a5b593702d42e896bb00829 Mon Sep 17 00:00:00 2001 From: "Frank Ch. Eigler" Date: Tue, 28 Jun 2022 22:35:55 +0000 Subject: [PATCH] g-dejagnu-cluster-entropy: upsert syntax for rhel8 sqlite3 3.24+ postgresql-style "upsert" requires a (...) bit no longer needed on newer sqlite3 --- bin/g-dejagnu-cluster-entropy | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/g-dejagnu-cluster-entropy b/bin/g-dejagnu-cluster-entropy index 32a21f0..4224966 100755 --- a/bin/g-dejagnu-cluster-entropy +++ b/bin/g-dejagnu-cluster-entropy @@ -143,7 +143,7 @@ limit 1 expfileid, expfile_names[expfileid], set(expfiles_census[expfileid]), list(resultdict.items()), expentropy) db.execute(""" insert into testrun_cluster_dejagnu_expfile_entropy (cluster, expfile, entropy) values (?,?,?) -on conflict do update set entropy=excluded.entropy; +on conflict (cluster, expfile) do update set entropy=excluded.entropy; """, (clid, expfileid, expentropy)) db.commit() clustentropy += expentropy @@ -156,7 +156,7 @@ on conflict do update set entropy=excluded.entropy; # https://www.sqlite.org/lang_UPSERT.html db.execute(""" insert into testrun_cluster_dejagnu_expfile_entropy_fresh (cluster, memberhash) values (?, ?) -on conflict do update set memberhash=excluded.memberhash; +on conflict(cluster) do update set memberhash=excluded.memberhash; """, (clid,memberhash)) db.commit() -- 2.43.5