File tree Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -66,6 +66,7 @@ TEST_F(xapi, view_ddl_test)
66
66
EXPECT_EQ (RESULT_OK, mysqlx_set_view_algorithm (vstmt, VIEW_ALGORITHM_MERGE));
67
67
EXPECT_EQ (RESULT_OK, mysqlx_set_view_security (vstmt, VIEW_SECURITY_INVOKER));
68
68
EXPECT_EQ (RESULT_OK, mysqlx_set_view_check_option (vstmt, VIEW_CHECK_OPTION_CASCADED));
69
+ EXPECT_EQ (RESULT_OK, mysqlx_set_view_definer (vstmt, NULL ));
69
70
EXPECT_EQ (RESULT_OK, mysqlx_set_view_definer (vstmt, " root" ));
70
71
71
72
// Change parent SELECT STMT, it is not supposed to affect the VIEW STMT in any way
Original file line number Diff line number Diff line change @@ -99,8 +99,15 @@ void View_spec::set_check(int val)
99
99
100
100
void View_spec::set_definer (const char * val)
101
101
{
102
- m_opts.m_definer_set = true ;
103
- m_opts.m_definer = val;
102
+ if (val)
103
+ {
104
+ m_opts.m_definer_set = true ;
105
+ m_opts.m_definer = val;
106
+ }
107
+ else
108
+ { // If definer = NULL, we will not report it
109
+ m_opts.m_definer_set = false ;
110
+ }
104
111
}
105
112
106
113
void View_spec::set_columns (va_list args)
@@ -138,4 +145,4 @@ void View_spec::View_opts::process(Processor &prc) const
138
145
139
146
if (m_definer_set)
140
147
prc.definer (m_definer);
141
- }
148
+ }
You can’t perform that action at this time.
0 commit comments