diff options
author | Sergei Golubchik <sergii@pisem.net> | 2013-07-21 16:39:19 +0200 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2013-07-21 16:39:19 +0200 |
commit | b7b5f6f1ab49948b0e15b762266d4640b3d6b7fb (patch) | |
tree | 7c302c2025184dbd053aa6135f0ff28c8ce6f359 /client | |
parent | 5f6380adde2dac3f32b40339b9b702c0135eb7d6 (diff) | |
parent | c1d6a2d7e194225ccc19a68ea5d0f368632620d0 (diff) | |
download | mariadb-git-b7b5f6f1ab49948b0e15b762266d4640b3d6b7fb.tar.gz |
10.0-monty merge
includes:
* remove some remnants of "Bug#14521864: MYSQL 5.1 TO 5.5 BUGS PARTITIONING"
* introduce LOCK_share, now LOCK_ha_data is strictly for engines
* rea_create_table() always creates .par file (even in "frm-only" mode)
* fix a 5.6 bug, temp file leak on dummy ALTER TABLE
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 3e9edd94ba6..90310f85e95 100644 --- a/client/mysql.cc +++ b/client/mysql.cc @@ -3504,9 +3504,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; @@ -3526,8 +3526,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); } @@ -3616,9 +3616,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" */ @@ -3634,6 +3634,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 c1f7d028c0d..8b3f0fdec79 100644 --- a/client/mysql_upgrade.c +++ b/client/mysql_upgrade.c @@ -585,7 +585,7 @@ static int extract_variable_from_show(DYNAMIC_STRING* ds, char* value) if ((value_end= strchr(value_start, '\n')) == NULL) return 1; /* Unexpected result */ - len= (size_t) min(FN_REFLEN, value_end-value_start); + len= (size_t) MY_MIN(FN_REFLEN, value_end-value_start); strncpy(value, value_start, len); value[len]= '\0'; return 0; diff --git a/client/mysqladmin.cc b/client/mysqladmin.cc index 923539a181f..9a8901435c8 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 d15bcca4d0c..31a1d583c4f 100644 --- a/client/mysqlbinlog.cc +++ b/client/mysqlbinlog.cc @@ -2345,7 +2345,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 e96f855719e..e614d628630 100644 --- a/client/mysqlcheck.c +++ b/client/mysqlcheck.c @@ -784,8 +784,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 2ec8414dbcf..87d6c80917a 100644 --- a/client/mysqltest.cc +++ b/client/mysqltest.cc @@ -6485,9 +6485,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; |