Anonymous | Login | Signup for a new account | 2024-03-28 12:26 CDT |
Main | My View | View Issues | Change Log | Roadmap | Docs | Wiki | Repositories |
Dependency Graph | [ View Issue ] [ Relation Graph ] [ Horizontal ] | |||
|
||||
|
Viewing Issue Simple Details | |||||
ID | Category | Type | Reproducibility | Date Submitted | Last Update |
0000938 | [In-Portal CMS] Database | bug report | always | 2010-11-30 12:10 | 2011-03-30 09:53 |
Reporter | BaSSiST | View Status | public | ||
Assigned To | alex | ||||
Priority | normal | Resolution | fixed | ||
Status | closed | ||||
Summary | 0000938: Generation of COUNT SQL Fails with DISTINCT in sub-query | ||||
Description |
There is a bug in kDBList::getCountSQL method, which generates SQL for counting list totals. It checks if there's DISTINCT in SQL and, if it's there, tries to replace it for COUNT(DISTINCT...) construction instead of simple COUNT(*). Problem is that it checks for distinct in ANY place of query, but replaces it in beginning, so, if there's DISTINCT in subquery, it won't replace anything. So, count SQL will be equal to list SQL, and you will get first record's first field's value (according to kDBConnection::GetOne logic) as record count. |
||||
Additional Information | Patch also, checks for ANY number of whitespaces between SELECT and DISTINCT, instead of one space. |
Main | My View | View Issues | Change Log | Roadmap | Docs | Wiki | Repositories |
Web Development by Intechnic In-Portal Open Source CMS |