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

Function db_is_default_db

sql/sql_lex.cc:2396–2400  ·  view source on GitHub ↗

@returns whether a database is equal to the connection's default database */

Source from the content-addressed store, hash-verified

2394 @returns whether a database is equal to the connection's default database
2395*/
2396bool db_is_default_db(const char *db, size_t db_len, const THD *thd)
2397{
2398 return thd != NULL && thd->db != NULL &&
2399 thd->db_length == db_len && !memcmp(db, thd->db, db_len);
2400}
2401
2402
2403/**

Callers 2

printMethod · 0.85
printMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected