[Bps-public-commit] dbix-searchbuilder branch, fix-mariadb-reconnect-segfaults, repushed

? sunnavy sunnavy at bestpractical.com
Wed Jul 1 13:32:14 EDT 2020


The branch fix-mariadb-reconnect-segfaults was deleted and repushed:
       was e972539b66af20136f3d27537c8c84e897d4e571
       now be8fd2f8f2e4a1110189b36954170c50b3f817a3

1:  e972539 ! 1:  be8fd2f Fix segmentation faults on reconnect for mariadb 10.2+
    @@ -1,9 +1,9 @@
     Author: sunnavy <sunnavy at bestpractical.com>
     
    -    Fix segmentation faults for mariadb 10.3+ on reconnect
    +    Fix segmentation faults on reconnect for mariadb 10.2+
         
         We call ping on existing dbh to check if it's still active or not, which
    -    sadly could cause segmentation faults on mariadb 10.3+, related code is
    +    sadly could cause segmentation faults on mariadb 10.2+, related code is
         in both Connect and TransactionDepth methods:
         
             $self->dbh && $self->dbh->ping
    @@ -45,14 +45,14 @@
      
     +    my $ret = $dbh->disconnect;
     +
    -+    # DBD::mysql with MariaDB 10.3+ could cause segment faults when
    ++    # DBD::mysql with MariaDB 10.2+ could cause segment faults when
     +    # interacting with a disconnected handle, here we unset
     +    # dbh to inform other code that there is no connection any more.
     +    # See also https://github.com/perl5-dbi/DBD-mysql/issues/306
     +
     +    if (   $self->isa('DBIx::SearchBuilder::Handle::mysql')
     +        && $self->{'database_version'} =~ /mariadb/i
    -+        && $self->{'database_version'} ge '10.3' )
    ++        && $self->{'database_version'} ge '10.2' )
     +    {
     +        $self->dbh(undef);
     +    }



More information about the Bps-public-commit mailing list