mirror of
https://github.com/MariaDB/server.git
synced 2025-12-24 11:21:21 +03:00
WL#1264 "Per-thread time zone support infrastructure".
Added basic per-thread time zone functionality (based on public domain elsie-code). Now user can select current time zone (from the list of time zones described in system tables). All NOW-like functions honor this time zone, values of TIMESTAMP type are interpreted as values in this time zone, so now our TIMESTAMP type behaves similar to Oracle's TIMESTAMP WITH LOCAL TIME ZONE (or proper PostgresSQL type). WL#1266 "CONVERT_TZ() - basic time with time zone conversion function". Fixed problems described in Bug #2336 (Different number of warnings when inserting bad datetime as string or as number). This required reworking of datetime realted warning hadling (they now generated at Field object level not in conversion functions). Optimization: Now Field class descendants use table->in_use member instead of current_thd macro.
This commit is contained in:
@@ -405,6 +405,8 @@ struct system_variables
|
||||
CHARSET_INFO *collation_database;
|
||||
CHARSET_INFO *collation_connection;
|
||||
|
||||
Time_zone *time_zone;
|
||||
|
||||
/* DATE, DATETIME and TIME formats */
|
||||
DATE_TIME_FORMAT *date_format;
|
||||
DATE_TIME_FORMAT *datetime_format;
|
||||
@@ -826,6 +828,7 @@ public:
|
||||
bool last_cuted_field;
|
||||
bool no_errors, password, is_fatal_error;
|
||||
bool query_start_used,last_insert_id_used,insert_id_used,rand_used;
|
||||
bool time_zone_used;
|
||||
bool in_lock_tables,global_read_lock;
|
||||
bool query_error, bootstrap, cleanup_done;
|
||||
bool tmp_table_used;
|
||||
|
||||
Reference in New Issue
Block a user