3411 magnus.blaudd@stripped 2011-11-15
WL#5881
- fix review comments, move extern declaration to mysqld.h
- add comment about !generic
- remove MCP tags
modified:
libmysqld/lib_sql.cc
sql/mysqld.cc
sql/mysqld.h
sql/rpl_slave.cc
3410 magnus.blaudd@stripped 2011-11-15
WL#5881
- after review fixes, moving extren declaration to mysqld.h
- remove all MCP tags
- fix mysqld--help*.result files for the new variable
modified:
client/mysqlbinlog.cc
mysql-test/include/mysqld--help.inc
mysql-test/r/mysqld--help-notwin.result
mysql-test/r/mysqld--help-win.result
sql/mysqld.cc
sql/mysqld.h
sql/rpl_slave.h
sql/sys_vars.cc
3409 magnus.blaudd@stripped 2011-11-15
WL#5881
- update patch for bug#58017 after review
modified:
sql/handler.h
sql/table.cc
storage/federated/ha_federated.h
3408 magnus.blaudd@stripped 2011-11-15
WL#5881
- remove MCP patch for BUG44529, it's just a bad fix for sideffect
caused by ndb schema dist problem
modified:
sql/sql_db.cc
3407 magnus.blaudd@stripped 2011-11-14
WL#5881
- remove unrelated whitespace changes
modified:
include/mysql.h.pp
sql/binlog.cc
sql/log_event.h
sql/sql_delete.cc
sql/sql_select.cc
=== modified file 'client/mysqlbinlog.cc'
--- a/client/mysqlbinlog.cc 2011-09-20 09:16:45 +0000
+++ b/client/mysqlbinlog.cc 2011-11-15 13:30:43 +0000
@@ -111,10 +111,8 @@ static ulonglong rec_count= 0;
static short binlog_flags = 0;
static MYSQL* mysql = NULL;
static char* dirname_for_local_load= 0;
-#ifndef MCP_BUG53205
-uint opt_server_id_bits = 0;
-ulong opt_server_id_mask = 0;
-#endif
+static uint opt_server_id_bits = 0;
+static ulong opt_server_id_mask = 0;
/**
Pointer to the Format_description_log_event of the currently active binlog.
@@ -1099,13 +1097,11 @@ static struct my_option my_long_options[
"Extract only binlog entries created by the server having the given id.",
&server_id, &server_id, 0, GET_ULONG,
REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
-#ifndef MCP_BUG53205
{"server-id-bits", 0,
"Set number of significant bits in server-id",
&opt_server_id_bits, &opt_server_id_bits,
/* Default + Max 32 bits, minimum 7 bits */
0, GET_UINT, REQUIRED_ARG, 32, 7, 32, 0, 0, 0},
-#endif
{"set-charset", OPT_SET_CHARSET,
"Add 'SET NAMES character_set' to the output.", &charset,
&charset, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
@@ -2217,10 +2213,8 @@ int main(int argc, char** argv)
if (opt_base64_output_mode == BASE64_OUTPUT_UNSPEC)
opt_base64_output_mode= BASE64_OUTPUT_AUTO;
-#ifndef MCP_BUG53205
opt_server_id_mask = (opt_server_id_bits == 32)?
~ ulong(0) : (1 << opt_server_id_bits) -1;
-#endif
my_set_max_open_files(open_files_limit);
=== modified file 'libmysqld/lib_sql.cc'
--- a/libmysqld/lib_sql.cc 2011-11-14 09:50:34 +0000
+++ b/libmysqld/lib_sql.cc 2011-11-15 13:42:05 +0000
@@ -630,8 +630,8 @@ int init_embedded_server(int argc, char
mysql_cond_signal(&COND_server_started);
mysql_mutex_unlock(&LOCK_server_started);
-#ifndef MCP_BUG46955
#ifdef WITH_NDBCLUSTER_STORAGE_ENGINE
+ /* engine specific hook, to be made generic */
if (ndb_wait_setup_func && ndb_wait_setup_func(opt_ndb_wait_setup))
{
sql_print_warning("NDB : Tables not available after %lu seconds."
@@ -639,7 +639,7 @@ int init_embedded_server(int argc, char
opt_ndb_wait_setup);
}
#endif
-#endif
+
return 0;
}
=== modified file 'mysql-test/include/mysqld--help.inc'
--- a/mysql-test/include/mysqld--help.inc 2011-09-06 12:43:05 +0000
+++ b/mysql-test/include/mysqld--help.inc 2011-11-15 13:30:43 +0000
@@ -24,8 +24,6 @@ perl;
@plugins=qw/innodb ndb ndbinfo archive blackhole federated partition ndbcluster debug temp-pool ssl des-key-file
thread-concurrency super-large-pages mutex-deadlock-detector null-audit/;
- push(@plugins, 'server-id-bits'); # MCP_BUG53205, variable may not be there
-
# And substitute the content some environment variables with their
# names:
@env=qw/MYSQLTEST_VARDIR MYSQL_TEST_DIR MYSQL_CHARSETSDIR MYSQL_SHAREDIR/;
=== modified file 'mysql-test/r/mysqld--help-notwin.result'
--- a/mysql-test/r/mysqld--help-notwin.result 2011-09-27 12:11:16 +0000
+++ b/mysql-test/r/mysqld--help-notwin.result 2011-11-15 13:30:43 +0000
@@ -666,6 +666,7 @@ The following options may be given as th
files within specified directory
--server-id=# Uniquely identifies the server instance in the community
of replication partners
+ --server-id-bits=# Set number of significant bits in server-id
--show-slave-auth-info
Show user and password in SHOW SLAVE HOSTS on this
master.
@@ -1019,6 +1020,7 @@ safe-user-create FALSE
secure-auth FALSE
secure-file-priv (No default value)
server-id 0
+server-id-bits 32
show-slave-auth-info FALSE
skip-grant-tables TRUE
skip-name-resolve FALSE
=== modified file 'mysql-test/r/mysqld--help-win.result'
--- a/mysql-test/r/mysqld--help-win.result 2011-09-27 12:11:16 +0000
+++ b/mysql-test/r/mysqld--help-win.result 2011-11-15 13:30:43 +0000
@@ -666,6 +666,7 @@ The following options may be given as th
files within specified directory
--server-id=# Uniquely identifies the server instance in the community
of replication partners
+ --server-id-bits=# Set number of significant bits in server-id
--shared-memory Enable the shared memory
--shared-memory-base-name=name
Base name of shared memory
@@ -1023,6 +1024,7 @@ safe-user-create FALSE
secure-auth FALSE
secure-file-priv (No default value)
server-id 0
+server-id-bits 32
shared-memory FALSE
shared-memory-base-name MYSQL
show-slave-auth-info FALSE
=== modified file 'sql/handler.h'
--- a/sql/handler.h 2011-11-14 14:25:51 +0000
+++ b/sql/handler.h 2011-11-15 13:15:11 +0000
@@ -90,8 +90,8 @@
#define HA_CAN_INSERT_DELAYED (1 << 14)
/*
If we get the primary key columns for free when we do an index read
- It also implies that we have to retrive the primary key when using
- position() and rnd_pos().
+ (usually, it also implies that HA_PRIMARY_KEY_REQUIRED_FOR_POSITION
+ flag is set).
*/
#define HA_PRIMARY_KEY_IN_READ_INDEX (1 << 15)
/*
=== modified file 'sql/mysqld.cc'
--- a/sql/mysqld.cc 2011-09-07 10:08:09 +0000
+++ b/sql/mysqld.cc 2011-11-15 13:42:05 +0000
@@ -411,14 +411,8 @@ handlerton *heap_hton;
handlerton *myisam_hton;
handlerton *partition_hton;
-#ifndef MCP_BUG53205
uint opt_server_id_bits= 0;
ulong opt_server_id_mask= 0;
-#endif
-#ifndef MCP_BUG46955
-extern int(*ndb_wait_setup_func)(ulong);
-extern ulong opt_ndb_wait_setup;
-#endif
my_bool read_only= 0, opt_readonly= 0;
my_bool use_temp_pool, relay_log_purge;
my_bool relay_log_recovery;
@@ -4240,7 +4234,6 @@ will be ignored as the --log-bin option
}
#endif
-#ifndef MCP_BUG53205
opt_server_id_mask = ~ulong(0);
#ifdef HAVE_REPLICATION
opt_server_id_mask = (opt_server_id_bits == 32)?
@@ -4252,7 +4245,6 @@ will be ignored as the --log-bin option
unireg_abort(1);
}
#endif
-#endif
if (opt_bin_log)
{
@@ -5036,8 +5028,8 @@ int mysqld_main(int argc, char **argv)
mysql_cond_signal(&COND_server_started);
mysql_mutex_unlock(&LOCK_server_started);
-#ifndef MCP_BUG46955
#ifdef WITH_NDBCLUSTER_STORAGE_ENGINE
+ /* engine specific hook, to be made generic */
if (ndb_wait_setup_func && ndb_wait_setup_func(opt_ndb_wait_setup))
{
sql_print_warning("NDB : Tables not available after %lu seconds."
@@ -5045,7 +5037,6 @@ int mysqld_main(int argc, char **argv)
opt_ndb_wait_setup);
}
#endif
-#endif
#if defined(_WIN32) || defined(HAVE_SMEM)
handle_connections_methods();
=== modified file 'sql/mysqld.h'
--- a/sql/mysqld.h 2011-09-07 10:08:09 +0000
+++ b/sql/mysqld.h 2011-11-15 13:42:05 +0000
@@ -220,6 +220,13 @@ extern const char *opt_date_time_formats
extern handlerton *partition_hton;
extern handlerton *myisam_hton;
extern handlerton *heap_hton;
+extern uint opt_server_id_bits;
+extern ulong opt_server_id_mask;
+#ifdef WITH_NDBCLUSTER_STORAGE_ENGINE
+/* engine specific hook, to be made generic */
+extern int(*ndb_wait_setup_func)(ulong);
+extern ulong opt_ndb_wait_setup;
+#endif
extern const char *load_default_groups[];
extern struct my_option my_long_options[];
extern int mysqld_server_started;
=== modified file 'sql/rpl_slave.cc'
--- a/sql/rpl_slave.cc 2011-09-27 12:11:16 +0000
+++ b/sql/rpl_slave.cc 2011-11-15 13:42:05 +0000
@@ -4579,10 +4579,6 @@ void slave_stop_workers(Relay_log_info *
free_root(&rli->mts_coor_mem_root, MYF(0));
}
-#ifndef MCP_BUG46955
-extern int(*ndb_wait_setup_func)(ulong);
-extern ulong opt_ndb_wait_setup;
-#endif
/**
Slave SQL thread entry point.
@@ -4739,8 +4735,8 @@ pthread_handler_t handle_slave_sql(void
#endif
DBUG_ASSERT(rli->info_thd == thd);
-#ifndef MCP_BUG46955
#ifdef WITH_NDBCLUSTER_STORAGE_ENGINE
+ /* engine specific hook, to be made generic */
if (ndb_wait_setup_func && ndb_wait_setup_func(opt_ndb_wait_setup))
{
sql_print_warning("Slave SQL thread : NDB : Tables not available after %lu"
@@ -4748,7 +4744,6 @@ pthread_handler_t handle_slave_sql(void
opt_ndb_wait_setup);
}
#endif
-#endif
DBUG_PRINT("master_info",("log_file_name: %s position: %s",
rli->get_group_master_log_name(),
=== modified file 'sql/rpl_slave.h'
--- a/sql/rpl_slave.h 2011-09-07 10:08:09 +0000
+++ b/sql/rpl_slave.h 2011-11-15 13:30:43 +0000
@@ -239,9 +239,6 @@ extern char *report_host, *report_passwo
extern my_bool master_ssl;
extern char *master_ssl_ca, *master_ssl_capath, *master_ssl_cert;
extern char *master_ssl_cipher, *master_ssl_key;
-#ifndef MCP_BUG52305
-extern ulong opt_server_id_mask;
-#endif
extern I_List<THD> threads;
=== modified file 'sql/sql_db.cc'
--- a/sql/sql_db.cc 2011-11-14 14:25:51 +0000
+++ b/sql/sql_db.cc 2011-11-15 10:23:31 +0000
@@ -45,11 +45,7 @@
#define MAX_DROP_TABLE_Q_LEN 1024
-#ifdef MCP_BUG44529
const char *del_exts[]= {".frm", ".BAK", ".TMD",".opt", NullS};
-#else
-const char *del_exts[]= {".frm", ".BAK", ".TMD",".opt", ".ndb", NullS};
-#endif
static TYPELIB deletable_extentions=
{array_elements(del_exts)-1,"del_exts", del_exts, NULL};
=== modified file 'sql/sys_vars.cc'
--- a/sql/sys_vars.cc 2011-09-27 12:11:16 +0000
+++ b/sql/sys_vars.cc 2011-11-15 13:30:43 +0000
@@ -2171,14 +2171,11 @@ static Sys_var_charptr Sys_server_uuid(
READ_ONLY GLOBAL_VAR(server_uuid_ptr),
NO_CMD_LINE, IN_FS_CHARSET, DEFAULT(server_uuid));
-#ifndef MCP_BUG53205
-extern uint opt_server_id_bits;
static Sys_var_uint Sys_server_id_bits(
"server_id_bits",
"Set number of significant bits in server-id",
GLOBAL_VAR(opt_server_id_bits), CMD_LINE(REQUIRED_ARG),
VALID_RANGE(0, 32), DEFAULT(32), BLOCK_SIZE(1));
-#endif
static Sys_var_mybool Sys_slave_compressed_protocol(
"slave_compressed_protocol",
=== modified file 'sql/table.cc'
--- a/sql/table.cc 2011-11-14 13:01:55 +0000
+++ b/sql/table.cc 2011-11-15 13:15:11 +0000
@@ -4886,12 +4886,7 @@ void TABLE::prepare_for_position()
{
DBUG_ENTER("TABLE::prepare_for_position");
-#ifndef MCP_BUG58017
- if ((file->ha_table_flags() & (HA_PRIMARY_KEY_IN_READ_INDEX |
- HA_PRIMARY_KEY_REQUIRED_FOR_POSITION)) &&
-#else
- if ((file->ha_table_flags() & HA_PRIMARY_KEY_IN_READ_INDEX) &&
-#endif
+ if ((file->ha_table_flags() & HA_PRIMARY_KEY_REQUIRED_FOR_POSITION) &&
s->primary_key < MAX_KEY)
{
mark_columns_used_by_index_no_reset(s->primary_key, read_set);
=== modified file 'storage/federated/ha_federated.h'
--- a/storage/federated/ha_federated.h 2011-09-07 10:08:09 +0000
+++ b/storage/federated/ha_federated.h 2011-11-15 13:15:11 +0000
@@ -140,8 +140,9 @@ public:
ulonglong table_flags() const
{
/* fix server to be able to get remote server table flags */
- return (HA_PRIMARY_KEY_IN_READ_INDEX | HA_FILE_BASED
- | HA_REC_NOT_IN_SEQ | HA_AUTO_PART_KEY | HA_CAN_INDEX_BLOBS |
+ return (HA_PRIMARY_KEY_IN_READ_INDEX |
+ HA_PRIMARY_KEY_REQUIRED_FOR_POSITION | HA_FILE_BASED |
+ HA_REC_NOT_IN_SEQ | HA_AUTO_PART_KEY | HA_CAN_INDEX_BLOBS |
HA_BINLOG_ROW_CAPABLE | HA_BINLOG_STMT_CAPABLE |
HA_NO_PREFIX_CHAR_KEYS | HA_PRIMARY_KEY_REQUIRED_FOR_DELETE |
HA_NO_TRANSACTIONS /* until fixed by WL#2952 */ |
No bundle (reason: useless for push emails).
| Thread |
|---|
| • bzr push into mysql-trunk-cluster branch (magnus.blaudd:3407 to 3411) WL#5881 | magnus.blaudd | 16 Nov |