From 8a08fd43411725545a61f16c5c78994d845f9352 Mon Sep 17 00:00:00 2001
From: Luis Soares <luis.soares@oracle.com>
Date: Fri, 6 May 2011 00:46:53 +0100
Subject: BUG#11762616: BUG#55229: 'POSTION'

Fix for all "postion" in Oracle files (s/postion/position).
Updated the copyright notices where needed.
---
 sql/slave.cc | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

(limited to 'sql/slave.cc')

diff --git a/sql/slave.cc b/sql/slave.cc
index 6d266245460..dd578064f24 100644
--- a/sql/slave.cc
+++ b/sql/slave.cc
@@ -97,7 +97,7 @@ static const char *reconnect_messages[SLAVE_RECON_ACT_MAX][SLAVE_RECON_MSG_MAX]=
 registration on master",
     "Reconnecting after a failed registration on master",
     "failed registering on master, reconnecting to try again, \
-log '%s' at postion %s",
+log '%s' at position %s",
     "COM_REGISTER_SLAVE",
     "Slave I/O thread killed during or after reconnect"
   },
@@ -105,7 +105,7 @@ log '%s' at postion %s",
     "Waiting to reconnect after a failed binlog dump request",
     "Slave I/O thread killed while retrying master dump",
     "Reconnecting after a failed binlog dump request",
-    "failed dump request, reconnecting to try again, log '%s' at postion %s",
+    "failed dump request, reconnecting to try again, log '%s' at position %s",
     "COM_BINLOG_DUMP",
     "Slave I/O thread killed during or after reconnect"
   },
@@ -114,7 +114,7 @@ log '%s' at postion %s",
     "Slave I/O thread killed while waiting to reconnect after a failed read",
     "Reconnecting after a failed master event read",
     "Slave I/O thread: Failed reading log event, reconnecting to retry, \
-log '%s' at postion %s",
+log '%s' at position %s",
     "",
     "Slave I/O thread killed during or after a reconnect done to recover from \
 failed read"
-- 
cgit v1.2.1


From 44135d4725dd3ad6d331c60b0bab1618472b8ae4 Mon Sep 17 00:00:00 2001
From: Kent Boortz <kent.boortz@oracle.com>
Date: Thu, 30 Jun 2011 17:31:31 +0200
Subject: Updated/added copyright headers

---
 sql/slave.cc | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

(limited to 'sql/slave.cc')

diff --git a/sql/slave.cc b/sql/slave.cc
index 87bd7e2be8c..95df6aa4273 100644
--- a/sql/slave.cc
+++ b/sql/slave.cc
@@ -1,4 +1,5 @@
-/* Copyright (C) 2000-2003 MySQL AB
+/* Copyright (c) 2000-2008 MySQL AB, 2008, 2009 Sun Microsystems, Inc.
+   Use is subject to license terms.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -11,7 +12,7 @@
 
    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
-   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
+   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA */
 
 #include "mysql_priv.h"
 
-- 
cgit v1.2.1


From e46b3453bfd379f7eef4fcc01853f085007c012b Mon Sep 17 00:00:00 2001
From: Rohit Kalhans <rohit.kalhans@oracle.com>
Date: Fri, 26 Aug 2011 15:27:29 +0530
Subject: BUG#11878104: FIXES OF BUG 11752963 - 44312 TO BACKPORT TO MYSQL-5.1
 Background: Backporting fix for BUG 11752963 to Mysql5.1 branch. Problem: Fix
 of bug 11752963 was only available for trunk and 5.5 branch. Partial fix has
 been pushed to 5.1 branch as well. Fix: backporting the fixes of bug 11752963
 to 5.1 branch. 1. Made all major changes to make 5.1 branch in line with 5.5
 and the trunk. 2. skipped the partial patch that was already applied to the
 5.1 branch.

sql/rpl_rli.h:
  Made inited Volatile (find inline comments)
sql/slave.cc:
  backported all changes from the fix of BUG#11752963.
---
 sql/slave.cc | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

(limited to 'sql/slave.cc')

