Bugzilla – Attachment 105522 Details for
Bug 24379
Patron login attempts happen to be NULL instead of 0
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 24379: Don't drop default of 0 for login attempts
Bug-24379-Dont-drop-default-of-0-for-login-attempt.patch (text/plain), 1.46 KB, created by
Nick Clemens (kidclamp)
on 2020-06-03 12:18:43 UTC
(
hide
)
Description:
Bug 24379: Don't drop default of 0 for login attempts
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2020-06-03 12:18:43 UTC
Size:
1.46 KB
patch
obsolete
>From e20fa471bb37783307d4cb656699cd67dcdfe09e Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Wed, 3 Jun 2020 12:15:28 +0000 >Subject: [PATCH] Bug 24379: Don't drop default of 0 for login attempts > >When moving the column we drop the default, this means that DBs upgraded form earlier versions >get the wrong values set > >To test: >1 - Checkout 16.11.x >2 - Reset all >3 - Checkout master >4 - updatedatabase >5 - SHOW CREATE TABLE borrowers; >6 - Note the column login_attempts defaults to NULL >7 - Apply patch(es) >8 - Repeat >9 - Now it defaults ot 0 (and has NOT NULL if applied all) >--- > installer/data/mysql/updatedatabase.pl | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > >diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl >index b53146f873..f43ce6a71a 100755 >--- a/installer/data/mysql/updatedatabase.pl >+++ b/installer/data/mysql/updatedatabase.pl >@@ -14666,10 +14666,10 @@ if( CheckVersion( $DBversion ) ) { > $DBversion = '17.06.00.009'; > if( CheckVersion( $DBversion ) ) { > $dbh->do(q{ >- ALTER TABLE borrowers MODIFY COLUMN login_attempts int(4) AFTER lang; >+ ALTER TABLE borrowers MODIFY COLUMN login_attempts int(4) DEFAULT 0 AFTER lang; > }); > $dbh->do(q{ >- ALTER TABLE deletedborrowers MODIFY COLUMN login_attempts int(4) AFTER lang; >+ ALTER TABLE deletedborrowers MODIFY COLUMN login_attempts int(4) DEFAULT 0 AFTER lang; > }); > > SetVersion( $DBversion ); >-- >2.11.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 24379
:
97058
|
97073
|
105522
|
106846
|
106847
|
106890
|
107099