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
211421d5
Commit
211421d5
authored
Feb 27, 2020
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cleanup: remove unused argument
parent
c1c5222c
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
15 additions
and
32 deletions
+15
-32
include/mysql/psi/mysql_ps.h
include/mysql/psi/mysql_ps.h
+5
-7
include/mysql/psi/psi.h
include/mysql/psi/psi.h
+1
-2
include/mysql/psi/psi_abi_v1.h.pp
include/mysql/psi/psi_abi_v1.h.pp
+1
-2
mysys/psi_noop.c
mysys/psi_noop.c
+1
-2
sql/sql_prepare.cc
sql/sql_prepare.cc
+3
-6
storage/perfschema/pfs.cc
storage/perfschema/pfs.cc
+2
-7
storage/perfschema/pfs_prepared_stmt.cc
storage/perfschema/pfs_prepared_stmt.cc
+2
-6
No files found.
include/mysql/psi/mysql_ps.h
View file @
211421d5
...
@@ -35,8 +35,8 @@
...
@@ -35,8 +35,8 @@
#endif
#endif
#ifdef HAVE_PSI_PS_INTERFACE
#ifdef HAVE_PSI_PS_INTERFACE
#define MYSQL_CREATE_PS(IDENTITY, ID, LOCKER, NAME, NAME_LENGTH
, SQLTEXT, SQLTEXT_LENGTH
) \
#define MYSQL_CREATE_PS(IDENTITY, ID, LOCKER, NAME, NAME_LENGTH) \
inline_mysql_create_prepared_stmt(IDENTITY, ID, LOCKER, NAME, NAME_LENGTH
, SQLTEXT, SQLTEXT_LENGTH
)
inline_mysql_create_prepared_stmt(IDENTITY, ID, LOCKER, NAME, NAME_LENGTH)
#define MYSQL_EXECUTE_PS(LOCKER, PREPARED_STMT) \
#define MYSQL_EXECUTE_PS(LOCKER, PREPARED_STMT) \
inline_mysql_execute_prepared_stmt(LOCKER, PREPARED_STMT)
inline_mysql_execute_prepared_stmt(LOCKER, PREPARED_STMT)
#define MYSQL_DESTROY_PS(PREPARED_STMT) \
#define MYSQL_DESTROY_PS(PREPARED_STMT) \
...
@@ -46,7 +46,7 @@
...
@@ -46,7 +46,7 @@
#define MYSQL_SET_PS_TEXT(PREPARED_STMT, SQLTEXT, SQLTEXT_LENGTH) \
#define MYSQL_SET_PS_TEXT(PREPARED_STMT, SQLTEXT, SQLTEXT_LENGTH) \
inline_mysql_set_prepared_stmt_text(PREPARED_STMT, SQLTEXT, SQLTEXT_LENGTH)
inline_mysql_set_prepared_stmt_text(PREPARED_STMT, SQLTEXT, SQLTEXT_LENGTH)
#else
#else
#define MYSQL_CREATE_PS(IDENTITY, ID, LOCKER, NAME, NAME_LENGTH
, SQLTEXT, SQLTEXT_LENGTH
) \
#define MYSQL_CREATE_PS(IDENTITY, ID, LOCKER, NAME, NAME_LENGTH) \
NULL
NULL
#define MYSQL_EXECUTE_PS(LOCKER, PREPARED_STMT) \
#define MYSQL_EXECUTE_PS(LOCKER, PREPARED_STMT) \
do {} while (0)
do {} while (0)
...
@@ -62,15 +62,13 @@
...
@@ -62,15 +62,13 @@
static
inline
struct
PSI_prepared_stmt
*
static
inline
struct
PSI_prepared_stmt
*
inline_mysql_create_prepared_stmt
(
void
*
identity
,
uint
stmt_id
,
inline_mysql_create_prepared_stmt
(
void
*
identity
,
uint
stmt_id
,
PSI_statement_locker
*
locker
,
PSI_statement_locker
*
locker
,
const
char
*
stmt_name
,
size_t
stmt_name_length
,
const
char
*
stmt_name
,
size_t
stmt_name_length
)
const
char
*
sqltext
,
size_t
sqltext_length
)
{
{
if
(
locker
==
NULL
)
if
(
locker
==
NULL
)
return
NULL
;
return
NULL
;
return
PSI_PS_CALL
(
create_prepared_stmt
)(
identity
,
stmt_id
,
return
PSI_PS_CALL
(
create_prepared_stmt
)(
identity
,
stmt_id
,
locker
,
locker
,
stmt_name
,
stmt_name_length
,
stmt_name
,
stmt_name_length
);
sqltext
,
sqltext_length
);
}
}
static
inline
void
static
inline
void
...
...
include/mysql/psi/psi.h
View file @
211421d5
...
@@ -2350,8 +2350,7 @@ typedef void (*set_socket_thread_owner_v1_t)(struct PSI_socket *socket);
...
@@ -2350,8 +2350,7 @@ typedef void (*set_socket_thread_owner_v1_t)(struct PSI_socket *socket);
*/
*/
typedef
PSI_prepared_stmt
*
(
*
create_prepared_stmt_v1_t
)
typedef
PSI_prepared_stmt
*
(
*
create_prepared_stmt_v1_t
)
(
void
*
identity
,
uint
stmt_id
,
PSI_statement_locker
*
locker
,
(
void
*
identity
,
uint
stmt_id
,
PSI_statement_locker
*
locker
,
const
char
*
stmt_name
,
size_t
stmt_name_length
,
const
char
*
stmt_name
,
size_t
stmt_name_length
);
const
char
*
name
,
size_t
length
);
/**
/**
destroy a prepare statement.
destroy a prepare statement.
...
...
include/mysql/psi/psi_abi_v1.h.pp
View file @
211421d5
...
@@ -645,8 +645,7 @@ typedef void (*set_socket_info_v1_t)(struct PSI_socket *socket,
...
@@ -645,8 +645,7 @@ typedef void (*set_socket_info_v1_t)(struct PSI_socket *socket,
typedef
void
(
*
set_socket_thread_owner_v1_t
)(
struct
PSI_socket
*
socket
);
typedef
void
(
*
set_socket_thread_owner_v1_t
)(
struct
PSI_socket
*
socket
);
typedef
PSI_prepared_stmt
*
(
*
create_prepared_stmt_v1_t
)
typedef
PSI_prepared_stmt
*
(
*
create_prepared_stmt_v1_t
)
(
void
*
identity
,
uint
stmt_id
,
PSI_statement_locker
*
locker
,
(
void
*
identity
,
uint
stmt_id
,
PSI_statement_locker
*
locker
,
const
char
*
stmt_name
,
size_t
stmt_name_length
,
const
char
*
stmt_name
,
size_t
stmt_name_length
);
const
char
*
name
,
size_t
length
);
typedef
void
(
*
destroy_prepared_stmt_v1_t
)
typedef
void
(
*
destroy_prepared_stmt_v1_t
)
(
PSI_prepared_stmt
*
prepared_stmt
);
(
PSI_prepared_stmt
*
prepared_stmt
);
typedef
void
(
*
reprepare_prepared_stmt_v1_t
)
typedef
void
(
*
reprepare_prepared_stmt_v1_t
)
...
...
mysys/psi_noop.c
View file @
211421d5
...
@@ -732,8 +732,7 @@ static void set_socket_thread_owner_noop(PSI_socket *socket NNN)
...
@@ -732,8 +732,7 @@ static void set_socket_thread_owner_noop(PSI_socket *socket NNN)
static
PSI_prepared_stmt
*
static
PSI_prepared_stmt
*
create_prepare_stmt_noop
(
void
*
identity
NNN
,
uint
stmt_id
NNN
,
create_prepare_stmt_noop
(
void
*
identity
NNN
,
uint
stmt_id
NNN
,
PSI_statement_locker
*
locker
NNN
,
PSI_statement_locker
*
locker
NNN
,
const
char
*
stmt_name
NNN
,
size_t
stmt_name_length
NNN
,
const
char
*
stmt_name
NNN
,
size_t
stmt_name_length
NNN
)
const
char
*
name
NNN
,
size_t
length
NNN
)
{
{
return
NULL
;
return
NULL
;
}
}
...
...
sql/sql_prepare.cc
View file @
211421d5
...
@@ -2669,8 +2669,7 @@ void mysqld_stmt_prepare(THD *thd, const char *packet, uint packet_length)
...
@@ -2669,8 +2669,7 @@ void mysqld_stmt_prepare(THD *thd, const char *packet, uint packet_length)
/* Create PS table entry, set query text after rewrite. */
/* Create PS table entry, set query text after rewrite. */
stmt
->
m_prepared_stmt
=
MYSQL_CREATE_PS
(
stmt
,
stmt
->
id
,
stmt
->
m_prepared_stmt
=
MYSQL_CREATE_PS
(
stmt
,
stmt
->
id
,
thd
->
m_statement_psi
,
thd
->
m_statement_psi
,
stmt
->
name
.
str
,
stmt
->
name
.
length
,
stmt
->
name
.
str
,
stmt
->
name
.
length
);
NULL
,
0
);
if
(
stmt
->
prepare
(
packet
,
packet_length
))
if
(
stmt
->
prepare
(
packet
,
packet_length
))
{
{
...
@@ -2876,8 +2875,7 @@ void mysql_sql_stmt_prepare(THD *thd)
...
@@ -2876,8 +2875,7 @@ void mysql_sql_stmt_prepare(THD *thd)
/* Create PS table entry, set query text after rewrite. */
/* Create PS table entry, set query text after rewrite. */
stmt
->
m_prepared_stmt
=
MYSQL_CREATE_PS
(
stmt
,
stmt
->
id
,
stmt
->
m_prepared_stmt
=
MYSQL_CREATE_PS
(
stmt
,
stmt
->
id
,
thd
->
m_statement_psi
,
thd
->
m_statement_psi
,
stmt
->
name
.
str
,
stmt
->
name
.
length
,
stmt
->
name
.
str
,
stmt
->
name
.
length
);
NULL
,
0
);
if
(
stmt
->
prepare
(
query
.
str
,
(
uint
)
query
.
length
))
if
(
stmt
->
prepare
(
query
.
str
,
(
uint
)
query
.
length
))
{
{
...
@@ -4901,8 +4899,7 @@ bool Prepared_statement::execute_immediate(const char *query, uint query_len)
...
@@ -4901,8 +4899,7 @@ bool Prepared_statement::execute_immediate(const char *query, uint query_len)
name
=
execute_immediate_stmt_name
;
// for DBUG_PRINT etc
name
=
execute_immediate_stmt_name
;
// for DBUG_PRINT etc
m_prepared_stmt
=
MYSQL_CREATE_PS
(
this
,
id
,
thd
->
m_statement_psi
,
m_prepared_stmt
=
MYSQL_CREATE_PS
(
this
,
id
,
thd
->
m_statement_psi
,
name
.
str
,
name
.
length
,
name
.
str
,
name
.
length
);
NULL
,
0
);
if
(
prepare
(
query
,
query_len
))
if
(
prepare
(
query
,
query_len
))
DBUG_RETURN
(
true
);
DBUG_RETURN
(
true
);
...
...
storage/perfschema/pfs.cc
View file @
211421d5
...
@@ -6379,8 +6379,7 @@ void pfs_digest_end_v1(PSI_digest_locker *locker, const sql_digest_storage *dige
...
@@ -6379,8 +6379,7 @@ void pfs_digest_end_v1(PSI_digest_locker *locker, const sql_digest_storage *dige
PSI_prepared_stmt
*
PSI_prepared_stmt
*
pfs_create_prepared_stmt_v1
(
void
*
identity
,
uint
stmt_id
,
pfs_create_prepared_stmt_v1
(
void
*
identity
,
uint
stmt_id
,
PSI_statement_locker
*
locker
,
PSI_statement_locker
*
locker
,
const
char
*
stmt_name
,
size_t
stmt_name_length
,
const
char
*
stmt_name
,
size_t
stmt_name_length
)
const
char
*
sql_text
,
size_t
sql_text_length
)
{
{
PSI_statement_locker_state
*
state
=
reinterpret_cast
<
PSI_statement_locker_state
*>
(
locker
);
PSI_statement_locker_state
*
state
=
reinterpret_cast
<
PSI_statement_locker_state
*>
(
locker
);
PFS_events_statements
*
pfs_stmt
=
reinterpret_cast
<
PFS_events_statements
*>
(
state
->
m_statement
);
PFS_events_statements
*
pfs_stmt
=
reinterpret_cast
<
PFS_events_statements
*>
(
state
->
m_statement
);
...
@@ -6390,14 +6389,10 @@ pfs_create_prepared_stmt_v1(void *identity, uint stmt_id,
...
@@ -6390,14 +6389,10 @@ pfs_create_prepared_stmt_v1(void *identity, uint stmt_id,
if
(
unlikely
(
pfs_thread
==
NULL
))
if
(
unlikely
(
pfs_thread
==
NULL
))
return
NULL
;
return
NULL
;
if
(
sql_text_length
>
COL_INFO_SIZE
)
sql_text_length
=
COL_INFO_SIZE
;
PFS_prepared_stmt
*
pfs
=
create_prepared_stmt
(
identity
,
PFS_prepared_stmt
*
pfs
=
create_prepared_stmt
(
identity
,
pfs_thread
,
pfs_program
,
pfs_thread
,
pfs_program
,
pfs_stmt
,
stmt_id
,
pfs_stmt
,
stmt_id
,
stmt_name
,
static_cast
<
uint
>
(
stmt_name_length
),
stmt_name
,
static_cast
<
uint
>
(
stmt_name_length
));
sql_text
,
static_cast
<
uint
>
(
sql_text_length
));
state
->
m_parent_prepared_stmt
=
reinterpret_cast
<
PSI_prepared_stmt
*>
(
pfs
);
state
->
m_parent_prepared_stmt
=
reinterpret_cast
<
PSI_prepared_stmt
*>
(
pfs
);
state
->
m_in_prepare
=
true
;
state
->
m_in_prepare
=
true
;
...
...
storage/perfschema/pfs_prepared_stmt.cc
View file @
211421d5
...
@@ -78,8 +78,7 @@ PFS_prepared_stmt*
...
@@ -78,8 +78,7 @@ PFS_prepared_stmt*
create_prepared_stmt
(
void
*
identity
,
create_prepared_stmt
(
void
*
identity
,
PFS_thread
*
thread
,
PFS_program
*
pfs_program
,
PFS_thread
*
thread
,
PFS_program
*
pfs_program
,
PFS_events_statements
*
pfs_stmt
,
uint
stmt_id
,
PFS_events_statements
*
pfs_stmt
,
uint
stmt_id
,
const
char
*
stmt_name
,
uint
stmt_name_length
,
const
char
*
stmt_name
,
uint
stmt_name_length
)
const
char
*
sqltext
,
uint
sqltext_length
)
{
{
PFS_prepared_stmt
*
pfs
=
NULL
;
PFS_prepared_stmt
*
pfs
=
NULL
;
pfs_dirty_state
dirty_state
;
pfs_dirty_state
dirty_state
;
...
@@ -92,11 +91,8 @@ create_prepared_stmt(void *identity,
...
@@ -92,11 +91,8 @@ create_prepared_stmt(void *identity,
pfs
->
reset_data
();
pfs
->
reset_data
();
/* Do the assignments. */
/* Do the assignments. */
pfs
->
m_identity
=
identity
;
pfs
->
m_identity
=
identity
;
/* Set query text if available, else it will be set later. */
if
(
sqltext_length
>
0
)
strncpy
(
pfs
->
m_sqltext
,
sqltext
,
sqltext_length
);
pfs
->
m_sqltext_length
=
sqltext_length
;
pfs
->
m_sqltext_length
=
0
;
if
(
stmt_name
!=
NULL
)
if
(
stmt_name
!=
NULL
)
{
{
...
...
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