From b0bc908cbfd15a08a093b4df6e42375a7bb68484 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 30 Oct 2007 15:22:52 +0100 Subject: bug#30630 --- mysql-test/mysql-test-run.pl | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'mysql-test/mysql-test-run.pl') diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index 1ec91d200a5..799a37220cc 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -3715,6 +3715,13 @@ sub mysqld_arguments ($$$$) { # see BUG#28359 mtr_add_arg($args, "%s--connect-timeout=60", $prefix); + # When mysqld is run by a root user(euid is 0), it will fail + # to start unless we specify what user to run as. If not running + # as root it will be ignored, see BUG#30630 + if (!(grep(/^--user/, @$extra_opt, @opt_extra_mysqld_opt))) { + mtr_add_arg($args, "%s--user=root"); + } + if ( $opt_valgrind_mysqld ) { mtr_add_arg($args, "%s--skip-safemalloc", $prefix); -- cgit v1.2.1 From c5df4b3092d1dc4b66100b42e277fe708ad3c19d Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 7 Nov 2007 12:55:28 +0400 Subject: BUG#31277 - myisamchk --unpack corrupts a table With certain data sets (when compressed record length gets bigger than uncompressed) myisamchk --unpack may corrupt data file. Fixed that record length was wrongly restored from compressed table. myisam/mi_check.c: With compressed tables compressed record length may be bigger than pack_reclength, thus we may allocate insufficient memory for record buffer. Let single function allocate record buffer, performing needed record length calculations. Still, it is not doable with parallel repair, as it allocates needed record buffers at once. For parellel repair added better record length calculation. myisam/mi_open.c: When calculating record buffer size, take into account that compressed record length may be bigger than uncompressed. myisam/mi_packrec.c: With certain data set share->max_pack_length (compressed record length) may be bigger than share->base.pack_reclength (packed record length). set_if_bigger(pack_reclength, max_pack_length) in this case causes myisamchk --unpack to write extra garbage, whereas pack_reclength remains the same in new index file. As a result we get unreadable table. myisam/myisamchk.c: With compressed tables compressed record length may be bigger than pack_reclength, thus we may allocate insufficient memory for record buffer. Let single function allocate record buffer, performing needed record length calculations. mysql-test/mysql-test-run.pl: Environment variables to execute myisamchk and myisampack. mysql-test/r/myisampack.result: New BitKeeper file ``mysql-test/r/myisampack.result'' mysql-test/t/myisampack.test: New BitKeeper file ``mysql-test/t/myisampack.test'' --- mysql-test/mysql-test-run.pl | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'mysql-test/mysql-test-run.pl') diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index 6df64ced2f9..d60bb4663f2 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -1880,6 +1880,21 @@ sub environment_setup () { ($lib_udf_example ? dirname($lib_udf_example) : "") . ($ENV{'LD_LIBRARY_PATH'} ? ":$ENV{'LD_LIBRARY_PATH'}" : ""); + # ---------------------------------------------------- + # Setup env so childs can execute myisampack and myisamchk + # ---------------------------------------------------- + $ENV{'MYISAMCHK'}= mtr_native_path(mtr_exe_exists( + vs_config_dirs('storage/myisam', 'myisamchk'), + vs_config_dirs('myisam', 'myisamchk'), + "$path_client_bindir/myisamchk", + "$glob_basedir/storage/myisam/myisamchk", + "$glob_basedir/myisam/myisamchk")); + $ENV{'MYISAMPACK'}= mtr_native_path(mtr_exe_exists( + vs_config_dirs('storage/myisam', 'myisampack'), + vs_config_dirs('myisam', 'myisampack'), + "$path_client_bindir/myisampack", + "$glob_basedir/storage/myisam/myisampack", + "$glob_basedir/myisam/myisampack")); # ---------------------------------------------------- # We are nice and report a bit about our settings -- cgit v1.2.1