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
3a55c4bc
Commit
3a55c4bc
authored
Aug 11, 2004
by
wax@kishkin.ru
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
BUG#4315
BUG#4535 BUG#4686
parent
08acf5ae
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
18 deletions
+10
-18
sql/item_sum.cc
sql/item_sum.cc
+10
-18
No files found.
sql/item_sum.cc
View file @
3a55c4bc
...
...
@@ -1966,10 +1966,11 @@ Item_func_group_concat::fix_fields(THD *thd, TABLE_LIST *tables, Item **ref)
Fix fields for select list and ORDER clause
*/
for
(
uint
i
=
0
;
i
<
arg_count
;
i
++
)
for
(
i
=
0
;
i
<
arg_count
;
i
++
)
{
if
(
args
[
i
]
->
fix_fields
(
thd
,
tables
,
args
+
i
)
||
args
[
i
]
->
check_cols
(
1
))
return
1
;
if
(
i
<
arg_count_field
)
maybe_null
|=
args
[
i
]
->
maybe_null
;
}
...
...
@@ -1992,8 +1993,6 @@ bool Item_func_group_concat::setup(THD *thd)
uint
const_fields
;
byte
*
record
;
qsort_cmp2
compare_key
;
Copy_field
*
ptr
;
Copy_field
*
end
;
DBUG_ENTER
(
"Item_func_group_concat::setup"
);
if
(
select_lex
->
linkage
==
GLOBAL_OPTIONS_TYPE
)
...
...
@@ -2044,10 +2043,13 @@ bool Item_func_group_concat::setup(THD *thd)
Note that in the table, we first have the ORDER BY fields, then the
field list.
We need to set set_sum_field in true for storing value of blob in buffer
of a record instead of a pointer of one.
*/
if
(
!
(
table
=
create_tmp_table
(
thd
,
tmp_table_param
,
all_fields
,
0
,
0
,
0
,
0
,
select_lex
->
options
|
thd
->
options
,
(
char
*
)
""
)))
if
(
!
(
table
=
create_tmp_table
(
thd
,
tmp_table_param
,
all_fields
,
(
ORDER
*
)
0
,
0
,
TRUE
,
select_lex
->
options
|
thd
->
options
,
HA_POS_ERROR
,
(
char
*
)
""
)))
DBUG_RETURN
(
1
);
table
->
file
->
extra
(
HA_EXTRA_NO_ROWS
);
table
->
no_rows
=
1
;
...
...
@@ -2055,16 +2057,6 @@ bool Item_func_group_concat::setup(THD *thd)
key_length
=
table
->
reclength
;
record
=
table
->
record
[
0
];
/*
We need to store value of blob in buffer of a record instead of a pointer of
one.
*/
ptr
=
tmp_table_param
->
copy_field
;
end
=
tmp_table_param
->
copy_field_end
;
for
(;
ptr
!=
end
;
ptr
++
)
ptr
->
set
(
ptr
->
to_field
,
ptr
->
from_field
,
1
);
/* Offset to first result field in table */
field_list_offset
=
table
->
fields
-
(
list
.
elements
-
const_fields
);
...
...
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