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
2cf753a1
Commit
2cf753a1
authored
Apr 29, 2007
by
igor@olga.mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Post-merge fix.
parent
f9ac5b43
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 @
2cf753a1
...
@@ -667,6 +667,7 @@ x 2 90
...
@@ -667,6 +667,7 @@ x 2 90
x 3 30
x 3 30
x NULL 150
x NULL 150
NULL NULL 150
NULL NULL 150
DROP TABLE t1;
CREATE TABLE t1(id int, type char(1));
CREATE TABLE t1(id int, type char(1));
INSERT INTO t1 VALUES
INSERT INTO t1 VALUES
(1,"A"),(2,"C"),(3,"A"),(4,"A"),(5,"B"),
(1,"A"),(2,"C"),(3,"A"),(4,"A"),(5,"B"),
...
...
sql/item_func.h
View file @
2cf753a1
...
@@ -728,10 +728,14 @@ class Item_func_rollup_const :public Item_func
...
@@ -728,10 +728,14 @@ class Item_func_rollup_const :public Item_func
{
{
public:
public:
Item_func_rollup_const
(
Item
*
a
)
:
Item_func
(
a
)
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
();
}
longlong
val_int
()
{
return
args
[
0
]
->
val_int
();
}
String
*
val_str
(
String
*
str
)
{
return
args
[
0
]
->
val_str
(
str
);
}
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"
;
}
const
char
*
func_name
()
const
{
return
"rollup_const"
;
}
bool
const_item
()
const
{
return
0
;
}
bool
const_item
()
const
{
return
0
;
}
Item_result
result_type
()
const
{
return
args
[
0
]
->
result_type
();
}
Item_result
result_type
()
const
{
return
args
[
0
]
->
result_type
();
}
...
...
sql/sql_select.cc
View file @
2cf753a1
...
@@ -14571,7 +14571,7 @@ bool JOIN::rollup_init()
...
@@ -14571,7 +14571,7 @@ bool JOIN::rollup_init()
Item
*
new_item
=
new
Item_func_rollup_const
(
item
);
Item
*
new_item
=
new
Item_func_rollup_const
(
item
);
if
(
!
new_item
)
if
(
!
new_item
)
return
1
;
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
);
thd
->
change_item_tree
(
it
.
ref
(),
new_item
);
for
(
ORDER
*
tmp
=
group_tmp
;
tmp
;
tmp
=
tmp
->
next
)
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