In-Portal Issue Tracker

Welcome to the In-Portal Open Source CMS Issue Tracker! This is a central management / tracking tool for all types of tasks / issues / bugs for the In-Portal Project. Before reporting any issues, please make sure to read the Guide into Issue Tracker and How to Properly Test and Report Bugs!

Dependency Graph View Issue ] Relation Graph ] Horizontal ]
related to child of duplicate of

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.



Web Development by Intechnic
In-Portal Open Source CMS
In-Portal Open Source CMS
Copyright © 2000 - 2009 MantisBT Group

Powered by Mantis Bugtracker