Skip to contentSkip to conversation

cs-adjust-flight: Remove broken memoisation of queries in for_things

PATCH New Ian Jackson 1 participant 1 message Mar 20, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cs-adjust-flight: Remove broken memoisation of queries in for_things

The memo keys failed to include many of the important inputs.

CC Roger Pau Monné <[email protected]>
---
 cs-adjust-flight | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
cs-adjust-flight +2 -3
index 45c1420..85ced59 100755
@@ -132,10 +132,9 @@ sub for_things ($$$$$$$) {
     my ($spec, $fn, $ifnone,
         $table, $keycol, $basecond, $basecondvals) = @_;
 
-    our (%thing_q, %things_q);
-    my $thing_q = $thing_q{$table} ||= $dbh_tests->prepare
+    my $thing_q = $dbh_tests->prepare
         ("SELECT * FROM $table WHERE $basecond AND $keycol = ?");
-    my $things_q = $things_q{$table} ||= $dbh_tests->prepare
+    my $things_q = $dbh_tests->prepare
         ("SELECT * FROM $table WHERE $basecond");
 
     my ($specfn,$exact) = notspec_exfn("FOR_THINGS $table.$keycol",$spec);
Signature · 7 lines
2.11.0


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel