mariadb/storage/myisam/mi_test_all.sh
Michael Widenius f0f2072d1f Fixed problem with very slow shutdown when using 100,000 MyISAM tables with delay_key_write
Reason for the problem was that the hash of changed files in the key cache was too small (was 128). Fixed by making the hash size larger and changeable.

- Introduced key-cache-file-hash-size (default 512) for MyISAM and aria_pagecache_file_hash_size (default 512) for Aria.
- Added new status variable "Feature_delay_key_write" which counts number of tables opened that are using delay_key_write


mysql-test/r/features.result:
  Added test of Feature_delay_key_write
mysql-test/r/key_cache.result:
  Updated tests as the number of blocks has changed
mysql-test/r/mysqld--help.result:
  Updated result
mysql-test/suite/maria/maria3.result:
  Updated result
mysql-test/suite/sys_vars/r/key_cache_file_hash_size_basic.result:
  Test new variable
mysql-test/suite/sys_vars/t/aria_pagecache_file_hash_size_basic.test:
  Test new variable
mysql-test/suite/sys_vars/t/key_cache_file_hash_size_basic.test:
  Test new variable
mysql-test/t/features.test:
  Added test of Feature_delay_key_write
mysql-test/t/key_cache.test:
  Updated tests as the number of blocks has changed
mysys/mf_keycache.c:
  Made CHANGED_BLOCKS_HASH dynamic
sql/handler.cc:
  Updated call to init_key_cache()
sql/mysqld.cc:
  Added "Feature_delay_key_write"
  Added support for key-cache-file-hash-size
sql/mysqld.h:
  Added support for key-cache-file-hash-size
sql/sql_class.h:
  Added feature_files_opened_with_delayed_keys
sql/sys_vars.cc:
  Added key_cache_file_hash_size
storage/maria/ha_maria.cc:
  Added pagecache_file_hash_size
  Added counting of files with delay_key_write
storage/maria/ma_checkpoint.c:
  Fixed compiler warning
storage/maria/ma_pagecache.c:
  Made PAGECACHE_CHANGED_BLOCKS_HASH into a variable
storage/maria/ma_pagecache.h:
  Made PAGECACHE_CHANGED_BLOCKS_HASH into a variable
storage/maria/ma_rt_test.c:
  Updated parameters for init_pagecache()
storage/maria/ma_test1.c:
  Updated parameters for init_pagecache()
storage/maria/ma_test2.c:
  Updated parameters for init_pagecache()
storage/maria/ma_test3.c:
  Updated parameters for init_pagecache()
storage/maria/maria_chk.c:
  Updated parameters for init_pagecache()
storage/maria/maria_ftdump.c:
  Updated parameters for init_pagecache()
storage/maria/maria_pack.c:
  Updated parameters for init_pagecache()
storage/maria/maria_read_log.c:
  Updated parameters for init_pagecache()
storage/maria/unittest/ma_pagecache_consist.c:
  Updated parameters for init_pagecache()
storage/maria/unittest/ma_pagecache_rwconsist.c:
  Updated parameters for init_pagecache()
storage/maria/unittest/ma_pagecache_rwconsist2.c:
  Updated parameters for init_pagecache()
storage/maria/unittest/ma_pagecache_single.c:
  Updated parameters for init_pagecache()
storage/maria/unittest/ma_test_loghandler-t.c:
  Updated parameters for init_pagecache()
storage/maria/unittest/ma_test_loghandler_first_lsn-t.c:
  Updated parameters for init_pagecache()
storage/maria/unittest/ma_test_loghandler_max_lsn-t.c:
  Updated parameters for init_pagecache()
storage/maria/unittest/ma_test_loghandler_multigroup-t.c:
  Updated parameters for init_pagecache()
storage/maria/unittest/ma_test_loghandler_multithread-t.c:
  Updated parameters for init_pagecache()
storage/maria/unittest/ma_test_loghandler_noflush-t.c:
  Updated parameters for init_pagecache()
storage/maria/unittest/ma_test_loghandler_nologs-t.c:
  Updated parameters for init_pagecache()
