0

我在某个页面上遇到 500 错误的问题: http://www.artevolution.com/shop/abstract.html?p=9

这是我得到的支持票:

看起来分段错误发生在以下查询中:

SELECT `_default_table`.`entity_id`,
       `_default_table`.`entity_type`,
       Ifnull(_store_table.code_id, _default_table.code_id)
       AS `code_id`,
       Ifnull(_store_table.store_id, _default_table.store_id)
       AS `store_id`,
       Ifnull(_store_table.control_script, _default_table.control_script)
       AS
       `control_script`,
       Ifnull(_store_table.tracking_script, _default_table.tracking_script)
       AS
       `tracking_script`,
       Ifnull(_store_table.conversion_script, _default_table.conversion_script)
       AS
       `conversion_script`,
       Ifnull(_store_table.conversion_page, _default_table.conversion_page)
       AS
       `conversion_page`,
       Ifnull(_store_table.additional_data, _default_table.additional_data)
       AS
       `additional_data`
FROM   `googleoptimizer_code` AS `_default_table`
       LEFT JOIN `googleoptimizer_code` AS `_store_table`
              ON _store_table.entity_id = _default_table.entity_id
                 AND _store_table.entity_type = _default_table.entity_type
                 AND _store_table.store_id = 2
WHERE  ( _default_table.entity_id = '' )
       AND ( _default_table.entity_type = 'category' )
       AND ( _default_table.store_id IN ( 0, '2' ) )
ORDER  BY `_default_table`.`store_id` DESC
LIMIT  1; 

您需要让开发人员查看生成此查询的内容,以及我提到的其他三个查询(为方便起见,我将在下面再次提供它们),看看他们是否可以查明正在发生的事情在代码中(这可能会导致查询循环)。查询如下:

SELECT `catalog_category_entity`.*
FROM   `catalog_category_entity`
WHERE  ( entity_id = '' ); 
SELECT `attr_table`.*
FROM   `catalog_category_entity_varchar` AS `attr_table`
WHERE  ( attr_table.entity_id = '' )
       AND ( attr_table.store_id IN ( 0, '2' ) )
UNION
SELECT `attr_table`.*
FROM   `catalog_category_entity_int` AS `attr_table`
WHERE  ( attr_table.entity_id = '' )
       AND ( attr_table.store_id IN ( 0, '2' ) )
UNION
SELECT `attr_table`.*
FROM   `catalog_category_entity_text` AS `attr_table`
WHERE  ( attr_table.entity_id = '' )
       AND ( attr_table.store_id IN ( 0, '2' ) )
UNION
SELECT `attr_table`.*
FROM   `catalog_category_entity_datetime` AS `attr_table`
WHERE  ( attr_table.entity_id = '' )
       AND ( attr_table.store_id IN ( 0, '2' ) )
ORDER  BY `store_id` ASC; 
SELECT `_default_table`.`entity_id`,
       `_default_table`.`entity_type`,
       Ifnull(_store_table.code_id, _default_table.code_id)
       AS `code_id`,
       Ifnull(_store_table.store_id, _default_table.store_id)
       AS `store_id`,
       Ifnull(_store_table.control_script, _default_table.control_script)
       AS
       `control_script`,
       Ifnull(_store_table.tracking_script, _default_table.tracking_script)
       AS
       `tracking_script`,
       Ifnull(_store_table.conversion_script, _default_table.conversion_script)
       AS
       `conversion_script`,
       Ifnull(_store_table.conversion_page, _default_table.conversion_page)
       AS
       `conversion_page`,
       Ifnull(_store_table.additional_data, _default_table.additional_data)
       AS
       `additional_data`
FROM   `googleoptimizer_code` AS `_default_table`
       LEFT JOIN `googleoptimizer_code` AS `_store_table`
              ON _store_table.entity_id = _default_table.entity_id
                 AND _store_table.entity_type = _default_table.entity_type
                 AND _store_table.store_id = 2
WHERE  ( _default_table.entity_id = '' )
       AND ( _default_table.entity_type = 'category' )
       AND ( _default_table.store_id IN ( 0, '2' ) )
ORDER  BY `_default_table`.`store_id` DESC
LIMIT  1; 

我还在服务器上的以下位置放置了 strace 的副本以及来自 strace 的相关查询:http: //deathbecomesher.ca/artevo/segFaultPageLoadQueries.txt http://deathbecomesher.ca/artevo/ segFaultPageLoadStrace.txt

有没有人对如何解决这个问题有想法?我是一名新开发人员,不确定如何进行。非常感谢您的阅读。

4

0 回答 0