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

Method reset_db

sql/sql_class.cc:1686–1697  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1684*/
1685
1686void THD::reset_db(const LEX_CSTRING *new_db)
1687{
1688 if (new_db->str != db.str || new_db->length != db.length)
1689 {
1690 if (db.str != 0)
1691 DBUG_PRINT("QQ", ("Overwriting: %p", db.str));
1692 mysql_mutex_lock(&LOCK_thd_data);
1693 db= *new_db;
1694 mysql_mutex_unlock(&LOCK_thd_data);
1695 PSI_CALL_set_thread_db(db.str, (int) db.length);
1696 }
1697}
1698
1699
1700/* Do operations that may take a long time */

Callers 15

rpl_parallel.ccFile · 0.80
check_n_loadMethod · 0.80
mysql_change_db_implFunction · 0.80
handle_slave_ioFunction · 0.80
handle_slave_sqlFunction · 0.80
sql_parse.ccFile · 0.80
Db_restore_ctxMethod · 0.80
~Db_restore_ctxMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected