Fixing table_cache variable for mysql versions 5.6 and above