Debian Codegraph @

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

raw
1 CREATE SCHEMA xtest;
2 CREATE TABLE xtest.xtable (first INT, second JSON);
3 CREATE USER xuser@localhost;
4 CREATE VIEW xtest.xview AS SELECT first FROM xtest.xtable;
5 SHOW CREATE VIEW xtest.xview;
6 View Create View character_set_client collation_connection
7 xview CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `xtest`.`xview` AS select `xtest`.`xtable`.`first` AS `first` from `xtest`.`xtable` utf8mb4 utf8mb4_0900_ai_ci
8
9 Modify view (missing stmt)
10 --------------------------
11 Got expected error:
12 Mysqlx.Error {
13 severity: ERROR
14 code: 5012
15 msg: "The field that defines the select statement is required"
16 sql_state: "HY000"
17 }
18
19
20 Modify view (stmt)
21 ------------------
22 Mysqlx.Ok {
23 }
24
25 View Create View character_set_client collation_connection
26 xview CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `xtest`.`xview` AS select `xtest`.`xtable`.`second` AS `doc` from `xtest`.`xtable` utf8mb4 utf8mb4_0900_ai_ci
27 0 rows affected
28
29 Modify view (algorithm=temptable)
30 ---------------------------------
31 Mysqlx.Ok {
32 }
33
34 View Create View character_set_client collation_connection
35 xview CREATE ALGORITHM=TEMPTABLE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `xtest`.`xview` AS select `xtest`.`xtable`.`second` AS `doc` from `xtest`.`xtable` utf8mb4 utf8mb4_0900_ai_ci
36 0 rows affected
37
38 Modify view (algorithm=merge)
39 -----------------------------
40 Mysqlx.Ok {
41 }
42
43 View Create View character_set_client collation_connection
44 xview CREATE ALGORITHM=MERGE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `xtest`.`xview` AS select `xtest`.`xtable`.`second` AS `doc` from `xtest`.`xtable` utf8mb4 utf8mb4_0900_ai_ci
45 0 rows affected
46
47 Modify view (definer=xuser)
48 ---------------------------
49 Mysqlx.Ok {
50 }
51
52 View Create View character_set_client collation_connection
53 xview CREATE ALGORITHM=MERGE DEFINER=`xuser`@`localhost` SQL SECURITY DEFINER VIEW `xtest`.`xview` AS select `xtest`.`xtable`.`second` AS `doc` from `xtest`.`xtable` utf8mb4 utf8mb4_0900_ai_ci
54 0 rows affected
55
56 Modify view (security=invoker)
57 ------------------------------
58 Mysqlx.Ok {
59 }
60
61 View Create View character_set_client collation_connection
62 xview CREATE ALGORITHM=MERGE DEFINER=`xuser`@`localhost` SQL SECURITY INVOKER VIEW `xtest`.`xview` AS select `xtest`.`xtable`.`second` AS `doc` from `xtest`.`xtable` utf8mb4 utf8mb4_0900_ai_ci
63 0 rows affected
64
65 Modify view (security=definer)
66 ------------------------------
67 Mysqlx.Ok {
68 }
69
70 View Create View character_set_client collation_connection
71 xview CREATE ALGORITHM=MERGE DEFINER=`xuser`@`localhost` SQL SECURITY DEFINER VIEW `xtest`.`xview` AS select `xtest`.`xtable`.`second` AS `doc` from `xtest`.`xtable` utf8mb4 utf8mb4_0900_ai_ci
72 0 rows affected
73
74 Modify view (check=local)
75 -------------------------
76 Mysqlx.Ok {
77 }
78
79 View Create View character_set_client collation_connection
80 xview CREATE ALGORITHM=MERGE DEFINER=`xuser`@`localhost` SQL SECURITY DEFINER VIEW `xtest`.`xview` AS select `xtest`.`xtable`.`second` AS `doc` from `xtest`.`xtable` WITH LOCAL CHECK OPTION utf8mb4 utf8mb4_0900_ai_ci
81 0 rows affected
82
83 Modify view (check=cascaded)
84 ----------------------------
85 Mysqlx.Ok {
86 }
87
88 View Create View character_set_client collation_connection
89 xview CREATE ALGORITHM=MERGE DEFINER=`xuser`@`localhost` SQL SECURITY DEFINER VIEW `xtest`.`xview` AS select `xtest`.`xtable`.`second` AS `doc` from `xtest`.`xtable` WITH CASCADED CHECK OPTION utf8mb4 utf8mb4_0900_ai_ci
90 0 rows affected
91
92 Modify view (column)
93 --------------------
94 Mysqlx.Ok {
95 }
96
97 View Create View character_set_client collation_connection
98 xview CREATE ALGORITHM=MERGE DEFINER=`xuser`@`localhost` SQL SECURITY DEFINER VIEW `xtest`.`xview` (`third`) AS select `xtest`.`xtable`.`second` AS `doc` from `xtest`.`xtable` utf8mb4 utf8mb4_0900_ai_ci
99 0 rows affected
100
101 Modify view (too many columns)
102 ------------------------------
103 Mysqlx.Error {
104 severity: ERROR
105 code: 1353
106 msg: "In definition of view, derived table or common table expression, SELECT list and column names list have different column counts"
107 sql_state: "HY000"
108 }
109
110 View Create View character_set_client collation_connection
111 xview CREATE ALGORITHM=MERGE DEFINER=`xuser`@`localhost` SQL SECURITY DEFINER VIEW `xtest`.`xview` (`third`) AS select `xtest`.`xtable`.`second` AS `doc` from `xtest`.`xtable` utf8mb4 utf8mb4_0900_ai_ci
112 0 rows affected
113 Variable_name Value
114 Mysqlx_crud_modify_view 11
115 0 rows affected
116 Mysqlx.Ok {
117 msg: "bye!"
118 }
119 ok
120 include/assert.inc [Global status of 'Mysqlx_crud_modify_view']
121 DROP USER xuser@localhost;