Debian Codegraph @

mysql-test/suite/x/t/macros/test_multiple_resultsets_mysqlx_prepare.macro

raw
1 ## Following macros are defined in this file:
2 #
3 # * Test_assert_user_variable
4 # * Test_reset_variables
5 # * Test_prepare_and_execute_proc_arg0
6 # * Test_prepare_and_execute_proc_arg1
7 # * Test_prepare_and_execute_proc_arg2
8 #
9
10
11 -->macro Test_assert_user_variable %VAR_NAME% %IGNORE%
12 callmacro Assert_user_variable %VAR_NAME% -1;
13 -->endmacro
14
15
16 -->macro Test_reset_variables
17 noquery_result;
18 echo [Reseting test variables];
19 SET @res=-1;
20 SET @min_val=-1;
21 SET @max_val=-1;
22 SET @in_val=5;
23 query_result;
24 -->endmacro
25
26
27 -->macro_varg Test_prepare_and_execute_proc_arg0 %PROC_NAME%
28 quiet;
29 noquery_result;
30 echo [Prepare and execute %PROC_NAME%];
31 Mysqlx.Prepare.Prepare {
32 stmt_id: 1
33 stmt: {
34 type: STMT
35 stmt_execute: {
36 stmt: 'CALL xtest.%PROC_NAME%'
37 }
38 }
39 }
40 -->recvtype Mysqlx.Ok
41 Mysqlx.Prepare.Execute {
42 stmt_id: 1
43 }
44 noquiet;
45 query_result;
46 %VAR_ARGS%
47 -->recvresult
48 -->endmacro
49
50
51 -->macro_varg Test_prepare_and_execute_proc_arg1 %PROC_NAME% %OUT_PARAM1%
52 quiet;
53 noquery_result;
54 echo [Prepare and execute %PROC_NAME%];
55 Mysqlx.Prepare.Prepare {
56 stmt_id: 1
57 stmt: {
58 type: STMT
59 stmt_execute: {
60 stmt: 'CALL xtest.%PROC_NAME%'
61 }
62 }
63 }
64 -->recvtype Mysqlx.Ok
65 Mysqlx.Prepare.Execute {
66 stmt_id: 1
67 args {
68 type: SCALAR scalar {
69 type: V_STRING v_string {
70 value: "%OUT_PARAM1%"
71 }
72 }
73 }
74 }
75 noquiet;
76 query_result;
77 %VAR_ARGS%
78 -->recvresult
79 -->endmacro
80
81
82 -->macro_varg Test_prepare_and_execute_proc_arg2 %PROC_NAME% %OUT_PARAM1% %OUT_PARAM2%
83 quiet;
84 noquery_result;
85 echo [Prepare and execute %PROC_NAME%];
86 Mysqlx.Prepare.Prepare {
87 stmt_id: 1
88 stmt: {
89 type: STMT
90 stmt_execute: {
91 stmt: 'CALL xtest.%PROC_NAME%'
92 }
93 }
94 }
95 -->recvtype Mysqlx.Ok
96 Mysqlx.Prepare.Execute {
97 stmt_id: 1
98 args {
99 type: SCALAR scalar {
100 type: V_STRING v_string {
101 value: "%OUT_PARAM1%"
102 }
103 }
104 }
105 args {
106 type: SCALAR scalar {
107 type: V_STRING v_string {
108 value: "%OUT_PARAM2%"
109 }
110 }
111 }
112 }
113 noquiet;
114 query_result;
115 %VAR_ARGS%
116 -->recvresult
117 -->endmacro