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

Method resolve_current_schema

sql/sql_path.cc:22–31  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

20
21
22Lex_ident_db Sql_path::resolve_current_schema(THD *thd, sp_head *caller,
23 size_t i) const
24{
25 /* Resolve CURRENT_SCHEMA to actual database name. */
26 if (caller && caller->m_name.str)
27 return thd->to_ident_db_normalized_with_error(caller->m_db);
28 if (thd->db.str || thd->lex->sphead)
29 return thd->copy_db_normalized();
30 return {nullptr, 0};
31}
32
33
34bool Sql_path::try_resolve_in_schema(THD *thd, const Lex_ident_db_normalized &schema,

Callers

nothing calls this directly

Calls 2

copy_db_normalizedMethod · 0.45

Tested by

no test coverage detected