List:Commits« Previous MessageNext Message »
From:msvensson Date:December 22 2005 8:46am
Subject:bk commit into 5.1 tree (msvensson:1.1981)
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of msvensson. When msvensson 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
  1.1981 05/12/22 09:46:42 msvensson@neptunus.(none) +1 -0
  Merge neptunus.(none):/home/msvensson/mysql/mysql-5.1
  into  neptunus.(none):/home/msvensson/mysql/bug15775/my51-bug15775

  sql/sql_acl.cc
    1.168 05/12/22 09:46:36 msvensson@neptunus.(none) +0 -0
    Auto merged

# 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:	msvensson
# Host:	neptunus.(none)
# Root:	/home/msvensson/mysql/bug15775/my51-bug15775/RESYNC

--- 1.167/sql/sql_acl.cc	2005-12-21 15:56:43 +01:00
+++ 1.168/sql/sql_acl.cc	2005-12-22 09:46:36 +01:00
@@ -1468,8 +1468,7 @@
                   acl_user->host.hostname ? acl_user->host.hostname : "",
                   new_password));
     thd->clear_error();
-    Query_log_event qinfo(thd, buff, query_length, 0, FALSE);
-    mysql_bin_log.write(&qinfo);
+    thd->binlog_query(THD::MYSQL_QUERY_TYPE, buff, query_length, FALSE, FALSE);
   }
 end:
   close_thread_tables(thd);
@@ -1654,7 +1653,7 @@
   }
   store_record(table,record[1]);
   table->field[2]->store(new_password, new_password_len, system_charset_info);
-  if ((error=table->file->update_row(table->record[1],table->record[0])))
+  if ((error=table->file->ha_update_row(table->record[1],table->record[0])))
   {
     table->file->print_error(error,MYF(0));	/* purecov: deadcode */
     DBUG_RETURN(1);
@@ -1871,14 +1870,14 @@
     */
     table->file->ha_retrieve_all_cols();
     if (cmp_record(table,record[1]) &&
-	(error=table->file->update_row(table->record[1],table->record[0])))
+	(error=table->file->ha_update_row(table->record[1],table->record[0])))
     {						// This should never happen
       table->file->print_error(error,MYF(0));	/* purecov: deadcode */
       error= -1;				/* purecov: deadcode */
       goto end;					/* purecov: deadcode */
     }
   }
-  else if ((error=table->file->write_row(table->record[0]))) // insert
+  else if ((error=table->file->ha_write_row(table->record[0]))) // insert
   {						// This should never happen
     if (error && error != HA_ERR_FOUND_DUPP_KEY &&
 	error != HA_ERR_FOUND_DUPP_UNIQUE)	/* purecov: inspected */
@@ -1988,16 +1987,17 @@
     if (rights)
     {
       table->file->ha_retrieve_all_cols();
-      if ((error=table->file->update_row(table->record[1],table->record[0])))
+      if ((error=table->file->ha_update_row(table->record[1],
+                                            table->record[0])))
 	goto table_error;			/* purecov: deadcode */
     }
     else	/* must have been a revoke of all privileges */
     {
-      if ((error = table->file->delete_row(table->record[1])))
+      if ((error = table->file->ha_delete_row(table->record[1])))
 	goto table_error;			/* purecov: deadcode */
     }
   }
