Bug 14374

Summary: dont use mysql_auto_reconnect with DBIx::Connector
Product: Koha Reporter: Fridolin SOMERS <fridolin.somers>
Component: Architecture, internals, and plumbingAssignee: Fridolin SOMERS <fridolin.somers>
Status: CLOSED INVALID QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: indradg, jonathan.druart, olli-antti.kivilahti
Version: master   
Hardware: All   
OS: All   
See Also: http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14600
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14778
Change sponsored?: --- Patch complexity: Small patch
Who signed the patch off: Text to go in the release notes:
Version(s) released in:
Bug Depends on: 13645    
Bug Blocks: 14375    
Attachments: Bug 14374 - dont use mysql_auto_reconnect with BDIx::Connector

Description Fridolin SOMERS 2015-06-10 12:51:54 UTC
BDIx::Connector doc indicates that handler option mysql_auto_reconnect must be false.
See http://search.cpan.org/perldoc?DBIx%3A%3AConnector%3A%3ADriver%3A%3Amysql

So it should not be setted in C4::Context
Comment 1 Fridolin SOMERS 2015-06-10 12:56:02 UTC
Created attachment 40062 [details] [review]
Bug 14374 - dont use mysql_auto_reconnect with BDIx::Connector

BDIx::Connector doc indicates that handler option mysql_auto_reconnect must be false.
See http://search.cpan.org/perldoc?DBIx%3A%3AConnector%3A%3ADriver%3A%3Amysql

This patch removes this option setting in C4::Context

Test plan :
- Check connection to database does not fail for a long time page, such as a huge report
Comment 2 Indranil Das Gupta 2015-06-14 06:52:30 UTC
Hi,

(In reply to Fridolin SOMERS from comment #1)
> Created attachment 40062 [details] [review] [review]
> Bug 14374 - dont use mysql_auto_reconnect with BDIx::Connector

Curious new DBIx user questions: 

1/ Shouldn't this bug be dependent on bug #14375 ?

2/ Unless it is dependent on ^^^, would it not be better to set it to "0" instead of removing it? 

<quote>Note that if you are using a module or framework that performs reconnections for you (for example DBIx::Connector in fixup mode), this value must be set to 0.</quote> - http://search.cpan.org/~capttofu/DBD-mysql-4.031/lib/DBD/mysql.pm

thanks
-indranil
Comment 3 Olli-Antti Kivilahti 2015-08-06 11:29:48 UTC
Shouldn't this bug be merged into Bug 14375?
You cannot disable
- $dbh->{mysql_auto_reconnect} = 1;
Without first introducing the DBIx::Connector?
Comment 4 Fridolin SOMERS 2015-08-11 08:06:42 UTC
(In reply to Olli-Antti Kivilahti from comment #3)
> Shouldn't this bug be merged into Bug 14375?
> You cannot disable
> - $dbh->{mysql_auto_reconnect} = 1;
> Without first introducing the DBIx::Connector?

Bug 14375 does not introduce the use of DBIx::Connector, it's Bug 13645 pushed since 3.16.
Comment 5 Jonathan Druart 2015-11-11 13:07:21 UTC
DBIx::Connector is now gone, see bug 14778.