T@6    : dispatch_command: query: CREATE TABLE t1 (a INT)
T@6    : MDL_context::acquire_lock: mdl: Seized:   test/t1 (MDL_SHARED_UPGRADABLE)
T@6    : MDL_context::acquire_lock: mdl: Seized:   test/t1 (MDL_EXCLUSIVE)
T@6    : MDL_context::acquire_lock: mdl: Seized:   test/t1 (MDL_EXCLUSIVE)
T@6    : MDL_context::release_lock: mdl: Released: test/t1 (MDL_EXCLUSIVE)
T@6    : dispatch_command: query: CREATE TABLE t2 (b INT)
T@6    : dispatch_command: query: CREATE TRIGGER tr1 BEFORE INSERT ON t1 FOR EACH ROW UPDATE t2 SET b = 0
T@6    : MDL_context::acquire_lock: mdl: Seized:   test/t1 (MDL_SHARED_NO_WRITE)
T@6    : MDL_context::acquire_lock: mdl: Seized:   test/t1 (MDL_SHARED_NO_WRITE)
T@6    : MDL_context::acquire_lock: mdl: Seized:   test/t1 (MDL_EXCLUSIVE)
T@6    : MDL_context::release_lock: mdl: Released: test/t1 (MDL_EXCLUSIVE)
T@6    : dispatch_command: query: CREATE TRIGGER tr2 BEFORE INSERT ON t2 FOR EACH ROW UPDATE t1 SET a = 6
T@6    : dispatch_command: query: CREATE VIEW v1 AS SELECT * FROM t1
T@6    : MDL_context::acquire_lock: mdl: Seized:   test/v1 (MDL_EXCLUSIVE)
T@6    : MDL_context::acquire_lock: mdl: Seized:   test/v1 (MDL_EXCLUSIVE)
T@6    : MDL_context::acquire_lock: mdl: Seized:   test/t1 (MDL_SHARED_READ)
T@6    : MDL_context::release_lock: mdl: Released: test/t1 (MDL_SHARED_READ)
T@6    : MDL_context::release_lock: mdl: Released: test/v1 (MDL_EXCLUSIVE)
T@6    : dispatch_command: query: SET AUTOCOMMIT=OFF
T@6    : dispatch_command: query: SELECT * FROM t1
T@6    : MDL_context::acquire_lock: mdl: Seized:   test/t1 (MDL_SHARED_READ)
T@7    : dispatch_command: query: DROP TRIGGER tr1
T@7    : MDL_context::acquire_lock: mdl: Seized:   test/t1 (MDL_SHARED_NO_WRITE)
T@7    : MDL_context::acquire_lock: mdl: Seized:   test/t1 (MDL_SHARED_NO_WRITE)
T@7    : MDL_context::acquire_lock: mdl: Waiting: test/t1 (MDL_EXCLUSIVE)
T@6    : dispatch_command: query: INSERT INTO t2 SELECT * FROM t2
T@6    : MDL_context::acquire_lock: mdl: Waiting: test/t1 (MDL_SHARED_WRITE)
T@6    : MDL_context::acquire_lock: mdl: Deadlock: test/t1 (MDL_SHARED_WRITE)
T@6    : MDL_context::acquire_lock: exit: Existing locks:
    test/t1 (MDL_SHARED_READ) (granted)
    test/t1 (MDL_SHARED_NO_WRITE) (granted)
    test/t1 (MDL_EXCLUSIVE) (waiting)
T@6    : MDL_context::release_lock: mdl: Released: test/t1 (MDL_SHARED_READ)
T@6    : dispatch_command: query: SELECT f() FROM t2
T@6    : MDL_context::acquire_lock: mdl: Seized:   test/f (MDL_SHARED)
T@7    : MDL_context::acquire_lock: mdl: Acquired: test/t1 (MDL_EXCLUSIVE)
T@7    : MDL_context::release_lock: mdl: Released: test/t1 (MDL_EXCLUSIVE)
T@8    : dispatch_command: query: ALTER VIEW v1 AS SELECT f() FROM t1
T@8    : MDL_context::acquire_lock: mdl: Seized:   test/v1 (MDL_EXCLUSIVE)
T@8    : MDL_context::acquire_lock: mdl: Seized:   test/v1 (MDL_EXCLUSIVE)
T@8    : MDL_context::acquire_lock: mdl: Seized:   test/t1 (MDL_SHARED_READ)
T@6    : dispatch_command: query: SELECT * FROM ( SELECT * FROM v1 ) sq
T@6    : MDL_context::acquire_lock: mdl: Waiting: test/v1 (MDL_SHARED_READ)
T@7    : dispatch_command: query: CREATE FUNCTION f() RETURNS INT RETURN 1
T@7    : MDL_context::acquire_lock: mdl: Waiting: test/f (MDL_EXCLUSIVE)
T@8    : MDL_context::acquire_lock: mdl: Waiting: test/f (MDL_SHARED)
T@8    : MDL_context::acquire_lock: mdl: Deadlock: test/f (MDL_SHARED)
T@8    : MDL_context::acquire_lock: exit: Existing locks:
    test/t1 (MDL_SHARED_READ) (granted)
    test/v1 (MDL_EXCLUSIVE) (granted)
    test/v1 (MDL_SHARED_READ) (waiting)
    test/f (MDL_SHARED) (granted)
    test/f (MDL_EXCLUSIVE) (waiting)
