diff options
author | Alexander Nozdrin <alik@sun.com> | 2010-06-01 16:38:01 +0400 |
---|---|---|
committer | Alexander Nozdrin <alik@sun.com> | 2010-06-01 16:38:01 +0400 |
commit | bf158eed8388f6c1b4c776b9ff6ee16a335cffa8 (patch) | |
tree | 27a04705528c5c8baecb74ee4ea6c6c03fdc56e8 /include | |
parent | ab6a5b4724ba957756f51f1390ac7447073f5415 (diff) | |
parent | 5cf1d385706097faab68dbca1053a2842a2dbd34 (diff) | |
download | mariadb-git-bf158eed8388f6c1b4c776b9ff6ee16a335cffa8.tar.gz |
Auto-merge from mysql-trunk-bugfixing.
Due to a BZR bug, that merge was done by the following command:
bzr merge -r 'revid:tor.didriksen@sun.com-20100527074248-6qtv0p1ugy6o1hjo..' <mysql-trunk-bugfixing path>
Diffstat (limited to 'include')
-rw-r--r-- | include/my_global.h | 2 | ||||
-rw-r--r-- | include/my_pthread.h | 1 | ||||
-rw-r--r-- | include/my_sys.h | 8 | ||||
-rw-r--r-- | include/mysql/plugin.h | 39 | ||||
-rw-r--r-- | include/mysql/plugin.h.pp | 3 | ||||
-rw-r--r-- | include/mysql_com.h | 10 |
6 files changed, 39 insertions, 24 deletions
diff --git a/include/my_global.h b/include/my_global.h index 2a65c610604..41735f4e4f5 100644 --- a/include/my_global.h +++ b/include/my_global.h @@ -863,7 +863,7 @@ typedef SOCKET_SIZE_TYPE size_socket; #endif #ifndef OS_FILE_LIMIT -#define OS_FILE_LIMIT 65535 +#define OS_FILE_LIMIT UINT_MAX #endif /* #define EXT_IN_LIBNAME */ diff --git a/include/my_pthread.h b/include/my_pthread.h index e41abba950e..ea37f6e6b92 100644 --- a/include/my_pthread.h +++ b/include/my_pthread.h @@ -712,7 +712,6 @@ extern my_bool my_thread_init(void); extern void my_thread_end(void); extern const char *my_thread_name(void); extern my_thread_id my_thread_dbug_id(void); -extern int pthread_no_free(void *); extern int pthread_dummy(int); /* All thread specific variables are in the following struct */ diff --git a/include/my_sys.h b/include/my_sys.h index 727ff7c58b4..cca4d713ca6 100644 --- a/include/my_sys.h +++ b/include/my_sys.h @@ -54,8 +54,6 @@ extern int NEAR my_errno; /* Last error in mysys */ #include <malloc.h> /*for alloca*/ #endif -#define MYSYS_PROGRAM_USES_CURSES() { error_handler_hook = my_message_curses; mysys_uses_curses=1; } -#define MYSYS_PROGRAM_DONT_USE_CURSES() { error_handler_hook = my_message_no_curses; mysys_uses_curses=0;} #define MY_INIT(name); { my_progname= name; my_init(); } /** @@ -285,7 +283,7 @@ extern int NEAR my_umask_dir, NEAR my_recived_signals, /* Signals we have got */ NEAR my_safe_to_handle_signal, /* Set when allowed to SIGTSTP */ NEAR my_dont_interrupt; /* call remember_intr when set */ -extern my_bool NEAR mysys_uses_curses, my_use_symdir; +extern my_bool NEAR my_use_symdir; extern size_t sf_malloc_cur_memory, sf_malloc_max_memory; extern ulong my_default_record_cache_size; @@ -682,7 +680,6 @@ extern int nt_share_delete(const char *name,myf MyFlags); #ifdef _WIN32 /* Windows-only functions (CRT equivalents)*/ -extern File my_sopen(const char *path, int oflag, int shflag, int pmode); extern HANDLE my_get_osfhandle(File fd); extern void my_osmaperr(unsigned long last_error); #endif @@ -711,8 +708,7 @@ extern int my_error_register(const char** (*get_errmsgs) (), int first, int last); extern const char **my_error_unregister(int first, int last); extern void my_message(uint my_err, const char *str,myf MyFlags); -extern void my_message_no_curses(uint my_err, const char *str,myf MyFlags); -extern void my_message_curses(uint my_err, const char *str,myf MyFlags); +extern void my_message_stderr(uint my_err, const char *str, myf MyFlags); extern my_bool my_basic_init(void); extern my_bool my_init(void); extern void my_end(int infoflag); diff --git a/include/mysql/plugin.h b/include/mysql/plugin.h index 567734c1d5c..19cf0ed050d 100644 --- a/include/mysql/plugin.h +++ b/include/mysql/plugin.h @@ -593,30 +593,37 @@ void mysql_query_cache_invalidate4(MYSQL_THD thd, const char *key, unsigned int key_length, int using_trx); -#ifdef __cplusplus -} -#endif -#ifdef __cplusplus /** Provide a handler data getter to simplify coding */ -inline -void * -thd_get_ha_data(const MYSQL_THD thd, const struct handlerton *hton) -{ - return *thd_ha_data(thd, hton); -} +void *thd_get_ha_data(const MYSQL_THD thd, const struct handlerton *hton); + /** Provide a handler data setter to simplify coding + + @details + Set ha_data pointer (storage engine per-connection information). + + To avoid unclean deactivation (uninstall) of storage engine plugin + in the middle of transaction, additional storage engine plugin + lock is acquired. + + If ha_data is not null and storage engine plugin was not locked + by thd_set_ha_data() in this connection before, storage engine + plugin gets locked. + + If ha_data is null and storage engine plugin was locked by + thd_set_ha_data() in this connection before, storage engine + plugin lock gets released. + + If handlerton::close_connection() didn't reset ha_data, server does + it immediately after calling handlerton::close_connection(). */ -inline -void -thd_set_ha_data(const MYSQL_THD thd, const struct handlerton *hton, - const void *ha_data) -{ - *thd_ha_data(thd, hton)= (void*) ha_data; +void thd_set_ha_data(MYSQL_THD thd, const struct handlerton *hton, + const void *ha_data); +#ifdef __cplusplus } #endif diff --git a/include/mysql/plugin.h.pp b/include/mysql/plugin.h.pp index 5dad31bd008..3a1b03742da 100644 --- a/include/mysql/plugin.h.pp +++ b/include/mysql/plugin.h.pp @@ -165,3 +165,6 @@ void thd_get_xid(const void* thd, MYSQL_XID *xid); void mysql_query_cache_invalidate4(void* thd, const char *key, unsigned int key_length, int using_trx); +void *thd_get_ha_data(const void* thd, const struct handlerton *hton); +void thd_set_ha_data(void* thd, const struct handlerton *hton, + const void *ha_data); diff --git a/include/mysql_com.h b/include/mysql_com.h index c510c12dbf7..90fe4ac1995 100644 --- a/include/mysql_com.h +++ b/include/mysql_com.h @@ -307,6 +307,16 @@ typedef struct st_net { /** Client library sqlstate buffer. Set along with the error message. */ char sqlstate[SQLSTATE_LENGTH+1]; void *extension; +#if defined(MYSQL_SERVER) && !defined(EMBEDDED_LIBRARY) + /* + Controls whether a big packet should be skipped. + + Initially set to FALSE by default. Unauthenticated sessions must have + this set to FALSE so that the server can't be tricked to read packets + indefinitely. + */ + my_bool skip_big_packet; +#endif } NET; |