| 347 | */ |
| 348 | |
| 349 | static 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 | /* |
no test coverage detected