Commit ccb0504f authored by Dmitry Shulga's avatar Dmitry Shulga Committed by Sergei Golubchik

MDEV-16708: fix in test failures caused by missing warnings received in prepare response packet

parent b126c3f3
......@@ -34,7 +34,6 @@ ERROR HY000: Incorrect usage of OR REPLACE and IF NOT EXISTS
# PACKAGE and PS
#
PREPARE stmt FROM 'CREATE PACKAGE test2 AS FUNCTION f1 RETURN INT; END test2';
ERROR HY000: This command is not supported in the prepared statement protocol yet
CREATE PACKAGE test2 AS
FUNCTION f1 RETURN INT;
END;
......@@ -42,7 +41,6 @@ $$
PREPARE stmt FROM 'CREATE PACKAGE BODY test2 AS'
' FUNCTION f1 RETURN INT AS BEGIN RETURN 10; END;'
'END test2';
ERROR HY000: This command is not supported in the prepared statement protocol yet
DROP PACKAGE test2;
#
# Package and READ ONLY transactions
......
......@@ -247,6 +247,7 @@ CALL comment();
CALL comment;
DROP PROCEDURE comment;
enable_prepare_warnings;
DELIMITER /;
CREATE FUNCTION comment RETURN INT COMMENT 'test' AS
BEGIN
......@@ -254,7 +255,6 @@ BEGIN
END;
/
DELIMITER ;/
enable_prepare_warnings;
SELECT test.comment() FROM DUAL;
disable_prepare_warnings;
DROP FUNCTION comment;
......@@ -570,8 +570,8 @@ call p1(1,2);
drop procedure p1;
delimiter //;
set sql_mode=ORACLE;
delimiter //;
create or replace procedure p1(id int, dt int) as
begin
while (1)
......
......@@ -2,6 +2,7 @@
SET sql_mode=ORACLE;
--enable_prepare_warnings
--echo #
--echo # Creating a body of a non-existing package
......@@ -49,7 +50,6 @@ DELIMITER ;$$
--echo # PACKAGE and PS
--echo #
--error ER_UNSUPPORTED_PS
PREPARE stmt FROM 'CREATE PACKAGE test2 AS FUNCTION f1 RETURN INT; END test2';
DELIMITER $$;
......@@ -58,7 +58,6 @@ CREATE PACKAGE test2 AS
END;
$$
DELIMITER ;$$
--error ER_UNSUPPORTED_PS
PREPARE stmt FROM 'CREATE PACKAGE BODY test2 AS'
' FUNCTION f1 RETURN INT AS BEGIN RETURN 10; END;'
'END test2';
......@@ -2689,3 +2688,4 @@ DELIMITER ;$$
CALL xyz.xyz123(17,18,@R);
DROP PACKAGE xyz;
DROP TABLE t1;
--disable_prepare_warnings
......@@ -15,6 +15,8 @@
--source include/not_embedded.inc
--source include/default_charset.inc
--enable_prepare_warnings
let $engine_type= MEMORY;
SET @@session.sql_mode = 'NO_ENGINE_SUBSTITUTION';
--source suite/funcs_1/datadict/datadict_load.inc
......@@ -23,4 +25,6 @@ SET @@session.sql_mode = 'NO_ENGINE_SUBSTITUTION';
let $my_where = WHERE table_schema LIKE 'test%';
--source suite/funcs_1/datadict/columns.inc
--disable_prepare_warnings
--source suite/funcs_1/include/cleanup.inc
......@@ -15,6 +15,8 @@
--source include/not_embedded.inc
--source include/default_charset.inc
--enable_prepare_warnings
let $engine_type= MyISAM;
SET @@session.sql_mode = 'NO_ENGINE_SUBSTITUTION';
--source suite/funcs_1/datadict/datadict_load.inc
......@@ -23,4 +25,6 @@ SET @@session.sql_mode = 'NO_ENGINE_SUBSTITUTION';
let $my_where = WHERE table_schema LIKE 'test%';
--source suite/funcs_1/datadict/columns.inc
--disable_prepare_warnings
--source suite/funcs_1/include/cleanup.inc
......@@ -10,6 +10,7 @@
#
############################################################################
--disable_ps_protocol
--source include/default_charset.inc
set sql_mode="";
......@@ -29547,3 +29548,4 @@ DROP TABLE IF EXISTS res_t1;
let $message= . +++ END OF SCRIPT +++;
--source include/show_msg80.inc
# ==============================================================================
--enable_ps_protocol
......@@ -22,9 +22,11 @@ let $wait_condition =
WHERE INFO="UPDATE bug51920 SET i=2";
-- source include/wait_condition.inc
--enable_prepare_warnings
SELECT ID FROM INFORMATION_SCHEMA.PROCESSLIST
WHERE INFO="UPDATE bug51920 SET i=2"
INTO @thread_id;
--disable_prepare_warnings
KILL @thread_id;
let $wait_condition =
......
......@@ -25,6 +25,8 @@ flush status;
# (select event_name from
# performance_schema.memory_summary_by_account_by_event_name));
--enable_prepare_warnings
delimiter $;
create procedure check_instrument(in instr_name varchar(128))
begin
......@@ -274,6 +276,8 @@ end
$
delimiter ;$
--disable_prepare_warnings
# Check the configuration is ok
show global variables like "performance_schema%";
......
......@@ -29,9 +29,11 @@ connection master;
# Read the ID of the binlog dump connection,
# as exposed in PROCESSLIST.
--enable_prepare_warnings
select ID from INFORMATION_SCHEMA.PROCESSLIST
where COMMAND = "Binlog Dump"
into @master_dump_pid;
--disable_prepare_warnings
select COMMAND, STATE
from INFORMATION_SCHEMA.PROCESSLIST
......@@ -47,9 +49,11 @@ sync_slave_with_master;
# Read the ID of the SLAVE IO thread,
# as exposed in PROCESSLIST.
--enable_prepare_warnings
select ID from INFORMATION_SCHEMA.PROCESSLIST
where STATE like "Waiting for master to send event%"
into @slave_io_pid;
--disable_prepare_warnings
select COMMAND, STATE
from INFORMATION_SCHEMA.PROCESSLIST
......@@ -62,9 +66,11 @@ select NAME, TYPE, PROCESSLIST_COMMAND, PROCESSLIST_STATE
# Read the ID of the SLAVE SQL thread,
# as exposed in PROCESSLIST.
--enable_prepare_warnings
select ID from INFORMATION_SCHEMA.PROCESSLIST
where STATE like "Slave has read all relay log%"
into @slave_sql_pid;
--disable_prepare_warnings
select COMMAND, STATE
from INFORMATION_SCHEMA.PROCESSLIST
......
......@@ -4,7 +4,9 @@
CREATE TABLE t1 (a INT, b INT, c INT, vc INT AS (c), UNIQUE(a), UNIQUE(b)) WITH SYSTEM VERSIONING;
INSERT IGNORE INTO t1 (a,b,c) VALUES (1,2,3);
--enable_prepare_warnings
SELECT a, b, c FROM t1 INTO OUTFILE '15330.data';
--disable_prepare_warnings
LOAD DATA INFILE '15330.data' IGNORE INTO TABLE t1 (a,b,c);
LOAD DATA INFILE '15330.data' REPLACE INTO TABLE t1 (a,b,c);
......
......@@ -57,7 +57,9 @@ show global variables like 'system_versioning_asof';
set global system_versioning_asof= '1900-01-01 00:00:00';
show global variables like 'system_versioning_asof';
--enable_prepare_warnings
set global system_versioning_asof= timestamp'1911-11-11 11:11:11.1111119';
--disable_prepare_warnings
show global variables like 'system_versioning_asof';
set @ts= timestamp'1900-01-01 00:00:00';
......@@ -74,7 +76,9 @@ show variables like 'system_versioning_asof';
set system_versioning_asof= '1900-01-01 00:00:00';
show variables like 'system_versioning_asof';
--enable_prepare_warnings
set system_versioning_asof= timestamp'1911-11-11 11:11:11.1111119';
--disable_prepare_warnings
show variables like 'system_versioning_asof';
set @ts= timestamp'1900-01-01 00:00:00';
......@@ -134,7 +138,9 @@ drop tables t1, t2;
--echo #
SET sql_mode=TIME_ROUND_FRACTIONAL;
--enable_prepare_warnings
SET @@global.system_versioning_asof= timestamp'2001-12-31 23:59:59.9999999';
--disable_prepare_warnings
SELECT @@global.system_versioning_asof;
SET @@global.system_versioning_asof= DEFAULT;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment