aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/exported-sql-viewer.py
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2024-01-26 10:26:50 +0100
committerIngo Molnar <mingo@kernel.org>2024-01-26 10:26:50 +0100
commit42ac0be18bfa09c03f52244f7c3e15c89b38532f (patch)
tree601fd5e6da2ca0b77aa8cb22f0e81a29ba6fe1d6 /tools/perf/scripts/python/exported-sql-viewer.py
parent8e5647a723c49d73b9f108a8bb38e8c29d3948ea (diff)
parentecb1b8288dc7ccbdcb3b9df005fa1c0e0c0388a7 (diff)
Merge branch 'linus' into x86/mm, to refresh the branch and pick up fixes
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/exported-sql-viewer.py')
-rwxr-xr-xtools/perf/scripts/python/exported-sql-viewer.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/perf/scripts/python/exported-sql-viewer.py b/tools/perf/scripts/python/exported-sql-viewer.py
index 13f2d8a81610..121cf61ba1b3 100755
--- a/tools/perf/scripts/python/exported-sql-viewer.py
+++ b/tools/perf/scripts/python/exported-sql-viewer.py
@@ -677,8 +677,8 @@ class CallGraphModelBase(TreeModel):
# sqlite supports GLOB (text only) which uses * and ? and is case sensitive
if not self.glb.dbref.is_sqlite3:
# Escape % and _
- s = value.replace("%", "\%")
- s = s.replace("_", "\_")
+ s = value.replace("%", "\\%")
+ s = s.replace("_", "\\_")
# Translate * and ? into SQL LIKE pattern characters % and _
trans = string.maketrans("*?", "%_")
match = " LIKE '" + str(s).translate(trans) + "'"