Bugzilla – Attachment 174525 Details for
Bug 36822
When creating a new patron via LDAP or Shibboleth 0000-00-00 is inserted for invalid updated_on
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 36822: (follow-up) Catch MySQL 8 failure in update
Bug-36822-follow-up-Catch-MySQL-8-failure-in-updat.patch (text/plain), 1.37 KB, created by
Martin Renvoize (ashimema)
on 2024-11-14 13:10:33 UTC
(
hide
)
Description:
Bug 36822: (follow-up) Catch MySQL 8 failure in update
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2024-11-14 13:10:33 UTC
Size:
1.37 KB
patch
obsolete
>From b9c4474d8fc6001c55dc0862ed47ee9697f89316 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Thu, 14 Nov 2024 13:08:16 +0000 >Subject: [PATCH] Bug 36822: (follow-up) Catch MySQL 8 failure in update > >We add a CAST to the fetch of 0000-00-00 dates in the database. This >prevents an error in MySQL 8.0 throws htat aborts the update. > >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > installer/data/mysql/db_revs/240600056.pl | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > >diff --git a/installer/data/mysql/db_revs/240600056.pl b/installer/data/mysql/db_revs/240600056.pl >index 82b0413128a..abe1915c4d2 100755 >--- a/installer/data/mysql/db_revs/240600056.pl >+++ b/installer/data/mysql/db_revs/240600056.pl >@@ -12,17 +12,15 @@ return { > q{ > SELECT borrowernumber > FROM borrowers >- WHERE updated_on = '0000-00-00 00:00:00' >+ WHERE CAST(updated_on AS CHAR(19)) = '0000-00-00 00:00:00' > } > ); > $sth->execute; > my $results = $sth->fetchall_arrayref( {} ); >- > if (@$results) { > sanitize_zero_date( 'borrowers', 'updated_on' ); > say_info( $out, "The following borrowers' updated_on has been sanitized: " > . join( ', ', map { $_->{borrowernumber} } @$results ) ); > } >- > }, > }; >-- >2.47.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 36822
:
173373
|
173374
|
173375
|
173376
|
173377
|
173385
|
173386
|
173387
|
173388
|
173389
|
173391
|
173392
|
173393
|
173394
|
173395
|
173402
|
173403
|
173404
|
173405
|
173406
|
173646
|
173903
|
173904
|
173905
|
173906
|
173907
|
173908
|
173909
|
174523
| 174525