[MDEV-15205] Remove mysql_type_to_time_type() Created: 2018-02-04  Updated: 2018-02-04  Resolved: 2018-02-04

Status: Closed
Project: MariaDB Server
Component/s: Data types, Temporal Types
Affects Version/s: None
Fix Version/s: 10.3.5

Type: Bug 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
blocks MDEV-8894 Inserting fractional seconds into My... Closed

 Description   

We have a function:

static inline enum enum_mysql_timestamp_type
mysql_type_to_time_type(enum enum_field_types mysql_type)
{
  switch(mysql_type) {
  case MYSQL_TYPE_TIME2:
  case MYSQL_TYPE_TIME: return MYSQL_TIMESTAMP_TIME;
  case MYSQL_TYPE_TIMESTAMP2:
  case MYSQL_TYPE_TIMESTAMP:
  case MYSQL_TYPE_DATETIME2:
  case MYSQL_TYPE_DATETIME: return MYSQL_TIMESTAMP_DATETIME;
  case MYSQL_TYPE_NEWDATE:
  case MYSQL_TYPE_DATE: return MYSQL_TIMESTAMP_DATE;
  default: return MYSQL_TIMESTAMP_ERROR;
  }
}

This is not friendly to pluggable data types.
We'll remove this function and will use
Type_handler::mysql_timestamp_type() instead.



 Comments   
Comment by Alexander Barkov [ 2018-02-04 ]

Pushed to bb-10.2-ext

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