Created attachment 211268 [details]
Created attachment 211269 [details]
Created attachment 211270 [details]
Created attachment 211271 [details]
Please give a detailed description. Are there any errors? If so, which ones?
Please a patch, not many small ones. Thanks :-)
Created attachment 212322 [details]
combined patches for SQL and *.c files
(In reply to Jochen Neumeister from comment #5)
There aren't any errors in the logs that I could see. I did noticed the SQL file, from the setting LogSQLPreserveFile, got bigger when the DB and web servers have been running for a long time. When I tried to enter the data manually by running that SQL file, all of the rows failed because the data is larger (> 65535) than column (child_pid) allowed (unsigned smallint). The patches allow the setting LogSQLCreateTables to work as intended. I don't recall the max limit of PID on FreeBSD 11.x but on 12.1-RELEASE, I see it goes up to 99922 as of this writing.
A commit references this bug:
Date: Thu Aug 6 15:09:19 UTC 2020
New revision: 544278
www/mod_log_sql: Fix PID > 65535
* PID > 65535 when 'LogSQLCreateTables On' 
* Fix WWW address
* 2 suffix (for Apache 2) is redundant, remove
PR: 243793 
Submitted by: Tommy P <tommyhp2 gmail com>
Thanks for the patch!