Bugzilla – Attachment 150162 Details for
Bug 33584
Fix failures for Database/Commenter.t on MySQL 8
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 33584: (follow-up) Remove DEFAULT_GENERATED from column info
Bug-33584-follow-up-Remove-DEFAULTGENERATED-from-c.patch (text/plain), 1.39 KB, created by
Tomás Cohen Arazi (tcohen)
on 2023-04-24 14:46:39 UTC
(
hide
)
Description:
Bug 33584: (follow-up) Remove DEFAULT_GENERATED from column info
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2023-04-24 14:46:39 UTC
Size:
1.39 KB
patch
obsolete
>From 915db5908e0fa4abd36858c23810a9e77bda74fe Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Mon, 24 Apr 2023 12:28:46 +0000 >Subject: [PATCH] Bug 33584: (follow-up) Remove DEFAULT_GENERATED from column > info > >MySQL 8 returns this additional information for a timestamp such >as the timestamp2 in the Commenter test. >Which results in the following alter: > ALTER TABLE koha_myclone.database_commenter_1 MODIFY COLUMN `timestamp2` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP DEFAULT_GENERATED COMMENT 'Column_5' >And that statement fails again on that keyword. >For now, it seems sufficient to ignore this keyword when building the alter statement. > >Test plan: >Run t/db_dependent/Koha/Database/Commenter.t > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Did test it now under MySQL 8. >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > Koha/Database/Commenter.pm | 1 + > 1 file changed, 1 insertion(+) > >diff --git a/Koha/Database/Commenter.pm b/Koha/Database/Commenter.pm >index c349deffa99..7987b668b9c 100644 >--- a/Koha/Database/Commenter.pm >+++ b/Koha/Database/Commenter.pm >@@ -245,6 +245,7 @@ sub _change_column { > } > > # Extra (like autoincrement) >+ $info->{Extra} =~ s/DEFAULT_GENERATED//; # need to remove it for mysql8 timestamps > $rv .= $info->{Extra}. ' ' if $info->{Extra}; > > # Comment if passed; not passing means clearing actually. >-- >2.34.1
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 33584
:
150068
|
150154
|
150159
|
150160
|
150161
| 150162 |
150224