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

Faking the version string only works with MariaDB-Clients

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 10.2.1
    • 10.2.6
    • Protocol
    • Linux

    Description

      Changing the server version string only works with MariaDB clients.

      Problem is that only these know to remove the RPL_VERSION_HACK prefix ("5.5.5-") added by the server, and that the server even applies the RPL_VERSION_HACK prefix if the version string was explicitly set to a different value in my.cnf

      How to reproduce:

      • change version to a different string in my.cnf, e.g.

        version=5.6.23-log"
        

      • connect to server with mysql client binary from MariaDB distribution:

        Welcome to the MariaDB monitor.  Commands end with ; or \g.
        Your MySQL connection id is 6
        Server version: 5.6.23-log Source distribution
        

      • connect to server with mysql client binary from MySQL distribution:

        Welcome to the MySQL monitor.  Commands end with ; or \g.
        Your MySQL connection id is 7
        Server version: 5.5.5-5.6.23-log Source distribution
        

      This leads to e.g. JDBC reporting a major and minor server version of 5 each, no matter what "version" is actually set to, so defeating the main purpose of version being fakable ...

      Attachments

        Issue Links

          Activity

            Easily reproducible with MySQL clients. I wouldn't be sure it's a bug, but serg said earlier on a mailing list that it is.

            elenst Elena Stepanova added a comment - Easily reproducible with MySQL clients. I wouldn't be sure it's a bug, but serg said earlier on a mailing list that it is.

            serg, please review PR#242 by Hartmut.

            svoj Sergey Vojtovich added a comment - serg , please review PR#242 by Hartmut.
            diego dupin Diego Dupin added a comment -

            for information, this is more important than MDEV-7780 indicate, mysql java driver test internally server version string.
            The most important issue is related to timestamp : MySQL truncate timestamp's microsecond for 5.5 servers. So 10.1 servers sending 5.5.5-10.1 version won't have any microseconds.

            diego dupin Diego Dupin added a comment - for information, this is more important than MDEV-7780 indicate, mysql java driver test internally server version string. The most important issue is related to timestamp : MySQL truncate timestamp's microsecond for 5.5 servers. So 10.1 servers sending 5.5.5-10.1 version won't have any microseconds.
            cvicentiu Vicențiu Ciorbaru added a comment - Fixed with: https://github.com/MariaDB/server/commit/8f05c848c5d856f53fa907ae202deac465a17656

            People

              cvicentiu Vicențiu Ciorbaru
              hholzgra Hartmut Holzgraefe
              Votes:
              2 Vote for this issue
              Watchers:
              7 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.