• Andrew Gierth's avatar
    Repair bug in regexp split performance improvements. · b7f6bcbf
    Andrew Gierth authored
    Commit c8ea87e4 introduced a temporary conversion buffer for
    substrings extracted during regexp splits. Unfortunately the code that
    sized it was failing to ignore the effects of ignored degenerate
    regexp matches, so for regexp_split_* calls it could under-size the
    buffer in such cases.
    
    Fix, and add some regression test cases (though those will only catch
    the bug if run in a multibyte encoding).
    
    Backpatch to 9.3 as the faulty code was.
    
    Thanks to the PostGIS project, Regina Obe and Paul Ramsey for the
    report (via IRC) and assistance in analysis. Patch by me.
    b7f6bcbf
strings.out 49.2 KB