mysql:13710
From: Kenji Kikuchi <Kenji Kikuchi <kenji.kikuti@xxxxxxxxxx>>
Date: Mon, 05 Feb 2007 12:42:42 +0900
Subject: [mysql 13710] mysqlbench-0.1向けパッチ
はじめまして、菊池と申します。
ユーザ会よりダウンロードできるmysqlbench-0.1向けのパッチ
を作りました。ぜひ、試して頂けないでしょうか。
これまで、ベンチマークテスト前に最適化コマンドを続けて
発行することで、エラーメッセージが出力され、若干、表示が
見にくくなっていたところを修正しています。
ベンチマークテストの結果に影響はありませんが、メッセージが
気になっていたので修正しました。
■パッチ適用前のメッセージ
------------------------
# ./mysqlbench
starting vacuum...OPTIMIZE TABLE tellers: Commands out of sync; you
can't run this command now
DELETE FROM history: Commands out of sync; you can't run this command now
OPTIMIZE TABLE history: Commands out of sync; you can't run this command now
end.
------------------------
■パッチ適用後のメッセージ
------------------------
# ./mysqlbench
starting vacuum...end.
all connection OK
go
end.
------------------------
■パッチ適用後のメッセージ(デバックオプション付き)
------------------------
# ./mysqlbench -d
mysqlhost: mysqlport: (null) nclients: 1 nxacts: 10 dbName: test
starting vacuum...
OPTIMIZE TABLE branches: OK
OPTIMIZE TABLE tellers : OK
OPTIMIZE TABLE history : OK
end.
------------------------
以下は、これまでテストした環境です。
[RHEL4 AS update3]
- MySQL 4.1.12 (RHELバンドル版)
- MySQL 5.0.17c-pro-gpl-cert (MySQL Enterprise版)
[FreeBSD 6.2-RELEASE]
- MySQL 4.1.22 (portsからインストール)
調べたのですが、メンテナンスしている方がわからなかったため、
MLに投稿させて頂きました。よろしくお願いします。
---------------------- パッチここから ----------------------
--- mysqlbench-0.1/mysqlbench.c 2005-12-16 06:20:48.000000000 +0900
+++ mysqlbench-0.1/mysqlbench.c.new 2007-02-02 12:19:46.000000000 +0900
@@ -704,14 +704,33 @@
if (res != 0)
{
fprintf(stderr, "OPTIMIZE TABLE branches: %s\n", mysql_error(con));
-// exit(1);
+ exit(1);
+ }
+ else
+ {
+ result = mysql_store_result(con);
+ if (debug)
+ {
+ printf("\n");
+ printf(" OPTIMIZE TABLE branches: %s\n",mysql_fetch_row(result)[3]);
+ }
+ mysql_free_result(result);
}
res = mysql_query(con, "OPTIMIZE TABLE tellers");
if (res != 0)
{
fprintf(stderr, "OPTIMIZE TABLE tellers: %s\n", mysql_error(con));
-// exit(1);
+ exit(1);
+ }
+ else
+ {
+ result = mysql_store_result(con);
+ if (debug)
+ {
+ printf(" OPTIMIZE TABLE tellers : %s\n",mysql_fetch_row(result)[3]);
+ }
+ mysql_free_result(result);
}
res = mysql_query(con, "DELETE FROM history");
@@ -725,7 +744,16 @@
if (res != 0)
{
fprintf(stderr, "OPTIMIZE TABLE history: %s\n", mysql_error(con));
-// exit(1);
+ exit(1);
+ }
+ else
+ {
+ result = mysql_store_result(con);
+ if (debug)
+ {
+ printf(" OPTIMIZE TABLE history : %s\n",mysql_fetch_row(result)[3]);
+ }
+ mysql_free_result(result);
}
fprintf(stderr, "end.\n");
@@ -737,8 +765,17 @@
if (res != 0)
{
fprintf(stderr, "OPTIMIZE TABLE accounts: %s\n", mysql_error(con));
-// exit(1);
+ exit(1);
}
+ else
+ {
+ result = mysql_store_result(con);
+ if (debug)
+ {
+ printf(" OPTIMIZE TABLE accounts: %s\n",mysql_fetch_row(result)[3]);
+ }
+ mysql_free_result(result);
+ }
fprintf(stderr, "end.\n");
}
}
---------------------- パッチここまで ----------------------
--
伊藤忠テクノソリューションズ株式会社
菊池 研自 (Kenji Kikuchi)
---------------------------------
-> 13710 2007-02-05 12:42 [Kenji Kikuchi <kenji] mysqlbench-0.1向けパッチ 13739 2007-02-20 00:03 ┗["maz" <shamy@xxxxxxx] MyODBCがMySQLにコネクトできません 13740 2007-02-20 15:51 ┗[遠藤 俊裕 <endo@xxxx] 13741 2007-02-20 18:52 ┗["maz" <shamy@xxxxxxx] 13742 2007-02-20 19:11 ┗[遠藤 俊裕 <endo@xxxx] 13743 2007-02-20 23:32 ┗["maz" <shamy@xxxxxxx]