cs-adjust-flight: Remove broken memoisation of queries in for_things
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]>
Signed-off-by Ian Jackson <[email protected]>
--- cs-adjust-flight | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
cs-adjust-flight +2 -3
@@ -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