mirror of
https://github.com/MariaDB/server.git
synced 2025-07-07 06:01:31 +03:00
further reduce diffs to 5.5, monty review
This commit is contained in:
@ -93,7 +93,6 @@ typedef struct st_alarm {
|
||||
extern uint thr_client_alarm;
|
||||
extern pthread_t alarm_thread;
|
||||
|
||||
|
||||
#define thr_alarm_init(A) (*(A))=0
|
||||
#define thr_alarm_in_use(A) (*(A)!= 0)
|
||||
void init_thr_alarm(uint max_alarm);
|
||||
|
@ -175,6 +175,17 @@ void vio_end(void);
|
||||
#define vio_is_connected(vio) (vio)->is_connected(vio)
|
||||
#endif /* !defined(DONT_MAP_VIO) */
|
||||
|
||||
#ifdef _WIN32
|
||||
/*
|
||||
Set thread id for io cancellation (required on Windows XP only,
|
||||
and should to be removed if XP is no more supported)
|
||||
*/
|
||||
|
||||
#define vio_set_thread_id(vio, tid) if(vio) vio->thread_id= tid
|
||||
#else
|
||||
#define vio_set_thread_id(vio, tid)
|
||||
#endif
|
||||
|
||||
/* This enumerator is used in parser - should be always visible */
|
||||
enum SSL_type
|
||||
{
|
||||
@ -237,7 +248,7 @@ struct st_vio
|
||||
char *shared_memory_pos;
|
||||
#endif /* HAVE_SMEM */
|
||||
#ifdef _WIN32
|
||||
DWORD thread_id; /* Used to XP only in vio_shutdown */
|
||||
DWORD thread_id; /* Used on XP only by vio_shutdown() */
|
||||
OVERLAPPED pipe_overlapped;
|
||||
DWORD read_timeout_ms;
|
||||
DWORD write_timeout_ms;
|
||||
|
@ -18,7 +18,7 @@ perl;
|
||||
# their paths may vary:
|
||||
@skipvars=qw/basedir open-files-limit general-log-file log plugin-dir
|
||||
log-slow-queries pid-file slow-query-log-file log-basename
|
||||
datadir slave-load-tmpdir tmpdir socket /;
|
||||
datadir slave-load-tmpdir tmpdir socket/;
|
||||
|
||||
# Plugins which may or may not be there:
|
||||
@plugins=qw/innodb ndb archive blackhole federated partition ndbcluster feedback debug temp-pool ssl des-key-file
|
||||
|
@ -60,6 +60,9 @@ SET DEBUG_SYNC= 'now WAIT_FOR in_sync';
|
||||
KILL @id;
|
||||
SET DEBUG_SYNC= 'now WAIT_FOR con1_end';
|
||||
Got one of the listed errors
|
||||
SELECT 1;
|
||||
1
|
||||
1
|
||||
SET DEBUG_SYNC = 'RESET';
|
||||
DROP TABLE t1, t2;
|
||||
SET DEBUG_SYNC= 'before_acos_function SIGNAL in_sync WAIT_FOR kill';
|
||||
|
@ -941,7 +941,7 @@ lower-case-table-names 1
|
||||
master-info-file master.info
|
||||
master-retry-count 86400
|
||||
master-verify-checksum FALSE
|
||||
max-allowed-packet 8388608
|
||||
max-allowed-packet 1048576
|
||||
max-binlog-cache-size 18446744073709547520
|
||||
max-binlog-size 1073741824
|
||||
max-binlog-stmt-cache-size 18446744073709547520
|
||||
@ -952,7 +952,7 @@ max-error-count 64
|
||||
max-heap-table-size 16777216
|
||||
max-join-size 18446744073709551615
|
||||
max-length-for-sort-data 1024
|
||||
max-long-data-size 8388608
|
||||
max-long-data-size 1048576
|
||||
max-prepared-stmt-count 16382
|
||||
max-relay-log-size 0
|
||||
max-seeks-for-key 18446744073709551615
|
||||
|
@ -65,7 +65,7 @@ KILL CONNECTION @id;
|
||||
connection con1;
|
||||
--echo # Try to reap FLUSH TABLES WITH READ LOCK,
|
||||
--echo # it fail due to killed statement and connection.
|
||||
--error 1317,2013,1927
|
||||
--error 1317,2013
|
||||
reap;
|
||||
|
||||
--echo # Switching to 'con2'.
|
||||
|
@ -142,10 +142,9 @@ KILL @id;
|
||||
SET DEBUG_SYNC= 'now WAIT_FOR con1_end';
|
||||
|
||||
connection con1;
|
||||
--error 1317,1053,2006,2013,1927
|
||||
--error 1317,1053,2006,2013
|
||||
reap;
|
||||
--error 0,2013
|
||||
let $ignore= `SELECT 1`;
|
||||
SELECT 1;
|
||||
|
||||
connection default;
|
||||
SET DEBUG_SYNC = 'RESET';
|
||||
|
@ -1701,11 +1701,7 @@ bool THD::store_globals()
|
||||
real_id= pthread_self(); // For debugging
|
||||
mysys_var->stack_ends_here= thread_stack + // for consistency, see libevent_thread_proc
|
||||
STACK_DIRECTION * (long)my_thread_stack_size;
|
||||
|
||||
#ifdef _WIN32
|
||||
if (net.vio)
|
||||
net.vio->thread_id= real_id; /* Required to support IO cancelation on XP */
|
||||
#endif
|
||||
vio_set_thread_id(net.vio, real_id);
|
||||
/*
|
||||
We have to call thr_lock_info_init() again here as THD may have been
|
||||
created in another thread
|
||||
|
@ -2341,10 +2341,7 @@ public:
|
||||
{
|
||||
mysql_mutex_lock(&LOCK_thd_data);
|
||||
active_vio = vio;
|
||||
#ifdef _WIN32
|
||||
/* Required to support cancelation on XP */
|
||||
active_vio->thread_id = pthread_self();
|
||||
#endif
|
||||
vio_set_thread_id(vio, pthread_self());
|
||||
mysql_mutex_unlock(&LOCK_thd_data);
|
||||
}
|
||||
inline void clear_active_vio()
|
||||
|
@ -64,7 +64,7 @@ int vio_shared_memory_shutdown(Vio *vio, int how)
|
||||
|
||||
int vio_pipe_shutdown(Vio *vio, int how)
|
||||
{
|
||||
return vio_socket_shutdown(vio, how); /* cancels io */
|
||||
return cancel_io(vio->hPipe, vio->thread_id);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -39,6 +39,7 @@ size_t vio_read_pipe(Vio *vio, uchar * buf, size_t size);
|
||||
size_t vio_write_pipe(Vio *vio, const uchar * buf, size_t size);
|
||||
my_bool vio_is_connected_pipe(Vio *vio);
|
||||
int vio_close_pipe(Vio * vio);
|
||||
int cancel_io(HANDLE handle, DWORD thread_id);
|
||||
int vio_shutdown_pipe(Vio *vio,int how);
|
||||
#endif
|
||||
|
||||
|
@ -144,7 +144,7 @@ static void CALLBACK cancel_io_apc(ULONG_PTR data)
|
||||
IO. On Vista+, simpler cancelation is done with CancelIoEx.
|
||||
*/
|
||||
|
||||
static int cancel_io(HANDLE handle, DWORD thread_id)
|
||||
int cancel_io(HANDLE handle, DWORD thread_id)
|
||||
{
|
||||
static BOOL (WINAPI *fp_CancelIoEx) (HANDLE, OVERLAPPED *);
|
||||
static volatile int first_time= 1;
|
||||
@ -177,11 +177,12 @@ static int cancel_io(HANDLE handle, DWORD thread_id)
|
||||
|
||||
int vio_socket_shutdown(Vio *vio, int how)
|
||||
{
|
||||
int ret= shutdown(vio->sd, how);
|
||||
#ifdef _WIN32
|
||||
return cancel_io((HANDLE)vio->sd, vio->thread_id);
|
||||
#else
|
||||
return shutdown(vio->sd, how);
|
||||
/* Cancel possible IO in progress (shutdown does not do that on Windows). */
|
||||
(void) cancel_io((HANDLE)vio->sd, vio->thread_id);
|
||||
#endif
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user