mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Fixed all BUILD scripts to use g++ instead of gcc for linking
Fixed memory leak from HEAP tables that was not deleted properly BUILD/compile-alpha-ccc: Use g++ instead of gcc for linking BUILD/compile-alpha-debug: Use g++ instead of gcc for linking BUILD/compile-pentium-pgcc: Use g++ instead of gcc for linking BUILD/compile-solaris-sparc: Use g++ instead of gcc for linking BUILD/compile-solaris-sparc-debug: Use g++ instead of gcc for linking BUILD/compile-solaris-sparc-purify: Use g++ instead of gcc for linking sql/item.cc: Safety fixes for expr_cache Call Item_result:field::cleanup() in Item_cache_wrapper::cleanup() More DBUG_PRINT sql/sql_base.cc: Simple optimization for setup_wild More DBUG_PRINT sql/sql_expression_cache.cc: Added header Removed not needed initialization sql/sql_lex.cc: More DBUG_PRINT sql/sql_select.cc: More DBUG_PRINT Fixed memory leak from HEAP tables that was not deleted properly storage/heap/hp_create.c: More DBUG_PRINT
This commit is contained in:
@ -39,6 +39,10 @@ int heap_create(const char *name, uint keys, HP_KEYDEF *keydef,
|
||||
share= 0;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
DBUG_PRINT("info", ("Creating internal (no named) temporary table"));
|
||||
}
|
||||
|
||||
if (!share)
|
||||
{
|
||||
@ -255,10 +259,15 @@ static void init_block(HP_BLOCK *block, uint reclength, ulong min_records,
|
||||
|
||||
static inline void heap_try_free(HP_SHARE *share)
|
||||
{
|
||||
DBUG_ENTER("heap_try_free");
|
||||
if (share->open_count == 0)
|
||||
hp_free(share);
|
||||
else
|
||||
{
|
||||
DBUG_PRINT("info", ("Table is still in use. Will be freed on close"));
|
||||
share->delete_on_close= 1;
|
||||
}
|
||||
DBUG_VOID_RETURN;
|
||||
}
|
||||
|
||||
|
||||
@ -277,6 +286,7 @@ int heap_delete_table(const char *name)
|
||||
else
|
||||
{
|
||||
result= my_errno=ENOENT;
|
||||
DBUG_PRINT("error", ("Could not find table '%s'", name));
|
||||
}
|
||||
pthread_mutex_unlock(&THR_LOCK_heap);
|
||||
DBUG_RETURN(result);
|
||||
|
Reference in New Issue
Block a user