- android - RelativeLayout 背景可绘制重叠内容
- android - 如何链接 cpufeatures lib 以获取 native android 库?
- java - OnItemClickListener 不起作用,但 OnLongItemClickListener 在自定义 ListView 中起作用
- java - Android 文件转字符串
当我修改属于 bundle 的 Magento 1.7.0.2 简单产品时,有时会出现错误:
SQLSTATE[HY000]: General error: 2006 MySQL server has gone away.
在 mysql.slowquery.log 中出现了这个可怕的查询:
Query_time: 30.408723 Lock_time: 0.000463 Rows_sent: 0 Rows_examined: 128
SET timestamp=1353399962;
INSERT INTO `catalog_product_index_price_bundle_tmp` SELECT `e`.`entity_id`, `cg`.`customer_group_id`, `cw`.`website_id`, 0 AS `tax_class_id`, 0 AS `price_type`, IF(IF(IF(IFNULL(tas_special_from_date.value_id, -1) > 0, tas_special_from_date.value, tad_special_from_date.value) IS NULL, 1, IF(IF(IFNULL(tas_special_from_date.value_id, -1) > 0, tas_special_from_date.value, tad_special_from_date.value) <= cwd.website_date, 1, 0)) > 0 AND IF(IF(IFNULL(tas_special_to_date.value_id, -1) > 0, tas_special_to_date.value, tad_special_to_date.value) IS NULL, 1, IF(IF(IFNULL(tas_special_to_date.value_id, -1) > 0, tas_special_to_date.value, tad_special_to_date.value) >= cwd.website_date, 1, 0)) > 0 AND ta_special_price.value > 0 AND ta_special_price.value < 100 , ta_special_price.value, 0) AS `special_price`, tp.min_price AS `tier_percent`, IF(ta_price.value IS NULL, 0, ta_price.value) AS `orig_price`, 0 AS `price`, 0 AS `min_price`, 0 AS `max_price`, IF(tp.min_price IS NOT NULL, 0, NULL) AS `tier_price`, IF(tp.min_price IS NOT NULL, 0, NULL) AS `base_tier`, IF(IF(gp.price IS NOT NULL AND gp.price > 0 AND gp.price < 100, gp.price, 0) > 0, IF(gp.price IS NOT NULL AND gp.price > 0 AND gp.price < 100, gp.price, 0), NULL) AS `group_price`, IF(IF(gp.price IS NOT NULL AND gp.price > 0 AND gp.price < 100, gp.price, 0) > 0, IF(gp.price IS NOT NULL AND gp.price > 0 AND gp.price < 100, gp.price, 0), NULL) AS `base_group_price`, gp.price AS `group_price_percent` FROM `catalog_product_entity` AS `e`
CROSS JOIN `customer_group` AS `cg`
CROSS JOIN `core_website` AS `cw`
INNER JOIN `core_store_group` AS `csg` ON csg.group_id = cw.default_group_id
INNER JOIN `core_store` AS `cs` ON cs.store_id = csg.default_store_id
INNER JOIN `catalog_product_website` AS `pw` ON pw.product_id = e.entity_id AND pw.website_id = cw.website_id
INNER JOIN `catalog_product_index_website` AS `cwd` ON cw.website_id = cwd.website_id
LEFT JOIN `catalog_product_index_tier_price` AS `tp` ON tp.entity_id = e.entity_id AND tp.website_id = cw.website_id AND tp.customer_group_id = cg.customer_group_id
LEFT JOIN `catalog_product_index_group_price` AS `gp` ON gp.entity_id = e.entity_id AND gp.website_id = cw.website_id AND gp.customer_group_id = cg.customer_group_id
INNER JOIN `catalog_product_entity_int` AS `tad_status` ON tad_status.entity_id = e.entity_id AND tad_status.attribute_id = 89 AND tad_status.store_id = 0
LEFT JOIN `catalog_product_entity_int` AS `tas_status` ON tas_status.entity_id = e.entity_id AND tas_status.attribute_id = 89 AND tas_status.store_id = cs.store_id
LEFT JOIN `catalog_product_entity_int` AS `tad_tax_class_id` ON tad_tax_class_id.entity_id = e.entity_id AND tad_tax_class_id.attribute_id = 115 AND tad_tax_class_id.store_id = 0
LEFT JOIN `catalog_product_entity_int` AS `tas_tax_class_id` ON tas_tax_class_id.entity_id = e.entity_id AND tas_tax_class_id.attribute_id = 115 AND tas_tax_class_id.store_id = cs.store_id
INNER JOIN `catalog_product_entity_int` AS `ta_price_type` ON ta_price_type.entity_id = e.entity_id AND ta_price_type.attribute_id = 117 AND ta_price_type.store_id = 0
LEFT JOIN `catalog_product_entity_decimal` AS `ta_price` ON ta_price.entity_id = e.entity_id AND ta_price.attribute_id = 69 AND ta_price.store_id = 0
LEFT JOIN `catalog_product_entity_decimal` AS `ta_special_price` ON ta_special_price.entity_id = e.entity_id AND ta_special_price.attribute_id = 70 AND ta_special_price.store_id = 0
LEFT JOIN `catalog_product_entity_datetime` AS `tad_special_from_date` ON tad_special_from_date.entity_id = e.entity_id AND tad_special_from_date.attribute_id = 71 AND tad_special_from_date.store_id = 0
LEFT JOIN `catalog_product_entity_datetime` AS `tas_special_from_date` ON tas_special_from_date.entity_id = e.entity_id AND tas_special_from_date.attribute_id = 71 AND tas_special_from_date.store_id = cs.store_id
LEFT JOIN `catalog_product_entity_datetime` AS `tad_special_to_date` ON tad_special_to_date.entity_id = e.entity_id AND tad_special_to_date.attribute_id = 72 AND tad_special_to_date.store_id = 0
LEFT JOIN `catalog_product_entity_datetime` AS `tas_special_to_date` ON tas_special_to_date.entity_id = e.entity_id AND tas_special_to_date.attribute_id = 72 AND tas_special_to_date.store_id = cs.store_id WHERE (e.type_id='bundle') AND (IF(IFNULL(tas_status.value_id, -1) > 0, tas_status.value, tad_status.value)=1) AND (ta_price_type.value=0) AND (e.entity_id IN(2399, 2400, 2401, 2402)) ON DUPLICATE KEY UPDATE `tax_class_id` = VALUES(`tax_class_id`), `price_type` = VALUES(`price_type`), `special_price` = VALUES(`special_price`), `tier_percent` = VALUES(`tier_percent`), `orig_price` = VALUES(`orig_price`), `price` = VALUES(`price`), `min_price` = VALUES(`min_price`), `max_price` = VALUES(`max_price`), `tier_price` = VALUES(`tier_price`), `base_tier` = VALUES(`base_tier`), `group_price` = VALUES(`group_price`), `base_group_price` = VALUES(`base_group_price`), `group_price_percent` = VALUES(`group_price_percent`);
在数据库中,表 catalog_product_index_price_bundle_tmp 是空的。
谢谢。
最佳答案
关于mysql - Magento bundle 产品 SQLSTATE[HY000] : General error: 2006 MySQL server has gone away,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13471458/
我了解如何使用hy.read_str和hy.eval从 python 评估 hy来自 python 内部的表达式。但是,当我使用这种方法时,导入和全局变量不会在 hy 之间共享。和python环境。考
我知道如何将 hy 模块导入到 python 中。我所要做的就是创建一个包含 hy 代码的 something.hy 文件,然后执行以下操作... import hy import something
如何将对象 HyExpression 打印为 HyExpression([ HyExpression([ HySymbol('/'), HyInteger(2)]),
我正在编写宏以简化使用 matplotlib 绘制绘图的过程。我的第一次尝试,如下所示,工作正常: (defmacro insert-ax [body] `((getattr g!ax (str '~
Hy 中指定元类的语法是什么。我尝试了以下方法: (defclass Metaclass [] ) (defclass Foo [ :meta Metaclass ] ) (defclass Foo
我查看了所有 Hy 的文档,但找不到在任何地方创建对象的方法。更具体地说,我正在尝试关注 this PySide tutorial ,但将每个命令转换为 Hy,我不确定如何在 Hy 中执行 app =
我想得到 Hy! 在 Hylang 中,我如何执行简单的 Python 循环: for i in range(5): print(i) 最佳答案 tutorial提供了这个例子: (for [
有什么方法可以用 Hy 中的索引替换列表或字典元素的值吗?nth 函数似乎不对应 Python 的方括号。 我期待的是下面的翻译。 (setv lst [1 2 3]) (setv (nth lst
我想在 hy 中执行以下操作: from StringIO import StringIO import pandas as pd s = """sepal_length sepal_width
在 python 中,以下代码迭代 numpy 数组(for 循环),并且 numpy 数组的值发生更改: import numpy a08_1 = numpy.arange(8).astype(nu
我想使用 Hy ,一种基于 Python 的 Lisp 方言。然而,我的同事都使用 Python,并且不太可能很快切换到 Lisp 方言。 如何将 Hy 代码打包到标准 Python 模块中? 最佳答
我在玩符号,惊讶地看到: hy 0.18.0 using CPython(default) 3.7.3 on Linux => (bool '0) False => (bool 'False) Tru
我已经从 https://github.com/hylang/hy-mode 成功安装了 hy-mode .我现在可以在 emacs 中打开 .hy 文件并进行语法高亮显示,并且使用 paredit
当我使用 -hy 标志来分析我的程序的堆使用情况时 ./prog +RTS -hy 经常看到构造函数*在结果中,以及其他构造函数,例如 []和 Word8 . 什么类型*在这种情况下?是否与kinds
我不明白为什么会出现这个错误 if (isset($_POST['submit'])) { require "../config.php"; require "../common.ph
我是一名优秀的程序员,十分优秀!