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
efa8e330
Commit
efa8e330
authored
Sep 01, 2006
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge spetrunia@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into mysql.com:/home/psergey/mysql-5.0-bug21477-look-64bit
parents
a1d03bd6
dd6dc7ad
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
6 deletions
+16
-6
sql/item_sum.cc
sql/item_sum.cc
+3
-1
sql/sql_lex.cc
sql/sql_lex.cc
+4
-4
sql/sql_lex.h
sql/sql_lex.h
+7
-1
sql/sql_yacc.yy
sql/sql_yacc.yy
+2
-0
No files found.
sql/item_sum.cc
View file @
efa8e330
...
...
@@ -290,7 +290,9 @@ Item_sum::Item_sum(THD *thd, Item_sum *item):
void
Item_sum
::
mark_as_sum_func
()
{
current_thd
->
lex
->
current_select
->
with_sum_func
=
1
;
SELECT_LEX
*
cur_select
=
current_thd
->
lex
->
current_select
;
cur_select
->
n_sum_items
++
;
cur_select
->
with_sum_func
=
1
;
with_sum_func
=
1
;
}
...
...
sql/sql_lex.cc
View file @
efa8e330
...
...
@@ -1521,10 +1521,10 @@ bool st_select_lex::setup_ref_array(THD *thd, uint order_group_num)
*/
Query_arena
*
arena
=
thd
->
stmt_arena
;
return
(
ref_pointer_array
=
(
Item
**
)
arena
->
alloc
(
sizeof
(
Item
*
)
*
(
item_list
.
elements
+
(
Item
**
)
arena
->
alloc
(
sizeof
(
Item
*
)
*
(
n_child_sum_items
+
item_list
.
elements
+
select_n_having_items
+
order_group_num
)
*
5
))
==
0
;
order_group_num
)
*
5
))
==
0
;
}
...
...
sql/sql_lex.h
View file @
efa8e330
...
...
@@ -548,6 +548,12 @@ public:
bool
braces
;
/* SELECT ... UNION (SELECT ... ) <- this braces */
/* TRUE when having fix field called in processing of this SELECT */
bool
having_fix_field
;
/* Number of Item_sum-derived objects in this SELECT */
uint
n_sum_items
;
/* Number of Item_sum-derived objects in children and descendant SELECTs */
uint
n_child_sum_items
;
/* explicit LIMIT clause was used */
bool
explicit_limit
;
/*
...
...
@@ -640,7 +646,7 @@ public:
bool
test_limit
();
friend
void
lex_start
(
THD
*
thd
,
uchar
*
buf
,
uint
length
);
st_select_lex
()
{}
st_select_lex
()
:
n_sum_items
(
0
),
n_child_sum_items
(
0
)
{}
void
make_empty_select
()
{
init_query
();
...
...
sql/sql_yacc.yy
View file @
efa8e330
...
...
@@ -8927,8 +8927,10 @@ subselect_end:
{
LEX *lex=Lex;
lex->pop_context();
SELECT_LEX *child= lex->current_select;
lex->current_select = lex->current_select->return_after_parsing();
lex->nest_level--;
lex->current_select->n_child_sum_items += child->n_sum_items;
};
/**************************************************************************
...
...
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