mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
MDEV-16708: fix in test failures(added --enable_prepared_warnings/--disable_prepared_warnings)
This commit is contained in:
committed by
Sergei Golubchik
parent
fe78495053
commit
97e8d27bed
@ -28,6 +28,8 @@ DROP TABLE t1;
|
||||
--echo # The following statements return deprecated syntax warnings
|
||||
--echo #
|
||||
|
||||
--enable_prepare_warnings
|
||||
|
||||
--eval CREATE TABLE t1 (a $type DEFAULT '' COMPRESSED)
|
||||
SHOW CREATE TABLE t1;
|
||||
DROP TABLE t1;
|
||||
@ -35,6 +37,7 @@ DROP TABLE t1;
|
||||
SHOW CREATE TABLE t1;
|
||||
DROP TABLE t1;
|
||||
|
||||
--disable_prepare_warnings
|
||||
|
||||
--echo #
|
||||
--echo # The following statements fail by the grammar,
|
||||
|
@ -53,6 +53,8 @@ DROP TABLE t1;
|
||||
--echo # The following statements return deprecated syntax warnings
|
||||
--echo #
|
||||
|
||||
--enable_prepare_warnings
|
||||
|
||||
--eval CREATE TABLE t1 (a $type BINARY COMPRESSED)
|
||||
SHOW CREATE TABLE t1;
|
||||
DROP TABLE t1;
|
||||
@ -63,6 +65,7 @@ DROP TABLE t1;
|
||||
SHOW CREATE TABLE t1;
|
||||
DROP TABLE t1;
|
||||
|
||||
--disable_prepare_warnings
|
||||
|
||||
--echo #
|
||||
--echo # The following statements fail by the grammar,
|
||||
|
@ -9,6 +9,8 @@ SELECT ENGINE FROM INFORMATION_SCHEMA.TABLES
|
||||
WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t1';
|
||||
INSERT INTO t1 VALUES (10,'none');
|
||||
|
||||
--enable_prepare_warnings
|
||||
|
||||
DELIMITER $$;
|
||||
CREATE PACKAGE pkg1 AS
|
||||
PROCEDURE p1;
|
||||
@ -58,5 +60,7 @@ ROLLBACK;
|
||||
SELECT * FROM t1 ORDER BY a;
|
||||
DELETE FROM t1;
|
||||
|
||||
--disable_prepare_warnings
|
||||
|
||||
DROP PACKAGE pkg1;
|
||||
DROP TABLE t1;
|
||||
|
@ -8,6 +8,7 @@ SET sql_mode='ORACLE';
|
||||
CREATE TABLE t1 (a INT NOT NULL PRIMARY KEY) engine=innodb;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
START TRANSACTION;
|
||||
--enable_prepare_warnings
|
||||
SELECT a AS a_con1 FROM t1 INTO @a FOR UPDATE;
|
||||
|
||||
--connect(con2,localhost,root,,)
|
||||
@ -24,5 +25,7 @@ COMMIT;
|
||||
SELECT a AS con2 FROM t1;
|
||||
COMMIT;
|
||||
|
||||
--disable_prepare_warnings
|
||||
|
||||
--connection default
|
||||
DROP TABLE t1;
|
||||
|
@ -189,7 +189,7 @@ select * from t2;
|
||||
a
|
||||
23
|
||||
connection master;
|
||||
drop function fn1;
|
||||
drop function fn1|
|
||||
create function fn1()
|
||||
returns int
|
||||
no sql
|
||||
|
@ -3,6 +3,7 @@
|
||||
--disable_warnings
|
||||
drop table if exists tb2 ;
|
||||
--enable_warnings
|
||||
--enable_prepare_warnings
|
||||
create table tb2 (
|
||||
f59 numeric (0) unsigned,
|
||||
f60 numeric (64) unsigned,
|
||||
@ -61,3 +62,4 @@ f109 set("1set","2set") not null default "1set"
|
||||
eval
|
||||
load data infile '$MYSQLTEST_VARDIR/std_data/funcs_1/innodb_tb2.txt'
|
||||
into table tb2;
|
||||
--disable_prepare_warnings
|
||||
|
@ -3,6 +3,7 @@
|
||||
--disable_warnings
|
||||
drop table if exists tb4;
|
||||
--enable_warnings
|
||||
--enable_prepare_warnings
|
||||
create table tb4 (
|
||||
f176 numeric (0) unsigned not null DEFAULT 9,
|
||||
f177 numeric (64) unsigned not null DEFAULT 9,
|
||||
@ -68,3 +69,4 @@ f241 char(100)
|
||||
eval
|
||||
load data infile '$MYSQLTEST_VARDIR/std_data/funcs_1/innodb_tb4.txt'
|
||||
into table tb4;
|
||||
--disable_prepare_warnings
|
||||
|
@ -3,6 +3,9 @@
|
||||
--disable_warnings
|
||||
drop table if exists tb2 ;
|
||||
--enable_warnings
|
||||
|
||||
--enable_prepare_warnings
|
||||
|
||||
create table tb2 (
|
||||
f59 numeric (0) unsigned,
|
||||
f60 numeric (64) unsigned,
|
||||
@ -61,3 +64,5 @@ f109 set("1set","2set") not null default "1set"
|
||||
eval
|
||||
load data infile '$MYSQLTEST_VARDIR/std_data/funcs_1/memory_tb2.txt'
|
||||
into table tb2 ;
|
||||
|
||||
--disable_prepare_warnings
|
||||
|
@ -3,6 +3,7 @@
|
||||
--disable_warnings
|
||||
drop table if exists tb4 ;
|
||||
--enable_warnings
|
||||
--enable_prepare_warnings
|
||||
create table tb4 (
|
||||
f176 numeric (0) unsigned not null DEFAULT 9,
|
||||
f177 numeric (64) unsigned not null DEFAULT 9,
|
||||
@ -67,3 +68,4 @@ f240 varchar(1200)
|
||||
eval
|
||||
load data infile '$MYSQLTEST_VARDIR/std_data/funcs_1/memory_tb4.txt'
|
||||
into table tb4;
|
||||
--disable_prepare_warnings
|
||||
|
@ -1293,6 +1293,7 @@ DROP TABLE IF EXISTS t1, t2;
|
||||
DROP FUNCTION IF EXISTS f1;
|
||||
--enable_warnings
|
||||
|
||||
--enable_prepare_warnings
|
||||
delimiter |;
|
||||
CREATE FUNCTION f1() RETURNS INTEGER
|
||||
BEGIN
|
||||
@ -1300,6 +1301,7 @@ BEGIN
|
||||
RETURN 1;
|
||||
END|
|
||||
delimiter ;|
|
||||
--disable_prepare_warnings
|
||||
|
||||
# Get f1() parsed and cached
|
||||
--error ER_NO_SUCH_TABLE
|
||||
|
@ -11,6 +11,8 @@
|
||||
|
||||
--source include/have_innodb.inc
|
||||
|
||||
--enable_prepare_warnings
|
||||
|
||||
CREATE TABLE t1
|
||||
(
|
||||
t1_BIGINT BIGINT,
|
||||
@ -95,6 +97,8 @@ CREATE TABLE t1
|
||||
t1_VARMYSQL_0 VARCHAR(0) CHARACTER SET utf8
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
--disable_prepare_warnings
|
||||
|
||||
INSERT INTO t1 () VALUES ();
|
||||
|
||||
SELECT
|
||||
|
@ -22,6 +22,8 @@ eval CREATE TABLE test.part_tbl(id MEDIUMINT NOT NULL AUTO_INCREMENT,
|
||||
|
||||
######## Create SPs, Functions, Views and Triggers Section ##############
|
||||
|
||||
--enable_prepare_warnings
|
||||
|
||||
delimiter |;
|
||||
|
||||
CREATE PROCEDURE test.proc_part()
|
||||
@ -52,6 +54,8 @@ END|
|
||||
|
||||
delimiter ;|
|
||||
|
||||
--disable_prepare_warnings
|
||||
|
||||
############ Finish Setup Section ###################
|
||||
|
||||
############ Test Section ###################
|
||||
|
@ -52,8 +52,10 @@ SET DEBUG_SYNC='copy_data_between_tables_before SIGNAL found_row WAIT_FOR wait_r
|
||||
SET DEBUG_SYNC='now WAIT_FOR found_row';
|
||||
|
||||
# Find the statement id of the ALTER TABLE
|
||||
--enable_prepare_warnings
|
||||
select event_id from performance_schema.events_statements_current
|
||||
where thread_id = @con1_thread_id into @con1_stmt_id;
|
||||
--disable_prepare_warnings
|
||||
|
||||
# completed 0
|
||||
select EVENT_NAME, WORK_COMPLETED, WORK_ESTIMATED
|
||||
|
@ -21,6 +21,8 @@ CREATE TEMPORARY TABLE table_list (id INT AUTO_INCREMENT, PRIMARY KEY (id)) AS
|
||||
WHERE TABLE_SCHEMA='performance_schema'
|
||||
ORDER BY TABLE_NAME;
|
||||
|
||||
--enable_prepare_warnings
|
||||
|
||||
SELECT COUNT(*) FROM table_list INTO @table_count;
|
||||
|
||||
let $count=`SELECT @table_count`;
|
||||
@ -39,5 +41,6 @@ while ($count > 0)
|
||||
dec $count;
|
||||
}
|
||||
|
||||
DROP TEMPORARY TABLE table_list;
|
||||
--disable_prepare_warnings
|
||||
|
||||
DROP TEMPORARY TABLE table_list;
|
||||
|
@ -126,6 +126,7 @@ DROP TRIGGER t_ps_trigger;
|
||||
--disable_warnings
|
||||
DROP PROCEDURE IF EXISTS t_ps_proc;
|
||||
--enable_warnings
|
||||
--enable_prepare_warnings
|
||||
delimiter |;
|
||||
|
||||
CREATE PROCEDURE t_ps_proc(IN conid INT, OUT pid INT)
|
||||
@ -140,6 +141,7 @@ delimiter ;|
|
||||
|
||||
CALL t_ps_proc(connection_id(), @p_id);
|
||||
|
||||
--disable_prepare_warnings
|
||||
# FUNCTION
|
||||
|
||||
--disable_warnings
|
||||
|
@ -188,7 +188,7 @@ select * from t2;
|
||||
a
|
||||
23
|
||||
connection master;
|
||||
drop function fn1;
|
||||
drop function fn1|
|
||||
create function fn1()
|
||||
returns int
|
||||
no sql
|
||||
|
@ -1,3 +1,8 @@
|
||||
if (`SELECT $PS_PROTOCOL != 0`)
|
||||
{
|
||||
--skip Need regular protocol but ps-protocol was specified
|
||||
}
|
||||
|
||||
source include/have_binlog_format_mixed_or_row.inc;
|
||||
source include/master-slave.inc;
|
||||
|
||||
|
@ -10,7 +10,9 @@ drop database if exists mysqltest1;
|
||||
create database mysqltest1;
|
||||
create table mysqltest1.t1 (n int);
|
||||
insert into mysqltest1.t1 values (1);
|
||||
--enable_prepare_warnings
|
||||
select * from mysqltest1.t1 into outfile 'mysqltest1/f1.txt';
|
||||
--disable_prepare_warnings
|
||||
create table mysqltest1.t2 (n int);
|
||||
create table mysqltest1.t3 (n int);
|
||||
--replace_result \\ / 66 39 93 39 17 39 247 39 41 39 "File exists" "Directory not empty"
|
||||
|
@ -4,6 +4,11 @@
|
||||
# Purpose: To test that event effects are replicated. #
|
||||
##################################################################
|
||||
|
||||
if (`SELECT $PS_PROTOCOL != 0`)
|
||||
{
|
||||
--skip Need regular protocol but ps-protocol was specified
|
||||
}
|
||||
|
||||
--source include/master-slave.inc
|
||||
|
||||
SET @old_event_scheduler = @@global.event_scheduler;
|
||||
|
@ -21,6 +21,7 @@ set @restore_slave_net_timeout= @@global.slave_net_timeout;
|
||||
set @@global.slave_net_timeout= 10;
|
||||
--enable_warnings
|
||||
|
||||
--enable_prepare_warnings
|
||||
###
|
||||
### Checking the range
|
||||
###
|
||||
@ -167,6 +168,8 @@ drop table t1;
|
||||
sync_slave_with_master;
|
||||
set @@global.slave_net_timeout= @restore_slave_net_timeout;
|
||||
|
||||
--disable_prepare_warnings
|
||||
|
||||
--source include/stop_slave.inc
|
||||
|
||||
--echo End of tests
|
||||
|
@ -18,6 +18,8 @@
|
||||
--source include/have_binlog_format_mixed.inc
|
||||
--echo
|
||||
|
||||
--enable_prepare_warnings
|
||||
|
||||
# Set number of retries to connect to master
|
||||
let $connect_retry= 20;
|
||||
|
||||
@ -561,5 +563,7 @@ DROP TABLE t1;
|
||||
--sync_slave_with_master
|
||||
SET @@global.slave_net_timeout=@restore_slave_net_timeout;
|
||||
|
||||
--disable_prepare_warnings
|
||||
|
||||
#--let $rpl_only_running_threads= 1
|
||||
--source include/rpl_end.inc
|
||||
|
@ -19,6 +19,7 @@ eval CREATE TABLE test.regular_tbl(id MEDIUMINT NOT NULL AUTO_INCREMENT,
|
||||
|
||||
######## Create SPs, Functions, Views and Triggers Section ##############
|
||||
|
||||
--enable_prepare_warnings
|
||||
delimiter |;
|
||||
CREATE PROCEDURE test.proc_norm()
|
||||
BEGIN
|
||||
@ -46,7 +47,7 @@ BEGIN
|
||||
END|
|
||||
|
||||
delimiter ;|
|
||||
|
||||
--disable_prepare_warnings
|
||||
############ Finish Setup Section ###################
|
||||
|
||||
|
||||
|
@ -285,8 +285,10 @@ EOF
|
||||
|
||||
--connection server_2
|
||||
--enable_reconnect
|
||||
--enable_prepare_warnings
|
||||
--source include/wait_until_connected_again.inc
|
||||
SELECT max(seq_no) FROM mysql.gtid_slave_pos_InnoDB into @seq_no;
|
||||
--disable_prepare_warnings
|
||||
|
||||
--connection server_1
|
||||
INSERT INTO t2(a) SELECT 1+MAX(a) FROM t2;
|
||||
|
@ -89,8 +89,10 @@ INSERT INTO t1 (col_a) VALUES (test_replication_sf());
|
||||
|
||||
--sync_slave_with_master
|
||||
|
||||
--enable_prepare_warnings
|
||||
# Dump table on slave
|
||||
select * from t1 into outfile "../../tmp/t1_slave.txt";
|
||||
--disable_prepare_warnings
|
||||
|
||||
# Load data from slave into temp table on master
|
||||
connection master;
|
||||
|
@ -208,7 +208,7 @@ select * from t2;
|
||||
connection master;
|
||||
delimiter |;
|
||||
|
||||
drop function fn1;
|
||||
drop function fn1|
|
||||
|
||||
create function fn1()
|
||||
returns int
|
||||
|
@ -23,8 +23,10 @@ set innodb_fil_make_page_dirty_debug = ON;
|
||||
|
||||
--echo # An example usage.
|
||||
create table t1 (f1 int primary key) engine = innodb;
|
||||
--enable_prepare_warnings
|
||||
select space from information_schema.innodb_sys_tables
|
||||
where name = 'test/t1' into @space_id;
|
||||
--disable_prepare_warnings
|
||||
set global innodb_saved_page_number_debug = 0;
|
||||
set global innodb_fil_make_page_dirty_debug = @space_id;
|
||||
drop table t1;
|
||||
|
@ -23,8 +23,10 @@ set innodb_saved_page_number_debug = ON;
|
||||
|
||||
--echo # An example usage.
|
||||
create table t1 (f1 int primary key) engine = innodb;
|
||||
--enable_prepare_warnings
|
||||
select space from information_schema.innodb_sys_tables
|
||||
where name = 'test/t1' into @space_id;
|
||||
--disable_prepare_warnings
|
||||
set global innodb_saved_page_number_debug = 0;
|
||||
set global innodb_fil_make_page_dirty_debug = @space_id;
|
||||
drop table t1;
|
||||
|
@ -33,7 +33,9 @@ print FILE "SELECT load_file('",$protected_file,"') AS loaded_file;\n";
|
||||
close(FILE);
|
||||
EOF
|
||||
|
||||
--enable_prepare_warnings
|
||||
--source $MYSQL_TMP_DIR/bug50373.inc
|
||||
--disable_prepare_warnings
|
||||
--remove_file $MYSQL_TMP_DIR/bug50373.inc
|
||||
--enable_query_log
|
||||
|
||||
|
@ -139,7 +139,9 @@ select * from t;
|
||||
update t set a=3 where a=1;
|
||||
select * from t;
|
||||
select * from t for system_time all;
|
||||
--enable_prepare_warnings
|
||||
select row_start from t where a=3 into @tm;
|
||||
--disable_prepare_warnings
|
||||
alter table t add column b int;
|
||||
select @tm=row_start from t where a=3;
|
||||
show create table t;
|
||||
|
@ -17,6 +17,9 @@ insert into t1 values ();
|
||||
--real_sleep 0.01
|
||||
set @ts0= now(6);
|
||||
insert into t1 values ();
|
||||
|
||||
--enable_prepare_warnings
|
||||
|
||||
select sys_trx_start from t1 where id = last_insert_id() into @tx0;
|
||||
select transaction_id = @tx0 from mysql.transaction_registry
|
||||
order by transaction_id desc limit 1;
|
||||
@ -87,6 +90,7 @@ insert into t1 values ();
|
||||
select sys_trx_start from t1 where id = last_insert_id() into @tx6;
|
||||
select isolation_level = 'REPEATABLE-READ' from mysql.transaction_registry where transaction_id = @tx6;
|
||||
|
||||
--disable_prepare_warnings
|
||||
|
||||
drop table t1;
|
||||
call verify_trt;
|
||||
|
@ -5,6 +5,8 @@
|
||||
drop table if exists t1;
|
||||
--enable_warnings
|
||||
|
||||
--enable_prepare_warnings
|
||||
|
||||
--replace_result $default_engine DEFAULT_ENGINE $sys_datatype_expl SYS_DATATYPE NULL ''
|
||||
eval create table t1 (
|
||||
x1 int unsigned,
|
||||
@ -439,3 +441,4 @@ show create table t1;
|
||||
show create table t2;
|
||||
drop temporary table t2;
|
||||
drop table t1;
|
||||
--disable_prepare_warnings
|
||||
|
@ -314,7 +314,9 @@ create or replace table subchild (
|
||||
) engine=innodb;
|
||||
|
||||
insert into parent (value) values (23);
|
||||
--enable_prepare_warnings
|
||||
select id, value from parent into @id, @value;
|
||||
--disable_prepare_warnings
|
||||
insert into child values (default, @id, @value);
|
||||
insert into subchild values (default, @id, @value);
|
||||
|
||||
|
@ -52,7 +52,9 @@ drop view vt1_1;
|
||||
replace_result $sys_datatype_expl SYS_DATATYPE;
|
||||
eval create or replace table t1( id bigint primary key, a int, b int) with system versioning;
|
||||
insert into t1 values(1, 1, 1);
|
||||
--enable_prepare_warnings
|
||||
select row_start, row_end from t1 into @sys_start, @sys_end;
|
||||
--disable_prepare_warnings
|
||||
select id, a, b from t1;
|
||||
insert into t1 values(2, 2, 2);
|
||||
select id, a, b, row_start > @sys_start as C, row_end = @sys_end as D from t1 where id = 2;
|
||||
|
@ -4,6 +4,8 @@
|
||||
|
||||
call mtr.add_suppression("need more HISTORY partitions");
|
||||
|
||||
--enable_prepare_warnings
|
||||
|
||||
set system_versioning_alter_history=keep;
|
||||
--echo # Check conventional partitioning on temporal tables
|
||||
|
||||
@ -1073,6 +1075,8 @@ show create table t1;
|
||||
|
||||
drop tables t1;
|
||||
|
||||
--disable_prepare_warnings
|
||||
|
||||
--echo #
|
||||
--echo # End of 10.5 tests
|
||||
--echo #
|
||||
|
@ -1,7 +1,12 @@
|
||||
if (`SELECT $PS_PROTOCOL != 0`)
|
||||
{
|
||||
--skip Need regular protocol but ps-protocol was specified
|
||||
}
|
||||
--source suite/versioning/engines.inc
|
||||
--source suite/versioning/common.inc
|
||||
--source include/default_optimizer_switch.inc
|
||||
|
||||
--enable_prepare_warnings
|
||||
# test_01
|
||||
|
||||
--replace_result $sys_datatype_expl SYS_DATATYPE
|
||||
@ -475,5 +480,6 @@ drop table tmp1;
|
||||
drop tables x, x_p;
|
||||
|
||||
call verify_trt_dummy(34);
|
||||
--disable_prepare_warnings
|
||||
|
||||
-- source suite/versioning/common_finish.inc
|
||||
|
@ -22,13 +22,16 @@ insert into t1 (x, y) values
|
||||
(8, 108),
|
||||
(9, 109);
|
||||
set @t0= now(6);
|
||||
--enable_prepare_warnings
|
||||
select sys_start from t1 limit 1 into @x0;
|
||||
|
||||
--disable_prepare_warnings
|
||||
delete from t1 where x = 3;
|
||||
delete from t1 where x > 7;
|
||||
|
||||
insert into t1(x, y) values(3, 33);
|
||||
--enable_prepare_warnings
|
||||
select sys_start from t1 where x = 3 and y = 33 into @t1;
|
||||
--disable_prepare_warnings
|
||||
if($MTR_COMBINATION_TRX_ID) {
|
||||
set @x1= @t1;
|
||||
select trt_commit_ts(@x1) into @t1;
|
||||
|
@ -18,6 +18,8 @@ create or replace table t1 (
|
||||
period for system_time (sys_trx_start, sys_trx_end)
|
||||
) with system versioning;
|
||||
|
||||
--enable_prepare_warnings
|
||||
|
||||
--echo # No history inside the transaction
|
||||
start transaction;
|
||||
insert into t1 (x) values (1);
|
||||
@ -511,3 +513,5 @@ drop table t;
|
||||
uninstall plugin test_versioning;
|
||||
--error ER_SP_DOES_NOT_EXIST
|
||||
select trt_begin_ts(0);
|
||||
|
||||
--disable_prepare_warnings
|
||||
|
Reference in New Issue
Block a user