在使用过程中出现了一个奇怪的现象
mysql> explain SELECT
-> COUNT(DISTINCT acc_name)
-> FROM
-> login_2011_01
-> WHERE crdate >= 1293811200
-> AND acc_name NOT IN
-> (SELECT
-> acc_name
-> FROM
-> login_2010_12
-> WHERE crdate >= 1292428800
-> AND crdate < 1293724800
-> AND acc_name NOT IN
-> (SELECT
-> acc_name
-> FROM
-> logout_2010_12
-> WHERE crdate >= 1292428800
-> AND crdate < 1293724800
-> AND zone_code IN (21, 22))
-> AND zone_code IN (21, 22)) ;
+----+--------------------+----------------+------+---------------+------+---------+------+------+-----------------------------------+
| id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra |
+----+--------------------+----------------+------+---------------+------+---------+------+------+-----------------------------------+
| 1 | PRIMARY | login_2011_01 | ALL | NULL | NULL | NULL | NULL | 2000 | Using where with pushed condition |
| 2 | DEPENDENT SUBQUERY | login_2010_12 | ALL | NULL | NULL | NULL | NULL | 2000 | Using where with pushed condition |
| 3 | DEPENDENT SUBQUERY | logout_2010_12 | ALL | NULL | NULL | NULL | NULL | 2000 | Using where with pushed condition |
+----+--------------------+----------------+------+---------------+------+---------+------+------+-----------------------------------+
3 rows in set (0.87 sec)
mysql> SELECT
-> COUNT(DISTINCT acc_name)
-> FROM
-> login_2011_01
-> WHERE crdate >= 1293811200
-> AND acc_name NOT IN
-> (SELECT
-> acc_name
-> FROM
-> login_2010_12
-> WHERE crdate >= 1292428800
-> AND crdate < 1293724800
-> AND acc_name NOT IN
-> (SELECT
-> acc_name
-> FROM
-> logout_2010_12
-> WHERE crdate >= 1292428800
-> AND crdate < 1293724800
-> AND zone_code IN (21, 22))
-> AND zone_code IN (21, 22)) ;
ERROR 138 (HY000): IDB-1001: Function 'trigcond' can only be used in the outermost select or order by clause and cannot be used in conjunction with an aggregate function.
语句可解析,而不可执行,报了一个错误
ICE支持多层嵌套使用了相关的参数
Saver 10:23:37
你那边ICE跑这种多层嵌套的语句会报错么?
吴炳锡 10:24:07
ICE需要开启一个参数就行了.
吴炳锡 10:24:29
没看到order by 这个字段呀.
Saver 10:24:32
ICE开啥参数?
吴炳锡 10:25:21
AllowMySQLQueryPath = 1
重启服务后执行该操作
14 | root | localhost | qt_gamelog_new | Query | 401 | Sending data | SELECT COUNT(DISTINCT acc_name) FROM login_2011_01 WHERE crdate >= 1293811200 AND acc_name |
呆住了。。。
某BUG。。。无语中
阅读(1566) | 评论(1) | 转发(0) |