Bug 21129 - New ALTER IGNORE TABLE entries need correction in updatedatabase.pl
Summary: New ALTER IGNORE TABLE entries need correction in updatedatabase.pl
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Database (show other bugs)
Version: Main
Hardware: All All
: P3 major (vote)
Assignee: Blou
QA Contact: Josef Moravec
URL:
Keywords:
Depends on: 12395 13560 19524
Blocks:
  Show dependency treegraph
 
Reported: 2018-07-27 15:39 UTC by Blou
Modified: 2019-10-14 19:56 UTC (History)
6 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 21129: New ALTER IGNORE TABLE entries need correction in updatedatabase.pl (3.30 KB, patch)
2018-07-27 19:04 UTC, Blou
Details | Diff | Splinter Review
Bug 21129: New ALTER IGNORE TABLE entries need correction in updatedatabase.pl (3.38 KB, patch)
2018-07-31 11:50 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 21129: Fix typo created vs created_by (1.15 KB, patch)
2018-07-31 13:09 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 21129: New ALTER IGNORE TABLE entries need correction in updatedatabase.pl (3.43 KB, patch)
2018-08-01 11:21 UTC, Josef Moravec
Details | Diff | Splinter Review
Bug 21129: Fix typo created vs created_by (1.20 KB, patch)
2018-08-01 11:21 UTC, Josef Moravec
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Blou 2018-07-27 15:39:24 UTC
Bug 17234 made an effort to remove the ALTER IGNORE from updatedatabase.pl so that it could work with Mysql 5.7.  But new entries have since been added to it:

Bug 12395 - 18.06.00.005
Bug 19524 - 18.06.00.006
Bug 13560 - 18.06.00.008

These were oversights and must be removed.
Comment 1 Blou 2018-07-27 19:04:14 UTC
Created attachment 77313 [details] [review]
Bug 21129: New ALTER IGNORE TABLE entries need correction in updatedatabase.pl

Bug 17234 made an effort to remove the ALTER IGNORE from updatedatabase.pl so that it could work with Mysql 5.7.  But new entries have since been added to it:

Bug 12395 - 18.06.00.005
Bug 19524 - 18.06.00.006
Bug 13560 - 18.06.00.008

This is corrected using column_exists to validate the existence of the new columns before ALTER
Comment 2 Josef Moravec 2018-07-31 11:50:17 UTC
Comment on attachment 77313 [details] [review]
Bug 21129: New ALTER IGNORE TABLE entries need correction in updatedatabase.pl

Review of attachment 77313 [details] [review]:
-----------------------------------------------------------------

::: installer/data/mysql/updatedatabase.pl
@@ +16129,4 @@
>  
>  $DBversion = '18.06.00.005';
>  if( CheckVersion( $DBversion ) ) {
> +    unless ( column_exists('aqorders', 'created') ) {

It should be 'created_by' I think...
Comment 3 Jonathan Druart 2018-07-31 11:50:43 UTC
Created attachment 77330 [details] [review]
Bug 21129: New ALTER IGNORE TABLE entries need correction in updatedatabase.pl

Bug 17234 made an effort to remove the ALTER IGNORE from updatedatabase.pl so that it could work with Mysql 5.7.  But new entries have since been added to it:

Bug 12395 - 18.06.00.005
Bug 19524 - 18.06.00.006
Bug 13560 - 18.06.00.008

This is corrected using column_exists to validate the existence of the new columns before ALTER

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 4 Jonathan Druart 2018-07-31 13:09:57 UTC
Created attachment 77331 [details] [review]
Bug 21129: Fix typo created vs created_by
Comment 5 Josef Moravec 2018-08-01 11:21:34 UTC
Created attachment 77360 [details] [review]
Bug 21129: New ALTER IGNORE TABLE entries need correction in updatedatabase.pl

Bug 17234 made an effort to remove the ALTER IGNORE from updatedatabase.pl so that it could work with Mysql 5.7.  But new entries have since been added to it:

Bug 12395 - 18.06.00.005
Bug 19524 - 18.06.00.006
Bug 13560 - 18.06.00.008

This is corrected using column_exists to validate the existence of the new columns before ALTER

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

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 6 Josef Moravec 2018-08-01 11:21:38 UTC
Created attachment 77361 [details] [review]
Bug 21129: Fix typo created vs created_by

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 7 Tomás Cohen Arazi 2018-08-02 13:12:00 UTC
Pushed to master. Thanks all!
Comment 8 Martin Renvoize 2018-08-03 14:10:54 UTC
Affected DB updates only exist in master branch, no need to apply to 18.05.x series.