Summary: | Inappropriate uses of $sth->finish() in C4::Branch.pm | ||
---|---|---|---|
Product: | Koha | Reporter: | kenza <kenza.zaki> |
Component: | Architecture, internals, and plumbing | Assignee: | kenza <kenza.zaki> |
Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
Severity: | normal | ||
Priority: | P5 - low | CC: | chris, gmcharlt, kenza.zaki, tomascohen |
Version: | unspecified | ||
Hardware: | All | ||
OS: | All | ||
GIT URL: | Change sponsored?: | --- | |
Patch complexity: | --- | Documentation contact: | |
Documentation submission: | Text to go in the release notes: | ||
Version(s) released in: | Circulation function: | ||
Bug Depends on: | |||
Bug Blocks: | 10508 | ||
Attachments: |
Inappropriate uses of $sth->finish() in C4::Branch.pm
Bug 10629 : Inappropriate uses of $sth->finish() in C4::Branch.pm Bug 10629 : Inappropriate uses of $sth->finish() in C4::Branch.pm |
Description
kenza
2013-07-23 13:14:02 UTC
Created attachment 19868 [details] [review] Inappropriate uses of $sth->finish() in C4::Branch.pm Test plan : Check if the regression tests still works prove t/db_dependent/Branch.t t/db_dependent/Branch.t .. 1/36 Using a hash as a reference is deprecated at t/db_dependent/Branch.t line 207. t/db_dependent/Branch.t .. ok All tests successful. Files=1, Tests=36, 0 wallclock secs ( 0.03 usr 0.01 sys + 0.12 cusr 0.00 csys = 0.16 CPU) Result: PASS Created attachment 19910 [details] [review] Bug 10629 : Inappropriate uses of $sth->finish() in C4::Branch.pm Test plan : Check if the regression tests still works prove t/db_dependent/Branch.t t/db_dependent/Branch.t .. 1/36 Using a hash as a reference is deprecated at t/db_dependent/Branch.t line 207. t/db_dependent/Branch.t .. ok All tests successful. Files=1, Tests=36, 0 wallclock secs ( 0.03 usr 0.01 sys + 0.12 cusr 0.00 csys = 0.16 CPU) Result: PASS Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> From the man page finsh() Indicate that no more data will be fetched from this statement handle before it is either executed again or destroyed. You almost certainly do not need to call this method. Adding calls to "finish" after loop that fetches all rows is a common mistake, don't do it, it can mask genuine problems like uncaught fetch errors. Signed off, Kenza please don't forget to add the Bug number to your commit message, but otherwise this was a great patch Created attachment 20237 [details] [review] Bug 10629 : Inappropriate uses of $sth->finish() in C4::Branch.pm Test plan : Check if the regression tests still works prove t/db_dependent/Branch.t t/db_dependent/Branch.t .. 1/36 Using a hash as a reference is deprecated at t/db_dependent/Branch.t line 207. t/db_dependent/Branch.t .. ok All tests successful. Files=1, Tests=36, 0 wallclock secs ( 0.03 usr 0.01 sys + 0.12 cusr 0.00 csys = 0.16 CPU) Result: PASS Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> From the man page finsh() Indicate that no more data will be fetched from this statement handle before it is either executed again or destroyed. You almost certainly do not need to call this method. Adding calls to "finish" after loop that fetches all rows is a common mistake, don't do it, it can mask genuine problems like uncaught fetch errors. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Pushed to master. Thanks, Kenza! This patch has been pushed to 3.12.x, will be in 3.12.5. Thanks Kenza! |