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

Temporary variable for sub_id is 32-bit, should be 64-bit

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 10.0.3
    • Fix Version/s: 10.0.4
    • Component/s: None
    • Labels:

      Description

      In sql/rpl_gtid.cc, the temporary sub_id variable is declared as uint32, but should be uint64 (as sub_id is everywhere else):

       464 uint64
       465 rpl_slave_state::next_subid(uint32 domain_id)
       466 {
       467   uint32 sub_id= 0;
       468   element *elem;
       469 
       470   lock();
       471   elem= get_element(domain_id);
       472   if (elem)
       473     sub_id= ++elem->last_sub_id;
       474   unlock();
       475 
       476   return sub_id;
       477 }

      That would be a fun bug to diagnose on a server with a 1-year uptime.

      (Also, please rename subid to sub_id everywhere, otherwise grep is less useful.)

        Attachments

          Activity

            People

            Assignee:
            knielsen Kristian Nielsen
            Reporter:
            jeremycole Jeremy Cole
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: