Uploaded image for project: 'Percona Server for MySQL'
  1. Percona Server for MySQL
  2. PS-1321

LP #1132351: Suboptimal code in skip_trailing_space()

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Done
    • Priority: High
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None

      Description

      **Reported in Launchpad by Alexey Kopytov last update 27-07-2014 16:26:26

      The skip_trailing_space() implementation is suboptimal. 2 problems:

      • it assumes SIZEOF_INT to be the machine word length. So it processes
        the string by 4-byte words even on 64-bit machines. It should
        actually be SIZEOF_LONG as it's normally the real machine word length.
      • it is unnecessary brachy. Too many "if"s and loops for such a simple code.

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            lpjirasync lpjirasync (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Smart Checklist