Update of /cvsroot/perfparse/_perfparse/libpp_mysql
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13206/libpp_mysql
Modified Files:
dbms.c
Log Message:
Rework periodic cleanup within storage module (perfparsed)
Index: dbms.c
===================================================================
RCS file: /cvsroot/perfparse/_perfparse/libpp_mysql/dbms.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** dbms.c 12 Aug 2007 00:11:45 -0000 1.7
--- dbms.c 8 Dec 2007 21:25:30 -0000 1.8
***************
*** 94,98 ****
void pp_mysql_default_sql_failure(char*f,int l, const char*str, const char *error) {
! pp_log(f,l,LOG_ERROR,"%s (%s)",str,error);
exit(EXIT_FAILURE);
}
--- 94,98 ----
void pp_mysql_default_sql_failure(char*f,int l, const char*str, const char *error) {
! pp_log(f,l,LOG_ERROR,"SQL Error in query: '%s' Error message: '%s'",str,error);
exit(EXIT_FAILURE);
}
***************
*** 104,111 ****
void libpp_mysql_query(char*file, int line, const char *sql)
{
! #ifdef SHOW_SQL
! printf("SQL: \"%s\"\n", sql);
! fflush(stdout);
! #endif
freeResult();
--- 104,109 ----
void libpp_mysql_query(char*file, int line, const char *sql)
{
!
! pp_log(__FILE__,__LINE__,LOG_DEBUG,"SQL execution: \"%s\"\n", sql);
freeResult();
***************
*** 117,125 ****
query_result = mysql_store_result(&db_mysql);
! #ifdef SHOW_SQL
! printf("Rows: %d\n", rows());
! fflush(stdout);
! #endif
!
iSQLCount++;
}
--- 115,121 ----
query_result = mysql_store_result(&db_mysql);
!
! pp_log(__FILE__,__LINE__,LOG_DEBUG,"Rows: %d\n", rows());
!
iSQLCount++;
}
***************
*** 160,168 ****
MYSQL_ROW row;
! #ifdef SHOW_SQL
! printf("SQL: \"%s\"\n", sql);
! fflush(stdout);
! #endif
!
if (sRet) free(sRet);
--- 156,161 ----
MYSQL_ROW row;
! pp_log(__FILE__,__LINE__,LOG_DEBUG,"SQL: \"%s\"\n", sql);
!
if (sRet) free(sRet);
|