• istruewing@chilla.local's avatar
    Bug#26231 - select count(*) on myisam table returns wrong value · c33486ff
    istruewing@chilla.local authored
                when index is used
    
    When the table contained TEXT columns with empty contents
    ('', zero length, but not NULL) _and_ strings starting with
    control characters like tabulator or newline, the empty values
    were not found in a "records in range" estimate. Hence count(*)
    missed these records.
    
    The reason was a different set of search flags used for key
    insert and key range estimation.
    
    I decided to fix the set of flags used in range estimation.
    Otherwise millions of databases around the world would require
    a repair after an upgrade.
    
    The consequence is that the manual must be fixed, which claims
    that TEXT columns are compared with "end space padding". This
    is true for CHAR/VARCHAR but wrong for TEXT. See also bug 21335.
    c33486ff
myisam.test 43.8 KB