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

Make older compilers happy with log.h

Details

    • Bug
    • Status: Closed (View Workflow)
    • Critical
    • Resolution: Fixed
    • 11.2(EOL)
    • 11.2.2
    • Server
    • None
    • gcc version 4.9.0

    Description

      Compilation fails producing errors like

      /home/hf/wgit/mdev-22168-1103/sql/log.h: In constructor ‘Cache_flip_event_log::Cache_flip_event_log()’:
      /home/hf/wgit/mdev-22168-1103/sql/log.h:453:74: error: missing initializer for member ‘st_io_cache::pos_in_file’ [-Werror=missing-field-initializers]
                                  current(&log_file), alt(&alt_buf), ref_count(1) {}
      
      

      It's a known and fixed compiler issue
      But i think it worth adapting for these compilers, also explicitly clear the buffer with the
      my_b_clear() is faster and readable.

      Attachments

        Activity

          holyfoot Alexey Botchkov created issue -
          holyfoot Alexey Botchkov made changes -
          Field Original Value New Value
          Description Compilation fails producing errors like

          {code:java}
          /home/hf/wgit/mdev-22168-1103/sql/log.h: In constructor ‘Cache_flip_event_log::Cache_flip_event_log()’:
          /home/hf/wgit/mdev-22168-1103/sql/log.h:453:74: error: missing initializer for member ‘st_io_cache::pos_in_file’ [-Werror=missing-field-initializers]
                                      current(&log_file), alt(&alt_buf), ref_count(1) {}

          {code}
          Compilation fails producing errors like

          {code:java}
          /home/hf/wgit/mdev-22168-1103/sql/log.h: In constructor ‘Cache_flip_event_log::Cache_flip_event_log()’:
          /home/hf/wgit/mdev-22168-1103/sql/log.h:453:74: error: missing initializer for member ‘st_io_cache::pos_in_file’ [-Werror=missing-field-initializers]
                                      current(&log_file), alt(&alt_buf), ref_count(1) {}

          {code}

          It's a know and fixed [compiler issue|https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61489]
          But i think it worth adapting for that compilers and explicitly clear the buffer with the
          my_b_clear().
          holyfoot Alexey Botchkov made changes -
          Description Compilation fails producing errors like

          {code:java}
          /home/hf/wgit/mdev-22168-1103/sql/log.h: In constructor ‘Cache_flip_event_log::Cache_flip_event_log()’:
          /home/hf/wgit/mdev-22168-1103/sql/log.h:453:74: error: missing initializer for member ‘st_io_cache::pos_in_file’ [-Werror=missing-field-initializers]
                                      current(&log_file), alt(&alt_buf), ref_count(1) {}

          {code}

          It's a know and fixed [compiler issue|https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61489]
          But i think it worth adapting for that compilers and explicitly clear the buffer with the
          my_b_clear().
          Compilation fails producing errors like

          {code:java}
          /home/hf/wgit/mdev-22168-1103/sql/log.h: In constructor ‘Cache_flip_event_log::Cache_flip_event_log()’:
          /home/hf/wgit/mdev-22168-1103/sql/log.h:453:74: error: missing initializer for member ‘st_io_cache::pos_in_file’ [-Werror=missing-field-initializers]
                                      current(&log_file), alt(&alt_buf), ref_count(1) {}

          {code}

          It's a known and fixed [compiler issue|https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61489]
          But i think it worth adapting for these compilers, also explicitly clear the buffer with the
          my_b_clear() is faster and readable.
          holyfoot Alexey Botchkov added a comment - https://github.com/MariaDB/server/commit/daca468c682ede3b423359b4d835dcbe3d6251a8
          holyfoot Alexey Botchkov made changes -
          Status Open [ 1 ] In Progress [ 3 ]
          holyfoot Alexey Botchkov made changes -
          Assignee Alexey Botchkov [ holyfoot ] Sergei Golubchik [ serg ]
          Status In Progress [ 3 ] In Review [ 10002 ]

          ok to push

          serg Sergei Golubchik added a comment - ok to push
          serg Sergei Golubchik made changes -
          Assignee Sergei Golubchik [ serg ] Alexey Botchkov [ holyfoot ]
          Status In Review [ 10002 ] Stalled [ 10000 ]
          holyfoot Alexey Botchkov made changes -
          issue.field.resolutiondate 2023-09-30 11:53:58.0 2023-09-30 11:53:57.757
          holyfoot Alexey Botchkov made changes -
          Fix Version/s 11.2.2 [ 29035 ]
          Fix Version/s 11.2 [ 28603 ]
          Resolution Fixed [ 1 ]
          Status Stalled [ 10000 ] Closed [ 6 ]

          People

            holyfoot Alexey Botchkov
            holyfoot Alexey Botchkov
            Votes:
            0 Vote for this issue
            Watchers:
            2 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.