diff --git sql/CMakeLists.txt sql/CMakeLists.txt
index ecf91fc..adbb7bb 100644
--- sql/CMakeLists.txt
+++ sql/CMakeLists.txt
@@ -31,7 +31,7 @@ ${CMAKE_CURRENT_BINARY_DIR}/lex_hash.h
 
 SET_SOURCE_FILES_PROPERTIES(${GEN_SOURCES} PROPERTIES GENERATED 1)
 
-ADD_DEFINITIONS(-DMYSQL_SERVER -DHAVE_EVENT_SCHEDULER -DHAVE_POOL_OF_THREADS) 
+ADD_DEFINITIONS(-DMYSQL_SERVER -DHAVE_EVENT_SCHEDULER) 
 IF(SSL_DEFINES)
  ADD_DEFINITIONS(${SSL_DEFINES})
 ENDIF()
@@ -83,18 +83,11 @@ SET (SQL_SOURCE
                opt_index_cond_pushdown.cc opt_subselect.cc
                opt_table_elimination.cc sql_expression_cache.cc
                gcalc_slicescan.cc gcalc_tools.cc
-			   threadpool_common.cc 
 			   ../sql-common/mysql_async.c
                ${GEN_SOURCES}
                ${MYSYS_LIBWRAP_SOURCE}
 			   )
   
-IF(WIN32)
-  SET(SQL_SOURCE ${SQL_SOURCE} threadpool_win.cc)
-ELSE()
- SET(SQL_SOURCE ${SQL_SOURCE} threadpool_unix.cc)
-ENDIF()
-
 MYSQL_ADD_PLUGIN(partition ha_partition.cc STORAGE_ENGINE DEFAULT STATIC_ONLY
 RECOMPILE_FOR_EMBEDDED)
 
diff --git sql/scheduler.h sql/scheduler.h
index 82bba5a..fa38335 100644
--- sql/scheduler.h
+++ sql/scheduler.h
@@ -99,14 +99,7 @@ public:
   void *data;                  /* scheduler-specific data structure */
 };
 
-#if !defined(EMBEDDED_LIBRARY)
-#define HAVE_POOL_OF_THREADS 1
-void pool_of_threads_scheduler(scheduler_functions* func,
-   ulong *arg_max_connections,
-   uint *arg_connection_count);
-#else
 #define pool_of_threads_scheduler(A,B,C) \
   one_thread_per_connection_scheduler(A, B, C)
-#endif
 
 #endif /* SCHEDULER_INCLUDED */
diff --git strings/dtoa.c strings/dtoa.c
index 6b21605..4bb5de9 100644
--- strings/dtoa.c
+++ strings/dtoa.c
@@ -51,7 +51,7 @@
 #define DTOA_OVERFLOW 9999
 
 static double my_strtod_int(const char *, char **, int *, char *, size_t);
-static char *dtoa(double, int, int, int *, int *, char **, char *, size_t);
+static char *x_dtoa(double, int, int, int *, int *, char **, char *, size_t);
 static void dtoa_free(char *, char *, size_t);
 
 /**
@@ -92,7 +92,7 @@ size_t my_fcvt(double x, int precision, char *to, my_bool *error)
   char buf[DTOA_BUFF_SIZE];
   DBUG_ASSERT(precision >= 0 && precision < NOT_FIXED_DEC && to != NULL);
   
-  res= dtoa(x, 5, precision, &decpt, &sign, &end, buf, sizeof(buf));
+  res= x_dtoa(x, 5, precision, &decpt, &sign, &end, buf, sizeof(buf));
 
   if (decpt == DTOA_OVERFLOW)
   {
@@ -221,7 +221,7 @@ size_t my_gcvt(double x, my_gcvt_arg_type type, int width, char *to,
   if (x < 0.)
     width--;
 
-  res= dtoa(x, 4, type == MY_GCVT_ARG_DOUBLE ? width : min(width, FLT_DIG),
+  res= x_dtoa(x, 4, type == MY_GCVT_ARG_DOUBLE ? width : min(width, FLT_DIG),
             &decpt, &sign, &end, buf, sizeof(buf));
   if (decpt == DTOA_OVERFLOW)
   {
@@ -327,7 +327,7 @@ size_t my_gcvt(double x, my_gcvt_arg_type type, int width, char *to,
         number of significant digits = (len-decpt) - (len-width) = width-decpt
       */
       dtoa_free(res, buf, sizeof(buf));
-      res= dtoa(x, 5, width - decpt, &decpt, &sign, &end, buf, sizeof(buf));
+      res= x_dtoa(x, 5, width - decpt, &decpt, &sign, &end, buf, sizeof(buf));
       src= res;
       len= end - res;
     }
@@ -393,7 +393,7 @@ size_t my_gcvt(double x, my_gcvt_arg_type type, int width, char *to,
     {
       /* Yes, re-convert with a smaller width */
       dtoa_free(res, buf, sizeof(buf));
-      res= dtoa(x, 4, width, &decpt, &sign, &end, buf, sizeof(buf));
+      res= x_dtoa(x, 4, width, &decpt, &sign, &end, buf, sizeof(buf));
       src= res;
       len= end - res;
       if (--decpt < 0)
@@ -2166,7 +2166,7 @@ static int quorem(Bigint *b, Bigint *S)
            calculation.
  */
 
-static char *dtoa(double dd, int mode, int ndigits, int *decpt, int *sign,
+static char *x_dtoa(double dd, int mode, int ndigits, int *decpt, int *sign,
                   char **rve, char *buf, size_t buf_size)
 {
   /*