maria-developers team mailing list archive
-
maria-developers team
-
Mailing list archive
-
Message #01143
Rev 2756: Fix PBXT build on windows by backporting some of their changes (under advise of Vlad Kolesnikov): in file:///home/psergey/bzr-new/maria-5.1-build2/
At file:///home/psergey/bzr-new/maria-5.1-build2/
------------------------------------------------------------
revno: 2756
revision-id: psergey@xxxxxxxxxxxx-20091006151601-t376udsq9kgnpx9d
parent: knielsen@xxxxxxxxxxxxxxx-20091006140253-4jkht94qyc9q5zho
committer: Sergey Petrunya <psergey@xxxxxxxxxxxx>
branch nick: maria-5.1-build2
timestamp: Tue 2009-10-06 19:16:01 +0400
message:
Fix PBXT build on windows by backporting some of their changes (under advise of Vlad Kolesnikov):
- Adjust CMakeLists.txt to follow latest mysql's expectations about plugins
- Add typecasts
- wrap pbms_enabled.cc in #ifdef
=== renamed file 'storage/pbxt/src/CMakeLists.txt' => 'storage/pbxt/CMakeLists.txt'
--- a/storage/pbxt/src/CMakeLists.txt 2009-03-26 12:18:01 +0000
+++ b/storage/pbxt/CMakeLists.txt 2009-10-06 15:16:01 +0000
@@ -32,22 +32,72 @@
${CMAKE_SOURCE_DIR}/regex
${CMAKE_SOURCE_DIR}/extra/yassl/include)
-SET(PBXT_SOURCES ha_pbxt.cc bsearch_xt.cc index_xt.cc strutil_xt.cc cache_xt.cc linklist_xt.cc
- ccutils_xt.cc lock_xt.cc table_xt.cc database_xt.cc thread_xt.cc
- datadic_xt.cc memory_xt.cc trace_xt.cc datalog_xt.cc myxt_xt.cc util_xt.cc
- filesys_xt.cc pthread_xt.cc xaction_xt.cc restart_xt.cc xactlog_xt.cc
- hashtab_xt.cc sortedlist_xt.cc heap_xt.cc streaming_xt.cc tabcache_xt.cc
- systab_xt.cc ha_xtsys.cc discover_xt.cc
- bsearch_xt.h linklist_xt.h tabcache_xt.h cache_xt.h lock_xt.h table_xt.h
- ccutils_xt.h thread_xt.h database_xt.h memory_xt.h trace_xt.h
- datadic_xt.h pbms.h util_xt.h datalog_xt.h myxt_xt.h xaction_xt.h
- filesys_xt.h pthread_xt.h xactlog_xt.h ha_pbxt.h restart_xt.h xt_config.h
- hashtab_xt.h sortedlist_xt.h xt_defs.h heap_xt.h streaming_xt.h xt_errno.h
- systab_xt.h ha_xtsys.h discover_xt.h
- index_xt.h strutil_xt.h)
-
-IF(NOT SOURCE_SUBLIBS)
- ADD_LIBRARY(pbxt ${PBXT_SOURCES})
- ADD_DEPENDENCIES(pbxt GenError)
-ENDIF(NOT SOURCE_SUBLIBS)
-
+SET(PBXT_SOURCES
+src/bsearch_xt.cc
+src/bsearch_xt.h
+src/cache_xt.cc
+src/cache_xt.h
+src/ccutils_xt.cc
+src/ccutils_xt.h
+src/database_xt.cc
+src/database_xt.h
+src/datadic_xt.cc
+src/datadic_xt.h
+src/datalog_xt.cc
+src/datalog_xt.h
+src/discover_xt.cc
+src/discover_xt.h
+src/filesys_xt.cc
+src/filesys_xt.h
+src/hashtab_xt.cc
+src/hashtab_xt.h
+src/ha_pbxt.cc
+src/ha_pbxt.h
+src/ha_xtsys.cc
+src/ha_xtsys.h
+src/heap_xt.cc
+src/heap_xt.h
+src/index_xt.cc
+src/index_xt.h
+src/linklist_xt.cc
+src/linklist_xt.h
+src/locklist_xt.cc
+src/locklist_xt.h
+src/lock_xt.cc
+src/lock_xt.h
+src/memory_xt.cc
+src/memory_xt.h
+src/myxt_xt.cc
+src/myxt_xt.h
+src/pbms.h
+src/pbms_enabled.cc
+src/pbms_enabled.h
+src/pthread_xt.cc
+src/pthread_xt.h
+src/restart_xt.cc
+src/restart_xt.h
+src/sortedlist_xt.cc
+src/sortedlist_xt.h
+src/strutil_xt.cc
+src/strutil_xt.h
+src/systab_xt.cc
+src/systab_xt.h
+src/tabcache_xt.cc
+src/tabcache_xt.h
+src/table_xt.cc
+src/table_xt.h
+src/thread_xt.cc
+src/thread_xt.h
+src/trace_xt.cc
+src/trace_xt.h
+src/util_xt.cc
+src/util_xt.h
+src/xaction_xt.cc
+src/xaction_xt.h
+src/xactlog_xt.cc
+src/xactlog_xt.h
+src/xt_config.h
+src/xt_defs.h
+src/xt_errno.h)
+
+MYSQL_STORAGE_ENGINE(PBXT)
=== modified file 'storage/pbxt/src/pbms_enabled.cc'
--- a/storage/pbxt/src/pbms_enabled.cc 2009-08-18 07:46:53 +0000
+++ b/storage/pbxt/src/pbms_enabled.cc 2009-10-06 15:16:01 +0000
@@ -29,6 +29,12 @@
*
*/
+/*
+ The following two lines backported by psergey. Remove them when we merge from PBXT again.
+*/
+#include "xt_config.h"
+#ifdef PBMS_ENABLED
+
#define PBMS_API pbms_enabled_api
#include "pbms_enabled.h"
@@ -236,3 +242,4 @@
return ;
}
+#endif
\ No newline at end of file
=== modified file 'storage/pbxt/src/thread_xt.cc'
--- a/storage/pbxt/src/thread_xt.cc 2009-09-03 06:15:03 +0000
+++ b/storage/pbxt/src/thread_xt.cc 2009-10-06 15:16:01 +0000
@@ -1016,7 +1016,7 @@
#endif
try_(a) {
- if (!xt_set_key(thr_key, self, &self->t_exception))
+ if (!xt_set_key((pthread_key_t)thr_key, self, &self->t_exception))
throw_();
td->td_started = TRUE;
return_data = (*start_routine)(self);
@@ -1352,12 +1352,12 @@
return self;
/* Then it must be a background process, and the
* thread info is stored in the local key: */
- return (XTThreadPtr) xt_get_key(thr_key);
+ return (XTThreadPtr) xt_get_key((pthread_key_t)thr_key);
}
xtPublic void xt_set_self(XTThreadPtr self)
{
- xt_set_key(thr_key, self, NULL);
+ xt_set_key((pthread_key_t)thr_key, self, NULL);
}
xtPublic void xt_clear_exception(XTThreadPtr thread)
@@ -1386,7 +1386,7 @@
return NULL;
}
- if (!xt_set_key(thr_key, self, e)) {
+ if (!xt_set_key((pthread_key_t)thr_key, self, e)) {
xt_free_ns(self);
return NULL;
}
@@ -1400,7 +1400,7 @@
}
catch_(a) {
*e = self->t_exception;
- xt_set_key(thr_key, NULL, NULL);
+ xt_set_key((pthread_key_t)thr_key, NULL, NULL);
xt_free_ns(self);
self = NULL;
}
@@ -1464,8 +1464,8 @@
* PBXT resources on all MySQL THDs created by PBMS for it's own pthreads. So the 'self'
* being freed is not the same 'self' associated with the PBXT 'thr_key'.
*/
- if (thr_key && (self == ((XTThreadPtr) xt_get_key(thr_key)))) {
- xt_set_key(thr_key, NULL, NULL);
+ if (thr_key && (self == ((XTThreadPtr) xt_get_key((pthread_key_t)thr_key)))) {
+ xt_set_key((pthread_key_t)thr_key, NULL, NULL);
}
xt_free_ns(self);
}