summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOleksandr Byelkin <sanja@mariadb.com>2019-05-02 17:23:36 +0200
committerOleksandr Byelkin <sanja@mariadb.com>2019-05-02 17:23:36 +0200
commitb85aa20065504bdda4bc03c2bd7eb7de38865c5d (patch)
tree95bfad29754c859353d513502a621918f2b29048
parent8cda7ab6a211380d8c6d297181bca32b04f08ed7 (diff)
parentaba911542641c93553bad0307021983998042d69 (diff)
downloadmariadb-git-b85aa20065504bdda4bc03c2bd7eb7de38865c5d.tar.gz
Merge branch '5.5' into 10.1
-rw-r--r--mysql-test/t/bootstrap.test9
-rw-r--r--sql/sql_base.cc3
2 files changed, 10 insertions, 2 deletions
diff --git a/mysql-test/t/bootstrap.test b/mysql-test/t/bootstrap.test
index 8508c6c9dc6..879d42be2d6 100644
--- a/mysql-test/t/bootstrap.test
+++ b/mysql-test/t/bootstrap.test
@@ -65,6 +65,15 @@ SELECT 'bug' as '' FROM INFORMATION_SCHEMA.ENGINES WHERE engine='innodb'
--error 1
--exec $MYSQLD_BOOTSTRAP_CMD --myisam_recover_options=NONE
+#
+# MDEV-19349 mysql_install_db: segfault at tmp_file_prefix check
+#
+--write_file $MYSQLTEST_VARDIR/tmp/1
+use test;
+EOF
+--exec $MYSQLD_BOOTSTRAP_CMD < $MYSQLTEST_VARDIR/tmp/1 >> $MYSQLTEST_VARDIR/tmp/bootstrap.log 2>&1
+--remove_file $MYSQLTEST_VARDIR/tmp/1
+
--echo End of 5.5 tests
--source include/not_windows_embedded.inc
diff --git a/sql/sql_base.cc b/sql/sql_base.cc
index 3a7ffdb656a..39d7e157803 100644
--- a/sql/sql_base.cc
+++ b/sql/sql_base.cc
@@ -9216,8 +9216,7 @@ my_bool mysql_rm_tmp_tables(void)
{
file=dirp->dir_entry+idx;
- if (!memcmp(file->name, tmp_file_prefix,
- tmp_file_prefix_length))
+ if (!strncmp(file->name, tmp_file_prefix, tmp_file_prefix_length))
{
char *ext= fn_ext(file->name);
uint ext_len= strlen(ext);