mysql> SELECT DISTINCT h. FROM hosts h,host_discovery hd,items i,hosts ph WHERE h.flags='2' AND h.hostid=hd.hostid AND hd.parent_itemid=i.itemid AND i.hostid=ph.hostid AND ph.flags=0 AND 1=0;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 8
mysql> SELECT DISTINCT h. FROM hosts h,host_discovery hd,items i,hosts ph WHERE h.flags='2' AND h.hostid=hd.hostid AND hd.parent_itemid=i.itemid AND i.hostid=ph.hostid AND ph.flags=0 AND 1=0; ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 8
SELECT DISTINCT h. 这种语句会报错 SELECT h. 这种就不会报错
这个BUG可以修复不