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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
8b01230e
Commit
8b01230e
authored
Aug 26, 2004
by
bell@sanja.is.com.ua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix of Item_ref with result_field (BUG#5104)
parent
a5f063e0
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
39 additions
and
1 deletion
+39
-1
mysql-test/r/view.result
mysql-test/r/view.result
+18
-0
mysql-test/t/view.test
mysql-test/t/view.test
+12
-0
sql/item.cc
sql/item.cc
+8
-0
sql/item.h
sql/item.h
+1
-1
No files found.
mysql-test/r/view.result
View file @
8b01230e
...
...
@@ -1116,3 +1116,21 @@ c1 c2
7 almost real Beer
drop view v1;
drop table t1;
create table t1 (a int);
insert into t1 values (1),(1),(2),(2),(3),(3);
create view v1 as select a from t1;
select distinct a from v1;
a
1
2
3
select distinct a from v1 limit 2;
a
1
2
select distinct a from t1 limit 2;
a
1
2
drop view v1;
drop table t1;
mysql-test/t/view.test
View file @
8b01230e
...
...
@@ -1066,3 +1066,15 @@ CREATE VIEW v1 AS SELECT * from t1 WHERE match (c2) against ('Beer');
select
*
from
v1
;
drop
view
v1
;
drop
table
t1
;
#
# distinct in temporary table with a VIEW
#
create
table
t1
(
a
int
);
insert
into
t1
values
(
1
),(
1
),(
2
),(
2
),(
3
),(
3
);
create
view
v1
as
select
a
from
t1
;
select
distinct
a
from
v1
;
select
distinct
a
from
v1
limit
2
;
select
distinct
a
from
t1
limit
2
;
drop
view
v1
;
drop
table
t1
;
sql/item.cc
View file @
8b01230e
...
...
@@ -2156,6 +2156,14 @@ void Item_ref::print(String *str)
}
bool
Item_ref
::
send
(
Protocol
*
prot
,
String
*
tmp
)
{
if
(
result_field
)
return
prot
->
store
(
result_field
);
return
(
*
ref
)
->
send
(
prot
,
tmp
);
}
void
Item_ref_null_helper
::
print
(
String
*
str
)
{
str
->
append
(
"<ref_null_helper>("
,
18
);
...
...
sql/item.h
View file @
8b01230e
...
...
@@ -964,7 +964,7 @@ public:
{
return
(
null_value
=
(
*
ref
)
->
get_date_result
(
ltime
,
fuzzydate
));
}
bool
send
(
Protocol
*
prot
,
String
*
tmp
)
{
return
(
*
ref
)
->
send
(
prot
,
tmp
);
}
bool
send
(
Protocol
*
prot
,
String
*
tmp
)
;
void
make_field
(
Send_field
*
field
)
{
(
*
ref
)
->
make_field
(
field
);
}
bool
fix_fields
(
THD
*
,
struct
st_table_list
*
,
Item
**
);
int
save_in_field
(
Field
*
field
,
bool
no_conversions
)
...
...
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