https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13669
Tomás Cohen Arazi <tomasco...@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #51597|0 |1 is obsolete| | --- Comment #13 from Tomás Cohen Arazi <tomasco...@gmail.com> --- Created attachment 51598 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=51598&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. -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/