[MDEV-20353] Add separate type handlers for unsigned integer data types Created: 2019-08-15  Updated: 2019-08-15  Resolved: 2019-08-15

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

Type: Task Priority: Major
Reporter: Alexander Barkov Assignee: Alexander Barkov
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Blocks
blocks MDEV-4912 Data type plugin API version 1 Closed

 Description   

Let's split numeric type handlers into separate signed and unsigned variants. This is needed:

  • for better error messages, e.g. bigint unsigned vs just bigint in this example:

    MariaDB [test]> select @@max_allowed_packet+ROW(1,1);
    ERROR 4078 (HY000): Illegal parameter data types bigint unsigned and row for operation '+'
    

  • for function collection plugins, to define function prototypes easier.
  • for data type conversion plugins, a signed and unsigned int types have a different internal representation

Let's add new classes handling unsigned data types (deriving from their signed counterparts):

  • Type_handler_utiny
  • Type_handler_ushort
  • Type_handler_uint24
  • Type_handler_ulong
  • Type_handler_ulonglong

Add new global variables:

  • type_handler_utiny
  • type_handler_ushort
  • type_handler_uint24
  • type_handler_ulong
  • type_handler_ulonglong

Rename the old variables to:

  • type_handler_stiny
  • type_handler_sshort
  • type_handler_sint24
  • type_handler_slong
  • type_handler_slonglong
    (i.e. add the 's' prefix on the type name)

Generated at Thu Feb 08 08:58:49 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.