MCPcopy Create free account
hub / github.com/MariaDB/server / tdc_open_view

Function tdc_open_view

sql/sql_base.cc:3268–3300  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3266*/
3267
3268bool tdc_open_view(THD *thd, TABLE_LIST *table_list, uint flags)
3269{
3270 TABLE not_used;
3271 TABLE_SHARE *share;
3272 bool err= TRUE;
3273
3274 if (!(share= tdc_acquire_share(thd, table_list, GTS_VIEW)))
3275 return TRUE;
3276
3277 DBUG_ASSERT(share->is_view);
3278
3279 err= mysql_make_view(thd, share, table_list, (flags & OPEN_VIEW_NO_PARSE));
3280
3281 if (!err && (flags & CHECK_METADATA_VERSION))
3282 {
3283 /*
3284 Check TABLE_SHARE-version of view only if we have been instructed to do
3285 so. We do not need to check the version if we're executing CREATE VIEW or
3286 ALTER VIEW statements.
3287
3288 In the future, this functionality should be moved out from
3289 tdc_open_view(), and tdc_open_view() should became a part of a clean
3290 table-definition-cache interface.
3291 */
3292 if (check_and_update_table_version(thd, table_list, share))
3293 goto ret;
3294 }
3295
3296ret:
3297 tdc_release_share(share);
3298
3299 return err;
3300}
3301
3302
3303/**

Callers 2

is_locked_viewFunction · 0.85
fill_defined_view_partsFunction · 0.85

Calls 4

tdc_acquire_shareFunction · 0.85
mysql_make_viewFunction · 0.85
tdc_release_shareFunction · 0.85

Tested by

no test coverage detected