List:Commits« Previous MessageNext Message »
From:holyfoot Date:April 24 2006 4:39pm
Subject:bk commit into 5.1 tree (holyfoot:1.2218) BUG#18518
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of hf. When hf 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.2218 06/04/24 19:39:33 holyfoot@deer.(none) +9 -0
  bug #18518 (embedded server crashes starting)
  The problem is that now server works properly only with the 
  row-based replication

  sql/sql_parse.cc
    1.535 06/04/24 19:38:05 holyfoot@stripped +4 -0
    some #ifdef HAVE_ROW_BASED_REPLICATION added

  sql/sql_class.h
    1.292 06/04/24 19:38:05 holyfoot@stripped +2 -0
    some #ifdef HAVE_ROW_BASED_REPLICATION added

  sql/sql_class.cc
    1.253 06/04/24 19:38:05 holyfoot@stripped +10 -1
    some #ifdef HAVE_ROW_BASED_REPLICATION added

  sql/sql_base.cc
    1.312 06/04/24 19:38:05 holyfoot@stripped +2 -0
    some #ifdef HAVE_ROW_BASED_REPLICATION added

  sql/set_var.cc
    1.181 06/04/24 19:38:05 holyfoot@stripped +4 -0
    some #ifdef HAVE_ROW_BASED_REPLICATION added

  sql/mysqld.cc
    1.550 06/04/24 19:38:04 holyfoot@stripped +1 -1
    some #ifdef HAVE_ROW_BASED_REPLICATION added

  sql/log.cc
    1.200 06/04/24 19:38:04 holyfoot@stripped +10 -0
    some #ifdef HAVE_ROW_BASED_REPLICATION added

  config/ac-macros/replication.m4
    1.3 06/04/24 19:38:04 holyfoot@stripped +1 -1
    WITH_ROW_BASED_REPLICATION instead of HAVE_ROW_BASED_REPLICATION in
    config.h

  config/ac-macros/ha_ndbcluster.m4
    1.14 06/04/24 19:38:04 holyfoot@stripped +1 -1
    WITH_NDB_BINLOG instead of HAVE_NDB_BINLOG in config.h

# 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:	holyfoot
# Host:	deer.(none)
# Root:	/home/hf/work/mysql-5.1.18518

--- 1.199/sql/log.cc	Mon Mar 13 11:26:53 2006
+++ 1.200/sql/log.cc	Mon Apr 24 19:38:04 2006
@@ -1071,12 +1071,16 @@
       were, we would have to ensure that we're not ending a statement
       inside a stored function.
      */
+#ifdef HAVE_ROW_BASED_REPLICATION
     thd->binlog_flush_pending_rows_event(true);
+#endif
     error= mysql_bin_log.write(thd, trans_log, end_ev);
   }
   else
   {
+#ifdef HAVE_ROW_BASED_REPLICATION
     thd->binlog_delete_pending_rows_event();
+#endif
   }
 
   /*
@@ -2600,6 +2604,7 @@
 }
 
 
+#ifdef HAVE_ROW_BASED_REPLICATION
 /*
   These functions are placed in this file since they need access to
   binlog_hton, which has internal linkage.
@@ -2776,6 +2781,7 @@
 
   DBUG_RETURN(error);
 }
+#endif /*HAVE_ROW_BASED_REPLICATION*/
 
 /*
   Write an event to the binary log
@@ -2810,7 +2816,9 @@
   */
   bool const end_stmt=
     thd->prelocked_mode && thd->lex->requires_prelocking();
+#ifdef HAVE_ROW_BASED_REPLICATION
   thd->binlog_flush_pending_rows_event(end_stmt);
+#endif /*HAVE_ROW_BASED_REPLICATION*/
 
   pthread_mutex_lock(&LOCK_log);
 
