• kevin.lewis@oracle.com's avatar
    Bug#12637786 was fixed with rb:692 by marko. But that fix has a remaining · e3fab622
    kevin.lewis@oracle.com authored
    bug.  It added this assert;
        ut_ad(ind_field->prefix_len);
    before a section of code that assumes there is a prefix_len.  
    
    The patch replaced code that explicitly avoided this with a check for
    prefix_len.  It turns out that the purge thread can get to that assert
    without a prefix_len because it does not use a row_ext_t* .
    When UNIV_DEBUG is not defined, the affect of this is that the purge thread
    sets the dfield->len to zero and then cannot find the entry in the index to
    purge.  So secondary index entries remain unpurged.
    
    This patch does not do the assert.  Instead, it uses
        'if (ind_field->prefix_len) {...}'
    around the section of code that assumes a prefix_len.  This is the way the
    patch I provided to Marko did it.
    
    The test case is simply modified to do a sleep(10) in order to give the
    purge thread a chance to run. Without the code change to row0row.c, this
    modified testcase will assert if InnoDB was compiled with UNIV_DEBUG.
    I tried to sleep(5), but it did not always assert.
    e3fab622
innodb-index.test 20 KB