summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2012-07-31 19:29:07 +0200
committerSergei Golubchik <sergii@pisem.net>2012-07-31 19:29:07 +0200
commit0117a92fedc2e5294682127d54034af5b3f96c8e (patch)
tree0c075a3fa43f64a3895acc704bacf69a96afda14 /sql
parent42ea25d4c51b5466b4b03a29abe480e763732cf2 (diff)
downloadmariadb-git-0117a92fedc2e5294682127d54034af5b3f96c8e.tar.gz
MDEV-419 ensure that all HAVE_XXX constants can be set by cmake
add missing checks to configure.cmake remove dead code and unused HAVE_xxx constants from the sources
Diffstat (limited to 'sql')
-rw-r--r--sql/mysqld.cc4
-rw-r--r--sql/signal_handler.cc17
-rw-r--r--sql/spatial.h2
-rw-r--r--sql/sql_insert.cc4
-rw-r--r--sql/sql_profile.h2
5 files changed, 3 insertions, 26 deletions
diff --git a/sql/mysqld.cc b/sql/mysqld.cc
index c01aebf99f9..063567388aa 100644
--- a/sql/mysqld.cc
+++ b/sql/mysqld.cc
@@ -106,7 +106,7 @@
/* We have HAVE_valgrind below as this speeds up the shutdown of MySQL */
-#if defined(HAVE_DEC_3_2_THREADS) || defined(SIGNALS_DONT_BREAK_READ) || defined(HAVE_valgrind) && defined(__linux__)
+#if defined(SIGNALS_DONT_BREAK_READ) || defined(HAVE_valgrind) && defined(__linux__)
#define HAVE_CLOSE_SERVER_SOCK 1
#endif
@@ -2927,11 +2927,9 @@ static void start_signal_handler(void)
DBUG_ENTER("start_signal_handler");
(void) pthread_attr_init(&thr_attr);
-#if !defined(HAVE_DEC_3_2_THREADS)
pthread_attr_setscope(&thr_attr,PTHREAD_SCOPE_SYSTEM);
(void) pthread_attr_setdetachstate(&thr_attr,PTHREAD_CREATE_DETACHED);
(void) my_setstacksize(&thr_attr,my_thread_stack_size);
-#endif
mysql_mutex_lock(&LOCK_thread_count);
if ((error= mysql_thread_create(key_thread_signal_hand,
diff --git a/sql/signal_handler.cc b/sql/signal_handler.cc
index 37f28844a7c..edc33c4d63b 100644
--- a/sql/signal_handler.cc
+++ b/sql/signal_handler.cc
@@ -138,23 +138,6 @@ extern "C" sig_handler handle_fatal_signal(int sig)
my_safe_printf_stderr("%s",
"Hope that's ok; if not, decrease some variables in the equation.\n\n");
-#if defined(HAVE_LINUXTHREADS)
-#define UNSAFE_DEFAULT_LINUX_THREADS 200
- if (sizeof(char*) == 4 && thread_count > UNSAFE_DEFAULT_LINUX_THREADS)
- {
- my_safe_printf_stderr(
- "You seem to be running 32-bit Linux and have "
- "%d concurrent connections.\n"
- "If you have not changed STACK_SIZE in LinuxThreads "
- "and built the binary \n"
- "yourself, LinuxThreads is quite likely to steal "
- "a part of the global heap for\n"
- "the thread stack. Please read "
- "http://dev.mysql.com/doc/mysql/en/linux-installation.html\n\n"
- thread_count);
- }
-#endif /* HAVE_LINUXTHREADS */
-
#ifdef HAVE_STACKTRACE
thd= current_thd;
diff --git a/sql/spatial.h b/sql/spatial.h
index 0d0560656f0..07675d59040 100644
--- a/sql/spatial.h
+++ b/sql/spatial.h
@@ -554,5 +554,5 @@ public:
struct Geometry_buffer : public
my_aligned_storage<sizeof(Gis_point), MY_ALIGNOF(Gis_point)> {};
-#endif /*HAVE_SPATAIAL*/
+#endif /*HAVE_SPATIAL*/
#endif
diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc
index 54f94ce78c1..e0d0d4c4223 100644
--- a/sql/sql_insert.cc
+++ b/sql/sql_insert.cc
@@ -2781,9 +2781,6 @@ pthread_handler_t handle_delayed_insert(void *arg)
{
int error;
mysql_audit_release(thd);
-#if defined(HAVE_BROKEN_COND_TIMEDWAIT)
- error= mysql_cond_wait(&di->cond, &di->mutex);
-#else
error= mysql_cond_timedwait(&di->cond, &di->mutex, &abstime);
#ifdef EXTRA_DEBUG
if (error && error != EINTR && error != ETIMEDOUT)
@@ -2793,7 +2790,6 @@ pthread_handler_t handle_delayed_insert(void *arg)
error));
}
#endif
-#endif
if (error == ETIMEDOUT || error == ETIME)
thd->killed= KILL_CONNECTION;
}
diff --git a/sql/sql_profile.h b/sql/sql_profile.h
index 2e93912fb25..7705f6ca476 100644
--- a/sql/sql_profile.h
+++ b/sql/sql_profile.h
@@ -287,5 +287,5 @@ public:
int fill_statistics_info(THD *thd, TABLE_LIST *tables, Item *cond);
};
-# endif /* HAVE_PROFILING */
+# endif /* ENABLED_PROFILING */
#endif /* _SQL_PROFILE_H */