Details

    Description

      MDEV-11371 introduced a change to libmariadb:

      commit e069fb8e76eeab096b8255805244f73048e3575a (HEAD, origin/svoj-MDEV-11371)
      Author: Sergey Vojtovich <svoj@mariadb.org>
      Date:   Thu Aug 31 15:09:10 2017 +0400
       
          MDEV-11371 - column compression
       
      diff --git a/include/mariadb_com.h b/include/mariadb_com.h
      index 727c66b..8ccc171 100644
      --- a/include/mariadb_com.h
      +++ b/include/mariadb_com.h
      @@ -330,6 +330,8 @@ enum enum_field_types { MYSQL_TYPE_DECIMAL, MYSQL_TYPE_TINY,
                               MYSQL_TYPE_TIMESTAMP2,
                               MYSQL_TYPE_DATETIME2,
                               MYSQL_TYPE_TIME2,
      +                        MYSQL_TYPE_BLOB_COMPRESSED= 140,
      +                        MYSQL_TYPE_VARCHAR_COMPRESSED= 141,
                               /* --------------------------------------------- */
                               MYSQL_TYPE_JSON=245,
                               MYSQL_TYPE_NEWDECIMAL=246,
      

      According to serg this should not have been added; the parameters should be private to the server, not exposed to the client.

      Now, a merge from 10.2 is causing a conflict for libmariadb, because there have been changes in the libmariadb that is used in 10.2. This conflict needs to be resolved in some way.

      It appears that some client code is depending on the definitions. And those files should probably not include mysql_com.h to get the server-side definition.

      Attachments

        Issue Links

          Activity

            Update 10.3 to use the latest commit in libmariadb/10.2-server branch. This will wipe out MYSQL_TYPE_BLOB_COMPRESSED and MYSQL_TYPE_VARCHAR_COMPRESSED from libmariadb. And fix mysqlbinlog.cc somehow differently.

            serg Sergei Golubchik added a comment - Update 10.3 to use the latest commit in libmariadb/10.2-server branch. This will wipe out MYSQL_TYPE_BLOB_COMPRESSED and MYSQL_TYPE_VARCHAR_COMPRESSED from libmariadb. And fix mysqlbinlog.cc somehow differently.

            So I get a warning if I move this to mysqlbinlog.cc:

            /home/svoj/devel/maria/mariadb/sql/rpl_utility.cc: In member function ‘uint32 table_def::calc_field_size(uint, uchar*) const’:
            /home/svoj/devel/maria/mariadb/sql/rpl_utility.cc:310:3: warning: case value ‘140’ not in enumerated type ‘enum_field_types’ [-Wswitch]
               case MYSQL_TYPE_BLOB_COMPRESSED:
               ^
            /home/svoj/devel/maria/mariadb/sql/rpl_utility.cc:300:3: warning: case value ‘141’ not in enumerated type ‘enum_field_types’ [-Wswitch]
               case MYSQL_TYPE_VARCHAR_COMPRESSED:
               ^
            /home/svoj/devel/maria/mariadb/sql/rpl_utility.cc: In constructor ‘table_def::table_def(unsigned char*, ulong, uchar*, int, uchar*, uint16)’:
            /home/svoj/devel/maria/mariadb/sql/rpl_utility.cc:1075:7: warning: case value ‘140’ not in enumerated type ‘enum_field_types’ [-Wswitch]
                   case MYSQL_TYPE_BLOB_COMPRESSED:
                   ^
            /home/svoj/devel/maria/mariadb/sql/rpl_utility.cc:1106:7: warning: case value ‘141’ not in enumerated type ‘enum_field_types’ [-Wswitch]
                   case MYSQL_TYPE_VARCHAR_COMPRESSED:
                   ^
            

            I can probably undef enum_field_types and then copy one from mysql_com.h.

            svoj Sergey Vojtovich added a comment - So I get a warning if I move this to mysqlbinlog.cc: /home/svoj/devel/maria/mariadb/sql/rpl_utility.cc: In member function ‘uint32 table_def::calc_field_size(uint, uchar*) const’: /home/svoj/devel/maria/mariadb/sql/rpl_utility.cc:310:3: warning: case value ‘140’ not in enumerated type ‘enum_field_types’ [-Wswitch] case MYSQL_TYPE_BLOB_COMPRESSED: ^ /home/svoj/devel/maria/mariadb/sql/rpl_utility.cc:300:3: warning: case value ‘141’ not in enumerated type ‘enum_field_types’ [-Wswitch] case MYSQL_TYPE_VARCHAR_COMPRESSED: ^ /home/svoj/devel/maria/mariadb/sql/rpl_utility.cc: In constructor ‘table_def::table_def(unsigned char*, ulong, uchar*, int, uchar*, uint16)’: /home/svoj/devel/maria/mariadb/sql/rpl_utility.cc:1075:7: warning: case value ‘140’ not in enumerated type ‘enum_field_types’ [-Wswitch] case MYSQL_TYPE_BLOB_COMPRESSED: ^ /home/svoj/devel/maria/mariadb/sql/rpl_utility.cc:1106:7: warning: case value ‘141’ not in enumerated type ‘enum_field_types’ [-Wswitch] case MYSQL_TYPE_VARCHAR_COMPRESSED: ^ I can probably undef enum_field_types and then copy one from mysql_com.h.

            serg, could you have a quick look at 4b46dab0338ad101171c9342ff6d263c833d5387 ? It seem to pass buildbot pretty well.

            svoj Sergey Vojtovich added a comment - serg , could you have a quick look at 4b46dab0338ad101171c9342ff6d263c833d5387 ? It seem to pass buildbot pretty well.

            looks ok. I'd add a comment before the define, to explain why it was needed. That mysqlbinlog is a mix of server and client code, it needs client includes but server internal values in enum_field_types.

            Another way to see it is that `Field::real_field_type()` and `Field::type()` should not use the same enum type. I hope we'll fix that eventually.

            serg Sergei Golubchik added a comment - looks ok. I'd add a comment before the define, to explain why it was needed. That mysqlbinlog is a mix of server and client code, it needs client includes but server internal values in enum_field_types. Another way to see it is that `Field::real_field_type()` and `Field::type()` should not use the same enum type. I hope we'll fix that eventually.
            svoj Sergey Vojtovich added a comment - Fixed in https://github.com/MariaDB/server/commit/4e1e5a32668bc717e0049961e789dd29883cc66c

            People

              svoj Sergey Vojtovich
              marko Marko Mäkelä
              Votes:
              0 Vote for this issue
              Watchers:
              5 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.