Skip to content

Commit

Permalink
The revision corresponds to the review comments. 1. Move the unit tes…
Browse files Browse the repository at this point in the history
…ts into the compat/oracle suite, sp-param.test file. 2. Remove the added unit test file and result file. 3. Add type, Alter_info::enum_alter_table_algorithm, into the union. 4. Remove the extra switch case
  • Loading branch information
wong-github1 authored and FooBarrior committed Oct 3, 2024
1 parent 2802732 commit 443866c
Show file tree
Hide file tree
Showing 5 changed files with 230 additions and 241 deletions.
103 changes: 0 additions & 103 deletions mysql-test/main/sp-ignore_nocopy.result

This file was deleted.

121 changes: 0 additions & 121 deletions mysql-test/main/sp-ignore_nocopy.test

This file was deleted.

104 changes: 104 additions & 0 deletions mysql-test/suite/compat/oracle/r/sp-param.result
Original file line number Diff line number Diff line change
Expand Up @@ -423,3 +423,107 @@ ERROR 22001: Data too long for column 'pin' at row 0
DROP PROCEDURE p2;
DROP FUNCTION f1;
ALTER DATABASE test CHARACTER SET utf8mb4 COLLATE utf8mb4_uca1400_ai_ci;
#
# MDEV-34316 sql_mode=ORACLE: Ignore the NOCOPY keyword in stored routine parameters
#
SET sql_mode=ORACLE;
#
# sql_mode=ORACLE. Test with function
#
CREATE OR REPLACE FUNCTION example_func(
p_in1 IN VARCHAR(255),
p_in2 IN NOCOPY VARCHAR(255),
p_out1 OUT INT,
p_out2 OUT NOCOPY INT,
p_in_out1 IN OUT VARCHAR(255),
p_in_out2 IN OUT NOCOPY VARCHAR(255),
p_in_out3 INOUT NUMBER,
p_in_out4 INOUT NOCOPY NUMBER) RETURN NUMBER AS
BEGIN
RETURN 0;
END;
/
DROP FUNCTION example_func;
#
# sql_mode=ORACLE. Test with procedure
#
CREATE OR REPLACE PROCEDURE example_proc(
p_in1 IN VARCHAR(255),
p_in2 IN NOCOPY VARCHAR(255),
p_out1 OUT INT,
p_out2 OUT NOCOPY INT,
p_in_out1 IN OUT VARCHAR(255),
p_in_out2 IN OUT NOCOPY VARCHAR(255),
p_in_out3 INOUT NUMBER,
p_in_out4 INOUT NOCOPY NUMBER) AS
BEGIN
END;
/
DROP PROCEDURE example_proc;
SET sql_mode=DEFAULT;
#
# sql_mode=DEFAULT to perform the negative test case. Test with function, IN NOCOPY
#
CREATE OR REPLACE FUNCTION example_func(IN NOCOPY p_in INT) RETURNS INT
BEGIN
RETURN 0;
END;
$$
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'NOCOPY p_in INT) RETURNS INT
BEGIN
RETURN 0;
END' at line 1
#
# sql_mode=DEFAULT to perform the negative test case. Test with function, OUT NOCOPY
#
CREATE OR REPLACE FUNCTION example_func(OUT NOCOPY p_out INT) RETURNS INT
BEGIN
RETURN 0;
END;
$$
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'NOCOPY p_out INT) RETURNS INT
BEGIN
RETURN 0;
END' at line 1
#
# sql_mode=DEFAULT to perform the negative test case. Test with function, INOUT NOCOPY
#
CREATE OR REPLACE FUNCTION example_func(INOUT NOCOPY p_inout INT) RETURNS INT
BEGIN
RETURN 0;
END;
$$
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'NOCOPY p_inout INT) RETURNS INT
BEGIN
RETURN 0;
END' at line 1
#
# sql_mode=DEFAULT to perform the negative test case. Test with procedure, IN NOCOPY
#
CREATE OR REPLACE PROCEDURE example_proc(IN NOCOPY p_in INT)
BEGIN
END;
$$
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'NOCOPY p_in INT)
BEGIN
END' at line 1
#
# sql_mode=DEFAULT to perform the negative test case. Test with procedure, OUT NOCOPY
#
CREATE OR REPLACE PROCEDURE example_proc(OUT NOCOPY p_out INT)
BEGIN
END;
$$
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'NOCOPY p_out INT)
BEGIN
END' at line 1
#
# sql_mode=DEFAULT to perform the negative test case. Test with procedure, INOUT NOCOPY
#
CREATE OR REPLACE PROCEDURE example_proc(INOUT NOCOPY p_inout INT)
BEGIN
END;
$$
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'NOCOPY p_inout INT)
BEGIN
END' at line 1
Loading

0 comments on commit 443866c

Please sign in to comment.