[MDEV-12826] Add Type_handler::val_int_signed_typecast() and Type_handler::val_int_unsigned_typecast() Created: 2017-05-17  Updated: 2017-05-17  Resolved: 2017-05-17

Status: Closed
Project: MariaDB Server
Component/s: OTHER
Fix Version/s: 10.3.1

Type: Task Priority: Major
Reporter: Alexander Barkov Assignee: Alexander Barkov
Resolution: Fixed Votes: 0
Labels: datatype, refactoring

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

 Description   

The code in these methods:

longlong Item::val_int_unsigned_typecast();
longlong Item::val_int_signed_typecast();

is not friendly to pluggable data types, as it tests for cmp_type().
Pluggable data types may want to implement a different way for signed/unsigned conversion.

Under terms of this task will add new methods in Type_handler:

virtual longlong Item_val_int_signed_typecast(Item *item) const;
virtual longlong Item_val_int_unsigned_typecast(Item *item) const;

and split the mentioned code into virtual implementations for relevant Type_handler_xxx classes.



 Comments   
Comment by Alexander Barkov [ 2017-05-17 ]

Pushed to bb-10.2-ext.

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