Ticket #1182 (closed バグ指摘: 修正済)

Opened 13 years ago

Last modified 13 years ago

MySQLでのインストール時にDBエラー

Reported by: shutta Owned by: kotani
Priority: Milestone: EC-CUBE2.11.0
Component: フロント Version: 2.11.0 β2
Keywords: Cc:
修正済み:

Description

MySQLでインストールしようとすると、下記エラーになります。

MDB2 Error: syntax error

_doQuery: [Error message: Could not execute statement]
[Last executed query: PREPARE mdb2_statement_mysql_18509677cef2ef060ec1c354457a86985c38f41b7 FROM NULL]
[Native code: 1064]
[Native message: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1]


/var/www/version-2_5-dev/html/install/index.php 115:lfCheckDBError
/var/www/version-2_5-dev/html/install/index.php 760:SC_DB_DBFactory_MYSQL->sfGetDBVersion
/var/www/version-2_5-dev/data/class/db/dbfactory/SC_DB_DBFactory_MYSQL.php 51:SC_Query->getOne
/var/www/version-2_5-dev/data/class/SC_Query.php 595:SC_Query->prepare
/var/www/version-2_5-dev/data/class/SC_Query.php in <b>/var/www/version-2_5-dev/data/class/SC_Query.php</b> on line <b>870</b><br />

影響があったとすれば、 #957 #951 あたり関係している臭いですが、こちらの環境依存の懸念もあるので、他の方の環境でも一度ご確認いただけませんでしょうか。

当方の環境は、
MySQL: 5.0.51
PHP: 5.2.4
Apache: 2.2.8
です。

Change History

comment:1 Changed 13 years ago by kotani

shutta様

株式会社ロックオン小谷です。お世話になっております。

こちらでも再現しました。
環境:
MySQL 5.0.67-log
PHP 5.2.11
Apache

MDB2 Error: syntax error

_doQuery: [Error message: Could not execute statement]
[Last executed query: PREPARE mdb2_statement_mysql_1ae24a11c0f2a39632cb5d8f11439804477d2d506 FROM NULL]
[Native code: 1064]
[Native message: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1]

comment:2 Changed 13 years ago by kotani

  • Owner changed from somebody to kotani
  • Status changed from new to assigned

comment:3 follow-ups: ↓ 4 ↓ 5 Changed 13 years ago by shutta

再現の確認有難うございます。

こちらでもコードを追っておりましたが、lfCheckDBError 内のsfGetDBVersionの前までに、

            if (!defined("DB_TYPE")) {
                define("DB_TYPE", $arrRet['db_type']);
            }

を追加すれば良さそうですが、どうでしょうか。

comment:4 in reply to: ↑ 3 Changed 13 years ago by shutta

追記です。

前述のは、html/install/index.php でということです。

comment:5 in reply to: ↑ 3 Changed 13 years ago by kotani

  • Owner changed from kotani to shutta
  • Status changed from assigned to new

shutta への返信

再現の確認有難うございます。

こちらでもコードを追っておりましたが、lfCheckDBError 内のsfGetDBVersionの前までに、

            if (!defined("DB_TYPE")) {
                define("DB_TYPE", $arrRet['db_type']);
            }

を追加すれば良さそうですが、どうでしょうか。

ご確認ありがとうございます。
恐れ入りますが、ご提案頂いている内容でお願いできますでしょうか。

comment:6 Changed 13 years ago by kotani

  • Owner changed from shutta to kotani
  • Status changed from new to assigned

comment:7 Changed 13 years ago by kotani

  • Status changed from assigned to closed
  • Resolution set to 修正済

r20745 で修正しました

shutta様
ご提案頂いた内容でこちらでも動作確認取れましたのでコミットしました!
ありがとうございました。

comment:8 Changed 13 years ago by nanasess

ちなみに, 下記環境では再現しませんでした

PHPバージョンPHP 5.3.5
DBバージョンMySQL 5.1.53
Note: See TracTickets for help on using tickets.