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