Bug 17234 - updatedatabase.pl's ALTER IGNORE break with mysql 5.7.4+
commitdc1f045245bb5b582b2be96ad8b9761dba842eb5
authorBlou <philippe.blouin@inlibro.com>
Fri, 2 Sep 2016 12:05:48 +0000 (2 08:05 -0400)
committerMason James <mtj@kohaaloha.com>
Wed, 25 Jan 2017 00:12:14 +0000 (25 13:12 +1300)
treefa3fbb75368e11c6c8a1b82f04cbd6a1717e58b7
parent8bf19af1d097b1df6936bca1500a169bf78200b1
Bug 17234 - updatedatabase.pl's ALTER IGNORE break with mysql 5.7.4+

The doc says: "As of MySQL 5.7.4, the IGNORE clause for ALTER TABLE is removed and its use produces an error."
This fix replaces ALTER IGNORE with ALTER in updatedatabase.pl

To TEST, try an upgrade from 3.18 to 3.22 after installing the latest mysql (at least 5.7.4, by the doc).
Some will fail with error

DBD::mysql::db do failed: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'IGNORE TABLE aqbasket
            ADD KEY authorisedby (authorisedby)' at line 1 [for Statement "
        ALTER IGNORE TABLE aqbasket
            ADD KEY authorisedby (authorisedby)
    "] at ./installer/data/mysql/updatedatabase.pl line 10563.

0) Find a database on 3.18, save it.
1) Set your code base to 3.22(or master)
2) run updatedatabase.pl
3) See the errors.
4) Apply the patch
5) Reload the 3.18 database
6) succeed with updatedatabase.pl

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit acf425bbbcb8c22f3655472f90285869c3ad7164)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
installer/data/mysql/updatedatabase.pl