Below is the list of changes that have just been committed into a local
5.0 repository of jimw. When jimw 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.1937 05/05/07 03:22:12 jimw@stripped +6 -0
Add support for slave_compressed_protocol, slave_load_tmpdir, and
slave_skip_errors in SHOW VARIABLES. (Bug #7800)
sql/sql_show.cc
1.242 05/05/07 03:19:38 jimw@stripped +27 -0
Handle showing slave_skip_errors
mysql-test/r/rpl_variables.result
1.2 05/05/07 03:21:04 jimw@stripped +9 -0
Update results
mysql-test/t/rpl_variables.test
1.2 05/05/07 03:20:57 jimw@stripped +8 -0
Add test for additional slave-related variables
sql/set_var.cc
1.110 05/05/07 03:18:55 jimw@stripped +4 -0
Add slave_compressed_protocol, slave_load_tmpdir, slave_skip_errors to list
of variables.
sql/structs.h
1.46 05/05/07 03:18:44 jimw@stripped +1 -1
Add SHOW_SLAVE_SKIP_ERRORS
mysql-test/t/rpl_variables-master.opt
1.1 05/05/07 03:12:56 jimw@stripped +1 -0
mysql-test/t/rpl_variables-master.opt
1.0 05/05/07 03:12:56 jimw@stripped +0 -0
BitKeeper file /home/jimw/my/mysql-5.0-7800/mysql-test/t/rpl_variables-master.opt
# 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: jimw
# Host: rama.(none)
# Root: /home/jimw/my/mysql-5.0-7800
--- 1.241/sql/sql_show.cc 2005-05-07 06:55:41 -07:00
+++ 1.242/sql/sql_show.cc 2005-05-07 03:19:38 -07:00
@@ -1345,6 +1345,33 @@
pthread_mutex_unlock(&LOCK_active_mi);
break;
}
+ case SHOW_SLAVE_SKIP_ERRORS:
+ {
+ MY_BITMAP *bitmap= (MY_BITMAP *)value;
+ if (!use_slave_mask || bitmap_is_clear_all(bitmap))
+ {
+ end= strmov(buff, "OFF");
+ }
+ else if (bitmap_is_set_all(bitmap))
+ {
+ end= strmov(buff, "ALL");
+ }
+ else
+ {
+ for (int i= 1; i < MAX_SLAVE_ERROR; i++)
+ {
+ if (bitmap_is_set(bitmap, i))
+ {
+ end+= my_snprintf((char *)end, sizeof(buff) - (end - buff),
+ "%d,", i);
+ }
+ }
+ if (end != buff)
+ end--; // Remove last ','
+ *(char *)end= 0;
+ }
+ break;
+ }
#endif /* HAVE_REPLICATION */
case SHOW_OPENTABLES:
end= int10_to_str((long) cached_tables(), buff, 10);
--- 1.45/sql/structs.h 2005-03-24 02:28:27 -08:00
+++ 1.46/sql/structs.h 2005-05-07 03:18:44 -07:00
@@ -184,7 +184,7 @@
#endif /* HAVE_OPENSSL */
SHOW_RPL_STATUS, SHOW_SLAVE_RUNNING, SHOW_SLAVE_RETRIED_TRANS,
SHOW_KEY_CACHE_LONG, SHOW_KEY_CACHE_CONST_LONG,
- SHOW_LONG_STATUS, SHOW_LONG_CONST_STATUS
+ SHOW_LONG_STATUS, SHOW_LONG_CONST_STATUS, SHOW_SLAVE_SKIP_ERRORS
};
enum SHOW_COMP_OPTION { SHOW_OPTION_YES, SHOW_OPTION_NO, SHOW_OPTION_DISABLED};
--- 1.1/mysql-test/r/rpl_variables.result 2005-03-29 17:17:44 -08:00
+++ 1.2/mysql-test/r/rpl_variables.result 2005-05-07 03:21:04 -07:00
@@ -6,3 +6,12 @@
start slave;
set global slave_net_timeout=100;
set global sql_slave_skip_counter=100;
+show variables like 'slave_compressed_protocol';
+Variable_name Value
+slave_compressed_protocol OFF
+show variables like 'slave_load_tmpdir';
+Variable_name Value
+slave_load_tmpdir MYSQL_TEST_DIR/var/tmp/
+show variables like 'slave_skip_errors';
+Variable_name Value
+slave_skip_errors 3,100,137,643,1752
--- New file ---
+++ mysql-test/t/rpl_variables-master.opt 05/05/07 03:12:56
--slave-skip-errors=3,100,137,643,1752
--- 1.1/mysql-test/t/rpl_variables.test 2005-03-29 17:17:44 -08:00
+++ 1.2/mysql-test/t/rpl_variables.test 2005-05-07 03:20:57 -07:00
@@ -2,3 +2,11 @@
set global slave_net_timeout=100;
set global sql_slave_skip_counter=100;
+
+# BUG #7800: Add various-slave related variables to SHOW VARIABLES
+show variables like 'slave_compressed_protocol';
+--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
+show variables like 'slave_load_tmpdir';
+# We just set some arbitrary values in variables-master.opt so we can test
+# that a list of values works correctly
+show variables like 'slave_skip_errors';
--- 1.109/sql/set_var.cc 2005-05-05 08:09:13 -07:00
+++ 1.110/sql/set_var.cc 2005-05-07 03:18:55 -07:00
@@ -951,7 +951,11 @@
{"skip_networking", (char*) &opt_disable_networking, SHOW_BOOL},
{"skip_show_database", (char*) &opt_skip_show_db, SHOW_BOOL},
#ifdef HAVE_REPLICATION
+ {sys_slave_compressed_protocol.name,
+ (char*) &sys_slave_compressed_protocol, SHOW_SYS},
+ {"slave_load_tmpdir", (char*) &slave_load_tmpdir, SHOW_CHAR_PTR},
{sys_slave_net_timeout.name,(char*) &sys_slave_net_timeout, SHOW_SYS},
+ {"slave_skip_errors", (char*) &slave_error_mask,
SHOW_SLAVE_SKIP_ERRORS},
{sys_slave_trans_retries.name,(char*) &sys_slave_trans_retries, SHOW_SYS},
#endif
{sys_slow_launch_time.name, (char*) &sys_slow_launch_time, SHOW_SYS},
| Thread |
|---|
| • bk commit into 5.0 tree (jimw:1.1937) BUG#7800 | Jim Winstead | 7 May |