After installing ED 4.0.2 to update ED 3.2x I got this error message when trying to access the Component in the back-end:
1064 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 1 SQL=select count(1) from `#__discuss_thread` as a where a.`published` = '1' and a.`cluster_id` = '0' and a.`category_id` in ()
I went ahead and deleted the old database records, and have done a fresh install of ED 4.0.2 final so it will be hard to check the error. This is just to note that the error came up after installing over the old release version of ED 3.2.x
The fresh install of ED 4.0.2 worked perfectly.