YoushouldhavereceivedacopyoftheGNUGeneralPublicLicense alongwiththisprogram;ifnot,writetotheFreeSoftware
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA */
HP_INFO *heap_open_from_share_and_register(HP_SHARE *share, int mode)
{
HP_INFO *info;
DBUG_ENTER("heap_open_from_share_and_register");
mysql_mutex_lock(&THR_LOCK_heap); if ((info= heap_open_from_share(share, mode)))
{
info->open_list.data= (void*) info;
heap_open_list= list_add(heap_open_list,&info->open_list); /* Unpin the share, it is now pinned by the file. */
share->open_count--;
}
mysql_mutex_unlock(&THR_LOCK_heap);
DBUG_RETURN(info);
}
/** DereferenceaHEAPshareandfreeitifit'snotreferenced. Wedon'tcheckopen_countforinternaltablessincethey arealwaysthread-local,i.e.referencedbyasinglethread.
*/ void heap_release_share(HP_SHARE *share, my_bool internal_table)
{ /* Couldn't open table; Remove the newly created table */ if (internal_table)
hp_free(share); else
{
mysql_mutex_lock(&THR_LOCK_heap); if (--share->open_count == 0)
hp_free(share);
mysql_mutex_unlock(&THR_LOCK_heap);
}
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.