Problem: If the value to be set to charset.max_char is invalid, an error occurs, but the error uses the yet unset charset.max_char. Solution: Use the value that charset.max_char would be set to if the value wasn't invalid.