[koha-commits] main Koha release repository branch 3.22.x updated. v3.22.12-34-ge7f5161

Git repo owner gitmaster at git.koha-community.org
Wed Nov 30 14:10:53 CET 2016


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "main Koha release repository".

The branch, 3.22.x has been updated
       via  e7f5161bc76d282f113ae63de768fa81cec52b63 (commit)
      from  eaeca1cd4fbdbb92188420c7e6fb6f9bc422b3e3 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit e7f5161bc76d282f113ae63de768fa81cec52b63
Author: Jonathan Druart <jonathan.druart at bugs.koha-community.org>
Date:   Tue Sep 20 11:40:13 2016 +0100

    Bug 17323: Column search_history.time cannot be null
    
    When doing a search, with SearchHistory pref switched on:
    
    DBD::mysql::st execute failed: Column 'time' cannot be null [for Statement "
            INSERT INTO search_history(
                userid, sessionid, query_desc, query_cgi, type, total, time
            ) VALUES(
                ?, ?, ?, ?, ?, ?, ?
            )
        " with ParamValues: 0="7874", 1='12338a0bd8da63e32c79ee84f8493a07', 2="kw,wrdl: d", 3='q=d', 4='biblio', 5=6104, 6=undef] at C4/Search/History.pm line 34.
    
    Since MySLQ 5.7, undef does not mean "the default value".
    To let the DBMS set the default value (CURRENT_TIMESTAMP), the parameter should not be passed
    
    Test plan:
    OPAC+Intranet, swith the 2 SearchHistory syspref on
    Do a search
    => Without this patch, you will get an error in the log and the row will not be inserted in the table.
    => With this patch, everything must go fine
    
    Signed-off-by: Chris Cormack <chrisc at catalyst.net.nz>
    
    Signed-off-by: Marcel de Rooy <m.de.rooy at rijksmuseum.nl>
    Not verified with MySQL 5.7. But this looks good to me.
    Works under Jessie.
    
    Signed-off-by: Kyle M Hall <kyle at bywatersolutions.com>
    (cherry picked from commit 6d5b056a14e5671f51735dded7609f65ca389f00)
    Signed-off-by: Julian Maurice <julian.maurice at biblibre.com>

-----------------------------------------------------------------------

Summary of changes:
 C4/Search/History.pm            |    6 +++---
 t/db_dependent/Search/History.t |   18 +++++++++++++++++-
 2 files changed, 20 insertions(+), 4 deletions(-)


hooks/post-receive
-- 
main Koha release repository


More information about the koha-commits mailing list