• unknown's avatar
    Fix for Bug#3904 "COUNT DISTINCT performance anomaly in 4.1" · f468b91f
    unknown authored
    The bug was caused by error in hash calculation function: it
    always returned hash value for last field in a composite key, so 
    for keys like (a text, b char(1)) we were always
    getting bad hash values.
     
    
    
    myisam/mi_unique.c:
      Fix for bug #3904:
      We should take into account existing hash value when calculating hash for
      next key in a composite unique index.
    f468b91f
mi_unique.c 5.72 KB