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

mariadb client creates `.mariadb_histor` instead of `.mariadb_history`

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Minor
    • Resolution: Fixed
    • 11.4, 11.8
    • 11.4.13, 11.8.9, 12.3.3, 13.0.2
    • Scripts & Clients
    • None
    • Amazon Linux 2023
      mariadb114-3:11.4.12-1.amzn2023.0.1.x86_64
      mariadb118-3:11.8.8-1.amzn2023.0.1.x86_64
    • Can result in unexpected behaviour
    • The mariadb client was using .mariadb_histor (without the trailing 'y') as the storage name for command line history.

    Description

      In the latest mariadb114 and mariadb118 packages in Amazon Linux 2023, the
      client creates `.mariadb_histor` instead of `.mariadb_history`.

      It looks like `histfile_size` in `client/mysql.cc` is calculated using the string "/.mysql_history" (15 chars) rather than
      "/.mariadb_history" (17 chars). Because the buffer is only allocated to that
      shorter length, the resulting filename is truncated by 2 characters.

      https://github.com/MariaDB/server/blob/fd8cec54af7a9d79749df25ea70dac695b371641/client/mysql.cc#L1447

      This appears to have been introduced when commit cbcff6324a4 was merged
      into the 11.x branches. That commit reintroduced the "/.mysql_history" string
      in the size calculation.

      https://github.com/MariaDB/server/commit/cbcff6324a4402ea5a17b5df99f2b911a8f83b19

      Attachments

        Issue Links

          Activity

            People

              danblack Daniel Black
              davidzlu David Lu
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0d
                  0d
                  Logged:
                  Time Spent - 1h
                  1h

                  Git Integration

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