MXS-1196: Add Oracle specific tests
Copied from .../server/mysql-test/suite/compat/oracle/t Will be used as a baseline and edited as needed.
This commit is contained in:
38
query_classifier/test/oracle/variables.test
Normal file
38
query_classifier/test/oracle/variables.test
Normal file
@ -0,0 +1,38 @@
|
||||
SET sql_mode=oracle;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-10411 Providing compatibility for basic PL/SQL constructs
|
||||
--echo # Part 6: Assignment operator
|
||||
--echo #
|
||||
|
||||
max_sort_length:=1030;
|
||||
SELECT @@max_sort_length;
|
||||
max_sort_length:=DEFAULT;
|
||||
|
||||
--echo #
|
||||
--echo # Testing that SP variables shadow global variables in assignments
|
||||
--echo #
|
||||
|
||||
DELIMITER $$;
|
||||
CREATE PROCEDURE p1
|
||||
AS
|
||||
BEGIN
|
||||
max_sort_length:=1030;
|
||||
DECLARE
|
||||
max_sort_length INT DEFAULT 1031;
|
||||
BEGIN
|
||||
SELECT @@max_sort_length, max_sort_length;
|
||||
max_sort_length:=1032;
|
||||
SELECT @@max_sort_length, max_sort_length;
|
||||
END;
|
||||
SELECT @@max_sort_length;
|
||||
max_sort_length:= DEFAULT;
|
||||
END;
|
||||
$$
|
||||
DELIMITER ;$$
|
||||
CALL p1();
|
||||
DROP PROCEDURE p1;
|
||||
|
||||
--echo #
|
||||
--echo # End of MDEV-10411 Providing compatibility for basic PL/SQL constructs (part 6)
|
||||
--echo #
|
Reference in New Issue
Block a user