BUG: histlog2300 produces no records against empty log file
The default time structure when log file is not found or empty uses "1990" as a century value.
It should be 90, or more strictly 70, as it is later used in difftime which compares unix epoch values.
Note, mysqlhistlog2300 uses 90 correctly.
Test case
rm test.histlog
histlog2300 test.histlog
produces no results.
Apply patch below, gets history as expected.
Index: histlog2300.c
===================================================================
--- histlog2300.c (revision 11)
+++ histlog2300.c (working copy)
@@ -118,7 +118,7 @@
}
else
{ //if no valid log we set the date to 1 Jan 1990 0:00
- time_lastlog_tm.tm_year = 1990;
+ time_lastlog_tm.tm_year = 90;
time_lastlog_tm.tm_mon = 0;
time_lastlog_tm.tm_mday = 1;
time_lastlog_tm.tm_hour = 0;
Environment
Open2300 version: |
svn trunk revision 11 |
Shared libraries: |
|
Server OS: |
linux |
--
GrantGardner - 01 Dec 2007
Follow up
Fix record
Thanks for the fix
Committed to SVN rev 12
--
KennethLavrsen - 01 Dec 2007