-
Abhishek Ranjan authored
DESCRIPTION: When we have a privilege error in the underlying table of a view, an error processor is supposed to suppress this error and instead supply a more general error, so that we do not reveal any details about the contents of a view. However, with STRICT mode set, this suppression does not happen. ANALYSIS : There were two mechanisms that handle errors for views. First, TABLE_LIST::hide_view_error() and second is an Internal_error_handler, Show_create_error_handler. These two methods should not clash. In TABLE_LIST::hide_view_error(), we check if Internal_error_handler exists or not. If an Internal error handler exists, we exit assuming it to be Show_create_error_handler. With WL#6614 and WL#6891, we push Internal_error_handler before executing a statement. Hence, an Internal_error_handler is always present in STRICT mode or if IGNORE keyword is used. Thus, hide_view_error() will return without suppressing the error. FIX : Created View_error_handler based on Internal_error_handler instead of TABLE_LIST::hide_view_error(). Used this handler to hide details of the view in error messages.
Abhishek Ranjan authoredDESCRIPTION: When we have a privilege error in the underlying table of a view, an error processor is supposed to suppress this error and instead supply a more general error, so that we do not reveal any details about the contents of a view. However, with STRICT mode set, this suppression does not happen. ANALYSIS : There were two mechanisms that handle errors for views. First, TABLE_LIST::hide_view_error() and second is an Internal_error_handler, Show_create_error_handler. These two methods should not clash. In TABLE_LIST::hide_view_error(), we check if Internal_error_handler exists or not. If an Internal error handler exists, we exit assuming it to be Show_create_error_handler. With WL#6614 and WL#6891, we push Internal_error_handler before executing a statement. Hence, an Internal_error_handler is always present in STRICT mode or if IGNORE keyword is used. Thus, hide_view_error() will return without suppressing the error. FIX : Created View_error_handler based on Internal_error_handler instead of TABLE_LIST::hide_view_error(). Used this handler to hide details of the view in error messages.
Loading