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
83504b0d
Commit
83504b0d
authored
May 15, 2007
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge olga.mysql.com:/home/igor/mysql-5.0-opt
into olga.mysql.com:/home/igor/dev-opt/mysql-5.0-opt-bug28272
parents
d9f910ee
d68be9ba
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
3 deletions
+17
-3
mysql-test/r/type_datetime.result
mysql-test/r/type_datetime.result
+6
-0
mysql-test/t/type_datetime.test
mysql-test/t/type_datetime.test
+9
-0
sql/item_cmpfunc.cc
sql/item_cmpfunc.cc
+2
-3
No files found.
mysql-test/r/type_datetime.result
View file @
83504b0d
...
...
@@ -346,3 +346,9 @@ call test27759();
a b a_then_b b_then_a c_then_a
2007-04-10 2007-04-11 2007-04-10 2007-04-10 2004-04-09 00:00:00
drop procedure test27759;
create table t1 (f1 date);
insert into t1 values (curdate());
select left(f1,10) = curdate() from t1;
left(f1,10) = curdate()
1
drop table t1;
mysql-test/t/type_datetime.test
View file @
83504b0d
...
...
@@ -225,3 +225,12 @@ END;|
DELIMITER
;
|
call
test27759
();
drop
procedure
test27759
;
#
# Bug#28208: Wrong result of a non-const STRING function with a const
# DATETIME function.
#
create
table
t1
(
f1
date
);
insert
into
t1
values
(
curdate
());
select
left
(
f1
,
10
)
=
curdate
()
from
t1
;
drop
table
t1
;
sql/item_cmpfunc.cc
View file @
83504b0d
...
...
@@ -661,7 +661,7 @@ int Arg_comparator::set_cmp_func(Item_bool_func2 *owner_arg,
Item_result
type
)
{
enum
enum_date_cmp_type
cmp_type
;
ulonglong
const_value
;
ulonglong
const_value
=
(
ulonglong
)
-
1
;
a
=
a1
;
b
=
a2
;
...
...
@@ -674,8 +674,7 @@ int Arg_comparator::set_cmp_func(Item_bool_func2 *owner_arg,
a_cache
=
0
;
b_cache
=
0
;
if
(
cmp_type
!=
CMP_DATE_WITH_DATE
&&
((
*
b
)
->
const_item
()
||
(
*
a
)
->
const_item
()))
if
(
const_value
!=
(
ulonglong
)
-
1
)
{
Item_cache_int
*
cache
=
new
Item_cache_int
();
/* Mark the cache as non-const to prevent re-caching. */
...
...
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