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

LP #1087202: smaller type conversion bugs on 32 bit

    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 Vladislav Vaintroub last update 08-01-2013 22:00:28

      There are couple of bugs about conversion of ib_uint64_t types (like LSNs) to size_t-big types. On 32 bit, for big enough values it would mean truncating valuable bits off the value. I used Visual Studio compiler to find the bugs, gcc by default is lax on type conversions, even ones that might result in loss of information.

      Also, I found that ut_max inline function was sometimes incorrectly used on 64 bit values - it is defined for ulint values, which is != ib_uint64_t on 32 bit

      Finally, there is a warning about truncation of ib_uint64_t to double, in I_S handling (because Field::store(double) was used instead of Field::store(longlong,bool)). I'll attach the patch shortly.

        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