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

Function get_dbopt

sql/sql_db.cc:175–191  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

173*/
174
175static my_bool get_dbopt(const char *dbname, HA_CREATE_INFO *create)
176{
177 my_dbopt_t *opt;
178 uint length;
179 my_bool error= 1;
180
181 length= (uint) strlen(dbname);
182
183 mysql_rwlock_rdlock(&LOCK_dboptions);
184 if ((opt= (my_dbopt_t*) my_hash_search(&dboptions, (uchar*) dbname, length)))
185 {
186 create->default_table_charset= opt->charset;
187 error= 0;
188 }
189 mysql_rwlock_unlock(&LOCK_dboptions);
190 return error;
191}
192
193
194/*

Callers 1

load_db_optFunction · 0.85

Calls 1

my_hash_searchFunction · 0.85

Tested by

no test coverage detected