Commit 832e473d authored by Dmitry Shulga's avatar Dmitry Shulga

MDEV-26181: The test compat/oracle.sp-row fails in case it is run in PS mode.

There were several places where a statement delimiter missed so
such statements were interpreted as multi-statements and expectedly failed
in PS mode. An appropriate statement delimiters have been added
to fix the issues. Addinitinally, the operators
 --enable_prepare_warnings/--disable_prepare_warnings have been added
around statements that use depricated syntax SELECT INTO to don't
miss warnings.
parent fa45400d
...@@ -252,6 +252,7 @@ AS ...@@ -252,6 +252,7 @@ AS
BEGIN BEGIN
RETURN a; RETURN a;
END; END;
$$
CREATE PROCEDURE p1() CREATE PROCEDURE p1()
AS AS
a ROW (a INT,b INT); a ROW (a INT,b INT);
...@@ -268,6 +269,7 @@ AS ...@@ -268,6 +269,7 @@ AS
BEGIN BEGIN
RETURN a; RETURN a;
END; END;
$$
CREATE PROCEDURE p1() CREATE PROCEDURE p1()
AS AS
a ROW (a INT); a ROW (a INT);
......
if (`SELECT $PS_PROTOCOL != 0`)
{
--skip Test temporarily disabled for ps-protocol
}
SET sql_mode=ORACLE; SET sql_mode=ORACLE;
...@@ -329,6 +325,7 @@ AS ...@@ -329,6 +325,7 @@ AS
BEGIN BEGIN
RETURN a; RETURN a;
END; END;
$$
CREATE PROCEDURE p1() CREATE PROCEDURE p1()
AS AS
a ROW (a INT,b INT); a ROW (a INT,b INT);
...@@ -349,6 +346,7 @@ AS ...@@ -349,6 +346,7 @@ AS
BEGIN BEGIN
RETURN a; RETURN a;
END; END;
$$
CREATE PROCEDURE p1() CREATE PROCEDURE p1()
AS AS
a ROW (a INT); a ROW (a INT);
...@@ -866,6 +864,8 @@ DROP PROCEDURE p2; ...@@ -866,6 +864,8 @@ DROP PROCEDURE p2;
--echo # ROW fields as SELECT..INTO targets --echo # ROW fields as SELECT..INTO targets
--echo # --echo #
--enable_prepare_warnings
DELIMITER $$; DELIMITER $$;
CREATE PROCEDURE p1 CREATE PROCEDURE p1
AS AS
...@@ -879,6 +879,7 @@ DELIMITER ;$$ ...@@ -879,6 +879,7 @@ DELIMITER ;$$
CALL p1; CALL p1;
DROP PROCEDURE p1; DROP PROCEDURE p1;
--disable_prepare_warnings
--echo # --echo #
--echo # Implicit default NULL handling --echo # Implicit default NULL handling
...@@ -2088,6 +2089,7 @@ DROP PROCEDURE p1; ...@@ -2088,6 +2089,7 @@ DROP PROCEDURE p1;
--echo # --echo #
--enable_prepare_warnings
--echo # ROW variable with a wrong column count --echo # ROW variable with a wrong column count
CREATE TABLE t1 (a INT, b VARCHAR(32)); CREATE TABLE t1 (a INT, b VARCHAR(32));
INSERT INTO t1 VALUES (10,'b10'); INSERT INTO t1 VALUES (10,'b10');
...@@ -2248,7 +2250,7 @@ DELIMITER ;$$ ...@@ -2248,7 +2250,7 @@ DELIMITER ;$$
CALL p1(); CALL p1();
DROP TABLE t1; DROP TABLE t1;
DROP PROCEDURE p1; DROP PROCEDURE p1;
--disable_prepare_warnings
--echo # --echo #
--echo # MDEV-12347 Valgrind reports invalid read errors in Item_field_row::element_index_by_name --echo # MDEV-12347 Valgrind reports invalid read errors in Item_field_row::element_index_by_name
......
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