Bugzilla – Attachment 80905 Details for
Bug 21617
statistics.ccode is not long enough (see also dbrev 18.06.00.032)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 21617: statistics.ccode is not long enough (see also dbrev 18.06.00.032)
Bug-21617-statisticsccode-is-not-long-enough-see-a.patch (text/plain), 1.93 KB, created by
Marcel de Rooy
on 2018-10-19 08:52:37 UTC
(
hide
)
Description:
Bug 21617: statistics.ccode is not long enough (see also dbrev 18.06.00.032)
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2018-10-19 08:52:37 UTC
Size:
1.93 KB
patch
obsolete
>From e3f9b047819f27d21325e1ec5b9a982a62cb457d Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Fri, 19 Oct 2018 10:51:05 +0200 >Subject: [PATCH] Bug 21617: statistics.ccode is not long enough (see also > dbrev 18.06.00.032) >Content-Type: text/plain; charset=utf-8 > >Warn from a test: >DBD::mysql::st execute failed: Data too long for column 'ccode' at row 1 [for Statement "INSERT INTO statistics > (datetime, > branch, type, value, > other, itemnumber, itemtype, location, > borrowernumber, proccode, ccode) > VALUES (now(),?,?,?,?,?,?,?,?,?,?)" with ParamValues: 0="z8LIyIV", 1='issue', 2=undef, 3='', 4='2584', 5='E_QkzaV5Ay', 6='oDnFRZyog2CS2_XoUB_MB2sBxyI3elbFPC_AekxLPrduGTXKnlNoLKEdQrXzpAw5zD1pGbZshV9ydZup', 7='2000005168', 8='', 9='j9ZDn74omZAoZrTOdC4a05SpWRSHPR2apfss7y5V6QJuQnBEk32XWXCfMp7'] at C4/Stats.pm line 138. > >The dbrev 18.06.00.032 did not change it from 10 to 80 as in other tables. > >We should either truncate to 10 chars in Stats.pm or increase to varchar(80). Since it is varchar and not char, we should not be afraid about size. I choose for the latter here. > >Test plan: >Run db rev. > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > installer/data/mysql/atomicupdate/bug21617.perl | 7 +++++++ > 1 file changed, 7 insertions(+) > create mode 100644 installer/data/mysql/atomicupdate/bug21617.perl > >diff --git a/installer/data/mysql/atomicupdate/bug21617.perl b/installer/data/mysql/atomicupdate/bug21617.perl >new file mode 100644 >index 0000000..edbec60 >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug21617.perl >@@ -0,0 +1,7 @@ >+$DBversion = 'XXX'; # will be replaced by the RM >+if( CheckVersion( $DBversion ) ) { >+ $dbh->do( "alter table statistics change column ccode ccode varchar(80) default NULL" ); >+ >+ SetVersion( $DBversion ); >+ print "Upgrade to $DBversion done (Bug 21617: Make statistics.ccode longer)\n"; >+} >-- >2.1.4
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 21617
:
80905
|
80928