1
package GenTest::Validator::FalconErrors;
4
@ISA = qw(GenTest::Validator GenTest);
9
use GenTest::Constants;
11
use GenTest::Validator;
16
# This test examines error messages returned from Falcon in order to detect situations
17
# where the error message mentiones tables that were not used in the original query
21
my ($comparator, $executors, $results) = @_;
23
foreach my $result (@$results) {
24
my $query = $result->query();
25
my $error = $result->errstr();
27
# This test only pertains to SELECT/INSERT/UPDATE/DELETE queries
28
# It does not pertain to ALTERs because of unpredictable temporary table names
29
return STATUS_OK if $query !~ m{insert|update|select|delete}sgio;
32
($query =~ m{^select}sio) &&
33
($error =~ m{table has uncommitted updates})
35
say("Error: '".$error."' returned on a SELECT query.");
36
return STATUS_DATABASE_CORRUPTION;
42
if ($error =~ m{update conflict in table .*?\.([A-Z.]*)}sio) {
44
} elsif ($error =~ m{'duplicate values for key .*? in table .*?\.([A-Z.]*)}sio) {
49
(defined $falcon_table) &&
50
($query !~ m{$falcon_table}sio)
52
say("Error: '".$error."' indicates Falcon internal table mix-up.");
53
return STATUS_DATABASE_CORRUPTION;