Bug #44965 Append instead of overwrite query log
Submitted: 19 May 2009 19:59 Modified: 5 Nov 2009 17:48
Reporter: Jess Balint Email Updates:
Status: Closed Impact on me:
None 
Category:Connector / ODBC Severity:S4 (Feature request)
Version:5.1 OS:Any
Assigned to: CPU Architecture:Any

[19 May 2009 19:59] Jess Balint
Description:
Don't overwrite the query log, but change behavior to append instead.

How to repeat:
.

Suggested fix:
=== modified file 'driver/utility.c'
--- driver/utility.c    2008-11-14 17:34:50 +0000
+++ driver/utility.c    2009-05-19 19:57:14 +0000
@@ -2114,7 +2114,7 @@
 {
     FILE *query_log;

-    if ( (query_log= fopen(DRIVER_QUERY_LOGFILE, "w")) )
+    if ( (query_log= fopen(DRIVER_QUERY_LOGFILE, "a+")) )
     {
         fprintf(query_log,"-- Query logging\n");
         fprintf(query_log,"--\n");
[1 Nov 2009 16:30] Lawrenty Novitsky
Patch pushed as rev#849. Will be released in the 5.1.6
[5 Nov 2009 17:48] Tony Bedford
An entry was added to the 5.1.6 changelog:

MySQL Connector/ODBC overwrote the query log. MySQL Connector/ODBC was changed to append the log, rather than overwrite it.