auto/share/dist/Zonemaster-Backend/patch/patch_mysql_db_zonemaster_backend_ver_5.0.2.pl untested

filter: Statementstmt 0.0% 0 / 21 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 6 Podpod 0.0% 0 / 1 totaltotal 0.0% 0 / 30 CC 1 SCAR 6.9
CC
1
Cov
0%
patch_db
2.0
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1 use strict;
2 use warnings;
3  
4 use DBI qw(:utils);
5  
6 use Zonemaster::Backend::Config;
7 use Zonemaster::Backend::DB::MySQL;
8  
9 my $config = Zonemaster::Backend::Config->load_config();
10 if ( $config->DB_engine ne 'MySQL' ) {
11 die "The configuration file does not contain the MySQL backend";
12 }
13 my $dbh = Zonemaster::Backend::DB::MySQL->from_config( $config )->dbh;
14  
15 sub patch_db {
16 ############################################################################
17 # Convert column "results" to MEDIUMBLOB so that it can hold larger results
18 ############################################################################
19 $dbh->do( 'ALTER TABLE test_results MODIFY results mediumblob' );
20 }
21  
22 patch_db();