Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
e0732913
Commit
e0732913
authored
Jun 15, 2012
by
Vladislav Vaintroub
Browse files
Options
Browse Files
Download
Plain Diff
merge
parents
c73df610
d319ae01
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
8 deletions
+17
-8
sql/mysqld.cc
sql/mysqld.cc
+16
-7
sql/sys_vars.cc
sql/sys_vars.cc
+1
-1
No files found.
sql/mysqld.cc
View file @
e0732913
...
...
@@ -3418,14 +3418,23 @@ static int init_common_variables()
return
1
;
#ifdef HAVE_TZNAME
{
struct
tm
tm_tmp
;
localtime_r
(
&
server_start_time
,
&
tm_tmp
);
strmake
(
system_time_zone
,
tzname
[
tm_tmp
.
tm_isdst
!=
0
?
1
:
0
],
sizeof
(
system_time_zone
)
-
1
);
const
char
*
tz_name
=
tzname
[
tm_tmp
.
tm_isdst
!=
0
?
1
:
0
];
#ifdef _WIN32
/*
Time zone name may be localized and contain non-ASCII characters,
Convert from ANSI encoding to UTF8.
*/
wchar_t
wtz_name
[
sizeof
(
system_time_zone
)];
mbstowcs
(
wtz_name
,
tz_name
,
sizeof
(
system_time_zone
)
-
1
);
WideCharToMultiByte
(
CP_UTF8
,
0
,
wtz_name
,
-
1
,
system_time_zone
,
sizeof
(
system_time_zone
)
-
1
,
NULL
,
NULL
);
#else
strmake
(
system_time_zone
,
tz_name
,
sizeof
(
system_time_zone
)
-
1
);
#endif
/* _WIN32 */
#endif
/* HAVE_TZNAME */
}
#endif
/*
We set SYSTEM time zone as reasonable default and
also for failure of my_tz_init() and bootstrap mode.
...
...
sql/sys_vars.cc
View file @
e0732913
...
...
@@ -2246,7 +2246,7 @@ static char *system_time_zone_ptr;
static
Sys_var_charptr
Sys_system_time_zone
(
"system_time_zone"
,
"The server system time zone"
,
READ_ONLY
GLOBAL_VAR
(
system_time_zone_ptr
),
NO_CMD_LINE
,
IN_
FS
_CHARSET
,
DEFAULT
(
system_time_zone
));
IN_
SYSTEM
_CHARSET
,
DEFAULT
(
system_time_zone
));
static
Sys_var_ulong
Sys_table_def_size
(
"table_definition_cache"
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment