MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:joerg Date:April 4 2007 10:15am
Subject:bk commit into 4.1 tree (jbruehe:1.2544) BUG#25492
View as plain text  
Below is the list of changes that have just been committed into a local
4.1 repository of mysqldev. When mysqldev does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet@stripped, 2007-04-04 12:15:04+02:00, jbruehe@stripped +1 -0
  bug #25492 (Invalid deallocation in mysql_stmt_fetch())
  
  Additional patch.
  mysql_flush_use_result() fixed.
  
  (Originally done by holyfoot@stripped 2007-03-05 11:35:04+04:00,
  applied to the custom build by joerg@stripped)

  libmysqld/lib_sql.cc@stripped, 2007-04-04 12:11:24+02:00, jbruehe@stripped +8 -14
    now emb_flush_use_result() uses emb_free_rows()
    duplicating code removed

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	jbruehe
# Host:	production.mysql.com
# Root:	/data0/mysqldev/my/ScottLee/4.1.22-br13769/mysql-4.1-release

--- 1.129/libmysqld/lib_sql.cc	2007-04-04 12:15:12 +02:00
+++ 1.130/libmysqld/lib_sql.cc	2007-04-04 12:15:12 +02:00
@@ -69,10 +69,14 @@
 
 static void emb_free_rows(THD *thd)
 {
+  if (!thd->data)
+    return;
+
   if (thd->current_stmt)
     free_root(&thd->data->alloc,MYF(0));
   else
     free_rows(thd->data);
+  thd->data= NULL;
 }
 
 
@@ -86,11 +90,8 @@
   THD *thd=(THD *) mysql->thd;
   NET *net= &mysql->net;
 
-  if (thd->data)
-  {
-    emb_free_rows(thd);
-    thd->data= 0;
-  }
+  emb_free_rows(thd);
+
   /* Check that we are calling the client functions in right order */
   if (mysql->status != MYSQL_STATUS_READY)
   {
@@ -143,13 +144,7 @@
 
 static void emb_flush_use_result(MYSQL *mysql)
 {
-  MYSQL_DATA *data= ((THD*)(mysql->thd))->data;
-
-  if (data)
-  {
-    free_rows(data);
-    ((THD*)(mysql->thd))->data= NULL;
-  }
+  emb_free_rows((THD*) (mysql->thd));
 }
 
 static MYSQL_DATA *
@@ -299,8 +294,7 @@
 static void emb_free_embedded_thd(MYSQL *mysql)
 {
   THD *thd= (THD*)mysql->thd;
-  if (thd->data)
-    emb_free_rows(thd);
+  emb_free_rows(thd);
   thread_count--;
   delete thd;
   mysql->thd=0;
Thread
bk commit into 4.1 tree (jbruehe:1.2544) BUG#25492joerg4 Apr