Skip to content
This repository was archived by the owner on Aug 28, 2024. It is now read-only.

Commit 6137a91

Browse files
committed
On Windows files paths include backslashes, these require escaping appropriately for the JSON based output from the ps_thread_stack stored function.
1 parent 6260437 commit 6137a91

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

functions/ps_thread_stack.sql

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,9 @@ BEGIN
7575
/* Convert from picoseconds to microseconds */
7676
, CONCAT( '"timer_wait": ', ROUND(timer_wait/1000000, 2))
7777
, CONCAT( '"event_info": "'
78-
, CASE
79-
WHEN event_name NOT LIKE 'wait/io%' THEN SUBSTRING_INDEX(event_name, '/', -2)
80-
WHEN event_name NOT LIKE 'wait/io/file%' OR event_name NOT LIKE 'wait/io/socket%' THEN SUBSTRING_INDEX(event_name, '/', -4)
78+
, CASE
79+
WHEN event_name NOT LIKE 'wait/io%' THEN REPLACE(SUBSTRING_INDEX(event_name, '/', -2), '\\', '\\\\')
80+
WHEN event_name NOT LIKE 'wait/io/file%' OR event_name NOT LIKE 'wait/io/socket%' THEN REPLACE(SUBSTRING_INDEX(event_name, '/', -4),
8181
ELSE event_name
8282
END
8383
, '"'

0 commit comments

Comments
 (0)