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

    • Bug
    • Status: Closed (View Workflow)
    • Minor
    • Resolution: Fixed
    • 10.0.3
    • 10.0.4
    • None

    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

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

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.