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
eddd0215
Commit
eddd0215
authored
May 08, 2007
by
evgen@moonbone.local
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Additional fix for the bug#27759: Wrong DATE/DATETIME comparison in LEAST()/GREATEST() functions.
parent
6ec0bc24
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
0 deletions
+3
-0
mysql-test/t/type_datetime.test
mysql-test/t/type_datetime.test
+2
-0
sql/item_func.h
sql/item_func.h
+1
-0
No files found.
mysql-test/t/type_datetime.test
View file @
eddd0215
...
@@ -206,6 +206,8 @@ select greatest(cast('01-01-01' as date), '01-01-02');
...
@@ -206,6 +206,8 @@ select greatest(cast('01-01-01' as date), '01-01-02');
select
least
(
cast
(
'01-01-01'
as
date
),
'01-01-02'
)
+
0
;
select
least
(
cast
(
'01-01-01'
as
date
),
'01-01-02'
)
+
0
;
select
greatest
(
cast
(
'01-01-01'
as
date
),
'01-01-02'
)
+
0
;
select
greatest
(
cast
(
'01-01-01'
as
date
),
'01-01-02'
)
+
0
;
select
least
(
cast
(
'01-01-01'
as
datetime
),
'01-01-02'
)
+
0
;
select
least
(
cast
(
'01-01-01'
as
datetime
),
'01-01-02'
)
+
0
;
select
cast
(
least
(
cast
(
'01-01-01'
as
datetime
),
'01-01-02'
)
as
signed
);
select
cast
(
least
(
cast
(
'01-01-01'
as
datetime
),
'01-01-02'
)
as
decimal
);
--
disable_warnings
--
disable_warnings
DROP
PROCEDURE
IF
EXISTS
test27759
;
DROP
PROCEDURE
IF
EXISTS
test27759
;
--
enable_warnings
--
enable_warnings
...
...
sql/item_func.h
View file @
eddd0215
...
@@ -703,6 +703,7 @@ class Item_func_min_max :public Item_func
...
@@ -703,6 +703,7 @@ class Item_func_min_max :public Item_func
my_decimal
*
val_decimal
(
my_decimal
*
);
my_decimal
*
val_decimal
(
my_decimal
*
);
void
fix_length_and_dec
();
void
fix_length_and_dec
();
enum
Item_result
result_type
()
const
{
return
cmp_type
;
}
enum
Item_result
result_type
()
const
{
return
cmp_type
;
}
bool
result_as_longlong
()
{
return
compare_as_dates
;
};
uint
cmp_datetimes
(
ulonglong
*
value
);
uint
cmp_datetimes
(
ulonglong
*
value
);
};
};
...
...
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