mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Bug#47734: Assertion failed: ! is_set() when locking a view with non-existing definer
The problem was that a failure to open a view wasn't being properly handled. When opening a view with unknown definer, the open procedure would be treated as successful and would later crash when attempting to lock the view (which wasn't opened to begin with). The solution is to skip further processing when opening a table if it fails with a fatal error. mysql-test/r/view.result: Add test case result for Bug#47734. mysql-test/t/view.test: Add test case for Bug#47734. sql/sql_base.cc: Skip further processing if opening a table failed due to a fatal error (for the statement).
This commit is contained in:
@ -3844,6 +3844,16 @@ CREATE VIEW v1 AS SELECT a FROM t1;
|
||||
ALTER TABLE v1;
|
||||
DROP VIEW v1;
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug#47734: Assertion failed: ! is_set() when locking a view with non-existing definer
|
||||
#
|
||||
DROP VIEW IF EXISTS v1;
|
||||
CREATE DEFINER=`unknown`@`unknown` SQL SECURITY DEFINER VIEW v1 AS SELECT 1;
|
||||
Warnings:
|
||||
Note 1449 The user specified as a definer ('unknown'@'unknown') does not exist
|
||||
LOCK TABLES v1 READ;
|
||||
ERROR HY000: The user specified as a definer ('unknown'@'unknown') does not exist
|
||||
DROP VIEW v1;
|
||||
# -----------------------------------------------------------------
|
||||
# -- End of 5.1 tests.
|
||||
# -----------------------------------------------------------------
|
||||
|
Reference in New Issue
Block a user