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
68391ace
Commit
68391ace
authored
Oct 22, 2022
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix for x86 and other 32-bit little engian arch
(and for 64-bit big endian)
parent
45755c4e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
18 deletions
+18
-18
sql/sql_time.cc
sql/sql_time.cc
+18
-18
No files found.
sql/sql_time.cc
View file @
68391ace
...
...
@@ -68,71 +68,71 @@ int append_interval(String *str, interval_type int_type, const INTERVAL &interva
size_t
len
;
switch
(
int_type
)
{
case
INTERVAL_YEAR
:
len
=
my_snprintf
(
buf
,
sizeof
(
buf
),
"%u"
,
interval
.
year
);
len
=
my_snprintf
(
buf
,
sizeof
(
buf
),
"%
l
u"
,
interval
.
year
);
break
;
case
INTERVAL_QUARTER
:
case
INTERVAL_MONTH
:
len
=
my_snprintf
(
buf
,
sizeof
(
buf
),
"%u"
,
interval
.
month
);
len
=
my_snprintf
(
buf
,
sizeof
(
buf
),
"%
l
u"
,
interval
.
month
);
int_type
=
INTERVAL_MONTH
;
break
;
case
INTERVAL_WEEK
:
case
INTERVAL_DAY
:
len
=
my_snprintf
(
buf
,
sizeof
(
buf
),
"%u"
,
interval
.
day
);
len
=
my_snprintf
(
buf
,
sizeof
(
buf
),
"%
l
u"
,
interval
.
day
);
int_type
=
INTERVAL_DAY
;
break
;
case
INTERVAL_HOUR
:
len
=
my_snprintf
(
buf
,
sizeof
(
buf
),
"%u"
,
interval
.
hour
);
len
=
my_snprintf
(
buf
,
sizeof
(
buf
),
"%
l
u"
,
interval
.
hour
);
break
;
case
INTERVAL_MINUTE
:
len
=
my_snprintf
(
buf
,
sizeof
(
buf
),
"%u"
,
interval
.
minute
);
len
=
my_snprintf
(
buf
,
sizeof
(
buf
),
"%
ll
u"
,
interval
.
minute
);
break
;
case
INTERVAL_SECOND
:
len
=
my_snprintf
(
buf
,
sizeof
(
buf
),
"%u"
,
interval
.
second
);
len
=
my_snprintf
(
buf
,
sizeof
(
buf
),
"%
ll
u"
,
interval
.
second
);
break
;
case
INTERVAL_MICROSECOND
:
len
=
my_snprintf
(
buf
,
sizeof
(
buf
),
"%u"
,
interval
.
second_part
);
len
=
my_snprintf
(
buf
,
sizeof
(
buf
),
"%
ll
u"
,
interval
.
second_part
);
break
;
case
INTERVAL_YEAR_MONTH
:
len
=
my_snprintf
(
buf
,
sizeof
(
buf
),
"'%
u-%02
u'"
,
len
=
my_snprintf
(
buf
,
sizeof
(
buf
),
"'%
lu-%02l
u'"
,
interval
.
year
,
interval
.
month
);
break
;
case
INTERVAL_DAY_HOUR
:
len
=
my_snprintf
(
buf
,
sizeof
(
buf
),
"'%
u %
u'"
,
interval
.
day
,
interval
.
hour
);
len
=
my_snprintf
(
buf
,
sizeof
(
buf
),
"'%
lu %l
u'"
,
interval
.
day
,
interval
.
hour
);
break
;
case
INTERVAL_DAY_MINUTE
:
len
=
my_snprintf
(
buf
,
sizeof
(
buf
),
"'%
u %u:%02
u'"
,
len
=
my_snprintf
(
buf
,
sizeof
(
buf
),
"'%
lu %lu:%02ll
u'"
,
interval
.
day
,
interval
.
hour
,
interval
.
minute
);
break
;
case
INTERVAL_DAY_SECOND
:
len
=
my_snprintf
(
buf
,
sizeof
(
buf
),
"'%
u %u:%02u:%02
u'"
,
len
=
my_snprintf
(
buf
,
sizeof
(
buf
),
"'%
lu %lu:%02llu:%02ll
u'"
,
interval
.
day
,
interval
.
hour
,
interval
.
minute
,
interval
.
second
);
break
;
case
INTERVAL_HOUR_MINUTE
:
len
=
my_snprintf
(
buf
,
sizeof
(
buf
),
"'%
u:%02
u'"
,
interval
.
hour
,
interval
.
minute
);
len
=
my_snprintf
(
buf
,
sizeof
(
buf
),
"'%
lu:%02ll
u'"
,
interval
.
hour
,
interval
.
minute
);
break
;
case
INTERVAL_HOUR_SECOND
:
len
=
my_snprintf
(
buf
,
sizeof
(
buf
),
"'%
u:%02u:%02
u'"
,
len
=
my_snprintf
(
buf
,
sizeof
(
buf
),
"'%
lu:%02llu:%02ll
u'"
,
interval
.
hour
,
interval
.
minute
,
interval
.
second
);
break
;
case
INTERVAL_MINUTE_SECOND
:
len
=
my_snprintf
(
buf
,
sizeof
(
buf
),
"'%
u:%02
u'"
,
interval
.
minute
,
interval
.
second
);
len
=
my_snprintf
(
buf
,
sizeof
(
buf
),
"'%
llu:%02ll
u'"
,
interval
.
minute
,
interval
.
second
);
break
;
case
INTERVAL_DAY_MICROSECOND
:
len
=
my_snprintf
(
buf
,
sizeof
(
buf
),
"'%
u %u:%02u:%02u.%06
u'"
,
len
=
my_snprintf
(
buf
,
sizeof
(
buf
),
"'%
lu %lu:%02llu:%02llu.%06ll
u'"
,
interval
.
day
,
interval
.
hour
,
interval
.
minute
,
interval
.
second
,
interval
.
second_part
);
break
;
case
INTERVAL_HOUR_MICROSECOND
:
len
=
my_snprintf
(
buf
,
sizeof
(
buf
),
"'%
u:%02u:%02u.%06
u'"
,
len
=
my_snprintf
(
buf
,
sizeof
(
buf
),
"'%
lu:%02llu:%02llu.%06ll
u'"
,
interval
.
hour
,
interval
.
minute
,
interval
.
second
,
interval
.
second_part
);
break
;
case
INTERVAL_MINUTE_MICROSECOND
:
len
=
my_snprintf
(
buf
,
sizeof
(
buf
),
"'%
u:%02u.%06
u'"
,
len
=
my_snprintf
(
buf
,
sizeof
(
buf
),
"'%
llu:%02llu.%06ll
u'"
,
interval
.
minute
,
interval
.
second
,
interval
.
second_part
);
break
;
case
INTERVAL_SECOND_MICROSECOND
:
len
=
my_snprintf
(
buf
,
sizeof
(
buf
),
"%
u.%06
u"
,
interval
.
second
,
interval
.
second_part
);
len
=
my_snprintf
(
buf
,
sizeof
(
buf
),
"%
llu.%06ll
u"
,
interval
.
second
,
interval
.
second_part
);
break
;
default:
DBUG_ASSERT
(
0
);
...
...
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