summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2012-01-17 09:11:20 +0100
committerSergei Golubchik <sergii@pisem.net>2012-01-17 09:11:20 +0100
commit1433621c14e480dbedf3d7ea2b4885cff94bc6e5 (patch)
tree1c7e1a241c115c731fc91debcdc6fa714c931a7a
parent8b278b44154009168e4bf7b377f5b21159c5dfb4 (diff)
downloadmariadb-git-1433621c14e480dbedf3d7ea2b4885cff94bc6e5.tar.gz
fixes for non-debug builds (CMAKE_BUILD_TYPE=Release or RelWithDebInfo)
client/CMakeLists.txt: 1. -rdynamic is a linker flag. 2. it should be used in all builds, not debug only libmysql/get_password.c: prefer a standard function, when possible (otherwise a plugin will need to load it from the client)
-rw-r--r--client/CMakeLists.txt2
-rw-r--r--libmysql/get_password.c2
-rw-r--r--sql/sql_partition.cc2
-rw-r--r--sql/sql_trigger.cc2
-rw-r--r--vio/viosocket.c2
5 files changed, 4 insertions, 6 deletions
diff --git a/client/CMakeLists.txt b/client/CMakeLists.txt
index a5a73298122..de503e8927e 100644
--- a/client/CMakeLists.txt
+++ b/client/CMakeLists.txt
@@ -31,7 +31,7 @@ MYSQL_ADD_EXECUTABLE(mysql completion_hash.cc mysql.cc readline.cc
TARGET_LINK_LIBRARIES(mysql mysqlclient)
IF(UNIX)
TARGET_LINK_LIBRARIES(mysql ${MY_READLINE_LIBRARY})
- SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -rdynamic")
+ SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -rdynamic")
ENDIF(UNIX)
MYSQL_ADD_EXECUTABLE(mysqltest mysqltest.cc COMPONENT Test)
diff --git a/libmysql/get_password.c b/libmysql/get_password.c
index dc1a29f7935..c3428dd2838 100644
--- a/libmysql/get_password.c
+++ b/libmysql/get_password.c
@@ -157,7 +157,7 @@ void get_tty_password_buff(const char *opt_message, char *buff, size_t buflen)
passbuff = getpass(opt_message ? opt_message : "Enter password: ");
/* copy the password to buff and clear original (static) buffer */
- strnmov(buff, passbuff, buflen - 1);
+ strncpy(buff, passbuff, buflen - 1);
#ifdef _PASSWORD_LEN
memset(passbuff, 0, _PASSWORD_LEN);
#endif
diff --git a/sql/sql_partition.cc b/sql/sql_partition.cc
index ace785948e0..070b48f7a7b 100644
--- a/sql/sql_partition.cc
+++ b/sql/sql_partition.cc
@@ -7348,7 +7348,7 @@ int get_part_iter_for_interval_cols_via_map(partition_info *part_info,
PARTITION_ITERATOR *part_iter)
{
uint32 nparts;
- get_col_endpoint_func get_col_endpoint;
+ get_col_endpoint_func UNINIT_VAR(get_col_endpoint);
DBUG_ENTER("get_part_iter_for_interval_cols_via_map");
if (part_info->part_type == RANGE_PARTITION)
diff --git a/sql/sql_trigger.cc b/sql/sql_trigger.cc
index dacdaca3fa2..1ac1d7bbb5e 100644
--- a/sql/sql_trigger.cc
+++ b/sql/sql_trigger.cc
@@ -1722,7 +1722,7 @@ bool add_table_for_trigger(THD *thd,
LEX *lex= thd->lex;
char trn_path_buff[FN_REFLEN];
LEX_STRING trn_path= { trn_path_buff, 0 };
- LEX_STRING tbl_name;
+ LEX_STRING tbl_name= null_lex_str;
DBUG_ENTER("add_table_for_trigger");
diff --git a/vio/viosocket.c b/vio/viosocket.c
index 9840891b69e..6a33937d4bd 100644
--- a/vio/viosocket.c
+++ b/vio/viosocket.c
@@ -692,9 +692,7 @@ my_bool vio_is_connected(Vio *vio)
void vio_timeout(Vio *vio, uint which, uint timeout)
{
#if defined(SO_SNDTIMEO) && defined(SO_RCVTIMEO)
-#ifndef DBUG_OFF
int r;
-#endif
DBUG_ENTER("vio_timeout");
{