Fixed mutex problem in TRUNCATE TABLE

Docs/manual.texi:
  Changelog
sql/mysqld.cc:
  Portability fix
This commit is contained in:
unknown 2002-06-04 22:59:12 +03:00
commit 532c5a78fb
4 changed files with 137 additions and 3 deletions

View file

@ -573,9 +573,15 @@ end:
}
send_ok(&thd->net); // This should return record count
}
VOID(pthread_mutex_lock(&LOCK_open));
unlock_table_name(thd, table_list);
VOID(pthread_mutex_unlock(&LOCK_open));
}
else if (error)
{
VOID(pthread_mutex_lock(&LOCK_open));
unlock_table_name(thd, table_list);
VOID(pthread_mutex_unlock(&LOCK_open));
}
DBUG_RETURN(error ? -1 : 0);
}