summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--client/mysqltest.cc5
-rw-r--r--cmake/ssl.cmake11
-rw-r--r--include/my_valgrind.h4
-rw-r--r--mysql-test/r/row-checksum-old.result16
-rw-r--r--mysql-test/r/row-checksum.result16
-rw-r--r--mysql-test/r/subselect2.result22
-rw-r--r--mysql-test/t/row-checksum.test17
-rw-r--r--mysql-test/t/subselect2.test20
-rw-r--r--scripts/mysql_install_db.sh19
-rw-r--r--sql/CMakeLists.txt2
-rw-r--r--sql/log.cc6
-rw-r--r--sql/mysql_install_db.cc72
-rw-r--r--sql/sql_repl.cc6
-rw-r--r--sql/sql_table.cc5
-rw-r--r--sql/sql_yacc.yy22
-rw-r--r--support-files/mysql.server.sh6
-rw-r--r--unittest/mysys/thr_template.c4
-rw-r--r--win/packaging/heidisql.cmake2
18 files changed, 219 insertions, 36 deletions
diff --git a/client/mysqltest.cc b/client/mysqltest.cc
index d257079138f..77ce8d6dc8a 100644
--- a/client/mysqltest.cc
+++ b/client/mysqltest.cc
@@ -6205,6 +6205,11 @@ void do_connect(struct st_command *command)
if (con_slot == next_con)
next_con++; /* if we used the next_con slot, advance the pointer */
}
+ else // Failed to connect. Free the memory.
+ {
+ mysql_close(con_slot->mysql);
+ con_slot->mysql= NULL;
+ }
dynstr_free(&ds_connection_name);
dynstr_free(&ds_host);
diff --git a/cmake/ssl.cmake b/cmake/ssl.cmake
index c76e73927c0..6985932d165 100644
--- a/cmake/ssl.cmake
+++ b/cmake/ssl.cmake
@@ -174,15 +174,24 @@ MACRO (MYSQL_CHECK_SSL)
OPENSSL_MAJOR_VERSION "${OPENSSL_VERSION_NUMBER}"
)
INCLUDE(CheckSymbolExists)
+ INCLUDE(CheckCSourceCompiles)
SET(CMAKE_REQUIRED_INCLUDES ${OPENSSL_INCLUDE_DIR})
CHECK_SYMBOL_EXISTS(SHA512_DIGEST_LENGTH "openssl/sha.h"
HAVE_SHA512_DIGEST_LENGTH)
+ CHECK_C_SOURCE_COMPILES("
+ #include <openssl/dh.h>
+ int main()
+ {
+ DH dh;
+ return sizeof(dh.version);
+ }" OLD_OPENSSL_API)
+
SET(OPENSSL_FOUND TRUE)
ELSE()
SET(OPENSSL_FOUND FALSE)
ENDIF()
- IF(OPENSSL_FOUND AND OPENSSL_MAJOR_VERSION STRLESS "101" AND
+ IF(OPENSSL_FOUND AND OLD_OPENSSL_API AND
HAVE_SHA512_DIGEST_LENGTH)
MESSAGE(STATUS "OPENSSL_INCLUDE_DIR = ${OPENSSL_INCLUDE_DIR}")
MESSAGE(STATUS "OPENSSL_LIBRARIES = ${OPENSSL_LIBRARIES}")
diff --git a/include/my_valgrind.h b/include/my_valgrind.h
index 5d08a271d4a..a85e610f049 100644
--- a/include/my_valgrind.h
+++ b/include/my_valgrind.h
@@ -42,7 +42,7 @@ https://github.com/google/sanitizers/wiki/AddressSanitizerManualPoisoning */
# define MEM_CHECK_ADDRESSABLE(a,len) ((void) 0)
# define MEM_CHECK_DEFINED(a,len) ((void) 0)
#else
-# define MEM_UNDEFINED(a,len) ((void) 0)
+# define MEM_UNDEFINED(a,len) ((void) (a), (void) (len))
# define MEM_NOACCESS(a,len) ((void) 0)
# define MEM_CHECK_ADDRESSABLE(a,len) ((void) 0)
# define MEM_CHECK_DEFINED(a,len) ((void) 0)
@@ -51,7 +51,7 @@ https://github.com/google/sanitizers/wiki/AddressSanitizerManualPoisoning */
#ifndef DBUG_OFF
#define TRASH_FILL(A,B,C) do { const size_t trash_tmp= (B); MEM_UNDEFINED(A, trash_tmp); memset(A, C, trash_tmp); } while (0)
#else
-#define TRASH_FILL(A,B,C) do { const size_t trash_tmp __attribute__((unused))= (B); MEM_UNDEFINED(A,trash_tmp); } while (0)
+#define TRASH_FILL(A,B,C) do { MEM_UNDEFINED((A), (B)); } while (0)
#endif
#define TRASH_ALLOC(A,B) do { TRASH_FILL(A,B,0xA5); MEM_UNDEFINED(A,B); } while(0)
#define TRASH_FREE(A,B) do { TRASH_FILL(A,B,0x8F); MEM_NOACCESS(A,B); } while(0)
diff --git a/mysql-test/r/row-checksum-old.result b/mysql-test/r/row-checksum-old.result
index ef523463860..920c5dbe838 100644
--- a/mysql-test/r/row-checksum-old.result
+++ b/mysql-test/r/row-checksum-old.result
@@ -85,3 +85,19 @@ checksum table t1 extended;
Table Checksum
test.t1 4108368782
drop table t1;
+#
+# MDEV-17085: CHECKSUM TABLE EXTENDED does not work correctly
+#
+CREATE TABLE t1 ( c1 int NOT NULL, c2 int NOT NULL, c4 varchar(20), c5 varchar(20), c6 varchar(20), c7 varchar(20), c8 varchar(20), c9 varchar(20), c10 varchar(20), c11 varchar(20), c12 varchar(20), c13 varchar(20), c14 varchar(20), c15 varchar(20), c16 varchar(20), c19 int NOT NULL, c20 int NOT NULL, c21 varchar(20), c22 VARCHAR(20), c23 varchar(20));
+insert into t1 values (5,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,"dog",NULL,NULL);
+# Important is that checksum is different from following
+CHECKSUM TABLE t1 EXTENDED;
+Table Checksum
+test.t1 2514025256
+UPDATE t1 SET c21='cat' WHERE c1=5;
+# Important is that checksum is different from above
+CHECKSUM TABLE t1 EXTENDED;
+Table Checksum
+test.t1 2326430205
+drop table t1;
+# End of 5.5 tests
diff --git a/mysql-test/r/row-checksum.result b/mysql-test/r/row-checksum.result
index fb8a1260a1d..0f8311b703a 100644
--- a/mysql-test/r/row-checksum.result
+++ b/mysql-test/r/row-checksum.result
@@ -85,3 +85,19 @@ checksum table t1 extended;
Table Checksum
test.t1 3885665021
drop table t1;
+#
+# MDEV-17085: CHECKSUM TABLE EXTENDED does not work correctly
+#
+CREATE TABLE t1 ( c1 int NOT NULL, c2 int NOT NULL, c4 varchar(20), c5 varchar(20), c6 varchar(20), c7 varchar(20), c8 varchar(20), c9 varchar(20), c10 varchar(20), c11 varchar(20), c12 varchar(20), c13 varchar(20), c14 varchar(20), c15 varchar(20), c16 varchar(20), c19 int NOT NULL, c20 int NOT NULL, c21 varchar(20), c22 VARCHAR(20), c23 varchar(20));
+insert into t1 values (5,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,"dog",NULL,NULL);
+# Important is that checksum is different from following
+CHECKSUM TABLE t1 EXTENDED;
+Table Checksum
+test.t1 2514025256
+UPDATE t1 SET c21='cat' WHERE c1=5;
+# Important is that checksum is different from above
+CHECKSUM TABLE t1 EXTENDED;
+Table Checksum
+test.t1 2326430205
+drop table t1;
+# End of 5.5 tests
diff --git a/mysql-test/r/subselect2.result b/mysql-test/r/subselect2.result
index 401d333ccfb..420ce6d537e 100644
--- a/mysql-test/r/subselect2.result
+++ b/mysql-test/r/subselect2.result
@@ -394,3 +394,25 @@ select null in (select a from t1 where a < out3.a union select a from t2 where
(select a from t3) +1 < out3.a+1) from t3 out3;
ERROR 21000: Subquery returns more than 1 row
drop table t1, t2, t3;
+CREATE TABLE t1(
+q11 int, q12 int, q13 int, q14 int, q15 int, q16 int, q17 int, q18 int, q19 int,
+q21 int, q22 int, q23 int, q24 int, q25 int, q26 int, q27 int, q28 int, q29 int,
+f1 int
+);
+CREATE TABLE t2(f2 int, f21 int, f3 timestamp, f4 int, f5 int, f6 int);
+INSERT INTO t1 (f1) VALUES (1),(1),(2),(2);
+INSERT INTO t2 VALUES (1,1,"2004-02-29 11:11:11",0,0,0), (2,2,"2004-02-29 11:11:11",0,0,0);
+SELECT f1,
+(SELECT t.f21 from t2 t where max(
+q11+q12+q13+q14+q15+q16+q17+q18+q19+
+q21+q22+q23+q24+q25+q26+q27+q28+q29) = t.f2 UNION
+SELECT t.f3 FROM t2 AS t WHERE t1.f1=t.f2 AND t.f3=MAX(t1.f1) UNION
+SELECT 1 LIMIT 1) AS test
+FROM t1 GROUP BY f1;
+f1 test
+1 1
+2 1
+Warnings:
+Warning 1292 Incorrect datetime value: '1'
+Warning 1292 Incorrect datetime value: '2'
+DROP TABLE t1,t2;
diff --git a/mysql-test/t/row-checksum.test b/mysql-test/t/row-checksum.test
index 920a2384aa8..6b79827d066 100644
--- a/mysql-test/t/row-checksum.test
+++ b/mysql-test/t/row-checksum.test
@@ -60,3 +60,20 @@ checksum table t1;
checksum table t1 quick;
checksum table t1 extended;
drop table t1;
+
+--echo #
+--echo # MDEV-17085: CHECKSUM TABLE EXTENDED does not work correctly
+--echo #
+
+CREATE TABLE t1 ( c1 int NOT NULL, c2 int NOT NULL, c4 varchar(20), c5 varchar(20), c6 varchar(20), c7 varchar(20), c8 varchar(20), c9 varchar(20), c10 varchar(20), c11 varchar(20), c12 varchar(20), c13 varchar(20), c14 varchar(20), c15 varchar(20), c16 varchar(20), c19 int NOT NULL, c20 int NOT NULL, c21 varchar(20), c22 VARCHAR(20), c23 varchar(20));
+
+insert into t1 values (5,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,"dog",NULL,NULL);
+--echo # Important is that checksum is different from following
+CHECKSUM TABLE t1 EXTENDED;
+UPDATE t1 SET c21='cat' WHERE c1=5;
+--echo # Important is that checksum is different from above
+CHECKSUM TABLE t1 EXTENDED;
+
+drop table t1;
+
+--echo # End of 5.5 tests
diff --git a/mysql-test/t/subselect2.test b/mysql-test/t/subselect2.test
index ae210b865a2..73b0e77ade6 100644
--- a/mysql-test/t/subselect2.test
+++ b/mysql-test/t/subselect2.test
@@ -411,3 +411,23 @@ insert into t3 select a from t1;
select null in (select a from t1 where a < out3.a union select a from t2 where
(select a from t3) +1 < out3.a+1) from t3 out3;
drop table t1, t2, t3;
+
+#
+# Bug #28499924: INCORRECT BEHAVIOR WITH UNION IN SUBQUERY
+#
+CREATE TABLE t1(
+ q11 int, q12 int, q13 int, q14 int, q15 int, q16 int, q17 int, q18 int, q19 int,
+ q21 int, q22 int, q23 int, q24 int, q25 int, q26 int, q27 int, q28 int, q29 int,
+ f1 int
+);
+CREATE TABLE t2(f2 int, f21 int, f3 timestamp, f4 int, f5 int, f6 int);
+INSERT INTO t1 (f1) VALUES (1),(1),(2),(2);
+INSERT INTO t2 VALUES (1,1,"2004-02-29 11:11:11",0,0,0), (2,2,"2004-02-29 11:11:11",0,0,0);
+SELECT f1,
+ (SELECT t.f21 from t2 t where max(
+ q11+q12+q13+q14+q15+q16+q17+q18+q19+
+ q21+q22+q23+q24+q25+q26+q27+q28+q29) = t.f2 UNION
+ SELECT t.f3 FROM t2 AS t WHERE t1.f1=t.f2 AND t.f3=MAX(t1.f1) UNION
+ SELECT 1 LIMIT 1) AS test
+ FROM t1 GROUP BY f1;
+DROP TABLE t1,t2;
diff --git a/scripts/mysql_install_db.sh b/scripts/mysql_install_db.sh
index e4f2d419ea5..0c1dd7c724f 100644
--- a/scripts/mysql_install_db.sh
+++ b/scripts/mysql_install_db.sh
@@ -36,6 +36,9 @@ in_rpm=0
ip_only=0
cross_bootstrap=0
+dirname0=`dirname $0 2>/dev/null`
+dirname0=`dirname $dirname0 2>/dev/null`
+
usage()
{
cat <<EOF
@@ -213,11 +216,6 @@ cannot_find_file()
echo "If you don't want to do a full install, you can use the --srcdir"
echo "option to only install the mysql database and privilege tables"
echo
- echo "If you compiled from source, you need to either run 'make install' to"
- echo "copy the software into the correct location ready for operation."
- echo "If you don't want to do a full install, you can use the --srcdir"
- echo "option to only install the mysql database and privilege tables"
- echo
echo "If you are using a binary release, you must either be at the top"
echo "level of the extracted archive, or pass the --basedir option"
echo "pointing to that location."
@@ -258,6 +256,9 @@ then
cannot_find_file my_print_defaults $basedir/bin $basedir/extra
exit 1
fi
+elif test -n "$dirname0" -a -x "$dirname0/@bindir@/my_print_defaults"
+then
+ print_defaults="$dirname0/@bindir@/my_print_defaults"
else
print_defaults="@bindir@/my_print_defaults"
fi
@@ -309,6 +310,14 @@ then
cannot_find_file fill_help_tables.sql @pkgdata_locations@
exit 1
fi
+# relative from where the script was run for a relocatable install
+elif test -n "$dirname0" -a -x "$dirname0/@INSTALL_SBINDIR@/mysqld"
+then
+ basedir="$dirname0"
+ bindir="$basedir/@INSTALL_SBINDIR@"
+ resolveip="$bindir/resolveip"
+ mysqld="$basedir/@INSTALL_SBINDIR@/mysqld"
+ pkgdatadir="$basedir/@INSTALL_MYSQLSHAREDIR@"
else
basedir="@prefix@"
bindir="@bindir@"
diff --git a/sql/CMakeLists.txt b/sql/CMakeLists.txt
index 60e9f05542a..187f021599c 100644
--- a/sql/CMakeLists.txt
+++ b/sql/CMakeLists.txt
@@ -426,7 +426,7 @@ IF(WIN32)
COMPONENT Server
)
SET_TARGET_PROPERTIES(mysql_install_db PROPERTIES COMPILE_FLAGS -DINSTALL_PLUGINDIR=${INSTALL_PLUGINDIR})
- TARGET_LINK_LIBRARIES(mysql_install_db mysys)
+ TARGET_LINK_LIBRARIES(mysql_install_db mysys shlwapi)
ADD_LIBRARY(winservice STATIC winservice.c)
TARGET_LINK_LIBRARIES(winservice shell32)
diff --git a/sql/log.cc b/sql/log.cc
index e82d001fefc..6761934caf0 100644
--- a/sql/log.cc
+++ b/sql/log.cc
@@ -1,5 +1,5 @@
-/* Copyright (c) 2000, 2016, Oracle and/or its affiliates.
- Copyright (c) 2009, 2017, MariaDB
+/* Copyright (c) 2000, 2018, Oracle and/or its affiliates.
+ Copyright (c) 2009, 2019, MariaDB Corporation
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
@@ -3758,7 +3758,7 @@ int MYSQL_BIN_LOG::find_log_pos(LOG_INFO *linfo, const char *log_name,
// if the log entry matches, null string matching anything
if (!log_name ||
(log_name_len == fname_len-1 && full_fname[log_name_len] == '\n' &&
- !memcmp(full_fname, full_log_name, log_name_len)))
+ !strncmp(full_fname, full_log_name, log_name_len)))
{
DBUG_PRINT("info", ("Found log file entry"));
full_fname[fname_len-1]= 0; // remove last \n
diff --git a/sql/mysql_install_db.cc b/sql/mysql_install_db.cc
index f9343aab011..76da7e7a177 100644
--- a/sql/mysql_install_db.cc
+++ b/sql/mysql_install_db.cc
@@ -27,6 +27,8 @@
#include <shellapi.h>
#include <accctrl.h>
#include <aclapi.h>
+struct IUnknown;
+#include <shlwapi.h>
#define USAGETEXT \
"mysql_install_db.exe Ver 1.00 for Windows\n" \
@@ -549,20 +551,78 @@ static int create_db_instance()
DWORD cwd_len= MAX_PATH;
char cmdline[3*MAX_PATH];
FILE *in;
+ bool cleanup_datadir= true;
+ DWORD last_error;
verbose("Running bootstrap");
GetCurrentDirectory(cwd_len, cwd);
- CreateDirectory(opt_datadir, NULL); /*ignore error, it might already exist */
+
+ /* Create datadir and datadir/mysql, if they do not already exist. */
+
+ if (!CreateDirectory(opt_datadir, NULL) && (GetLastError() != ERROR_ALREADY_EXISTS))
+ {
+ last_error = GetLastError();
+ switch(last_error)
+ {
+ case ERROR_ACCESS_DENIED:
+ die("Can't create data directory '%s' (access denied)\n",
+ opt_datadir);
+ break;
+ case ERROR_PATH_NOT_FOUND:
+ die("Can't create data directory '%s' "
+ "(one or more intermediate directories do not exist)\n",
+ opt_datadir);
+ break;
+ default:
+ die("Can't create data directory '%s', last error %u\n",
+ opt_datadir, last_error);
+ break;
+ }
+ }
if (!SetCurrentDirectory(opt_datadir))
{
- die("Cannot set current directory to '%s'\n",opt_datadir);
- return -1;
+ last_error = GetLastError();
+ switch (last_error)
+ {
+ case ERROR_DIRECTORY:
+ die("Can't set current directory to '%s', the path is not a valid directory \n",
+ opt_datadir);
+ break;
+ default:
+ die("Can' set current directory to '%s', last error %u\n",
+ opt_datadir, last_error);
+ break;
+ }
+ }
+
+ if (PathIsDirectoryEmpty(opt_datadir))
+ {
+ cleanup_datadir= false;
}
- CreateDirectory("mysql",NULL);
- CreateDirectory("test", NULL);
+ if (!CreateDirectory("mysql",NULL))
+ {
+ last_error = GetLastError();
+ DWORD attributes;
+ switch(last_error)
+ {
+ case ERROR_ACCESS_DENIED:
+ die("Can't create subdirectory 'mysql' in '%s' (access denied)\n",opt_datadir);
+ break;
+ case ERROR_ALREADY_EXISTS:
+ attributes = GetFileAttributes("mysql");
+
+ if (attributes == INVALID_FILE_ATTRIBUTES)
+ die("GetFileAttributes() failed for existing file '%s\\mysql', last error %u",
+ opt_datadir, GetLastError());
+ else if (!(attributes & FILE_ATTRIBUTE_DIRECTORY))
+ die("File '%s\\mysql' exists, but it is not a directory", opt_datadir);
+
+ break;
+ }
+ }
/*
Set data directory permissions for both current user and
@@ -675,7 +735,7 @@ static int create_db_instance()
}
end:
- if (ret)
+ if (ret && cleanup_datadir)
{
SetCurrentDirectory(cwd);
clean_directory(opt_datadir);
diff --git a/sql/sql_repl.cc b/sql/sql_repl.cc
index a2acf52d44e..29ca2dccb07 100644
--- a/sql/sql_repl.cc
+++ b/sql/sql_repl.cc
@@ -1,5 +1,5 @@
-/* Copyright (c) 2000, 2017, Oracle and/or its affiliates.
- Copyright (c) 2008, 2017, MariaDB Corporation
+/* Copyright (c) 2000, 2018, Oracle and/or its affiliates.
+ Copyright (c) 2008, 2019, MariaDB Corporation
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
@@ -481,7 +481,7 @@ bool log_in_use(const char* log_name)
if ((linfo = tmp->current_linfo))
{
mysql_mutex_lock(&linfo->lock);
- result = !memcmp(log_name, linfo->log_file_name, log_name_len);
+ result = !strncmp(log_name, linfo->log_file_name, log_name_len);
mysql_mutex_unlock(&linfo->lock);
if (result)
break;
diff --git a/sql/sql_table.cc b/sql/sql_table.cc
index 1b684cbd5db..8a4c6e025fb 100644
--- a/sql/sql_table.cc
+++ b/sql/sql_table.cc
@@ -9878,7 +9878,10 @@ bool mysql_checksum_table(THD *thd, TABLE_LIST *tables,
{
/* calculating table's checksum */
ha_checksum crc= 0;
- uchar null_mask=256 - (1 << t->s->last_null_bit_pos);
+ DBUG_ASSERT(t->s->last_null_bit_pos < 8);
+ uchar null_mask= (t->s->last_null_bit_pos ?
+ (256 - (1 << t->s->last_null_bit_pos)):
+ 0);
t->use_all_columns();
diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy
index 1d5de692486..257442c758c 100644
--- a/sql/sql_yacc.yy
+++ b/sql/sql_yacc.yy
@@ -15776,19 +15776,21 @@ subselect_end:
lex->current_select = lex->current_select->return_after_parsing();
lex->nest_level--;
lex->current_select->n_child_sum_items += child->n_sum_items;
- /*
- A subselect can add fields to an outer select. Reserve space for
- them.
- */
- lex->current_select->select_n_where_fields+=
- child->select_n_where_fields;
/*
- Aggregate functions in having clause may add fields to an outer
- select. Count them also.
+ A subquery (and all the subsequent query blocks in a UNION) can
+ add columns to an outer query block. Reserve space for them.
+ Aggregate functions in having clause can also add fields to an
+ outer select.
*/
- lex->current_select->select_n_having_items+=
- child->select_n_having_items;
+ for (SELECT_LEX *temp= child->master_unit()->first_select();
+ temp != NULL; temp= temp->next_select())
+ {
+ lex->current_select->select_n_where_fields+=
+ temp->select_n_where_fields;
+ lex->current_select->select_n_having_items+=
+ temp->select_n_having_items;
+ }
}
;
diff --git a/support-files/mysql.server.sh b/support-files/mysql.server.sh
index 958902620a5..3817b1f6203 100644
--- a/support-files/mysql.server.sh
+++ b/support-files/mysql.server.sh
@@ -181,7 +181,11 @@ fi
user='@MYSQLD_USER@'
su_kill() {
- su - $user -s /bin/sh -c "kill $*" >/dev/null 2>&1
+ if test "$USER" = "$user"; then
+ kill $* >/dev/null 2>&1
+ else
+ su - $user -s /bin/sh -c "kill $*" >/dev/null 2>&1
+ fi
}
#
diff --git a/unittest/mysys/thr_template.c b/unittest/mysys/thr_template.c
index d1bc0868ca0..0e06bf6e731 100644
--- a/unittest/mysys/thr_template.c
+++ b/unittest/mysys/thr_template.c
@@ -34,7 +34,7 @@ void test_concurrently(const char *test, pthread_handler handler, int n, int m)
bad= 0;
diag("Testing %s with %d threads, %d iterations... ", test, n, m);
- for (i= n; i; i--)
+ for (i= 0; i < n; i++)
{
if (pthread_create(&threads[i], 0, handler, &m) != 0)
{
@@ -43,7 +43,7 @@ void test_concurrently(const char *test, pthread_handler handler, int n, int m)
}
}
- for (i= n; i; i--)
+ for (i= 0; i < n; i++)
pthread_join(threads[i], 0);
now= my_interval_timer() - now;
diff --git a/win/packaging/heidisql.cmake b/win/packaging/heidisql.cmake
index 772834e7c7d..29ecdd8eb4f 100644
--- a/win/packaging/heidisql.cmake
+++ b/win/packaging/heidisql.cmake
@@ -1,4 +1,4 @@
-SET(HEIDISQL_BASE_NAME "HeidiSQL_9.4_Portable")
+SET(HEIDISQL_BASE_NAME "HeidiSQL_9.5_Portable")
SET(HEIDISQL_ZIP "${HEIDISQL_BASE_NAME}.zip")
SET(HEIDISQL_URL "http://www.heidisql.com/downloads/releases/${HEIDISQL_ZIP}")
SET(HEIDISQL_DOWNLOAD_DIR ${THIRD_PARTY_DOWNLOAD_LOCATION}/${HEIDISQL_BASE_NAME})