I think I found my pwg_log problem.
MariaDB [piwigo]> DESCRIBE history;
+--------------+---------------------------------------------------------------------------------------------------------------------------------+------+-----+------------+----------------+
| Field | Type | Null | Key | Default | Extra |
+--------------+---------------------------------------------------------------------------------------------------------------------------------+------+-----+------------+----------------+
| id | int(10) unsigned | NO | PRI | NULL | auto_increment |
| date | date | NO | | 1970-01-01 | |
| time | time | NO | | 00:00:00 | |
| user_id | mediumint(8) unsigned | NO | | 0 | |
| IP | char(39) | NO | | | |
| section | enum('categories','tags','search','list','favorites','most_visited','best_rated','recent_pics','recent_cats','additional_page') | YES | | NULL | |
| category_id | smallint(5) | YES | | NULL | |
| search_id | int(10) unsigned | YES | | NULL | |
| tag_ids | varchar(50) | YES | | NULL | |
| image_id | mediumint(8) | YES | | NULL | |
| image_type | enum('picture','high','other') | YES | | NULL | |
| format_id | int(11) unsigned | YES | | NULL | |
| auth_key_id | int(11) unsigned | YES | | NULL | |
| is_slideshow | enum('true','false') | NO | | false | |
+--------------+---------------------------------------------------------------------------------------------------------------------------------+------+-----+------------+----------------+
14 rows in set (0.001 sec)
MariaDB [piwigo]> SELECT MAX(category_id) FROM history;
+------------------+
| MAX(category_id) |
+------------------+
| 32767 |
+------------------+
1 row in set (0.266 sec)
I hope this fixed it... will see:
MariaDB [piwigo]> ALTER TABLE history MODIFY category_id INT UNSIGNED DEFAULT NULL;
Query OK, 1000296 rows affected (1.265 sec)
Records: 1000296 Duplicates: 0 Warnings: 0