storage/maria/unittest/ma_test_loghandler_pagecache-t.c:
  Updated parameters for init_pagecache()
storage/maria/unittest/ma_test_loghandler_purge-t.c:
  Updated parameters for init_pagecache()
storage/myisam/ha_myisam.cc:
  Added counting of files with delay_key_write
storage/myisam/mi_check.c:
  Updated call to init_key_cache()
storage/myisam/mi_test1.c:
  Updated call to init_key_cache()
storage/myisam/mi_test2.c:
  Updated call to init_key_cache()
storage/myisam/mi_test3.c:
  Updated call to init_key_cache()
storage/myisam/mi_test_all.sh:
  Fixed broken test
storage/myisam/myisam_ftdump.c:
  Updated call to init_key_cache()
storage/myisam/myisamchk.c:
  Updated call to init_key_cache()
storage/myisam/myisamlog.c:
  Updated call to init_key_cache()
2014-07-19 17:46:08 +03:00

168 lines
5.6 KiB
Bash
Executable file

#!/bin/sh
# Copyright (C) 2000, 2007 MySQL AB
# Use is subject to license terms
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
# License as published by the Free Software Foundation; version 2
# of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Library General Public License for more details.
#
# You should have received a copy of the GNU Library General Public
# License along with this library; if not, write to the Free
# Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
# MA 02110-1301, USA
#
# Execute some simple basic test on MyISAM libary to check if things
# works at all.
valgrind="valgrind --alignment=8 --leak-check=yes"
silent="-s"
rm -f test1.TMD
if test -f mi_test1$MACH ; then suffix=$MACH ; else suffix=""; fi
./mi_test1$suffix $silent
./myisamchk$suffix -se test1
./mi_test1$suffix $silent -N -S
./myisamchk$suffix -se test1
./mi_test1$suffix $silent -P --checksum
./myisamchk$suffix -se test1
./mi_test1$suffix $silent -P -N -S
./myisamchk$suffix -se test1
./mi_test1$suffix $silent -B -N -R2
./myisamchk$suffix -sm test1
./mi_test1$suffix $silent -a -k 480 --unique
./myisamchk$suffix -sm test1
./mi_test1$suffix $silent -a -N -S -R1
./myisamchk$suffix -sm test1
./mi_test1$suffix $silent -p -S
./myisamchk$suffix -sm test1
./mi_test1$suffix $silent -p -S -N --unique
./myisamchk$suffix -sm test1
./mi_test1$suffix $silent -p -S -N --key_length=127 --checksum
./myisamchk$suffix -sm test1
./mi_test1$suffix $silent -p -S -N --key_length=128
./myisamchk$suffix -sm test1
./mi_test1$suffix $silent -p -S --key_length=480
./myisamchk$suffix -sm test1
./mi_test1$suffix $silent -a -B
./myisamchk$suffix -sm test1
./mi_test1$suffix $silent -a -B --key_length=64 --unique
./myisamchk$suffix -sm test1
./mi_test1$suffix $silent -a -B -k 480 --checksum
./myisamchk$suffix -sm test1
./mi_test1$suffix $silent -a -B -k 480 -N --unique --checksum
./myisamchk$suffix -sm test1
./mi_test1$suffix $silent -a -m
./myisamchk$suffix -sm test1
./mi_test1$suffix $silent -a -m -P --unique --checksum
./myisamchk$suffix -sm test1
./mi_test1$suffix $silent -a -m -P --key_length=480 --key_cache
./myisamchk$suffix -sm test1
./mi_test1$suffix $silent -m -p
./myisamchk$suffix -sm test1
./mi_test1$suffix $silent -w -S --unique
./myisamchk$suffix -sm test1
./mi_test1$suffix $silent -a -w --key_length=64 --checksum
./myisamchk$suffix -sm test1
./mi_test1$suffix $silent -a -w -N --key_length=480
./myisamchk$suffix -sm test1
./mi_test1$suffix $silent -a -w -S --key_length=480 --checksum
./myisamchk$suffix -sm test1
./mi_test1$suffix $silent -a -b -N
./myisamchk$suffix -sm test1
./mi_test1$suffix $silent -a -b --key_length=480
./myisamchk$suffix -sm test1
./mi_test1$suffix $silent -p -B --key_length=480
./myisamchk$suffix -sm test1
./mi_test1$suffix $silent --checksum
./myisamchk$suffix -se test1
./myisamchk$suffix -rs test1
./myisamchk$suffix -se test1
./myisamchk$suffix -rqs test1
./myisamchk$suffix -se test1
./myisamchk$suffix -rs --correct-checksum test1
./myisamchk$suffix -se test1
./myisamchk$suffix -rqs --correct-checksum test1
./myisamchk$suffix -se test1
./myisamchk$suffix -ros --correct-checksum test1
./myisamchk$suffix -se test1
./myisamchk$suffix -rqos --correct-checksum test1
./myisamchk$suffix -se test1
# check of myisampack / myisamchk
./myisampack$suffix --force -s test1
# Ignore error for index file
./myisamchk$suffix -es test1 2>&1 > /dev/null
./myisamchk$suffix -rqs test1
./myisamchk$suffix -es test1
./myisamchk$suffix -rs test1
./myisamchk$suffix -es test1
./myisamchk$suffix -rus test1
./myisamchk$suffix -es test1
./mi_test1$suffix $silent --checksum -S
./myisamchk$suffix -se test1
./myisamchk$suffix -ros test1
./myisamchk$suffix -rqs test1
./myisamchk$suffix -se test1
./myisampack$suffix --force -s test1
./myisamchk$suffix -rqs test1
./myisamchk$suffix -es test1
./myisamchk$suffix -rus test1
./myisamchk$suffix -es test1
./mi_test1$suffix $silent --checksum --unique
./myisamchk$suffix -se test1
./mi_test1$suffix $silent --unique -S
./myisamchk$suffix -se test1
./mi_test1$suffix $silent --key_multiple -N -S
./myisamchk$suffix -sm test1
./mi_test1$suffix $silent --key_multiple -a -p --key_length=480
./myisamchk$suffix -sm test1
./mi_test1$suffix $silent --key_multiple -a -B --key_length=480
./myisamchk$suffix -sm test1
./mi_test1$suffix $silent --key_multiple -P -S
./myisamchk$suffix -sm test1
./mi_test2$suffix $silent -L -K -W -P
./myisamchk$suffix -sm test2
./mi_test2$suffix $silent -L -K -W -P -A
./myisamchk$suffix -sm test2
./mi_test2$suffix $silent -L -K -W -P -S -R1 -m500
echo "mi_test2$suffix $silent -L -K -R1 -m2000 ; Should give error 135"
./myisamchk$suffix -sm test2
./mi_test2$suffix $silent -L -K -R1 -m2000
./myisamchk$suffix -sm test2
./mi_test2$suffix $silent -L -K -P -S -R3 -m50 -b1000000
./myisamchk$suffix -sm test2
./mi_test2$suffix $silent -L -B
./myisamchk$suffix -sm test2
./mi_test2$suffix $silent -D -B -c
./myisamchk$suffix -sm test2
./mi_test2$suffix $silent -m10000 -e8192 -K
./myisamchk$suffix -sm test2
./mi_test2$suffix $silent -m10000 -e16384 -E16384 -K -L
./myisamchk$suffix -sm test2
./mi_test2$suffix $silent -L -K -W -P -m50 -l
./myisamlog$suffix -P
./mi_test2$suffix $silent -L -K -W -P -m50 -l -b100
./myisamlog$suffix -P
time ./mi_test2$suffix $silent
time ./mi_test2$suffix $silent -K -B
time ./mi_test2$suffix $silent -L -B
time ./mi_test2$suffix $silent -L -K -B
time ./mi_test2$suffix $silent -L -K -W -B
time ./mi_test2$suffix $silent -L -K -W -S -B
time ./mi_test2$suffix $silent -D -K -W -S -B