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
b77f95e8
Commit
b77f95e8
authored
Apr 29, 2007
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Post-merge fix.
parent
6d899411
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
3 deletions
+8
-3
mysql-test/r/olap.result
mysql-test/r/olap.result
+1
-0
sql/item_func.h
sql/item_func.h
+6
-2
sql/sql_select.cc
sql/sql_select.cc
+1
-1
No files found.
mysql-test/r/olap.result
View file @
b77f95e8
...
...
@@ -667,6 +667,7 @@ x 2 90
x 3 30
x NULL 150
NULL NULL 150
DROP TABLE t1;
CREATE TABLE t1(id int, type char(1));
INSERT INTO t1 VALUES
(1,"A"),(2,"C"),(3,"A"),(4,"A"),(5,"B"),
...
...
sql/item_func.h
View file @
b77f95e8
...
...
@@ -728,10 +728,14 @@ class Item_func_rollup_const :public Item_func
{
public:
Item_func_rollup_const
(
Item
*
a
)
:
Item_func
(
a
)
{
name
=
a
->
name
;
}
double
val
()
{
return
args
[
0
]
->
val
();
}
{
name
=
a
->
name
;
name_length
=
a
->
name_length
;
}
double
val_real
()
{
return
args
[
0
]
->
val_real
();
}
longlong
val_int
()
{
return
args
[
0
]
->
val_int
();
}
String
*
val_str
(
String
*
str
)
{
return
args
[
0
]
->
val_str
(
str
);
}
my_decimal
*
val_decimal
(
my_decimal
*
dec
)
{
return
args
[
0
]
->
val_decimal
(
dec
);
}
const
char
*
func_name
()
const
{
return
"rollup_const"
;
}
bool
const_item
()
const
{
return
0
;
}
Item_result
result_type
()
const
{
return
args
[
0
]
->
result_type
();
}
...
...
sql/sql_select.cc
View file @
b77f95e8
...
...
@@ -14571,7 +14571,7 @@ bool JOIN::rollup_init()
Item
*
new_item
=
new
Item_func_rollup_const
(
item
);
if
(
!
new_item
)
return
1
;
new_item
->
fix_fields
(
thd
,
0
,
(
Item
**
)
0
);
new_item
->
fix_fields
(
thd
,
(
Item
**
)
0
);
thd
->
change_item_tree
(
it
.
ref
(),
new_item
);
for
(
ORDER
*
tmp
=
group_tmp
;
tmp
;
tmp
=
tmp
->
next
)
{
...
...
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