mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
BUG#39934: Slave stops for engine that only support row-based logging
This is a post-push fix addressing review requests and problems with extra warnings. Problem 1: The sub-statement where an unsafe warning was detected was printed as part of the warning. This was ok for statements that were unsafe due to, e.g., calls to UUID(), but did not make sense for statements that were unsafe because there was more than one autoincrement column (unsafeness in this case comes from the combination of several sub-statements). Fix 1: Instead of printing the sub-statement, print an explanation of why the statement is unsafe. Problem 2: When a recursive construct (i.e., stored proceure, stored function, trigger, view, prepared statement) contained several sub-statements, and at least one of them was unsafe, there would be one unsafeness warning per sub-statement - even for safe sub-statements. Fix 2: Ensure that each type of warning is printed at most once, by remembering throughout the execution of the statement which types of warnings have been printed. mysql-test/extra/rpl_tests/create_recursive_construct.inc: - Clarified comment per review request. - Added checks for the number of warnings in each invocation. mysql-test/extra/rpl_tests/rpl_insert_delayed.test: Per review request, replaced @@session.binlog_format by @@global.binlog_format, since INSERT DELAYED reads the global variable. (In this test case, the two variables have the same value, so the change is cosmetic.) mysql-test/r/sp_trans.result: updated result file mysql-test/suite/binlog/r/binlog_statement_insert_delayed.result: updated result file mysql-test/suite/binlog/r/binlog_stm_ps.result: updated result file mysql-test/suite/binlog/r/binlog_stm_unsafe_warning.result: updated result file mysql-test/suite/binlog/r/binlog_unsafe.result: Updated result file. Note that duplicate warnings are now gone. mysql-test/suite/binlog/t/binlog_unsafe.test: - Added tests for: (1) a statement that is unsafe in many ways; (2) a statement that is unsafe in the same way several times. - Use -- style to invoke mysqltest commands. mysql-test/suite/rpl/r/rpl_stm_found_rows.result: updated result file mysql-test/suite/rpl/r/rpl_stm_loadfile.result: updated result file mysql-test/suite/rpl/t/rpl_mix_found_rows.test: Per review request, added comment explaining what the test case does (copied from rpl_stm_found_rows.test) mysql-test/suite/rpl/t/rpl_stm_found_rows.test: Clarified grammar in comment. mysql-test/suite/rpl_ndb/r/rpl_ndb_binlog_format_errors.result: Updated result file. sql/item_create.cc: Made set_stmt_unsafe take one parameter, describing the type of unsafeness. sql/sp_head.cc: Added unsafe_flags field and made it hold all the unsafe flags. sql/sp_head.h: - Removed the BINLOG_ROW_BASED_IF_MIXED flag from m_flags. Instead, we use the new unsafe_flags field to hold the unsafeness state of the sp. - Made propagate_attributes() copy all unsafe flags. sql/sql_base.cc: - Made LEX::set_stmt_unsafe() take an extra argument. - Made binlog_unsafe_warning_flags store the type of unsafeness. - Per review requests, clarified comments - Added DBUG printouts sql/sql_class.cc: - Made warnings be generated in issue_warnings() and call that from binlog_query(). Wrote issue_warnings(), which prints zero or more warnings, avoiding to print warnings more than once per statement. - Per review request, added @todo so that we remember to assert correct behavior in binlog_query. sql/sql_class.h: - Removed BINLOG_WARNING_PRINTED - Use [set|clear]_current_stmt_binlog_row_based() instead of modifying the flag directly. - added issue_unsafe_warnings() (only called from binlog_unsafe) - Per review request, improved some documentation. sql/sql_insert.cc: Added extra argument to LEX::set_stmt_unsafe() sql/sql_lex.h: - Added enum_binlog_stmt_unsafe, listing all types of unsafe statements. - Per review requests, improved many comments for member functions. - Added [get|set]_stmt_unsafe_flags(), which return/set all the unsafe flags for a statement. sql/sql_parse.cc: - Renamed binlog_warning_flags to binlog_unsafe_warning_flags. - Per review requests, improved comment. sql/sql_view.cc: Made views propagate all the new unsafe flags. sql/sql_yacc.yy: Added parameter to set_stmt_unsafe(). storage/innobase/handler/ha_innodb.cc: Per review requests, replaced DBUG_EXECUTE_IF() by DBUG_EVALUATE_IF().
This commit is contained in:
@ -13,10 +13,10 @@ master-bin.000001 # Query # # use `test`; insert delayed into t1 values (300)
|
||||
master-bin.000001 # Query # # use `test`; FLUSH TABLES
|
||||
insert delayed into t1 values (null),(null),(null),(null);
|
||||
Warnings:
|
||||
Note 1592 Unsafe statement binlogged in statement format since BINLOG_FORMAT = STATEMENT. Statement: insert delayed into t1 values (null),(null),(null),(null)
|
||||
Note 1592 Unsafe statement binlogged in statement format since BINLOG_FORMAT = STATEMENT. Reason: Statement uses INSERT DELAYED. This is unsafe because the time when rows are inserted cannot be predicted.
|
||||
insert delayed into t1 values (null),(null),(400),(null);
|
||||
Warnings:
|
||||
Note 1592 Unsafe statement binlogged in statement format since BINLOG_FORMAT = STATEMENT. Statement: insert delayed into t1 values (null),(null),(400),(null)
|
||||
Note 1592 Unsafe statement binlogged in statement format since BINLOG_FORMAT = STATEMENT. Reason: Statement uses INSERT DELAYED. This is unsafe because the time when rows are inserted cannot be predicted.
|
||||
select * from t1;
|
||||
a
|
||||
207
|
||||
|
@ -11,7 +11,7 @@ prepare s from "insert into t1 select 100 limit ?";
|
||||
set @a=100;
|
||||
execute s using @a;
|
||||
Warnings:
|
||||
Note 1592 Unsafe statement binlogged in statement format since BINLOG_FORMAT = STATEMENT. Statement: insert into t1 select 100 limit 100
|
||||
Note 1592 Unsafe statement binlogged in statement format since BINLOG_FORMAT = STATEMENT. Reason: Statement uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
|
||||
show binlog events from <binlog_start>;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 # Query # # use `test`; create table t1 (a int)
|
||||
|
@ -4,10 +4,10 @@ CREATE TABLE t1 (a int, b int, primary key (a));
|
||||
INSERT INTO t1 VALUES (1,2), (2,3);
|
||||
UPDATE t1 SET b='4' WHERE a=1 LIMIT 1;
|
||||
Warnings:
|
||||
Note 1592 Unsafe statement binlogged in statement format since BINLOG_FORMAT = STATEMENT. Statement: UPDATE t1 SET b='4' WHERE a=1 LIMIT 1
|
||||
Note 1592 Unsafe statement binlogged in statement format since BINLOG_FORMAT = STATEMENT. Reason: Statement uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
|
||||
UPDATE t1 SET b='5' WHERE a=2 ORDER BY a LIMIT 1;
|
||||
Warnings:
|
||||
Note 1592 Unsafe statement binlogged in statement format since BINLOG_FORMAT = STATEMENT. Statement: UPDATE t1 SET b='5' WHERE a=2 ORDER BY a LIMIT 1
|
||||
Note 1592 Unsafe statement binlogged in statement format since BINLOG_FORMAT = STATEMENT. Reason: Statement uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
|
||||
DROP TABLE t1;
|
||||
### NOT filtered database => assertion: binlog disabled and warnings ARE NOT shown
|
||||
SET SQL_LOG_BIN= 0;
|
||||
@ -25,6 +25,10 @@ DROP TABLE IF EXISTS t1;
|
||||
CREATE TABLE t1 (a int, b int, primary key (a));
|
||||
INSERT INTO t1 VALUES (1,2), (2,3);
|
||||
UPDATE t1 SET b='4' WHERE a=1 LIMIT 1;
|
||||
Warnings:
|
||||
Note 1592 Unsafe statement binlogged in statement format since BINLOG_FORMAT = STATEMENT. Reason: Statement uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
|
||||
UPDATE t1 SET b='5' WHERE a=2 ORDER BY a LIMIT 1;
|
||||
Warnings:
|
||||
Note 1592 Unsafe statement binlogged in statement format since BINLOG_FORMAT = STATEMENT. Reason: Statement uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
|
||||
DROP TABLE t1;
|
||||
DROP DATABASE b42851;
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -92,105 +92,149 @@
|
||||
# related to logging format (not just 'Unsafe statement binlogged in
|
||||
# statement mode since BINLOG_FORMAT = STATEMENT').
|
||||
|
||||
source include/have_udf.inc;
|
||||
source include/have_log_bin.inc;
|
||||
source include/have_binlog_format_statement.inc;
|
||||
--source include/have_udf.inc
|
||||
--source include/have_log_bin.inc
|
||||
--source include/have_binlog_format_statement.inc
|
||||
|
||||
--echo #### Setup tables ####
|
||||
|
||||
CREATE TABLE t0 (a CHAR(40));
|
||||
CREATE TABLE t1 (a CHAR(40));
|
||||
CREATE TABLE t2 (a CHAR(40));
|
||||
CREATE TABLE t3 (a CHAR(40));
|
||||
CREATE TABLE ta1 (a CHAR(40));
|
||||
CREATE TABLE ta2 (a CHAR(40));
|
||||
CREATE TABLE ta3 (a CHAR(40));
|
||||
CREATE TABLE t0 (a CHAR(100));
|
||||
CREATE TABLE t1 (a CHAR(100));
|
||||
CREATE TABLE t2 (a CHAR(100));
|
||||
CREATE TABLE t3 (a CHAR(100));
|
||||
CREATE TABLE ta0 (a CHAR(100));
|
||||
CREATE TABLE ta1 (a CHAR(100));
|
||||
CREATE TABLE ta2 (a CHAR(100));
|
||||
CREATE TABLE ta3 (a CHAR(100));
|
||||
CREATE TABLE autoinc_table (a INT PRIMARY KEY AUTO_INCREMENT);
|
||||
CREATE TABLE double_autoinc_table (a INT PRIMARY KEY AUTO_INCREMENT);
|
||||
--DELIMITER |
|
||||
CREATE TRIGGER double_autoinc_trig BEFORE INSERT ON double_autoinc_table FOR EACH ROW BEGIN
|
||||
INSERT INTO autoinc_table VALUES (NULL);
|
||||
END|
|
||||
--DELIMITER ;
|
||||
CREATE TABLE data_table (a CHAR(40));
|
||||
CREATE TABLE data_table (a CHAR(100));
|
||||
INSERT INTO data_table VALUES ('foo');
|
||||
CREATE TABLE trigger_table_1 (a INT);
|
||||
CREATE TABLE trigger_table_2 (a INT);
|
||||
CREATE TABLE trigger_table_3 (a INT);
|
||||
CREATE TABLE double_autoinc_table (a INT PRIMARY KEY AUTO_INCREMENT);
|
||||
|
||||
--DELIMITER |
|
||||
CREATE TRIGGER double_autoinc_trig
|
||||
BEFORE INSERT ON double_autoinc_table FOR EACH ROW
|
||||
BEGIN
|
||||
INSERT INTO autoinc_table VALUES (NULL);
|
||||
END|
|
||||
|
||||
CREATE FUNCTION multi_unsafe_func() RETURNS INT
|
||||
BEGIN
|
||||
INSERT INTO t0 VALUES(CONCAT(@@hostname, @@hostname));
|
||||
INSERT INTO t0 VALUES(0);
|
||||
INSERT INTO t0 VALUES(CONCAT(UUID(), @@hostname));
|
||||
RETURN 1;
|
||||
END|
|
||||
--DELIMITER ;
|
||||
|
||||
--replace_result $UDF_EXAMPLE_LIB UDF_EXAMPLE_LIB
|
||||
eval CREATE FUNCTION myfunc_int RETURNS INTEGER SONAME "$UDF_EXAMPLE_LIB";
|
||||
--eval CREATE FUNCTION myfunc_int RETURNS INTEGER SONAME "$UDF_EXAMPLE_LIB"
|
||||
|
||||
# In each iteration of this loop, we select one method to make the
|
||||
# statement unsafe.
|
||||
let $unsafe_type= 0;
|
||||
while (`SELECT $unsafe_type < 7`) {
|
||||
--let $unsafe_type= 0
|
||||
while (`SELECT $unsafe_type < 9`) {
|
||||
|
||||
--echo
|
||||
|
||||
if (`SELECT $unsafe_type = 0`) {
|
||||
--echo ==== Testing UUID() unsafeness ====
|
||||
let $desc_0= unsafe UUID() function;
|
||||
let $stmt_sidef_0= INSERT INTO t0 VALUES (UUID());
|
||||
let $value_0= UUID();
|
||||
let $sel_sidef_0=;
|
||||
let $sel_retval_0= SELECT UUID();
|
||||
--let $desc_0= unsafe UUID() function
|
||||
--let $stmt_sidef_0= INSERT INTO t0 VALUES (UUID())
|
||||
--let $value_0= UUID()
|
||||
--let $sel_sidef_0=
|
||||
--let $sel_retval_0= SELECT UUID()
|
||||
--let $CRC_ARG_expected_number_of_warnings= 1
|
||||
}
|
||||
|
||||
if (`SELECT $unsafe_type = 1`) {
|
||||
--echo ==== Testing @@hostname unsafeness ====
|
||||
let $desc_0= unsafe @@hostname variable;
|
||||
let $stmt_sidef_0= INSERT INTO t0 VALUES (@@hostname);
|
||||
let $value_0= @@hostname;
|
||||
let $sel_sidef_0=;
|
||||
--let $desc_0= unsafe @@hostname variable
|
||||
--let $stmt_sidef_0= INSERT INTO t0 VALUES (@@hostname)
|
||||
--let $value_0= @@hostname
|
||||
--let $sel_sidef_0=
|
||||
# $sel_retval is going to be used in views. Views cannot execute
|
||||
# statements that refer to @@variables. Hence, we set $set_retval
|
||||
# to empty instead of SELECT @@hostname.
|
||||
let $sel_retval_0=;
|
||||
--let $sel_retval_0=
|
||||
--let $CRC_ARG_expected_number_of_warnings= 1
|
||||
}
|
||||
|
||||
if (`SELECT $unsafe_type = 2`) {
|
||||
--echo ==== Testing SELECT...LIMIT unsafeness ====
|
||||
let $desc_0= unsafe SELECT...LIMIT statement;
|
||||
let $stmt_sidef_0= INSERT INTO t0 SELECT * FROM data_table LIMIT 1;
|
||||
let $value_0=;
|
||||
let $sel_sidef_0=;
|
||||
let $sel_retval_0= SELECT * FROM data_table LIMIT 1;
|
||||
--let $desc_0= unsafe SELECT...LIMIT statement
|
||||
--let $stmt_sidef_0= INSERT INTO t0 SELECT * FROM data_table LIMIT 1
|
||||
--let $value_0=
|
||||
--let $sel_sidef_0=
|
||||
--let $sel_retval_0= SELECT * FROM data_table LIMIT 1
|
||||
--let $CRC_ARG_expected_number_of_warnings= 1
|
||||
}
|
||||
|
||||
if (`SELECT $unsafe_type = 3`) {
|
||||
--echo ==== Testing INSERT DELAYED unsafeness ====
|
||||
let $desc_0= unsafe INSERT DELAYED statement;
|
||||
let $stmt_sidef_0= INSERT DELAYED INTO t0 VALUES (1), (2);
|
||||
let $value_0=;
|
||||
let $sel_sidef_0=;
|
||||
let $sel_retval_0=;
|
||||
--let $desc_0= unsafe INSERT DELAYED statement
|
||||
--let $stmt_sidef_0= INSERT DELAYED INTO t0 VALUES (1), (2)
|
||||
--let $value_0=
|
||||
--let $sel_sidef_0=
|
||||
--let $sel_retval_0=
|
||||
--let $CRC_ARG_expected_number_of_warnings= 1
|
||||
}
|
||||
|
||||
if (`SELECT $unsafe_type = 4`) {
|
||||
--echo ==== Testing unsafeness of insert of two autoinc values ====
|
||||
let $desc_0= unsafe update of two autoinc columns;
|
||||
let $stmt_sidef_0= INSERT INTO double_autoinc_table VALUES (NULL);
|
||||
let $value_0=;
|
||||
let $sel_sidef_0=;
|
||||
let $sel_retval_0=;
|
||||
--let $desc_0= unsafe update of two autoinc columns
|
||||
--let $stmt_sidef_0= INSERT INTO double_autoinc_table VALUES (NULL)
|
||||
--let $value_0=
|
||||
--let $sel_sidef_0=
|
||||
--let $sel_retval_0=
|
||||
# Note: we will expect 1 warning when BUG#45827 is fixed.
|
||||
--let $CRC_ARG_expected_number_of_warnings= 0
|
||||
}
|
||||
|
||||
if (`SELECT $unsafe_type = 5`) {
|
||||
--echo ==== Testing unsafeness of UDF's ====
|
||||
let $desc_0= unsafe UDF;
|
||||
let $stmt_sidef_0= INSERT INTO t0 VALUES (myfunc_int(10));
|
||||
let $value_0= myfunc_int(10);
|
||||
let $sel_sidef_0= SELECT myfunc_int(10);
|
||||
let $sel_retval_0= ;
|
||||
--let $desc_0= unsafe UDF
|
||||
--let $stmt_sidef_0= INSERT INTO t0 VALUES (myfunc_int(10))
|
||||
--let $value_0= myfunc_int(10)
|
||||
--let $sel_sidef_0= SELECT myfunc_int(10)
|
||||
--let $sel_retval_0=
|
||||
--let $CRC_ARG_expected_number_of_warnings= 1
|
||||
}
|
||||
|
||||
if (`SELECT $unsafe_type = 6`) {
|
||||
--echo ==== Testing unsafeness of access to mysql.general_log ====
|
||||
let $desc_0= unsafe use of mysql.general_log;
|
||||
let $stmt_sidef_0= INSERT INTO t0 SELECT COUNT(*) FROM mysql.general_log;
|
||||
let $value_0=;
|
||||
let $sel_sidef_0=;
|
||||
let $sel_retval_0= SELECT COUNT(*) FROM mysql.general_log;
|
||||
--let $desc_0= unsafe use of mysql.general_log
|
||||
--let $stmt_sidef_0= INSERT INTO t0 SELECT COUNT(*) FROM mysql.general_log
|
||||
--let $value_0=
|
||||
--let $sel_sidef_0=
|
||||
--let $sel_retval_0= SELECT COUNT(*) FROM mysql.general_log
|
||||
--let $CRC_ARG_expected_number_of_warnings= 1
|
||||
}
|
||||
|
||||
if (`SELECT $unsafe_type = 7`) {
|
||||
--echo ==== Testing a statement that is unsafe in many ways ====
|
||||
--let $desc_0= statement that is unsafe in many ways
|
||||
# Concatenate three unsafe values, and then concatenate NULL to
|
||||
# that so that the result is NULL and we instead use autoinc.
|
||||
--let $stmt_sidef_0= INSERT DELAYED INTO double_autoinc_table SELECT CONCAT(UUID(), @@hostname, myfunc_int(), NULL) FROM mysql.general_log LIMIT 1
|
||||
--let $value_0=
|
||||
--let $sel_sidef_0=
|
||||
--let $sel_retval_0=
|
||||
# Note: we will expect 7 warnings when BUG#45827 is fixed.
|
||||
--let $CRC_ARG_expected_number_of_warnings= 6
|
||||
}
|
||||
|
||||
if (`SELECT $unsafe_type = 8`) {
|
||||
--echo ==== Testing a statement that is unsafe several times ====
|
||||
--let $desc_0= statement that is unsafe several times
|
||||
--let $stmt_sidef_0= INSERT INTO ta0 VALUES (multi_unsafe_func())
|
||||
--let $value_0=
|
||||
--let $sel_sidef_0= SELECT multi_unsafe_func()
|
||||
--let $sel_retval_0=
|
||||
--let $CRC_ARG_expected_number_of_warnings= 2
|
||||
}
|
||||
|
||||
# In each iteration of the following loop, we select one way to
|
||||
@ -201,24 +245,24 @@ while (`SELECT $unsafe_type < 7`) {
|
||||
# In the last iteration, $call_type_1=7, we don't create a recursive
|
||||
# construct. Instead, we just invoke the unsafe statement directly.
|
||||
|
||||
let $call_type_1= 0;
|
||||
--let $call_type_1= 0
|
||||
while (`SELECT $call_type_1 < 8`) {
|
||||
#--echo debug: level 1, types $call_type_1 -> $unsafe_type
|
||||
let $CRC_ARG_level= 1;
|
||||
let $CRC_ARG_type= $call_type_1;
|
||||
let $CRC_ARG_stmt_sidef= $stmt_sidef_0;
|
||||
let $CRC_ARG_value= $value_0;
|
||||
let $CRC_ARG_sel_sidef= $sel_sidef_0;
|
||||
let $CRC_ARG_sel_retval= $sel_retval_0;
|
||||
let $CRC_ARG_desc= $desc_0;
|
||||
source extra/rpl_tests/create_recursive_construct.inc;
|
||||
let $stmt_sidef_1= $CRC_RET_stmt_sidef;
|
||||
let $value_1= $CRC_RET_value;
|
||||
let $sel_sidef_1= $CRC_RET_sel_sidef;
|
||||
let $sel_retval_1= $CRC_RET_sel_retval;
|
||||
let $is_toplevel_1= $CRC_RET_is_toplevel;
|
||||
let $drop_1= $CRC_RET_drop;
|
||||
let $desc_1= $CRC_RET_desc;
|
||||
--let $CRC_ARG_level= 1
|
||||
--let $CRC_ARG_type= $call_type_1
|
||||
--let $CRC_ARG_stmt_sidef= $stmt_sidef_0
|
||||
--let $CRC_ARG_value= $value_0
|
||||
--let $CRC_ARG_sel_sidef= $sel_sidef_0
|
||||
--let $CRC_ARG_sel_retval= $sel_retval_0
|
||||
--let $CRC_ARG_desc= $desc_0
|
||||
--source extra/rpl_tests/create_recursive_construct.inc
|
||||
--let $stmt_sidef_1= $CRC_RET_stmt_sidef
|
||||
--let $value_1= $CRC_RET_value
|
||||
--let $sel_sidef_1= $CRC_RET_sel_sidef
|
||||
--let $sel_retval_1= $CRC_RET_sel_retval
|
||||
--let $is_toplevel_1= $CRC_RET_is_toplevel
|
||||
--let $drop_1= $CRC_RET_drop
|
||||
--let $desc_1= $CRC_RET_desc
|
||||
|
||||
# Some statements must be top-level statements, i.e., cannot be
|
||||
# called as a sub-statement of any recursive construct. (One
|
||||
@ -232,24 +276,24 @@ while (`SELECT $unsafe_type < 7`) {
|
||||
# the previous recursive construct in another recursive
|
||||
# construct.
|
||||
|
||||
let $call_type_2= 0;
|
||||
--let $call_type_2= 0
|
||||
while (`SELECT $call_type_2 < 7`) {
|
||||
#--echo debug: level 2, types $call_type_2 -> $call_type_1 -> $unsafe_type
|
||||
let $CRC_ARG_level= 2;
|
||||
let $CRC_ARG_type= $call_type_2;
|
||||
let $CRC_ARG_stmt_sidef= $stmt_sidef_1;
|
||||
let $CRC_ARG_value= $value_1;
|
||||
let $CRC_ARG_sel_sidef= $sel_sidef_1;
|
||||
let $CRC_ARG_sel_retval= $sel_retval_1;
|
||||
let $CRC_ARG_desc= $desc_1;
|
||||
source extra/rpl_tests/create_recursive_construct.inc;
|
||||
let $stmt_sidef_2= $CRC_RET_stmt_sidef;
|
||||
let $value_2= $CRC_RET_value;
|
||||
let $sel_sidef_2= $CRC_RET_sel_sidef;
|
||||
let $sel_retval_2= $CRC_RET_sel_retval;
|
||||
let $is_toplevel_2= $CRC_RET_is_toplevel;
|
||||
let $drop_2= $CRC_RET_drop;
|
||||
let $desc_2= $CRC_RET_desc;
|
||||
--let $CRC_ARG_level= 2
|
||||
--let $CRC_ARG_type= $call_type_2
|
||||
--let $CRC_ARG_stmt_sidef= $stmt_sidef_1
|
||||
--let $CRC_ARG_value= $value_1
|
||||
--let $CRC_ARG_sel_sidef= $sel_sidef_1
|
||||
--let $CRC_ARG_sel_retval= $sel_retval_1
|
||||
--let $CRC_ARG_desc= $desc_1
|
||||
--source extra/rpl_tests/create_recursive_construct.inc
|
||||
--let $stmt_sidef_2= $CRC_RET_stmt_sidef
|
||||
--let $value_2= $CRC_RET_value
|
||||
--let $sel_sidef_2= $CRC_RET_sel_sidef
|
||||
--let $sel_retval_2= $CRC_RET_sel_retval
|
||||
--let $is_toplevel_2= $CRC_RET_is_toplevel
|
||||
--let $drop_2= $CRC_RET_drop
|
||||
--let $desc_2= $CRC_RET_desc
|
||||
|
||||
if (!$is_toplevel_2) {
|
||||
|
||||
@ -261,51 +305,52 @@ while (`SELECT $unsafe_type < 7`) {
|
||||
# the previous recursive construct in another recursive
|
||||
# construct.
|
||||
|
||||
let $call_type_3= 0;
|
||||
--let $call_type_3= 0
|
||||
while (`SELECT $call_type_3 < 7`) {
|
||||
#--echo debug: level 3, types $call_type_2 -> $call_type_2 -> $call_type_1 -> $unsafe_type
|
||||
let $CRC_ARG_level= 3;
|
||||
let $CRC_ARG_type= $call_type_3;
|
||||
let $CRC_ARG_stmt_sidef= $stmt_sidef_2;
|
||||
let $CRC_ARG_value= $value_2;
|
||||
let $CRC_ARG_sel_sidef= $sel_sidef_2;
|
||||
let $CRC_ARG_sel_retval= $sel_retval_2;
|
||||
let $CRC_ARG_desc= $desc_2;
|
||||
source extra/rpl_tests/create_recursive_construct.inc;
|
||||
--let $CRC_ARG_level= 3
|
||||
--let $CRC_ARG_type= $call_type_3
|
||||
--let $CRC_ARG_stmt_sidef= $stmt_sidef_2
|
||||
--let $CRC_ARG_value= $value_2
|
||||
--let $CRC_ARG_sel_sidef= $sel_sidef_2
|
||||
--let $CRC_ARG_sel_retval= $sel_retval_2
|
||||
--let $CRC_ARG_desc= $desc_2
|
||||
--source extra/rpl_tests/create_recursive_construct.inc
|
||||
|
||||
# Drop created object.
|
||||
if (`SELECT '$drop_3' != ''`) {
|
||||
eval $drop_3;
|
||||
--eval $drop_3
|
||||
}
|
||||
inc $call_type_3;
|
||||
--inc $call_type_3
|
||||
} # while (call_type_3)
|
||||
} # if (0)
|
||||
} # if (!is_toplevel_2)
|
||||
|
||||
# Drop created object.
|
||||
if (`SELECT '$drop_2' != ''`) {
|
||||
eval $drop_2;
|
||||
--eval $drop_2
|
||||
}
|
||||
inc $call_type_2;
|
||||
--inc $call_type_2
|
||||
} # while (call_type_2)
|
||||
} # if (!is_toplevel_1)
|
||||
|
||||
# Drop created object.
|
||||
if (`SELECT '$drop_1' != ''`) {
|
||||
eval $drop_1;
|
||||
--eval $drop_1
|
||||
}
|
||||
inc $call_type_1;
|
||||
--inc $call_type_1
|
||||
} # while (call_type_1)
|
||||
|
||||
inc $unsafe_type;
|
||||
--inc $unsafe_type
|
||||
} # while (unsafe_type)
|
||||
|
||||
DROP TRIGGER double_autoinc_trig;
|
||||
DROP TABLE t0, t1, t2, t3, ta1, ta2, ta3,
|
||||
DROP TABLE t0, t1, t2, t3, ta0, ta1, ta2, ta3,
|
||||
autoinc_table, double_autoinc_table,
|
||||
data_table,
|
||||
trigger_table_1, trigger_table_2, trigger_table_3;
|
||||
DROP FUNCTION myfunc_int;
|
||||
DROP FUNCTION multi_unsafe_func;
|
||||
|
||||
|
||||
--echo ==== Special system variables that should *not* be unsafe ====
|
||||
|
Reference in New Issue
Block a user