From 97dedfa4f9e7fcea945319689251c3cba15c6d86 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 14 Feb 2006 09:15:51 +0100 Subject: [PATCH 1/4] Make sure slave cluster is stopped if there is cluster support mysql-test/mysql-test-run.pl: Turn on $using_ndbcluster_slave before stopping slave cluster if cluster support exists --- mysql-test/mysql-test-run.pl | 1 + 1 file changed, 1 insertion(+) diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index 6f9400d4fff..4c72768a8e0 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -1235,6 +1235,7 @@ sub kill_running_server () { $using_ndbcluster_master= $opt_with_ndbcluster; ndbcluster_stop(); $master->[0]->{'ndbcluster'}= 1; + $using_ndbcluster_slave= $opt_with_ndbcluster; ndbcluster_stop_slave(); $slave->[0]->{'ndbcluster'}= 1; } From 6b2d7326f2e56aacf676b1b28215d25779b04600 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 14 Feb 2006 11:34:46 +0100 Subject: [PATCH 2/4] Bug#16333 Assertion failure in lock.cc in the sysbench test - Set the value of mp->thread before mp->count to avoid race condition. mysys/thr_mutex.c: Set mp->thread before mp->count is changed. Since mp->count is used in the macros 'safe_mutex_assert_not_owner' and 'safe_mutex_assert_owner' as an inidicator wheter to look at the mp->thread variable or not. This means that when mp->count is changed, the mp->thread should akready be set to the owning thread. Also set mp->thread to 0 when unlocking the mutex. --- mysys/thr_mutex.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/mysys/thr_mutex.c b/mysys/thr_mutex.c index 3326068d164..1791bb6e4c4 100644 --- a/mysys/thr_mutex.c +++ b/mysys/thr_mutex.c @@ -103,7 +103,7 @@ int safe_mutex_lock(safe_mutex_t *mp,const char *file, uint line) fflush(stderr); abort(); } - + pthread_mutex_lock(&mp->global); if (mp->count > 0 && pthread_equal(pthread_self(),mp->thread)) { @@ -121,6 +121,7 @@ int safe_mutex_lock(safe_mutex_t *mp,const char *file, uint line) fflush(stderr); abort(); } + mp->thread= pthread_self(); if (mp->count++) { fprintf(stderr,"safe_mutex: Error in thread libray: Got mutex at %s, \ @@ -128,7 +129,6 @@ line %d more than 1 time\n", file,line); fflush(stderr); abort(); } - mp->thread=pthread_self(); mp->file= file; mp->line=line; pthread_mutex_unlock(&mp->global); @@ -154,6 +154,7 @@ int safe_mutex_unlock(safe_mutex_t *mp,const char *file, uint line) fflush(stderr); abort(); } + mp->thread= 0; mp->count--; #ifdef __WIN__ pthread_mutex_unlock(&mp->mutex); @@ -207,6 +208,7 @@ int safe_cond_wait(pthread_cond_t *cond, safe_mutex_t *mp, const char *file, fflush(stderr); abort(); } + mp->thread=pthread_self(); if (mp->count++) { fprintf(stderr, @@ -215,7 +217,6 @@ int safe_cond_wait(pthread_cond_t *cond, safe_mutex_t *mp, const char *file, fflush(stderr); abort(); } - mp->thread=pthread_self(); mp->file= file; mp->line=line; pthread_mutex_unlock(&mp->global); @@ -245,6 +246,7 @@ int safe_cond_timedwait(pthread_cond_t *cond, safe_mutex_t *mp, } #endif pthread_mutex_lock(&mp->global); + mp->thread=pthread_self(); if (mp->count++) { fprintf(stderr, @@ -253,7 +255,6 @@ int safe_cond_timedwait(pthread_cond_t *cond, safe_mutex_t *mp, fflush(stderr); abort(); } - mp->thread=pthread_self(); mp->file= file; mp->line=line; pthread_mutex_unlock(&mp->global); From 85d0e383965c8ba5005c37a0d0642c6a3197ba9a Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 15 Feb 2006 17:19:40 +0100 Subject: [PATCH 3/4] Bug#17386 binlog interchangably contains engine= and type= - Update result file and enable test mysql-test/r/binlog_row_mix_innodb_myisam.result: Update resultfile, when switching from type to engine, the log position needs to be increased by two after that statement. mysql-test/t/disabled.def: Enable test --- .../r/binlog_row_mix_innodb_myisam.result | 28 +++++++++---------- mysql-test/t/disabled.def | 1 - 2 files changed, 14 insertions(+), 15 deletions(-) diff --git a/mysql-test/r/binlog_row_mix_innodb_myisam.result b/mysql-test/r/binlog_row_mix_innodb_myisam.result index b444d7a3edc..d1589ce495b 100644 --- a/mysql-test/r/binlog_row_mix_innodb_myisam.result +++ b/mysql-test/r/binlog_row_mix_innodb_myisam.result @@ -210,7 +210,7 @@ master-bin.000001 282 Write_rows 1 # master-bin.000001 316 Xid 1 # COMMIT /* xid= */ delete from t1; delete from t2; -alter table t2 type=MyISAM; +alter table t2 engine=MyISAM; insert into t1 values (1); begin; select * from t1 for update; @@ -266,18 +266,18 @@ master-bin.000001 343 Query 1 # use `test`; delete from t1 master-bin.000001 420 Xid 1 # COMMIT /* xid= */ master-bin.000001 447 Query 1 # use `test`; delete from t2 master-bin.000001 524 Xid 1 # COMMIT /* xid= */ -master-bin.000001 551 Query 1 # use `test`; alter table t2 type=MyISAM -master-bin.000001 640 Table_map 1 # test.t1 -master-bin.000001 679 Write_rows 1 # -master-bin.000001 713 Xid 1 # COMMIT /* xid= */ -master-bin.000001 740 Table_map 1 # test.t2 -master-bin.000001 779 Write_rows 1 # -master-bin.000001 813 Query 1 # use `test`; drop table t1,t2 -master-bin.000001 892 Query 1 # use `test`; create table t0 (n int) -master-bin.000001 978 Table_map 1 # test.t0 -master-bin.000001 1017 Write_rows 1 # -master-bin.000001 1051 Table_map 1 # test.t0 -master-bin.000001 1090 Write_rows 1 # -master-bin.000001 1124 Query 1 # use `test`; create table t2 (n int) engine=innodb +master-bin.000001 551 Query 1 # use `test`; alter table t2 engine=MyISAM +master-bin.000001 642 Table_map 1 # test.t1 +master-bin.000001 681 Write_rows 1 # +master-bin.000001 715 Xid 1 # COMMIT /* xid= */ +master-bin.000001 742 Table_map 1 # test.t2 +master-bin.000001 781 Write_rows 1 # +master-bin.000001 815 Query 1 # use `test`; drop table t1,t2 +master-bin.000001 894 Query 1 # use `test`; create table t0 (n int) +master-bin.000001 980 Table_map 1 # test.t0 +master-bin.000001 1019 Write_rows 1 # +master-bin.000001 1053 Table_map 1 # test.t0 +master-bin.000001 1092 Write_rows 1 # +master-bin.000001 1126 Query 1 # use `test`; create table t2 (n int) engine=innodb do release_lock("lock1"); drop table t0,t2; diff --git a/mysql-test/t/disabled.def b/mysql-test/t/disabled.def index 916e63bc7cb..a3ca343088f 100644 --- a/mysql-test/t/disabled.def +++ b/mysql-test/t/disabled.def @@ -33,7 +33,6 @@ rpl_until : Unstable test case, bug#15886 sp-goto : GOTO is currently is disabled - will be fixed in the future subselect : Bug#15706 (ps mode) [PATCH PENDING] rpl_ndb_log : result not deterministic -binlog_row_mix_innodb_myisam : Bug #17386 binlog_row_insert_select : Bug #17385 rpl_row_basic_2myisam : Bug #17385 rpl_row_basic_3innodb : Bug #17385 From 4283d9f0927c337974c3bf7f5274917594d69efe Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 16 Feb 2006 10:03:13 +0100 Subject: [PATCH 4/4] ndb_load disabled mysql-test/t/disabled.def: Disable ndb_load again... --- mysql-test/t/disabled.def | 1 + 1 file changed, 1 insertion(+) diff --git a/mysql-test/t/disabled.def b/mysql-test/t/disabled.def index 46f15983dc3..8a990f47e30 100644 --- a/mysql-test/t/disabled.def +++ b/mysql-test/t/disabled.def @@ -12,3 +12,4 @@ sp-goto : GOTO is currently is disabled - will be fixed in the future subselect : Bug#15706 +ndb_load : Bug#17233