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
3261a78e
Commit
3261a78e
authored
Apr 03, 2023
by
Oleksandr Byelkin
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '10.4' into 10.5
parents
ac5a534a
0a634390
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
38 additions
and
26 deletions
+38
-26
include/m_string.h
include/m_string.h
+16
-3
mysql-test/main/status.test
mysql-test/main/status.test
+2
-7
mysys/my_addr_resolve.c
mysys/my_addr_resolve.c
+4
-3
sql/debug_sync.cc
sql/debug_sync.cc
+1
-1
sql/sql_select.cc
sql/sql_select.cc
+9
-9
storage/tokudb/PerconaFT/portability/toku_debug_sync.h
storage/tokudb/PerconaFT/portability/toku_debug_sync.h
+6
-3
No files found.
include/m_string.h
View file @
3261a78e
...
...
@@ -199,9 +199,22 @@ extern ulonglong strtoull(const char *str, char **ptr, int base);
#include <mysql/plugin.h>
#define STRING_WITH_LEN(X) (X), ((size_t) (sizeof(X) - 1))
#define USTRING_WITH_LEN(X) ((uchar*) X), ((size_t) (sizeof(X) - 1))
#define C_STRING_WITH_LEN(X) ((char *) (X)), ((size_t) (sizeof(X) - 1))
#ifdef __cplusplus
#include <type_traits>
template
<
typename
T
>
inline
const
char
*
_swl_check
(
T
s
)
{
static_assert
(
std
::
is_same
<
T
,
const
char
(
&
)[
sizeof
(
T
)]
>::
value
||
std
::
is_same
<
T
,
const
char
[
sizeof
(
T
)]
>::
value
,
"Wrong argument for STRING_WITH_LEN()"
);
return
s
;
}
#define STRING_WITH_LEN(X) _swl_check<decltype(X)>(X), ((size_t) (sizeof(X) - 1))
#else
#define STRING_WITH_LEN(X) (X ""), ((size_t) (sizeof(X) - 1))
#endif
#define USTRING_WITH_LEN(X) (uchar*) STRING_WITH_LEN(X)
#define C_STRING_WITH_LEN(X) (char *) STRING_WITH_LEN(X)
#define LEX_STRING_WITH_LEN(X) (X).str, (X).length
typedef
struct
st_mysql_const_lex_string
LEX_CSTRING
;
...
...
mysql-test/main/status.test
View file @
3261a78e
...
...
@@ -280,7 +280,6 @@ show status like 'Com%function';
#
connect
(
root
,
localhost
,
root
,,
test
);
connection
root
;
let
$root_connection_id
=
`select connection_id()`
;
--
disable_warnings
create
database
db37908
;
--
enable_warnings
...
...
@@ -296,7 +295,6 @@ delimiter ;|
connect
(
user1
,
localhost
,
mysqltest_1
,,
test
);
connection
user1
;
let
$user1_connection_id
=
`select connection_id()`
;
--
error
ER_TABLEACCESS_DENIED_ERROR
select
*
from
db37908
.
t1
;
...
...
@@ -315,11 +313,8 @@ drop procedure proc37908;
drop
function
func37908
;
REVOKE
ALL
PRIVILEGES
,
GRANT
OPTION
FROM
mysqltest_1
@
localhost
;
DROP
USER
mysqltest_1
@
localhost
;
# Wait till the sessions user1 and root are disconnected
let
$wait_condition
=
SELECT
COUNT
(
*
)
=
0
FROM
information_schema
.
processlist
WHERE
id
in
(
'$root_connection_id'
,
'$user1_connection_id'
);
# Wait until all non-default sessions are disconnected
let
$wait_condition
=
SELECT
COUNT
(
*
)
=
1
FROM
information_schema
.
processlist
;
--
source
include
/
wait_condition
.
inc
#
...
...
mysys/my_addr_resolve.c
View file @
3261a78e
...
...
@@ -239,10 +239,10 @@ static int addr_resolve(void *ptr, my_addr_loc *loc)
}
/* 500 ms should be plenty of time for addr2line to issue a response. */
/* 500
0
ms should be plenty of time for addr2line to issue a response. */
/* Read in a loop till all the output from addr2line is complete. */
while
(
parsed
==
total_bytes_read
&&
(
ret
=
poll
(
&
poll_fds
,
1
,
500
)))
(
ret
=
poll
(
&
poll_fds
,
1
,
500
0
)))
{
/* error during poll */
if
(
ret
<
0
)
...
...
@@ -286,7 +286,8 @@ static int addr_resolve(void *ptr, my_addr_loc *loc)
loc
->
line
=
atoi
(
output
+
line_number_start
);
/* Addr2line was unable to extract any meaningful information. */
if
(
strcmp
(
loc
->
file
,
"??"
)
==
0
&&
loc
->
func
[
0
]
==
'?'
)
if
((
strcmp
(
loc
->
file
,
"??"
)
==
0
||
strcmp
(
loc
->
file
,
""
)
==
0
)
&&
(
loc
->
func
[
0
]
==
'?'
||
loc
->
line
==
0
))
return
6
;
loc
->
file
=
strip_path
(
loc
->
file
);
...
...
sql/debug_sync.cc
View file @
3261a78e
...
...
@@ -1317,7 +1317,7 @@ uchar *debug_sync_value_ptr(THD *thd)
if
(
opt_debug_sync_timeout
)
{
static
c
har
on
[]
=
"ON - current signal: '"
;
static
c
onst
char
on
[]
=
"ON - current signal: '"
;
// Ensure exclusive access to debug_sync_global.ds_signal
mysql_mutex_lock
(
&
debug_sync_global
.
ds_mutex
);
...
...
sql/sql_select.cc
View file @
3261a78e
...
...
@@ -28263,19 +28263,19 @@ enum explainable_cmd_type
};
static
const
char
*
const
explainable_cmd_name
[]
=
const
LEX_CSTRING
explainable_cmd_name
[]
=
{
"select "
,
"insert "
,
"replace "
,
"update "
,
"delete "
,
{
STRING_WITH_LEN
(
"select "
)}
,
{
STRING_WITH_LEN
(
"insert "
)}
,
{
STRING_WITH_LEN
(
"replace "
)}
,
{
STRING_WITH_LEN
(
"update "
)}
,
{
STRING_WITH_LEN
(
"delete "
)}
,
};
static
c
har
const
*
get_explainable_cmd_name
(
enum
explainable_cmd_type
cmd
)
c
onst
LEX_CSTRING
*
get_explainable_cmd_name
(
enum
explainable_cmd_type
cmd
)
{
return
explainable_cmd_name
[
cmd
]
;
return
explainable_cmd_name
+
cmd
;
}
static
...
...
@@ -28577,7 +28577,7 @@ void st_select_lex::print(THD *thd, String *str, enum_query_type query_type)
query_type
);
}
if
(
sel_type
==
UPDATE_CMD
||
sel_type
==
DELETE_CMD
)
str
->
append
(
STRING_WITH_LEN
(
get_explainable_cmd_name
(
sel_type
)
));
str
->
append
(
get_explainable_cmd_name
(
sel_type
));
if
(
sel_type
==
DELETE_CMD
)
{
str
->
append
(
STRING_WITH_LEN
(
" from "
));
...
...
storage/tokudb/PerconaFT/portability/toku_debug_sync.h
View file @
3261a78e
...
...
@@ -64,9 +64,12 @@ inline void toku_debug_sync(struct tokutxn *txn, const char *sync_point_name) {
void
*
client_extra
;
THD
*
thd
;
toku_txn_get_client_id
(
txn
,
&
client_id
,
&
client_extra
);
thd
=
reinterpret_cast
<
THD
*>
(
client_extra
);
DEBUG_SYNC
(
thd
,
sync_point_name
);
if
(
debug_sync_service
)
{
toku_txn_get_client_id
(
txn
,
&
client_id
,
&
client_extra
);
thd
=
reinterpret_cast
<
THD
*>
(
client_extra
);
debug_sync_service
(
thd
,
sync_point_name
,
strlen
(
sync_point_name
));
}
}
#else // defined(ENABLED_DEBUG_SYNC)
...
...
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