[MDEV-16408] Remove tests for Item::type() in Item_basic_value::eq() Created: 2018-06-05  Updated: 2018-06-05  Resolved: 2018-06-05

Status: Closed
Project: MariaDB Server
Component/s: Data types, Prepared Statements
Fix Version/s: 10.4.0

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

Issue Links:
Blocks
blocks MDEV-14630 Replace {STRING|INT|REAL|DECIMAL|DATE... Closed

 Description   

This is a subtask for MDEV-14630, which can be done in a self-contained change.

Item_basic_value has a number of methods:

  • is_basic_value(), which tests type() internally.
  • null_eq()
  • int_eq()
  • str_eq()
  • real_eq()

It's descendants:

  • Item_param
  • Item_null
  • Item_int
  • Item_double
  • Item_float
  • Item_string
    use the mentioned methods in eq().

Additionally, Item_param tests cmp_type(), which is bad for pluggable data types (because constants of different pluggable data types will be able to have the same cmp_type(), but they are not equal to each other).

This task is to change the code to be based on Type_handler methods instead of Item::type() and Item::cmp_type() tests.


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