diff options
author | Michael Widenius <monty@askmonty.org> | 2013-03-26 00:03:13 +0200 |
---|---|---|
committer | Michael Widenius <monty@askmonty.org> | 2013-03-26 00:03:13 +0200 |
commit | 068c61978e3a81836d52b8caf11e044290159ad1 (patch) | |
tree | 2cbca861ab2cebe3bd99379ca9668bb483ca0d2a /client | |
parent | 35bc8f9f4353b64da215e52ff6f1612a8ce66f43 (diff) | |
download | mariadb-git-068c61978e3a81836d52b8caf11e044290159ad1.tar.gz |
Temporary commit of 10.0-merge
Diffstat (limited to 'client')
-rw-r--r-- | client/CMakeLists.txt | 6 | ||||
-rw-r--r-- | client/mysql.cc | 13 | ||||
-rw-r--r-- | client/mysql_upgrade.c | 2 | ||||
-rw-r--r-- | client/mysqladmin.cc | 3 | ||||
-rw-r--r-- | client/mysqlbinlog.cc | 2 | ||||
-rw-r--r-- | client/mysqlcheck.c | 4 | ||||
-rw-r--r-- | client/mysqltest.cc | 4 |
7 files changed, 20 insertions, 14 deletions
diff --git a/client/CMakeLists.txt b/client/CMakeLists.txt index e4507f9c8ba..9fed5b4ea19 100644 --- a/client/CMakeLists.txt +++ b/client/CMakeLists.txt @@ -15,6 +15,7 @@ INCLUDE_DIRECTORIES( ${CMAKE_SOURCE_DIR}/include + ${CMAKE_SOURCE_DIR}/mysys_ssl ${ZLIB_INCLUDE_DIR} ${SSL_INCLUDE_DIRS} ${CMAKE_SOURCE_DIR}/libmysql @@ -25,6 +26,9 @@ INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_BINARY_DIR} ) +## We will need libeay32.dll and ssleay32.dll when running client executables. +COPY_OPENSSL_DLLS(copy_openssl_client) + ADD_DEFINITIONS(${SSL_DEFINES}) MYSQL_ADD_EXECUTABLE(mysql completion_hash.cc mysql.cc readline.cc ${CMAKE_SOURCE_DIR}/sql/sql_string.cc) @@ -78,7 +82,7 @@ ENDIF(WIN32) ADD_EXECUTABLE(async_example async_example.c) TARGET_LINK_LIBRARIES(async_example mysqlclient) -SET_TARGET_PROPERTIES (mysqlcheck mysqldump mysqlimport mysql_upgrade mysqlshow mysqlslap mysql_plugin +SET_TARGET_PROPERTIES (mysqlcheck mysqldump mysqlimport mysql_upgrade mysqlshow mysqlslap mysql_plugin async_example PROPERTIES HAS_CXX TRUE) ADD_DEFINITIONS(-DHAVE_DLOPEN) diff --git a/client/mysql.cc b/client/mysql.cc index 331302757a6..bb57c43674e 100644 --- a/client/mysql.cc +++ b/client/mysql.cc @@ -3339,9 +3339,9 @@ print_table_data(MYSQL_RES *result) { uint length= column_names ? field->name_length : 0; if (quick) - length=max(length,field->length); + length= MY_MAX(length,field->length); else - length=max(length,field->max_length); + length= MY_MAX(length,field->max_length); if (length < 4 && !IS_NOT_NULL(field->flags)) length=4; // Room for "NULL" field->max_length=length; @@ -3361,8 +3361,8 @@ print_table_data(MYSQL_RES *result) field->name, field->name + name_length); uint display_length= field->max_length + name_length - numcells; - tee_fprintf(PAGER, " %-*s |",(int) min(display_length, - MAX_COLUMN_LENGTH), + tee_fprintf(PAGER, " %-*s |",(int) MY_MIN(display_length, + MAX_COLUMN_LENGTH), field->name); num_flag[off]= IS_NUM(field->type); } @@ -3451,9 +3451,9 @@ static int get_field_disp_length(MYSQL_FIELD *field) uint length= column_names ? field->name_length : 0; if (quick) - length= max(length, field->length); + length= MY_MAX(length, field->length); else - length= max(length, field->max_length); + length= MY_MAX(length, field->max_length); if (length < 4 && !IS_NOT_NULL(field->flags)) length= 4; /* Room for "NULL" */ @@ -3469,6 +3469,7 @@ static int get_field_disp_length(MYSQL_FIELD *field) @returns The max number of characters in any row of this result */ + static int get_result_width(MYSQL_RES *result) { unsigned int len= 0; diff --git a/client/mysql_upgrade.c b/client/mysql_upgrade.c index feaf23b15ba..9a3c56507e7 100644 --- a/client/mysql_upgrade.c +++ b/client/mysql_upgrade.c @@ -576,7 +576,7 @@ static int extract_variable_from_show(DYNAMIC_STRING* ds, char* value) if ((value_end= strchr(value_start, '\n')) == NULL) return 1; /* Unexpected result */ - strncpy(value, value_start, min(FN_REFLEN, value_end-value_start)); + strncpy(value, value_start, MY_MIN(FN_REFLEN, value_end-value_start)); return 0; } diff --git a/client/mysqladmin.cc b/client/mysqladmin.cc index daa1115514e..a45c3b85596 100644 --- a/client/mysqladmin.cc +++ b/client/mysqladmin.cc @@ -23,7 +23,8 @@ #include <sys/stat.h> #include <mysql.h> #include <sql_common.h> -#include <welcome_copyright_notice.h> /* ORACLE_WELCOME_COPYRIGHT_NOTICE */ +#include <welcome_copyright_notice.h> +#include <my_rnd.h> #define ADMIN_VERSION "9.1" #define MAX_MYSQL_VAR 512 diff --git a/client/mysqlbinlog.cc b/client/mysqlbinlog.cc index 87198347b10..32c02d03f37 100644 --- a/client/mysqlbinlog.cc +++ b/client/mysqlbinlog.cc @@ -2310,7 +2310,7 @@ static Exit_status dump_local_log_entries(PRINT_EVENT_INFO *print_event_info, my_off_t length,tmp; for (length= start_position_mot ; length > 0 ; length-=tmp) { - tmp=min(length,sizeof(buff)); + tmp= MY_MIN(length,sizeof(buff)); if (my_b_read(file, buff, (uint) tmp)) { error("Failed reading from file."); diff --git a/client/mysqlcheck.c b/client/mysqlcheck.c index 60778e12f06..f429837c1dd 100644 --- a/client/mysqlcheck.c +++ b/client/mysqlcheck.c @@ -787,8 +787,8 @@ static int handle_request_for_tables(char *tables, uint length) org= ptr= strmov(strmov(query, op), " TABLE "); ptr= fix_table_name(ptr, tables); - strmake(table_name_buff, org, min((int) sizeof(table_name_buff)-1, - (int) (ptr - org))); + strmake(table_name_buff, org, MY_MIN((int) sizeof(table_name_buff)-1, + (int) (ptr - org))); table_name= table_name_buff; ptr= strxmov(ptr, " ", options, NullS); query_length= (uint) (ptr - query); diff --git a/client/mysqltest.cc b/client/mysqltest.cc index e2a939dbd73..9e4b9da54af 100644 --- a/client/mysqltest.cc +++ b/client/mysqltest.cc @@ -6489,9 +6489,9 @@ int read_line(char *buf, int size) } else if ((c == '{' && (!my_strnncoll_simple(charset_info, (const uchar*) "while", 5, - (uchar*) buf, min(5, p - buf), 0) || + (uchar*) buf, MY_MIN(5, p - buf), 0) || !my_strnncoll_simple(charset_info, (const uchar*) "if", 2, - (uchar*) buf, min(2, p - buf), 0)))) + (uchar*) buf, MY_MIN(2, p - buf), 0)))) { /* Only if and while commands can be terminated by { */ *p++= c; |