From 00eec234ee79ae9859a98fe906e78cb3af4e89cc Mon Sep 17 00:00:00 2001 From: Jonathan Perkin Date: Wed, 12 Aug 2009 22:06:44 +0200 Subject: Apply build fix --- .bzrignore | 1 + storage/innodb_plugin/include/btr0cur.h | 2 +- storage/innodb_plugin/include/trx0types.h | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.bzrignore b/.bzrignore index fad758b54b8..6c6a43dacab 100644 --- a/.bzrignore +++ b/.bzrignore @@ -3063,3 +3063,4 @@ sql/share/slovak sql/share/spanish sql/share/swedish sql/share/ukrainian +libmysqld/examples/mysqltest.cc diff --git a/storage/innodb_plugin/include/btr0cur.h b/storage/innodb_plugin/include/btr0cur.h index b2d43ae3254..480a3877e54 100644 --- a/storage/innodb_plugin/include/btr0cur.h +++ b/storage/innodb_plugin/include/btr0cur.h @@ -618,7 +618,7 @@ enum btr_cur_method { hash_node, and might be necessary to update */ BTR_CUR_BINARY, /*!< success using the binary search */ - BTR_CUR_INSERT_TO_IBUF, /*!< performed the intended insert to + BTR_CUR_INSERT_TO_IBUF /*!< performed the intended insert to the insert buffer */ }; diff --git a/storage/innodb_plugin/include/trx0types.h b/storage/innodb_plugin/include/trx0types.h index 08cc9622d02..24cf57d53d5 100644 --- a/storage/innodb_plugin/include/trx0types.h +++ b/storage/innodb_plugin/include/trx0types.h @@ -70,7 +70,7 @@ typedef struct trx_named_savept_struct trx_named_savept_t; enum trx_rb_ctx { RB_NONE = 0, /*!< no rollback */ RB_NORMAL, /*!< normal rollback */ - RB_RECOVERY, /*!< rolling back an incomplete transaction, + RB_RECOVERY /*!< rolling back an incomplete transaction, in crash recovery */ }; -- cgit v1.2.1 From a162954858bbffe7f3d11a780183b0ec2606e93a Mon Sep 17 00:00:00 2001 From: Jonathan Perkin Date: Fri, 14 Aug 2009 17:18:52 +0200 Subject: Build fixes for Windows, AIX, HP/UX and Sun Studio11, from Timothy Smith. --- CMakeLists.txt | 1 + cmd-line-utils/readline/util.c | 9 +++++++-- storage/innodb_plugin/handler/i_s.cc | 18 ++++++++++-------- storage/innodb_plugin/include/univ.i | 3 ++- 4 files changed, 20 insertions(+), 11 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 947dc1786ff..7d91e39eb6d 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -137,6 +137,7 @@ ENDIF(MSVC) IF(WIN32) ADD_DEFINITIONS("-D_WINDOWS -D__WIN__ -D_CRT_SECURE_NO_DEPRECATE") + ADD_DEFINITIONS("-D_WIN32_WINNT=0x0501") ENDIF(WIN32) # default to x86 platform. We'll check for X64 in a bit diff --git a/cmd-line-utils/readline/util.c b/cmd-line-utils/readline/util.c index 50cfea75cb9..342224facd7 100644 --- a/cmd-line-utils/readline/util.c +++ b/cmd-line-utils/readline/util.c @@ -81,8 +81,13 @@ rl_alphabetic (c) #if defined (HANDLE_MULTIBYTE) int -_rl_walphabetic (wc) - wchar_t wc; +/* + Portability issue with VisualAge C++ Professional / C for AIX Compiler, Version 6: + "util.c", line 84.1: 1506-343 (S) Redeclaration of _rl_walphabetic differs + from previous declaration on line 110 of "rlmbutil.h". + So, put type in the function signature here. +*/ +_rl_walphabetic (wchar_t wc) { int c; diff --git a/storage/innodb_plugin/handler/i_s.cc b/storage/innodb_plugin/handler/i_s.cc index c0d488d1c49..524fe696de2 100644 --- a/storage/innodb_plugin/handler/i_s.cc +++ b/storage/innodb_plugin/handler/i_s.cc @@ -69,14 +69,16 @@ do { \ #define STRUCT_FLD(name, value) value #endif -static const ST_FIELD_INFO END_OF_ST_FIELD_INFO = - {STRUCT_FLD(field_name, NULL), - STRUCT_FLD(field_length, 0), - STRUCT_FLD(field_type, MYSQL_TYPE_NULL), - STRUCT_FLD(value, 0), - STRUCT_FLD(field_flags, 0), - STRUCT_FLD(old_name, ""), - STRUCT_FLD(open_method, SKIP_OPEN_TABLE)}; +/* Don't use a static const variable here, as some C++ compilers (notably +HPUX aCC: HP ANSI C++ B3910B A.03.65) can't handle it. */ +#define END_OF_ST_FIELD_INFO \ + {STRUCT_FLD(field_name, NULL), \ + STRUCT_FLD(field_length, 0), \ + STRUCT_FLD(field_type, MYSQL_TYPE_NULL), \ + STRUCT_FLD(value, 0), \ + STRUCT_FLD(field_flags, 0), \ + STRUCT_FLD(old_name, ""), \ + STRUCT_FLD(open_method, SKIP_OPEN_TABLE)} /* Use the following types mapping: diff --git a/storage/innodb_plugin/include/univ.i b/storage/innodb_plugin/include/univ.i index 6bce6dd765e..023a6c9cd89 100644 --- a/storage/innodb_plugin/include/univ.i +++ b/storage/innodb_plugin/include/univ.i @@ -408,7 +408,8 @@ it is read. */ /* Minimize cache-miss latency by moving data at addr into a cache before it is read or written. */ # define UNIV_PREFETCH_RW(addr) __builtin_prefetch(addr, 1, 3) -#elif defined(__SUNPRO_C) || defined(__SUNPRO_CC) +/* Sun Studio includes sun_prefetch.h as of version 5.9 */ +#elif (defined(__SUNPRO_C) && __SUNPRO_C >= 0x590) || (defined(__SUNPRO_CC) && __SUNPRO_CC >= 0x590) # include #if __SUNPRO_C >= 0x550 # undef UNIV_INTERN -- cgit v1.2.1 From f0e14f7181be4e68856060280d03f5e32d30ac4d Mon Sep 17 00:00:00 2001 From: Jonathan Perkin Date: Tue, 18 Aug 2009 16:23:15 +0200 Subject: Install innodb_plugin on Windows. --- scripts/make_win_bin_dist | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/scripts/make_win_bin_dist b/scripts/make_win_bin_dist index 3360d8459f8..ce89ea28303 100755 --- a/scripts/make_win_bin_dist +++ b/scripts/make_win_bin_dist @@ -279,6 +279,7 @@ cp include/mysql/plugin.h $DESTDIR/include/mysql/ # ---------------------------------------------------------------------- mkdir -p $DESTDIR/lib/opt +mkdir -p $DESTDIR/lib/plugin cp libmysql/$TARGET/libmysql.dll \ libmysql/$TARGET/libmysql.lib \ libmysql/$TARGET/mysqlclient.lib \ @@ -286,6 +287,8 @@ cp libmysql/$TARGET/libmysql.dll \ regex/$TARGET/regex.lib \ strings/$TARGET/strings.lib \ zlib/$TARGET/zlib.lib $DESTDIR/lib/opt/ +cp storage/innodb_plugin/$TARGET/ha_innodb_plugin.dll \ + $DESTDIR/lib/plugin/ if [ x"$TARGET" != x"release" ] ; then cp libmysql/$TARGET/libmysql.pdb \ @@ -294,11 +297,15 @@ if [ x"$TARGET" != x"release" ] ; then regex/$TARGET/regex.pdb \ strings/$TARGET/strings.pdb \ zlib/$TARGET/zlib.pdb $DESTDIR/lib/opt/ + cp storage/innodb_plugin/$TARGET/ha_innodb_plugin.pdb \ + $DESTDIR/lib/plugin/ fi + if [ x"$PACK_DEBUG" = x"" -a -f "libmysql/debug/libmysql.lib" -o \ x"$PACK_DEBUG" = x"yes" ] ; then mkdir -p $DESTDIR/lib/debug + mkdir -p $DESTDIR/lib/plugin/debug cp libmysql/debug/libmysql.dll \ libmysql/debug/libmysql.lib \ libmysql/debug/libmysql.pdb \ @@ -312,6 +319,10 @@ if [ x"$PACK_DEBUG" = x"" -a -f "libmysql/debug/libmysql.lib" -o \ strings/debug/strings.pdb \ zlib/debug/zlib.lib \ zlib/debug/zlib.pdb $DESTDIR/lib/debug/ + cp storage/innodb_plugin/debug/ha_innodb_plugin.dll \ + storage/innodb_plugin/debug/ha_innodb_plugin.lib \ + storage/innodb_plugin/debug/ha_innodb_plugin.pdb \ + $DESTDIR/lib/plugin/debug/ fi # ---------------------------------------------------------------------- -- cgit v1.2.1 From 58903aecd310c6470a666fd8bed63a30bece55f0 Mon Sep 17 00:00:00 2001 From: Jonathan Perkin Date: Fri, 21 Aug 2009 13:52:30 +0200 Subject: Add plugins to RPMs. Disable example plugins. --- support-files/mysql.spec.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/support-files/mysql.spec.sh b/support-files/mysql.spec.sh index 778b04b30fe..081489f7053 100644 --- a/support-files/mysql.spec.sh +++ b/support-files/mysql.spec.sh @@ -301,6 +301,8 @@ sh -c "PATH=\"${MYSQL_BUILD_PATH:-$PATH}\" \ --with-csv-storage-engine \ --with-blackhole-storage-engine \ --with-federated-storage-engine \ + --without-plugin-daemon_example \ + --without-plugin-example \ --with-partition \ --with-big-tables \ --enable-shared \ @@ -693,6 +695,8 @@ fi %attr(755, root, root) %{_bindir}/resolve_stack_dump %attr(755, root, root) %{_bindir}/resolveip +%attr(755, root, root) %{_libdir}/plugin/*.so* + %attr(755, root, root) %{_sbindir}/mysqld %attr(755, root, root) %{_sbindir}/mysqld-debug %attr(755, root, root) %{_sbindir}/mysqlmanager @@ -818,6 +822,8 @@ fi %{_libdir}/mysql/libvio.a %{_libdir}/mysql/libz.a %{_libdir}/mysql/libz.la +%{_libdir}/plugin/*.a +%{_libdir}/plugin/*.la %files shared %defattr(-, root, root, 0755) @@ -847,6 +853,11 @@ fi # itself - note that they must be ordered by date (important when # merging BK trees) %changelog +* Fri Aug 21 2009 Jonathan Perkin + +- Install plugin libraries in appropriate packages. +- Disable example plugins. + * Fri Nov 07 2008 Joerg Bruehe - Correct yesterday's fix, so that it also works for the last flag, -- cgit v1.2.1 From 769d9f3803ada97d0032944aa1447520957aa73b Mon Sep 17 00:00:00 2001 From: Jonathan Perkin Date: Fri, 21 Aug 2009 13:58:33 +0200 Subject: Apply patch from bug#46834 to install the test suite in RPMs. --- mysql-test/Makefile.am | 3 ++- mysql-test/lib/My/SafeProcess/Makefile.am | 3 ++- storage/ndb/test/run-test/Makefile.am | 3 ++- support-files/mysql.spec.sh | 6 +++++- 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/mysql-test/Makefile.am b/mysql-test/Makefile.am index 810bead1adc..b1d0e85c70e 100644 --- a/mysql-test/Makefile.am +++ b/mysql-test/Makefile.am @@ -17,7 +17,8 @@ ## Process this file with automake to create Makefile.in -testdir = $(prefix)/mysql-test +testroot = $(prefix) +testdir = $(testroot)/mysql-test test_SCRIPTS = mtr \ mysql-test-run \ diff --git a/mysql-test/lib/My/SafeProcess/Makefile.am b/mysql-test/lib/My/SafeProcess/Makefile.am index 623c0e9a87a..722331453fe 100644 --- a/mysql-test/lib/My/SafeProcess/Makefile.am +++ b/mysql-test/lib/My/SafeProcess/Makefile.am @@ -13,7 +13,8 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -safedir = $(prefix)/mysql-test/lib/My/SafeProcess +testroot = $(prefix) +safedir = $(testroot)/mysql-test/lib/My/SafeProcess #nobase_bin_PROGRAMS = ... safe_PROGRAMS = my_safe_process diff --git a/storage/ndb/test/run-test/Makefile.am b/storage/ndb/test/run-test/Makefile.am index 65aa62d11f0..54ca0c009b2 100644 --- a/storage/ndb/test/run-test/Makefile.am +++ b/storage/ndb/test/run-test/Makefile.am @@ -13,7 +13,8 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -testdir=$(prefix)/mysql-test/ndb +testroot=$(prefix) +testdir=$(testroot)/mysql-test/ndb include $(top_srcdir)/storage/ndb/config/common.mk.am include $(top_srcdir)/storage/ndb/config/type_util.mk.am diff --git a/support-files/mysql.spec.sh b/support-files/mysql.spec.sh index 081489f7053..8a181375cfb 100644 --- a/support-files/mysql.spec.sh +++ b/support-files/mysql.spec.sh @@ -428,7 +428,7 @@ install -d $RBR%{_sbindir} # Install all binaries -(cd $MBD && make install DESTDIR=$RBR benchdir_root=%{_datadir}) +(cd $MBD && make install DESTDIR=$RBR testroot=%{_datadir}) # Old packages put shared libs in %{_libdir}/ (not %{_libdir}/mysql), so do # the same here. mv $RBR/%{_libdir}/mysql/*.so* $RBR/%{_libdir}/ @@ -858,6 +858,10 @@ fi - Install plugin libraries in appropriate packages. - Disable example plugins. +* Thu Aug 20 2009 Jonathan Perkin + +- Update variable used for mysql-test suite location to match source. + * Fri Nov 07 2008 Joerg Bruehe - Correct yesterday's fix, so that it also works for the last flag, -- cgit v1.2.1 From df91ff571b36a2428b31d667944eb72a10cf1449 Mon Sep 17 00:00:00 2001 From: Jonathan Perkin Date: Mon, 24 Aug 2009 10:50:04 +0200 Subject: Add conditionals for bundled zlib and innodb plugin --- support-files/mysql.spec.sh | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/support-files/mysql.spec.sh b/support-files/mysql.spec.sh index 8a181375cfb..5b8d7a5922d 100644 --- a/support-files/mysql.spec.sh +++ b/support-files/mysql.spec.sh @@ -31,6 +31,20 @@ %{?_with_yassl:%define YASSL_BUILD 1} %{!?_with_yassl:%define YASSL_BUILD 0} +# ---------------------------------------------------------------------- +# use "rpmbuild --with bundled_zlib" or "rpm --define '_with_bundled_zlib 1'" +# (for RPM 3.x) to build using the bundled zlib (off by default) +# ---------------------------------------------------------------------- +%{?_with_bundled_zlib:%define WITH_BUNDLED_ZLIB 1} +%{!?_with_bundled_zlib:%define WITH_BUNDLED_ZLIB 0} + +# ---------------------------------------------------------------------- +# use "rpmbuild --without innodb_plugin" or "rpm --define '_without_innodb_plugin 1'" +# (for RPM 3.x) to not build the innodb plugin (on by default with innodb builds) +# ---------------------------------------------------------------------- +%{?_without_innodb_plugin:%define WITHOUT_INNODB_PLUGIN 1} +%{!?_without_innodb_plugin:%define WITHOUT_INNODB_PLUGIN 0} + # use "rpmbuild --with cluster" or "rpm --define '_with_cluster 1'" (for RPM 3.x) # to build with cluster support (off by default) %{?_with_cluster:%define CLUSTER_BUILD 1} @@ -292,6 +306,9 @@ sh -c "PATH=\"${MYSQL_BUILD_PATH:-$PATH}\" \ --enable-thread-safe-client \ --with-readline \ --with-innodb \ +%if %{WITHOUT_INNODB_PLUGIN} + --without-plugin-innodb_plugin \ +%endif %if %{CLUSTER_BUILD} --with-ndbcluster \ %else @@ -305,6 +322,9 @@ sh -c "PATH=\"${MYSQL_BUILD_PATH:-$PATH}\" \ --without-plugin-example \ --with-partition \ --with-big-tables \ +%if %{WITH_BUNDLED_ZLIB} + --with-zlib-dir=bundled \ +%endif --enable-shared \ " make @@ -853,6 +873,10 @@ fi # itself - note that they must be ordered by date (important when # merging BK trees) %changelog +* Mon Aug 24 2009 Jonathan Perkin + +- Add conditionals for bundled zlib and innodb plugin + * Fri Aug 21 2009 Jonathan Perkin - Install plugin libraries in appropriate packages. -- cgit v1.2.1 From c2bd07ca9cd848c58dcd243551e4d52e68bbb449 Mon Sep 17 00:00:00 2001 From: Jonathan Perkin Date: Mon, 24 Aug 2009 14:06:01 +0200 Subject: Tidy previous, put example storage engine back as it's used by tests. --- support-files/mysql.spec.sh | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/support-files/mysql.spec.sh b/support-files/mysql.spec.sh index 5b8d7a5922d..fbb569e0c8c 100644 --- a/support-files/mysql.spec.sh +++ b/support-files/mysql.spec.sh @@ -319,7 +319,6 @@ sh -c "PATH=\"${MYSQL_BUILD_PATH:-$PATH}\" \ --with-blackhole-storage-engine \ --with-federated-storage-engine \ --without-plugin-daemon_example \ - --without-plugin-example \ --with-partition \ --with-big-tables \ %if %{WITH_BUNDLED_ZLIB} @@ -715,7 +714,11 @@ fi %attr(755, root, root) %{_bindir}/resolve_stack_dump %attr(755, root, root) %{_bindir}/resolveip -%attr(755, root, root) %{_libdir}/plugin/*.so* +%attr(755, root, root) %{_libdir}/mysql/plugin/ha_example.so* +%if %{WITHOUT_INNODB_PLUGIN} +%else +%attr(755, root, root) %{_libdir}/mysql/plugin/ha_innodb_plugin.so* +%endif %attr(755, root, root) %{_sbindir}/mysqld %attr(755, root, root) %{_sbindir}/mysqld-debug @@ -842,8 +845,15 @@ fi %{_libdir}/mysql/libvio.a %{_libdir}/mysql/libz.a %{_libdir}/mysql/libz.la -%{_libdir}/plugin/*.a -%{_libdir}/plugin/*.la +%{_libdir}/mysql/plugin/ha_example.a +%{_libdir}/mysql/plugin/ha_example.la +%if %{WITHOUT_INNODB_PLUGIN} +%else +%{_libdir}/mysql/plugin/ha_innodb_plugin.a +%{_libdir}/mysql/plugin/ha_innodb_plugin.la +%endif +%{_libdir}/mysql/plugin/mypluglib.a +%{_libdir}/mysql/plugin/mypluglib.la %files shared %defattr(-, root, root, 0755) @@ -880,7 +890,7 @@ fi * Fri Aug 21 2009 Jonathan Perkin - Install plugin libraries in appropriate packages. -- Disable example plugins. +- Disable libdaemon_example plugin. * Thu Aug 20 2009 Jonathan Perkin -- cgit v1.2.1 From 74092a8e5bfa037e32f2cca266fad0f59b0dbd9a Mon Sep 17 00:00:00 2001 From: Jonathan Perkin Date: Tue, 25 Aug 2009 13:00:23 +0200 Subject: Disable ftexample to match other packages, ride previous changelog entry. --- support-files/mysql.spec.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/support-files/mysql.spec.sh b/support-files/mysql.spec.sh index fbb569e0c8c..cd8af76faa2 100644 --- a/support-files/mysql.spec.sh +++ b/support-files/mysql.spec.sh @@ -319,6 +319,7 @@ sh -c "PATH=\"${MYSQL_BUILD_PATH:-$PATH}\" \ --with-blackhole-storage-engine \ --with-federated-storage-engine \ --without-plugin-daemon_example \ + --without-plugin-ftexample \ --with-partition \ --with-big-tables \ %if %{WITH_BUNDLED_ZLIB} @@ -852,8 +853,6 @@ fi %{_libdir}/mysql/plugin/ha_innodb_plugin.a %{_libdir}/mysql/plugin/ha_innodb_plugin.la %endif -%{_libdir}/mysql/plugin/mypluglib.a -%{_libdir}/mysql/plugin/mypluglib.la %files shared %defattr(-, root, root, 0755) @@ -890,7 +889,7 @@ fi * Fri Aug 21 2009 Jonathan Perkin - Install plugin libraries in appropriate packages. -- Disable libdaemon_example plugin. +- Disable libdaemon_example and ftexample plugins. * Thu Aug 20 2009 Jonathan Perkin -- cgit v1.2.1 From 71f4bfd6c7dba0ea4b00469d48e458f0e5eeaf67 Mon Sep 17 00:00:00 2001 From: Jonathan Perkin Date: Tue, 1 Sep 2009 08:40:13 +0200 Subject: Only install the innodb plugin if the plugin directory exists. --- scripts/make_win_bin_dist | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/scripts/make_win_bin_dist b/scripts/make_win_bin_dist index ce89ea28303..9c17c26b445 100755 --- a/scripts/make_win_bin_dist +++ b/scripts/make_win_bin_dist @@ -287,8 +287,10 @@ cp libmysql/$TARGET/libmysql.dll \ regex/$TARGET/regex.lib \ strings/$TARGET/strings.lib \ zlib/$TARGET/zlib.lib $DESTDIR/lib/opt/ -cp storage/innodb_plugin/$TARGET/ha_innodb_plugin.dll \ - $DESTDIR/lib/plugin/ +if [ -d storage/innodb_plugin ]; then + cp storage/innodb_plugin/$TARGET/ha_innodb_plugin.dll \ + $DESTDIR/lib/plugin/ +fi if [ x"$TARGET" != x"release" ] ; then cp libmysql/$TARGET/libmysql.pdb \ @@ -297,8 +299,10 @@ if [ x"$TARGET" != x"release" ] ; then regex/$TARGET/regex.pdb \ strings/$TARGET/strings.pdb \ zlib/$TARGET/zlib.pdb $DESTDIR/lib/opt/ - cp storage/innodb_plugin/$TARGET/ha_innodb_plugin.pdb \ - $DESTDIR/lib/plugin/ + if [ -d storage/innodb_plugin ]; then + cp storage/innodb_plugin/$TARGET/ha_innodb_plugin.pdb \ + $DESTDIR/lib/plugin/ + fi fi @@ -319,10 +323,12 @@ if [ x"$PACK_DEBUG" = x"" -a -f "libmysql/debug/libmysql.lib" -o \ strings/debug/strings.pdb \ zlib/debug/zlib.lib \ zlib/debug/zlib.pdb $DESTDIR/lib/debug/ - cp storage/innodb_plugin/debug/ha_innodb_plugin.dll \ - storage/innodb_plugin/debug/ha_innodb_plugin.lib \ - storage/innodb_plugin/debug/ha_innodb_plugin.pdb \ - $DESTDIR/lib/plugin/debug/ + if [ -d storage/innodb_plugin ]; then + cp storage/innodb_plugin/debug/ha_innodb_plugin.dll \ + storage/innodb_plugin/debug/ha_innodb_plugin.lib \ + storage/innodb_plugin/debug/ha_innodb_plugin.pdb \ + $DESTDIR/lib/plugin/debug/ + fi fi # ---------------------------------------------------------------------- -- cgit v1.2.1