diff --git a/sql/slave.cc b/sql/slave.cc
index 6c375238ce4..02d8cc2c199 100644
--- a/sql/slave.cc
+++ b/sql/slave.cc
@@ -598,11 +598,15 @@ int start_slave_thread(pthread_handler h_func, pthread_mutex_t *start_lock,
       DBUG_PRINT("sleep",("Waiting for slave thread to start"));
       const char* old_msg = thd->enter_cond(start_cond,cond_lock,
                                             "Waiting for slave thread to start");
-      pthread_cond_wait(start_cond,cond_lock);
+      pthread_cond_wait(start_cond, cond_lock);
       thd->exit_cond(old_msg);
       pthread_mutex_lock(cond_lock); // re-acquire it as exit_cond() released
       if (thd->killed)
+      {
+        if (start_lock)
+          pthread_mutex_unlock(start_lock);
         DBUG_RETURN(thd->killed_errno());
+      }
     }
   }
   if (start_lock)
@@ -2531,6 +2535,7 @@ pthread_handler_t handle_slave_io(void *arg)
 
   thd= new THD; // note that contructor of THD uses DBUG_ !
   THD_CHECK_SENTRY(thd);
+  DBUG_ASSERT(mi->io_thd == 0);
   mi->io_thd = thd;
 
   pthread_detach_this_thread();
@@ -4489,9 +4494,6 @@ int rotate_relay_log(Master_info* mi)
   Relay_log_info* rli= &mi->rli;
   int error= 0;
 
-  /* We don't lock rli->run_lock. This would lead to deadlocks. */
-  pthread_mutex_lock(&mi->run_lock);
-
   /*
      We need to test inited because otherwise, new_file() will attempt to lock
      LOCK_log, which may not be inited (if we're not a slave).
@@ -4521,7 +4523,6 @@ int rotate_relay_log(Master_info* mi)
   */
   rli->relay_log.harvest_bytes_written(&rli->log_space_total);
 end:
-  pthread_mutex_unlock(&mi->run_lock);
   DBUG_RETURN(error);
 }
 
-- 
cgit v1.2.1


From 47575bd0e05d49955a4d7f46409cc6316fed8d7c Mon Sep 17 00:00:00 2001
From: Michael Widenius <monty@askmonty.org>
Date: Wed, 30 Nov 2011 00:34:05 +0200
Subject: Fixed compiler warnings

dbug/tests.c:
  Added __attribute__((unused)) to get rid of compiler warning
server-tools/instance-manager/guardian.cc:
  Added __attribute__((unused)) to get rid of compiler warning
sql/filesort.cc:
  Added __attribute__((unused)) to get rid of compiler warning
sql/slave.cc:
  Added __attribute__((unused)) to get rid of compiler warning
sql/sql_load.cc:
  Added __attribute__((unused)) to get rid of compiler warning
sql/sql_table.cc:
  Added __attribute__((unused)) to get rid of compiler warning
storage/maria/ma_blockrec.c:
  Added __attribute__((unused)) to get rid of compiler warning
storage/maria/ma_check.c:
  Added missing cast
storage/maria/ma_loghandler.c:
  Added __attribute__((unused)) to get rid of compiler warning
storage/maria/ma_recovery.c:
  Added __attribute__((unused)) to get rid of compiler warning
storage/pbxt/src/cache_xt.cc:
  Added __attribute__((unused)) to get rid of compiler warning
storage/xtradb/fil/fil0fil.c:
  Removed not used variable
storage/xtradb/handler/ha_innodb.cc:
  Use unused variable
vio/viosocket.c:
  Remove usage of not used variable
vio/viosslfactories.c:
  Added cast
---
 sql/slave.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'sql/slave.cc')

diff --git a/sql/slave.cc b/sql/slave.cc
index d779d8cdc9e..1971001d759 100644
--- a/sql/slave.cc
+++ b/sql/slave.cc
@@ -513,7 +513,7 @@ terminate_slave_thread(THD *thd,
 
   while (*slave_running)                        // Should always be true
   {
-    int error;
+    int error __attribute__((unused));
     DBUG_PRINT("loop", ("killing slave thread"));
 
     pthread_mutex_lock(&thd->LOCK_thd_data);
-- 
cgit v1.2.1