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
d5a00697
Commit
d5a00697
authored
Feb 14, 2020
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
perfschema socket instrumentation related changes
parent
00819d81
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
30 additions
and
3 deletions
+30
-3
include/violite.h
include/violite.h
+5
-0
sql/sql_acl.cc
sql/sql_acl.cc
+3
-1
storage/perfschema/table_threads.cc
storage/perfschema/table_threads.cc
+2
-2
vio/viosocket.c
vio/viosocket.c
+20
-0
No files found.
include/violite.h
View file @
d5a00697
...
...
@@ -39,7 +39,10 @@ enum enum_vio_type
{
VIO_CLOSED
,
VIO_TYPE_TCPIP
,
VIO_TYPE_SOCKET
,
VIO_TYPE_NAMEDPIPE
,
VIO_TYPE_SSL
/* see also vio_type_names[] */
};
#define FIRST_VIO_TYPE VIO_CLOSED
#define LAST_VIO_TYPE VIO_TYPE_SSL
/**
VIO I/O events.
...
...
@@ -184,6 +187,8 @@ void free_vio_ssl_acceptor_fd(struct st_VioSSLFd *fd);
void
vio_end
(
void
);
const
char
*
vio_type_name
(
enum
enum_vio_type
vio_type
,
size_t
*
len
);
#ifdef __cplusplus
}
#endif
...
...
sql/sql_acl.cc
View file @
d5a00697
...
...
@@ -70,7 +70,7 @@ const uint max_dbname_length= 64;
const
char
*
safe_vio_type_name
(
Vio
*
vio
)
{
in
t
unused
;
size_
t
unused
;
#ifdef EMBEDDED_LIBRARY
if
(
!
vio
)
return
"Internal"
;
#endif
...
...
@@ -13978,6 +13978,8 @@ bool acl_authenticate(THD *thd, uint com_change_user_pkt_len)
res
=
do_auth_once
(
thd
,
default_auth_plugin_name
,
&
mpvio
);
}
PSI_CALL_set_connection_type
(
vio_type
(
thd
->
net
.
vio
));
Security_context
*
const
sctx
=
thd
->
security_ctx
;
const
ACL_USER
*
acl_user
=
mpvio
.
acl_user
;
if
(
!
acl_user
)
...
...
storage/perfschema/table_threads.cc
View file @
d5a00697
...
...
@@ -215,7 +215,7 @@ int table_threads::read_row_values(TABLE *table,
{
Field
*
f
;
const
char
*
str
=
NULL
;
in
t
len
=
0
;
size_
t
len
=
0
;
if
(
unlikely
(
!
m_row_exists
))
return
HA_ERR_RECORD_DELETED
;
...
...
@@ -326,7 +326,7 @@ int table_threads::read_row_values(TABLE *table,
case
15
:
/* CONNECTION_TYPE */
get_vio_type_name
(
m_row
.
m_connection_type
,
&
str
,
&
len
);
if
(
len
>
0
)
set_field_varchar_utf8
(
f
,
str
,
len
);
set_field_varchar_utf8
(
f
,
str
,
(
uint
)
len
);
else
f
->
set_null
();
break
;
...
...
vio/viosocket.c
View file @
d5a00697
...
...
@@ -645,6 +645,26 @@ enum enum_vio_type vio_type(Vio* vio)
return
vio
->
type
;
}
static
const
LEX_CSTRING
vio_type_names
[]
=
{
{
STRING_WITH_LEN
(
"Error"
)
},
// cannot happen
{
STRING_WITH_LEN
(
"TCP/IP"
)
},
{
STRING_WITH_LEN
(
"Socket"
)
},
{
STRING_WITH_LEN
(
"Named Pipe"
)
},
{
STRING_WITH_LEN
(
"SSL/TLS"
)
},
{
STRING_WITH_LEN
(
"Shared Memory"
)
}
};
const
char
*
vio_type_name
(
enum
enum_vio_type
vio_type
,
size_t
*
len
)
{
int
index
=
vio_type
>=
FIRST_VIO_TYPE
&&
vio_type
<=
LAST_VIO_TYPE
?
vio_type
:
0
;
*
len
=
vio_type_names
[
index
].
length
;
return
vio_type_names
[
index
].
str
;
}
my_socket
vio_fd
(
Vio
*
vio
)
{
return
mysql_socket_getfd
(
vio
->
mysql_socket
);
...
...
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