Update to mysql 5.1.44; remove non-free documentation file.

This commit is contained in:
Tom Lane 2010-02-20 23:20:43 +00:00 committed by Michal Schorm
parent f8d32ebcee
commit ce2db75c8b
9 changed files with 873 additions and 583 deletions

View File

@ -1 +1 @@
mysql-5.1.43.tar.gz
mysql-5.1.44-nodocs.tar.gz

4
README.mysql-docs Normal file
View File

@ -0,0 +1,4 @@
The official MySQL documentation is not freely redistributable, so we cannot
include it in RHEL or Fedora. You can find it on-line at
http://dev.mysql.com/doc/

15
generate-tarball.sh Executable file
View File

@ -0,0 +1,15 @@
#!/bin/sh
VERSION=$1
rm -rf mysql-$VERSION
tar xfz mysql-$VERSION.tar.gz || exit 1
rm mysql-$VERSION/Docs/mysql.info
tar cfz mysql-$VERSION-nodocs.tar.gz mysql-$VERSION || exit 1
rm -rf mysql-$VERSION
exit 0

208
mysql-charset-bug.patch Normal file
View File

@ -0,0 +1,208 @@
Kluge solution for bug #566547: revert upstream's bad fix for their bug #45058.
diff -Naur mysql-5.1.44.orig/include/my_sys.h mysql-5.1.44/include/my_sys.h
--- mysql-5.1.44.orig/include/my_sys.h 2010-02-04 06:37:06.000000000 -0500
+++ mysql-5.1.44/include/my_sys.h 2010-02-19 23:13:48.000000000 -0500
@@ -951,6 +951,7 @@
CHARSET_INFO *default_cl,
CHARSET_INFO **cl);
+extern void free_charsets(void);
extern char *get_charsets_dir(char *buf);
extern my_bool my_charset_same(CHARSET_INFO *cs1, CHARSET_INFO *cs2);
extern my_bool init_compiled_charsets(myf flags);
diff -Naur mysql-5.1.44.orig/libmysql/libmysql.c mysql-5.1.44/libmysql/libmysql.c
--- mysql-5.1.44.orig/libmysql/libmysql.c 2010-02-04 06:37:07.000000000 -0500
+++ mysql-5.1.44/libmysql/libmysql.c 2010-02-19 23:13:48.000000000 -0500
@@ -211,6 +211,7 @@
}
else
{
+ free_charsets();
mysql_thread_end();
}
diff -Naur mysql-5.1.44.orig/mysys/charset.c mysql-5.1.44/mysys/charset.c
--- mysql-5.1.44.orig/mysys/charset.c 2010-02-04 06:38:50.000000000 -0500
+++ mysql-5.1.44/mysys/charset.c 2010-02-19 23:13:48.000000000 -0500
@@ -322,6 +321,7 @@
#define MY_CHARSET_INDEX "Index.xml"
const char *charsets_dir= NULL;
+static int charset_initialized=0;
static my_bool my_read_charset_file(const char *filename, myf myflags)
@@ -399,37 +399,63 @@
}
-static my_pthread_once_t charsets_initialized= MY_PTHREAD_ONCE_INIT;
-
-static void init_available_charsets(void)
+#ifdef __NETWARE__
+my_bool STDCALL init_available_charsets(myf myflags)
+#else
+static my_bool init_available_charsets(myf myflags)
+#endif
{
char fname[FN_REFLEN + sizeof(MY_CHARSET_INDEX)];
- CHARSET_INFO **cs;
-
- bzero(&all_charsets,sizeof(all_charsets));
- init_compiled_charsets(MYF(0));
-
- /* Copy compiled charsets */
- for (cs=all_charsets;
- cs < all_charsets+array_elements(all_charsets)-1 ;
- cs++)
+ my_bool error=FALSE;
+ /*
+ We have to use charset_initialized to not lock on THR_LOCK_charset
+ inside get_internal_charset...
+ */
+ if (!charset_initialized)
{
- if (*cs)
+ CHARSET_INFO **cs;
+ /*
+ To make things thread safe we are not allowing other threads to interfere
+ while we may changing the cs_info_table
+ */
+ pthread_mutex_lock(&THR_LOCK_charset);
+ if (!charset_initialized)
{
- if (cs[0]->ctype)
- if (init_state_maps(*cs))
- *cs= NULL;
+ bzero(&all_charsets,sizeof(all_charsets));
+ init_compiled_charsets(myflags);
+
+ /* Copy compiled charsets */
+ for (cs=all_charsets;
+ cs < all_charsets+array_elements(all_charsets)-1 ;
+ cs++)
+ {
+ if (*cs)
+ {
+ if (cs[0]->ctype)
+ if (init_state_maps(*cs))
+ *cs= NULL;
+ }
+ }
+
+ strmov(get_charsets_dir(fname), MY_CHARSET_INDEX);
+ error= my_read_charset_file(fname,myflags);
+ charset_initialized=1;
}
+ pthread_mutex_unlock(&THR_LOCK_charset);
}
-
- strmov(get_charsets_dir(fname), MY_CHARSET_INDEX);
- my_read_charset_file(fname, MYF(0));
+ return error;
+}
+
+
+void free_charsets(void)
+{
+ charset_initialized=0;
}
uint get_collation_number(const char *name)
{
- my_pthread_once(&charsets_initialized, init_available_charsets);
+ init_available_charsets(MYF(0));
return get_collation_number_internal(name);
}
@@ -437,7 +463,7 @@
uint get_charset_number(const char *charset_name, uint cs_flags)
{
CHARSET_INFO **cs;
- my_pthread_once(&charsets_initialized, init_available_charsets);
+ init_available_charsets(MYF(0));
for (cs= all_charsets;
cs < all_charsets+array_elements(all_charsets)-1 ;
@@ -454,7 +480,7 @@
const char *get_charset_name(uint charset_number)
{
CHARSET_INFO *cs;
- my_pthread_once(&charsets_initialized, init_available_charsets);
+ init_available_charsets(MYF(0));
cs=all_charsets[charset_number];
if (cs && (cs->number == charset_number) && cs->name )
@@ -512,7 +538,7 @@
if (cs_number == default_charset_info->number)
return default_charset_info;
- my_pthread_once(&charsets_initialized, init_available_charsets);
+ (void) init_available_charsets(MYF(0)); /* If it isn't initialized */
if (!cs_number || cs_number >= array_elements(all_charsets)-1)
return NULL;
@@ -534,7 +560,7 @@
{
uint cs_number;
CHARSET_INFO *cs;
- my_pthread_once(&charsets_initialized, init_available_charsets);
+ (void) init_available_charsets(MYF(0)); /* If it isn't initialized */
cs_number=get_collation_number(cs_name);
cs= cs_number ? get_internal_charset(cs_number,flags) : NULL;
@@ -559,7 +585,7 @@
DBUG_ENTER("get_charset_by_csname");
DBUG_PRINT("enter",("name: '%s'", cs_name));
- my_pthread_once(&charsets_initialized, init_available_charsets);
+ (void) init_available_charsets(MYF(0)); /* If it isn't initialized */
cs_number= get_charset_number(cs_name, cs_flags);
cs= cs_number ? get_internal_charset(cs_number, flags) : NULL;
diff -Naur mysql-5.1.44.orig/mysys/my_init.c mysql-5.1.44/mysys/my_init.c
--- mysql-5.1.44.orig/mysys/my_init.c 2010-02-04 06:38:51.000000000 -0500
+++ mysql-5.1.44/mysys/my_init.c 2010-02-19 23:13:48.000000000 -0500
@@ -165,6 +165,7 @@
my_print_open_files();
}
}
+ free_charsets();
my_error_unregister_all();
my_once_free();
diff -Naur mysql-5.1.44.orig/netware/libmysqlmain.c mysql-5.1.44/netware/libmysqlmain.c
--- mysql-5.1.44.orig/netware/libmysqlmain.c 2010-02-04 06:38:51.000000000 -0500
+++ mysql-5.1.44/netware/libmysqlmain.c 2010-02-19 23:13:48.000000000 -0500
@@ -18,7 +18,7 @@
#include "my_global.h"
-void init_available_charsets(void);
+my_bool init_available_charsets(myf myflags);
/* this function is required so that global memory is allocated against this
library nlm, and not against a paticular client */
@@ -31,7 +31,7 @@
{
mysql_server_init(0, NULL, NULL);
- init_available_charsets();
+ init_available_charsets(MYF(0));
return 0;
}
diff -Naur mysql-5.1.44.orig/sql/mysqld.cc mysql-5.1.44/sql/mysqld.cc
--- mysql-5.1.44.orig/sql/mysqld.cc 2010-02-04 06:39:50.000000000 -0500
+++ mysql-5.1.44/sql/mysqld.cc 2010-02-19 23:13:48.000000000 -0500
@@ -1287,6 +1287,7 @@
lex_free(); /* Free some memory */
item_create_cleanup();
set_var_free();
+ free_charsets();
if (!opt_noacl)
{
#ifdef HAVE_DLOPEN

File diff suppressed because it is too large Load Diff

39
mysql-no-docs.patch Normal file
View File

@ -0,0 +1,39 @@
Remove makefile logic dealing with mysql.info. We cannot ship that
documentation since it is not freely redistributable.
diff -Naur mysql-5.1.44.orig/Docs/Makefile.am mysql-5.1.44/Docs/Makefile.am
--- mysql-5.1.44.orig/Docs/Makefile.am 2010-02-04 06:36:50.000000000 -0500
+++ mysql-5.1.44/Docs/Makefile.am 2010-02-20 17:23:04.000000000 -0500
@@ -13,28 +13,21 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-EXTRA_DIST = mysql.info INSTALL-BINARY @extra_docs@
+EXTRA_DIST = INSTALL-BINARY @extra_docs@
-# make sure that "make install" installs the info page, too
-# automake only seems to take care of this automatically,
-# if we're building the info page from texi directly.
-install-data-hook: $(srcdir)/mysql.info
+install-data-hook:
if test `basename $(prefix)` = "mysql" ; then \
$(mkinstalldirs) $(DESTDIR)$(prefix)/docs ; \
- $(INSTALL_DATA) $(srcdir)/mysql.info $(DESTDIR)$(prefix)/docs ; \
test ! -f $(top_srcdir)/ChangeLog || $(INSTALL_DATA) $(top_srcdir)/ChangeLog $(DESTDIR)$(prefix)/docs ; \
else \
- $(mkinstalldirs) $(DESTDIR)$(infodir) $(DESTDIR)$(pkgdatadir) ; \
- $(INSTALL_DATA) $(srcdir)/mysql.info $(DESTDIR)$(infodir) ; \
+ $(mkinstalldirs) $(DESTDIR)$(pkgdatadir) ; \
test ! -f $(top_srcdir)/ChangeLog || $(INSTALL_DATA) $(top_srcdir)/ChangeLog $(DESTDIR)$(pkgdatadir) ; \
fi
uninstall-local:
if test `basename $(prefix)` = "mysql" ; then \
- @RM@ -f $(DESTDIR)$(prefix)/docs/mysql.info ; \
@RM@ -f $(DESTDIR)$(prefix)/docs/ChangeLog ; \
else \
- @RM@ -f $(DESTDIR)$(infodir)/mysql.info ; \
@RM@ -f $(DESTDIR)$(pkgdatadir)/ChangeLog ; \
fi

View File

@ -11,13 +11,13 @@ platform-dependent results, with the "expected" results being arguably the
wrong ones. This is upstream at http://bugs.mysql.com/bug.php?id=46895
diff -Naur mysql-5.1.43.orig/mysql-test/t/disabled.def mysql-5.1.43/mysql-test/t/disabled.def
--- mysql-5.1.43.orig/mysql-test/t/disabled.def 2010-01-15 12:46:09.000000000 -0500
+++ mysql-5.1.43/mysql-test/t/disabled.def 2010-02-12 23:20:23.000000000 -0500
@@ -11,3 +11,6 @@
##############################################################################
diff -Naur mysql-5.1.44.orig/mysql-test/t/disabled.def mysql-5.1.44/mysql-test/t/disabled.def
--- mysql-5.1.44.orig/mysql-test/t/disabled.def 2010-02-04 07:07:08.000000000 -0500
+++ mysql-5.1.44/mysql-test/t/disabled.def 2010-02-19 21:16:15.000000000 -0500
@@ -12,3 +12,6 @@
kill : Bug#37780 2008-12-03 HHunger need some changes to be robust enough for pushbuild.
query_cache_28249 : Bug#43861 2009-03-25 main.query_cache_28249 fails sporadically
innodb-autoinc-44030 : BUG#47621 2009-01-22 svoj MySQL and InnoDB dicts getting out of sync
+#
+plugin_load : gives wrong answer on PPC64
+outfile_loaddata : gives different results on different platforms

View File

@ -1,6 +1,6 @@
Name: mysql
Version: 5.1.43
Release: 2%{?dist}
Version: 5.1.44
Release: 1%{?dist}
Summary: MySQL client programs and shared libraries
Group: Applications/Databases
URL: http://www.mysql.com
@ -14,11 +14,17 @@ License: GPLv2 with exceptions
# Upstream has a mirror redirector for downloads, so the URL is hard to
# represent statically. You can get the tarball by following a link from
# http://dev.mysql.com/downloads/mysql/
Source0: mysql-%{version}.tar.gz
Source1: mysql.init
Source0: mysql-%{version}-nodocs.tar.gz
# The upstream tarball includes non-free documentation that we cannot ship.
# To remove the non-free documentation, run this script after downloading
# the tarball into the current directory:
# ./generate-tarball.sh $VERSION
Source1: generate-tarball.sh
Source2: mysql.init
Source3: my.cnf
Source4: scriptstub.c
Source5: my_config.h
Source6: README.mysql-docs
Source9: mysql-embedded-check.c
# Working around perl dependency checking bug in rpm FTTB. Remove later.
Source999: filter-requires-mysql.sh
@ -31,9 +37,11 @@ Patch5: mysql-install-test.patch
Patch6: mysql-stack-guard.patch
Patch7: mysql-plugin-bug.patch
Patch8: mysql-setschedparam.patch
Patch9: mysql-no-docs.patch
Patch10: mysql-strmov.patch
Patch12: mysql-cve-2008-7247.patch
Patch13: mysql-expired-certs.patch
Patch14: mysql-charset-bug.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
BuildRequires: gperf, perl, readline-devel, openssl-devel
@ -44,7 +52,7 @@ BuildRequires: time procps
# Socket is needed to run regression tests
BuildRequires: perl(Socket)
Requires: /sbin/install-info, grep, fileutils
Requires: grep, fileutils
Requires: %{name}-libs = %{version}-%{release}
Requires: bash
Conflicts: MySQL
@ -149,7 +157,7 @@ package contains the regression test suite distributed with
the MySQL sources.
%prep
%setup -q
%setup -q -n mysql-%{version}
%patch1 -p1
%patch2 -p1
@ -159,9 +167,11 @@ the MySQL sources.
%patch6 -p1
%patch7 -p1
%patch8 -p1
%patch9 -p1
%patch10 -p1
%patch12 -p1
%patch13 -p1
%patch14 -p1
libtoolize --force
aclocal
@ -281,14 +291,11 @@ touch $RPM_BUILD_ROOT/var/log/mysqld.log
# List the installed tree for RPM package maintenance purposes.
find $RPM_BUILD_ROOT -print | sed "s|^$RPM_BUILD_ROOT||" | sort > ROOTFILES
gzip ${RPM_BUILD_ROOT}%{_infodir}/*
mkdir -p $RPM_BUILD_ROOT/etc/rc.d/init.d
mkdir -p $RPM_BUILD_ROOT/var/run/mysqld
install -m 0755 -d $RPM_BUILD_ROOT/var/lib/mysql
install -m 0755 %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/mysqld
install -m 0755 %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/mysqld
install -m 0644 %{SOURCE3} $RPM_BUILD_ROOT/etc/my.cnf
rm -f $RPM_BUILD_ROOT/%{_infodir}/dir*
mv $RPM_BUILD_ROOT/usr/sql-bench $RPM_BUILD_ROOT%{_datadir}/sql-bench
mv $RPM_BUILD_ROOT/usr/mysql-test $RPM_BUILD_ROOT%{_datadir}/mysql-test
# 5.1.32 forgets to install the mysql-test README file
@ -334,6 +341,9 @@ rm -f ${RPM_BUILD_ROOT}%{_mandir}/man1/mysql-test-run.pl.1*
mkdir -p $RPM_BUILD_ROOT/etc/ld.so.conf.d
echo "%{_libdir}/mysql" > $RPM_BUILD_ROOT/etc/ld.so.conf.d/%{name}-%{_arch}.conf
# copy additional docs into build tree so %doc will find them
cp %{SOURCE6} README.mysql-docs
%clean
rm -rf $RPM_BUILD_ROOT
@ -341,9 +351,6 @@ rm -rf $RPM_BUILD_ROOT
/usr/sbin/useradd -M -o -r -d /var/lib/mysql -s /bin/bash \
-c "MySQL Server" -u 27 mysql > /dev/null 2>&1 || :
%post
/sbin/install-info %{_infodir}/mysql.info.gz %{_infodir}/dir
%post libs
/sbin/ldconfig
@ -354,11 +361,6 @@ fi
/bin/chmod 0755 /var/lib/mysql
/bin/touch /var/log/mysqld.log
%preun
if [ $1 = 0 ]; then
/sbin/install-info --delete %{_infodir}/mysql.info.gz %{_infodir}/dir || :
fi
%preun server
if [ $1 = 0 ]; then
/sbin/chkconfig --del mysqld
@ -379,6 +381,7 @@ fi
%files
%defattr(-,root,root)
%doc README COPYING EXCEPTIONS-CLIENT
%doc README.mysql-docs
%{_bindir}/msql2mysql
%{_bindir}/mysql
@ -395,8 +398,6 @@ fi
%{_bindir}/mysqlslap
%{_bindir}/my_print_defaults
%{_infodir}/*
%{_mandir}/man1/mysql.1*
%{_mandir}/man1/mysql_config.1*
%{_mandir}/man1/mysql_find_rows.1*
@ -559,6 +560,14 @@ fi
%{_mandir}/man1/mysql_client_test.1*
%changelog
* Sat Feb 20 2010 Tom Lane <tgl@redhat.com> 5.1.44-1
- Update to MySQL 5.1.44, for various fixes described at
http://dev.mysql.com/doc/refman/5.1/en/news-5-1-44.html
- Remove mysql.info, which is not freely redistributable
Resolves: #560181
- Revert broken upstream fix for their bug 45058
Resolves: #566547
* Sat Feb 13 2010 Tom Lane <tgl@redhat.com> 5.1.43-2
- Remove mysql-cluster, which is no longer supported by upstream in this
source distribution. If we want it we'll need a separate SRPM for it.

View File

@ -1 +1 @@
451fd3e8c55eecdf4c3ed109dce62f01 mysql-5.1.43.tar.gz
02d688d565b608adb93d7790ee6658be mysql-5.1.44-nodocs.tar.gz