summaryrefslogtreecommitdiff
path: root/sql-common
diff options
context:
space:
mode:
authorMichael Widenius <monty@askmonty.org>2011-02-24 02:36:32 +0200
committerMichael Widenius <monty@askmonty.org>2011-02-24 02:36:32 +0200
commite6c45f5e1fc91e0ec0cffc97d5bcd1f77cec4de2 (patch)
treec4385da2c44ff8bc5f57859afeb48079770d158a /sql-common
parent1c23091c4ecc23100a6fe42288819cf4d5dc0b5b (diff)
downloadmariadb-git-e6c45f5e1fc91e0ec0cffc97d5bcd1f77cec4de2.tar.gz
- Reduced memory requirements for mysqltest to 1/4.th This also gave a speedup for 5x for some tests.
- Reduced memory usage from safe_mutex. - Fixed problem with failing tests that could not restart mysqld becasue the port was reserved - More DBUG information - Fixed bug where bitmap_set_prefix() wrote over buffer area. - Initialize n_pages_flushed in xtradb which was used uninitialized. client/mysqltest.cc: Reduced memory usage (400K -> 80 for simple test; 400M -> 70M for some other tests) - Smaller dynamic arrays at start - Made 'st_connection' significantly smaller by allocation 'mysql' on demand in mysql_init() and storing require_file in a mem_root. - Fixed that when one does --debug we get information from safemalloc in the trace (Most of changes are changing &connect->mysql to connect->mysql libmysql/libmysql.c: Don't call mysql_thread_end() if my_init() was called outside of mysql_server_init() This is needed to get information from my_end() into the DBUG log mysql-test/README: Fixed wrong comment mysql-test/mysql-test-run.pl: Reserv 20 ports / mysql-test-run thread. (Needed as some tests uses 9 mysqld servers) mysys/hash.c: More DBUG information mysys/my_bitmap.c: Fixed bug where bitmap_set_prefix() wrote over buffer area. mysys/safemalloc.c: More DBUG information mysys/thr_mutex.c: Initialize smaller arrays be default. sql-common/client.c: More DBUG_PRINT storage/xtradb/srv/srv0srv.c: Initialize n_pages_flushed which was used uninitialized.
Diffstat (limited to 'sql-common')
-rw-r--r--sql-common/client.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sql-common/client.c b/sql-common/client.c
index 05b5f820138..af08eaab2ab 100644
--- a/sql-common/client.c
+++ b/sql-common/client.c
@@ -1590,6 +1590,7 @@ mysql_init(MYSQL *mysql)
*/
mysql->reconnect= 0;
+ DBUG_PRINT("mysql",("mysql: 0x%lx", (long) mysql));
return mysql;
}
@@ -2776,6 +2777,8 @@ void mysql_detach_stmt_list(LIST **stmt_list __attribute__((unused)),
void STDCALL mysql_close(MYSQL *mysql)
{
DBUG_ENTER("mysql_close");
+ DBUG_PRINT("enter", ("mysql: 0x%lx", (long) mysql));
+
if (mysql) /* Some simple safety */
{
/* If connection is still up, send a QUIT message */