Debian Codegraph @

mysql-test/suite/x/r/prep_stmt_crud_insert_table.result

raw
1 CREATE SCHEMA IF NOT EXISTS xtest;
2 USE xtest;
3 CREATE TABLE xtable (phrase VARCHAR(30));
4
5 Stmt 1: Prepare malformed insert stmt (no schema)
6 =================================================
7 Got expected error:
8 Mysqlx.Error {
9 severity: ERROR
10 code: 1049
11 msg: "Unknown database \'nonexistent\'"
12 sql_state: "42000"
13 }
14
15 Verify [Status variable "Mysqlx_prep_prepare" needs to have a value of 1]
16
17 Stmt 1: Try to execute
18 ======================
19 Got expected error: Statement with ID=1 was not prepared (code 5110)
20 Verify [Status variable "Mysqlx_prep_execute" needs to have a value of 1]
21
22 Stmt 1: Try to deallocate
23 =========================
24 Got expected error:
25 Mysqlx.Error {
26 severity: ERROR
27 code: 5110
28 msg: "Statement with ID=1 was not prepared"
29 sql_state: "HY000"
30 }
31
32 Verify [Status variable "Mysqlx_prep_deallocate" needs to have a value of 1]
33
34 Stmt 2: Prepare correct insert stmt (no placeholders)
35 =====================================================
36 RUN recvok
37 Verify [Status variable "Mysqlx_prep_prepare" needs to have a value of 2]
38
39 Stmt 2: Execute (no params)
40 ===========================
41
42 1 rows affected
43 Verify ["SELECT count(*) as count FROM xtest.xtable WHERE phrase LIKE 'Alice%'" returns in "count" column, following value 1]
44 Verify [Status variable "Mysqlx_prep_execute" needs to have a value of 2]
45
46 Stmt 2: Deallocate
47 ==================
48 RUN recvok
49
50 Stmt 3: Prepare correct stmt (one placeholder)
51 ==============================================
52 RUN recvok
53 Verify [Status variable "Mysqlx_prep_prepare" needs to have a value of 3]
54
55 Stmt 3: Try to execute (no params)
56 ==================================
57 Got expected error: There is no argument for statement placeholder at position: 0 (code 5134)
58 Verify [Status variable "Mysqlx_prep_execute" needs to have a value of 3]
59
60 Stmt 3: Execute with param
61 ==========================
62
63 1 rows affected
64 Verify ["SELECT count(*) as count FROM xtest.xtable WHERE phrase LIKE 'Bob%'" returns in "count" column, following value 1]
65 Verify [Status variable "Mysqlx_prep_execute" needs to have a value of 4]
66
67 Stmt 3: Execute with params (one extra to ignore)
68 =================================================
69
70 1 rows affected
71 Verify ["SELECT count(*) as count FROM xtest.xtable WHERE phrase LIKE 'Christina%'" returns in "count" column, following value 1]
72 Verify [Status variable "Mysqlx_prep_execute" needs to have a value of 5]
73
74 Stmt 3: Deallocate
75 ==================
76 RUN recvok
77 Verify [Status variable "Mysqlx_prep_deallocate" needs to have a value of 3]
78
79 Stmt 4: Prepare correct stmt (two placeholders)
80 ===============================================
81 RUN recvok
82 Verify [Status variable "Mysqlx_prep_prepare" needs to have a value of 4]
83
84 Stmt 4: Execute with params
85 ===========================
86
87 2 rows affected
88 Records: 2 Duplicates: 0 Warnings: 0
89 Verify ["SELECT count(*) as count FROM xtest.xtable WHERE phrase LIKE 'David%'" returns in "count" column, following value 1]
90 Verify ["SELECT count(*) as count FROM xtest.xtable WHERE phrase LIKE 'Eva%'" returns in "count" column, following value 1]
91 Verify [Status variable "Mysqlx_prep_execute" needs to have a value of 6]
92
93 Stmt 4: Deallocate
94 ==================
95 RUN recvok
96 Verify [Status variable "Mysqlx_prep_deallocate" needs to have a value of 4]
97
98 Stmt 5: Prepare correct stmt (two placeholders in expr)
99 =======================================================
100 RUN recvok
101 Verify [Status variable "Mysqlx_prep_prepare" needs to have a value of 5]
102
103 Stmt 5: Execute with params
104 ===========================
105
106 1 rows affected
107 Verify ["SELECT count(*) as count FROM xtest.xtable WHERE phrase LIKE 'Felix%'" returns in "count" column, following value 1]
108 Verify [Status variable "Mysqlx_prep_execute" needs to have a value of 7]
109
110 Stmt 5: Deallocate
111 ==================
112 RUN recvok
113 Verify [Status variable "Mysqlx_prep_deallocate" needs to have a value of 5]
114 Mysqlx.Ok {
115 msg: "bye!"
116 }
117 ok