diff options
Diffstat (limited to 'client')
-rw-r--r--[-rwxr-xr-x] | client/CMakeLists.txt | 0 | ||||
-rw-r--r-- | client/mysql.cc | 1 | ||||
-rw-r--r-- | client/mysqlbinlog.cc | 2 | ||||
-rw-r--r-- | client/mysqlcheck.c | 3 | ||||
-rw-r--r-- | client/mysqlshow.c | 3 | ||||
-rw-r--r-- | client/mysqltest.cc | 21 |
6 files changed, 12 insertions, 18 deletions
diff --git a/client/CMakeLists.txt b/client/CMakeLists.txt index d0bb8d43edd..d0bb8d43edd 100755..100644 --- a/client/CMakeLists.txt +++ b/client/CMakeLists.txt diff --git a/client/mysql.cc b/client/mysql.cc index a31c503b9a2..abf01d8127d 100644 --- a/client/mysql.cc +++ b/client/mysql.cc @@ -88,7 +88,6 @@ extern "C" { #endif #endif -#undef bcmp // Fix problem with new readline #if defined(__WIN__) #include <conio.h> #else diff --git a/client/mysqlbinlog.cc b/client/mysqlbinlog.cc index f491485b77a..277c2d62544 100644 --- a/client/mysqlbinlog.cc +++ b/client/mysqlbinlog.cc @@ -436,7 +436,7 @@ Exit_status Load_log_processor::process_first_event(const char *bname, ptr= fname + target_dir_name_len; memcpy(ptr,bname,blen); ptr+= blen; - ptr+= my_sprintf(ptr, (ptr, "-%x", file_id)); + ptr+= sprintf(ptr, "-%x", file_id); if ((file= create_unique_file(fname,ptr)) < 0) { diff --git a/client/mysqlcheck.c b/client/mysqlcheck.c index 025f6c2bd2b..ce733e57db6 100644 --- a/client/mysqlcheck.c +++ b/client/mysqlcheck.c @@ -696,8 +696,7 @@ static int handle_request_for_tables(char *tables, uint length) if (opt_all_in_1) { /* No backticks here as we added them before */ - query_length= my_sprintf(query, - (query, "%s TABLE %s %s", op, tables, options)); + query_length= sprintf(query, "%s TABLE %s %s", op, tables, options); } else { diff --git a/client/mysqlshow.c b/client/mysqlshow.c index 0b9f42acfe8..bb05400e0d8 100644 --- a/client/mysqlshow.c +++ b/client/mysqlshow.c @@ -657,8 +657,7 @@ list_fields(MYSQL *mysql,const char *db,const char *table, char query[1024],*end; MYSQL_RES *result; MYSQL_ROW row; - ulong rows; - LINT_INIT(rows); + ulong UNINIT_VAR(rows); if (mysql_select_db(mysql,db)) { diff --git a/client/mysqltest.cc b/client/mysqltest.cc index 9e28183c735..c8ec6c981ef 100644 --- a/client/mysqltest.cc +++ b/client/mysqltest.cc @@ -5827,7 +5827,7 @@ int read_command(struct st_command** command_ptr) (struct st_command*) my_malloc(sizeof(*command), MYF(MY_WME|MY_ZEROFILL))) || insert_dynamic(&q_lines, (uchar*) &command)) - die(NullS); + die("Out of memory"); command->type= Q_UNKNOWN; read_command_buf[0]= 0; @@ -6314,7 +6314,7 @@ void init_win_path_patterns() } if (insert_dynamic(&patterns, (uchar*) &p)) - die(NullS); + die("Out of memory"); DBUG_PRINT("info", ("p: %s", p)); while (*p) @@ -9406,8 +9406,7 @@ REPLACE *init_replace(char * *from, char * *to,uint count, for (i=1 ; i <= found_sets ; i++) { pos=from[found_set[i-1].table_offset]; - rep_str[i].found= !bcmp((const uchar*) pos, - (const uchar*) "\\^", 3) ? 2 : 1; + rep_str[i].found= !memcmp(pos, "\\^", 3) ? 2 : 1; rep_str[i].replace_string=to_array[found_set[i-1].table_offset]; rep_str[i].to_offset=found_set[i-1].found_offset-start_at_word(pos); rep_str[i].from_offset=found_set[i-1].found_offset-replace_len(pos)+ @@ -9535,8 +9534,8 @@ void copy_bits(REP_SET *to,REP_SET *from) int cmp_bits(REP_SET *set1,REP_SET *set2) { - return bcmp((uchar*) set1->bits,(uchar*) set2->bits, - sizeof(uint) * set1->size_of_bits); + return memcmp(set1->bits, set2->bits, + sizeof(uint) * set1->size_of_bits); } @@ -9605,17 +9604,15 @@ int find_found(FOUND_SET *found_set,uint table_offset, int found_offset) uint start_at_word(char * pos) { - return (((!bcmp((const uchar*) pos, (const uchar*) "\\b",2) && pos[2]) || - !bcmp((const uchar*) pos, (const uchar*) "\\^", 2)) ? 1 : 0); + return (((!memcmp(pos, "\\b",2) && pos[2]) || + !memcmp(pos, "\\^", 2)) ? 1 : 0); } uint end_of_word(char * pos) { char * end=strend(pos); - return ((end > pos+2 && !bcmp((const uchar*) end-2, - (const uchar*) "\\b", 2)) || - (end >= pos+2 && !bcmp((const uchar*) end-2, - (const uchar*) "\\$",2))) ? 1 : 0; + return ((end > pos+2 && !memcmp(end-2, "\\b", 2)) || + (end >= pos+2 && !memcmp(end-2, "\\$",2))) ? 1 : 0; } /**************************************************************************** |