Please sign in to comment.
Don't preserve SELECT columns on COUNT
The COUNT clause of a finder_sql relationship is being rewritten from COUNT(*) to COUNT(table_name.*). This does not appear to be valid syntax in MySQL: ``` mysql> SELECT COUNT( table_name.* ) FROM `table_name`; 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 '* ) FROM `table_name`' at line 1 ``` This Fixes the bug, as well as adding tests so we don't re-introduce it in the future. Fixes #3956.
- Loading branch information...
Showing with 36 additions and 3 deletions.