Changeset - 9deea2412c84
[Not reviewed]
default
0 1 0
Nathan Brink (binki) - 16 years ago 2010-02-19 22:50:29
ohnobinki@ohnopublishing.net
fix mysqlResultFree() segfault issue, actually works finally :-D
1 file changed with 5 insertions and 1 deletions:
0 comments (0 inline, 0 general)
src/server/mysql.c
Show inline comments
 
@@ -239,7 +239,7 @@ int mysqlResultFree(distrend_mysql_conn_
 
     Must flush the resultset buffer.
 
   */
 
  for(counter = 0;
 
      mysql_fetch_row(result->mysqlresult);
 
      mysql_fetch_row(mysqlresult);
 
      counter ++)
 
    ;
 
  if(counter)
 
@@ -248,11 +248,15 @@ int mysqlResultFree(distrend_mysql_conn_
 
  while(mysql_more_results(conn->mysqlconn))
 
    {
 
      fprintf(stderr, "flushing an extraneous result set\n");
 
      mysql_next_result(conn->mysqlconn);
 
      mysqlresult = mysql_use_result(conn->mysqlconn);
 
      if(mysqlresult)
 
	{
 
      while(mysql_fetch_row(mysqlresult))
 
	;
 
      mysql_free_result(mysqlresult);
 
    }
 
    }
 

	
 
  return 0;
 
}
0 comments (0 inline, 0 general)