Commit ffebdee6 authored by unknown's avatar unknown
Browse files

Fix for bug #15756: incorrect ip address matching in ACL due to use of latin1 collation.

Thanks Deomid Ryabkov <mysqlbugs@rojer.pp.ru> for the great help!


sql/hostname.cc:
  Fix for bug #15756: incorrect ip address matching in ACL due to use of latin1 collation.
  - use my_charset_bin instead of my_charset_latin1 to properly compare IP addresses.
parent 736f9c09
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -61,7 +61,7 @@ bool hostname_cache_init()
  if (!(hostname_cache=new hash_filo(HOST_CACHE_SIZE, offset,
				     sizeof(struct in_addr),NULL,
				     (hash_free_key) free,
				     &my_charset_latin1)))
				     &my_charset_bin)))
    return 1;
  hostname_cache->clear();
  (void) pthread_mutex_init(&LOCK_hostname,MY_MUTEX_INIT_SLOW);