1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

Set --debug-check if one uses DBUG_PUSH in all clients

Fixed bug in query cache that made it impossible to run mysqld with --debug
Fixed memory leaks in mysqldump and mysqltest
Memory leaks associated with wrong usage of mysqltest is not fixed. To find these, run
mysql-test-run --debug mysqltest


client/mysql_upgrade.c:
  Set --debug-check if one uses DBUG_PUSH
client/mysqlcheck.c:
  Set --debug-check if one uses DBUG_PUSH
client/mysqldump.c:
  Set --debug-check if one uses DBUG_PUSH
  Fixed several memory leaks
client/mysqlimport.c:
  Set --debug-check if one uses DBUG_PUSH
client/mysqlshow.c:
  Set --debug-check if one uses DBUG_PUSH
client/mysqlslap.c:
  Set --debug-check if one uses DBUG_PUSH
client/mysqltest.c:
  Set --debug-check if one uses DBUG_PUSH
  Fixed some memory leaks
  Removed MY_CHECK_ERROR argument to my_end() as mysqltest.test otherwise shows MANY memory leaks
dbug/dbug.c:
  Fixed compiler warning
  Force flush of out_file on end
  Removed some wrong dbug_flush(0) commands that could cause crashes
mysys/my_init.c:
  Don't write memory usage if MY_GIVE_INFO is not given
sql/sql_cache.cc:
  Fixed bug in query cache that made it impossible to run mysqld with --debug
This commit is contained in:
unknown
2007-08-02 07:49:29 +03:00
parent 0c9a3e597d
commit f9ea427508
10 changed files with 72 additions and 33 deletions

View File

@ -862,6 +862,7 @@ Query_cache::Query_cache(ulong query_cache_limit_arg,
ulong Query_cache::resize(ulong query_cache_size_arg)
{
ulong new_query_cache_size;
DBUG_ENTER("Query_cache::resize");
DBUG_PRINT("qcache", ("from %lu to %lu",query_cache_size,
query_cache_size_arg));
@ -876,13 +877,13 @@ ulong Query_cache::resize(ulong query_cache_size_arg)
free_cache();
query_cache_size= query_cache_size_arg;
ulong new_query_cache_size= init_cache();
DBUG_EXECUTE("check_querycache",check_integrity(0););
new_query_cache_size= init_cache();
STRUCT_LOCK(&structure_guard_mutex);
m_cache_status= Query_cache::NO_FLUSH_IN_PROGRESS;
pthread_cond_signal(&COND_cache_status_changed);
if (new_query_cache_size)
DBUG_EXECUTE("check_querycache",check_integrity(1););
STRUCT_UNLOCK(&structure_guard_mutex);
DBUG_RETURN(new_query_cache_size);