[Koha-bugs] [Bug 33368] borrowers.flags is about to reach the limit
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Thu Mar 30 10:11:54 CEST 2023
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33368
Nick Clemens <nick at bywatersolutions.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #148952|0 |1
is obsolete| |
--- Comment #3 from Nick Clemens <nick at bywatersolutions.com> ---
Created attachment 148954
-->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=148954&action=edit
Bug 33368: Extends borrowers.flags to bigint
it's a int(11) which means its limit is 2^31
We have currently 29 permissions, there is only one remaining, at 31
permissions
the permission system won't support a case where a patron has all permissions.
Test plan:
Don't apply this patch
Add another permission
INSERT INTO userflags (bit, flag, flagdesc, defaulton) VALUES (30, 'new
permission 1', '', 0) ;
Go to the interface, tick all the boxes
select flags from borrowers where borrowernumber=5;
=> 2113928830
Remember:
2^31 2147483648
2^32 4294967296
Add another one
INSERT INTO userflags (bit, flag, flagdesc, defaulton) VALUES (31, 'new
permission 2', '', 0) ;
Repeat the step before
=> boom
CGI::Compile::ROOT::kohadevbox_koha_members_member_2dflags_2epl::member_2dflags_2epl():
DBI Exception: DBD::mysql::st execute failed: Out of range value for column
'flags' at row 1 at /usr/share/perl5/CGI/Emulate/PSGI.pm line 30
Apply the patch, try again
QA note: That's ofc not the best solution, but the easiest for now
Signed-off-by: Nick Clemens <nick at bywatersolutions.com>
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list