From 827db5e40cf4c85e5b57cc4f82aecaab8f02bbcd Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 25 May 2005 11:10:10 +0200 Subject: [PATCH 1/6] Use one err file for each master mysql-test/mysql-test-run.sh: Add master id to end of MASTER_MY_ERR so that both masters doesnt write to the same file. --- mysql-test/mysql-test-run.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mysql-test/mysql-test-run.sh b/mysql-test/mysql-test-run.sh index 4fee560ee44..3f7e7d22200 100644 --- a/mysql-test/mysql-test-run.sh +++ b/mysql-test/mysql-test-run.sh @@ -1181,8 +1181,8 @@ start_master() $NOT_FIRST_MASTER_EXTRA_OPTS" fi - CUR_MYERR=$MASTER_MYERR - CUR_MYSOCK=$MASTER_MYSOCK + CUR_MYERR=$MASTER_MYERR$1 + CUR_MYSOCK=$MASTER_MYSOCK$1 # For embedded server we collect the server flags and return if [ "x$USE_EMBEDDED_SERVER" = "x1" ] ; then From ce11270fc1aad781f066f33d28328bde31487dca Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 25 May 2005 16:24:07 +0200 Subject: [PATCH 2/6] Added a missing "make clean" to the RPM "spec" file which had caused the original 4.1.12 RPMs to be broken. (bug#10674, bug#10681) support-files/mysql.spec.sh: Added a missing "make clean" which had caused the original 4.1.12 RPMs to be broken. (bug#10674, bug#10681) --- support-files/mysql.spec.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/support-files/mysql.spec.sh b/support-files/mysql.spec.sh index 8b880c32051..2354b44f4fa 100644 --- a/support-files/mysql.spec.sh +++ b/support-files/mysql.spec.sh @@ -299,6 +299,9 @@ fi (cd libmysql/.libs; tar cf $RBR/shared-libs.tar *.so*) (cd libmysql_r/.libs; tar rf $RBR/shared-libs.tar *.so*) +# Now clean up +make clean + # RPM:s destroys Makefile.in files, so we generate them here # aclocal; autoheader; aclocal; automake; autoconf # (cd innobase && aclocal && autoheader && aclocal && automake && autoconf) @@ -584,6 +587,10 @@ fi # itself - note that they must be ordered by date (important when # merging BK trees) %changelog +* Wed May 25 2005 Joerg Bruehe + +- Added a "make clean" between separate calls to "BuildMySQL". + * Wed Apr 13 2005 Lenz Grimmer - removed the MySQL manual files (html/ps/texi) - they have been removed From 22944a956350d6276f9a852f78dee2b8126e68c7 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 26 May 2005 12:09:14 +0200 Subject: [PATCH 3/6] Add ifdefs to control when "#pragma implementation" should be used Added some more ifdefs for "#pragma interface" client/sql_string.cc: USE_PRAGMA_IMPLEMENTATION client/sql_string.h: USE_PRAGMA_INTERFACE include/my_global.h: Use pragma implementation for gcc pre version 3 mysys/raid.cc: USE_PRAGMA_IMPLEMENTATION sql/field.cc: USE_PRAGMA_IMPLEMENTATION sql/ha_berkeley.cc: USE_PRAGMA_IMPLEMENTATION sql/ha_blackhole.cc: USE_PRAGMA_IMPLEMENTATION sql/ha_heap.cc: USE_PRAGMA_IMPLEMENTATION sql/ha_innodb.cc: USE_PRAGMA_IMPLEMENTATION sql/ha_isam.cc: USE_PRAGMA_IMPLEMENTATION sql/ha_isammrg.cc: USE_PRAGMA_IMPLEMENTATION sql/ha_myisam.cc: USE_PRAGMA_IMPLEMENTATION sql/ha_myisammrg.cc: USE_PRAGMA_IMPLEMENTATION sql/ha_ndbcluster.cc: USE_PRAGMA_IMPLEMENTATION sql/handler.cc: USE_PRAGMA_IMPLEMENTATION sql/hash_filo.cc: USE_PRAGMA_IMPLEMENTATION sql/item.cc: USE_PRAGMA_IMPLEMENTATION sql/item_cmpfunc.cc: USE_PRAGMA_IMPLEMENTATION sql/item_func.cc: USE_PRAGMA_IMPLEMENTATION sql/item_geofunc.cc: USE_PRAGMA_IMPLEMENTATION sql/item_strfunc.cc: USE_PRAGMA_IMPLEMENTATION sql/item_subselect.cc: USE_PRAGMA_IMPLEMENTATION sql/item_sum.cc: USE_PRAGMA_IMPLEMENTATION sql/item_timefunc.cc: USE_PRAGMA_IMPLEMENTATION sql/item_uniq.cc: USE_PRAGMA_IMPLEMENTATION sql/item_uniq.h: USE_PRAGMA_INTERFACE sql/log_event.cc: USE_PRAGMA_IMPLEMENTATION sql/log_event.h: USE_PRAGMA_INTERFACE sql/opt_range.cc: USE_PRAGMA_IMPLEMENTATION sql/procedure.cc: USE_PRAGMA_IMPLEMENTATION sql/protocol.cc: USE_PRAGMA_IMPLEMENTATION sql/protocol_cursor.cc: USE_PRAGMA_IMPLEMENTATION sql/set_var.cc: USE_PRAGMA_IMPLEMENTATION sql/sql_analyse.cc: USE_PRAGMA_IMPLEMENTATION sql/sql_analyse.h: USE_PRAGMA_INTERFACE sql/sql_class.cc: USE_PRAGMA_IMPLEMENTATION sql/sql_crypt.cc: USE_PRAGMA_IMPLEMENTATION sql/sql_crypt.h: USE_PRAGMA_IMPLEMENTATION sql/sql_list.cc: USE_PRAGMA_IMPLEMENTATION sql/sql_map.cc: USE_PRAGMA_IMPLEMENTATION sql/sql_map.h: USE_PRAGMA_INTERFACE sql/sql_olap.cc: USE_PRAGMA_IMPLEMENTATION sql/sql_select.cc: USE_PRAGMA_IMPLEMENTATION sql/sql_string.cc: USE_PRAGMA_IMPLEMENTATION sql/sql_udf.cc: USE_PRAGMA_IMPLEMENTATION sql/tztime.cc: USE_PRAGMA_IMPLEMENTATION --- client/sql_string.cc | 2 +- client/sql_string.h | 2 +- include/my_global.h | 5 +++++ mysys/raid.cc | 2 +- sql/field.cc | 2 +- sql/ha_berkeley.cc | 2 +- sql/ha_blackhole.cc | 2 +- sql/ha_heap.cc | 2 +- sql/ha_innodb.cc | 2 +- sql/ha_isam.cc | 2 +- sql/ha_isammrg.cc | 2 +- sql/ha_myisam.cc | 2 +- sql/ha_myisammrg.cc | 2 +- sql/ha_ndbcluster.cc | 2 +- sql/handler.cc | 2 +- sql/hash_filo.cc | 2 +- sql/item.cc | 2 +- sql/item_cmpfunc.cc | 2 +- sql/item_func.cc | 2 +- sql/item_geofunc.cc | 2 +- sql/item_strfunc.cc | 2 +- sql/item_subselect.cc | 2 +- sql/item_sum.cc | 2 +- sql/item_timefunc.cc | 2 +- sql/item_uniq.cc | 2 +- sql/item_uniq.h | 2 +- sql/log_event.cc | 2 +- sql/log_event.h | 2 +- sql/opt_range.cc | 2 +- sql/procedure.cc | 2 +- sql/protocol.cc | 2 +- sql/protocol_cursor.cc | 2 +- sql/set_var.cc | 2 +- sql/sql_analyse.cc | 2 +- sql/sql_analyse.h | 2 +- sql/sql_class.cc | 2 +- sql/sql_crypt.cc | 2 +- sql/sql_crypt.h | 2 +- sql/sql_list.cc | 2 +- sql/sql_map.cc | 2 +- sql/sql_map.h | 2 +- sql/sql_olap.cc | 2 +- sql/sql_select.cc | 2 +- sql/sql_string.cc | 2 +- sql/sql_udf.cc | 2 +- sql/tztime.cc | 2 +- 46 files changed, 50 insertions(+), 45 deletions(-) diff --git a/client/sql_string.cc b/client/sql_string.cc index 9dcf19dad1d..690997152f1 100644 --- a/client/sql_string.cc +++ b/client/sql_string.cc @@ -16,7 +16,7 @@ /* This file is originally from the mysql distribution. Coded by monty */ -#ifdef __GNUC__ +#ifdef USE_PRAGMA_IMPLEMENTATION #pragma implementation // gcc: Class implementation #endif diff --git a/client/sql_string.h b/client/sql_string.h index aec40466d2b..fd6d3ef59d9 100644 --- a/client/sql_string.h +++ b/client/sql_string.h @@ -16,7 +16,7 @@ /* This file is originally from the mysql distribution. Coded by monty */ -#ifdef __GNUC__ +#ifdef USE_PRAGMA_INTERFACE #pragma interface /* gcc class implementation */ #endif diff --git a/include/my_global.h b/include/my_global.h index f059d603976..0f6d9ac13c6 100644 --- a/include/my_global.h +++ b/include/my_global.h @@ -48,6 +48,11 @@ #define USE_PRAGMA_INTERFACE #endif +/* Determine when to use "#pragma implementation" */ +#if !defined(__INTEL_COMPILER) && defined(__GNUC__) && (__GNUC__ < 3) +#define USE_PRAGMA_IMPLEMENTATION +#endif + #if defined(i386) && !defined(__i386__) #define __i386__ #endif diff --git a/mysys/raid.cc b/mysys/raid.cc index 0b688464fb3..62587c438ca 100644 --- a/mysys/raid.cc +++ b/mysys/raid.cc @@ -70,7 +70,7 @@ tonu@mysql.com & monty@mysql.com */ -#ifdef __GNUC__ +#ifdef USE_PRAGMA_IMPLEMENTATION #pragma implementation // gcc: Class implementation #endif diff --git a/sql/field.cc b/sql/field.cc index d73257a673f..adb0368384e 100644 --- a/sql/field.cc +++ b/sql/field.cc @@ -19,7 +19,7 @@ ** This file implements classes defined in field.h *****************************************************************************/ -#ifdef __GNUC__ +#ifdef USE_PRAGMA_IMPLEMENTATION #pragma implementation // gcc: Class implementation #endif diff --git a/sql/ha_berkeley.cc b/sql/ha_berkeley.cc index 626201a38a6..05cad23b176 100644 --- a/sql/ha_berkeley.cc +++ b/sql/ha_berkeley.cc @@ -47,7 +47,7 @@ */ -#ifdef __GNUC__ +#ifdef USE_PRAGMA_IMPLEMENTATION #pragma implementation // gcc: Class implementation #endif diff --git a/sql/ha_blackhole.cc b/sql/ha_blackhole.cc index c9c94b3a9d7..59b3f7102b5 100644 --- a/sql/ha_blackhole.cc +++ b/sql/ha_blackhole.cc @@ -15,7 +15,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#ifdef __GNUC__ +#ifdef USE_PRAGMA_IMPLEMENTATION #pragma implementation // gcc: Class implementation #endif diff --git a/sql/ha_heap.cc b/sql/ha_heap.cc index 033fe86720e..d584c33f061 100644 --- a/sql/ha_heap.cc +++ b/sql/ha_heap.cc @@ -15,7 +15,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#ifdef __GNUC__ +#ifdef USE_PRAGMA_IMPLEMENTATION #pragma implementation // gcc: Class implementation #endif diff --git a/sql/ha_innodb.cc b/sql/ha_innodb.cc index 2d2a8f2c3b4..bb3c359ccdb 100644 --- a/sql/ha_innodb.cc +++ b/sql/ha_innodb.cc @@ -28,7 +28,7 @@ have disables the InnoDB inlining in this file. */ in Windows? */ -#ifdef __GNUC__ +#ifdef USE_PRAGMA_IMPLEMENTATION #pragma implementation // gcc: Class implementation #endif diff --git a/sql/ha_isam.cc b/sql/ha_isam.cc index 9de532fa7b0..31e9236460f 100644 --- a/sql/ha_isam.cc +++ b/sql/ha_isam.cc @@ -15,7 +15,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#ifdef __GNUC__ +#ifdef USE_PRAGMA_IMPLEMENTATION #pragma implementation // gcc: Class implementation #endif diff --git a/sql/ha_isammrg.cc b/sql/ha_isammrg.cc index 367607eef19..c0e6f665f08 100644 --- a/sql/ha_isammrg.cc +++ b/sql/ha_isammrg.cc @@ -15,7 +15,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#ifdef __GNUC__ +#ifdef USE_PRAGMA_IMPLEMENTATION #pragma implementation // gcc: Class implementation #endif diff --git a/sql/ha_myisam.cc b/sql/ha_myisam.cc index 7ddb7ca25ed..d8608c6a599 100644 --- a/sql/ha_myisam.cc +++ b/sql/ha_myisam.cc @@ -15,7 +15,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#ifdef __GNUC__ +#ifdef USE_PRAGMA_IMPLEMENTATION #pragma implementation // gcc: Class implementation #endif diff --git a/sql/ha_myisammrg.cc b/sql/ha_myisammrg.cc index 7a5d4fcf0a1..9ba853c49d0 100644 --- a/sql/ha_myisammrg.cc +++ b/sql/ha_myisammrg.cc @@ -15,7 +15,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#ifdef __GNUC__ +#ifdef USE_PRAGMA_IMPLEMENTATION #pragma implementation // gcc: Class implementation #endif diff --git a/sql/ha_ndbcluster.cc b/sql/ha_ndbcluster.cc index 53706b4a9ba..eaa0473df1b 100644 --- a/sql/ha_ndbcluster.cc +++ b/sql/ha_ndbcluster.cc @@ -20,7 +20,7 @@ NDB Cluster */ -#ifdef __GNUC__ +#ifdef USE_PRAGMA_IMPLEMENTATION #pragma implementation // gcc: Class implementation #endif diff --git a/sql/handler.cc b/sql/handler.cc index f174f51514e..f14564b6629 100644 --- a/sql/handler.cc +++ b/sql/handler.cc @@ -17,7 +17,7 @@ /* Handler-calling-functions */ -#ifdef __GNUC__ +#ifdef USE_PRAGMA_IMPLEMENTATION #pragma implementation // gcc: Class implementation #endif diff --git a/sql/hash_filo.cc b/sql/hash_filo.cc index b85f8054f10..ec200768222 100644 --- a/sql/hash_filo.cc +++ b/sql/hash_filo.cc @@ -20,7 +20,7 @@ ** to usage. */ -#ifdef __GNUC__ +#ifdef USE_PRAGMA_IMPLEMENTATION #pragma implementation // gcc: Class implementation #endif diff --git a/sql/item.cc b/sql/item.cc index 59785813566..98aeeaa4c99 100644 --- a/sql/item.cc +++ b/sql/item.cc @@ -15,7 +15,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#ifdef __GNUC__ +#ifdef USE_PRAGMA_IMPLEMENTATION #pragma implementation // gcc: Class implementation #endif diff --git a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc index 8498ab4800e..337ac949d35 100644 --- a/sql/item_cmpfunc.cc +++ b/sql/item_cmpfunc.cc @@ -17,7 +17,7 @@ /* This file defines all compare functions */ -#ifdef __GNUC__ +#ifdef USE_PRAGMA_IMPLEMENTATION #pragma implementation // gcc: Class implementation #endif diff --git a/sql/item_func.cc b/sql/item_func.cc index 05b76eb1604..3c50e750b41 100644 --- a/sql/item_func.cc +++ b/sql/item_func.cc @@ -17,7 +17,7 @@ /* This file defines all numerical functions */ -#ifdef __GNUC__ +#ifdef USE_PRAGMA_IMPLEMENTATION #pragma implementation // gcc: Class implementation #endif diff --git a/sql/item_geofunc.cc b/sql/item_geofunc.cc index 2f00416bddf..c58a9e434c7 100644 --- a/sql/item_geofunc.cc +++ b/sql/item_geofunc.cc @@ -17,7 +17,7 @@ /* This file defines all spatial functions */ -#ifdef __GNUC__ +#ifdef USE_PRAGMA_IMPLEMENTATION #pragma implementation // gcc: Class implementation #endif diff --git a/sql/item_strfunc.cc b/sql/item_strfunc.cc index baba4d9b786..5ca5caf6bdf 100644 --- a/sql/item_strfunc.cc +++ b/sql/item_strfunc.cc @@ -20,7 +20,7 @@ ** (This shouldn't be needed) */ -#ifdef __GNUC__ +#ifdef USE_PRAGMA_IMPLEMENTATION #pragma implementation // gcc: Class implementation #endif diff --git a/sql/item_subselect.cc b/sql/item_subselect.cc index 301740c50ef..2e4c70ecd5f 100644 --- a/sql/item_subselect.cc +++ b/sql/item_subselect.cc @@ -22,7 +22,7 @@ SUBSELECT TODO: (sql_select.h/sql_select.cc) */ -#ifdef __GNUC__ +#ifdef USE_PRAGMA_IMPLEMENTATION #pragma implementation // gcc: Class implementation #endif diff --git a/sql/item_sum.cc b/sql/item_sum.cc index dd4cda4ff91..fb88fca9a2d 100644 --- a/sql/item_sum.cc +++ b/sql/item_sum.cc @@ -17,7 +17,7 @@ /* Sum functions (COUNT, MIN...) */ -#ifdef __GNUC__ +#ifdef USE_PRAGMA_IMPLEMENTATION #pragma implementation // gcc: Class implementation #endif diff --git a/sql/item_timefunc.cc b/sql/item_timefunc.cc index 23cd9c7ced2..a3cf69035f3 100644 --- a/sql/item_timefunc.cc +++ b/sql/item_timefunc.cc @@ -17,7 +17,7 @@ /* This file defines all time functions */ -#ifdef __GNUC__ +#ifdef USE_PRAGMA_IMPLEMENTATION #pragma implementation // gcc: Class implementation #endif diff --git a/sql/item_uniq.cc b/sql/item_uniq.cc index 88e0cbbc0e6..0c757c0e3a3 100644 --- a/sql/item_uniq.cc +++ b/sql/item_uniq.cc @@ -15,7 +15,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ /* Compability file */ -#ifdef __GNUC__ +#ifdef USE_PRAGMA_IMPLEMENTATION #pragma implementation #endif diff --git a/sql/item_uniq.h b/sql/item_uniq.h index 5582537bdbb..b7e00f9f080 100644 --- a/sql/item_uniq.h +++ b/sql/item_uniq.h @@ -16,7 +16,7 @@ /* Compability file ; This file only contains dummy functions */ -#ifdef __GNUC__ +#ifdef USE_PRAGMA_INTERFACE #pragma interface #endif diff --git a/sql/log_event.cc b/sql/log_event.cc index 8a949b81fc1..f2287857d37 100644 --- a/sql/log_event.cc +++ b/sql/log_event.cc @@ -16,7 +16,7 @@ #ifndef MYSQL_CLIENT -#ifdef __GNUC__ +#ifdef USE_PRAGMA_IMPLEMENTATION #pragma implementation // gcc: Class implementation #endif #include "mysql_priv.h" diff --git a/sql/log_event.h b/sql/log_event.h index f848f2ae1b9..7ae4e863fc2 100644 --- a/sql/log_event.h +++ b/sql/log_event.h @@ -22,7 +22,7 @@ #undef write // remove pthread.h macro definition, conflict with write() class member #endif -#if defined(__GNUC__) && !defined(MYSQL_CLIENT) +#if defined(USE_PRAGMA_INTERFACE) && !defined(MYSQL_CLIENT) #pragma interface /* gcc class implementation */ #endif diff --git a/sql/opt_range.cc b/sql/opt_range.cc index 33223b83894..bd1befb436f 100644 --- a/sql/opt_range.cc +++ b/sql/opt_range.cc @@ -23,7 +23,7 @@ */ -#ifdef __GNUC__ +#ifdef USE_PRAGMA_IMPLEMENTATION #pragma implementation // gcc: Class implementation #endif diff --git a/sql/procedure.cc b/sql/procedure.cc index 7779f5ce085..a0042dd879e 100644 --- a/sql/procedure.cc +++ b/sql/procedure.cc @@ -17,7 +17,7 @@ /* Procedures (functions with changes output of select) */ -#ifdef __GNUC__ +#ifdef USE_PRAGMA_IMPLEMENTATION #pragma implementation // gcc: Class implementation #endif diff --git a/sql/protocol.cc b/sql/protocol.cc index 91061426f04..6a17ae2f95b 100644 --- a/sql/protocol.cc +++ b/sql/protocol.cc @@ -19,7 +19,7 @@ The actual communction is handled by the net_xxx functions in net_serv.cc */ -#ifdef __GNUC__ +#ifdef USE_PRAGMA_IMPLEMENTATION #pragma implementation // gcc: Class implementation #endif diff --git a/sql/protocol_cursor.cc b/sql/protocol_cursor.cc index 5f35552c562..b225e06ed32 100644 --- a/sql/protocol_cursor.cc +++ b/sql/protocol_cursor.cc @@ -19,7 +19,7 @@ The actual communction is handled by the net_xxx functions in net_serv.cc */ -#ifdef __GNUC__ +#ifdef USE_PRAGMA_IMPLEMENTATION #pragma implementation // gcc: Class implementation #endif diff --git a/sql/set_var.cc b/sql/set_var.cc index 9f63188c28a..3d3ba6d6ab7 100644 --- a/sql/set_var.cc +++ b/sql/set_var.cc @@ -48,7 +48,7 @@ new attribute. */ -#ifdef __GNUC__ +#ifdef USE_PRAGMA_IMPLEMENTATION #pragma implementation // gcc: Class implementation #endif diff --git a/sql/sql_analyse.cc b/sql/sql_analyse.cc index 7ac9a0866df..fb5d0eb0a3f 100644 --- a/sql/sql_analyse.cc +++ b/sql/sql_analyse.cc @@ -23,7 +23,7 @@ ** - type set is out of optimization yet */ -#ifdef __GNUC__ +#ifdef USE_PRAGMA_IMPLEMENTATION #pragma implementation // gcc: Class implementation #endif diff --git a/sql/sql_analyse.h b/sql/sql_analyse.h index 3d1cffecaef..8523b05a1de 100644 --- a/sql/sql_analyse.h +++ b/sql/sql_analyse.h @@ -17,7 +17,7 @@ /* Analyse database */ -#ifdef __GNUC__ +#ifdef USE_PRAGMA_INTERFACE #pragma interface /* gcc class implementation */ #endif diff --git a/sql/sql_class.cc b/sql/sql_class.cc index c20d5f79277..805db107370 100644 --- a/sql/sql_class.cc +++ b/sql/sql_class.cc @@ -22,7 +22,7 @@ ** *****************************************************************************/ -#ifdef __GNUC__ +#ifdef USE_PRAGMA_IMPLEMENTATION #pragma implementation // gcc: Class implementation #endif diff --git a/sql/sql_crypt.cc b/sql/sql_crypt.cc index b0b8050e311..f21a109e95d 100644 --- a/sql/sql_crypt.cc +++ b/sql/sql_crypt.cc @@ -23,7 +23,7 @@ needs something like 'ssh'. */ -#ifdef __GNUC__ +#ifdef USE_PRAGMA_IMPLEMENTATION #pragma implementation // gcc: Class implementation #endif diff --git a/sql/sql_crypt.h b/sql/sql_crypt.h index 1b27f0a4d27..25bc2d29e1d 100644 --- a/sql/sql_crypt.h +++ b/sql/sql_crypt.h @@ -15,7 +15,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#ifdef __GNUC__ +#ifdef USE_PRAGMA_INTERFACE #pragma interface /* gcc class implementation */ #endif diff --git a/sql/sql_list.cc b/sql/sql_list.cc index c99cfb8c918..d57a7dfe4e3 100644 --- a/sql/sql_list.cc +++ b/sql/sql_list.cc @@ -15,7 +15,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#ifdef __GNUC__ +#ifdef USE_PRAGMA_IMPLEMENTATION #pragma implementation // gcc: Class implementation #endif diff --git a/sql/sql_map.cc b/sql/sql_map.cc index e7e24f957c6..aac44949d89 100644 --- a/sql/sql_map.cc +++ b/sql/sql_map.cc @@ -15,7 +15,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#ifdef __GNUC__ +#ifdef USE_PRAGMA_IMPLEMENTATION #pragma implementation // gcc: Class implementation #endif diff --git a/sql/sql_map.h b/sql/sql_map.h index 632eb6e4f64..bfa6011ac54 100644 --- a/sql/sql_map.h +++ b/sql/sql_map.h @@ -17,7 +17,7 @@ /* interface for memory mapped files */ -#ifdef __GNUC__ +#ifdef USE_PRAGMA_INTERFACE #pragma interface /* gcc class implementation */ #endif diff --git a/sql/sql_olap.cc b/sql/sql_olap.cc index 46f1e6c156e..024abb6c74b 100644 --- a/sql/sql_olap.cc +++ b/sql/sql_olap.cc @@ -28,7 +28,7 @@ #ifdef DISABLED_UNTIL_REWRITTEN_IN_4_1 -#ifdef __GNUC__ +#ifdef USE_PRAGMA_IMPLEMENTATION #pragma implementation // gcc: Class implementation #endif diff --git a/sql/sql_select.cc b/sql/sql_select.cc index fb7f10abb52..7b27879ae28 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -17,7 +17,7 @@ /* mysql_select and join optimization */ -#ifdef __GNUC__ +#ifdef USE_PRAGMA_IMPLEMENTATION #pragma implementation // gcc: Class implementation #endif diff --git a/sql/sql_string.cc b/sql/sql_string.cc index c1701e7e9bf..ab2db4aaf53 100644 --- a/sql/sql_string.cc +++ b/sql/sql_string.cc @@ -16,7 +16,7 @@ /* This file is originally from the mysql distribution. Coded by monty */ -#ifdef __GNUC__ +#ifdef USE_PRAGMA_IMPLEMENTATION #pragma implementation // gcc: Class implementation #endif diff --git a/sql/sql_udf.cc b/sql/sql_udf.cc index 126d2e5d894..f5b4775ee0b 100644 --- a/sql/sql_udf.cc +++ b/sql/sql_udf.cc @@ -28,7 +28,7 @@ ** dynamic functions, so this shouldn't be a real problem. */ -#ifdef __GNUC__ +#ifdef USE_PRAGMA_IMPLEMENTATION #pragma implementation // gcc: implement sql_udf.h #endif diff --git a/sql/tztime.cc b/sql/tztime.cc index c45271966f9..8fac054c49c 100644 --- a/sql/tztime.cc +++ b/sql/tztime.cc @@ -20,7 +20,7 @@ (We will refer to this code as to elsie-code further.) */ -#ifdef __GNUC__ +#ifdef USE_PRAGMA_IMPLEMENTATION #pragma implementation // gcc: Class implementation #endif From ab88a1d25a95e04ff0f22ac9e8e3e69d77c428dc Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 26 May 2005 12:12:36 +0200 Subject: [PATCH 4/6] Fix icc compiler warning ndb/src/kernel/blocks/dbtux/Dbtux.hpp: Removed second forward declaration of "struct DescEnt" --- ndb/src/kernel/blocks/dbtux/Dbtux.hpp | 1 - 1 file changed, 1 deletion(-) diff --git a/ndb/src/kernel/blocks/dbtux/Dbtux.hpp b/ndb/src/kernel/blocks/dbtux/Dbtux.hpp index 2c96271eb5d..3d78fccb780 100644 --- a/ndb/src/kernel/blocks/dbtux/Dbtux.hpp +++ b/ndb/src/kernel/blocks/dbtux/Dbtux.hpp @@ -342,7 +342,6 @@ private: * Complete metadata for one index. The array of attributes has * variable size. */ - struct DescEnt; friend struct DescEnt; struct DescEnt { DescHead m_descHead; From 9181c17c143063bd2714c6524772f5b10d412844 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 26 May 2005 15:42:24 +0300 Subject: [PATCH 5/6] InnoDB: Check all referencing tables in DROP DATABASE (Bug #10335). innobase/row/row0mysql.c: row_drop_table_for_mysql(): Check all referencing tables when drop_db==TRUE (Bug #10335) --- innobase/row/row0mysql.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/innobase/row/row0mysql.c b/innobase/row/row0mysql.c index a915200161f..86557315b71 100644 --- a/innobase/row/row0mysql.c +++ b/innobase/row/row0mysql.c @@ -2143,6 +2143,7 @@ row_drop_table_for_mysql( foreign = UT_LIST_GET_FIRST(table->referenced_list); while (foreign && foreign->foreign_table == table) { + check_next_foreign: foreign = UT_LIST_GET_NEXT(referenced_list, foreign); } @@ -2171,6 +2172,10 @@ row_drop_table_for_mysql( goto funct_exit; } + if (foreign && trx->check_foreigns) { + goto check_next_foreign; + } + if (table->n_mysql_handles_opened > 0) { ibool added; From 80b0baa7405ddb36637ee7ceeb2b15ff90af6635 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 26 May 2005 17:30:12 +0300 Subject: [PATCH 6/6] fixed problem with long string results of expressions in UNIONS (BUG#10025) mysql-test/r/union.result: test for Bug #10025 mysql-test/t/union.test: test for Bug #10025 sql/item.cc: set HA_OPTION_PACK_RECORD and change type to MYSQL_TYPE_STRING, to allow correct field creation in case of length more then 255 (creation STRING field with length more then 255) --- mysql-test/r/union.result | 14 ++++++++++++++ mysql-test/t/union.test | 11 +++++++++++ sql/item.cc | 4 ++-- 3 files changed, 27 insertions(+), 2 deletions(-) diff --git a/mysql-test/r/union.result b/mysql-test/r/union.result index c140ecd26e1..57dfd48b6bd 100644 --- a/mysql-test/r/union.result +++ b/mysql-test/r/union.result @@ -1235,3 +1235,17 @@ show columns from t2; Field Type Null Key Default Extra a varchar(3) YES NULL drop table t2, t1; +CREATE TABLE t1 (a mediumtext); +CREATE TABLE t2 (b varchar(20)); +INSERT INTO t1 VALUES ('a'),('b'); +SELECT left(a,100000000) FROM t1 UNION SELECT b FROM t2; +left(a,100000000) +a +b +create table t3 SELECT left(a,100000000) FROM t1 UNION SELECT b FROM t2; +show create table t3; +Table Create Table +t3 CREATE TABLE `t3` ( + `left(a,100000000)` longtext +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +drop tables t1,t2,t3; diff --git a/mysql-test/t/union.test b/mysql-test/t/union.test index b0446e1ea4a..ffc7e718e9d 100644 --- a/mysql-test/t/union.test +++ b/mysql-test/t/union.test @@ -742,3 +742,14 @@ create table t2 select a from t1 union select c from t1; create table t2 select a from t1 union select b from t1; show columns from t2; drop table t2, t1; + +# +# correct conversion long string to TEXT (BUG#10025) +# +CREATE TABLE t1 (a mediumtext); +CREATE TABLE t2 (b varchar(20)); +INSERT INTO t1 VALUES ('a'),('b'); +SELECT left(a,100000000) FROM t1 UNION SELECT b FROM t2; +create table t3 SELECT left(a,100000000) FROM t1 UNION SELECT b FROM t2; +show create table t3; +drop tables t1,t2,t3; diff --git a/sql/item.cc b/sql/item.cc index 59785813566..8bc26c8c679 100644 --- a/sql/item.cc +++ b/sql/item.cc @@ -3099,8 +3099,8 @@ Field *Item_type_holder::make_field_by_type(TABLE *table) enum_set_typelib, collation.collation); case MYSQL_TYPE_VAR_STRING: table->db_create_options|= HA_OPTION_PACK_RECORD; - return new Field_string(max_length, maybe_null, name, table, - collation.collation); + fld_type= MYSQL_TYPE_STRING; + break; default: break; }