Debian Codegraph @

mysql-test/suite/compat/oracle/r/variables.result

raw
1 SET sql_mode=oracle;
2 #
3 # MDEV-10411 Providing compatibility for basic PL/SQL constructs
4 # Part 6: Assignment operator
5 #
6 max_sort_length:=1030;
7 SELECT @@max_sort_length;
8 @@max_sort_length
9 1030
10 max_sort_length:=DEFAULT;
11 #
12 # Testing that SP variables shadow global variables in assignments
13 #
14 CREATE PROCEDURE p1
15 AS
16 BEGIN
17 max_sort_length:=1030;
18 DECLARE
19 max_sort_length INT DEFAULT 1031;
20 BEGIN
21 SELECT @@max_sort_length, max_sort_length;
22 max_sort_length:=1032;
23 SELECT @@max_sort_length, max_sort_length;
24 END;
25 SELECT @@max_sort_length;
26 max_sort_length:= DEFAULT;
27 END;
28 $$
29 CALL p1();
30 @@max_sort_length max_sort_length
31 1030 1031
32 @@max_sort_length max_sort_length
33 1030 1032
34 @@max_sort_length
35 1030
36 DROP PROCEDURE p1;
37 #
38 # End of MDEV-10411 Providing compatibility for basic PL/SQL constructs (part 6)
39 #