MCPcopy Create free account
hub / github.com/Meituan-Dianping/SQLAdvisor / copy_db_to

Method copy_db_to

sql/sql_lex.cc:3024–3040  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3022*/
3023
3024bool
3025LEX::copy_db_to(char **p_db, size_t *p_db_length) const
3026{
3027 if (sphead)
3028 {
3029 DBUG_ASSERT(sphead->m_db.str && sphead->m_db.length);
3030 /*
3031 It is safe to assign the string by-pointer, both sphead and
3032 its statements reside in the same memory root.
3033 */
3034 *p_db= sphead->m_db.str;
3035 if (p_db_length)
3036 *p_db_length= sphead->m_db.length;
3037 return FALSE;
3038 }
3039 return thd->copy_db_to(p_db, p_db_length);
3040}
3041
3042/**
3043 @brief Set the initial purpose of this TABLE_LIST object in the list of used

Callers 2

create_funcMethod · 0.45
add_table_to_listMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected