Skip to content

Commit 832e473

Browse files
committed
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.
1 parent fa45400 commit 832e473

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

mysql-test/suite/compat/oracle/r/sp-row.result

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,7 @@ AS
252252
BEGIN
253253
RETURN a;
254254
END;
255+
$$
255256
CREATE PROCEDURE p1()
256257
AS
257258
a ROW (a INT,b INT);
@@ -268,6 +269,7 @@ AS
268269
BEGIN
269270
RETURN a;
270271
END;
272+
$$
271273
CREATE PROCEDURE p1()
272274
AS
273275
a ROW (a INT);

mysql-test/suite/compat/oracle/t/sp-row.test

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
if (`SELECT $PS_PROTOCOL != 0`)
2-
{
3-
--skip Test temporarily disabled for ps-protocol
4-
}
51

62
SET sql_mode=ORACLE;
73

@@ -329,6 +325,7 @@ AS
329325
BEGIN
330326
RETURN a;
331327
END;
328+
$$
332329
CREATE PROCEDURE p1()
333330
AS
334331
a ROW (a INT,b INT);
@@ -349,6 +346,7 @@ AS
349346
BEGIN
350347
RETURN a;
351348
END;
349+
$$
352350
CREATE PROCEDURE p1()
353351
AS
354352
a ROW (a INT);
@@ -866,6 +864,8 @@ DROP PROCEDURE p2;
866864
--echo # ROW fields as SELECT..INTO targets
867865
--echo #
868866

867+
--enable_prepare_warnings
868+
869869
DELIMITER $$;
870870
CREATE PROCEDURE p1
871871
AS
@@ -879,6 +879,7 @@ DELIMITER ;$$
879879
CALL p1;
880880
DROP PROCEDURE p1;
881881

882+
--disable_prepare_warnings
882883

883884
--echo #
884885
--echo # Implicit default NULL handling
@@ -2088,6 +2089,7 @@ DROP PROCEDURE p1;
20882089
--echo #
20892090

20902091

2092+
--enable_prepare_warnings
20912093
--echo # ROW variable with a wrong column count
20922094
CREATE TABLE t1 (a INT, b VARCHAR(32));
20932095
INSERT INTO t1 VALUES (10,'b10');
@@ -2248,7 +2250,7 @@ DELIMITER ;$$
22482250
CALL p1();
22492251
DROP TABLE t1;
22502252
DROP PROCEDURE p1;
2251-
2253+
--disable_prepare_warnings
22522254

22532255
--echo #
22542256
--echo # MDEV-12347 Valgrind reports invalid read errors in Item_field_row::element_index_by_name

0 commit comments

Comments
 (0)