Exception: FLEA_Db_Exception_SqlQuery
Message: SQL 错误消息: "Incorrect key file for table 'C:\WINDOWS\TEMP\#sql5dc_495c7_0.MYI'; try to repair it"
SQL 语句: "SHOW FULL COLUMNS FROM `sn_article`"
SQL 错误代码: "7335941".
Filename: D:\website\www.synnovo.com\libs\FLEA\FLEA\Db\Driver\Mysql.php [244]
#10 FLEA_Db_Driver_Mysql::execute('SHOW FULL COLUMNS FROM `sn_ ...')
ARGS:
Array
(
[0] => SHOW FULL COLUMNS FROM `sn_article`
)
SOURCE CODE:
| 234 |
'BLOB' => 'X',
|
| 235 |
'TEXT' => 'X',
|
| 236 |
'MEDIUMBLOB' => 'X',
|
| 237 |
'MEDIUMTEXT' => 'X',
|
| 238 |
'LONGBLOB' => 'X',
|
| 239 |
'LONGTEXT' => 'X',
|
| 240 |
'ENUM' => 'C',
|
| 241 |
'SET' => 'C',
|
| 242 |
);
|
| 243 |
|
| 244 |
$rs = $this->execute(sprintf($this->META_COLUMNS_SQL, $table));
|
| 245 |
if (!$rs) { return false; }
|
| 246 |
$retarr = array();
|
| 247 |
while (($row = mysql_fetch_assoc($rs))) {
|
| 248 |
$field = array();
|
| 249 |
$field['name'] = $row['Field'];
|
| 250 |
$type = $row['Type'];
|
| 251 |
|
| 252 |
$field['scale'] = null;
|
| 253 |
$queryArray = false;
|
| 254 |
if (preg_match('/^(.+)\((\d+),(\d+)/', $type, $queryArray)) {
|
Filename: D:\website\www.synnovo.com\libs\FLEA\FLEA\Db\TableDataGateway.php [1993]
#9 FLEA_Db_Driver_Mysql::metaColumns('`sn_article`')
ARGS:
Array
(
[0] => `sn_article`
)
SOURCE CODE:
| 1983 |
$meta = FLEA::getCache($cacheId, FLEA::getAppInf('dbMetaLifetime'));
|
| 1984 |
if (is_array($meta)) {
|
| 1985 |
$this->meta = $meta;
|
| 1986 |
return true;
|
| 1987 |
}
|
| 1988 |
}
|
| 1989 |
|
| 1990 |
/**
|
| 1991 |
* 从数据库获得 meta
|
| 1992 |
*/
|
| 1993 |
$this->meta = $this->dbo->metaColumns($this->qtableName);
|
| 1994 |
if (!is_array($this->meta) || empty($this->meta)) {
|
| 1995 |
FLEA::loadClass('FLEA_Db_Exception_MetaColumnsFailed');
|
| 1996 |
return __THROW(new FLEA_Db_Exception_MetaColumnsFailed($this->qtableName));
|
| 1997 |
}
|
| 1998 |
|
| 1999 |
if ($cached) {
|
| 2000 |
return FLEA::writeCache($cacheId, $this->meta);
|
| 2001 |
} else {
|
| 2002 |
return true;
|
| 2003 |
}
|
Filename: D:\website\www.synnovo.com\libs\FLEA\FLEA\Db\TableDataGateway.php [333]
#8 FLEA_Db_TableDataGateway::_prepareMeta()
ARGS:
Array
(
)
SOURCE CODE:
| 323 |
$this->dbo =& $dbo;
|
| 324 |
|
| 325 |
if (empty($this->schema) && !empty($dbo->dsn['schema'])) {
|
| 326 |
$this->schema = $dbo->dsn['schema'];
|
| 327 |
}
|
| 328 |
if (empty($this->fullTableName)) {
|
| 329 |
$this->fullTableName = $dbo->dsn['prefix'] . $this->tableName;
|
| 330 |
}
|
| 331 |
$this->qtableName = $dbo->qtable($this->fullTableName, $this->schema);
|
| 332 |
|
| 333 |
if (!$this->_prepareMeta()) {
|
| 334 |
return false;
|
| 335 |
}
|
| 336 |
$this->fields = array_keys($this->meta);
|
| 337 |
|
| 338 |
if (is_array($this->validateRules)) {
|
| 339 |
foreach ($this->validateRules as $fieldName => $rules) {
|
| 340 |
$fieldName = strtoupper($fieldName);
|
| 341 |
if (!isset($this->meta[$fieldName])) { continue; }
|
| 342 |
foreach ((array)$rules as $ruleName => $rule) {
|
| 343 |
$this->meta[$fieldName][$ruleName] = $rule;
|
Filename: D:\website\www.synnovo.com\libs\FLEA\FLEA\Db\TableDataGateway.php [306]
#7 FLEA_Db_TableDataGateway::setDBO(FLEA_Db_Driver_Mysql)
ARGS:
Array
(
[0] => FLEA_Db_Driver_Mysql Object
(
[NEXT_ID_SQL] => UPDATE %s SET id = LAST_INSERT_ID(id + 1)
[CREATE_SEQ_SQL] => CREATE TABLE %s (id INT NOT NULL)
[INIT_SEQ_SQL] => INSERT INTO %s VALUES (%s)
[DROP_SEQ_SQL] => DROP TABLE %s
[META_COLUMNS_SQL] => SHOW FULL COLUMNS FROM %s
[PARAM_STYLE] => ?
[HAS_INSERT_ID] => 1
[HAS_AFFECTED_ROWS] => 1
[_mysqlVersion] => 5.1.38-community
[TRUE_VALUE] => 1
[FALSE_VALUE] => 0
[NULL_VALUE] => NULL
[HAS_TRANSACTION] =>
[HAS_SAVEPOINT] =>
[RESULT_FIELD_NAME_LOWER] =>
[dsn] => Array
(
[driver] => mysql
[host] => localhost
[login] => root
[password] => AudiA8W12
[database] => synnovo
[port] =>
[options] =>
[prefix] => sn_
[schema] =>
[id] => mysql://root:AudiA8W12@localhost_sn_/synnovo//
)
[conn] => Resource id #20
[log] => Array
(
[0] => SELECT VERSION()
[1] => SET NAMES 'utf8'
[2] => SHOW FULL COLUMNS FROM `sn_article`
)
[querycount] => 3
[lasterr] => Incorrect key file for table 'C:\WINDOWS\TEMP\#sql5dc_495c7_0.MYI'; try to repair it
[lasterrcode] => 126
[_insertId] =>
[_transCount] => 0
[_hasFailedQuery] =>
[_savepointStack] => Array
(
)
[enableLog] => 1
)
)
SOURCE CODE:
| 296 |
// 初始化数据访问对象
|
| 297 |
if (!isset($params['dbo'])) {
|
| 298 |
if (isset($params['dbDSN'])) {
|
| 299 |
$dbo =& FLEA::getDBO($params['dbDSN']);
|
| 300 |
} else {
|
| 301 |
$dbo =& FLEA::getDBO();
|
| 302 |
}
|
| 303 |
} else {
|
| 304 |
$dbo =& $params['dbo'];
|
| 305 |
}
|
| 306 |
$this->setDBO($dbo);
|
| 307 |
|
| 308 |
// 当 skipCreateLinks 不为 true 时,建立关联
|
| 309 |
if (!isset($params['skipCreateLinks']) || $params['skipCreateLinks'] == false) {
|
| 310 |
$this->relink();
|
| 311 |
}
|
| 312 |
}
|
| 313 |
|
| 314 |
/**
|
| 315 |
* 设置数据库访问对象
|
| 316 |
*
|
Filename: D:\website\www.synnovo.com\libs\FLEA\FLEA.php [422]
#6 FLEA_Db_TableDataGateway::FLEA_Db_TableDataGateway()
ARGS:
Array
(
)
SOURCE CODE:
| 412 |
} else {
|
| 413 |
$classExists = class_exists($className);
|
| 414 |
}
|
| 415 |
if (!$classExists) {
|
| 416 |
if (!FLEA::loadClass($className)) {
|
| 417 |
$return = false;
|
| 418 |
return $return;
|
| 419 |
}
|
| 420 |
}
|
| 421 |
|
| 422 |
$instances[$className] =& new $className();
|
| 423 |
FLEA::register($instances[$className], $className);
|
| 424 |
return $instances[$className];
|
| 425 |
}
|
| 426 |
|
| 427 |
/**
|
| 428 |
* 将一个对象实例注册到对象实例容器,以便稍后取出
|
| 429 |
*
|
| 430 |
* example:
|
| 431 |
* <code>
|
| 432 |
* $obj =& new MyClass();
|
Filename: D:\website\www.synnovo.com\APP\Controller\Default.php [11]
#5 FLEA::getSingleton('Model_Article')
ARGS:
Array
(
[0] => Model_Article
)
SOURCE CODE:
| 1 |
<?php
|
| 2 |
class Controller_Default extends Controller_BaseController {
|
| 3 |
var $_modelArticle;
|
| 4 |
var $_modelEnArticle;
|
| 5 |
var $_modelHomeproduct;
|
| 6 |
var $_modelEnHomeproduct;
|
| 7 |
var $_modelEnProdCate;
|
| 8 |
var $_modelProdCate;
|
| 9 |
|
| 10 |
function Controller_Default(){
|
| 11 |
$this->_modelArticle=&FLEA::getSingleton('Model_Article');
|
| 12 |
$this->_modelEnArticle=&FLEA::getSingleton('Model_EnArticle');
|
| 13 |
$this->_modelHomeproduct=&FLEA::getSingleton('Model_Homeproduct');
|
| 14 |
$this->_modelEnHomeproduct=&FLEA::getSingleton('Model_EnHomeproduct');
|
| 15 |
$this->_modelEnProdCate=&FLEA::getSingleton('Model_EnProdCate');
|
| 16 |
$this->_modelProdCate=&FLEA::getSingleton('Model_ProdCate');
|
| 17 |
parent::Controller_BaseController();
|
| 18 |
}
|
| 19 |
//英文版
|
| 20 |
function actionIndex(){
|
| 21 |
$prod=$this->_modelEnProdCate->findAll('fid=0 && tid=0','cateid ASC');
|
Filename: D:\website\www.synnovo.com\libs\FLEA\FLEA\Dispatcher\Simple.php [106]
#4 Controller_Default::Controller_Default('default')
ARGS:
Array
(
[0] => default
)
SOURCE CODE:
| 96 |
|
| 97 |
$controller = null;
|
| 98 |
$controllerClassFilename = null;
|
| 99 |
do {
|
| 100 |
// 载入控制对应的类定义
|
| 101 |
if (!$this->_loadController($controllerClass)) { break; }
|
| 102 |
|
| 103 |
// 构造控制器对象
|
| 104 |
FLEA::setAppInf('FLEA.internal.currentControllerName', $controllerName);
|
| 105 |
FLEA::setAppInf('FLEA.internal.currentActionName', $actionName);
|
| 106 |
$controller =& new $controllerClass($controllerName);
|
| 107 |
if (!method_exists($controller, $actionMethod)) { break; }
|
| 108 |
if (method_exists($controller, '__setController')) {
|
| 109 |
$controller->__setController($controllerName, $actionName);
|
| 110 |
}
|
| 111 |
if (method_exists($controller, '__setDispatcher')) {
|
| 112 |
$controller->__setDispatcher($this);
|
| 113 |
}
|
| 114 |
|
| 115 |
// 调用 _beforeExecute() 方法
|
| 116 |
if (method_exists($controller, '_beforeExecute')) {
|
Filename: D:\website\www.synnovo.com\libs\FLEA\FLEA\Dispatcher\Simple.php [77]
#3 FLEA_Dispatcher_Simple::_executeAction('default', 'index', 'Controller_Default')
ARGS:
Array
(
[0] => default
[1] => index
[2] => Controller_Default
)
SOURCE CODE:
| 67 |
|
| 68 |
/**
|
| 69 |
* 从请求中分析 Controller、Action 和 Package 名字,然后执行指定的 Action 方法
|
| 70 |
*
|
| 71 |
* @return mixed
|
| 72 |
*/
|
| 73 |
function dispatching()
|
| 74 |
{
|
| 75 |
$controllerName = $this->getControllerName();
|
| 76 |
$actionName = $this->getActionName();
|
| 77 |
return $this->_executeAction($controllerName, $actionName, $this->getControllerClass($controllerName));
|
| 78 |
}
|
| 79 |
|
| 80 |
/**
|
| 81 |
* 执行指定的 Action 方法
|
| 82 |
*
|
| 83 |
* @param string $controllerName
|
| 84 |
* @param string $actionName
|
| 85 |
* @param string $controllerClass
|
| 86 |
*
|
| 87 |
* @return mixed
|
Filename: D:\website\www.synnovo.com\libs\FLEA\FLEA.php [816]
#2 FLEA_Dispatcher_Simple::dispatching()
ARGS:
Array
(
)
SOURCE CODE:
| 806 |
require_once($MVCPackageFilename);
|
| 807 |
}
|
| 808 |
FLEA::init();
|
| 809 |
|
| 810 |
// 载入调度器并转发请求到控制器
|
| 811 |
$dispatcherClass = FLEA::getAppInf('dispatcher');
|
| 812 |
FLEA::loadClass($dispatcherClass);
|
| 813 |
|
| 814 |
$dispatcher =& new $dispatcherClass($_GET);
|
| 815 |
FLEA::register($dispatcher, $dispatcherClass);
|
| 816 |
$dispatcher->dispatching();
|
| 817 |
}
|
| 818 |
|
| 819 |
/**
|
| 820 |
* 准备运行环境
|
| 821 |
*
|
| 822 |
* @param boolean $loadMVC
|
| 823 |
*/
|
| 824 |
function init($loadMVC = false)
|
| 825 |
{
|
| 826 |
static $firstTime = true;
|
Filename: D:\website\www.synnovo.com\index.php [8]
#1 FLEA::runMVC()
ARGS:
Array
(
)
SOURCE CODE:
| 1 |
<?php
|
| 2 |
date_default_timezone_set('Asia/chongqing');
|
| 3 |
require('include/global.php');
|
| 4 |
require('libs/FLEA/FLEA.php');
|
| 5 |
FLEA::loadAppInf('include/APP_INF.php');
|
| 6 |
FLEA::import(dirname(__FILE__).'/APP');
|
| 7 |
FLEA::import(dirname(__FILE__).'/libs');
|
| 8 |
FLEA::runMVC();
|
| 9 |
?> |