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
41487d0b
Commit
41487d0b
authored
Mar 16, 2005
by
gluh@gluh.mysql.r18.ru
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix for bug#8656: Crash with group_concat on alias in outer table
fixed result_field support of Item_ref
parent
4c3e8b07
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
0 deletions
+16
-0
mysql-test/r/func_gconcat.result
mysql-test/r/func_gconcat.result
+7
-0
mysql-test/t/func_gconcat.test
mysql-test/t/func_gconcat.test
+8
-0
sql/item.h
sql/item.h
+1
-0
No files found.
mysql-test/r/func_gconcat.result
View file @
41487d0b
...
...
@@ -462,3 +462,10 @@ SELECT GROUP_CONCAT(id) AS gc FROM t1 HAVING gc IS NULL;
gc
NULL
DROP TABLE t1;
create table r2 (a int, b int);
insert into r2 values (1,1), (2,2);
select b x, (select group_concat(x) from r2) from r2;
x (select group_concat(x) from r2)
1 1,1
2 2,2
drop table r2;
mysql-test/t/func_gconcat.test
View file @
41487d0b
...
...
@@ -284,3 +284,11 @@ drop table t1;
CREATE
TABLE
t1
(
id
int
);
SELECT
GROUP_CONCAT
(
id
)
AS
gc
FROM
t1
HAVING
gc
IS
NULL
;
DROP
TABLE
t1
;
#
# Bug #8656: Crash with group_concat on alias in outer table
#
create
table
r2
(
a
int
,
b
int
);
insert
into
r2
values
(
1
,
1
),
(
2
,
2
);
select
b
x
,
(
select
group_concat
(
x
)
from
r2
)
from
r2
;
drop
table
r2
;
sql/item.h
View file @
41487d0b
...
...
@@ -902,6 +902,7 @@ class Item_ref :public Item_ident
void
save_org_in_field
(
Field
*
field
)
{
(
*
ref
)
->
save_org_in_field
(
field
);
}
enum
Item_result
result_type
()
const
{
return
(
*
ref
)
->
result_type
();
}
enum_field_types
field_type
()
const
{
return
(
*
ref
)
->
field_type
();
}
Field
*
get_tmp_table_field
()
{
return
result_field
;
}
table_map
used_tables
()
const
{
return
depended_from
?
OUTER_REF_TABLE_BIT
:
(
*
ref
)
->
used_tables
();
...
...
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