| 3022 | */ |
| 3023 | |
| 3024 | bool |
| 3025 | LEX::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 |
no outgoing calls
no test coverage detected