diff options
-rw-r--r-- | client/mysqladmin.c | 17 | ||||
-rw-r--r-- | innobase/srv/srv0srv.c | 20 | ||||
-rw-r--r-- | mysql-test/r/merge.result | 2 | ||||
-rw-r--r-- | mysql-test/t/merge.test | 2 |
4 files changed, 19 insertions, 22 deletions
diff --git a/client/mysqladmin.c b/client/mysqladmin.c index 6bd2d3caad1..9fbf7e2d64d 100644 --- a/client/mysqladmin.c +++ b/client/mysqladmin.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2000 MySQL AB +/* Copyright (C) 2000-2004 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -409,6 +409,7 @@ static my_bool sql_connect(MYSQL *mysql, uint wait) } } + /* Execute a command. Return 0 on ok @@ -420,13 +421,13 @@ static int execute_commands(MYSQL *mysql,int argc, char **argv) { const char *status; -/* - MySQL documentation relies on the fact that mysqladmin will - execute commands in the order specified, e.g. - mysqladmin -u root flush-privileges password "newpassword" - to reset a lost root password. - If this behaviour is ever changed, Docs should be notified. -*/ + /* + MySQL documentation relies on the fact that mysqladmin will + execute commands in the order specified, e.g. + mysqladmin -u root flush-privileges password "newpassword" + to reset a lost root password. + If this behaviour is ever changed, Docs should be notified. + */ for (; argc > 0 ; argv++,argc--) { diff --git a/innobase/srv/srv0srv.c b/innobase/srv/srv0srv.c index cea17e9f223..2bb3e8ea60c 100644 --- a/innobase/srv/srv0srv.c +++ b/innobase/srv/srv0srv.c @@ -1434,6 +1434,13 @@ srv_sprintf_innodb_monitor( buf = buf + strlen(buf); ut_a(buf < buf_end + 1500); + /* Conceptually, srv_innodb_monitor_mutex has a very high latching + order level in sync0sync.h, while dict_foreign_err_mutex has a very + low level 135. Therefore we can reserve the latter mutex here without + a danger of a deadlock of threads. */ + + mutex_enter(&dict_foreign_err_mutex); + if (*dict_foreign_err_buf != '\0') { buf += sprintf(buf, "------------------------\n" @@ -1445,18 +1452,7 @@ srv_sprintf_innodb_monitor( } } - ut_a(buf < buf_end + 1500); - - if (*dict_unique_err_buf != '\0') { - buf += sprintf(buf, -"---------------------------------------------------------------\n" -"LATEST UNIQUE KEY ERROR (is masked in REPLACE or INSERT IGNORE)\n" -"---------------------------------------------------------------\n"); - - if (buf_end - buf > 6000) { - buf+= sprintf(buf, "%.4000s", dict_unique_err_buf); - } - } + mutex_exit(&dict_foreign_err_mutex); ut_a(buf < buf_end + 1500); diff --git a/mysql-test/r/merge.result b/mysql-test/r/merge.result index 650fdb1c77b..7b2b9a47b0f 100644 --- a/mysql-test/r/merge.result +++ b/mysql-test/r/merge.result @@ -560,7 +560,7 @@ select * from t6; a 1 2 -drop table if exists t1, t2, t3, t4, t5, t6; +drop table if exists t6, t5, t4, t3, t2, t1; DROP TABLE IF EXISTS t1, t2; CREATE TABLE t1 ( fileset_id tinyint(3) unsigned NOT NULL default '0', diff --git a/mysql-test/t/merge.test b/mysql-test/t/merge.test index b625e780f1f..76382a9cd99 100644 --- a/mysql-test/t/merge.test +++ b/mysql-test/t/merge.test @@ -202,7 +202,7 @@ insert into t4 values (1); insert into t5 values (2); create temporary table t6 (a int not null) TYPE=MERGE UNION=(t4,t5); select * from t6; -drop table if exists t1, t2, t3, t4, t5, t6; +drop table if exists t6, t5, t4, t3, t2, t1; # # testing merge::records_in_range and optimizer |