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

Encoding BIT and Geometry types on binary protocol

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • 10.3.20, 10.4.10
    • 10.4
    • Data types, Protocol
    • None

    Description

      I noticed some problems with encoding BIT and GEOMETRY types on the binary protocol.

      For the query:

          SELECT ?
      

      With `B'101'` encoded as `MYSQL_TYPE_BIT` (`0x10`) the execute statement's hexdump is:

          0000   10 00 00 00 17 13 00 00 00 00 01 00 00 00 00 01
          0010   10 00 01 05
      

      But I'm getting a NULL value back in the response:

      However, if I encode bit as `MYSQL_TYPE_VAR_STRING` (`0xFD`):

          0000   10 00 00 00 17 04 00 00 00 00 01 00 00 00 00 01
          0010   fd 00 01 05
      

      I'm getting the expected result.

      I observed the same behaviour for `MYSQL_TYPE_GEOMETRY`.

      Attachments

        Activity

          People

            sanja Oleksandr Byelkin
            wojtekmach Wojtek Mach
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Git Integration

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