@@ -2852,8 +2860,10 @@
     */
     if (opt_using_transactions && thd)
     {
+#ifdef HAVE_ROW_BASED_REPLICATION
       if (thd->binlog_setup_trx_data())
         goto err;
+#endif /*HAVE_ROW_BASED_REPLICATION*/
 
       binlog_trx_data *const trx_data=
         (binlog_trx_data*) thd->ha_data[binlog_hton.slot];

--- 1.549/sql/mysqld.cc	Tue Mar 21 23:05:49 2006
+++ 1.550/sql/mysqld.cc	Mon Apr 24 19:38:04 2006
@@ -3180,7 +3180,7 @@
   }
   if (global_system_variables.binlog_format == BINLOG_FORMAT_UNSPEC)
   {
-#ifdef HAVE_NDB_BINLOG
+#if defined(HAVE_NDB_BINLOG) && defined(HAVE_ROW_BASED_REPLICATION)
     if (opt_bin_log && have_ndbcluster == SHOW_OPTION_YES)
       global_system_variables.binlog_format= BINLOG_FORMAT_ROW;
     else

--- 1.311/sql/sql_base.cc	Thu Mar  9 06:56:06 2006
+++ 1.312/sql/sql_base.cc	Mon Apr 24 19:38:05 2006
@@ -1069,7 +1069,9 @@
       handled either before writing a query log event (inside
       binlog_query()) or when preparing a pending event.
      */
+#ifdef HAVE_ROW_BASED_REPLICATION
     thd->binlog_flush_pending_rows_event(true);
+#endif /*HAVE_ROW_BASED_REPLICATION*/
     mysql_unlock_tables(thd, thd->lock);
     thd->lock=0;
   }

--- 1.252/sql/sql_class.cc	Thu Mar 23 17:51:26 2006
+++ 1.253/sql/sql_class.cc	Mon Apr 24 19:38:05 2006
@@ -197,7 +197,10 @@
   :Statement(CONVENTIONAL_EXECUTION, 0, ALLOC_ROOT_MIN_BLOCK_SIZE, 0),
    Open_tables_state(refresh_version), rli_fake(0),
    lock_id(&main_lock_id),
-   user_time(0), in_sub_stmt(0), binlog_table_maps(0),
+   user_time(0), in_sub_stmt(0),
+#ifdef HAVE_ROW_BASED_REPLICATION
+   binlog_table_maps(0),
+#endif /*HAVE_ROW_BASED_REPLICATION*/
    global_read_lock(0), is_fatal_error(0),
    rand_used(0), time_zone_used(0),
    last_insert_id_used(0), insert_id_used(0), clear_next_insert_id(0),
@@ -330,7 +333,9 @@
   bzero((char*) warn_count, sizeof(warn_count));
   total_warn_count= 0;
   update_charset();
+#ifdef HAVE_ROW_BASED_REPLICATION
   reset_current_stmt_binlog_row_based();
+#endif /*HAVE_ROW_BASED_REPLICATION*/
   bzero((char *) &status_var, sizeof(status_var));
 }
 
@@ -2618,8 +2623,10 @@
         the flushing will be done inside the top-most
         close_thread_tables().
        */
+#ifdef HAVE_ROW_BASED_REPLICATION
       if (this->lock)
         DBUG_RETURN(binlog_flush_pending_rows_event(TRUE));
+#endif /*HAVE_ROW_BASED_REPLICATION*/
       DBUG_RETURN(0);
     }
     /* Otherwise, we fall through */
@@ -2638,7 +2645,9 @@
         table maps were written.
        */
       int error= mysql_bin_log.write(&qinfo);
+#ifdef HAVE_ROW_BASED_REPLICATION
       binlog_table_maps= 0;
+#endif /*HAVE_ROW_BASED_REPLICATION*/
       DBUG_RETURN(error);
     }
     break;

--- 1.291/sql/sql_class.h	Mon Mar 20 18:46:07 2006
+++ 1.292/sql/sql_class.h	Mon Apr 24 19:38:05 2006
@@ -1402,6 +1402,7 @@
   void restore_sub_statement_state(Sub_statement_state *backup);
   void set_n_backup_active_arena(Query_arena *set, Query_arena *backup);
   void restore_active_arena(Query_arena *set, Query_arena *backup);
