everycook / EveryCook

The worlds best recipe database
31 stars 7 forks source link

Shopping list bug #176

Closed everycook closed 9 years ago

everycook commented 9 years ago

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

swerder commented 9 years ago

this logic is completely changed in Testsystem, and will not occur any more after bring it to production.