X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~yarrgweb/git?p=ypp-sc-tools.main.git;a=blobdiff_plain;f=yarrg%2FCommodsDatabase.pm;h=3cb543dc43b3866971cff2cb28e39de7f6061631;hp=e14c0eb401e10a0f299b9b2c0564ce69d492266a;hb=651e153fc3598c12ae18ccf8c45d6dc80de9dbe1;hpb=9089113ed14d3a01ebe805ee15bd08705a59f172 diff --git a/yarrg/CommodsDatabase.pm b/yarrg/CommodsDatabase.pm index e14c0eb..3cb543d 100644 --- a/yarrg/CommodsDatabase.pm +++ b/yarrg/CommodsDatabase.pm @@ -178,7 +178,12 @@ sub nooutput ($) { if $ekindcount; } -sub db_check_referential_integrity () { +sub db_check_referential_integrity ($) { + my ($full) = @_; + # non-full is done only for market data updates; it avoids + # detecting errors which are essentially missing metadata and + # old schemas, etc. + foreach my $bs (qw(buy sell)) { nooutput(< maxposinclass; END + } } -sub db_chkcommit () { - db_check_referential_integrity(); +sub db_chkcommit ($) { + my ($full) = @_; + db_check_referential_integrity($full); $dbh->commit(); }