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
0aab3a9e
Commit
0aab3a9e
authored
Mar 11, 2004
by
ram@gw.mysql.r18.ru
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
a fix (bug #2885: like datetime)
parent
082a01d1
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
0 deletions
+21
-0
mysql-test/r/func_like.result
mysql-test/r/func_like.result
+6
-0
mysql-test/t/func_like.test
mysql-test/t/func_like.test
+8
-0
sql/item_cmpfunc.cc
sql/item_cmpfunc.cc
+7
-0
No files found.
mysql-test/r/func_like.result
View file @
0aab3a9e
...
...
@@ -46,6 +46,12 @@ select * from t1 where a like 'a\\%' escape '#' and a like 'a\\\\b';
a
a\b
drop table t1;
create table t1 (a datetime);
insert into t1 values ('2004-03-11 12:00:21');
select * from t1 where a like '2004-03-11 12:00:21';
a
2004-03-11 12:00:21
drop table t1;
SET NAMES koi8r;
CREATE TABLE t1 (a VARCHAR(10) CHARACTER SET koi8r);
INSERT INTO t1 VALUES (''),(''),(''),(''),(''),('');
...
...
mysql-test/t/func_like.test
View file @
0aab3a9e
...
...
@@ -35,6 +35,14 @@ select * from t1 where a like 'a\\%' escape '#';
select
*
from
t1
where
a
like
'a\\%'
escape
'#'
and
a
like
'a\\\\b'
;
drop
table
t1
;
#
# Bug #2885: like and datetime
#
create
table
t1
(
a
datetime
);
insert
into
t1
values
(
'2004-03-11 12:00:21'
);
select
*
from
t1
where
a
like
'2004-03-11 12:00:21'
;
drop
table
t1
;
#
# Test like with non-default character set
...
...
sql/item_cmpfunc.cc
View file @
0aab3a9e
...
...
@@ -225,6 +225,13 @@ void Item_bool_func2::fix_length_and_dec()
}
// Make a special case of compare with fields to get nicer DATE comparisons
if
(
functype
()
==
LIKE_FUNC
)
// Disable conversion in case of LIKE function.
{
set_cmp_func
();
return
;
}
if
(
args
[
0
]
->
type
()
==
FIELD_ITEM
)
{
Field
*
field
=
((
Item_field
*
)
args
[
0
])
->
field
;
...
...
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