Radicore Forum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » RADICORE development » Bug Reports » Task (Proc) show 100 pagination bug (Task (Proc) list result in show 100 per page pagination error when over 100 items available)
Task (Proc) show 100 pagination bug [message #3872] Fri, 08 November 2013 04:00 Go to next message
kong is currently offline  kong
Messages: 90
Registered: December 2011
Member
Go to Menu Systems -> Task(Proc) and bring up a list with all the tasks.

The result will show over 280 or so tasks with multiple pages when you select <show 10>, <show 25> or <show 50> as pagination option. However, when you select <show 100> the total number of tasks suddenly becomes exactly 100 and only the first page with the first 100 tasks can be accessed.
Re: Task (Proc) show 100 pagination bug [message #3873 is a reply to message #3872] Sat, 09 November 2013 05:57 Go to previous messageGo to next message
AJM is currently offline  AJM
Messages: 2367
Registered: April 2006
Location: Surrey, UK
Senior Member
I don't know which version of Radicore you are using, but I cannot reproduce this problem on any of my copies. I have even tried it on the Demonstration system at http://www.radicore.org/demo.php without any problems. When I visit Menu System->Task(Proc) it initially shows page 1 of 76 (759 rows at 10 rows per page). If I click on the 'Show 100' hyperlink it then shows page 1 of 8 (759 rows at 100 rows per page).

Re: (SOLVED) pagination error due to SQL_CALC_FOUND_ROWS bug [message #3877 is a reply to message #3873] Tue, 12 November 2013 12:58 Go to previous messageGo to next message
kong is currently offline  kong
Messages: 90
Registered: December 2011
Member
Isolated the problem as bug in mySQL 5.6.11

As example, I ran the following SQL statements that Radicore uses to determine numrows (to derive lastpage) for pagination:

SELECT SQL_CALC_FOUND_ROWS pattern_id, pattern_desc, (SELECT COUNT(task_id) FROM mnu_task WHERE mnu_task.pattern_id=mnu_pattern.pattern_id) AS task_count FROM mnu_pattern ORDER BY mnu_pattern.pattern_id asc LIMIT 10 OFFSET 0;
SELECT FOUND_ROWS()

with different numbers for LIMIT to check what FOUND_ROWS returns for different cases of LIMIT. In theory, FOUND_ROWS should yield the same result independently of what LIMIT is, but strangely it does not:

LIMIT RESULT
10 to 18 returns correct value 46
19 to 45 returns LIMIT value as result which is WRONG
46 and above returns correct value 46

I also noticed http://bugs.mysql.com/bug.php?id=62372 which could be related.

Because the behavior is tough to predict, I don't know when and where the problem will appear or disappear while records are being added to the db.
Re: (SOLVED) pagination error due to SQL_CALC_FOUND_ROWS bug [message #3878 is a reply to message #3877] Tue, 12 November 2013 14:57 Go to previous message
AJM is currently offline  AJM
Messages: 2367
Registered: April 2006
Location: Surrey, UK
Senior Member
I can't reproduce this problem with MySQL version 5.6.14. Perhaps it's time to upgrade?

Previous Topic: Tutorial
Next Topic: Documentation - typos and misspellings
Goto Forum:
  


Current Time: Fri Nov 22 03:18:27 EST 2024

Total time taken to generate the page: 0.01076 seconds