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

Commit a7958ef

Browse files
committed
Add some details to format_statement() help around the new statement_truncate_len variable within the new sys_config table
1 parent 5757d63 commit a7958ef

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1379,7 +1379,9 @@ mysql> select format_path('/Users/mark/sandboxes/SmallTree/AMaster/data/mysql/pr
13791379
13801380
##### Description
13811381
1382-
Formats a normalized statement, truncating it if it's > 64 characters long.
1382+
Formats a normalized statement, truncating it if it's > 64 characters long by default.
1383+
1384+
To configure the length to truncate the statement to by default, update the `statement_truncate_len` variable with `sys_config` table to a different value. Alternatively, to change it just for just your particular session, use `SET @statement_truncate_len := <some new value>`.
13831385

13841386
Useful for printing statement related data from Performance Schema from the command line.
13851387

functions/format_statement.sql

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,11 @@ CREATE DEFINER='root'@'localhost' FUNCTION format_statement (
2525
Description
2626
-----------
2727
28-
Formats a normalized statement, truncating it if it\'s > 64 characters long.
28+
Formats a normalized statement, truncating it if it\'s > 64 characters long by default.
29+
30+
To configure the length to truncate the statement to by default, update the `statement_truncate_len`
31+
variable with `sys_config` table to a different value. Alternatively, to change it just for just
32+
your particular session, use `SET @statement_truncate_len := <some new value>`.
2933
3034
Useful for printing statement related data from Performance Schema from
3135
the command line.

0 commit comments

Comments
 (0)