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
be3d7091
Commit
be3d7091
authored
Jun 24, 2005
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge
mysql-test/r/view.result: SCCS merged mysql-test/t/view.test: SCCS merged
parents
0c0a5097
fd3ac382
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
4 deletions
+28
-4
mysql-test/r/view.result
mysql-test/r/view.result
+11
-0
mysql-test/t/view.test
mysql-test/t/view.test
+11
-0
sql/item_cmpfunc.cc
sql/item_cmpfunc.cc
+6
-4
No files found.
mysql-test/r/view.result
View file @
be3d7091
...
...
@@ -1831,6 +1831,17 @@ select * from v1;
t
01:00
drop view v1;
create table t1 (f1 date);
insert into t1 values ('2005-01-01'),('2005-02-02');
create view v1 as select * from t1;
select * from v1 where f1='2005.02.02';
f1
2005-02-02
select * from v1 where '2005.02.02'=f1;
f1
2005-02-02
drop view v1;
drop table t1;
CREATE VIEW v1 AS SELECT ENCRYPT("dhgdhgd");
SELECT * FROM v1;
drop view v1;
...
...
mysql-test/t/view.test
View file @
be3d7091
...
...
@@ -1674,6 +1674,17 @@ create view v1 as SELECT TIME_FORMAT(SEC_TO_TIME(3600),'%H:%i') as t;
select
*
from
v1
;
drop
view
v1
;
#
# bug #11325 Wrong date comparison in views
#
create
table
t1
(
f1
date
);
insert
into
t1
values
(
'2005-01-01'
),(
'2005-02-02'
);
create
view
v1
as
select
*
from
t1
;
select
*
from
v1
where
f1
=
'2005.02.02'
;
select
*
from
v1
where
'2005.02.02'
=
f1
;
drop
view
v1
;
drop
table
t1
;
#
# using encrypt & substring_index in view (BUG#7024)
#
...
...
sql/item_cmpfunc.cc
View file @
be3d7091
...
...
@@ -238,9 +238,10 @@ void Item_bool_func2::fix_length_and_dec()
return
;
}
if
(
args
[
0
]
->
type
()
==
FIELD_ITEM
)
Item
*
real_item
=
args
[
0
]
->
real_item
();
if
(
real_item
->
type
()
==
FIELD_ITEM
)
{
Field
*
field
=
((
Item_field
*
)
args
[
0
]
)
->
field
;
Field
*
field
=
((
Item_field
*
)
real_item
)
->
field
;
if
(
field
->
can_be_compared_as_longlong
())
{
if
(
convert_constant_item
(
thd
,
field
,
&
args
[
1
]))
...
...
@@ -251,9 +252,10 @@ void Item_bool_func2::fix_length_and_dec()
}
}
}
if
(
args
[
1
]
->
type
()
==
FIELD_ITEM
/* && !args[1]->const_item() */
)
real_item
=
args
[
1
]
->
real_item
();
if
(
real_item
->
type
()
==
FIELD_ITEM
)
{
Field
*
field
=
((
Item_field
*
)
args
[
1
]
)
->
field
;
Field
*
field
=
((
Item_field
*
)
real_item
)
->
field
;
if
(
field
->
can_be_compared_as_longlong
())
{
if
(
convert_constant_item
(
thd
,
field
,
&
args
[
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