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

Function get_dbopt

sql/sql_db.cc:349–371  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

347*/
348
349static my_bool get_dbopt(THD *thd, const char *dbname,
350 Schema_specification_st *create)
351{
352 my_dbopt_t *opt;
353 uint length;
354 my_bool error= 1;
355
356 length= (uint) strlen(dbname);
357
358 mysql_rwlock_rdlock(&LOCK_dboptions);
359 if ((opt= (my_dbopt_t*) my_hash_search(&dboptions, (uchar*) dbname, length)))
360 {
361 create->default_table_charset= opt->charset;
362 if (opt->comment.length)
363 {
364 create->schema_comment= thd->make_clex_string(opt->comment.str,
365 opt->comment.length);
366 }
367 error= 0;
368 }
369 mysql_rwlock_unlock(&LOCK_dboptions);
370 return error;
371}
372
373
374/*

Callers 1

load_db_optFunction · 0.85

Calls 2

my_hash_searchFunction · 0.85
make_clex_stringMethod · 0.80

Tested by

no test coverage detected