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
e016a2f5
Commit
e016a2f5
authored
Mar 26, 2011
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lp:705210 Compiling with BUILD/compile-pentium64-debug fails
parent
c41b66c0
Changes
12
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
84 additions
and
84 deletions
+84
-84
include/my_sys.h
include/my_sys.h
+2
-2
include/my_time.h
include/my_time.h
+4
-1
mysys/mf_getdate.c
mysys/mf_getdate.c
+1
-1
mysys/my_getsystime.c
mysys/my_getsystime.c
+1
-4
sql-common/my_time.c
sql-common/my_time.c
+1
-1
sql/field.cc
sql/field.cc
+63
-63
sql/item_cmpfunc.cc
sql/item_cmpfunc.cc
+1
-1
sql/item_timefunc.cc
sql/item_timefunc.cc
+1
-1
sql/log_event.cc
sql/log_event.cc
+4
-4
sql/log_event.h
sql/log_event.h
+1
-1
sql/slave.cc
sql/slave.cc
+1
-1
sql/sql_class.h
sql/sql_class.h
+4
-4
No files found.
include/my_sys.h
View file @
e016a2f5
...
@@ -902,10 +902,10 @@ void my_diff_and_hrtime(my_timediff_t *interval, my_hrtime_t *timestamp);
...
@@ -902,10 +902,10 @@ void my_diff_and_hrtime(my_timediff_t *interval, my_hrtime_t *timestamp);
extern
ulonglong
my_getsystime
(
void
);
extern
ulonglong
my_getsystime
(
void
);
#define my_micro_time() (my_getsystime()/10)
#define my_micro_time() (my_getsystime()/10)
#define hrtime_to_time(X) ((
my_time_t)((X).val/1000000)
)
#define hrtime_to_time(X) ((
X).val/1000000
)
#define hrtime_from_time(X) ((ulonglong)((X)*1000000ULL))
#define hrtime_from_time(X) ((ulonglong)((X)*1000000ULL))
#define hrtime_to_double(X) ((X).val/1e6)
#define hrtime_to_double(X) ((X).val/1e6)
#define hrtime_sec_part(X) ((
X).val%1000000
)
#define hrtime_sec_part(X) ((
ulong)((X).val%1000000)
)
#define my_time(X) hrtime_to_time(my_hrtime())
#define my_time(X) hrtime_to_time(my_hrtime())
#define my_micro_and_hrtime(X,Y) my_diff_and_hrtime(X,Y)
#define my_micro_and_hrtime(X,Y) my_diff_and_hrtime(X,Y)
...
...
include/my_time.h
View file @
e016a2f5
...
@@ -158,9 +158,12 @@ static inline longlong sec_part_unshift(longlong second_part, int digits)
...
@@ -158,9 +158,12 @@ static inline longlong sec_part_unshift(longlong second_part, int digits)
}
}
static
inline
ulong
sec_part_truncate
(
ulong
second_part
,
int
digits
)
static
inline
ulong
sec_part_truncate
(
ulong
second_part
,
int
digits
)
{
{
return
second_part
-
second_part
%
log_10_int
[
MAX_SEC_PART_DIGITS
-
digits
];
/* the cast here should be unnecessary! */
return
second_part
-
second_part
%
(
ulong
)
log_10_int
[
MAX_SEC_PART_DIGITS
-
digits
];
}
}
#define hrtime_to_my_time(X) ((my_time_t)hrtime_to_time(X))
/*
/*
Available interval types used in any statement.
Available interval types used in any statement.
...
...
mysys/mf_getdate.c
View file @
e016a2f5
...
@@ -17,7 +17,7 @@
...
@@ -17,7 +17,7 @@
#include "mysys_priv.h"
#include "mysys_priv.h"
#include <m_string.h>
#include <m_string.h>
#include <my_time.h>
/*
/*
get date as string
get date as string
...
...
mysys/my_getsystime.c
View file @
e016a2f5
...
@@ -108,10 +108,7 @@ void my_diff_and_hrtime(my_timediff_t *interval, my_hrtime_t *timestamp)
...
@@ -108,10 +108,7 @@ void my_diff_and_hrtime(my_timediff_t *interval, my_hrtime_t *timestamp)
{
{
interval
->
val
=
my_getsystime
()
/
10
;
interval
->
val
=
my_getsystime
()
/
10
;
#if defined(__WIN__) || defined(HAVE_GETHRTIME)
#if defined(__WIN__) || defined(HAVE_GETHRTIME)
{
*
timestamp
=
my_hrtime
();
my_hrtime_t
t
=
my_hrtime
();
timestamp
->
val
=
t
.
val
;
}
#else
#else
timestamp
->
val
=
interval
->
val
;
timestamp
->
val
=
interval
->
val
;
#endif
#endif
...
...
sql-common/my_time.c
View file @
e016a2f5
...
@@ -1351,7 +1351,7 @@ longlong pack_time(MYSQL_TIME *my_time)
...
@@ -1351,7 +1351,7 @@ longlong pack_time(MYSQL_TIME *my_time)
my_time
->
second_part
)
*
(
my_time
->
neg
?
-
1
:
1
);
my_time
->
second_part
)
*
(
my_time
->
neg
?
-
1
:
1
);
}
}
#define get_one(WHERE, FACTOR) WHERE=
packed % FACTOR
; packed/= FACTOR
#define get_one(WHERE, FACTOR) WHERE=
(ulong)(packed % FACTOR)
; packed/= FACTOR
MYSQL_TIME
*
unpack_time
(
longlong
packed
,
MYSQL_TIME
*
my_time
)
MYSQL_TIME
*
unpack_time
(
longlong
packed
,
MYSQL_TIME
*
my_time
)
{
{
...
...
sql/field.cc
View file @
e016a2f5
This diff is collapsed.
Click to expand it.
sql/item_cmpfunc.cc
View file @
e016a2f5
...
@@ -873,7 +873,7 @@ get_datetime_value(THD *thd, Item ***item_arg, Item **cache_arg,
...
@@ -873,7 +873,7 @@ get_datetime_value(THD *thd, Item ***item_arg, Item **cache_arg,
longlong
res
;
longlong
res
;
if
(
t_type
==
MYSQL_TIMESTAMP_TIME
)
if
(
t_type
==
MYSQL_TIMESTAMP_TIME
)
res
=
number_to_time
(
value
,
&
buf
,
&
was_cut
);
res
=
number_to_time
(
(
double
)
value
,
&
buf
,
&
was_cut
);
else
else
res
=
number_to_datetime
(
value
,
&
buf
,
TIME_INVALID_DATES
|
TIME_FUZZY_DATE
,
res
=
number_to_datetime
(
value
,
&
buf
,
TIME_INVALID_DATES
|
TIME_FUZZY_DATE
,
&
was_cut
);
&
was_cut
);
...
...
sql/item_timefunc.cc
View file @
e016a2f5
...
@@ -1610,7 +1610,7 @@ void Item_func_sysdate_local::store_now_in_TIME(MYSQL_TIME *now_time)
...
@@ -1610,7 +1610,7 @@ void Item_func_sysdate_local::store_now_in_TIME(MYSQL_TIME *now_time)
{
{
THD
*
thd
=
current_thd
;
THD
*
thd
=
current_thd
;
my_hrtime_t
now
=
my_hrtime
();
my_hrtime_t
now
=
my_hrtime
();
thd
->
variables
.
time_zone
->
gmt_sec_to_TIME
(
now_time
,
hrtime_to_time
(
now
));
thd
->
variables
.
time_zone
->
gmt_sec_to_TIME
(
now_time
,
hrtime_to_
my_
time
(
now
));
set_sec_part
(
hrtime_sec_part
(
now
),
now_time
,
this
);
set_sec_part
(
hrtime_sec_part
(
now
),
now_time
,
this
);
thd
->
time_zone_used
=
1
;
thd
->
time_zone_used
=
1
;
}
}
...
...
sql/log_event.cc
View file @
e016a2f5
...
@@ -1719,11 +1719,11 @@ log_event_print_value(IO_CACHE *file, const uchar *ptr,
...
@@ -1719,11 +1719,11 @@ log_event_print_value(IO_CACHE *file, const uchar *ptr,
case
MYSQL_TYPE_DATETIME
:
case
MYSQL_TYPE_DATETIME
:
{
{
size_
t
d
,
t
;
uin
t
d
,
t
;
uint64
i64
=
uint8korr
(
ptr
);
/* YYYYMMDDhhmmss */
uint64
i64
=
uint8korr
(
ptr
);
/* YYYYMMDDhhmmss */
d
=
i64
/
1000000
;
d
=
(
uint
)(
i64
/
1000000
)
;
t
=
i64
%
1000000
;
t
=
(
uint
)(
i64
%
1000000
)
;
my_b_printf
(
file
,
"%04
d-%02d-%02d %02d:%02d:%02d
"
,
my_b_printf
(
file
,
"%04
u-%02u-%02u %02u:%02u:%02u
"
,
d
/
10000
,
(
d
%
10000
)
/
100
,
d
%
100
,
d
/
10000
,
(
d
%
10000
)
/
100
,
d
%
100
,
t
/
10000
,
(
t
%
10000
)
/
100
,
t
%
100
);
t
/
10000
,
(
t
%
10000
)
/
100
,
t
%
100
);
my_snprintf
(
typestr
,
typestr_length
,
"DATETIME"
);
my_snprintf
(
typestr
,
typestr_length
,
"DATETIME"
);
...
...
sql/log_event.h
View file @
e016a2f5
...
@@ -1022,7 +1022,7 @@ class Log_event
...
@@ -1022,7 +1022,7 @@ class Log_event
return
when
;
return
when
;
}
}
my_hrtime_t
hrtime
=
my_hrtime
();
my_hrtime_t
hrtime
=
my_hrtime
();
when
=
hrtime_to_time
(
hrtime
);
when
=
hrtime_to_
my_
time
(
hrtime
);
when_sec_part
=
hrtime_sec_part
(
hrtime
);
when_sec_part
=
hrtime_sec_part
(
hrtime
);
return
when
;
return
when
;
}
}
...
...
sql/slave.cc
View file @
e016a2f5
...
@@ -2154,7 +2154,7 @@ int apply_event_and_update_pos(Log_event* ev, THD* thd, Relay_log_info* rli)
...
@@ -2154,7 +2154,7 @@ int apply_event_and_update_pos(Log_event* ev, THD* thd, Relay_log_info* rli)
if
(
!
ev
->
when
)
if
(
!
ev
->
when
)
{
{
my_hrtime_t
hrtime
=
my_hrtime
();
my_hrtime_t
hrtime
=
my_hrtime
();
ev
->
when
=
hrtime_to_time
(
hrtime
);
ev
->
when
=
hrtime_to_
my_
time
(
hrtime
);
ev
->
when_sec_part
=
hrtime_sec_part
(
hrtime
);
ev
->
when_sec_part
=
hrtime_sec_part
(
hrtime
);
}
}
ev
->
thd
=
thd
;
// because up to this point, ev->thd == 0
ev
->
thd
=
thd
;
// because up to this point, ev->thd == 0
...
...
sql/sql_class.h
View file @
e016a2f5
...
@@ -2026,7 +2026,7 @@ class THD :public Statement,
...
@@ -2026,7 +2026,7 @@ class THD :public Statement,
{
{
if
(
user_time
.
val
)
if
(
user_time
.
val
)
{
{
start_time
=
hrtime_to_time
(
user_time
);
start_time
=
hrtime_to_
my_
time
(
user_time
);
start_time_sec_part
=
hrtime_sec_part
(
user_time
);
start_time_sec_part
=
hrtime_sec_part
(
user_time
);
start_utime
=
utime_after_lock
=
my_micro_time
();
start_utime
=
utime_after_lock
=
my_micro_time
();
}
}
...
@@ -2035,7 +2035,7 @@ class THD :public Statement,
...
@@ -2035,7 +2035,7 @@ class THD :public Statement,
my_hrtime_t
hrtime
;
my_hrtime_t
hrtime
;
my_timediff_t
timediff
;
my_timediff_t
timediff
;
my_micro_and_hrtime
(
&
timediff
,
&
hrtime
);
my_micro_and_hrtime
(
&
timediff
,
&
hrtime
);
start_time
=
hrtime_to_time
(
hrtime
);
start_time
=
hrtime_to_
my_
time
(
hrtime
);
start_time_sec_part
=
hrtime_sec_part
(
hrtime
);
start_time_sec_part
=
hrtime_sec_part
(
hrtime
);
utime_after_lock
=
start_utime
=
timediff
.
val
;
utime_after_lock
=
start_utime
=
timediff
.
val
;
}
}
...
@@ -2043,13 +2043,13 @@ class THD :public Statement,
...
@@ -2043,13 +2043,13 @@ class THD :public Statement,
inline
void
set_current_time
()
inline
void
set_current_time
()
{
{
my_hrtime_t
hrtime
=
my_hrtime
();
my_hrtime_t
hrtime
=
my_hrtime
();
start_time
=
hrtime_to_time
(
hrtime
);
start_time
=
hrtime_to_
my_
time
(
hrtime
);
start_time_sec_part
=
hrtime_sec_part
(
hrtime
);
start_time_sec_part
=
hrtime_sec_part
(
hrtime
);
}
}
inline
void
set_time
(
my_hrtime_t
t
)
inline
void
set_time
(
my_hrtime_t
t
)
{
{
user_time
=
t
;
user_time
=
t
;
start_time
=
hrtime_to_time
(
user_time
);
start_time
=
hrtime_to_
my_
time
(
user_time
);
start_time_sec_part
=
hrtime_sec_part
(
user_time
);
start_time_sec_part
=
hrtime_sec_part
(
user_time
);
start_utime
=
utime_after_lock
=
my_micro_time
();
start_utime
=
utime_after_lock
=
my_micro_time
();
}
}
...
...
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