From 7b2f4b82ea4dd8a63c2806c452b319f26493206c Mon Sep 17 00:00:00 2001 From: Tor Didriksen Date: Wed, 23 May 2018 18:20:45 +0200 Subject: Fix build break with modern compilers: client/mysql.cc: In function void build_completion_hash(bool, bool): client/mysql.cc:2674:37: error: invalid conversion from char to char* [-fpermissive] field_names[i][num_fields*2]= '\0'; ^~~~ --- client/mysql.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'client') diff --git a/client/mysql.cc b/client/mysql.cc index 715d74f18b2..9c54f564192 100644 --- a/client/mysql.cc +++ b/client/mysql.cc @@ -1,5 +1,5 @@ /* - Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved. + Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -2671,7 +2671,7 @@ You can turn off this feature to get a quicker startup with -A\n\n"); mysql_free_result(fields); break; } - field_names[i][num_fields*2]= '\0'; + field_names[i][num_fields*2]= NULL; j=0; while ((sql_field=mysql_fetch_field(fields))) { -- cgit v1.2.1 From 28b052190e377bdfe176e1dc71d268b94c832263 Mon Sep 17 00:00:00 2001 From: Anushree Prakash B Date: Tue, 3 Jul 2018 15:20:03 +0530 Subject: Bug#28093271 - MYSQL OVERLOADS -b SHORT OPTION: --BINARY-AS-HEX, --NO-BEEP DESCRIPTION: ============ mysql uses -b as the short-option form for two different long options i.e. no-beep and binary-as-hex. This can result in unintended results if the short form -b is used instead of the specific long option name. FIX: ==== -b will now be used for one long option only i.e --no-beep. The option binary-as-hex will not have any short option and should be provided as a complete name. --- client/mysql.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'client') diff --git a/client/mysql.cc b/client/mysql.cc index 9c54f564192..bc32a58f37e 100644 --- a/client/mysql.cc +++ b/client/mysql.cc @@ -1392,7 +1392,7 @@ static struct my_option my_long_options[] = {"batch", 'B', "Don't use history file. Disable interactive behavior. (Enables --silent.)", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, - {"binary-as-hex", 'b', "Print binary data as hex", &opt_binhex, &opt_binhex, + {"binary-as-hex", 0, "Print binary data as hex", &opt_binhex, &opt_binhex, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, {"character-sets-dir", OPT_CHARSETS_DIR, "Directory for character set files.", &charsets_dir, -- cgit v1.2.1 From c54271723c6f2f4e5b77cd8faf91e89412730209 Mon Sep 17 00:00:00 2001 From: Aditya A Date: Mon, 9 Jul 2018 17:25:49 +0530 Subject: Bug #26275510 BUNDLED ZLIB DOESN'T INCLUDE FIXES FOR SOME VULNERABILITIES Upgrading the zlib lib to 1.2.11 --- client/CMakeLists.txt | 3 +-- client/mysql.cc | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) (limited to 'client') diff --git a/client/CMakeLists.txt b/client/CMakeLists.txt index 21b1e084409..ea72e9ce1e8 100644 --- a/client/CMakeLists.txt +++ b/client/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2006, 2018, Oracle and/or its affiliates. All rights reserved. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -15,7 +15,6 @@ INCLUDE_DIRECTORIES( ${CMAKE_SOURCE_DIR}/include - ${ZLIB_INCLUDE_DIR} ${SSL_INCLUDE_DIRS} ${CMAKE_SOURCE_DIR}/libmysql ${CMAKE_SOURCE_DIR}/regex diff --git a/client/mysql.cc b/client/mysql.cc index bc32a58f37e..8510361a54e 100644 --- a/client/mysql.cc +++ b/client/mysql.cc @@ -2671,7 +2671,7 @@ You can turn off this feature to get a quicker startup with -A\n\n"); mysql_free_result(fields); break; } - field_names[i][num_fields*2]= NULL; + field_names[i][num_fields*2]= '\0'; j=0; while ((sql_field=mysql_fetch_field(fields))) { -- cgit v1.2.1 From b6c038d4366d003ae00120c96e39a892e5d675c1 Mon Sep 17 00:00:00 2001 From: Tor Didriksen Date: Wed, 18 Jul 2018 10:22:21 +0200 Subject: Fix build break with modern compilers: client/mysql.cc: In function void build_completion_hash(bool, bool): client/mysql.cc:2674:37: error: invalid conversion from char to char* [-fpermissive] field_names[i][num_fields*2]= '\0'; --- client/mysql.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'client') diff --git a/client/mysql.cc b/client/mysql.cc index 8510361a54e..bc32a58f37e 100644 --- a/client/mysql.cc +++ b/client/mysql.cc @@ -2671,7 +2671,7 @@ You can turn off this feature to get a quicker startup with -A\n\n"); mysql_free_result(fields); break; } - field_names[i][num_fields*2]= '\0'; + field_names[i][num_fields*2]= NULL; j=0; while ((sql_field=mysql_fetch_field(fields))) { -- cgit v1.2.1