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

Add a plugin to field types (column types)

    Details

    • Type: Task
    • Status: In Progress
    • Priority: Minor
    • Resolution: Unresolved
    • Fix Version/s: 10.2
    • Component/s: None
    • Labels:

      Description

      Issues to solve:

      • read/write: that's easy, the plugin provides some kind of a "store" method that serializes the data into something that can be memcmp-ed. And "val" methods as appropriate.
      • indexing: not at issue, the engine thinks the column type is BINARY and indexes is accordingly
      • don't forget that field definition may use parameters, like in VARCHAR(10)
      • protocol
        • text protocol - what to send as field metadata? variant: MYSQL_TYPE_PLUGIN and a string with the type name
        • binary protocol - how to send the value to the client: variant: as a string. how the client send the value to the server? either way, the server converts it from number/string/etc just as for INSERTs
      • replication, RBR
        • similar, use MYSQL_TYPE_PLUGIN, and as additional metadata - field type as a string, parameters, whatever

      So, a plugin would need to provide

      • store() method from at least some of the basic types
      • val() methods to at least some of the basic types
      • description of whatever parameters a field definition takes
      • informational methods, like store_length(), etc

      This task doesn't cover everything! It is assumed that we can expand this API later to add more features. In particular, the following is not solved:

      • data types that cannot be efficiently memcmp()'ed. For example, this proposal doesn't allow to implement a string type with charset support.
      • data types that require special indexes, such as XML, spatial data, etc.

      see also the original issue description in the history

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

              Hide
              rspadim roberto spadim added a comment -

              We have some nice field type in PostgreSQL
              THE MAIN PROBLEM ABOUT THIS PLUGIN IS A NOT STANDARD ABOUT FIELD TYPES...
              for example XML functions of MYSQL 5.7 want a VARCHAR/CHAR/TEXT/BLOB as parameter, and a XML type could make some incompatibility...

              well more definition is need before add more considerations...

              Show
              rspadim roberto spadim added a comment - We have some nice field type in PostgreSQL THE MAIN PROBLEM ABOUT THIS PLUGIN IS A NOT STANDARD ABOUT FIELD TYPES... for example XML functions of MYSQL 5.7 want a VARCHAR/CHAR/TEXT/BLOB as parameter, and a XML type could make some incompatibility... well more definition is need before add more considerations...

                People

                • Assignee:
                  bar Alexander Barkov
                  Reporter:
                  rspadim roberto spadim
                • Votes:
                  4 Vote for this issue
                  Watchers:
                  7 Start watching this issue

                  Dates

                  • Created:
                    Updated:

                    Time Tracking

                    Estimated:
                    Original Estimate - 4 weeks
                    4w
                    Remaining:
                    Remaining Estimate - 4 weeks
                    4w
                    Logged:
                    Time Spent - Not Specified
                    Not Specified