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
e8db4b63
Commit
e8db4b63
authored
Aug 23, 2004
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
better for for bug#4767
parent
412d0551
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
12 deletions
+14
-12
sql/item_sum.cc
sql/item_sum.cc
+0
-3
sql/sql_select.cc
sql/sql_select.cc
+14
-9
No files found.
sql/item_sum.cc
View file @
e8db4b63
...
@@ -159,10 +159,7 @@ Item *Item_sum::get_tmp_table_item(THD *thd)
...
@@ -159,10 +159,7 @@ Item *Item_sum::get_tmp_table_item(THD *thd)
if
(
!
arg
->
const_item
())
if
(
!
arg
->
const_item
())
{
{
if
(
arg
->
type
()
==
Item
::
FIELD_ITEM
)
if
(
arg
->
type
()
==
Item
::
FIELD_ITEM
)
{
arg
->
maybe_null
=
result_field_tmp
->
maybe_null
();
((
Item_field
*
)
arg
)
->
field
=
result_field_tmp
++
;
((
Item_field
*
)
arg
)
->
field
=
result_field_tmp
++
;
}
else
else
sum_item
->
args
[
i
]
=
new
Item_field
(
result_field_tmp
++
);
sum_item
->
args
[
i
]
=
new
Item_field
(
result_field_tmp
++
);
}
}
...
...
sql/sql_select.cc
View file @
e8db4b63
...
@@ -5003,16 +5003,21 @@ create_tmp_table(THD *thd,TMP_TABLE_PARAM *param,List<Item> &fields,
...
@@ -5003,16 +5003,21 @@ create_tmp_table(THD *thd,TMP_TABLE_PARAM *param,List<Item> &fields,
tmp_from_field
++
;
tmp_from_field
++
;
*
(
reg_field
++
)
=
new_field
;
*
(
reg_field
++
)
=
new_field
;
reclength
+=
new_field
->
pack_length
();
reclength
+=
new_field
->
pack_length
();
if
(
!
(
new_field
->
flags
&
NOT_NULL_FLAG
))
null_count
++
;
if
(
new_field
->
flags
&
BLOB_FLAG
)
if
(
new_field
->
flags
&
BLOB_FLAG
)
{
{
*
blob_field
++=
new_field
;
*
blob_field
++=
new_field
;
blob_count
++
;
blob_count
++
;
}
}
((
Item_sum
*
)
item
)
->
args
[
i
]
=
new
Item_field
(
new_field
);
((
Item_sum
*
)
item
)
->
args
[
i
]
=
new
Item_field
(
new_field
);
if
(((
Item_sum
*
)
item
)
->
arg_count
==
1
)
if
(
!
(
new_field
->
flags
&
NOT_NULL_FLAG
))
((
Item_sum
*
)
item
)
->
result_field
=
new_field
;
{
null_count
++
;
/*
new_field->maybe_null() is still false, it will be
changed below. But we have to setup Item_field correctly
*/
((
Item_sum
*
)
item
)
->
args
[
i
]
->
maybe_null
=
1
;
}
}
}
}
}
}
}
...
...
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