Below is the list of changes that have just been committed into a local
5.1 repository of mats. When mats 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.1876 05/04/15 10:31:35 mats@stripped +1 -0
WL#2325: Using mnemonic names instead of magic numbers.
sql/mysqld.cc
1.447 05/04/15 10:31:20 mats@stripped +9 -8
WL#2325: Using mnemonic names instead of magic numbers.
# 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: mats
# Host: romeo.kindahl.net
# Root: /home/bk/w2325-mysql-5.1
--- 1.446/sql/mysqld.cc 2005-04-13 11:39:07 +02:00
+++ 1.447/sql/mysqld.cc 2005-04-15 10:31:20 +02:00
@@ -323,7 +323,8 @@
my_bool opt_binlog_row_level = FALSE; // Statement-level is default
const char *binlog_format_names[]= {"disabled","statement", "row"};
-const char *opt_binlog_format= binlog_format_names[0];
+enum Binlog_format { BF_NONE, BF_STMT, BF_ROW };
+const char *opt_binlog_format= binlog_format_names[BF_NONE];
unsigned long opt_binlog_rows_event_max_size = 1024;
@@ -6147,10 +6148,10 @@
break;
case (int) OPT_BIN_LOG:
opt_bin_log=1;
- if (opt_binlog_format == binlog_format_names[0])
+ if (opt_binlog_format == binlog_format_names[BF_NONE])
{
opt_binlog_row_level= FALSE;
- opt_binlog_format= binlog_format_names[1];
+ opt_binlog_format= binlog_format_names[BF_STMT];
}
break;
case (int) OPT_ERROR_LOG_FILE:
@@ -6222,14 +6223,14 @@
break;
}
case OPT_BINLOG_FORMAT:
- if (strcmp(argument,binlog_format_names[2]) == 0)
+ if (strcmp(argument,binlog_format_names[BF_ROW]) == 0)
{
- opt_binlog_format= binlog_format_names[2];
+ opt_binlog_format= binlog_format_names[BF_ROW];
opt_binlog_row_level = TRUE;
}
- else if (strcmp(argument, binlog_format_names[1]) == 0)
+ else if (strcmp(argument, binlog_format_names[BF_STMT]) == 0)
{
- opt_binlog_format= binlog_format_names[1];
+ opt_binlog_format= binlog_format_names[BF_STMT];
opt_binlog_row_level = FALSE;
}
else
@@ -6517,7 +6518,7 @@
if (opt_ndbcluster)
{
have_ndbcluster= SHOW_OPTION_YES;
- opt_binlog_format= binlog_format_names[2];
+ opt_binlog_format= binlog_format_names[BF_ROW];
opt_binlog_row_level= TRUE;
}
else
| Thread |
|---|
| • bk commit into 5.1 tree (mats:1.1876) | Mats Kindahl | 15 Apr |