Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

修复无法展现SQL历史趋势图 #2380

Merged
merged 1 commit into from
Nov 14, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion sql/slowlog.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import MySQLdb
import simplejson as json
import datetime
import pymysql
from django.contrib.auth.decorators import permission_required
from django.db.models import F, Sum, Value as V, Max
from django.db.models.functions import Concat
Expand Down Expand Up @@ -206,7 +207,7 @@ def slowquery_review_history(request):
def report(request):
"""返回慢SQL历史趋势"""
checksum = request.GET.get("checksum")
checksum = MySQLdb.escape_string(checksum).decode("utf-8")
checksum = pymysql.escape_string(checksum)
cnt_data = ChartDao().slow_query_review_history_by_cnt(checksum)
pct_data = ChartDao().slow_query_review_history_by_pct_95_time(checksum)
cnt_x_data = [row[1] for row in cnt_data["rows"]]
Expand Down
Loading