• Epic Name:
      Add a plugin to field types (column types)
    • Sprint:
      10.2.0-1, 10.2.0-2, 10.2.0-4, 10.2.0-5, 10.2.0-6, 10.2.0-7, 10.2.0-8, 10.2.1-1, 10.2.1-3, 10.2.1-4, 10.2.1-5, 10.2.2-3, 10.3.1-1


      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


          Issue Links



              • Assignee:
                bar Alexander Barkov
                rspadim roberto spadim
              • Votes:
                16 Vote for this issue
                23 Start watching this issue


                • Created: