Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-33463

Add an option to truncate excessively long queries in the slow log

    XMLWordPrintable

Details

    • New Feature
    • Status: Stalled (View Workflow)
    • Minor
    • Resolution: Unresolved
    • 13.1
    • None
    • None

    Description

      In a case when slow query contains huge TEXT/BLOB values it becomes impractical to have such queries in the log. Think of a case when a slow INSERT or UPDATE contains TEXT values longer than 1MB.

      In such case it would be good to have an option to truncate the query to some reasonably long size which would still reveal the nature of the query, but will not flood the log with too much information.

      This will indeed create a problem for mysqldumpslow tool and parsing the log in general, for which it would be best if only the values are truncated, but that means parsing and processing the query before logging it into slow log which in my opinion is too much extra effort for such corner cases.

      Alternatively, instead of introducing another option, this could be an extension of log_slow_verbosity

      If such option is introduced should be disabled by default or zero meaning no truncation.

      Attachments

        Issue Links

          Activity

            People

              serg Sergei Golubchik
              salle Alexander Keremidarski
              Votes:
              2 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0d
                  0d
                  Logged:
                  Time Spent - 3h 40m
                  3h 40m

                  Git Integration

                    Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.