Skip to content
Permalink
Browse files

MDEV-19349 mysql_install_db: segfault at tmp_file_prefix check

  • Loading branch information...
midenok authored and vuvova committed Apr 30, 2019
1 parent 71a748d commit aba911542641c93553bad0307021983998042d69
Showing with 10 additions and 7 deletions.
  1. +9 −0 mysql-test/t/bootstrap.test
  2. +1 −7 sql/sql_base.cc
@@ -66,4 +66,13 @@ 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
@@ -9301,13 +9301,7 @@ my_bool mysql_rm_tmp_tables(void)
{
file=dirp->dir_entry+idx;

/* skiping . and .. */
if (file->name[0] == '.' && (!file->name[1] ||
(file->name[1] == '.' && !file->name[2])))
continue;

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);

0 comments on commit aba9115

Please sign in to comment.
You can’t perform that action at this time.