List:Commits« Previous MessageNext Message »
From:jonas Date:April 5 2007 1:14pm
Subject:bk commit into 5.1 tree (jonas:1.2522)
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of jonas. When jonas 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-05 15:14:13+02:00, jonas@stripped +16 -0
  Merge perch.ndb.mysql.com:/home/jonas/src/mysql-5.1-new-ndb
  into  perch.ndb.mysql.com:/home/jonas/src/51-telco
  MERGE: 1.2494.1.62

  mysql-test/mysql-test-run.pl@stripped, 2007-04-05 15:00:12+02:00, jonas@stripped +0 -0
    Auto merged
    MERGE: 1.270.1.23

  mysql-test/r/rpl_ndb_basic.result@stripped, 2007-04-05 15:00:13+02:00, jonas@stripped +0 -0
    Auto merged
    MERGE: 1.7.1.1

  mysql-test/r/rpl_ndb_log.result@stripped, 2007-04-05 15:00:13+02:00, jonas@stripped +0 -0
    Auto merged
    MERGE: 1.18.1.6

  mysql-test/r/rpl_ndb_sync.result@stripped, 2007-04-05 15:00:13+02:00, jonas@stripped +0 -0
    Auto merged
    MERGE: 1.9.1.2

  sql/ha_ndbcluster.cc@stripped, 2007-04-05 15:00:13+02:00, jonas@stripped +0 -0
    Auto merged
    MERGE: 1.408.1.31

  sql/ha_ndbcluster.h@stripped, 2007-04-05 15:00:13+02:00, jonas@stripped +0 -0
    Auto merged
    MERGE: 1.170.3.3

  sql/item_func.cc@stripped, 2007-04-05 15:00:13+02:00, jonas@stripped +0 -0
    Auto merged
    MERGE: 1.353.1.22

  sql/log_event.cc@stripped, 2007-04-05 15:00:13+02:00, jonas@stripped +0 -0
    Auto merged
    MERGE: 1.271.1.2

  sql/mysqld.cc@stripped, 2007-04-05 15:00:13+02:00, jonas@stripped +0 -0
    Auto merged
    MERGE: 1.622.7.3

  sql/slave.cc@stripped, 2007-04-05 15:00:14+02:00, jonas@stripped +0 -0
    Auto merged
    MERGE: 1.300.1.1

  storage/ndb/src/common/transporter/TCP_Transporter.cpp@stripped, 2007-04-05 15:14:10+02:00, jonas@stripped +1 -7
    merge
    MERGE: 1.15.1.2

  storage/ndb/src/kernel/blocks/tsman.cpp@stripped, 2007-04-05 15:00:14+02:00, jonas@stripped +0 -0
    Auto merged
    MERGE: 1.15.1.1

  storage/ndb/src/mgmclient/CommandInterpreter.cpp@stripped, 2007-04-05 15:00:14+02:00, jonas@stripped +0 -0
    Auto merged
    MERGE: 1.79.1.10

  storage/ndb/src/mgmsrv/ConfigInfo.cpp@stripped, 2007-04-05 15:00:14+02:00, jonas@stripped +0 -0
    Auto merged
    MERGE: 1.94.1.12

  storage/ndb/src/ndbapi/ndberror.c@stripped, 2007-04-05 15:00:14+02:00, jonas@stripped +0 -0
    Auto merged
    MERGE: 1.83.1.4

  storage/ndb/tools/listTables.cpp@stripped, 2007-04-05 15:00:14+02:00, jonas@stripped +0 -0
    Auto merged
    MERGE: 1.31.1.2

# 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:	jonas
# Host:	perch.ndb.mysql.com
# Root:	/home/jonas/src/51-telco/RESYNC

--- 1.361/sql/item_func.cc	2007-04-05 15:14:19 +02:00
+++ 1.362/sql/item_func.cc	2007-04-05 15:14:19 +02:00
@@ -4988,10 +4988,10 @@
 }
 
 
-Item_func_sp::Item_func_sp(Name_resolution_context *context_arg,
-                           sp_name *name_arg)
-  :Item_func(), context(context_arg), m_name(name_arg), m_sp(NULL),
-   result_field(NULL)
+
+
+Item_func_sp::Item_func_sp(Name_resolution_context *context_arg, sp_name *name)
+  :Item_func(), context(context_arg), m_name(name), m_sp(NULL), sp_result_field(NULL)
 {
   maybe_null= 1;
   m_name->init_qname(current_thd);
@@ -5001,9 +5001,8 @@
 
 
 Item_func_sp::Item_func_sp(Name_resolution_context *context_arg,
-                           sp_name *name_arg, List<Item> &list)
-  :Item_func(list), context(context_arg), m_name(name_arg), m_sp(NULL),
-   result_field(NULL)
+                           sp_name *name, List<Item> &list)
+  :Item_func(list), context(context_arg), m_name(name), m_sp(NULL),sp_result_field(NULL)
 {
   maybe_null= 1;
   m_name->init_qname(current_thd);
@@ -5015,10 +5014,10 @@
 void
 Item_func_sp::cleanup()
 {
-  if (result_field)
+  if (sp_result_field)
   {
-    delete result_field;
-    result_field= NULL;
+    delete sp_result_field;
+    sp_result_field= NULL;
   }
   m_sp= NULL;
   dummy_table->alias= NULL;
@@ -5030,7 +5029,7 @@
 {
   THD *thd= current_thd;
   /* Calculate length to avoid reallocation of string for sure */
-  uint len= ((m_name->m_db.length +
+  uint len= ((m_name->m_explicit_name ? m_name->m_db.length : 0 +
               m_name->m_name.length)*2 + //characters*quoting
              2 +                         // ` and `
              1 +                         // .
@@ -5040,88 +5039,128 @@
                system_charset_info);
 
   qname.length(0);
-  append_identifier(thd, &qname, m_name->m_db.str, m_name->m_db.length);
-  qname.append('.');
+  if (m_name->m_explicit_name)
+  {
+    append_identifier(thd, &qname, m_name->m_db.str, m_name->m_db.length);
+    qname.append('.');
+  }
   append_identifier(thd, &qname, m_name->m_name.str, m_name->m_name.length);
   return qname.ptr();
 }
 
 
-Field *
-Item_func_sp::sp_result_field(void) const
+
+/**
+  @brief Initialize the result field by creating a temporary dummy table
+    and assign it to a newly created field object. Meta data used to
+    create the field is fetched from the sp_head belonging to the stored
+    proceedure found in the stored procedure functon cache.
+  
+  @note This function should be called from fix_fields to init the result
+    field. It is some what related to Item_field.
+
+  @see Item_field
+
+  @param thd A pointer to the session and thread context.
+
+  @return Function return error status.
+  @retval TRUE is returned on an error
+  @retval FALSE is returned on success.
+*/
+bool
+Item_func_sp::init_result_field(THD *thd)
 {
-  Field *field;
-  DBUG_ENTER("Item_func_sp::sp_result_field");
-  DBUG_PRINT("info", ("sp: %s, flags: %x, level: %lu",
-                      (m_sp ? "YES" : "NO"),
-                      (m_sp ? m_sp->m_flags : (uint)0),
-                      (m_sp ? m_sp->m_recursion_level : (ulong)0)));
+  DBUG_ENTER("Item_func_sp::init_result_field");
+
+  LEX_STRING empty_name= { C_STRING_WITH_LEN("") };
+  
+  TABLE_SHARE *share;
 
-  if (!m_sp)
+  DBUG_ASSERT(m_sp == NULL);
+  DBUG_ASSERT(sp_result_field == NULL);
+
+  if (!(m_sp= sp_find_routine(thd, TYPE_ENUM_FUNCTION, m_name,
+                               &thd->sp_func_cache, TRUE)))
   {
-    THD *thd= current_thd;
-    if (!(m_sp= sp_find_routine(thd, TYPE_ENUM_FUNCTION, m_name,
-                                &thd->sp_func_cache, TRUE)))
-    {
-      my_error(ER_SP_DOES_NOT_EXIST, MYF(0), "FUNCTION", m_name->m_qname.str);
-      DBUG_RETURN(0);
-    }
+    my_error(ER_SP_DOES_NOT_EXIST, MYF(0), "FUNCTION", m_name->m_qname.str);
+    context->process_error(thd);
+    DBUG_RETURN(TRUE);
   }
-  if (!dummy_table->alias)
+
+  /*
+     A Field need to be attached to a Table.
+     Below we "create" a dummy table by initializing 
+     the needed pointers.
+   */
+  
+  share= dummy_table->s;
+  dummy_table->alias = "";
+  dummy_table->maybe_null = maybe_null;
+  dummy_table->in_use= thd;
+  dummy_table->copy_blobs= TRUE;
+  share->table_cache_key = empty_name;
+  share->table_name = empty_name;
+
+  if (!(sp_result_field= m_sp->create_result_field(max_length, name, dummy_table)))
   {
-    char *empty_name= (char *) "";
-    dummy_table->alias= empty_name;
-    dummy_table->maybe_null= maybe_null;
-    dummy_table->in_use= current_thd;
-    dummy_table->copy_blobs= TRUE;
-    dummy_table->s->table_cache_key.str = empty_name;
-    dummy_table->s->table_name.str= empty_name;
-    dummy_table->s->db.str= empty_name;
+   DBUG_RETURN(TRUE);
   }
-  if (!(field= m_sp->create_result_field(max_length, name, dummy_table)))
-    my_message(ER_OUT_OF_RESOURCES, ER(ER_OUT_OF_RESOURCES), MYF(0));
+  
+  if (sp_result_field->pack_length() > sizeof(result_buf))
+  {
+    sp_result_field->move_field(sql_alloc(sp_result_field->pack_length()));
+  } else {
+    sp_result_field->move_field(result_buf);
+  }
+  
+  sp_result_field->null_ptr= (uchar *) &null_value;
+  sp_result_field->null_bit= 1;
+  
 
-  DBUG_RETURN(field);
+  DBUG_RETURN(FALSE);
 }
 
+/**
+  @brief Initialize local members with values from the Field interface.
+
+  @note called from Item::fix_fields.
+*/
+void Item_func_sp::fix_length_and_dec()
+{
+  DBUG_ENTER("Item_func_sp::fix_length_and_dec");
+
+  DBUG_ASSERT(sp_result_field);
+  decimals= sp_result_field->decimals();
+  max_length= sp_result_field->field_length;
+  collation.set(sp_result_field->charset());
+  maybe_null= 1;
+  unsigned_flag= test(sp_result_field->flags & UNSIGNED_FLAG);
+
+  DBUG_VOID_RETURN;
+}
 
-/*
-  Execute function & store value in field
+/**
+  @brief Execute function & store value in field.
 
-  RETURN
-   0  value <> NULL
-   1  value =  NULL  or error
+  @return Function returns error status.
+  @retval FALSE on success.
+  @retval TRUE if an error occurred.
 */
 
 bool
-Item_func_sp::execute(Field **flp)
+Item_func_sp::execute()
 {
   THD *thd= current_thd;
-  Field *f;
-
+  
   /*
     Get field in virtual tmp table to store result. Create the field if
     invoked first time.
   */
-  
-  if (!(f= *flp))
-  {
-    if (!(*flp= f= sp_result_field()))
-    {
-      /* Error set by sp_result_field() */
-      null_value= 1;
-      return TRUE;
-    }
-
-    f->move_field((f->pack_length() > sizeof(result_buf)) ?
-                  sql_alloc(f->pack_length()) : result_buf);
-    f->null_ptr= (uchar *)&null_value;
-    f->null_bit= 1;
-  }
+
 
   /* Execute function and store the return value in the field. */
 
-  if (execute_impl(thd, f))
+  if (execute_impl(thd))
   {
     null_value= 1;
     context->process_error(thd);
@@ -5130,14 +5169,24 @@
 
   /* Check that the field (the value) is not NULL. */
 
-  null_value= f->is_null();
+  null_value= sp_result_field->is_null();
 
   return null_value;
 }
 
 
+/**
+   @brief Execute function and store the return value in the field.
+
+   @note This function was intended to be the concrete implementation of
+    the interface function execute. This was never realized.
+
+   @return The error state.
+   @retval FALSE on success
+   @retval TRUE if an error occurred.
+*/
 bool
-Item_func_sp::execute_impl(THD *thd, Field *return_value_fld)
+Item_func_sp::execute_impl(THD *thd)
 {
   bool err_status= TRUE;
   Sub_statement_state statement_state;
@@ -5154,7 +5203,7 @@
     thd->security_ctx= context->security_ctx;
   }
 #endif
-  if (find_and_check_access(thd))
+  if (sp_check_access(thd))
     goto error;
 
   /*
@@ -5175,7 +5224,7 @@
     function call into binlog.
   */
   thd->reset_sub_statement_state(&statement_state, SUB_STMT_FUNCTION);
-  err_status= m_sp->execute_function(thd, args, arg_count, return_value_fld);
+  err_status= m_sp->execute_function(thd, args, arg_count, sp_result_field); 
   thd->restore_sub_statement_state(&statement_state);
 
 error:
@@ -5190,15 +5239,9 @@
 void
 Item_func_sp::make_field(Send_field *tmp_field)
 {
-  Field *field;
   DBUG_ENTER("Item_func_sp::make_field");
-  if ((field= sp_result_field()))
-  {
-    field->make_field(tmp_field);
-    delete field;
-    DBUG_VOID_RETURN;
-  }
-  init_make_field(tmp_field, MYSQL_TYPE_VARCHAR);  
+  DBUG_ASSERT(sp_result_field);
+  sp_result_field->make_field(tmp_field);
   DBUG_VOID_RETURN;
 }
 
@@ -5206,67 +5249,20 @@
 enum enum_field_types
 Item_func_sp::field_type() const
 {
-  Field *field;
   DBUG_ENTER("Item_func_sp::field_type");
-
-  if (result_field)
-    DBUG_RETURN(result_field->type());
-  if ((field= sp_result_field()))
-  {
-    enum_field_types result= field->type();
-    delete field;
-    DBUG_RETURN(result);
-  }
-  DBUG_RETURN(MYSQL_TYPE_VARCHAR);
+  DBUG_ASSERT(sp_result_field);
+  DBUG_RETURN(sp_result_field->type());
 }
 
-
 Item_result
 Item_func_sp::result_type() const
 {
-  Field *field;
   DBUG_ENTER("Item_func_sp::result_type");
-  DBUG_PRINT("info", ("m_sp: 0x%lx", (long) m_sp));
-
-  if (result_field)
-    DBUG_RETURN(result_field->result_type());
-  if ((field= sp_result_field()))
-  {
-    Item_result result= field->result_type();
-    delete field;
-    DBUG_RETURN(result);
-  }
-  DBUG_RETURN(STRING_RESULT);
+  DBUG_PRINT("info", ("m_sp = %p", m_sp));
+  DBUG_ASSERT(sp_result_field);
+  DBUG_RETURN(sp_result_field->result_type());
 }
 
-void
-Item_func_sp::fix_length_and_dec()
-{
-  Field *field;
-  DBUG_ENTER("Item_func_sp::fix_length_and_dec");
-
-  if (result_field)
-  {
-    decimals= result_field->decimals();
-    max_length= result_field->field_length;
-    collation.set(result_field->charset());
-    DBUG_VOID_RETURN;
-  }
-
-  if (!(field= sp_result_field()))
-  {
-    context->process_error(current_thd);
-    DBUG_VOID_RETURN;
-  }
-  decimals= field->decimals();
-  max_length= field->field_length;
-  collation.set(field->charset());
-  maybe_null= 1;
-  delete field;
-  DBUG_VOID_RETURN;
-}
-
-
 longlong Item_func_found_rows::val_int()
 {
   DBUG_ASSERT(fixed == 1);
@@ -5277,57 +5273,39 @@
 Field *
 Item_func_sp::tmp_table_field(TABLE *t_arg)
 {
-  Field *field= 0;
   DBUG_ENTER("Item_func_sp::tmp_table_field");
 
-  if (m_sp)
-    field= m_sp->create_result_field(max_length, (const char*) name, t_arg);
-  
-  if (!field) 
-    field= Item_func::tmp_table_field(t_arg);
-
-  if (!field)
-    my_message(ER_OUT_OF_RESOURCES, ER(ER_OUT_OF_RESOURCES), MYF(0));
-
-  DBUG_RETURN(field);
+  DBUG_ASSERT(sp_result_field);
+  DBUG_RETURN(sp_result_field);
 }
 
 
-/*
-  Find the function and check access rights to the function
-
-  SYNOPSIS
-    find_and_check_access()
-    thd           thread handler
-
-  RETURN
-    FALSE    Access granted
-    TRUE     Requested access can't be granted or function doesn't exists
-
-  NOTES
-    Checks if requested access to function can be granted to user.
+/**
+  @brief Checks if requested access to function can be granted to user.
     If function isn't found yet, it searches function first.
     If function can't be found or user don't have requested access
     error is raised.
+
+  @param thd thread handler
+
+  @return Indication if the access was granted or not.
+  @retval FALSE Access is granted.
+  @retval TRUE Requested access can't be granted or function doesn't exists.
+    
 */
 
 bool
-Item_func_sp::find_and_check_access(THD *thd)
+Item_func_sp::sp_check_access(THD *thd)
 {
-  if (! m_sp && ! (m_sp= sp_find_routine(thd, TYPE_ENUM_FUNCTION, m_name,
-                                         &thd->sp_func_cache, TRUE)))
-  {
-    my_error(ER_SP_DOES_NOT_EXIST, MYF(0), "FUNCTION", m_name->m_qname.str);
-    return TRUE;
-  }
-
+  DBUG_ENTER("Item_func_sp::sp_check_access");
+  DBUG_ASSERT(m_sp);
 #ifndef NO_EMBEDDED_ACCESS_CHECKS
   if (check_routine_access(thd, EXECUTE_ACL,
 			   m_sp->m_db.str, m_sp->m_name.str, 0, FALSE))
-    return TRUE;
+    DBUG_RETURN(TRUE);
 #endif
 
-  return FALSE;
+  DBUG_RETURN(FALSE);
 }
 
 
@@ -5335,9 +5313,25 @@
 Item_func_sp::fix_fields(THD *thd, Item **ref)
 {
   bool res;
+  DBUG_ENTER("Item_func_sp::fix_fields");
   DBUG_ASSERT(fixed == 0);
+ 
+  /*
+    We must call init_result_field before Item_func::fix_fields() 
+    to make m_sp and result_field members available to fix_length_and_dec(),
+    which is called from Item_func::fix_fields().
+  */
+  res= init_result_field(thd);
+
+  if (res)
+    DBUG_RETURN(res);
+
   res= Item_func::fix_fields(thd, ref);
-  if (!res && thd->lex->view_prepare_mode)
+
+  if (res)
+    DBUG_RETURN(res);
+
+  if (thd->lex->view_prepare_mode)
   {
     /*
       Here we check privileges of the stored routine only during view
@@ -5349,15 +5343,17 @@
       good idea especially if the view has SQL SECURITY DEFINER and
       the used stored procedure has SQL SECURITY DEFINER.
     */
-    res= find_and_check_access(thd);
+    res= sp_check_access(thd);
 #ifndef NO_EMBEDDED_ACCESS_CHECKS
+    /*
+      Try to set and restore the security context to see whether it's valid
+    */
     Security_context *save_secutiry_ctx;
-    if (!res && !(res= set_routine_security_ctx(thd, m_sp, false,
-                                                &save_secutiry_ctx)))
-    {
+    res= set_routine_security_ctx(thd, m_sp, false, &save_secutiry_ctx);
+    if (!res)
       sp_restore_security_context(thd, save_secutiry_ctx);
-    }
+    
 #endif /* ! NO_EMBEDDED_ACCESS_CHECKS */
   }
-  return res;
+  DBUG_RETURN(res);
 }

--- 1.273/sql/log_event.cc	2007-04-05 15:14:19 +02:00
+++ 1.274/sql/log_event.cc	2007-04-05 15:14:19 +02:00
@@ -784,19 +784,34 @@
 	     LOG_READ_TOO_LARGE);
     goto end;
   }
-  packet->append(buf, sizeof(buf));
+
+  /* Append the log event header to packet */
+  if (packet->append(buf, sizeof(buf)))
+  {
+    /* Failed to allocate packet */
+    result= LOG_READ_MEM;
+    goto end;
+  }
   data_len-= LOG_EVENT_MINIMAL_HEADER_LEN;
   if (data_len)
   {
+    /* Append rest of event, read directly from file into packet */
     if (packet->append(file, data_len))
     {
       /*
-	Here if we hit EOF it's really an error: as data_len is >=0
-        there's supposed to be more bytes available. 
-	EOF means we are reading the event partially, which should
-	never happen: either we read badly or the binlog is truncated.
+        Fatal error occured when appending rest of the event
+        to packet, possible failures:
+	1. EOF occured when reading from file, it's really an error
+           as data_len is >=0 there's supposed to be more bytes available.
+           file->error will have been set to number of bytes left to read
+        2. Read was interrupted, file->error would normally be set to -1
+        3. Failed to allocate memory for packet, my_errno
+           will be ENOMEM(file->error shuold be 0, but since the
+           memory allocation occurs before the call to read it might
+           be uninitialized)
       */
-      result= file->error >= 0 ? LOG_READ_TRUNC: LOG_READ_IO;
+      result= (my_errno == ENOMEM ? LOG_READ_MEM :
+               (file->error >= 0 ? LOG_READ_TRUNC: LOG_READ_IO));
       /* Implicit goto end; */
     }
   }

--- 1.628/sql/mysqld.cc	2007-04-05 15:14:19 +02:00
+++ 1.629/sql/mysqld.cc	2007-04-05 15:14:19 +02:00
@@ -6744,12 +6744,20 @@
   return 0;
 }
 
-/* Functions relying on SSL */
+/*
+   Functions relying on SSL 
+   Note: In the show_ssl_* functions, we need to check if we have a
+         valid vio-object since this isn't always true, specifically
+         when session_status or global_status is requested from
+         inside an Event.
+ */
 static int show_ssl_get_version(THD *thd, SHOW_VAR *var, char *buff)
 {
   var->type= SHOW_CHAR;
-  var->value= const_cast<char*>(thd->net.vio->ssl_arg ?
-        SSL_get_version((SSL*) thd->net.vio->ssl_arg) : "");
+  if( thd->vio_ok() && thd->net.vio->ssl_arg )
+    var->value= const_cast<char*>(SSL_get_version((SSL*) thd->net.vio->ssl_arg));
+  else
+    var->value= (char *)"";
   return 0;
 }
 
@@ -6757,9 +6765,10 @@
 {
   var->type= SHOW_LONG;
   var->value= buff;
-  *((long *)buff)= (long)thd->net.vio->ssl_arg ?
-                         SSL_session_reused((SSL*) thd->net.vio->ssl_arg) :
-                         0;
+  if( thd->vio_ok() && thd->net.vio->ssl_arg )
+    *((long *)buff)= (long)SSL_session_reused((SSL*) thd->net.vio->ssl_arg);
+  else
+    *((long *)buff)= 0;
   return 0;
 }
 
@@ -6767,9 +6776,10 @@
 {
   var->type= SHOW_LONG;
   var->value= buff;
-  *((long *)buff)= (long)thd->net.vio->ssl_arg ?
-                         SSL_get_default_timeout((SSL*)thd->net.vio->ssl_arg) :
-                         0;
+  if( thd->vio_ok() && thd->net.vio->ssl_arg )
+    *((long *)buff)= (long)SSL_get_default_timeout((SSL*)thd->net.vio->ssl_arg);
+  else
+    *((long *)buff)= 0;
   return 0;
 }
 
@@ -6777,9 +6787,10 @@
 {
   var->type= SHOW_LONG;
   var->value= buff;
-  *((long *)buff)= (long)thd->net.vio->ssl_arg ?
-                         SSL_get_verify_mode((SSL*)thd->net.vio->ssl_arg) :
-                         0;
+  if( thd->net.vio && thd->net.vio->ssl_arg )
+    *((long *)buff)= (long)SSL_get_verify_mode((SSL*)thd->net.vio->ssl_arg);
+  else
+    *((long *)buff)= 0;
   return 0;
 }
 
@@ -6787,17 +6798,20 @@
 {
   var->type= SHOW_LONG;
   var->value= buff;
-  *((long *)buff)= (long)thd->net.vio->ssl_arg ?
-                         SSL_get_verify_depth((SSL*)thd->net.vio->ssl_arg) :
-                         0;
+  if( thd->vio_ok() && thd->net.vio->ssl_arg )
+    *((long *)buff)= (long)SSL_get_verify_depth((SSL*)thd->net.vio->ssl_arg);
+  else
+    *((long *)buff)= 0;
   return 0;
 }
 
 static int show_ssl_get_cipher(THD *thd, SHOW_VAR *var, char *buff)
 {
   var->type= SHOW_CHAR;
-  var->value= const_cast<char*>(thd->net.vio->ssl_arg ?
-              SSL_get_cipher((SSL*) thd->net.vio->ssl_arg) : "");
+  if( thd->vio_ok() && thd->net.vio->ssl_arg )
+    var->value= const_cast<char*>(SSL_get_cipher((SSL*) thd->net.vio->ssl_arg));
+  else
+    var->value= (char *)"";
   return 0;
 }
 
@@ -6805,7 +6819,7 @@
 {
   var->type= SHOW_CHAR;
   var->value= buff;
-  if (thd->net.vio->ssl_arg)
+  if (thd->vio_ok() && thd->net.vio->ssl_arg)
   {
     int i;
     const char *p;
@@ -7345,6 +7359,18 @@
   /* Allow Win32 and NetWare users to move MySQL anywhere */
   {
     char prg_dev[LIBLEN];
+#if defined __WIN__
+	char executing_path_name[LIBLEN];
+	if (!test_if_hard_path(my_progname))
+	{
+		// we don't want to use GetModuleFileName inside of my_path since
+		// my_path is a generic path dereferencing function and here we care
+		// only about the executing binary.
+		GetModuleFileName(NULL, executing_path_name, sizeof(executing_path_name));
+		my_path(prg_dev, executing_path_name, NULL);
+	}
+	else
+#endif
     my_path(prg_dev,my_progname,"mysql/bin");
     strcat(prg_dev,"/../");			// Remove 'bin' to get base dir
     cleanup_dirname(mysql_home,prg_dev);

--- 1.21/mysql-test/r/rpl_ndb_log.result	2007-04-05 15:14:19 +02:00
+++ 1.22/mysql-test/r/rpl_ndb_log.result	2007-04-05 15:14:19 +02:00
@@ -127,8 +127,8 @@
 slave-bin.000002	#	Write_rows	1	#	table_id: # flags: STMT_END_F
 slave-bin.000002	#	Query	1	#	COMMIT
 show slave status;
-Slave_IO_State	Master_Host	Master_User	Master_Port	Connect_Retry	Master_Log_File	Read_Master_Log_Pos	Relay_Log_File	Relay_Log_Pos	Relay_Master_Log_File	Slave_IO_Running	Slave_SQL_Running	Replicate_Do_DB	Replicate_Ignore_DB	Replicate_Do_Table	Replicate_Ignore_Table	Replicate_Wild_Do_Table	Replicate_Wild_Ignore_Table	Last_Errno	Last_Error	Skip_Counter	Exec_Master_Log_Pos	Relay_Log_Space	Until_Condition	Until_Log_File	Until_Log_Pos	Master_SSL_Allowed	Master_SSL_CA_File	Master_SSL_CA_Path	Master_SSL_Cert	Master_SSL_Cipher	Master_SSL_Key	Seconds_Behind_Master
-#	127.0.0.1	root	MASTER_PORT	1	master-bin.000002	617	#	#	master-bin.000002	Yes	Yes				#			0		0	617	#	None		0	No						#
+Slave_IO_State	Master_Host	Master_User	Master_Port	Connect_Retry	Master_Log_File	Read_Master_Log_Pos	Relay_Log_File	Relay_Log_Pos	Relay_Master_Log_File	Slave_IO_Running	Slave_SQL_Running	Replicate_Do_DB	Replicate_Ignore_DB	Replicate_Do_Table	Replicate_Ignore_Table	Replicate_Wild_Do_Table	Replicate_Wild_Ignore_Table	Last_Errno	Last_Error	Skip_Counter	Exec_Master_Log_Pos	Relay_Log_Space	Until_Condition	Until_Log_File	Until_Log_Pos	Master_SSL_Allowed	Master_SSL_CA_File	Master_SSL_CA_Path	Master_SSL_Cert	Master_SSL_Cipher	Master_SSL_Key	Seconds_Behind_Master	Master_SSL_Verify_Server_Cert
+#	127.0.0.1	root	MASTER_PORT	1	master-bin.000002	617	#	#	master-bin.000002	Yes	Yes				#			0		0	617	#	None		0	No						#	No
 show binlog events in 'slave-bin.000005' from 4;
 ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Could not find target log
 DROP TABLE t1;

--- 1.16/storage/ndb/src/kernel/blocks/tsman.cpp	2007-04-05 15:14:19 +02:00
+++ 1.17/storage/ndb/src/kernel/blocks/tsman.cpp	2007-04-05 15:14:19 +02:00
@@ -1483,6 +1483,12 @@
   {
     jam();
     err = AllocExtentReq::NoExtentAvailable;
+    Local_datafile_list full_tmp(m_file_pool, ts_ptr.p->m_full_files);
+    if (tmp.isEmpty() && full_tmp.isEmpty())
+    { 
+      jam();
+      err = AllocExtentReq::NoDatafile;
+    }
   }
   
   /**

--- 1.278/mysql-test/mysql-test-run.pl	2007-04-05 15:14:19 +02:00
+++ 1.279/mysql-test/mysql-test-run.pl	2007-04-05 15:14:19 +02:00
@@ -305,6 +305,7 @@
 our @data_dir_lst;
 
 our $used_binlog_format;
+our $used_default_engine;
 our $debug_compiled_binaries;
 our $glob_tot_real_time= 0;
 
@@ -520,7 +521,7 @@
              'compress'                 => \$opt_compress,
              'bench'                    => \$opt_bench,
              'small-bench'              => \$opt_small_bench,
-             'with-ndbcluster'          => \$opt_with_ndbcluster,
+             'with-ndbcluster|ndb'      => \$opt_with_ndbcluster,
              'vs-config'            => \$opt_vs_config,
 
              # Control what test suites or cases to run
@@ -777,6 +778,26 @@
     mtr_report("Using binlog format '$used_binlog_format'");
   }
 
+
+  # --------------------------------------------------------------------------
+  # Find out default storage engine being used(if any)
+  # --------------------------------------------------------------------------
+  if ( $opt_with_ndbcluster )
+  {
+    # --ndb or --with-ndbcluster turns on --default-storage-engine=ndbcluster
+    push(@opt_extra_mysqld_opt, "--default-storage-engine=ndbcluster");
+  }
+
+  foreach my $arg ( @opt_extra_mysqld_opt )
+  {
+    if ( $arg =~ /default-storage-engine=(\S+)/ )
+    {
+      $used_default_engine= $1;
+    }
+  }
+  mtr_report("Using default engine '$used_default_engine'")
+    if defined $used_default_engine;
+
   # --------------------------------------------------------------------------
   # Check if we should speed up tests by trying to run on tmpfs
   # --------------------------------------------------------------------------
@@ -849,20 +870,22 @@
   # --------------------------------------------------------------------------
   # Check im suport
   # --------------------------------------------------------------------------
-  if (!$opt_extern)
+  if ($opt_extern)
   {
-    if ( $mysql_version_id < 50000 ) {
-      # Instance manager is not supported until 5.0
-      $opt_skip_im= 1;
-
-    }
-
-    if ( $glob_win32 ) {
-      mtr_report("Disable Instance manager - not supported on Windows");
-      $opt_skip_im= 1;
-    }
-
+    mtr_report("Disable instance manager when running with extern mysqld");
+    $opt_skip_im= 1;
   }
+  elsif ( $mysql_version_id < 50000 )
+  {
+    # Instance manager is not supported until 5.0
+    $opt_skip_im= 1;
+  }
+  elsif ( $glob_win32 )
+  {
+    mtr_report("Disable Instance manager - testing not supported on Windows");
+    $opt_skip_im= 1;
+  }
+
   # --------------------------------------------------------------------------
   # Record flag
   # --------------------------------------------------------------------------
@@ -900,10 +923,6 @@
   # --------------------------------------------------------------------------
   # Ndb cluster flags
   # --------------------------------------------------------------------------
-  if ( $opt_with_ndbcluster and !$opt_bench)
-  {
-    mtr_error("Can only use --with-ndbcluster together with --bench");
-  }
 
   if ( $opt_ndbconnectstring )
   {
@@ -1056,8 +1075,6 @@
   # socket path names.
   $sockdir = tempdir(CLEANUP => 0) if ( length($sockdir) > 80 );
 
-  # Put this into a hash, will be a C struct
-
   $master->[0]=
   {
    pid           => 0,
@@ -1065,7 +1082,6 @@
    idx           => 0,
    path_myddir   => "$opt_vardir/master-data",
    path_myerr    => "$opt_vardir/log/master.err",
-   path_mylog    => "$opt_vardir/log/master.log",
    path_pid    => "$opt_vardir/run/master.pid",
    path_sock   => "$sockdir/master.sock",
    port   =>  $opt_master_myport,
@@ -1081,7 +1097,6 @@
    idx           => 1,
    path_myddir   => "$opt_vardir/master1-data",
    path_myerr    => "$opt_vardir/log/master1.err",
-   path_mylog    => "$opt_vardir/log/master1.log",
    path_pid    => "$opt_vardir/run/master1.pid",
    path_sock   => "$sockdir/master1.sock",
    port   => $opt_master_myport + 1,
@@ -1097,7 +1112,6 @@
    idx           => 0,
    path_myddir   => "$opt_vardir/slave-data",
    path_myerr    => "$opt_vardir/log/slave.err",
-   path_mylog    => "$opt_vardir/log/slave.log",
    path_pid    => "$opt_vardir/run/slave.pid",
    path_sock   => "$sockdir/slave.sock",
    port   => $opt_slave_myport,
@@ -1114,7 +1128,6 @@
    idx           => 1,
    path_myddir   => "$opt_vardir/slave1-data",
    path_myerr    => "$opt_vardir/log/slave1.err",
-   path_mylog    => "$opt_vardir/log/slave1.log",
    path_pid    => "$opt_vardir/run/slave1.pid",
    path_sock   => "$sockdir/slave1.sock",
    port   => $opt_slave_myport + 1,
@@ -1130,7 +1143,6 @@
    idx           => 2,
    path_myddir   => "$opt_vardir/slave2-data",
    path_myerr    => "$opt_vardir/log/slave2.err",
-   path_mylog    => "$opt_vardir/log/slave2.log",
    path_pid    => "$opt_vardir/run/slave2.pid",
    path_sock   => "$sockdir/slave2.sock",
    port   => $opt_slave_myport + 2,
@@ -1334,7 +1346,7 @@
 
   #
   # Execute "mysqld --no-defaults --help --verbose" to get a
-  # of all features and settings
+  # list of all features and settings
   #
   my $list= `$exe_mysqld --no-defaults --verbose --help`;
 
@@ -1398,6 +1410,40 @@
 }
 
 
+sub run_query($$) {
+  my ($mysqld, $query)= @_;
+
+  my $args;
+  mtr_init_args(\$args);
+
+  mtr_add_arg($args, "--no-defaults");
+  mtr_add_arg($args, "--user=%s", $opt_user);
+  mtr_add_arg($args, "--port=%d", $mysqld->{'port'});
+  mtr_add_arg($args, "--socket=%s", $mysqld->{'path_sock'});
+  mtr_add_arg($args, "--silent"); # Tab separated output
+  mtr_add_arg($args, "-e '%s'", $query);
+
+  my $cmd= "$exe_mysql " . join(' ', @$args);
+  mtr_verbose("cmd: $cmd");
+  return `$cmd`;
+}
+
+
+sub collect_mysqld_features_from_running_server ()
+{
+  my $list= run_query($master->[0], "use mysql; SHOW VARIABLES");
+
+  foreach my $line (split('\n', $list))
+  {
+    # Put variables into hash
+    if ( $line =~ /^([\S]+)[ \t]+(.*?)\r?$/ )
+    {
+      print "$1=\"$2\"\n";
+      $mysqld_variables{$1}= $2;
+    }
+  }
+}
+
 sub executable_setup_im () {
 
   # Look for instance manager binary - mysqlmanager
@@ -1933,7 +1979,7 @@
   # ----------------------------------------------------
   my $cmdline_mysqlbinlog=
     mtr_native_path($exe_mysqlbinlog) .
-      " --no-defaults --disable-force-if-open --debug-info --local-load=$opt_tmpdir";
+      " --no-defaults --disable-force-if-open --debug-info";
   if ( !$opt_extern && $mysql_version_id >= 50000 )
   {
     $cmdline_mysqlbinlog .=" --character-sets-dir=$path_charsetsdir";
@@ -2802,10 +2848,7 @@
     }
     else
     {
-      if ($opt_verbose)
-      {
-	mtr_report("No need to create '$opt_vardir' it already exists");
-      }
+      mtr_verbose("No need to create '$opt_vardir' it already exists");
     }
   }
   else
@@ -3712,8 +3755,10 @@
     mtr_add_arg($args, "%s--log-output=table,file", $prefix);
   }
 
-  mtr_add_arg($args, "%s--log=%s", $prefix, $mysqld->{'path_mylog'});
-
+  my $log_base_path= "$opt_vardir/log/$mysqld->{'type'}$sidx";
+  mtr_add_arg($args, "%s--log=%s.log", $prefix, $log_base_path);
+  mtr_add_arg($args,
+	      "%s--log-slow-queries=%s-slow.log", $prefix, $log_base_path);
 
   # Check if "extra_opt" contains --skip-log-bin
   my $skip_binlog= grep(/^--skip-log-bin/, @$extra_opt);
@@ -5019,7 +5064,7 @@
   skip-ssl              Dont start server with support for ssl connections
   bench                 Run the benchmark suite
   small-bench           Run the benchmarks with --small-tests --small-tables
-  with-ndbcluster       Use cluster as default table type for benchmark
+  ndb|with-ndbcluster   Use cluster as default table type
   vs-config             Visual Studio configuration used to create executables
                         (default: MTR_VS_CONFIG environment variable)
 

--- 1.108/storage/ndb/src/mgmsrv/ConfigInfo.cpp	2007-04-05 15:14:19 +02:00
+++ 1.109/storage/ndb/src/mgmsrv/ConfigInfo.cpp	2007-04-05 15:14:19 +02:00
@@ -892,7 +892,7 @@
     ConfigInfo::CI_USED,
     false,
     ConfigInfo::CI_INT,
-    "40",
+    "0",
     "20",
     STR_VALUE(MAX_INT_RNIL) },
   

--- 1.16/storage/ndb/src/common/transporter/TCP_Transporter.cpp	2007-04-05 15:14:19 +02:00
+++ 1.17/storage/ndb/src/common/transporter/TCP_Transporter.cpp	2007-04-05 15:14:19 +02:00
@@ -206,6 +206,7 @@
   set_get(theSocket, SOL_SOCKET, SO_RCVBUF, "SO_RCVBUF", sockOptRcvBufSize);
   set_get(theSocket, SOL_SOCKET, SO_SNDBUF, "SO_SNDBUF", sockOptSndBufSize);
   set_get(theSocket, IPPROTO_TCP, TCP_NODELAY, "TCP_NODELAY", sockOptNodelay);
+  set_get(theSocket, SOL_SOCKET, SO_KEEPALIVE, "SO_KEEPALIVE", 1);
 
   if (sockOptTcpMaxSeg)
   {

--- 1.90/storage/ndb/src/mgmclient/CommandInterpreter.cpp	2007-04-05 15:14:19 +02:00
+++ 1.91/storage/ndb/src/mgmclient/CommandInterpreter.cpp	2007-04-05 15:14:19 +02:00
@@ -1968,6 +1968,9 @@
     return -1;
   }
 
+  if (!nostart)
+    ndbout_c("Shutting down nodes with \"-n, no start\" option, to subsequently start the nodes.");
+
   result= ndb_mgm_restart3(m_mgmsrv, no_of_nodes, node_ids,
                            initialstart, nostart, abort, &need_disconnect);
 
@@ -2494,6 +2497,7 @@
   {
     flags = 0;
     result = ndb_mgm_start_backup(m_mgmsrv, 0, &backupId, &reply);
+    goto END_BACKUP;
   }
   else if (sz == 1 || (sz == 3 && args[1] == "WAIT" && args[2] == "COMPLETED"))
   {
@@ -2527,6 +2531,7 @@
   }
   result = ndb_mgm_start_backup(m_mgmsrv, flags, &backupId, &reply);
 
+END_BACKUP:
   if (result != 0) {
     ndbout << "Backup failed" << endl;
     printError();

--- 1.33/storage/ndb/tools/listTables.cpp	2007-04-05 15:14:19 +02:00
+++ 1.34/storage/ndb/tools/listTables.cpp	2007-04-05 15:14:19 +02:00
@@ -310,6 +310,7 @@
   _tabname = argv[0];
 
   ndb_cluster_connection = new Ndb_cluster_connection(opt_connect_str);
+  ndb_cluster_connection->set_name("ndb_show_tables");
   if (ndb_cluster_connection->connect(12,5,1))
     fatal("Unable to connect to management server.");
   if (ndb_cluster_connection->wait_until_ready(30,0) < 0)

--- 1.441/sql/ha_ndbcluster.cc	2007-04-05 15:14:19 +02:00
+++ 1.442/sql/ha_ndbcluster.cc	2007-04-05 15:14:19 +02:00
@@ -3019,8 +3019,13 @@
   if (thd->slave_thread)
     op->setAnyValue(thd->server_id);
 
-  // Execute update operation
-  if (!cursor && execute_no_commit(this,trans,FALSE) != 0) {
+  /*
+    Execute update operation if we are not doing a scan for update
+    and there exist UPDATE AFTER triggers
+  */
+
+  if ((!cursor || m_update_cannot_batch) && 
+      execute_no_commit(this,trans,false) != 0) {
     no_uncommitted_rows_execute_failure();
     DBUG_RETURN(ndb_err(trans));
   }
@@ -3077,7 +3082,7 @@
     if (thd->slave_thread)
       ((NdbOperation *)trans->getLastDefinedOperation())->setAnyValue(thd->server_id);
 
-    if (!m_primary_key_update)
+    if (!(m_primary_key_update || m_delete_cannot_batch))
       // If deleting from cursor, NoCommit will be handled in next_result
       DBUG_RETURN(0);
   }
@@ -3141,11 +3146,15 @@
   my_bitmap_map *old_map= dbug_tmp_use_all_columns(table, table->write_set);
   DBUG_ENTER("ndb_unpack_record");
 
+ // Set filler bits
+  if (table->s->null_bytes > 0)
+       buf[table->s->null_bytes - 1]|= 256U - (1U <<
+					       table->s->last_null_bit_pos);
   // Set null flag(s)
-  bzero(buf, table->s->null_bytes);
   for ( ; field;
        p_field++, value++, field= *p_field)
   {
+    field->set_notnull(row_offset);       
     if ((*value).ptr)
     {
       if (!(field->flags & BLOB_FLAG))
@@ -3155,7 +3164,7 @@
         {
           if (is_null > 0)
           {
-            DBUG_PRINT("info",("[%u] NULL",
+	    DBUG_PRINT("info",("[%u] NULL",
                                (*value).rec->getColumn()->getColumnNo()));
             field->set_null(row_offset);
           }
@@ -3918,6 +3927,14 @@
     DBUG_PRINT("info", ("Turning OFF use of write instead of insert"));
     m_use_write= FALSE;
     break;
+  case HA_EXTRA_DELETE_CANNOT_BATCH:
+    DBUG_PRINT("info", ("HA_EXTRA_DELETE_CANNOT_BATCH"));
+    m_delete_cannot_batch= TRUE;
+    break;
+  case HA_EXTRA_UPDATE_CANNOT_BATCH:
+    DBUG_PRINT("info", ("HA_EXTRA_UPDATE_CANNOT_BATCH"));
+    m_update_cannot_batch= TRUE;
+    break;
   default:
     break;
   }
@@ -3942,6 +3959,8 @@
   m_ignore_dup_key= FALSE;
   m_use_write= FALSE;
   m_ignore_no_key= FALSE;
+  m_delete_cannot_batch= FALSE;
+  m_update_cannot_batch= FALSE;
 
   DBUG_RETURN(0);
 }
@@ -4460,7 +4479,9 @@
   DBUG_PRINT("transaction",("%s",
                             trans == thd_ndb->stmt ?
                             "stmt" : "all"));
-  DBUG_ASSERT(ndb && trans);
+  DBUG_ASSERT(ndb);
+  if (trans == NULL)
+    DBUG_RETURN(0);
 
 #ifdef HAVE_NDB_BINLOG
   if (thd->slave_thread)
@@ -5938,6 +5959,8 @@
   m_bulk_insert_rows((ha_rows) 1024),
   m_rows_changed((ha_rows) 0),
   m_bulk_insert_not_flushed(FALSE),
+  m_delete_cannot_batch(FALSE),
+  m_update_cannot_batch(FALSE),
   m_ops_pending(0),
   m_skip_auto_increment(TRUE),
   m_blobs_pending(0),
@@ -6462,7 +6485,7 @@
   LEX *old_lex= thd->lex, newlex;
   thd->lex= &newlex;
   newlex.current_select= NULL;
-  lex_start(thd, (const uchar*) "", 0);
+  lex_start(thd, "", 0);
   int res= ha_create_table_from_engine(thd, db, table_name);
   thd->lex= old_lex;
   return res;
@@ -10910,6 +10933,36 @@
     if (field->flags & FIELD_IN_ADD_INDEX)
       ai=1;
   }
+
+  char tablespace_name[FN_LEN]; 
+  if (get_tablespace_name(current_thd, tablespace_name, FN_LEN))
+  {
+    if (create_info->tablespace) 
+    {
+      if (strcmp(create_info->tablespace, tablespace_name))
+      {
+        DBUG_PRINT("info", ("storage media is changed, old tablespace=%s, new tablespace=%s",
+          tablespace_name, create_info->tablespace));
+        DBUG_RETURN(COMPATIBLE_DATA_NO);
+      }
+    }
+    else
+    {
+      DBUG_PRINT("info", ("storage media is changed, old is DISK and tablespace=%s, new is MEM",
+        tablespace_name));
+      DBUG_RETURN(COMPATIBLE_DATA_NO);
+    }
+  }
+  else
+  {
+    if (create_info->storage_media != HA_SM_MEMORY)
+    {
+      DBUG_PRINT("info", ("storage media is changed, old is MEM, new is DISK and tablespace=%s",
+        create_info->tablespace));
+      DBUG_RETURN(COMPATIBLE_DATA_NO);
+    }
+  }
+
   if (table_changes != IS_EQUAL_YES)
     DBUG_RETURN(COMPATIBLE_DATA_NO);
   

--- 1.174/sql/ha_ndbcluster.h	2007-04-05 15:14:19 +02:00
+++ 1.175/sql/ha_ndbcluster.h	2007-04-05 15:14:19 +02:00
@@ -965,6 +965,8 @@
   ha_rows m_bulk_insert_rows;
   ha_rows m_rows_changed;
   bool m_bulk_insert_not_flushed;
+  bool m_delete_cannot_batch;
+  bool m_update_cannot_batch;
   ha_rows m_ops_pending;
   bool m_skip_auto_increment;
   bool m_blobs_pending;

--- 1.92/storage/ndb/src/ndbapi/ndberror.c	2007-04-05 15:14:19 +02:00
+++ 1.93/storage/ndb/src/ndbapi/ndberror.c	2007-04-05 15:14:19 +02:00
@@ -201,7 +201,8 @@
   { 904,  HA_ERR_INDEX_FILE_FULL, IS, "Out of fragment records (increase MaxNoOfOrderedIndexes)" },
   { 905,  DMEC, IS, "Out of attribute records (increase MaxNoOfAttributes)" },
   { 1601, HA_ERR_RECORD_FILE_FULL, IS, "Out extents, tablespace full" },
-  
+  { 1602, DMEC, IS,"No datafile in tablespace" },
+
   /**
    * TimeoutExpired 
    */

--- 1.8/mysql-test/r/rpl_ndb_basic.result	2007-04-05 15:14:19 +02:00
+++ 1.9/mysql-test/r/rpl_ndb_basic.result	2007-04-05 15:14:19 +02:00
@@ -147,6 +147,7 @@
 Master_SSL_Cipher	
 Master_SSL_Key	
 Seconds_Behind_Master	<Seconds_Behind_Master>
+Master_SSL_Verify_Server_Cert	No
 set GLOBAL slave_transaction_retries=10;
 START SLAVE;
 select * from t1 order by nid;

--- 1.12/mysql-test/r/rpl_ndb_sync.result	2007-04-05 15:14:19 +02:00
+++ 1.13/mysql-test/r/rpl_ndb_sync.result	2007-04-05 15:14:19 +02:00
@@ -72,8 +72,8 @@
 master_log_pos = <the_pos> ;
 START SLAVE;
 SHOW SLAVE STATUS;
-Slave_IO_State	Master_Host	Master_User	Master_Port	Connect_Retry	Master_Log_File	Read_Master_Log_Pos	Relay_Log_File	Relay_Log_Pos	Relay_Master_Log_File	Slave_IO_Running	Slave_SQL_Running	Replicate_Do_DB	Replicate_Ignore_DB	Replicate_Do_Table	Replicate_Ignore_Table	Replicate_Wild_Do_Table	Replicate_Wild_Ignore_Table	Last_Errno	Last_Error	Skip_Counter	Exec_Master_Log_Pos	Relay_Log_Space	Until_Condition	Until_Log_File	Until_Log_Pos	Master_SSL_Allowed	Master_SSL_CA_File	Master_SSL_CA_Path	Master_SSL_Cert	Master_SSL_Cipher	Master_SSL_Key	Seconds_Behind_Master
-<Slave_IO_State>	127.0.0.1	root	MASTER_PORT	1	master-bin.000001	<Read_Master_Log_Pos>	<Relay_Log_File>	<Relay_Log_Pos>	master-bin.000001	Yes	Yes				<Replicate_Ignore_Table>			0		0	<Exec_Master_Log_Pos>	<Relay_Log_Space>	None		0	No						<Seconds_Behind_Master>
+Slave_IO_State	Master_Host	Master_User	Master_Port	Connect_Retry	Master_Log_File	Read_Master_Log_Pos	Relay_Log_File	Relay_Log_Pos	Relay_Master_Log_File	Slave_IO_Running	Slave_SQL_Running	Replicate_Do_DB	Replicate_Ignore_DB	Replicate_Do_Table	Replicate_Ignore_Table	Replicate_Wild_Do_Table	Replicate_Wild_Ignore_Table	Last_Errno	Last_Error	Skip_Counter	Exec_Master_Log_Pos	Relay_Log_Space	Until_Condition	Until_Log_File	Until_Log_Pos	Master_SSL_Allowed	Master_SSL_CA_File	Master_SSL_CA_Path	Master_SSL_Cert	Master_SSL_Cipher	Master_SSL_Key	Seconds_Behind_Master	Master_SSL_Verify_Server_Cert
+<Slave_IO_State>	127.0.0.1	root	MASTER_PORT	1	master-bin.000001	<Read_Master_Log_Pos>	<Relay_Log_File>	<Relay_Log_Pos>	master-bin.000001	Yes	Yes				<Replicate_Ignore_Table>			0		0	<Exec_Master_Log_Pos>	<Relay_Log_Space>	None		0	No						<Seconds_Behind_Master>	No
 SELECT hex(c1),hex(c2),c3 FROM t1 ORDER BY c3;
 hex(c1)	hex(c2)	c3
 1	1	row1
Thread
bk commit into 5.1 tree (jonas:1.2522)jonas5 Apr