Fix a variable quoting bug in Database->locking().

Signed-off-by: Digimer <digimer@alteeve.ca>
main
Digimer 2 years ago
parent 4528f07508
commit 33b4516dea
  1. 2
      Anvil/Tools/Database.pm
  2. 2
      tools/striker-get-peer-data

@ -14828,7 +14828,7 @@ INSERT INTO
{ {
### NOTE: There is no history schema for states. ### NOTE: There is no history schema for states.
# The lock is stale. # The lock is stale.
my $query = "DELETE FROM states WHERE state_uuid = ".$state_uuid.";"; my $query = "DELETE FROM states WHERE state_uuid = ".$anvil->Database->quote($state_uuid).";";
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => $debug, list => { query => $query }}); $anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => $debug, list => { query => $query }});
$anvil->Database->write({debug => $debug, query => $query, source => $THIS_FILE, line => __LINE__}); $anvil->Database->write({debug => $debug, query => $query, source => $THIS_FILE, line => __LINE__});
} }

@ -355,7 +355,7 @@ sub get_password
else else
{ {
# We have the password. Delete the entry now. # We have the password. Delete the entry now.
my $query = "DELETE FROM states WHERE state_uuid=".$anvil->Database->quote($anvil->data->{switches}{'state-uuid'}).";"; my $query = "DELETE FROM states WHERE state_uuid = ".$anvil->Database->quote($anvil->data->{switches}{'state-uuid'}).";";
$anvil->Database->write({uuid => $anvil->data->{sys}{host_uuid}, debug => 3, query => $query, source => $THIS_FILE, line => __LINE__}); $anvil->Database->write({uuid => $anvil->data->{sys}{host_uuid}, debug => 3, query => $query, source => $THIS_FILE, line => __LINE__});
} }

Loading…
Cancel
Save