[Koha-bugs] [Bug 13669] Web installer fails to load sample data on MySQL 5.6+

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Sat May 21 14:33:38 CEST 2016


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13669

Jonathan Druart <jonathan.druart at bugs.koha-community.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #51600|0                           |1
        is obsolete|                            |
  Attachment #51601|0                           |1
        is obsolete|                            |
  Attachment #51608|0                           |1
        is obsolete|                            |
  Attachment #51671|0                           |1
        is obsolete|                            |
  Attachment #51680|0                           |1
        is obsolete|                            |

--- Comment #42 from Jonathan Druart <jonathan.druart at bugs.koha-community.org> ---
Created attachment 51681
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=51681&action=edit
Bug 13669: Use perl to load SQL statements from sample data

This patch changes C4::Installer::load_sql so it uses File::Slurp [1] to read
the SQL files, and SQL::SplitStatement to extract the statements from the full
SQL
file so they can be passed to $dbh->do.

To test:
- On Mysql 5.5, run the webinstaller
=> SUCCESS: Everything works as expected
- Apply the patch
- Run
  $ mysql -uroot
  > DROP DATABASE koha_kohadev ; CREATE DATABASE koha_kohadev;
- Run the webinstaller
=> SUCCESS: Everything works as expected
- On Mysql 5.6+ (5.7 is implied)
- Run
  $ mysql -uroot
  > DROP DATABASE koha_kohadev ; CREATE DATABASE koha_kohadev;
- Run the webinstaller
=> FAIL: It cannot load the sql files due to a password-in-command-line error
- Apply the patch
- Make sure everything is clean (it should):
  $ mysql -uroot
  > DROP DATABASE koha_kohadev ; CREATE DATABASE koha_kohadev;
- Run the webinstaller
=> SUCCESS: EVerything works as expected
- Sign off :-D

[1] Note: This is a POC patch, in the sense that it does the job, fixes a nasty
problem
but using File::Slurp to load the SQL files in memory comes with a big runtime
penalty.
You will notice the install procedure is now much slower, for instance.

Signed-off-by: Chris Cormack <chrisc at catalyst.net.nz>

Signed-off-by: Jonathan Druart <jonathan.druart at bugs.koha-community.org>

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list