-  else if (rights && (error=table->file->write_row(table->record[0])))
+  else if (rights && (error=table->file->ha_write_row(table->record[0])))
   {
     if (error && error != HA_ERR_FOUND_DUPP_KEY) /* purecov: inspected */
       goto table_error; /* purecov: deadcode */
@@ -2365,9 +2365,9 @@
     {
       GRANT_COLUMN *grant_column;
       if (privileges)
-	error=table->file->update_row(table->record[1],table->record[0]);
+	error=table->file->ha_update_row(table->record[1],table->record[0]);
       else
-	error=table->file->delete_row(table->record[1]);
+	error=table->file->ha_delete_row(table->record[1]);
       if (error)
       {
 	table->file->print_error(error,MYF(0)); /* purecov: inspected */
@@ -2382,7 +2382,7 @@
     else					// new grant
     {
       GRANT_COLUMN *grant_column;
-      if ((error=table->file->write_row(table->record[0])))
+      if ((error=table->file->ha_write_row(table->record[0])))
       {
 	table->file->print_error(error,MYF(0)); /* purecov: inspected */
 	result= -1;				/* purecov: inspected */
@@ -2434,8 +2434,8 @@
 	if (privileges)
 	{
 	  int tmp_error;
-	  if ((tmp_error=table->file->update_row(table->record[1],
-						 table->record[0])))
+	  if ((tmp_error=table->file->ha_update_row(table->record[1],
+						    table->record[0])))
 	  {					/* purecov: deadcode */
 	    table->file->print_error(tmp_error,MYF(0)); /* purecov: deadcode */
 	    result= -1;				/* purecov: deadcode */
@@ -2447,7 +2447,7 @@
 	else
 	{
 	  int tmp_error;
-	  if ((tmp_error = table->file->delete_row(table->record[1])))
+	  if ((tmp_error = table->file->ha_delete_row(table->record[1])))
 	  {					/* purecov: deadcode */
 	    table->file->print_error(tmp_error,MYF(0)); /* purecov: deadcode */
 	    result= -1;				/* purecov: deadcode */
@@ -2555,15 +2555,15 @@
   {
     if (store_table_rights || store_col_rights)
     {
-      if ((error=table->file->update_row(table->record[1],table->record[0])))
+      if ((error=table->file->ha_update_row(table->record[1],table->record[0])))
 	goto table_error;			/* purecov: deadcode */
     }
-    else if ((error = table->file->delete_row(table->record[1])))
+    else if ((error = table->file->ha_delete_row(table->record[1])))
       goto table_error;				/* purecov: deadcode */
   }
   else
   {
-    error=table->file->write_row(table->record[0]);
+    error=table->file->ha_write_row(table->record[0]);
     if (error && error != HA_ERR_FOUND_DUPP_KEY)
       goto table_error;				/* purecov: deadcode */
   }
@@ -2672,15 +2672,15 @@
   {
     if (store_proc_rights)
     {
-      if ((error=table->file->update_row(table->record[1],table->record[0])))
+      if ((error=table->file->ha_update_row(table->record[1],table->record[0])))
 	goto table_error;
     }
-    else if ((error= table->file->delete_row(table->record[1])))
+    else if ((error= table->file->ha_delete_row(table->record[1])))
       goto table_error;
   }
   else
   {
-    error=table->file->write_row(table->record[0]);
+    error=table->file->ha_write_row(table->record[0]);
     if (error && error != HA_ERR_FOUND_DUPP_KEY)
       goto table_error;
   }
@@ -3119,6 +3119,16 @@
   }
   grant_option=TRUE;
   thd->mem_root= old_root;
+  /*
+    This flush is here only becuase there is code that writes rows to
+    system tables after executing a binlog_query().
+
+    TODO: Ensure that no writes are executed after a binlog_query() by
+    moving the writes to before calling binlog_query(). Then remove
+    this line (and add an assert inside send_ok() that checks that
+    everything is in a consistent state).
+   */
+  thd->binlog_flush_pending_rows_event(true);
   rw_unlock(&LOCK_grant);
   if (!result && !no_error)
     send_ok(thd);
@@ -4670,13 +4680,13 @@
                       system_charset_info);
     user_field->store(user_to->user.str, user_to->user.length,
                       system_charset_info);
-    if ((error= table->file->update_row(table->record[1], table->record[0])))
+    if ((error= table->file->ha_update_row(table->record[1], table->record[0])))
       table->file->print_error(error, MYF(0));
   }
   else
   {
     /* delete */
-    if ((error=table->file->delete_row(table->record[0])))
+    if ((error=table->file->ha_delete_row(table->record[0])))
       table->file->print_error(error, MYF(0));
   }
 
@@ -5683,7 +5693,7 @@
     table->field[i++]->store(column, col_length, cs);
   table->field[i++]->store(priv, priv_length, cs);
   table->field[i]->store(is_grantable, strlen(is_grantable), cs);
-  table->file->write_row(table->record[0]);
+  table->file->ha_write_row(table->record[0]);
 }
 
 
Thread
bk commit into 5.1 tree (msvensson:1.1981)msvensson22 Dec