| Summary: | C4/VirtualShelves.pm needs globally scoped $dbh for plack | ||
|---|---|---|---|
| Product: | Koha | Reporter: | Dobrica Pavlinusic <dpavlin> |
| Component: | Lists | Assignee: | Dobrica Pavlinusic <dpavlin> |
| Status: | CLOSED INVALID | QA Contact: | Ian Walls <koha.sekjal> |
| Severity: | enhancement | ||
| Priority: | P5 - low | CC: | alex.arnaud |
| Version: | 3.8 | ||
| Hardware: | All | ||
| OS: | All | ||
| GIT URL: | Initiative type: | --- | |
| Sponsorship status: | --- | Crowdfunding goal: | 0 |
| Patch complexity: | --- | Documentation contact: | |
| Documentation submission: | Text to go in the release notes: | ||
| Version(s) released in: | Circulation function: | ||
| Bug Depends on: | |||
| Bug Blocks: | 7172 | ||
| Attachments: |
Bug 7796 - C4/VirtualShelves.pm needs globally scoped $dbh for plack
Bug 7796 - C4/VirtualShelves.pm $dbh plack scoping |
||
|
Description
Dobrica Pavlinusic
2012-03-22 11:19:10 UTC
Created attachment 8499 [details] [review] Bug 7796 - C4/VirtualShelves.pm needs globally scoped $dbh for plack otherwise, we get a lot of "MySQL server has gone away" error messages Created attachment 8531 [details] [review] Bug 7796 - C4/VirtualShelves.pm $dbh plack scoping we get a lot of "MySQL server has gone away" error messages and defining global $dbh isn't the best solution. Existing code gets $dbh from context in some subs, so this change makes it always use $dbh from context. Dobrica, could you give me more details about how to reproduce the bug? I didn't get such errors when browsing shelves. It seems that I can't reproduce it right now (silly me for not recoording URL to example together with bug). I changed bug status and if I don't find it again this week, I will close it with WONTFIX Today, I got this error again. Accessing /cgi-bin/koha/catalogue/search.pl?idx=&q=human DBD::mysql::db selectall_arrayref failed: MySQL server has gone away at /srv/koha/C4/VirtualShelves.pm line 202. DBD::mysql::db selectall_arrayref failed: MySQL server has gone away at /srv/koha/C4/VirtualShelves.pm line 214. DBD::mysql::db selectall_arrayref failed: MySQL server has gone away at /srv/koha/C4/VirtualShelves.pm line 202. DBD::mysql::db selectall_arrayref failed: MySQL server has gone away at /srv/koha/C4/VirtualShelves.pm line 214. I have virtualshelves "allow" in syspreference. Even more interesting, after restart I got different error: DBD::mysql::db selectall_arrayref failed: Unknown column 'allow_add' in 'where clause' at /srv/koha/C4/VirtualShelves.pm line 202. DBD::mysql::db selectall_arrayref failed: Unknown column 'allow_add' in 'where clause' at /srv/koha/C4/VirtualShelves.pm line 214. Which got me thinking... I was using database from version 3.07.00.019 which explains why VirtualShelves which got changed in 3.07.00.032 didn't work. I'm closing this ticket, although I sould re-visit question why plack didn't force me to upgrade database to current version. |