Exception: FLEA_Db_Exception_SqlQuery
Message: SQL 错误消息: "Got error 28 from storage engine"
SQL 语句: "SHOW FULL COLUMNS FROM `searchkey`"
SQL 错误代码: "7335941".
Filename: /www/www.hitraders.com/Libs/FLEA/FLEA/Db/Driver/Mysql.php [244]
#11 FLEA_Db_Driver_Mysql::execute('SHOW FULL COLUMNS FROM `sea ...')
ARGS:
Array
(
[0] => SHOW FULL COLUMNS FROM `searchkey`
)
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: /www/www.hitraders.com/Libs/FLEA/FLEA/Db/TableDataGateway.php [1865]
#10 FLEA_Db_Driver_Mysql::metaColumns('`searchkey`')
ARGS:
Array
(
[0] => `searchkey`
)
SOURCE CODE:
| 1855 |
$this->meta = isset($allMeta[$metaID]) ? $allMeta[$metaID] : null;
|
| 1856 |
if (is_array($this->meta) && !empty($this->meta)) {
|
| 1857 |
FLEA::setAppInf($metaID, $this->meta);
|
| 1858 |
return true;
|
| 1859 |
}
|
| 1860 |
}
|
| 1861 |
|
| 1862 |
/**
|
| 1863 |
* 从数据库获得 meta
|
| 1864 |
*/
|
| 1865 |
$this->meta = $this->dbo->metaColumns($this->qtableName);
|
| 1866 |
if (!is_array($this->meta) || empty($this->meta)) {
|
| 1867 |
FLEA::loadClass('FLEA_Db_Exception_MetaColumnsFailed');
|
| 1868 |
return __THROW(new FLEA_Db_Exception_MetaColumnsFailed($this->qtableName));
|
| 1869 |
}
|
| 1870 |
FLEA::setAppInf($metaID, $this->meta);
|
| 1871 |
|
| 1872 |
if ($cached) {
|
| 1873 |
$allMeta = FLEA::getCache($cacheId, FLEA::getAppInf('dbMetaLifetime'));
|
| 1874 |
if (!is_array($allMeta)) { $allMeta = array(); }
|
| 1875 |
$allMeta[$metaID] = $this->meta;
|
Filename: /www/www.hitraders.com/Libs/FLEA/FLEA/Db/TableDataGateway.php [333]
#9 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: /www/www.hitraders.com/Libs/FLEA/FLEA/Db/TableDataGateway.php [306]
#8 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.26-rc
[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] => 2YU49WfLQnw7AfGe
[database] => hibuy0_himporter
[port] =>
[options] =>
[prefix] =>
[schema] =>
[id] => mysql://root:2YU49WfLQnw7AfGe@localhost_/hibuy0_himporter//
)
[conn] => Resource id #10
[log] => Array
(
[0] => SELECT VERSION()
[1] => SET NAMES 'utf8'
[2] => SHOW FULL COLUMNS FROM `searchkey`
)
[querycount] => 3
[lasterr] => Got error 28 from storage engine
[lasterrcode] => 1030
[_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: /www/www.hitraders.com/Libs/FLEA/FLEA.php [425]
#7 FLEA_Db_TableDataGateway::FLEA_Db_TableDataGateway()
ARGS:
Array
(
)
SOURCE CODE:
| 415 |
} else {
|
| 416 |
$classExists = class_exists($className);
|
| 417 |
}
|
| 418 |
if (!$classExists) {
|
| 419 |
if (!FLEA::loadClass($className)) {
|
| 420 |
$return = false;
|
| 421 |
return $return;
|
| 422 |
}
|
| 423 |
}
|
| 424 |
|
| 425 |
$instances[$className] =& new $className();
|
| 426 |
FLEA::register($instances[$className], $className);
|
| 427 |
return $instances[$className];
|
| 428 |
}
|
| 429 |
|
| 430 |
/**
|
| 431 |
* 将一个对象实例注册到对象实例容器,以便稍后取出
|
| 432 |
*
|
| 433 |
* example:
|
| 434 |
* <code>
|
| 435 |
* $obj =& new MyClass();
|
Filename: /www/www.hitraders.com/App/Controller/Default.php [534]
#6 FLEA::getSingleton('Table_Searchkey')
ARGS:
Array
(
[0] => Table_Searchkey
)
SOURCE CODE:
| 524 |
$FriendLink[$val['classid']]['link'][] = $val;
|
| 525 |
$FriendLink[$val['classid']]['classname'] = $val['classname'];
|
| 526 |
}
|
| 527 |
}
|
| 528 |
$this->smarty->assign('FriendLink', $FriendLink);
|
| 529 |
}
|
| 530 |
$this->smarty->display('FriendLink.html','FriendLink');
|
| 531 |
}
|
| 532 |
|
| 533 |
function _getKey($Limit = 0, $ClassId = 0, $istop = 0, $byChlid = false) {
|
| 534 |
$tableKey =& FLEA::getSingleton('Table_Searchkey');
|
| 535 |
$tableKey->disableLinks();
|
| 536 |
$istop = intval($istop);
|
| 537 |
$Limit = intval($Limit);
|
| 538 |
$ClassId = intval($ClassId);
|
| 539 |
if($istop) $sqlWhere = " AND istop=1";
|
| 540 |
if($Limit) $sqlLimit = " LIMIT $Limit";
|
| 541 |
if($byChlid){
|
| 542 |
$dataKey = $tableKey->findBySql("SELECT key_id,flag,keyname,parent_id FROM searchkey WHERE parent_id=0 $sqlWhere ORDER BY addtime DESC $sqlLimit");
|
| 543 |
foreach($dataKey AS $key=>$value){
|
| 544 |
$dataKey[$key]['childkey'] = $tableKey->findBySql("SELECT key_id,flag,keyname,parent_id FROM searchkey WHERE parent_id=".$value['key_id']." $sqlWhere ORDER BY addtime DESC LIMIT 10");
|
Filename: /www/www.hitraders.com/App/Controller/Default.php [14]
#5 Controller_Default::_getKey(8)
ARGS:
Array
(
[0] => 8
)
SOURCE CODE:
| 4 |
var $QueryString = array();
|
| 5 |
var $navigation = '<a href="index.php">Home</a> > ';
|
| 6 |
var $Cache,$tpp,$page,$flag,$country,$cacheId,$cachedr,$toPage,$action,$smarty,$meta,$cartCount;
|
| 7 |
|
| 8 |
function Controller_Default() {
|
| 9 |
FLEA::loadFile('Admin_Modules_Cache');
|
| 10 |
$this->Cache =& new Modules_Cache();
|
| 11 |
$this->CacheCountry = $this->Cache->getCountry();
|
| 12 |
$cart = @unserialize($_COOKIE['cart']);
|
| 13 |
$this->cartCount = $cart['count'] ? $cart['count'] : 0;
|
| 14 |
$TopkeyList = $this->_getKey(8);
|
| 15 |
$this->QueryString = getQueryString();
|
| 16 |
$this->smarty =& parent::_getView();
|
| 17 |
$this->smarty->caching = true;
|
| 18 |
$this->smarty->cache_lifetime = SEARCHCACHETIME;
|
| 19 |
$this->smarty->clear_all_assign();
|
| 20 |
$this->tpp = 10;
|
| 21 |
$this->action = $_GET['action'];
|
| 22 |
$this->country = $this->QueryString['country'] ? $this->QueryString['country'] : 0;
|
| 23 |
$this->flag = $this->QueryString['flag'] ? $this->QueryString['flag'] : 0;
|
| 24 |
$this->flag = in_array($this->flag,array(0,2,3,4,8,9)) ? $this->flag : 2;
|
Filename: /www/www.hitraders.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: /www/www.hitraders.com/Libs/FLEA/FLEA/Dispatcher/Simple.php [77]
#3 FLEA_Dispatcher_Simple::_executeAction('Default', 'ProductList', 'Controller_Default')
ARGS:
Array
(
[0] => Default
[1] => ProductList
[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: /www/www.hitraders.com/Libs/FLEA/FLEA.php [803]
#2 FLEA_Dispatcher_Simple::dispatching()
ARGS:
Array
(
)
SOURCE CODE:
| 793 |
require_once($MVCPackageFilename);
|
| 794 |
}
|
| 795 |
FLEA::init();
|
| 796 |
|
| 797 |
// 载入调度器并转发请求到控制器
|
| 798 |
$dispatcherClass = FLEA::getAppInf('dispatcher');
|
| 799 |
FLEA::loadClass($dispatcherClass);
|
| 800 |
|
| 801 |
$dispatcher =& new $dispatcherClass($_GET);
|
| 802 |
FLEA::register($dispatcher, $dispatcherClass);
|
| 803 |
$dispatcher->dispatching();
|
| 804 |
}
|
| 805 |
|
| 806 |
/**
|
| 807 |
* 准备运行环境
|
| 808 |
*
|
| 809 |
* @param boolean $loadMVC
|
| 810 |
*/
|
| 811 |
function init($loadMVC = false)
|
| 812 |
{
|
| 813 |
static $firstTime = true;
|
Filename: /www/www.hitraders.com/index.php [28]
#1 FLEA::runMVC()
ARGS:
Array
(
)
SOURCE CODE:
| 18 |
'compile_dir' => APP_ROOT . '/Caches/Templates_c',
|
| 19 |
'config_dir' => APP_ROOT . '/Caches/Configs',
|
| 20 |
'cache_dir' => APP_ROOT . '/Caches/Cache',
|
| 21 |
'left_delimiter' => '<!--{',
|
| 22 |
'right_delimiter' => '}-->',
|
| 23 |
);
|
| 24 |
|
| 25 |
FLEA::setAppInf('viewConfig',$viewConfig);
|
| 26 |
FLEA::setAppInf('controllerAccessor','c');
|
| 27 |
FLEA::import(APP_ROOT . '/App');
|
| 28 |
FLEA::runMVC();
|
| 29 |
?> |