~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_base.cc

  • Committer: Brian Aker
  • Date: 2010-02-26 17:18:21 UTC
  • mto: (1309.2.7 fix_is)
  • mto: This revision was merged to the branch mainline in revision 1313.
  • Revision ID: brian@gaz-20100226171821-xy2lgitcqnytglsg
Baby steps.

Show diffs side-by-side

added added

removed removed

Lines of Context:
4457
4457
and afterwards delete those marked unused.
4458
4458
*/
4459
4459
 
4460
 
void remove_db_from_cache(const char *db)
 
4460
void remove_db_from_cache(const std::string schema_name)
4461
4461
{
4462
4462
  safe_mutex_assert_owner(&LOCK_open);
4463
4463
 
4464
4464
  for (uint32_t idx=0 ; idx < open_cache.records ; idx++)
4465
4465
  {
4466
4466
    Table *table=(Table*) hash_element(&open_cache,idx);
4467
 
    if (not strcmp(table->s->db.str, db))
 
4467
    if (not strcmp(table->s->db.str, schema_name.c_str()))
4468
4468
    {
4469
4469
      table->s->version= 0L;                    /* Free when thread is ready */
4470
4470
      if (not table->in_use)