Skip to content

Commit

Permalink
#1662 (DEBUG_MODE = true でメモリリーク)
Browse files Browse the repository at this point in the history
#1669 (変数の初期化漏れ)

git-svn-id: http://svn.ec-cube.net/open/branches/version-2_12-dev@21711 1e3b908f-19a9-db11-a64c-001125224ba8
  • Loading branch information
Seasoft authored and Seasoft committed Apr 3, 2012
1 parent fbe6fbc commit 1368985
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 13 deletions.
18 changes: 7 additions & 11 deletions data/class/SC_Query.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,17 +52,13 @@ function SC_Query($dsn = '', $force_run = false, $new = false) {
$dsn = DEFAULT_DSN;
}

// Debugモード指定
// 常時ONにするとメモリが解放されない。
// 連続クエリ実行時に問題が生じる。
if (DEBUG_MODE) {
$options['debug'] = PEAR_DB_DEBUG;
} else {
$options['debug'] = 0;
}

// 持続的接続オプション
$options['persistent'] = PEAR_DB_PERSISTENT;
// オプション
$options = array(
// 持続的接続
'persistent' => PEAR_DB_PERSISTENT,
// Debugモード
'debug' => PEAR_DB_DEBUG,
);

// バッファリング trueにするとメモリが解放されない。
// 連続クエリ実行時に問題が生じる。
Expand Down
2 changes: 1 addition & 1 deletion data/mtb_constants_init.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
/** 決済モジュール付与文言 */
define('ECCUBE_PAYMENT', "EC-CUBE");
/** PEAR::DBのデバッグモード */
define('PEAR_DB_DEBUG', 9);
define('PEAR_DB_DEBUG', 0);
/** PEAR::DBの持続的接続オプション */
define('PEAR_DB_PERSISTENT', false);
/** 締め日の指定(末日の場合は、31を指定してください。) */
Expand Down
2 changes: 1 addition & 1 deletion html/install/sql/insert_data.sql
Original file line number Diff line number Diff line change
Expand Up @@ -1048,7 +1048,7 @@ INSERT INTO mtb_constants (id, name, rank, remarks) VALUES ('UPDATE_HTTP', '"htt
INSERT INTO mtb_constants (id, name, rank, remarks) VALUES ('CHAR_CODE', '"UTF-8"', 39, '文字コード');
INSERT INTO mtb_constants (id, name, rank, remarks) VALUES ('LOCALE', '"ja_JP.UTF-8"', 40, 'ロケール設定');
INSERT INTO mtb_constants (id, name, rank, remarks) VALUES ('ECCUBE_PAYMENT', '"EC-CUBE"', 41, '決済モジュール付与文言');
INSERT INTO mtb_constants (id, name, rank, remarks) VALUES ('PEAR_DB_DEBUG', '9', 42, 'PEAR::DBのデバッグモード');
INSERT INTO mtb_constants (id, name, rank, remarks) VALUES ('PEAR_DB_DEBUG', '0', 42, 'PEAR::DBのデバッグモード');
INSERT INTO mtb_constants (id, name, rank, remarks) VALUES ('PEAR_DB_PERSISTENT', 'false', 43, 'PEAR::DBの持続的接続オプション');
INSERT INTO mtb_constants (id, name, rank, remarks) VALUES ('CLOSE_DAY', '31', 45, '締め日の指定(末日の場合は、31を指定してください。)');
INSERT INTO mtb_constants (id, name, rank, remarks) VALUES ('FAVORITE_ERROR', '13', 46, '一般サイトエラー');
Expand Down

0 comments on commit 1368985

Please sign in to comment.