#At file:///home2/mydev/bzrroot/mysql-6.0-backup-merge/ based on
revid:ingo.struewing@stripped
2746 Ingo Struewing 2008-12-29
Post-merge fix
Avoid compiler warnings about const char* by using proper types
modified:
include/m_string.h
sql/mysql_priv.h
sql/mysqld.cc
sql/si_objects.cc
sql/si_objects.h
per-file messages:
include/m_string.h
Post-merge fix
Added the new LEX_CSTRING type with const char *str.
sql/mysql_priv.h
Post-merge fix
Changed 'reason_slave_blocked' to LEX_CSTRING.
sql/mysqld.cc
Post-merge fix
Changed 'reason_slave_blocked' to LEX_CSTRING.
sql/si_objects.cc
Post-merge fix
Changed 'reason' parameter of block_replication() to const char*.
sql/si_objects.h
Post-merge fix
Changed 'reason' parameter of block_replication() to const char*.
=== modified file 'include/m_string.h'
--- a/include/m_string.h 2008-12-08 11:29:15 +0000
+++ b/include/m_string.h 2008-12-29 22:05:01 +0000
@@ -306,6 +306,14 @@ typedef struct st_mysql_lex_string LEX_S
#define USTRING_WITH_LEN(X) ((uchar*) X), ((size_t) (sizeof(X) - 1))
#define C_STRING_WITH_LEN(X) ((char *) (X)), ((size_t) (sizeof(X) - 1))
+/* A variant with const */
+struct st_mysql_const_lex_string
+{
+ const char *str;
+ size_t length;
+};
+typedef struct st_mysql_const_lex_string LEX_CSTRING;
+
/* A variant with const and unsigned */
struct st_mysql_const_unsigned_lex_string
{
=== modified file 'sql/mysql_priv.h'
--- a/sql/mysql_priv.h 2008-12-29 14:36:54 +0000
+++ b/sql/mysql_priv.h 2008-12-29 22:05:01 +0000
@@ -1977,7 +1977,7 @@ extern ulong table_cache_size, table_def
extern ulong max_connections,max_connect_errors, connect_timeout;
extern my_bool slave_allow_batching;
extern my_bool allow_slave_start;
-extern LEX_STRING reason_slave_blocked;
+extern LEX_CSTRING reason_slave_blocked;
extern ulong slave_net_timeout, slave_trans_retries;
extern uint max_user_connections;
extern ulong what_to_log,flush_time;
=== modified file 'sql/mysqld.cc'
--- a/sql/mysqld.cc 2008-12-29 14:36:54 +0000
+++ b/sql/mysqld.cc 2008-12-29 22:05:01 +0000
@@ -540,7 +540,7 @@ ulong open_files_limit, max_binlog_size,
ulong slave_net_timeout, slave_trans_retries;
my_bool slave_allow_batching;
my_bool allow_slave_start= TRUE;
-LEX_STRING reason_slave_blocked;
+LEX_CSTRING reason_slave_blocked;
ulong slave_exec_mode_options;
const char *slave_exec_mode_str= "STRICT";
ulong thread_cache_size=0, thread_pool_size= 0;
=== modified file 'sql/si_objects.cc'
--- a/sql/si_objects.cc 2008-12-16 20:54:07 +0000
+++ b/sql/si_objects.cc 2008-12-29 22:05:01 +0000
@@ -3146,7 +3146,7 @@ int disable_slave_connections(bool disab
@param[in] block TRUE = block slave start, FALSE = do not block
@param[in] reason Reason for the block
*/
-void block_replication(bool block, char *reason)
+void block_replication(bool block, const char *reason)
{
pthread_mutex_lock(&LOCK_slave_start);
allow_slave_start= !block;
=== modified file 'sql/si_objects.h'
--- a/sql/si_objects.h 2008-12-16 20:54:07 +0000
+++ b/sql/si_objects.h 2008-12-29 22:05:01 +0000
@@ -513,7 +513,7 @@ int disable_slave_connections(bool disab
Set state where replication is blocked (TRUE) or not blocked (FALSE)
from starting. Include reason for feedback to user.
*/
-void block_replication(bool block, char *reason);
+void block_replication(bool block, const char *reason);
/**
Enumeration of the incidents that can occur on the master.
| Thread |
|---|
| • bzr commit into mysql-6.0-backup branch (ingo.struewing:2746) | Ingo Struewing | 29 Dec |