Commit ebb618c9 authored by Jondy Zhao's avatar Jondy Zhao

mariadb: add patch for cygwin, and fix 3 issues:

      * no epoll in the cygwin, so we remove thread-pool functions
      * Error: CFI instruction used without previous .cfi_startproc
      * cmake could't configure ncurses
parent e97775a1
...@@ -26,7 +26,7 @@ md5sum = 3fe756bc76f0e7a3af2757e48ce0f3f4 ...@@ -26,7 +26,7 @@ md5sum = 3fe756bc76f0e7a3af2757e48ce0f3f4
keep-compile-dir = true keep-compile-dir = true
patch-options = -p0 patch-options = -p0
patches = patches =
${:_profile_base_location_}/mariadb-5.5.25-no-mysql-test.patch ${:_profile_base_location_}/mariadb_5.5_create_system_tables__no_test.patch
configure-command = ${cmake:location}/bin/cmake configure-command = ${cmake:location}/bin/cmake
configure-options = configure-options =
...@@ -72,10 +72,7 @@ environment = ...@@ -72,10 +72,7 @@ environment =
PKG_CONFIG_PATH=${groonga:location}/lib/pkgconfig:${groonga-normalizer-mysql:location}/lib/pkgconfig PKG_CONFIG_PATH=${groonga:location}/lib/pkgconfig:${groonga-normalizer-mysql:location}/lib/pkgconfig
[mariadb:cygwin] [mariadb:cygwin]
version = 5.5.25 dependencies = cmake zlib libevent ncurses openssl pkgconfig readline5
dependencies = cmake zlib libevent ncurses openssl pkgconfig readline bison
url = http://downloads.askmonty.org/f/mariadb-${:version}/kvm-tarbake-jaunty-x86/mariadb-${:version}.tar.gz/from/http://ftp.osuosl.org/pub/mariadb
md5sum = 943f67c267d73a4080ab497e11740daf
configure-options = configure-options =
-DCMAKE_INSTALL_PREFIX=%(prefix)s -DCMAKE_INSTALL_PREFIX=%(prefix)s
-DBUILD_CONFIG=mysql_release -DBUILD_CONFIG=mysql_release
...@@ -90,9 +87,11 @@ configure-options = ...@@ -90,9 +87,11 @@ configure-options =
-DWITH_EMBEDDED_SERVER=0 -DWITH_EMBEDDED_SERVER=0
-DWITHOUT_EXAMPLE_STORAGE_ENGINE=1 -DWITHOUT_EXAMPLE_STORAGE_ENGINE=1
-DWITHOUT_DAEMON_EXAMPLE=1 -DWITHOUT_DAEMON_EXAMPLE=1
-DHAVE_CURSES_H=1
-DHAVE_TERM_H=1
patch-options = -p1
patches = patches =
${mariadb:patches} ${:_profile_base_location_}/mariadb-5.5-cygwin.patch
${:_profile_base_location_}/cygwin-mariadb-5.5.25-no-threadpool.patch
post-install = post-install =
ln -fs %(prefix)s/lib/libmysqlclient.dll.a %(prefix)s/lib/libmysqlclient_r.dll.a ln -fs %(prefix)s/lib/libmysqlclient.dll.a %(prefix)s/lib/libmysqlclient_r.dll.a
cp --preserve -f %(prefix)s/lib/cygmysqlclient-*.dll %(prefix)s/bin cp --preserve -f %(prefix)s/lib/cygmysqlclient-*.dll %(prefix)s/bin
\ No newline at end of file
diff --git a/client/mysql.cc b/client/mysql.cc
index ad792ab..9fc0ef6 100644
--- a/client/mysql.cc
+++ b/client/mysql.cc
@@ -60,8 +60,8 @@ static char *server_version= NULL;
extern "C" {
#if defined(HAVE_CURSES_H) && defined(HAVE_TERM_H)
-#include <curses.h>
-#include <term.h>
+#include <ncurses/curses.h>
+#include <ncurses/term.h>
#else
#if defined(HAVE_TERMIOS_H)
#include <termios.h>
diff --git a/mysys/my_context.c b/mysys/my_context.c
index 08dc092..e4f28a2 100644
--- a/mysys/my_context.c
+++ b/mysys/my_context.c
@@ -213,7 +213,7 @@ my_context_spawn(struct my_context *c, void (*f)(void *), void *d)
helps tools that use DWARF stack unwinding to obtain stack traces.
(I use numeric constant to avoid a dependency on libdwarf includes).
*/
- ".cfi_escape 0x07, 16\n\t"
+ /* ".cfi_escape 0x07, 16\n\t" */
#endif
"movq %%rbp, 8(%[save])\n\t"
"movq %%rbx, 16(%[save])\n\t"
@@ -463,7 +463,7 @@ my_context_spawn(struct my_context *c, void (*f)(void *), void *d)
helps tools that use DWARF stack unwinding to obtain stack traces.
(I use numeric constant to avoid a dependency on libdwarf includes).
*/
- ".cfi_escape 0x07, 8\n\t"
+ /* ".cfi_escape 0x07, 8\n\t" */
#endif
/* Push the parameter on the stack. */
"pushl %[d]\n\t"
diff --git a/sql/CMakeLists.txt b/sql/CMakeLists.txt
index ad22446..73a19e5 100644
--- a/sql/CMakeLists.txt
+++ b/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 a/sql/scheduler.h b/sql/scheduler.h
index 4e200e8..2134344 100644
--- a/sql/scheduler.h
+++ b/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 a/strings/dtoa.c b/strings/dtoa.c
index 6b21605..4bb5de9 100644
--- a/strings/dtoa.c
+++ b/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)
{
/*
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment