Bug 243793 - www/mod_log_sql2: fix for FreeBSD's PID > 65535 when 'LogSQLCreateTables On'
Summary: www/mod_log_sql2: fix for FreeBSD's PID > 65535 when 'LogSQLCreateTables On'
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Bernard Spil
URL:
Keywords: needs-qa, patch
Depends on:
Blocks:
 
Reported: 2020-02-02 09:11 UTC by Tommy P
Modified: 2020-08-06 15:20 UTC (History)
3 users (show)

See Also:
bugzilla: maintainer-feedback? (apache)


Attachments
contrib/create_tables.sql (354 bytes, patch)
2020-02-02 09:12 UTC, Tommy P
no flags Details | Diff
mod_log_sql_dbi.c (390 bytes, patch)
2020-02-02 09:13 UTC, Tommy P
no flags Details | Diff
mod_log_sql_mysql.c (397 bytes, patch)
2020-02-02 09:13 UTC, Tommy P
no flags Details | Diff
mod_log_sql_pgsql.c (394 bytes, patch)
2020-02-02 09:14 UTC, Tommy P
no flags Details | Diff
combined patches for SQL and *.c files (1.50 KB, patch)
2020-03-11 02:22 UTC, Tommy P
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tommy P 2020-02-02 09:11:33 UTC

    
Comment 1 Tommy P 2020-02-02 09:12:48 UTC
Created attachment 211268 [details]
contrib/create_tables.sql
Comment 2 Tommy P 2020-02-02 09:13:17 UTC
Created attachment 211269 [details]
mod_log_sql_dbi.c
Comment 3 Tommy P 2020-02-02 09:13:43 UTC
Created attachment 211270 [details]
mod_log_sql_mysql.c
Comment 4 Tommy P 2020-02-02 09:14:06 UTC
Created attachment 211271 [details]
mod_log_sql_pgsql.c
Comment 5 Jochen Neumeister freebsd_committer freebsd_triage 2020-03-08 10:07:36 UTC
Please give a detailed description. Are there any errors? If so, which ones? 
Please a patch, not many small ones. Thanks :-)
Comment 6 Tommy P 2020-03-11 02:22:48 UTC
Created attachment 212322 [details]
combined patches for SQL and *.c files
Comment 7 Tommy P 2020-03-11 02:34:04 UTC
(In reply to Jochen Neumeister from comment #5)
Hi Jochen,

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.

Regards,
Tommy
Comment 8 commit-hook freebsd_committer freebsd_triage 2020-08-06 15:09:26 UTC
A commit references this bug:

Author: brnrd
Date: Thu Aug  6 15:09:19 UTC 2020
New revision: 544278
URL: https://svnweb.freebsd.org/changeset/ports/544278

Log:
  www/mod_log_sql: Fix PID > 65535

   * PID > 65535 when 'LogSQLCreateTables On' [1]
   * Fix WWW address
   * 2 suffix (for Apache 2) is redundant, remove

  PR:		243793 [1]
  Submitted by:	Tommy P <tommyhp2 gmail com>

Changes:
  head/MOVED
  head/www/Makefile
  head/www/mod_log_sql/
  head/www/mod_log_sql/Makefile
  head/www/mod_log_sql/pkg-descr
  head/www/mod_log_sql2/
Comment 9 Bernard Spil freebsd_committer freebsd_triage 2020-08-06 15:20:51 UTC
Thanks for the patch!