diff --git a/include/mysql.h b/include/mysql.h index 44901b84..0f1bb818 100644 --- a/include/mysql.h +++ b/include/mysql.h @@ -424,7 +424,7 @@ MYSQL_RES * STDCALL mysql_list_processes(MYSQL *mysql); MYSQL_RES * STDCALL mysql_store_result(MYSQL *mysql); MYSQL_RES * STDCALL mysql_use_result(MYSQL *mysql); int STDCALL mysql_options(MYSQL *mysql,enum mysql_option option, - const char *arg); + const void *arg); void STDCALL mysql_free_result(MYSQL_RES *result); void STDCALL mysql_data_seek(MYSQL_RES *result, my_ulonglong offset); diff --git a/libmariadb/libmariadb.c b/libmariadb/libmariadb.c index 5fba2146..7c85941f 100644 --- a/libmariadb/libmariadb.c +++ b/libmariadb/libmariadb.c @@ -1500,7 +1500,9 @@ MYSQL *mthd_my_real_connect(MYSQL *mysql,const char *host, const char *user, */ #if defined(HAVE_SYS_UN_H) - if ((!host || !strcmp(host,LOCAL_HOST)) && (unix_socket || mysql_unix_port)) + if ((!host || strcmp(host,LOCAL_HOST) == 0) && + mysql->options.protocol != MYSQL_PROTOCOL_TCP && + (unix_socket || mysql_unix_port)) { host=LOCAL_HOST; if (!unix_socket) @@ -1530,9 +1532,11 @@ MYSQL *mthd_my_real_connect(MYSQL *mysql,const char *host, const char *user, #elif defined(_WIN32) { if ((unix_socket || - !host && is_NT() || - host && !strcmp(host,LOCAL_HOST_NAMEDPIPE) || - mysql->options.named_pipe || !have_tcpip)) + (!host && is_NT()) || + (host && strcmp(host,LOCAL_HOST_NAMEDPIPE) == 0) || + mysql->options.named_pipe || + !have_tcpip) && + mysql->options.protocol != MYSQL_PROTOCOL_TCP) { sock=0; if ((hPipe=create_named_pipe(net, mysql->options.connect_timeout, @@ -2637,7 +2641,7 @@ mysql_get_client_info(void) int STDCALL -mysql_options(MYSQL *mysql,enum mysql_option option, const char *arg) +mysql_options(MYSQL *mysql,enum mysql_option option, const void *arg) { DBUG_ENTER("mysql_option"); DBUG_PRINT("enter",("option: %d",(int) option)); diff --git a/libmariadb/my_charset.c b/libmariadb/my_charset.c index 2946a3d9..ac5c133c 100644 --- a/libmariadb/my_charset.c +++ b/libmariadb/my_charset.c @@ -867,7 +867,7 @@ struct st_madb_os_charset MADB_OS_CHARSET[]= {"864", "Arabic (864)", NULL, MADB_CS_UNSUPPORTED}, {"865", "Nordic (DOS)", NULL, MADB_CS_UNSUPPORTED}, {"866", "Cyrillic (DOS)", "cp866", MADB_CS_EXACT}, - {"869", "Greek, Modern (DOS)", NULL, MADB_CS_EXACT}, + {"869", "Greek, Modern (DOS)", "greek", MADB_CS_EXACT}, {"870", "IBM EBCDIC Multilingual Latin 2", NULL, MADB_CS_UNSUPPORTED}, {"874", "Thai (Windows)", "tis620", MADB_CS_UNSUPPORTED}, {"875", "Greek Modern", NULL, MADB_CS_UNSUPPORTED}, @@ -996,7 +996,7 @@ struct st_madb_os_charset MADB_OS_CHARSET[]= {"57010", "ISCII Gujarati", NULL, MADB_CS_UNSUPPORTED}, {"57011", "ISCII Punjabi", NULL, MADB_CS_UNSUPPORTED}, {"65000", "utf-7 Unicode (UTF-7)", NULL, MADB_CS_UNSUPPORTED}, - {"65001", "utf-8 Unicode (UTF-8)", NULL, MADB_CS_EXACT}, + {"65001", "utf-8 Unicode (UTF-8)", "utf8", MADB_CS_EXACT}, /* non Windows */ #else {"ASCII", "US-ASCII", "ascii", MADB_CS_APPROX}, diff --git a/unittest/libmariadb/connection.c b/unittest/libmariadb/connection.c index a7f3f02e..6015cece 100644 --- a/unittest/libmariadb/connection.c +++ b/unittest/libmariadb/connection.c @@ -167,6 +167,8 @@ static int test_change_user(MYSQL *mysql) const char *db= "mysqltest_user_test_database"; int rc; + diag("Due to mysql_change_user security fix this test will not work anymore."); + return(SKIP); DBUG_ENTER("test_change_user"); /* Prepare environment */ @@ -321,6 +323,9 @@ static int test_bug31669(MYSQL *mysql) static char db[NAME_CHAR_LEN+1]; static char query[LARGE_BUFFER_SIZE*2]; + diag("Due to mysql_change_user security fix this test will not work anymore."); + return(SKIP); + rc= mysql_change_user(mysql, NULL, NULL, NULL); FAIL_UNLESS(rc, "Error expected"); diff --git a/unittest/libmariadb/view.c b/unittest/libmariadb/view.c index 330ca84b..42e8e87f 100644 --- a/unittest/libmariadb/view.c +++ b/unittest/libmariadb/view.c @@ -569,7 +569,7 @@ static int test_bug19671(MYSQL *mysql) rc= mysql_query(mysql, "drop table t1"); check_mysql_rc(rc, mysql); - return OK; + return retcode; } /*