Bug 20665 - OAI-PMH Provider should reset MySQL connection time zone
Summary: OAI-PMH Provider should reset MySQL connection time zone
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Web services (show other bugs)
Version: Main
Hardware: All All
: P5 - low major
Assignee: Ere Maijala
QA Contact: Tomás Cohen Arazi (tcohen)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-04-26 12:02 UTC by Ere Maijala
Modified: 2019-10-14 19:56 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
Bug 20665 - Reset MySQL connection time zone in the OAI-PMH Provider (2.59 KB, patch)
2018-04-26 12:13 UTC, Ere Maijala
Details | Diff | Splinter Review
Bug 20665: Units tests for testing MySQL connection time zone (1.75 KB, patch)
2018-04-26 13:13 UTC, Mark Tompsett
Details | Diff | Splinter Review
Bug 20665: Reset MySQL connection time zone in the OAI-PMH Provider (1.51 KB, patch)
2018-04-26 13:13 UTC, Mark Tompsett
Details | Diff | Splinter Review
Bug 20665: Units tests for testing MySQL connection time zone (1.81 KB, patch)
2018-04-26 17:28 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review
Bug 20665: Reset MySQL connection time zone in the OAI-PMH Provider (1.58 KB, patch)
2018-04-26 17:28 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Ere Maijala 2018-04-26 12:02:02 UTC
The OAI-PMH Provider currently sets the MySQL connection time zone to +00:00, but doesn't reset it back to the original value. If it's run under the same Plack as other services, the other services may use a connection that has the changed time zone, which results in wrong timestamps being recorded in the database.
Comment 1 Ere Maijala 2018-04-26 12:13:53 UTC
Created attachment 74880 [details] [review]
Bug 20665 - Reset MySQL connection time zone in the OAI-PMH Provider

Test plan:
1.) Run tests in t/db_dependent/Server.t
Comment 2 Mark Tompsett 2018-04-26 13:13:31 UTC
Created attachment 74882 [details] [review]
Bug 20665: Units tests for testing MySQL connection time zone

TEST PLAN
---------
apply this test patch
prove t/db_dependent/OAI/Server.t
-- should fail
apply the other patch
prove t/db_dependent/OAI/Server.t
-- should pass
run koha qa test tools

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Comment 3 Mark Tompsett 2018-04-26 13:13:33 UTC
Created attachment 74883 [details] [review]
Bug 20665: Reset MySQL connection time zone in the OAI-PMH Provider

TEST PLAN
---------
apply unit test patch
prove t/db_dependent/OAI/Server.t
-- should fail
apply this patch
prove t/db_dependent/OAI/Server.t
-- should pass
run koha qa test tools

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Comment 4 Tomás Cohen Arazi (tcohen) 2018-04-26 17:28:20 UTC
Created attachment 74889 [details] [review]
Bug 20665: Units tests for testing MySQL connection time zone

TEST PLAN
---------
apply this test patch
prove t/db_dependent/OAI/Server.t
-- should fail
apply the other patch
prove t/db_dependent/OAI/Server.t
-- should pass
run koha qa test tools

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 5 Tomás Cohen Arazi (tcohen) 2018-04-26 17:28:27 UTC
Created attachment 74890 [details] [review]
Bug 20665: Reset MySQL connection time zone in the OAI-PMH Provider

TEST PLAN
---------
apply unit test patch
prove t/db_dependent/OAI/Server.t
-- should fail
apply this patch
prove t/db_dependent/OAI/Server.t
-- should pass
run koha qa test tools

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 6 Tomás Cohen Arazi (tcohen) 2018-04-26 17:29:14 UTC
Raising priority.
Comment 7 Jonathan Druart 2018-05-03 16:41:35 UTC
Pushed to master for 18.05, thanks to everybody involved!