Hello community, here is the log from the commit of package mysql-cluster for openSUSE:11.3 checked in at Wed Jul 6 18:31:01 CEST 2011.
-------- --- old-versions/11.3/all/mysql-cluster/mysql-cluster.changes 2010-06-04 18:18:24.000000000 +0200 +++ 11.3/mysql-cluster/mysql-cluster.changes 2011-07-04 09:09:22.000000000 +0200 @@ -1,0 +2,20 @@ +Tue Jun 28 14:49:54 UTC 2011 - [email protected] + +- updated to the current stable snapshot of MySQL Cluster 7.0 + - corresponds to the MySQL Cluster 7.0.25-7.0.26 + - fixes several security issues (bnc#676974) + - based on MySQL 5.1.56 + http://dev.mysql.com/doc/refman/5.1/en/mysql-cluster-news-7-0.html + +------------------------------------------------------------------- +Wed Sep 29 13:38:34 CEST 2010 - [email protected] + +- fixed init script to work on SELinux machines (bnc#635645) + +------------------------------------------------------------------- +Tue Aug 24 15:02:39 CEST 2010 - [email protected] + +- updated to MySQL Cluster 7.0.16 (based on MySQL 5.1.47), see + http://dev.mysql.com/doc/refman/5.1/en/mysql-cluster-news-5-1-47-ndb-7-0-16.html + +------------------------------------------------------------------- @@ -20 +40 @@ -- updated to the MySQL Cluster (7.0.13) +- updated to the MySQL Cluster 7.0.13 Package does not exist at destination yet. Using Fallback old-versions/11.3/all/mysql-cluster Destination is old-versions/11.3/UPDATES/all/mysql-cluster calling whatdependson for 11.3-i586 Old: ---- abi_test.patch mysql-5.1.23-vpath.patch mysql-5.1.33-safe-process-in-bin.patch mysql-cluster-7.0.13-undefined-operation.patch mysql-cluster-gpl-7.0.13.tar.bz2 New: ---- missing.txt missing_from_7.0.16.tar.bz2 mysql-5.1.45-safe-process-in-bin.patch mysql-5.1.47-strncat-overflow.patch mysql-cluster-7.0.16-bug46339.patch mysql-cluster-7.0.16-bug47924.patch mysql-cluster-7.0.16-bug54494.patch mysql-cluster-7.0.16-bug55531.patch mysql-cluster-7.0.16-bug55627.patch mysql-cluster-7.0.25_20110627.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ mysql-cluster.spec ++++++ --- /var/tmp/diff_new_pack.U42IFf/_old 2011-07-06 18:15:52.000000000 +0200 +++ /var/tmp/diff_new_pack.U42IFf/_new 2011-07-06 18:15:52.000000000 +0200 @@ -1,7 +1,7 @@ # -# spec file for package mysql-cluster (Version 7.0.13) +# spec file for package mysql-cluster # -# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -20,7 +20,7 @@ # Few definitions which will alter build %define prefered 0 %define cluster 1 -%define srv_vers 5.1.41 +%define srv_vers 5.1.56 %if %{?rel:0}%{!?rel:1} %define rel 1 @@ -31,18 +31,21 @@ Name: mysql-cluster Summary: A True Multiuser, Multithreaded SQL Database Server -Version: 7.0.13 -Release: 2 +Version: 7.0.25 +Release: 0.<RELEASE2> License: GPLv2 ; with additional permissions: EXCEPTIONS-CLIENT Group: Productivity/Databases/Servers Url: http://www.mysql.com -Source: mysql-cluster-gpl-%{version}.tar.bz2 +Source: mysql-cluster-%{version}_20110627.tar.bz2 Source2: baselibs.conf Source3: README.debug Source4: suse-test-run Source5: mysql.SuSEfirewall2 Source7: rc.mysql-multi Source8: README.SuSE +Source9: missing.txt +# tar -cjf missing_from_7.0.16.tar.bz2 -C mysql-cluster-gpl-7.0.16 $(cat missing.txt) +Source10: missing_from_7.0.16.tar.bz2 # Polishing default config file Patch2: mysql-cnf.patch Patch3: mysql-multi-configuration.patch @@ -56,9 +59,6 @@ Patch8: mysqld_multi.patch # Disables failure on one test during update and improves error message during update a little bit Patch13: mysql_upgrade-exit-status.patch -# Check in configure script for readline uses variable instead of relative path now -# (maybe safer, shouldn't affect functionality, maybe it can be dropped) -Patch15: mysql-5.1.23-vpath.patch # Changes pkglib_LIBRARIES into lib_LIBRARIES in libmysql Patch18: libmysql-no-pkglibdir.patch # Adds option -avoid-version to LDFLAGS for plugins blackhole, archive and example @@ -75,7 +75,7 @@ # PATCH-FIX-SUSE mysql-5.1.32-myslq-test.patch [email protected] -- installs tests into datadir not into prefix Patch28: mysql-cluster-7.0.9-myslq-test.patch # PATCH-FIX-SUSE mysql-5.1.33-safe-process-in-bin.patch [] [email protected] -- this will let us move one binary to /usr/bin instead of /usr/share/mysql-test/... -Patch30: mysql-5.1.33-safe-process-in-bin.patch +Patch30: mysql-5.1.45-safe-process-in-bin.patch # PATCH-FIX-SUSE mysql-5.1.33-ssl-lib64-macro.patch [] [email protected] -- search for ssl libraries also in lib64 Patch31: mysql-5.1.33-ssl-lib64-macro.patch # PATCH-FIX-SUSE mysql-5.1.35-test-utf8.patch [] [email protected] -- we use utf-8 by default which produces different output with few tests @@ -88,20 +88,27 @@ Patch38: mysql-5.1.36-hotcopy.patch # PATCH-FIX-UPSTREAM mysql_config.patch [ upstream#39175, bnc#420313 ] [email protected] -- Fix linking options. Patch39: mysql_config.patch -Patch45: abi_test.patch +#Patch45: abi_test.patch Patch46: mysql-cluster-7.0.9-libmysqld.patch -Patch47: mysql-cluster-7.0.13-undefined-operation.patch +#Patch47: mysql-cluster-7.0.13-undefined-operation.patch +Patch48: mysql-5.1.47-strncat-overflow.patch +Patch49: mysql-cluster-7.0.16-bug46339.patch +Patch50: mysql-cluster-7.0.16-bug54494.patch +Patch51: mysql-cluster-7.0.16-bug55531.patch +Patch52: mysql-cluster-7.0.16-bug55627.patch +Patch53: mysql-cluster-7.0.16-bug47924.patch +#Patch54: mysql-cluster-7.0.16-bug55458.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build %if 0%{?suse_version} PreReq: pwdutils %else -PreReq: /usr/sbin/useradd /usr/sbin/usermod /usr/sbin/groupadd +#PreReq: /usr/sbin/useradd /usr/sbin/usermod /usr/sbin/groupadd %endif -PreReq: coreutils sed grep +#PreReq: coreutils sed grep %if 0%{?suse_version} PreReq: %install_info_prereq %insserv_prereq %endif -BuildRequires: gcc-c++ ncurses-devel openssl-devel procps readline-devel zlib-devel +BuildRequires: bison gcc-c++ ncurses-devel openssl-devel procps readline-devel zlib-devel %if 0%{?suse_version} BuildRequires: pwdutils tcpd-devel %endif @@ -440,7 +447,7 @@ %prep #------------------------------------------------------------------------------- -%setup -q -n mysql-cluster-gpl-%{version} +%setup -q -n mysql-cluster-7.0 -a 10 cp %_sourcedir/README.SuSE . cp %_sourcedir/suse-test-run . %patch2 @@ -450,7 +457,6 @@ %patch7 %patch8 %patch13 -%patch15 %patch18 %patch19 %patch23 @@ -464,9 +470,16 @@ %patch37 %patch38 %patch39 -%patch45 +#%patch45 %patch46 -%patch47 -p1 +#%patch47 -p1 +%patch48 +#%patch49 -p1 +#%patch50 +#%patch51 +#%patch52 +#%patch53 -p1 +#%patch54 -p1 # remove unneeded manpages ('make install' basically installs everything under # man/*) rm -f man/mysqlman.1 # dummy fallback manpage @@ -500,6 +513,7 @@ BuildMySQL() { # The --enable-assembler simply does nothing on systems that do not # support assembler speedups. + touch sql/share/errmsg.txt suffix="$1"; shift mkdir _build$suffix pushd _build$suffix @@ -539,12 +553,19 @@ # --with-raid # benchdir does not fit in above model. Fix when we make a separate package make %{?jobs:-j%jobs} + make -C extra %{?jobs:-j%jobs} nm --numeric-sort sql/mysqld > sql/mysqld.sym # needed for make check, which is not VPATH aware # copy the files unconditionally so that manual 'make check' after # the build works, too + mkdir -p mysql-test cp -a ../mysql-test/* mysql-test/ - cp -a ../sql/share/{english,charsets} sql/share/ + cp -a ../sql/share/charsets sql/share/ + if [ -d sql/share/english ]; then + cp -r sql/share ../sql + else + cp -r ../sql/share/english sql/share/ + fi cp -a ../scripts/*.sql scripts/ %if %{?_with_testsuite:1}0 pushd mysql-test; perl ./mysql-test-run.pl --force; popd @@ -580,6 +601,7 @@ install -m 644 _build-debug/sql/mysqld.sym %buildroot%_libdir/mysql/mysqld-debug.sym # install the client, extra tools, libraries and the standard server make -C _build install DESTDIR=%buildroot benchdir_root=/usr/share/ +# mv %buildroot/usr/mysql-test %buildroot/usr/share/ install -m 644 _build/sql/mysqld.sym %buildroot%_libdir/mysql/mysqld.sym # remove most static libs (FIXME: don't build them at all...) rm -f %buildroot%_libdir/libmysqlclient*a @@ -623,10 +645,10 @@ filelist ndbd ndbmtd ndbd_redo_log_reader >mysql-ndb-storage.files filelist ndb_mgmd >mysql-ndb-management.files filelist ndb_{config,desc,error_reporter,mgm,print_backup_file,print_schema_file,print_sys_file,restore,select_all,select_count,show_tables,size.pl,test_platform,waiter} >mysql-ndb-tools.files -filelist ndb_{cpcd,delete_all,drop_index,drop_table} >mysql-ndb-extra.files +filelist ndb_{cpcd,delete_all,drop_index,drop_table,index_stat,print_file} >mysql-ndb-extra.files ### files not installed by make install # Create directory structure -DOCS=(COPYING README EXCEPTIONS-CLIENT %_sourcedir/README.debug %_sourcedir/README.SuSE) +DOCS=(COPYING README %_sourcedir/README.debug %_sourcedir/README.SuSE) DOCDIR=%buildroot%_defaultdocdir/%name install -d -m 755 ${DOCDIR} install -d -m 755 %buildroot/etc/logrotate.d ++++++ missing.txt ++++++ scripts/mysql_fix_privilege_tables.sql scripts/mysql_fix_privilege_tables_sql.c man/mysql-test-run.pl.1 man/mysql-stress-test.pl.1 sql/share/polish sql/share/danish sql/share/romanian sql/share/serbian sql/share/german sql/share/czech sql/share/dutch sql/share/greek sql/share/french sql/share/portuguese sql/share/japanese sql/share/italian sql/share/hungarian sql/share/swedish sql/share/korean sql/share/slovak sql/share/english sql/share/norwegian sql/share/estonian sql/share/russian sql/share/norwegian-ny sql/share/spanish sql/share/ukrainian ++++++ mysql-5.1.35-test-variables-big.patch ++++++ --- /var/tmp/diff_new_pack.U42IFf/_old 2011-07-06 18:15:52.000000000 +0200 +++ /var/tmp/diff_new_pack.U42IFf/_new 2011-07-06 18:15:52.000000000 +0200 @@ -5,23 +5,23 @@ @@ -38,18 +38,18 @@ --disable_warnings SET SESSION transaction_prealloc_size=1024*1024*1024*1; - --replace_column 1 <Id> 6 <Time> + --replace_column 1 <Id> 3 <Host> 6 <Time> -SHOW PROCESSLIST; +SHOW VARIABLES WHERE VARIABLE_NAME='transaction_prealloc_size'; SET SESSION transaction_prealloc_size=1024*1024*1024*2; - --replace_column 1 <Id> 6 <Time> + --replace_column 1 <Id> 3 <Host> 6 <Time> -SHOW PROCESSLIST; +SHOW VARIABLES WHERE VARIABLE_NAME='transaction_prealloc_size'; SET SESSION transaction_prealloc_size=1024*1024*1024*3; - --replace_column 1 <Id> 6 <Time> + --replace_column 1 <Id> 3 <Host> 6 <Time> -SHOW PROCESSLIST; +SHOW VARIABLES WHERE VARIABLE_NAME='transaction_prealloc_size'; SET SESSION transaction_prealloc_size=1024*1024*1024*4; - --replace_column 1 <Id> 6 <Time> + --replace_column 1 <Id> 3 <Host> 6 <Time> -SHOW PROCESSLIST; +SHOW VARIABLES WHERE VARIABLE_NAME='transaction_prealloc_size'; SET SESSION transaction_prealloc_size=1024*1024*1024*5; - --replace_column 1 <Id> 6 <Time> + --replace_column 1 <Id> 3 <Host> 6 <Time> -SHOW PROCESSLIST; +SHOW VARIABLES WHERE VARIABLE_NAME='transaction_prealloc_size'; --enable_warnings ++++++ mysql-5.1.33-safe-process-in-bin.patch -> mysql-5.1.45-safe-process-in-bin.patch ++++++ --- old-versions/11.3/all/mysql-cluster/mysql-5.1.33-safe-process-in-bin.patch 2009-04-03 16:13:31.000000000 +0200 +++ 11.3/mysql-cluster/mysql-5.1.45-safe-process-in-bin.patch 2010-04-11 21:13:40.000000000 +0200 @@ -1,20 +1,22 @@ ---- mysql-test/lib/My/SafeProcess.pm 2009-04-03 15:14:38.000000000 +0200 -+++ mysql-test/lib/My/SafeProcess.pm 2009-03-13 22:49:26.000000000 +0100 -@@ -86,7 +86,7 @@ - my $safe_kill; - if (IS_WIN32PERL or IS_CYGWIN){ - # Use my_safe_process.exe -+ my $exe= my_find_bin(".", ["../../bin","lib/My/SafeProcess", "My/SafeProcess"], -- my $exe= my_find_bin(".", ["lib/My/SafeProcess", "My/SafeProcess"], - "my_safe_process"); - push(@safe_process_cmd, $exe); +Index: mysql-test/lib/My/SafeProcess.pm +=================================================================== +--- mysql-test/lib/My/SafeProcess.pm.orig ++++ mysql-test/lib/My/SafeProcess.pm +@@ -89,7 +89,7 @@ sub find_bin { + if (IS_WIN32PERL or IS_CYGWIN) + { + # Use my_safe_process.exe +- my $exe= my_find_bin(".", ["lib/My/SafeProcess", "My/SafeProcess"], ++ my $exe= my_find_bin(".", ["../../bin", "lib/My/SafeProcess", "My/SafeProcess"], + "my_safe_process"); + push(@safe_process_cmd, $exe); -@@ -96,7 +96,7 @@ - else - { - # Use my_safe_process -+ my $exe= my_find_bin(".", ["../../bin", "lib/My/SafeProcess", "My/SafeProcess"], -- my $exe= my_find_bin(".", ["lib/My/SafeProcess", "My/SafeProcess"], - "my_safe_process"); - push(@safe_process_cmd, $exe); - } +@@ -99,7 +99,7 @@ sub find_bin { + else + { + # Use my_safe_process +- my $exe= my_find_bin(".", ["lib/My/SafeProcess", "My/SafeProcess"], ++ my $exe= my_find_bin(".", ["../../bin", "lib/My/SafeProcess", "My/SafeProcess"], + "my_safe_process"); + push(@safe_process_cmd, $exe); + } ++++++ mysql-5.1.47-strncat-overflow.patch ++++++ PATCH-P0-FIX-UPSTREAM: Fix possible buffer overflow strncat function is used with n not depending on current length of string we are appending to. Result might be buffer overflow. Maintainer: Michal Hrusecky <[email protected]> Index: mysys/mf_loadpath.c =================================================================== --- mysys/mf_loadpath.c.orig +++ mysys/mf_loadpath.c @@ -45,7 +45,7 @@ char * my_load_path(char * to, const cha if (is_cur) is_cur=2; /* Remove current dir */ if (! my_getwd(buff,(uint) (FN_REFLEN-strlen(path)+is_cur),MYF(0))) - VOID(strncat(buff, path+is_cur, FN_REFLEN-1)); + VOID(strncat(buff, path+is_cur, FN_REFLEN-1-strlen(buff))); else VOID(strnmov(buff, path, FN_REFLEN)); /* Return org file name */ } ++++++ mysql-cluster-7.0.16-bug46339.patch ++++++ === modified file 'mysql-test/r/merge.result' --- a/mysql-test/r/merge.result 2010-03-19 06:01:02 +0000 +++ b/mysql-test/r/merge.result 2010-04-26 13:44:10 +0000 @@ -2298,4 +2298,45 @@ t2 WHERE b SOUNDS LIKE e AND d = 1; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables DROP TABLE t2, t1; +# +# Bug#46339 - crash on REPAIR TABLE merge table USE_FRM +# +DROP TABLE IF EXISTS m1, t1; +CREATE TABLE t1 (c1 INT) ENGINE=MYISAM; +CREATE TABLE m1 (c1 INT) ENGINE=MRG_MyISAM UNION=(t1) INSERT_METHOD=LAST; +LOCK TABLE m1 READ; +REPAIR TABLE m1 USE_FRM; +Table Op Msg_type Msg_text +test.m1 repair note The storage engine for the table doesn't support repair +UNLOCK TABLES; +REPAIR TABLE m1 USE_FRM; +Table Op Msg_type Msg_text +test.m1 repair note The storage engine for the table doesn't support repair +DROP TABLE m1,t1; +CREATE TABLE m1 (f1 BIGINT) ENGINE=MRG_MyISAM UNION(t1); +REPAIR TABLE m1 USE_FRM; +Table Op Msg_type Msg_text +test.m1 repair Error Can't open table +test.m1 repair error Corrupt +CREATE TABLE t1 (f1 BIGINT) ENGINE = MyISAM; +REPAIR TABLE m1 USE_FRM; +Table Op Msg_type Msg_text +test.m1 repair note The storage engine for the table doesn't support repair +REPAIR TABLE m1; +Table Op Msg_type Msg_text +test.m1 repair note The storage engine for the table doesn't support repair +DROP TABLE m1, t1; +CREATE TEMPORARY TABLE m1 (f1 BIGINT) ENGINE=MRG_MyISAM UNION(t1); +REPAIR TABLE m1 USE_FRM; +Table Op Msg_type Msg_text +test.m1 repair Error Table 'test.m1' doesn't exist +test.m1 repair error Corrupt +CREATE TEMPORARY TABLE t1 (f1 BIGINT) ENGINE=MyISAM; +REPAIR TABLE m1 USE_FRM; +Table Op Msg_type Msg_text +m1 repair error Cannot repair temporary table from .frm file +REPAIR TABLE m1; +Table Op Msg_type Msg_text +test.m1 repair note The storage engine for the table doesn't support repair +DROP TABLE m1, t1; End of 5.1 tests === modified file 'mysql-test/t/merge.test' --- a/mysql-test/t/merge.test 2010-03-19 06:01:02 +0000 +++ b/mysql-test/t/merge.test 2010-04-26 13:44:10 +0000 @@ -1705,4 +1705,82 @@ t2 WHERE b SOUNDS LIKE e AND d = 1; DROP TABLE t2, t1; +--echo # +--echo # Bug#46339 - crash on REPAIR TABLE merge table USE_FRM +--echo # +--disable_warnings +DROP TABLE IF EXISTS m1, t1; +--enable_warnings +# +# Test derived from a proposal of Shane Bester. +# +CREATE TABLE t1 (c1 INT) ENGINE=MYISAM; +CREATE TABLE m1 (c1 INT) ENGINE=MRG_MyISAM UNION=(t1) INSERT_METHOD=LAST; +# +# REPAIR ... USE_FRM with LOCK TABLES. +# +LOCK TABLE m1 READ; +REPAIR TABLE m1 USE_FRM; +UNLOCK TABLES; +# +# REPAIR ... USE_FRM without LOCK TABLES. +# +# This statement crashed the server (Bug#46339). +# +REPAIR TABLE m1 USE_FRM; +# +DROP TABLE m1,t1; +# +# Test derived from a proposal of Matthias Leich. +# +# Base table is missing. +# +CREATE TABLE m1 (f1 BIGINT) ENGINE=MRG_MyISAM UNION(t1); +# +# This statement crashed the server (Bug#46339). +# +REPAIR TABLE m1 USE_FRM; +# +# Create base table. +# +CREATE TABLE t1 (f1 BIGINT) ENGINE = MyISAM; +# +# This statement crashed the server (Bug#46339). +# +REPAIR TABLE m1 USE_FRM; +# +# Normal repair as reference. +# +REPAIR TABLE m1; +# +# Cleanup. +# +DROP TABLE m1, t1; +# +# Same with temporary tables. +# +# Base table is missing. +# +CREATE TEMPORARY TABLE m1 (f1 BIGINT) ENGINE=MRG_MyISAM UNION(t1); +# +# This statement crashed the server (Bug#46339). +# +REPAIR TABLE m1 USE_FRM; +# +# Create base table. +# +CREATE TEMPORARY TABLE t1 (f1 BIGINT) ENGINE=MyISAM; +# +# This statement crashed the server (Bug#46339). +# +REPAIR TABLE m1 USE_FRM; +# +# Normal repair as reference. +# +REPAIR TABLE m1; +# +# Cleanup. +# +DROP TABLE m1, t1; + --echo End of 5.1 tests === modified file 'sql/sql_table.cc' --- a/sql/sql_table.cc 2010-03-17 14:18:46 +0000 +++ b/sql/sql_table.cc 2010-04-26 13:44:10 +0000 @@ -4384,9 +4384,6 @@ static int prepare_for_repair(THD *thd, pthread_mutex_unlock(&LOCK_open); } - /* A MERGE table must not come here. */ - DBUG_ASSERT(!table->child_l); - /* REPAIR TABLE ... USE_FRM for temporary tables makes little sense. */ ++++++ mysql-cluster-7.0.16-bug47924.patch ++++++ 3331 Dmitry Shulga 2010-11-08 [merge] Auto-merge from mysql-5.5-bugteam for bug#47924. modified: mysql-test/r/log_tables.result mysql-test/t/log_tables.test sql/sql_rename.cc === modified file 'mysql-test/r/log_tables.result' --- a/mysql-test/r/log_tables.result 2009-12-22 11:02:52 +0000 +++ b/mysql-test/r/log_tables.result 2010-11-07 18:06:22 +0000 @@ -896,6 +896,16 @@ TIMESTAMP 1 1 SELECT SQL_NO_CACHE 'Bug#3 TIMESTAMP 1 1 SELECT SQL_NO_CACHE 'Bug#31700 - PK', f1,f2,f3,SLEEP(1.1) FROM t1 WHERE f1=2 DROP TABLE t1; TRUNCATE TABLE mysql.slow_log; +use mysql; +drop table if exists renamed_general_log; +drop table if exists renamed_slow_log; +RENAME TABLE general_log TO renamed_general_log; +ERROR HY000: Cannot rename 'general_log'. When logging enabled, rename to/from log table must rename two tables: the log table to an archive table and another table back to 'general_log' +RENAME TABLE slow_log TO renamed_slow_log; +ERROR HY000: Cannot rename 'slow_log'. When logging enabled, rename to/from log table must rename two tables: the log table to an archive table and another table back to 'slow_log' +use test; +flush tables with read lock; +unlock tables; SET @@session.long_query_time= @old_long_query_time; SET @@global.log_output= @old_log_output; SET @@global.slow_query_log= @old_slow_query_log; === modified file 'mysql-test/t/log_tables.test' --- a/mysql-test/t/log_tables.test 2009-11-24 11:08:04 +0000 +++ b/mysql-test/t/log_tables.test 2010-11-07 18:06:22 +0000 @@ -1034,6 +1034,25 @@ DROP TABLE t1; TRUNCATE TABLE mysql.slow_log; +# +# Bug #47924 main.log_tables times out sporadically +# + +use mysql; +# Should result in error +--disable_warnings +drop table if exists renamed_general_log; +drop table if exists renamed_slow_log; +--enable_warnings +--error ER_CANT_RENAME_LOG_TABLE +RENAME TABLE general_log TO renamed_general_log; +--error ER_CANT_RENAME_LOG_TABLE +RENAME TABLE slow_log TO renamed_slow_log; + +use test; +flush tables with read lock; +unlock tables; + SET @@session.long_query_time= @old_long_query_time; SET @@global.log_output= @old_log_output; === modified file 'sql/sql_rename.cc' --- a/sql/sql_rename.cc 2010-10-01 10:23:16 +0000 +++ b/sql/sql_rename.cc 2010-11-08 10:48:08 +0000 @@ -108,7 +108,7 @@ bool mysql_rename_tables(THD *thd, TABLE */ my_error(ER_CANT_RENAME_LOG_TABLE, MYF(0), ren_table->table_name, ren_table->table_name); - DBUG_RETURN(1); + goto err; } } else @@ -121,7 +121,7 @@ bool mysql_rename_tables(THD *thd, TABLE */ my_error(ER_CANT_RENAME_LOG_TABLE, MYF(0), ren_table->table_name, ren_table->table_name); - DBUG_RETURN(1); + goto err; } else { @@ -139,7 +139,7 @@ bool mysql_rename_tables(THD *thd, TABLE else my_error(ER_CANT_RENAME_LOG_TABLE, MYF(0), rename_log_table[1], rename_log_table[1]); - DBUG_RETURN(1); + goto err; } } ++++++ mysql-cluster-7.0.16-bug54494.patch ++++++ Index: mysql-test/r/ps.result =================================================================== --- mysql-test/r/ps.result.orig +++ mysql-test/r/ps.result @@ -3001,4 +3001,24 @@ EXECUTE stmt; 1 DEALLOCATE PREPARE stmt; DROP TABLE t1; +# +# Bug#54494 crash with explain extended and prepared statements +# +CREATE TABLE t1(a INT); +INSERT INTO t1 VALUES (1),(2); +PREPARE stmt FROM 'EXPLAIN EXTENDED SELECT 1 FROM t1 RIGHT JOIN t1 t2 ON 1'; +EXECUTE stmt; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t2 ALL NULL NULL NULL NULL 2 100.00 +1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 +Warnings: +Note 1003 select 1 AS `1` from `test`.`t1` `t2` left join `test`.`t1` on(1) where 1 +EXECUTE stmt; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t2 ALL NULL NULL NULL NULL 2 100.00 +1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 +Warnings: +Note 1003 select 1 AS `1` from `test`.`t1` `t2` left join `test`.`t1` on(1) where 1 +DEALLOCATE PREPARE stmt; +DROP TABLE t1; End of 5.1 tests. Index: mysql-test/t/ps.test =================================================================== --- mysql-test/t/ps.test.orig +++ mysql-test/t/ps.test @@ -3079,4 +3079,15 @@ EXECUTE stmt; DEALLOCATE PREPARE stmt; DROP TABLE t1; +--echo # +--echo # Bug#54494 crash with explain extended and prepared statements +--echo # +CREATE TABLE t1(a INT); +INSERT INTO t1 VALUES (1),(2); +PREPARE stmt FROM 'EXPLAIN EXTENDED SELECT 1 FROM t1 RIGHT JOIN t1 t2 ON 1'; +EXECUTE stmt; +EXECUTE stmt; +DEALLOCATE PREPARE stmt; +DROP TABLE t1; + --echo End of 5.1 tests. ++++++ mysql-cluster-7.0.16-bug55531.patch ++++++ Index: sql/field.cc =================================================================== --- sql/field.cc.orig +++ sql/field.cc @@ -4599,7 +4599,7 @@ String *Field_double::val_str(String *va #endif doubleget(nr,ptr); - uint to_length=max(field_length, DOUBLE_TO_STRING_CONVERSION_BUFFER_SIZE); + uint to_length=DOUBLE_TO_STRING_CONVERSION_BUFFER_SIZE; val_buffer->alloc(to_length); char *to=(char*) val_buffer->ptr(); Index: sql/item_geofunc.cc =================================================================== --- sql/item_geofunc.cc.orig +++ sql/item_geofunc.cc @@ -407,6 +407,10 @@ String *Item_func_spatial_collection::va for (i= 0; i < arg_count; ++i) { + if (args[i]->field_type() != MYSQL_TYPE_GEOMETRY) + { + goto err; + } String *res= args[i]->val_str(&arg_value); uint32 len; if (args[i]->null_value || ((len= res->length()) < WKB_HEADER_SIZE)) Index: sql/sql_string.cc =================================================================== --- sql/sql_string.cc.orig +++ sql/sql_string.cc @@ -56,7 +56,8 @@ bool String::real_alloc(uint32 arg_lengt Alloced_length=arg_length; alloced=1; } - Ptr[0]=0; + if(Ptr) + Ptr[0]=0; return FALSE; } ++++++ mysql-cluster-7.0.16-bug55627.patch ++++++ Index: storage/innobase/ut/ut0mem.c =================================================================== --- storage/innobase/ut/ut0mem.c.orig +++ storage/innobase/ut/ut0mem.c @@ -230,13 +230,16 @@ ut_test_malloc( } /************************************************************************** -Frees a memory block allocated with ut_malloc. */ +Frees a memory block allocated with ut_malloc. Freeing a NULL pointer is +a nop. */ void ut_free( /*====*/ void* ptr) /* in, own: memory block */ { + if(ptr==NULL) + return; ut_mem_block_t* block; block = (ut_mem_block_t*)((byte*)ptr - sizeof(ut_mem_block_t)); ++++++ mysql-cluster-7.0.9-myslq-test.patch ++++++ --- /var/tmp/diff_new_pack.U42IFf/_old 2011-07-06 18:15:52.000000000 +0200 +++ /var/tmp/diff_new_pack.U42IFf/_new 2011-07-06 18:15:52.000000000 +0200 @@ -28,12 +28,12 @@ =================================================================== --- mysql-test/lib/mtr_cases.pm.orig +++ mysql-test/lib/mtr_cases.pm -@@ -243,7 +243,10 @@ sub collect_one_suite($) - ["mysql-test/suite", - "mysql-test", +@@ -271,7 +271,10 @@ sub collect_one_suite($) + ["suite", + ".", # Look in storage engine specific suite dirs -- "storage/*/mysql-test-suites" -+ "storage/*/mysql-test-suites", +- "../storage/*/mysql-test-suites" ++ "../storage/*/mysql-test-suites", + # Look in subdirectories too + "*/mysql-test/suite", + "*/mysql-test" ++++++ mysql-group.patch ++++++ --- /var/tmp/diff_new_pack.U42IFf/_old 2011-07-06 18:15:52.000000000 +0200 +++ /var/tmp/diff_new_pack.U42IFf/_new 2011-07-06 18:15:52.000000000 +0200 @@ -1,8 +1,15 @@ +PATCH-P0-FEATURE-UPSTREAM: Adds group option + +This patch let's you specify not only user to use but also group that MySQL +should use. + +Maintainer: Michal Hrusecky <[email protected]> + Index: configure.in =================================================================== --- configure.in.orig +++ configure.in -@@ -772,6 +772,14 @@ AC_ARG_WITH(mysqld-user, +@@ -793,6 +793,14 @@ AC_ARG_WITH(mysqld-user, [ MYSQLD_USER=mysql ] ) AC_SUBST(MYSQLD_USER) @@ -17,132 +24,3 @@ # If we should allow LOAD DATA LOCAL AC_MSG_CHECKING(If we should should enable LOAD DATA LOCAL by default) -Index: scripts/Makefile.am -=================================================================== ---- scripts/Makefile.am.orig -+++ scripts/Makefile.am -@@ -185,6 +185,7 @@ SUFFIXES = .sh - -e 's!@''TARGET_LINUX''@!@TARGET_LINUX@!' \ - -e "s!@""CONF_COMMAND""@!@CONF_COMMAND@!" \ - -e 's!@''MYSQLD_USER''@!@MYSQLD_USER@!' \ -+ -e 's!@''MYSQLD_GROUP''@!@MYSQLD_GROUP@!' \ - -e 's!@''STATIC_NSS_FLAGS''@!@STATIC_NSS_FLAGS@!' \ - -e 's!@''NON_THREADED_LIBS''@!@NON_THREADED_LIBS@!' \ - -e 's!@''ZLIB_DEPS''@!@ZLIB_DEPS@!' \ -Index: scripts/mysqld_safe.sh -=================================================================== ---- scripts/mysqld_safe.sh.orig -+++ scripts/mysqld_safe.sh -@@ -19,6 +19,7 @@ logging=init - want_syslog=0 - syslog_tag= - user='@MYSQLD_USER@' -+group='@MYSQLD_GROUP@' - pid_file= - err_log= - -@@ -162,6 +163,7 @@ parse_arguments() { - --datadir=*) DATADIR="$val" ;; - --pid-file=*) pid_file="$val" ;; - --user=*) user="$val"; SET_USER=1 ;; -+ --group=*) group="$val"; SET_USER=1 ;; - - # these might have been set in a [mysqld_safe] section of my.cnf - # they are added to mysqld command line to override settings from my.cnf -@@ -388,11 +390,17 @@ then - if test "$user" != "root" -o $SET_USER = 1 - then - USER_OPTION="--user=$user" -+ GROUP_OPTION="--group=$group" - fi - # Change the err log to the right user, if it is in use - if [ $want_syslog -eq 0 ]; then - touch "$err_log" -- chown $user "$err_log" -+ if [ "$user" -a "$group" ]; then -+ chown $user:$group $err_log -+ else -+ [ "$user" ] && chown $user $err_log -+ [ "$group" ] && chgrp $group $err_log -+ fi - fi - if test -n "$open_files" - then -@@ -407,7 +415,12 @@ mysql_unix_port_dir=`dirname $safe_mysql - if [ ! -d $mysql_unix_port_dir ] - then - mkdir $mysql_unix_port_dir -- chown $user $mysql_unix_port_dir -+ if [ "$user" -a "$group" ]; then -+ chown $user:$group $mysql_unix_port_dir -+ else -+ [ "$user" ] && chown $user $mysql_unix_port_dir -+ [ "$group" ] && chgrp $group $mysql_unix_port_dir -+ fi - chmod 755 $mysql_unix_port_dir - fi - -Index: scripts/mysql_install_db.sh -=================================================================== ---- scripts/mysql_install_db.sh.orig -+++ scripts/mysql_install_db.sh -@@ -28,6 +28,7 @@ args="" - defaults="" - mysqld_opt="" - user="" -+group="" - - force=0 - in_rpm=0 -@@ -63,6 +64,11 @@ Usage: $0 [OPTIONS] - user. You must be root to use this option. By default - mysqld runs using your current login name and files and - directories that it creates will be owned by you. -+ --group=group_name The login group to use for running mysqld. Files and -+ directories created by mysqld will be owned by this -+ group. You must be root to use this option. By default -+ mysqld runs using your current group and files and -+ directories that it creates will be owned by you. - - All other options are passed to the mysqld program - -@@ -103,11 +109,11 @@ parse_arguments() - --builddir=*) builddir=`parse_arg "$arg"` ;; - --srcdir=*) srcdir=`parse_arg "$arg"` ;; - --ldata=*|--datadir=*) ldata=`parse_arg "$arg"` ;; -- --user=*) - # Note that the user will be passed to mysqld so that it runs - # as 'user' (crucial e.g. if log-bin=/some_other_path/ - # where a chown of datadir won't help) -- user=`parse_arg "$arg"` ;; -+ --user=*) user=`parse_arg "$arg"` ;; -+ --group=*) group=`parse_arg "$arg"` ;; - --skip-name-resolve) ip_only=1 ;; - --verbose) verbose=1 ;; # Obsolete - --rpm) in_rpm=1 ;; -@@ -360,7 +366,12 @@ do - fi - if test -w / -a ! -z "$user" - then -- chown $user $dir -+ if test -z "$group" -+ then -+ chown $user $dir -+ else -+ chown $user:$group $dir -+ fi - fi - done - -@@ -369,6 +380,11 @@ then - args="$args --user=$user" - fi - -+if test -n "$group" -+then -+ args="$args --group=$group" -+fi -+ - # When doing a "cross bootstrap" install, no reference to the current - # host should be added to the system tables. So we filter out any - # lines which contain the current host name. ++++++ mysql-plugins-avoid-version.patch ++++++ --- /var/tmp/diff_new_pack.U42IFf/_old 2011-07-06 18:15:52.000000000 +0200 +++ /var/tmp/diff_new_pack.U42IFf/_new 2011-07-06 18:15:52.000000000 +0200 @@ -1,44 +1,97 @@ ---- storage/blackhole/Makefile.am +PATCH-P0-FEATURE-SUSE: Avoid version for all plugins + +Making all storage plugins unversioned. + +Maintainer: Michal Hrusecky <[email protected]> + +Index: storage/blackhole/Makefile.am +=================================================================== +--- storage/blackhole/Makefile.am.orig +++ storage/blackhole/Makefile.am -@@ -34,7 +34,7 @@ noinst_HEADERS = ha_blackhole.h +@@ -35,7 +35,7 @@ noinst_HEADERS = ha_blackhole.h EXTRA_LTLIBRARIES = ha_blackhole.la pkgplugin_LTLIBRARIES = @plugin_blackhole_shared_target@ -ha_blackhole_la_LDFLAGS=-module -rpath $(pkgplugindir) +ha_blackhole_la_LDFLAGS=-module -avoid-version -rpath $(pkgplugindir) - ha_blackhole_la_CXXFLAGS=$(AM_CFLAGS) -DMYSQL_DYNAMIC_PLUGIN + ha_blackhole_la_CXXFLAGS=$(AM_CXXFLAGS) -DMYSQL_DYNAMIC_PLUGIN ha_blackhole_la_CFLAGS= $(AM_CFLAGS) -DMYSQL_DYNAMIC_PLUGIN ha_blackhole_la_SOURCES=ha_blackhole.cc ---- storage/archive/Makefile.am +Index: storage/archive/Makefile.am +=================================================================== +--- storage/archive/Makefile.am.orig +++ storage/archive/Makefile.am -@@ -35,7 +35,7 @@ noinst_PROGRAMS = archive_test archive_r +@@ -36,7 +36,7 @@ noinst_PROGRAMS = archive_test archive_r EXTRA_LTLIBRARIES = ha_archive.la pkgplugin_LTLIBRARIES = @plugin_archive_shared_target@ -ha_archive_la_LDFLAGS = -module -rpath $(pkgplugindir) +ha_archive_la_LDFLAGS = -module -avoid-version -rpath $(pkgplugindir) - ha_archive_la_CXXFLAGS= $(AM_CFLAGS) -DMYSQL_DYNAMIC_PLUGIN + ha_archive_la_CXXFLAGS= $(AM_CXXFLAGS) -DMYSQL_DYNAMIC_PLUGIN ha_archive_la_CFLAGS = $(AM_CFLAGS) -DMYSQL_DYNAMIC_PLUGIN ha_archive_la_SOURCES = ha_archive.cc azio.c ---- storage/example/Makefile.am +Index: storage/example/Makefile.am +=================================================================== +--- storage/example/Makefile.am.orig +++ storage/example/Makefile.am -@@ -34,7 +34,7 @@ noinst_HEADERS = ha_example.h +@@ -35,7 +35,7 @@ noinst_HEADERS = ha_example.h EXTRA_LTLIBRARIES = ha_example.la pkgplugin_LTLIBRARIES = @plugin_example_shared_target@ -ha_example_la_LDFLAGS = -module -rpath $(pkgplugindir) +ha_example_la_LDFLAGS = -module -avoid-version -rpath $(pkgplugindir) - ha_example_la_CXXFLAGS= $(AM_CFLAGS) -DMYSQL_DYNAMIC_PLUGIN + ha_example_la_CXXFLAGS= $(AM_CXXFLAGS) -DMYSQL_DYNAMIC_PLUGIN ha_example_la_CFLAGS = $(AM_CFLAGS) -DMYSQL_DYNAMIC_PLUGIN ha_example_la_SOURCES = ha_example.cc ---- storage/federated/Makefile.am +Index: storage/federated/Makefile.am +=================================================================== +--- storage/federated/Makefile.am.orig +++ storage/federated/Makefile.am -@@ -34,7 +34,7 @@ +@@ -35,7 +35,7 @@ noinst_HEADERS = ha_federated.h EXTRA_LTLIBRARIES = ha_federated.la pkgplugin_LTLIBRARIES = @plugin_federated_shared_target@ -ha_federated_la_LDFLAGS = -module -rpath $(pkgplugindir) +ha_federated_la_LDFLAGS = -module -avoid-version -rpath $(pkgplugindir) - ha_federated_la_CXXFLAGS= $(AM_CFLAGS) -DMYSQL_DYNAMIC_PLUGIN + ha_federated_la_CXXFLAGS= $(AM_CXXFLAGS) -DMYSQL_DYNAMIC_PLUGIN ha_federated_la_CFLAGS = $(AM_CFLAGS) -DMYSQL_DYNAMIC_PLUGIN ha_federated_la_SOURCES = ha_federated.cc +Index: storage/innodb_plugin/Makefile.am +=================================================================== +--- storage/innodb_plugin/Makefile.am.orig ++++ storage/innodb_plugin/Makefile.am +@@ -331,7 +331,7 @@ libinnobase_a_CFLAGS= $(AM_CFLAGS) + EXTRA_LTLIBRARIES= ha_innodb_plugin.la + pkgplugin_LTLIBRARIES= @plugin_innodb_plugin_shared_target@ + +-ha_innodb_plugin_la_LDFLAGS= -module -rpath $(pkgplugindir) ++ha_innodb_plugin_la_LDFLAGS= -module -avoid-version -rpath $(pkgplugindir) + ha_innodb_plugin_la_CXXFLAGS= $(AM_CXXFLAGS) $(INNODB_DYNAMIC_CFLAGS) + ha_innodb_plugin_la_CFLAGS= $(AM_CFLAGS) $(INNODB_DYNAMIC_CFLAGS) + ha_innodb_plugin_la_SOURCES= $(libinnobase_a_SOURCES) +Index: plugin/daemon_example/Makefile.am +=================================================================== +--- plugin/daemon_example/Makefile.am.orig ++++ plugin/daemon_example/Makefile.am +@@ -27,7 +27,7 @@ INCLUDES = -I$(top_srcdir)/ + + EXTRA_LTLIBRARIES = libdaemon_example.la + pkgplugin_LTLIBRARIES = @plugin_daemon_example_shared_target@ +-libdaemon_example_la_LDFLAGS = -module -rpath $(pkgplugindir) ++libdaemon_example_la_LDFLAGS = -module -avoid-version -rpath $(pkgplugindir) + libdaemon_example_la_CXXFLAGS= $(AM_CXXFLAGS) -DMYSQL_DYNAMIC_PLUGIN + libdaemon_example_la_CFLAGS = $(AM_CFLAGS) -DMYSQL_DYNAMIC_PLUGIN + libdaemon_example_la_SOURCES = daemon_example.cc +Index: plugin/fulltext/Makefile.am +=================================================================== +--- plugin/fulltext/Makefile.am.orig ++++ plugin/fulltext/Makefile.am +@@ -21,7 +21,7 @@ INCLUDES= -I$(top_builddir)/include -I$( + #noinst_LTLIBRARIES= mypluglib.la + pkgplugin_LTLIBRARIES= mypluglib.la + mypluglib_la_SOURCES= plugin_example.c +-mypluglib_la_LDFLAGS= -module -rpath $(pkgplugindir) ++mypluglib_la_LDFLAGS= -module -avoid-version -rpath $(pkgplugindir) + mypluglib_la_CFLAGS= -DMYSQL_DYNAMIC_PLUGIN + + # Don't update the files from bitkeeper ++++++ rc.mysql-multi ++++++ --- /var/tmp/diff_new_pack.U42IFf/_old 2011-07-06 18:15:52.000000000 +0200 +++ /var/tmp/diff_new_pack.U42IFf/_new 2011-07-06 18:15:52.000000000 +0200 @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright (c) 1995-2010 SuSE Linux AG Nuernberg, Germany. +# Copyright (c) 1995-2011 SuSE Linux AG Nuernberg, Germany. # # Author: Lenz Grimmer # Maintainer: Michal Hrusecky <[email protected]> @@ -16,7 +16,7 @@ # Provides: mysql # Required-Start: $network $remote_fs # Required-Stop: $network $remote_fs -# Default-Start: 2 3 5 +# Default-Start: 3 5 # Default-Stop: # Short-Description: Start the MySQL database server # Description: Start the MySQL database server @@ -61,11 +61,13 @@ parse_arguments() { for arg do case "$arg" in - --basedir=*) basedir="`echo "$arg" | sed -e 's/^[^=]*=//'`" ;; - --datadir=*) datadir="`echo "$arg" | sed -e 's/^[^=]*=//'`" ;; - --pid-file=*) pid_file="`echo "$arg" | sed -e 's/^[^=]*=//'`" ;; - --socket=*) socket="`echo "$arg" | sed -e 's/^[^=]*=//'`" ;; - --log-error=*) log_error="`echo "$arg" | sed -e 's/^[^=]*=//'`" ;; + --basedir=*) basedir="`echo "$arg" | sed -e 's/^[^=]*=//'`" ;; + --datadir=*) datadir="`echo "$arg" | sed -e 's/^[^=]*=//'`" ;; + --pid-file=*) pid_file="`echo "$arg" | sed -e 's/^[^=]*=//'`" ;; + --socket=*) socket="`echo "$arg" | sed -e 's/^[^=]*=//'`" ;; + --log-error=*) log_error="`echo "$arg" | sed -e 's/^[^=]*=//'`" ;; + --user=*) mysql_daemon_user="`echo "$arg" | sed -e 's/^[^=]*=//'`" ;; + --group=*) mysql_daemon_group="`echo "$arg" | sed -e 's/^[^=]*=//'`" ;; esac done } @@ -251,8 +253,6 @@ datadir=/var/lib/mysql mysql_daemon_user=mysql mysql_daemon_group=mysql - mkdir -m 755 -p /var/run/mysql - chown $mysql_daemon_user:$mysql_daemon_group /var/run/mysql pid_file=/var/run/mysql/mysqld.pid socket=/var/run/mysql/mysql.sock print_defaults=/usr/bin/my_print_defaults @@ -267,7 +267,9 @@ log_query="${log_base}-query.log" parse_arguments `$print_defaults $defaults mysqld mysql_server` - export TMPDIR="`cat /var/run/mysql/tmpdir 2> /dev/null`" + mkdir -m 755 -p /var/run/mysql + chown $mysql_daemon_user:$mysql_daemon_group /var/run/mysql + export TEMPDIR="`cat /var/run/mysql/tmpdir 2> /dev/null`" # Safeguard (relative paths, core dumps..) cd "$basedir" @@ -279,14 +281,15 @@ rc_status -v && rc_exit # prepare tmp dir - if [ "$TMPDIR" ] && [ -d "$TMPDIR" ] && \ - [ "`ls -ld "$TMPDIR" | grep "^drwx------[[:blank:]]\+[0-9]\+[[:blank:]]\+$mysql_daemon_user[[:blank:]]\+$mysql_daemon_group[[:blank:]]\+.*"`" ]; then - rm -rf "$TMPDIR" + unset TMPDIR + if [ "$TEMPDIR" ] && [ -d "$TEMPDIR" ] && \ + [ "`ls -ld "$TEMPDIR" | grep "^drwx------[\\.\+]\?[[:blank:]]\+[0-9]\+[[:blank:]]\+$mysql_daemon_user[[:blank:]]\+$mysql_daemon_group[[:blank:]]\+.*"`" ]; then + rm -rf "$TEMPDIR" fi - TMPDIR="`mktemp -d -p /var/tmp mysql.XXXXXX | tee /var/run/mysql/tmpdir`" - [ -z "$TMPDIR" ] || chown "$mysql_daemon_user:$mysql_daemon_group" "$TMPDIR" - [ "`ls -ld "$TMPDIR" | grep "^drwx------[[:blank:]]\+[0-9]\+[[:blank:]]\+$mysql_daemon_user[[:blank:]]\+$mysql_daemon_group[[:blank:]]\+.*"`" ] || { - echo "Can't create secure $TMPDIR" + TEMPDIR="`mktemp -d -p /var/tmp mysql.XXXXXX | tee /var/run/mysql/tmpdir`" + [ -z "$TEMPDIR" ] || chown "$mysql_daemon_user:$mysql_daemon_group" "$TEMPDIR" + [ "`ls -ld "$TEMPDIR" | grep "^drwx------[\\.\+]\?[[:blank:]]\+[0-9]\+[[:blank:]]\+$mysql_daemon_user[[:blank:]]\+$mysql_daemon_group[[:blank:]]\+.*"`" ] || { + echo "Can't create secure $TEMPDIR" rc_failed; rc_status -v; rc_exit; } @@ -378,8 +381,9 @@ fi fi protected="`mktemp -d -p /var/tmp mysql-protected.XXXXXX | tee /var/run/mysql/protecteddir`" + export TMPDIR="$TEMPDIR" [ -z "$protected" ] || chown "$mysql_daemon_user:$mysql_daemon_group" "$protected" - [ "`ls -ld "$protected" | grep "^drwx------[[:blank:]]\+[0-9]\+[[:blank:]]\+$mysql_daemon_user[[:blank:]]\+$mysql_daemon_group[[:blank:]]\+.*"`" ] || { + [ "`ls -ld "$protected" | grep "^drwx------[\\.\+]\?[[:blank:]]\+[0-9]\+[[:blank:]]\+$mysql_daemon_user[[:blank:]]\+$mysql_daemon_group[[:blank:]]\+.*"`" ] || { echo "Can't create secure $protected" | tee -a "$log_upgrade" rc_failed; rc_status -v; rc_exit; } @@ -419,6 +423,7 @@ chmod 640 "$log_upgrade" fi + export TMPDIR="$TEMPDIR" echo -n "Starting service MySQL " @@ -443,9 +448,9 @@ stop) echo -n "Shutting down service MySQL " kill_mysql - if [ "$TMPDIR" ] && [ -d "$TMPDIR" ] && \ - [ "`ls -ld "$TMPDIR" | grep "^drwx------[[:blank:]]\+[0-9]\+[[:blank:]]\+$mysql_daemon_user[[:blank:]]\+$mysql_daemon_group[[:blank:]]\+.*"`" ]; then - rm -rf "$TMPDIR" + if [ "$TEMPDIR" ] && [ -d "$TEMPDIR" ] && \ + [ "`ls -ld "$TEMPDIR" | grep "^drwx------[\\.\+]\?[[:blank:]]\+[0-9]\+[[:blank:]]\+$mysql_daemon_user[[:blank:]]\+$mysql_daemon_group[[:blank:]]\+.*"`" ]; then + rm -rf "$TEMPDIR" fi # Remember status and be verbose rc_status -v ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
