Bugzilla – Attachment 183778 Details for
Bug 40292
SQL syntax error when upgrading to 25.05 on MariaDB 10.3, RENAME COLUMN unsupported
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 40292: Prevent SQL syntax error when upgrading to 25.05 on MariaDB 10.3
Bug-40292-Prevent-SQL-syntax-error-when-upgrading-.patch (text/plain), 3.33 KB, created by
Victor Grousset/tuxayo
on 2025-07-03 20:46:21 UTC
(
hide
)
Description:
Bug 40292: Prevent SQL syntax error when upgrading to 25.05 on MariaDB 10.3
Filename:
MIME Type:
Creator:
Victor Grousset/tuxayo
Created:
2025-07-03 20:46:21 UTC
Size:
3.33 KB
patch
obsolete
>From 556d9495a4c7bf72381ff85dcaed537312875dee Mon Sep 17 00:00:00 2001 >From: Paul Derscheid <paul.derscheid@lmscloud.de> >Date: Wed, 2 Jul 2025 18:30:32 +0200 >Subject: [PATCH] Bug 40292: Prevent SQL syntax error when upgrading to 25.05 > on MariaDB 10.3 > >- Change `RENAME COLUMN <OLD> TO <NEW>` to `CHANGE COLUMN <OLD> <NEW> > <DATATYPE (required for this syntax)>`. > >To test (assuming ktd): >1. Checkout upstream/24.11.x >2. Start ktd with `KOHA_IMAGE=24.11-bullseye(-arm64) DB_IMAGE=mariadb:10.3 ktd up > -d` >3. Checkout upstream/main >4. Run updatedatabase in the Koha container >5. Observe the error regarding the unsupported syntax. >6. Tear everything down again: ktd down >7. Repeat 1-2. >8. Once started up, checkout upstream/main >9. Apply the patch on top of it >10. Run updatedatabase in the Koha container >11. Observe a successful upgrade >12. Sign off > >Side Note: I tested this against upstream/25.05.x, but this patch is >based on main. > >Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> >Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> >--- > installer/data/mysql/db_revs/241200018.pl | 2 +- > installer/data/mysql/db_revs/241200042.pl | 2 +- > installer/data/mysql/db_revs/241200043.pl | 2 +- > 3 files changed, 3 insertions(+), 3 deletions(-) > >diff --git a/installer/data/mysql/db_revs/241200018.pl b/installer/data/mysql/db_revs/241200018.pl >index 0064152795..5507773824 100755 >--- a/installer/data/mysql/db_revs/241200018.pl >+++ b/installer/data/mysql/db_revs/241200018.pl >@@ -22,7 +22,7 @@ return { > ); > $dbh->do(q{ UPDATE additional_field_values SET new_record_id = CAST(record_id AS CHAR(11)); }); > $dbh->do(q{ ALTER TABLE additional_field_values DROP COLUMN record_id; }); >- $dbh->do(q{ ALTER TABLE additional_field_values RENAME COLUMN new_record_id TO record_id; }); >+ $dbh->do(q{ ALTER TABLE additional_field_values CHANGE COLUMN new_record_id record_id VARCHAR(11); }); > > say_success( $out, "Converted record_id to VARCHAR" ); > } else { >diff --git a/installer/data/mysql/db_revs/241200042.pl b/installer/data/mysql/db_revs/241200042.pl >index 1e1ae6cb03..f49864efb0 100755 >--- a/installer/data/mysql/db_revs/241200042.pl >+++ b/installer/data/mysql/db_revs/241200042.pl >@@ -12,7 +12,7 @@ return { > if ( column_exists( 'aqbookseller_aliases', 'alias_id' ) ) { > $dbh->do( > q{ >- ALTER TABLE aqbookseller_aliases RENAME COLUMN alias_id TO vendor_alias_id; >+ ALTER TABLE aqbookseller_aliases CHANGE COLUMN alias_id vendor_alias_id INT(11); > } > ); > say_success( >diff --git a/installer/data/mysql/db_revs/241200043.pl b/installer/data/mysql/db_revs/241200043.pl >index a698167e55..2b3926871d 100755 >--- a/installer/data/mysql/db_revs/241200043.pl >+++ b/installer/data/mysql/db_revs/241200043.pl >@@ -12,7 +12,7 @@ return { > if ( column_exists( 'aqbookseller_interfaces', 'interface_id' ) ) { > $dbh->do( > q{ >- ALTER TABLE aqbookseller_interfaces RENAME COLUMN interface_id TO vendor_interface_id; >+ ALTER TABLE aqbookseller_interfaces CHANGE COLUMN interface_id vendor_interface_id INT(11); > } > ); > say_success( >-- >2.50.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 40292
:
183706
|
183747
|
183748
|
183749
|
183750
|
183754
|
183775
|
183777
| 183778 |
183779