Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
398c935d
Commit
398c935d
authored
Jan 24, 2012
by
Vladislav Vaintroub
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
further reduce diffs to 5.5, monty review
parent
d50649ec
Changes
12
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
31 additions
and
24 deletions
+31
-24
include/thr_alarm.h
include/thr_alarm.h
+0
-1
include/violite.h
include/violite.h
+12
-1
mysql-test/include/mysqld--help.inc
mysql-test/include/mysqld--help.inc
+1
-1
mysql-test/r/kill.result
mysql-test/r/kill.result
+3
-0
mysql-test/r/mysqld--help-win.result
mysql-test/r/mysqld--help-win.result
+2
-2
mysql-test/t/flush_read_lock_kill.test
mysql-test/t/flush_read_lock_kill.test
+1
-1
mysql-test/t/kill.test
mysql-test/t/kill.test
+2
-3
sql/sql_class.cc
sql/sql_class.cc
+1
-5
sql/sql_class.h
sql/sql_class.h
+1
-4
vio/vio.c
vio/vio.c
+1
-1
vio/vio_priv.h
vio/vio_priv.h
+1
-0
vio/viosocket.c
vio/viosocket.c
+6
-5
No files found.
include/thr_alarm.h
View file @
398c935d
...
...
@@ -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
);
...
...
include/violite.h
View file @
398c935d
...
...
@@ -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
;
...
...
mysql-test/include/mysqld--help.inc
View file @
398c935d
...
...
@@ -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
...
...
mysql-test/r/kill.result
View file @
398c935d
...
...
@@ -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';
...
...
mysql-test/r/mysqld--help-win.result
View file @
398c935d
...
...
@@ -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
...
...
mysql-test/t/flush_read_lock_kill.test
View file @
398c935d
...
...
@@ -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'.
...
...
mysql-test/t/kill.test
View file @
398c935d
...
...
@@ -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'
;
...
...
sql/sql_class.cc
View file @
398c935d
...
...
@@ -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
...
...
sql/sql_class.h
View file @
398c935d
...
...
@@ -2341,10 +2341,7 @@ class THD :public Statement,
{
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
()
...
...
vio/vio.c
View file @
398c935d
...
...
@@ -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
...
...
vio/vio_priv.h
View file @
398c935d
...
...
@@ -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
...
...
vio/viosocket.c
View file @
398c935d
...
...
@@ -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
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment