mirror of
https://github.com/MariaDB/server.git
synced 2025-08-07 00:04:31 +03:00
Adding the timezone plugin service, to convert between
MYSQL_TIME and my_time_t and back. Using the new service instead of direct access to thd. added: include/mysql/service_thd_timezone.h libservices/thd_timezone_service.c modified: include/my_time.h include/mysql.h.pp include/mysql/plugin.h include/mysql/plugin_audit.h.pp include/mysql/plugin_auth.h.pp include/mysql/plugin_ftparser.h.pp include/mysql/services.h include/mysql_time.h include/service_versions.h libservices/CMakeLists.txt sql/sql_class.cc sql/sql_plugin_services.h storage/connect/value.cpp
This commit is contained in:
@@ -85,6 +85,28 @@ extern struct kill_statement_service_st {
|
||||
enum thd_kill_levels (*thd_kill_level_func)(const void*);
|
||||
} *thd_kill_statement_service;
|
||||
enum thd_kill_levels thd_kill_level(const void*);
|
||||
#include <mysql/service_thd_timezone.h>
|
||||
typedef char my_bool;
|
||||
#include "mysql_time.h"
|
||||
typedef long my_time_t;
|
||||
enum enum_mysql_timestamp_type
|
||||
{
|
||||
MYSQL_TIMESTAMP_NONE= -2, MYSQL_TIMESTAMP_ERROR= -1,
|
||||
MYSQL_TIMESTAMP_DATE= 0, MYSQL_TIMESTAMP_DATETIME= 1, MYSQL_TIMESTAMP_TIME= 2
|
||||
};
|
||||
typedef struct st_mysql_time
|
||||
{
|
||||
unsigned int year, month, day, hour, minute, second;
|
||||
unsigned long second_part;
|
||||
my_bool neg;
|
||||
enum enum_mysql_timestamp_type time_type;
|
||||
} MYSQL_TIME;
|
||||
extern struct thd_timezone_service_st {
|
||||
my_time_t (*thd_TIME_to_gmt_sec)(void* thd, const MYSQL_TIME *ltime, unsigned int *errcode);
|
||||
void (*thd_gmt_sec_to_TIME)(void* thd, MYSQL_TIME *ltime, my_time_t t);
|
||||
} *thd_timezone_service;
|
||||
my_time_t thd_TIME_to_gmt_sec(void* thd, const MYSQL_TIME *ltime, uint *errcode);
|
||||
void thd_gmt_sec_to_TIME(void* thd, MYSQL_TIME *ltime, my_time_t t);
|
||||
struct st_mysql_xid {
|
||||
long formatID;
|
||||
long gtrid_length;
|
||||
|
Reference in New Issue
Block a user