Uploaded image for project: 'MariaDB MaxScale'
  1. MariaDB MaxScale
  2. MXS-1218

Use correct conversion specifier when printing 64-bit integers

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.5
    • Fix Version/s: 2.0.6
    • Component/s: Core
    • Labels:
      None
    • Sprint:
      2017-31

      Description

      When the poll statistics are printed, the printf format specifier "%d" is used, even though the counters are 64-bit.

      Instead of

      dcb_printf(..., "...%d\n", ...);
      

      the following should be used

      dcb_printf(..., "...%" PRId64 "\n", ...);
      

      The use of %d leads to wrong output when MaxScale has been running for a long period.

        Attachments

          Activity

            People

            Assignee:
            esa.korhonen Esa Korhonen
            Reporter:
            johan.wikman Johan Wikman
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: