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

Add separate type handlers for unsigned integer data types

    XMLWordPrintable

Details

    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)

      Attachments

        Issue Links

          Activity

            People

              bar Alexander Barkov
              bar Alexander Barkov
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

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