]> git.koha-community.org Git - koha.git/commit
Bug 21617: statistics.ccode is not long enough (see also DBRev 18.05.04.001)
authorMarcel de Rooy <m.de.rooy@rijksmuseum.nl>
Fri, 19 Oct 2018 08:51:05 +0000 (10:51 +0200)
committerFridolin Somers <fridolin.somers@biblibre.com>
Thu, 8 Nov 2018 10:12:55 +0000 (11:12 +0100)
commit35218c4982a25fdc393196210c580ae6cab42c48
treed9254df638944971b10af04a3afb283ff15dce28
parent3c54c66ccbf1d619dc51a075dc75d0899bf625b0
Bug 21617: statistics.ccode is not long enough (see also DBRev 18.05.04.001)

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.05.04.001 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>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit ad20a30a831c5f3482f2eed80cc36269ebbef05f)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 08ece37ccabb739ff2ae7f34ccd8ea2e88827e18)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
installer/data/mysql/atomicupdate/bug21617.perl [new file with mode: 0644]