[MDEV-4912] Data type plugin API version 1 Created: 2013-08-17  Updated: 2022-04-21  Resolved: 2019-11-20

Status: Closed
Project: MariaDB Server
Component/s: Data types
Fix Version/s: 10.5.0

Type: Epic Priority: Minor
Reporter: roberto spadim Assignee: Alexander Barkov
Resolution: Fixed Votes: 16
Labels: gsoc14

Issue Links:
Blocks
blocks MDEV-274 The data type for IPv6/IPv4 addresses... Closed
blocks MDEV-4913 External ENUM Field definition Open
blocks MDEV-4958 Adding datatype UUID Closed
blocks MDEV-10018 Timestamp with time zone Open
blocks MDEV-10575 sql_mode=ORACLE: Date and timestamp f... Open
blocks MDEV-10592 sql_mode=ORACLE: TYPE .. TABLE OF for... Open
blocks MDEV-10593 sql_mode=ORACLE: TYPE .. AS OBJECT: b... Open
blocks MDEV-11058 Put user defined exceptions to the sa... Open
blocks MDEV-11829 Please add support for datetime with ... Open
blocks MDEV-12252 ROW data type for stored function ret... In Review
blocks MDEV-12307 ROW data type for built-in function r... Stalled
blocks MDEV-12308 Accessing ROW type function fields Open
blocks MDEV-12513 INTERVAL data type Open
blocks MDEV-12786 Feature Request : New Column Type Apt... Open
is blocked by MDEV-7199 Introduce the concept of data type ha... Closed
is blocked by MDEV-8092 Change Column_definition::field_name ... Closed
is blocked by MDEV-9170 Get rid of LEX::length and LEX::dec Closed
is blocked by MDEV-9188 Split Column_definition::check() into... Closed
is blocked by MDEV-9211 Split Column_definition::init_for_tmp... Closed
is blocked by MDEV-9215 Detect cmp_type() and result_type() f... Closed
is blocked by MDEV-9216 Split field.cc:make_field() into virt... Closed
is blocked by MDEV-9217 Split Item::tmp_table_field_from_fiel... Closed
is blocked by MDEV-9218 Add a helper class Record_addr Closed
is blocked by MDEV-9220 Split filesort.cc:make_sortkey() and... Closed
is blocked by MDEV-9221 Derive Item from Type_handler virtually Closed
is blocked by MDEV-9234 Add Type_handler::union_element_final... Closed
is blocked by MDEV-9235 Add Type_handler::is_param_long_data_... Closed
is blocked by MDEV-9238 Wrap create_virtual_tmp_table() into ... Closed
is blocked by MDEV-9316 Add Field::store_hex_hybrid() Closed
is blocked by MDEV-9319 ALTER from a bigger to a smaller blob... Closed
is blocked by MDEV-9326 Split field_conv_incompatible() into ... Closed
is blocked by MDEV-9327 Split memcpy_field_possible() into vi... Closed
is blocked by MDEV-9334 ALTER from DECIMAL to BIGINT UNSIGNED... Closed
is blocked by MDEV-9337 ALTER from DECIMAL and INT to DATETIM... Closed
is blocked by MDEV-9340 Copying from INT/DOUBLE to ENUM is in... Closed
is blocked by MDEV-9391 InnoDB does not produce warnings when... Closed
is blocked by MDEV-9392 Copying from DECIMAL to YEAR is not c... Closed
is blocked by MDEV-9393 Split Copy_field::get_copy_func() int... Closed
is blocked by MDEV-9395 Add Type_handler::Item_decimal_scale(... Closed
is blocked by MDEV-9396 Split Create_field::init() into virtu... Closed
is blocked by MDEV-9397 Split field.cc:calc_pack_length() int... Closed
is blocked by MDEV-9398 Add Type_handler::cast_to_int_type Closed
is blocked by MDEV-9406 CREATE TABLE..SELECT creates differen... Closed
is blocked by MDEV-9407 Illegal mix of collation when using G... Closed
is blocked by MDEV-9408 CREATE TABLE SELECT MAX(int_column) c... Closed
is blocked by MDEV-9410 VIEW over a ROLLUP query reports too ... Closed
is blocked by MDEV-9495 Wrong field type for a UNION of a sig... Closed
is blocked by MDEV-9497 UNION and COALESCE produce different ... Closed
is blocked by MDEV-9522 Split sql_select.cc:can_change_cond_r... Closed
is blocked by MDEV-10309 COALESCE(12345678900) makes a column ... Closed
is blocked by MDEV-10811 Change design from "Item is Type_hand... Closed
is blocked by MDEV-11245 Move prepare_create_field and sp_prep... Closed
is blocked by MDEV-11294 Move definitions of Derivation, DTCol... Closed
is blocked by MDEV-11298 Split Item_func_hex::val_str_ascii() ... Closed
is blocked by MDEV-11302 Add class Type_ext_attributes and Typ... Closed
is blocked by MDEV-11330 Split Item_func_hybrid_field_type::va... Closed
is blocked by MDEV-11331 Wrong result for INSERT INTO t1 (date... Closed
is blocked by MDEV-11333 Expect "Impossible where condition" f... Closed
is blocked by MDEV-11337 Split Item::save_in_field() into virt... Closed
is blocked by MDEV-11344 Split Arg_comparator::set_compare_fun... Closed
is blocked by MDEV-11357 Split Item_cache::get_cache() into vi... Closed
is blocked by MDEV-11365 Split the data type and attribute rel... Closed
is blocked by MDEV-11478 Result data type aggregation for plug... Closed
is blocked by MDEV-11482 Incorrect result for (time_expr BETWE... Closed
is blocked by MDEV-11485 Split Item_func_between::val_int() in... Closed
is blocked by MDEV-11497 Wrong result for (int_expr IN (mixtur... Closed
is blocked by MDEV-11503 Introduce Type_handler::make_in_vecto... Closed
is blocked by MDEV-11514 IN with a mixture of TIME and DATETIM... Closed
is blocked by MDEV-11528 Split Item_func_min_max::val_xxx() an... Closed
is blocked by MDEV-11554 Wrong result for CASE on a mixture of... Closed
is blocked by MDEV-11555 CASE with a mixture of TIME and DATET... Closed
is blocked by MDEV-11558 Split Item_type_holder::display_lengt... Closed
is blocked by MDEV-11615 Split Item_hybrid_func::fix_attribute... Closed
is blocked by MDEV-11672 mysql_list_field() returns wrong defa... Closed
is blocked by MDEV-11692 Comparison data type aggregation for ... Closed
is blocked by MDEV-11815 SP variables of temporal data types d... Closed
is blocked by MDEV-11913 Split sp_get_item_value() into method... Closed
is blocked by MDEV-12001 Split Item_func_round::fix_length_and... Closed
is blocked by MDEV-12199 Split Item_func_{abs|neg|int_val}::fi... Closed
is blocked by MDEV-12238 Add Type_handler::Item_func_{plus|min... Closed
is blocked by MDEV-12239 Add Type_handler::Item_sum_{sum|avg|v... Closed
is blocked by MDEV-12303 Add Type_handler::Item_xxx_fix_length... Closed
is blocked by MDEV-12338 Split Item_type_holder::get_real_type... Closed
is blocked by MDEV-12426 Add Field::type_handler() Closed
is blocked by MDEV-12497 Wrong data type for LEAST(latin1_expr... Closed
is blocked by MDEV-12504 Wrong data type for LEAST(date_expr,t... Closed
is blocked by MDEV-12506 Split Item_func_min_max::fix_length_a... Closed
is blocked by MDEV-12514 Split Item_temporal_func::fix_length_... Closed
is blocked by MDEV-12546 Wrong metadata or data type for strin... Closed
is blocked by MDEV-12559 Split Item::temporal_precision() into... Closed
is blocked by MDEV-12560 Wrong data type for SELECT NULL UNION... Closed
is blocked by MDEV-12568 Add Type_handler::subquery_type_allow... Closed
is blocked by MDEV-12574 MAX(old_decimal) produces a column of... Closed
is blocked by MDEV-12582 Wrong data type for CREATE..SELECT MA... Closed
is blocked by MDEV-12588 Add Type_handler::type_handler_for_tm... Closed
is blocked by MDEV-12594 UNION between fixed length double col... Closed
is blocked by MDEV-12595 UNION converts INT to BIGINT Closed
is blocked by MDEV-12599 UNION is not symmetric when mixing IN... Closed
is blocked by MDEV-12601 Hybrid functions create a column of a... Closed
is blocked by MDEV-12607 Hybrid functions create wrong VARBINA... Closed
is blocked by MDEV-12617 CASE and CASE-alike hybrid functions ... Closed
is blocked by MDEV-12619 UNION creates excessive integer colum... Closed
is blocked by MDEV-12649 Add Type_handler::Item_save_in_value Closed
is blocked by MDEV-12655 Move Item_func::count_xxx_length() to... Closed
is blocked by MDEV-12665 Hybrid functions do not preserve geom... Closed
is blocked by MDEV-12687 Split Item::send() into virtual metho... Closed
is blocked by MDEV-12692 Split Item_func_between::fix_length_a... Closed
is blocked by MDEV-12695 Add Column_definition::type_handler() Closed
is blocked by MDEV-12707 Split resolve_const_item() into virtu... Closed
is blocked by MDEV-12710 Fix Item_cache constructors to accept... Closed
is blocked by MDEV-12713 Define virtual type_handler() for all... Closed
is blocked by MDEV-12714 Determine Item::field_type() from Ite... Closed
is blocked by MDEV-12716 Change Value_source::Context to opera... Closed
is blocked by MDEV-12717 Change Item_equal to operate Type_han... Closed
is blocked by MDEV-12718 Determine Item::cmp_type() from Item:... Closed
is blocked by MDEV-12719 Determine Item::result_type() from It... Closed
is blocked by MDEV-12721 Wrong execution plan for WHERE (date_... Closed
is blocked by MDEV-12769 Arithmetic operators with temporal ty... Closed
is blocked by MDEV-12770 Add Type_handler::decimal_precision() Closed
is blocked by MDEV-12772 Add Field::get_typelib() and Item::ge... Closed
is blocked by MDEV-12775 Reuse data type aggregation code for ... Closed
is blocked by MDEV-12777 Change Lex_field_type_st::m_type from... Closed
is blocked by MDEV-12798 Item_param does not preserve exact fi... Closed
is blocked by MDEV-12803 Improve function parameter data type ... Closed
is blocked by MDEV-12809 Bad column type created for TEXT(1431... Closed
is blocked by MDEV-12826 Add Type_handler::val_int_signed_type... Closed
is blocked by MDEV-12833 Split Column_definition::create_lengt... Closed
is blocked by MDEV-12849 Out-of-range errors when casting hex-... Closed
is blocked by MDEV-12853 Out-of-range errors when CAST('-1' AS... Closed
is blocked by MDEV-12854 Synchronize CREATE..SELECT data type ... Closed
is blocked by MDEV-12856 Wrong result set metadata for DIV Closed
is blocked by MDEV-12857 Out-of-range errors on CREATE..SELECT... Closed
is blocked by MDEV-12858 Out-of-range error for CREATE..SELECT... Closed
is blocked by MDEV-12859 Out-of-range error for CREATE..SELECT... Closed
is blocked by MDEV-12860 Out-of-range error on CREATE..SELECT ... Closed
is blocked by MDEV-12861 FIRST_VALUE() does not preserve the e... Closed
is blocked by MDEV-12862 Data type of @a:=1e0 depends on the s... Closed
is blocked by MDEV-12866 Out-of-range error with CREATE..SELEC... Closed
is blocked by MDEV-12876 Wrong data type for CREATE..SELECT sp... Closed
is blocked by MDEV-12916 Wrong column data type for an INT fie... Closed
is blocked by MDEV-12917 Wrong data type for CREATE..SELECT ye... Closed
is blocked by MDEV-12932 Remove enum Cast_target and use Type_... Closed
is blocked by MDEV-13526 Add Type_handler::Item_val_bool() Closed
is blocked by MDEV-13964 Parameter data type control for Item_... Closed
is blocked by MDEV-13965 Parameter data type control for Item_... Closed
is blocked by MDEV-13966 Parameter data type control for Item_... Closed
is blocked by MDEV-13967 Parameter data type control for Item_... Closed
is blocked by MDEV-13995 MAX(timestamp) returns a wrong result... Closed
is blocked by MDEV-13997 Change Item_bool_rowready_func2 to ca... Closed
is blocked by MDEV-14454 Binary protocol returns wrong collati... Closed
is blocked by MDEV-14467 Item_param: replace {INT|DECIMAL|REAL... Closed
is blocked by MDEV-14494 Move set_param_xxx() in sql_prepare.c... Closed
is blocked by MDEV-14630 Replace {STRING|INT|REAL|DECIMAL|DATE... Closed
is blocked by MDEV-15205 Remove mysql_type_to_time_type() Closed
is blocked by MDEV-15293 CAST(AS TIME) returns bad results for... Closed
is blocked by MDEV-15340 Wrong result HOUR(case_expression_wit... Closed
is blocked by MDEV-15363 Wrong result for CAST(LAST_DAY(TIME'0... Closed
is blocked by MDEV-15406 NO_ZERO_IN_DATE erroneously affects h... Closed
is blocked by MDEV-15597 Add class Load_data_outvar and avoid ... Closed
is blocked by MDEV-15689 Fix Item_func_set_collation to pass t... Closed
is blocked by MDEV-15702 Remove the use of STRING_ITEM from It... Closed
is blocked by MDEV-15714 Remove the use of STRING_ITEM from th... Closed
is blocked by MDEV-15758 Split Item_bool_func::get_mm_leaf() i... Closed
is blocked by MDEV-15834 The code in TABLE_SHARE::init_from_bi... Closed
is blocked by MDEV-15926 MEDIUMINT returns wrong I_S attributes Closed
is blocked by MDEV-15946 MEDIUMINT(N<8) creates a wrong data t... Closed
is blocked by MDEV-15957 Unexpected "Data too long" when doing... Closed
is blocked by MDEV-15960 Wrong data type on CREATE..SELECT cha... Closed
is blocked by MDEV-15971 Split the code for CHARACTER_OCTET_LE... Closed
is blocked by MDEV-16280 Add class Bit_addr Closed
is blocked by MDEV-16309 Split ::create_tmp_field() into virtu... Closed
is blocked by MDEV-16316 Replace INT_ITEM references in the co... Closed
is blocked by MDEV-16320 Replace INT_ITEM references in sql_se... Closed
is blocked by MDEV-16351 JSON_OBJECT() treats hybrid functions... Closed
is blocked by MDEV-16379 Move Item_basic_const::used_table_map... Closed
is blocked by MDEV-16385 ROW SP variable is allowed in unexpec... Closed
is blocked by MDEV-16388 Replace member Item::fixed to virtual... Closed
is blocked by MDEV-16414 Add type_handler_xpath_nodeset and re... Closed
is blocked by MDEV-16426 Optimizer erroneously treats equal co... Closed
is blocked by MDEV-16451 Split Item_equal::add_const() into a ... Closed
is blocked by MDEV-16452 Split TIME and DATETIME handling in I... Closed
is blocked by MDEV-16454 Bad results for IN with ROW Closed
is blocked by MDEV-16806 Add Type_handler::create_literal_item() Closed
is blocked by MDEV-16814 CREATE TABLE SELECT JSON_QUOTE(multib... Closed
is blocked by MDEV-16823 Add Type_handler::Column_definition_r... Closed
is blocked by MDEV-16852 Get rid of Item_temporal_hybrid_func:... Closed
is blocked by MDEV-16861 Split Item::update_null_value() into ... Closed
is blocked by MDEV-16864 Implement class Item_func_timestamp Closed
is blocked by MDEV-16874 Implement class Item_handled_func Closed
is blocked by MDEV-16881 Remove Item::get_temporal_with_sql_mo... Closed
is blocked by MDEV-16884 Remove tests for field_type() in Item... Closed
is blocked by MDEV-16888 Add virtual Type_handler::cond_notnul... Closed
is blocked by MDEV-16926 CAST(COALESCE(year_field)) returns wr... Closed
is blocked by MDEV-16939 Move TIMESTAMP truncation code to Fie... Closed
is blocked by MDEV-17325 NULL-ability problems with LEAST() in... Closed
is blocked by MDEV-17330 Wrong result for 0 + LEAST(TIME'-10:0... Closed
is blocked by MDEV-17625 Different warnings when comparing a g... Closed
is blocked by MDEV-17905 Add class Charset Closed
is blocked by MDEV-19125 Change Send_field::type from enum_fie... Closed
is blocked by MDEV-19197 Move ASSERT_COLUMN_MARKED_FOR_XXX as ... Closed
is blocked by MDEV-19317 TEXT column accepts too long literals... Closed
is blocked by MDEV-19345 Cleanup inconsistency in setting HA_(... Closed
is blocked by MDEV-19377 Replace Virtual_column_info::field_ty... Closed
is blocked by MDEV-19550 Move specific parts of log_event.cc t... Closed
is blocked by MDEV-19566 Remove Item::name related strlen() ca... Closed
is blocked by MDEV-19593 Split create_schema_table() into virt... Closed
is blocked by MDEV-19612 Split ALTER related data type specifi... Closed
is blocked by MDEV-19686 Add method Type_handler::dyncol_type Closed
is blocked by MDEV-19710 Split the server side code in rpl_uti... Closed
is blocked by MDEV-19724 Add Field::tmp_engine_column_type() Closed
is blocked by MDEV-19727 Add Type_handler::Key_part_spec_init_ft Closed
is blocked by MDEV-19772 Add helper classes for ST_FIELD_INFO Closed
is blocked by MDEV-19810 Reuse new I_S table definition helper... Closed
is blocked by MDEV-19818 Reuse new I_S table definition helper... Closed
is blocked by MDEV-19843 Modify ST_FIELD_INFO to use Type_hand... Closed
is blocked by MDEV-19888 Add abstract class Item_json_func Closed
is blocked by MDEV-19908 Add class Type_collection Closed
is blocked by MDEV-19923 Add type handlers for geometry sub-types Closed
is blocked by MDEV-19944 Remove GIS data types from keyword li... Closed
is blocked by MDEV-19957 Move Type_handler_geometry code from ... Closed
is blocked by MDEV-19972 Move GIS code from Item_bool_func::ge... Closed
is blocked by MDEV-19991 Turn I_S tables GEOMETRY_COLUMNS and ... Closed
is blocked by MDEV-19994 Add class Function_collection Closed
is blocked by MDEV-20006 Move geometry specific code in Field_... Closed
is blocked by MDEV-20009 Add CAST(expr AS pluggable_type) Closed
is blocked by MDEV-20016 Add MariaDB_DATA_TYPE_PLUGIN Closed
is blocked by MDEV-20042 Implement EXTRA2_FIELD_DATA_TYPE_INFO... Closed
is blocked by MDEV-20052 Add a MEM_ROOT pointer argument to Ty... Closed
is blocked by MDEV-20175 Move Type_handler_row from Type_colle... Closed
is blocked by MDEV-20326 Add class DTCollation_numeric Closed
is blocked by MDEV-20332 Wrong UNSIGNED metadata flag returned... Closed
is blocked by MDEV-20342 Turn Field::flags from a member to a ... Closed
is blocked by MDEV-20351 Window function BIT_OR() OVER (..) re... Closed
is blocked by MDEV-20353 Add separate type handlers for unsign... Closed
is blocked by MDEV-20674 Reuse val_native() in ExtractValue() ... Closed
is blocked by MDEV-20696 Remove Column_definition::key_length Closed
is blocked by MDEV-20704 An index on a double column erroneous... Closed
is blocked by MDEV-20706 Store scale in Column_definition::dec... Closed
is blocked by MDEV-20708 Change make_table_field() to get TABL... Closed
is blocked by MDEV-20712 Wrong data type for CAST(@a AS BINARY... Closed
is blocked by MDEV-20716 Unify make_table_field() and make_tab... Closed
is blocked by MDEV-20721 Implement sql_type() for Field_real a... Closed
is blocked by MDEV-20734 Allow reserved keywords as user defin... Closed
is blocked by MDEV-20760 Add Type_handler::KEY_pack_flags() Closed
is blocked by MDEV-20764 Add MariaDB_FUNCTION_COLLECTION_PLUGIN Closed
is blocked by MDEV-20831 Table partitioned by LIST/RANGE COLUM... Closed
is blocked by MDEV-20837 Add MariaDB_FUNCTION_PLUGIN Closed
Duplicate
duplicates MDEV-7931 Custom types support through extensions Closed
Relates
relates to MDEV-16443 JSON can not be implemented as a alia... Closed
relates to MDEV-20016 Add MariaDB_DATA_TYPE_PLUGIN Closed
relates to MDEV-21389 Derive Item_func_month from Item_long... Closed
relates to MDEV-4405 Dynamic Columns compression Open
relates to MDEV-4631 CassandraSE: Encrypted column data type Closed
relates to MDEV-5593 Feature request native support for UU... Closed
relates to MDEV-8284 Comparison of YEAR to '1970' is not c... Open
relates to MDEV-9417 "CREATE TABLE t1 SELECT int_sp_argume... Open
relates to MDEV-9425 Hybrid functions and UNION do not pre... Open
relates to MDEV-11361 Equal condition propagation does not ... Open
relates to MDEV-11362 True condition elimination does not w... Closed
relates to MDEV-15924 Wrong field type for CAST(temporal_co... Open
relates to MDEV-19927 Non-spatial key on POINT silently cha... Open
relates to MDEV-21392 Cleanup redundant overriding in Item_... Closed
relates to MDEV-23290 Add overloading support in MariaDB_FU... Open
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

 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



 Comments   
Comment by roberto spadim [ 2013-08-17 ]

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...

Comment by Alexander Barkov [ 2019-11-20 ]

There is no a separate patch for MDEV-4912. This task consists of all other tasks marked as blockers for MDEV-4912.

Generated at Thu Feb 08 07:00:09 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.