summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorunknown <monty@hundin.mysql.fi>2002-08-08 03:14:44 +0300
committerunknown <monty@hundin.mysql.fi>2002-08-08 03:14:44 +0300
commita9c47d8cfc9d93dd93409c3d3681a4f726a456e5 (patch)
treee700bcb0baacd3c2e36818839eb18c8744ddf5dd
parent7448e105224e2b3808789ab2b77e0268acf45321 (diff)
downloadmariadb-git-a9c47d8cfc9d93dd93409c3d3681a4f726a456e5.tar.gz
Fix for Intel compiler (ecc)
Minor cleanups to other patches. Make --temp-pool default Docs/manual.texi: Changelog configure.in: Fix for Intel compiler (ecc) include/my_global.h: Cleaned up QNX specific code. include/my_pthread.h: Safety include/my_semaphore.h: Cleaned up BSDI fix. mysys/my_pthread.c: Code comments mysys/my_semaphore.c: Fix for BSDI sql/mysqld.cc: Make --temp-pool default sql/sql_parse.cc: Safety
-rw-r--r--Docs/manual.texi7
-rw-r--r--configure.in13
-rw-r--r--include/my_global.h24
-rw-r--r--include/my_pthread.h3
-rw-r--r--include/my_semaphore.h6
-rw-r--r--mysys/my_pthread.c8
-rw-r--r--mysys/my_semaphore.c1
-rw-r--r--sql/mysqld.cc4
-rw-r--r--sql/sql_parse.cc2
9 files changed, 46 insertions, 22 deletions
diff --git a/Docs/manual.texi b/Docs/manual.texi
index b1d730609a5..1c6b31d9af2 100644
--- a/Docs/manual.texi
+++ b/Docs/manual.texi
@@ -8168,6 +8168,9 @@ Renamed mysqld startup options @code{--skip-locking} to
@code{--skip-external-locking} and @code{--enable-locking} to
@code{--external-locking}.
@item
+mysqld now has the option @code{--temp-pool} enabled by default as this
+gives better performance with some OS.
+@item
@code{DOUBLE} and @code{FLOAT} columns now honour the
@code{UNSIGNED} flag on storage (before, @code{UNSIGNED} was ignored for
these columns).
@@ -50132,6 +50135,10 @@ each individual 4.0.x release.
@itemize @bullet
@item
+mysqld now has the option @code{--temp-pool} enabled by default as this
+gives better performance with some OS.
+@item
+@item
Fixed bug in @code{REVOKE} that caused user resources to be randomly set.
@item
Fixed bug in @code{GRANT} for the new @code{CREATE TEMPORARY TABLE} privilege.
diff --git a/configure.in b/configure.in
index 144447d4cb6..7e48522dbf0 100644
--- a/configure.in
+++ b/configure.in
@@ -1554,6 +1554,17 @@ AC_SUBST(TERMCAP_LIB)
#########################################################################
dnl Checks for library functions.
+
+#
+# The following code disables intrinsic function support while we test for
+# library functions. This is to avoid configure problems with Intel ecc
+# compiler
+
+ORG_CFLAGS="$CFLAGS"
+if test "$GCC" != "yes"; then
+ AC_SYS_COMPILER_FLAG(-nolib_inline,nolib_inline,CFLAGS,[],[])
+fi
+
AC_FUNC_MMAP
AC_TYPE_SIGNAL
MYSQL_TYPE_QSORT
@@ -1576,6 +1587,8 @@ AC_CHECK_FUNCS(alarm bmove \
pthread_condattr_create rwlock_init pthread_rwlock_rdlock \
fchmod getpass getpassphrase initgroups mlockall)
+CFLAGS="$ORG_CFLAGS"
+
# Sanity check: We chould not have any fseeko symbol unless
# large_file_support=yes
AC_CHECK_FUNCS(fseeko,
diff --git a/include/my_global.h b/include/my_global.h
index c4a11a42541..e65e803c335 100644
--- a/include/my_global.h
+++ b/include/my_global.h
@@ -121,14 +121,6 @@
/* #define _AIX32_CURSES */ /* XXX: this breaks AIX 4.3.3 (others?). */
#endif
-#ifdef __QNXNTO__
-#define HAVE_ERRNO_AS_DEFINE
-#define HAVE_FCNTL_LOCK
-#undef HAVE_SYS_UN_H
-#undef HAVE_FINITE
-#undef HAVE_RINT
-#endif
-
#ifdef HAVE_BROKEN_SNPRINTF /* HPUX 10.20 don't have this defined */
#undef HAVE_SNPRINTF
#endif
@@ -253,6 +245,17 @@
#define setrlimit cma_setrlimit64
#endif
+#ifdef __QNXNTO__
+/* This has to be after include limits.h */
+#define HAVE_ERRNO_AS_DEFINE
+#define HAVE_FCNTL_LOCK
+#undef HAVE_SYS_UN_H
+#undef HAVE_FINITE
+#undef HAVE_RINT
+#undef LONGLONG_MIN /* These get wrongly defined in QNX 6.2 */
+#undef LONGLONG_MAX /* standard system library 'limits.h' */
+#endif
+
/* We can not live without the following defines */
#define USE_MYFUNC 1 /* Must use syscall indirection */
@@ -548,11 +551,6 @@ extern double my_atof(const char*);
#define HAVE_LONG_LONG 1
#endif
-#ifdef __QNXNTO__
-#undef LONGLONG_MIN /* These get wrongly defined in QNX 6.2 */
-#undef LONGLONG_MAX /* standard system library 'limits.h' */
-#endif
-
#if defined(HAVE_LONG_LONG) && !defined(LONGLONG_MIN)
#define LONGLONG_MIN ((long long) 0x8000000000000000LL)
#define LONGLONG_MAX ((long long) 0x7FFFFFFFFFFFFFFFLL)
diff --git a/include/my_pthread.h b/include/my_pthread.h
index a822d2db484..576c18fa02d 100644
--- a/include/my_pthread.h
+++ b/include/my_pthread.h
@@ -430,8 +430,9 @@ struct tm *localtime_r(const time_t *clock, struct tm *res);
#if defined(HPUX) && !defined(DONT_REMAP_PTHREAD_FUNCTIONS)
#undef pthread_cond_timedwait
+#undef pthread_mutex_trylock
#define pthread_cond_timedwait(a,b,c) my_pthread_cond_timedwait((a),(b),(c))
-#define pthread_mutex_trylock(a) my_pthread_mutex_trylock((a))
+#define pthread_mutex_trylock(a) my_pthread_mutex_trylock((a))
int my_pthread_cond_timedwait(pthread_cond_t *cond, pthread_mutex_t *mutex,
struct timespec *abstime);
int my_pthread_mutex_trylock(pthread_mutex_t *mutex);
diff --git a/include/my_semaphore.h b/include/my_semaphore.h
index e08138495f7..0deac1a60d1 100644
--- a/include/my_semaphore.h
+++ b/include/my_semaphore.h
@@ -35,8 +35,6 @@ C_MODE_START
#ifdef HAVE_SEMAPHORE_H
#include <semaphore.h>
#elif defined(__bsdi__)
-#include <sys/errno.h>
-#else
#ifdef __WIN__
typedef HANDLE sem_t;
#else
@@ -45,7 +43,7 @@ typedef struct {
pthread_cond_t cond;
uint count;
} sem_t;
-#endif
+#endif /* __WIN__ */
int sem_init(sem_t * sem, int pshared, unsigned int value);
int sem_destroy(sem_t * sem);
@@ -55,7 +53,7 @@ int sem_post(sem_t * sem);
int sem_post_multiple(sem_t * sem, unsigned int count);
int sem_getvalue(sem_t * sem, unsigned int * sval);
-#endif
+#endif /* !__bsdi__ */
C_MODE_END
#endif /* !_my_semaphore_h_ */
diff --git a/mysys/my_pthread.c b/mysys/my_pthread.c
index 38451f1f79a..cb37fe7c73f 100644
--- a/mysys/my_pthread.c
+++ b/mysys/my_pthread.c
@@ -438,6 +438,12 @@ int my_pthread_cond_timedwait(pthread_cond_t *cond, pthread_mutex_t *mutex,
#ifdef HPUX
+/*
+ In HP-UX-10.20 and other old Posix 1003.4a Draft 4 implementations
+ pthread_mutex_trylock returns 1 on success, not 0 like
+ pthread_mutex_lock
+*/
+
int my_pthread_mutex_trylock(pthread_mutex_t *mutex)
{
int error=pthread_mutex_trylock(mutex);
@@ -447,9 +453,9 @@ int my_pthread_mutex_trylock(pthread_mutex_t *mutex)
error=errno;
return error;
}
-
#endif
+
/* Some help functions */
int pthread_no_free(void *not_used __attribute__((unused)))
diff --git a/mysys/my_semaphore.c b/mysys/my_semaphore.c
index de4aac1cdbd..2dd224cd99e 100644
--- a/mysys/my_semaphore.c
+++ b/mysys/my_semaphore.c
@@ -21,6 +21,7 @@
#include <my_global.h>
#include <my_semaphore.h>
+#include <errno.h>
#if !defined(__WIN__) && !defined(HAVE_SEMAPHORE_H)
diff --git a/sql/mysqld.cc b/sql/mysqld.cc
index d441c9c8412..6e660d9b335 100644
--- a/sql/mysqld.cc
+++ b/sql/mysqld.cc
@@ -3251,8 +3251,8 @@ struct my_option my_long_options[] =
#endif
{"temp-pool", OPT_TEMP_POOL,
"Using this option will cause most temporary files created to use a small set of names, rather than a unique name for each new file.",
- (gptr*) &use_temp_pool, (gptr*) &use_temp_pool, 0, GET_BOOL, NO_ARG, 0, 0,
- 0, 0, 0, 0},
+ (gptr*) &use_temp_pool, (gptr*) &use_temp_pool, 0, GET_BOOL, NO_ARG, 1,
+ 0, 0, 0, 0, 0},
{"tmpdir", 't', "Path for temporary files", (gptr*) &opt_mysql_tmpdir,
(gptr*) &opt_mysql_tmpdir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"transaction-isolation", OPT_TX_ISOLATION,
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc
index 3aff3255706..c28b892f05c 100644
--- a/sql/sql_parse.cc
+++ b/sql/sql_parse.cc
@@ -1476,7 +1476,7 @@ mysql_execute_command(void)
/* Check that the first table has CREATE privilege */
TABLE_LIST *tmp_table_list=tables->next;
tables->next=0;
- bool error=check_grant(thd,CREATE_ACL,tables);
+ bool error=check_grant(thd, want_priv, tables);
tables->next=tmp_table_list;
if (error)
goto error;