mariadb/mysql-test/main/view_debug.test
Marko Mäkelä 3c92050d1c Fix build without either ENABLED_DEBUG_SYNC or DBUG_OFF
There are separate flags DBUG_OFF for disabling the DBUG facility
and ENABLED_DEBUG_SYNC for enabling the DEBUG_SYNC facility.
Let us allow debug builds without DEBUG_SYNC.

Note: For CMAKE_BUILD_TYPE=Debug, CMakeLists.txt will continue to
define ENABLED_DEBUG_SYNC.
2022-09-23 17:37:52 +03:00

37 lines
815 B
Text

--source include/have_debug.inc
--source include/have_debug_sync.inc
--echo #
--echo #MDEV-8087:Server crashed in Time_and_counter_tracker::incr_loops
--echo #
CREATE PROCEDURE proc() SELECT * FROM v2;
CREATE ALGORITHM = UNDEFINED VIEW v1 AS SELECT 1;
CREATE ALGORITHM = TEMPTABLE VIEW v2 AS SELECT 3 FROM v1;
DROP VIEW v1;
--connect (con1,localhost,root,,test)
--connect (con2,localhost,root,,test)
--connection con1
--error ER_VIEW_INVALID
CALL proc();
SET DEBUG_SYNC= 'after_cached_view_opened SIGNAL oppp WAIT_FOR created';
send CALL proc();
--connection con2
SET DEBUG_SYNC= 'now WAIT_FOR oppp';
SET DEBUG_SYNC= 'RESET';
CREATE ALGORITHM = TEMPTABLE VIEW v1 AS SELECT 2;
SET DEBUG_SYNC= 'now SIGNAL created';
--connection con1
--reap
SET DEBUG_SYNC= 'RESET';
drop procedure proc;
drop view v1,v2;