diff options
author | unknown <mskold/marty@linux.site> | 2006-11-30 15:31:20 +0100 |
---|---|---|
committer | unknown <mskold/marty@linux.site> | 2006-11-30 15:31:20 +0100 |
commit | d6e2895da72e79c031c4e0738a565b98c861eaaa (patch) | |
tree | 501aa12882c7189318e5c0edb34c332ecb5aaac0 /include | |
parent | 9253140b8d7dc129e290f18d21afd8c974a2f50a (diff) | |
parent | a6a0aa42362bf6811150a3d8190f363fc116859a (diff) | |
download | mariadb-git-d6e2895da72e79c031c4e0738a565b98c861eaaa.tar.gz |
Merge mysql.com:/windows/Linux_space/MySQL/mysql-5.1
into mysql.com:/windows/Linux_space/MySQL/mysql-5.1-new-ndb
configure.in:
Auto merged
client/mysqldump.c:
Auto merged
include/my_sys.h:
Auto merged
mysql-test/r/ndb_update.result:
Auto merged
mysql-test/t/ndb_index_ordered.test:
Auto merged
sql/ha_ndbcluster.cc:
Auto merged
sql/ha_ndbcluster_binlog.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_show.cc:
Auto merged
sql/sql_table.cc:
Auto merged
storage/ndb/include/util/OutputStream.hpp:
Auto merged
storage/ndb/src/common/debugger/EventLogger.cpp:
Auto merged
storage/ndb/src/kernel/blocks/dbacc/DbaccMain.cpp:
Auto merged
storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp:
Auto merged
storage/ndb/src/kernel/blocks/ndbfs/Ndbfs.cpp:
Auto merged
storage/ndb/src/mgmapi/mgmapi.cpp:
Auto merged
storage/ndb/src/mgmclient/CommandInterpreter.cpp:
Auto merged
storage/ndb/src/ndbapi/ClusterMgr.cpp:
Auto merged
storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp:
Auto merged
storage/ndb/src/ndbapi/NdbTransaction.cpp:
Auto merged
storage/ndb/src/ndbapi/Ndbinit.cpp:
Auto merged
storage/ndb/src/ndbapi/ndb_cluster_connection.cpp:
Auto merged
sql/sql_cache.cc:
Merge
Diffstat (limited to 'include')
-rw-r--r-- | include/errmsg.h | 3 | ||||
-rw-r--r-- | include/m_ctype.h | 12 | ||||
-rw-r--r-- | include/my_global.h | 21 | ||||
-rw-r--r-- | include/my_pthread.h | 3 | ||||
-rw-r--r-- | include/my_sys.h | 5 | ||||
-rw-r--r-- | include/my_time.h | 2 | ||||
-rw-r--r-- | include/mysql/plugin.h | 20 |
7 files changed, 55 insertions, 11 deletions
diff --git a/include/errmsg.h b/include/errmsg.h index dc7adb3b501..f24ea2bf396 100644 --- a/include/errmsg.h +++ b/include/errmsg.h @@ -95,6 +95,7 @@ extern const char *client_errors[]; /* Error messages */ #define CR_NO_STMT_METADATA 2052 #define CR_NO_RESULT_SET 2053 #define CR_NOT_IMPLEMENTED 2054 -#define CR_ERROR_LAST /*Copy last error nr:*/ 2054 +#define CR_SERVER_LOST_EXTENDED 2055 +#define CR_ERROR_LAST /*Copy last error nr:*/ 2055 /* Add error numbers before CR_ERROR_LAST and change it accordingly. */ diff --git a/include/m_ctype.h b/include/m_ctype.h index 5f946a3b443..0d586030735 100644 --- a/include/m_ctype.h +++ b/include/m_ctype.h @@ -190,8 +190,8 @@ typedef struct my_charset_handler_st const unsigned char *s, const unsigned char *e); /* Functions for case and sort conversion */ - void (*caseup_str)(struct charset_info_st *, char *); - void (*casedn_str)(struct charset_info_st *, char *); + uint (*caseup_str)(struct charset_info_st *, char *); + uint (*casedn_str)(struct charset_info_st *, char *); uint (*caseup)(struct charset_info_st *, char *src, uint srclen, char *dst, uint dstlen); uint (*casedn)(struct charset_info_st *, char *src, uint srclen, @@ -324,8 +324,8 @@ extern uint my_instr_simple(struct charset_info_st *, /* Functions for 8bit */ -extern void my_caseup_str_8bit(CHARSET_INFO *, char *); -extern void my_casedn_str_8bit(CHARSET_INFO *, char *); +extern uint my_caseup_str_8bit(CHARSET_INFO *, char *); +extern uint my_casedn_str_8bit(CHARSET_INFO *, char *); extern uint my_caseup_8bit(CHARSET_INFO *, char *src, uint srclen, char *dst, uint dstlen); extern uint my_casedn_8bit(CHARSET_INFO *, char *src, uint srclen, @@ -415,8 +415,8 @@ int my_mbcharlen_8bit(CHARSET_INFO *, uint c); /* Functions for multibyte charsets */ -extern void my_caseup_str_mb(CHARSET_INFO *, char *); -extern void my_casedn_str_mb(CHARSET_INFO *, char *); +extern uint my_caseup_str_mb(CHARSET_INFO *, char *); +extern uint my_casedn_str_mb(CHARSET_INFO *, char *); extern uint my_caseup_mb(CHARSET_INFO *, char *src, uint srclen, char *dst, uint dstlen); extern uint my_casedn_mb(CHARSET_INFO *, char *src, uint srclen, diff --git a/include/my_global.h b/include/my_global.h index a7ec41068b3..c182ef7b799 100644 --- a/include/my_global.h +++ b/include/my_global.h @@ -869,9 +869,8 @@ typedef long my_ptrdiff_t; typedef long long my_ptrdiff_t; #endif -#if HAVE_SIZE_T -typedef size_t my_size_t; -#elif SIZEOF_CHARP <= SIZEOF_LONG +/* We can't set my_size_t to size_t as we want my_size_t to be unsigned */ +#if SIZEOF_CHARP <= SIZEOF_LONG typedef unsigned long my_size_t; #else typedef unsigned long long my_size_t; @@ -886,6 +885,22 @@ typedef unsigned long long my_size_t; #define ADD_TO_PTR(ptr,size,type) (type) ((byte*) (ptr)+size) #define PTR_BYTE_DIFF(A,B) (my_ptrdiff_t) ((byte*) (A) - (byte*) (B)) +/* + Custom version of standard offsetof() macro which can be used to get + offsets of members in class for non-POD types (according to the current + version of C++ standard offsetof() macro can't be used in such cases and + attempt to do so causes warnings to be emitted, OTOH in many cases it is + still OK to assume that all instances of the class has the same offsets + for the same members). + + This is temporary solution which should be removed once File_parser class + and related routines are refactored. +*/ + +#define my_offsetof(TYPE, MEMBER) \ + ((size_t)((char *)&(((TYPE *)0x10)->MEMBER) - (char*)0x10)) + + #define NullS (char *) 0 /* Nowdays we do not support MessyDos */ #ifndef NEAR diff --git a/include/my_pthread.h b/include/my_pthread.h index 0cb38d29be8..8a0e1fc2b01 100644 --- a/include/my_pthread.h +++ b/include/my_pthread.h @@ -130,6 +130,9 @@ void pthread_exit(void *a); /* was #define pthread_exit(A) ExitThread(A)*/ #define my_pthread_setprio(A,B) SetThreadPriority(GetCurrentThread(), (B)) #define pthread_kill(A,B) pthread_dummy(0) +#define pthread_join(A,B) \ + ((WaitForSingleObject((A), INFINITE) != WAIT_OBJECT_0) || !CloseHandle(A)) + /* Dummy defines for easier code */ #define pthread_attr_setdetachstate(A,B) pthread_dummy(0) #define my_pthread_attr_setprio(A,B) pthread_attr_setprio(A,B) diff --git a/include/my_sys.h b/include/my_sys.h index f630ffbebf3..d185913cda1 100644 --- a/include/my_sys.h +++ b/include/my_sys.h @@ -880,7 +880,12 @@ extern int my_getncpus(); #define HAVE_MMAP #endif +#ifndef __NETWARE__ int my_getpagesize(void); +#else +#define my_getpagesize() 8192 +#endif + void *my_mmap(void *, size_t, int, int, int, my_off_t); int my_munmap(void *, size_t); #endif diff --git a/include/my_time.h b/include/my_time.h index 394732236a3..356595cae2c 100644 --- a/include/my_time.h +++ b/include/my_time.h @@ -73,6 +73,8 @@ typedef long my_time_t; #define TIME_MAX_VALUE (TIME_MAX_HOUR*10000 + TIME_MAX_MINUTE*100 + \ TIME_MAX_SECOND) +my_bool check_date(const MYSQL_TIME *ltime, my_bool not_zero_date, + ulong flags, int *was_cut); enum enum_mysql_timestamp_type str_to_datetime(const char *str, uint length, MYSQL_TIME *l_time, uint flags, int *was_cut); diff --git a/include/mysql/plugin.h b/include/mysql/plugin.h index 2b97a134c6f..1385bb502bb 100644 --- a/include/mysql/plugin.h +++ b/include/mysql/plugin.h @@ -29,7 +29,8 @@ #define MYSQL_UDF_PLUGIN 0 /* User-defined function */ #define MYSQL_STORAGE_ENGINE_PLUGIN 1 /* Storage Engine */ #define MYSQL_FTPARSER_PLUGIN 2 /* Full-text parser plugin */ -#define MYSQL_MAX_PLUGIN_TYPE_NUM 3 /* The number of plugin types */ +#define MYSQL_DAEMON_PLUGIN 3 /* The daemon/raw plugin type */ +#define MYSQL_MAX_PLUGIN_TYPE_NUM 4 /* The number of plugin types */ /* We use the following strings to define licenses for plugins */ #define PLUGIN_LICENSE_PROPRIETARY 0 @@ -296,6 +297,13 @@ struct st_mysql_ftparser }; /************************************************************************* + API for Storage Engine plugin. (MYSQL_DAEMON_PLUGIN) +*/ + +/* handlertons of different MySQL releases are incompatible */ +#define MYSQL_DAEMON_INTERFACE_VERSION (MYSQL_VERSION_ID << 8) + +/************************************************************************* API for Storage Engine plugin. (MYSQL_STORAGE_ENGINE_PLUGIN) */ @@ -313,5 +321,15 @@ struct st_mysql_storage_engine int interface_version; }; +/* + Here we define only the descriptor structure, that is referred from + st_mysql_plugin. +*/ + +struct st_mysql_daemon +{ + int interface_version; +}; + #endif |