-
Bug
-
Resolution: Fixed
-
Blocker
-
3.0.5
-
None
-
PHP Environment: 5.2.10
Database: 5.1.37
Due to some wrong queries there is a possiblity that the log pages are incorrect counted.
Query to generate all data in admin logs:
SELECT l.*, u.username, u.username_clean, u.user_colour
|
FROM phpbb_log l, phpbb_users u
|
WHERE l.log_type = 0
|
AND u.user_id = l.user_id
|
ORDER BY l.log_time DESC
|
LIMIT 4050, 30
|
Query used for counting the number of items:
mysql> SELECT COUNT(l.log_id) AS total_entries
|
-> FROM phpbb_log l
|
-> WHERE l.log_type = 0
|
-> AND l.log_time >= 0
|
-> ;
|
+---------------+
|
| total_entries |
|
+---------------+
|
| 4072 |
|
+---------------+
|
1 row in set (0.02 sec)
|
Problem: In the count query there is no user table relation.
Count with user table included:
mysql> SELECT COUNT(l.log_id) AS total_entries
|
-> FROM phpbb_log l , phpbb_users u
|
-> WHERE l.log_type = 0
|
-> AND l.log_time >= 0
|
-> AND u.user_id = l.user_id
|
-> ;
|
+---------------+
|
| total_entries |
|
+---------------+
|
| 3698 |
|
+---------------+
|
1 row in set (0.02 sec)
|
This is ~400 lower, what is causing the last few pages aren't working.

