CDbCommand konnte das SQL-Statement nicht ausführen: SQLSTATE[HY000]: General error: 1548 Cannot load from mysql.proc. The table is probably corrupted. The SQL statement executed was: SELECT
theView.PRO_ID,
MAX(min_dist) as min_dist,
MAX(dist) as dist,
SUM(amount) as amount,
SUM(amount_range) as amount_range
FROM (
(SELECT
@count := 0,
@oldId := 0 AS PRO_ID,
0 AS min_dist,
0 AS dist,
0 AS amount,
0 As amount_range)
UNION
(SELECT
@count := if(@oldId = id, @count+1, 0),
@oldId := id,
if(@count = 0, value, 0),
if(@count < 5, value, 0),
if(@count < 5, 1, 0),
if(value < 5, 1, 0)
FROM
(SELECT products.PRO_ID as id, cosines_distance(stores.STO_GPS_POINT, GeomFromText('POINT(47.5084280798357 8.76793548205717)')) as value
FROM products
LEFT JOIN pro_to_sto ON pro_to_sto.PRO_ID=products.PRO_ID
LEFT JOIN stores ON pro_to_sto.SUP_ID=stores.SUP_ID AND pro_to_sto.STY_ID=stores.STY_ID
WHERE stores.STO_GPS_POINT IS NOT NULL
ORDER BY products.PRO_ID, value ASC) AS theTable
)
) AS theView
WHERE theView.PRO_ID != 0 AND (dist != 0 OR amount_range != 0)
GROUP BY theView.PRO_ID;
– /var/www/db_2014_12_28/index.php(13): CApplication->run()
08 defined('YII_DEBUG') or define('YII_DEBUG',true);
09 // specify how many levels of call stack should be shown in each log message
10 defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL',3);
11
12 require_once($yii);
13 Yii::createWebApplication($config)->run();
Trace is:
CDbException
CDbCommand konnte das SQL-Statement nicht ausführen: SQLSTATE[HY000]: General error: 1548 Cannot load from mysql.proc. The table is probably corrupted. The SQL statement executed was: SELECT theView.PRO_ID, MAX(min_dist) as min_dist, MAX(dist) as dist, SUM(amount) as amount, SUM(amount_range) as amount_range FROM ( (SELECT @count := 0, @oldId := 0 AS PRO_ID, 0 AS min_dist, 0 AS dist, 0 AS amount, 0 As amount_range) UNION (SELECT @count := if(@oldId = id, @count+1, 0), @oldId := id, if(@count = 0, value, 0), if(@count < 5, value, 0), if(@count < 5, 1, 0), if(value < 5, 1, 0) FROM (SELECT products.PRO_ID as id, cosines_distance(stores.STO_GPS_POINT, GeomFromText('POINT(47.5084280798357 8.76793548205717)')) as value FROM products LEFT JOIN pro_to_sto ON pro_to_sto.PRO_ID=products.PRO_ID LEFT JOIN stores ON pro_to_sto.SUP_ID=stores.SUP_ID AND pro_to_sto.STY_ID=stores.STY_ID WHERE stores.STO_GPS_POINT IS NOT NULL ORDER BY products.PRO_ID, value ASC) AS theTable ) ) AS theView WHERE theView.PRO_ID != 0 AND (dist != 0 OR amount_range != 0) GROUP BY theView.PRO_ID;
/var/www/db_2014_12_28/lib/yii/framework/db/CDbCommand.php(543)
531 { 532 if($this->_connection->enableProfiling) 533 Yii::endProfile('system.db.CDbCommand.query('.$this->getText().$par.')','system.db.CDbCommand.query'); 534 535 $errorInfo=$e instanceof PDOException ? $e->errorInfo : null; 536 $message=$e->getMessage(); 537 Yii::log(Yii::t('yii','CDbCommand::{method}() failed: {error}. The SQL statement executed was: {sql}.', 538 array('{method}'=>$method, '{error}'=>$message, '{sql}'=>$this->getText().$par)),CLogger::LEVEL_ERROR,'system.db.CDbCommand'); 539 540 if(YII_DEBUG) 541 $message.='. The SQL statement executed was: '.$this->getText().$par; 542 543 throw new CDbException(Yii::t('yii','CDbCommand failed to execute the SQL statement: {error}', 544 array('{error}'=>$message)),(int)$e->getCode(),$errorInfo); 545 } 546 } 547 548 /* 549 * Builds a SQL SELECT statement from the given query specification. 550 * @param array $query the query specification in name-value pairs. The following 551 * query options are supported: {@link select}, {@link distinct}, {@link from}, 552 * {@link where}, {@link join}, {@link group}, {@link having}, {@link order}, 553 * {@link limit}, {@link offset} and {@link union}. 554 * @throws CDbException if "from" key is not present in given query parameter 555 \ @return string the SQL statement Stack Trace
0
1
– /var/www/db_2014_12_28/protected/controllers/ShoppinglistsController.php(335): CDbCommand->queryAll() 330 foreach ($youDistRows as $row){ 331 $youDistArray[$row['PRO_ID']] = array($row['dist'], $row['amount'], $row['min_dist'], $row['amount_range']); 332 } 333 } 334 if ($hasHomeDist){ 335 $homeDistRows = $HomeDistCommand->queryAll(); 336 $homeDistArray = array(); 337 foreach ($homeDistRows as $row){ 338 $homeDistArray[$row['PRO_ID']] = array($row['dist'], $row['amount'], $row['min_dist'], $row['amount_range']); 339 } 340 }
2
– /var/www/db_2014_12_28/protected/controllers/ShoppinglistsController.php(167): ShoppinglistsController->viewList(array("108", "33"), array("255.63", "232.39"), array("", ""), array("", ""), ...) 162 } else { 163 $MEA_ID = $meal['MEA_ID']; 164 $changed = (isset($meal['CHANGED_ON']) && $meal['CHANGED_ON'] > $model->CHANGED_ON); 165 } 166
167 $this->viewList($ing_ids, $ing_weights, $pro_ids, $gramm_values, $model->SHO_ID, $MEA_ID, $changed); 168 } 169
170
171 public function actionShowAllAsOne() { 172 $shoppinglists = Yii::app()->user->shoppinglists;
3
unknown(0): ShoppinglistsController->actionView("48")
4
5
6
7
8
9
10
11
12
13
14
15
16
17
– /var/www/db_2014_12_28/index.php(13): CApplication->run() 08 defined('YII_DEBUG') or define('YII_DEBUG',true); 09 // specify how many levels of call stack should be shown in each log message 10 defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL',3); 11 12 require_once($yii); 13 Yii::createWebApplication($config)->run();