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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
bd842a96
Commit
bd842a96
authored
Dec 26, 2012
by
Chaithra Gopalareddy
Browse files
Options
Browse Files
Download
Plain Diff
Merge from 5.1 to 5.5
parents
46ece307
e7c6b36b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
18 deletions
+3
-18
sql/tztime.cc
sql/tztime.cc
+3
-18
No files found.
sql/tztime.cc
View file @
bd842a96
...
...
@@ -1844,7 +1844,7 @@ static Time_zone*
tz_load_from_open_tables
(
const
String
*
tz_name
,
TABLE_LIST
*
tz_tables
)
{
TABLE
*
table
=
0
;
TIME_ZONE_INFO
*
tz_info
;
TIME_ZONE_INFO
*
tz_info
=
NULL
;
Tz_names_entry
*
tmp_tzname
;
Time_zone
*
return_val
=
0
;
int
res
;
...
...
@@ -1852,7 +1852,8 @@ tz_load_from_open_tables(const String *tz_name, TABLE_LIST *tz_tables)
my_time_t
ttime
;
char
buff
[
MAX_FIELD_WIDTH
];
String
abbr
(
buff
,
sizeof
(
buff
),
&
my_charset_latin1
);
char
*
alloc_buff
,
*
tz_name_buff
;
char
*
alloc_buff
=
NULL
;
char
*
tz_name_buff
=
NULL
;
/*
Temporary arrays that are used for loading of data for filling
TIME_ZONE_INFO structure
...
...
@@ -1872,22 +1873,6 @@ tz_load_from_open_tables(const String *tz_name, TABLE_LIST *tz_tables)
DBUG_ENTER
(
"tz_load_from_open_tables"
);
/* Prepare tz_info for loading also let us make copy of time zone name */
if
(
!
(
alloc_buff
=
(
char
*
)
alloc_root
(
&
tz_storage
,
sizeof
(
TIME_ZONE_INFO
)
+
tz_name
->
length
()
+
1
)))
{
sql_print_error
(
"Out of memory while loading time zone description"
);
return
0
;
}
tz_info
=
(
TIME_ZONE_INFO
*
)
alloc_buff
;
bzero
(
tz_info
,
sizeof
(
TIME_ZONE_INFO
));
tz_name_buff
=
alloc_buff
+
sizeof
(
TIME_ZONE_INFO
);
/*
By writing zero to the end we guarantee that we can call ptr()
instead of c_ptr() for time zone name.
*/
strmake
(
tz_name_buff
,
tz_name
->
ptr
(),
tz_name
->
length
());
/*
Let us find out time zone id by its name (there is only one index
and it is specifically for this purpose).
...
...
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