+#ifdef HAVE_ROW_BASED_REPLICATION
   inline void set_current_stmt_binlog_row_based_if_mixed()
   {
     if (variables.binlog_format == BINLOG_FORMAT_MIXED)
@@ -1415,6 +1416,7 @@
   {
     current_stmt_binlog_row_based= test(variables.binlog_format == BINLOG_FORMAT_ROW);
   }
+#endif /*HAVE_ROW_BASED_REPLICATION*/
 };
 
 

--- 1.534/sql/sql_parse.cc	Tue Mar 21 16:10:09 2006
+++ 1.535/sql/sql_parse.cc	Mon Apr 24 19:38:05 2006
@@ -2449,8 +2449,10 @@
     statistic_increment(thd->status_var.com_stat[lex->sql_command],
                         &LOCK_status);
 
+#ifdef HAVE_ROW_BASED_REPLICATION
   if (lex->binlog_row_based_if_mixed)
     thd->set_current_stmt_binlog_row_based_if_mixed();
+#endif /*HAVE_ROW_BASED_REPLICATION*/
 
   switch (lex->sql_command) {
   case SQLCOM_SELECT:
@@ -5111,7 +5113,9 @@
   */
   if (thd->one_shot_set && lex->sql_command != SQLCOM_SET_OPTION)
     reset_one_shot_variables(thd);
+#ifdef HAVE_ROW_BASED_REPLICATION
   thd->reset_current_stmt_binlog_row_based();
+#endif /*HAVE_ROW_BASED_REPLICATION*/
 
   /*
     The return value for ROW_COUNT() is "implementation dependent" if the

--- 1.13/config/ac-macros/ha_ndbcluster.m4	Thu Feb 16 00:04:36 2006
+++ 1.14/config/ac-macros/ha_ndbcluster.m4	Mon Apr 24 19:38:04 2006
@@ -238,7 +238,7 @@
 
   if test X"$have_ndb_binlog" = Xyes
   then
-    AC_DEFINE([HAVE_NDB_BINLOG], [1],
+    AC_DEFINE([WITH_NDB_BINLOG], [1],
               [Including Ndb Cluster Binlog])
     AC_MSG_RESULT([Including Ndb Cluster Binlog])
   else

--- 1.2/config/ac-macros/replication.m4	Sun Feb 26 00:10:55 2006
+++ 1.3/config/ac-macros/replication.m4	Mon Apr 24 19:38:04 2006
@@ -15,7 +15,7 @@
 
   case "$row_based" in
   yes )
-    AC_DEFINE([HAVE_ROW_BASED_REPLICATION], [1], [Define to have row-based replication])
+    AC_DEFINE([WITH_ROW_BASED_REPLICATION], [1], [Define to have row-based replication])
     AC_MSG_RESULT([-- including row-based replication])
     [have_row_based=yes]
     ;;

--- 1.180/sql/set_var.cc	Tue Mar 21 13:54:21 2006
+++ 1.181/sql/set_var.cc	Mon Apr 24 19:38:05 2006
@@ -1262,12 +1262,14 @@
     And this test will also prevent switching from RBR to RBR (a no-op which
     should not happen too often).
   */
+#ifdef HAVE_ROW_BASED_REPLICATION
   if ((thd->variables.binlog_format == BINLOG_FORMAT_ROW) &&
       thd->temporary_tables)
   {
     my_error(ER_TEMP_TABLE_PREVENTS_SWITCH_OUT_OF_RBR, MYF(0));
     return 1;
   }
+#endif /*HAVE_ROW_BASED_REPLICATION*/
   /*
     if in a stored function, it's too late to change mode
   */
@@ -1291,7 +1293,9 @@
 
 void fix_binlog_format_after_update(THD *thd, enum_var_type type)
 {
+#ifdef HAVE_ROW_BASED_REPLICATION
   thd->reset_current_stmt_binlog_row_based();
+#endif /*HAVE_ROW_BASED_REPLICATION*/
 }
 
 static void fix_max_binlog_size(THD *thd, enum_var_type type)
Thread
bk commit into 5.1 tree (holyfoot:1.2218) BUG#18518holyfoot24 Apr