In order to make sure developers will be aware of possible regressions we should turn the strict SQL mode on for tests.
Created attachment 80887 [details] [review] Bug 21613: Add a test
Created attachment 80888 [details] [review] Bug 21613: Turn strict SQL modes on for tests This patch will turn the strict SQL modes on When tests are ran with prove. Test plan: - Apply the first patch - prove t/db_dependent/Koha/Database.t => Will pass if you have <strict_sql_modes>1</strict_sql_modes> in your koha-conf.xml => Will fail otherwise - Apply the second patch - prove t/db_dependent/Koha/Database.t => Will pass whatever the value of strict_sql_modes in your koha-conf.xml
Created attachment 80896 [details] [review] Bug 21613: Add a test Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Created attachment 80897 [details] [review] Bug 21613: Turn strict SQL modes on for tests This patch will turn the strict SQL modes on When tests are ran with prove. Test plan: - Apply the first patch - prove t/db_dependent/Koha/Database.t => Will pass if you have <strict_sql_modes>1</strict_sql_modes> in your koha-conf.xml => Will fail otherwise - Apply the second patch - prove t/db_dependent/Koha/Database.t => Will pass whatever the value of strict_sql_modes in your koha-conf.xml Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Created attachment 80904 [details] [review] Bug 21613: (QA follow-up) Resolve warning on $ENV{_} Some shells may not pass the program name in underscore, and cron also does not like it here: Use of uninitialized value $ENV{"_"} in pattern match (m//) at Koha/Database.pm line 79. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Created attachment 80936 [details] [review] Bug 21613: (QA follow-up) Resolve warning on $ENV{_} Some shells may not pass the program name in underscore, and cron also does not like it here: Use of uninitialized value $ENV{"_"} in pattern match (m//) at Koha/Database.pm line 79. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Created attachment 80937 [details] [review] Bug 21613: (QA follow-up) Resolve warning on $ENV{_} - avoid autovivification See C4::Circulation::SendCirculationAlert 3355 my $do_not_lock = ( exists $ENV{_} && $ENV{_} =~ m|prove| ) || $ENV{KOHA_NO_TABLE_LOCKS}; Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Created attachment 81387 [details] [review] Bug 21613: Add a test Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Created attachment 81388 [details] [review] Bug 21613: Turn strict SQL modes on for tests This patch will turn the strict SQL modes on When tests are ran with prove. Test plan: - Apply the first patch - prove t/db_dependent/Koha/Database.t => Will pass if you have <strict_sql_modes>1</strict_sql_modes> in your koha-conf.xml => Will fail otherwise - Apply the second patch - prove t/db_dependent/Koha/Database.t => Will pass whatever the value of strict_sql_modes in your koha-conf.xml Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Created attachment 81389 [details] [review] Bug 21613: (QA follow-up) Resolve warning on $ENV{_} Some shells may not pass the program name in underscore, and cron also does not like it here: Use of uninitialized value $ENV{"_"} in pattern match (m//) at Koha/Database.pm line 79. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Created attachment 81390 [details] [review] Bug 21613: (QA follow-up) Resolve warning on $ENV{_} - avoid autovivification See C4::Circulation::SendCirculationAlert 3355 my $do_not_lock = ( exists $ENV{_} && $ENV{_} =~ m|prove| ) || $ENV{KOHA_NO_TABLE_LOCKS}; Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Awesome work all! Pushed to master for 18.11
I'm backporting allot of the sql fixes, but some are not trivial. As such I'm holding off on backporting this trigger whilst I ponder the worthwhileness of backporting the less trivial cases.