From 20eba3e0b9f2fad7c0cff700f96315fe7aa8ccb7 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 21 Nov 2003 14:41:57 +0200 Subject: Fixed memory leak with RAID tables Fixed tests for RAID tables Detect uninitialized mutexes on lock and destroy mysql-test/r/raid.result: Updated results mysql-test/r/rpl_change_master.result: Update results missing from last patch mysql-test/t/raid.test: Clean up test mysys/mf_iocache.c: Comments Small safety fix mysys/thr_mutex.c: Detect uninitialized mutexes on lock and destroy sql/sql_db.cc: Fixed memory leak with RAID tables --- mysql-test/r/raid.result | 8 ++++---- mysql-test/r/rpl_change_master.result | 4 ++-- mysql-test/t/raid.test | 3 ++- 3 files changed, 8 insertions(+), 7 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/r/raid.result b/mysql-test/r/raid.result index fd47a9451f6..6e16757a43d 100644 --- a/mysql-test/r/raid.result +++ b/mysql-test/r/raid.result @@ -1,7 +1,8 @@ -create database test_raid; -create table test_raid.r1 (i int) raid_type=1; -drop database test_raid; DROP TABLE IF EXISTS t1,t2; +DROP DATABASE IF EXISTS test_$1; +create database test_$1; +create table test_$1.r1 (i int) raid_type=1; +drop database test_$1; CREATE TABLE t1 ( id int unsigned not null auto_increment primary key, c char(255) not null @@ -99,7 +100,6 @@ count(*) 450 DROP TABLE t2; /* variable rows */ -DROP TABLE IF EXISTS t2; CREATE TABLE t1 ( id int unsigned not null auto_increment primary key, c varchar(255) not null diff --git a/mysql-test/r/rpl_change_master.result b/mysql-test/r/rpl_change_master.result index 883cb65171c..a886ad9c304 100644 --- a/mysql-test/r/rpl_change_master.result +++ b/mysql-test/r/rpl_change_master.result @@ -15,11 +15,11 @@ select * from t1; n 1 show slave status; -Slave_IO_State Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Replicate_do_table Replicate_ignore_table Replicate_wild_do_table Replicate_wild_ignore_table Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space Until_condition Until_Log_File Until_Log_pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_behind_master +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # 127.0.0.1 root 9306 1 master-bin.000001 273 slave-relay-bin.000002 258 master-bin.000001 No No 0 0 214 317 None 0 No # change master to master_user='root'; show slave status; -Slave_IO_State Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Replicate_do_table Replicate_ignore_table Replicate_wild_do_table Replicate_wild_ignore_table Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space Until_condition Until_Log_File Until_Log_pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_behind_master +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # 127.0.0.1 root 9306 1 master-bin.000001 214 slave-relay-bin.000001 4 master-bin.000001 No No 0 0 214 4 None 0 No # select release_lock("a"); release_lock("a") diff --git a/mysql-test/t/raid.test b/mysql-test/t/raid.test index 395a04615cb..0d6e851a153 100644 --- a/mysql-test/t/raid.test +++ b/mysql-test/t/raid.test @@ -9,6 +9,7 @@ enable_query_log; --disable_warnings DROP TABLE IF EXISTS t1,t2; +DROP DATABASE IF EXISTS test_$1; --enable_warnings # @@ -111,8 +112,8 @@ ALTER TABLE t1 DROP COLUMN x; ALTER TABLE t1 RENAME t2; select count(*) from t2; DROP TABLE t2; + /* variable rows */ -DROP TABLE IF EXISTS t2; CREATE TABLE t1 ( id int unsigned not null auto_increment primary key, c varchar(255) not null -- cgit v1.2.1