Suboptimal code in skip_trailing_space()

Bug #1132351 reported by Alexey Kopytov
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MySQL Server
Unknown
Unknown
Percona Server moved to https://jira.percona.com/projects/PS
Fix Released
Medium
Laurynas Biveinis
5.1
Won't Fix
Undecided
Unassigned
5.5
Fix Released
Medium
Alexey Kopytov
5.6
Fix Released
Medium
Laurynas Biveinis

Bug Description

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.

Tags: upstream

Related branches

tags: added: upstream
Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PS-1321

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.