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
b0c1e004
Commit
b0c1e004
authored
Jun 07, 2002
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
temporary preventing subselect in HAVING clause
parent
c06575e4
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
3 deletions
+16
-3
sql/item_subselect.cc
sql/item_subselect.cc
+7
-0
sql/sql_class.cc
sql/sql_class.cc
+2
-2
sql/sql_class.h
sql/sql_class.h
+2
-0
sql/sql_select.cc
sql/sql_select.cc
+5
-1
No files found.
sql/item_subselect.cc
View file @
b0c1e004
...
...
@@ -102,6 +102,13 @@ void Item_subselect::make_field (Send_field *tmp_field)
bool
Item_subselect
::
fix_fields
(
THD
*
thd
,
TABLE_LIST
*
tables
)
{
if
(
thd
->
having_fix_field
)
{
//TODO: subselects in having do not suported now
my_printf_error
(
ER_SYNTAX_ERROR
,
ER
(
ER_SYNTAX_ERROR
),
MYF
(
0
));
return
1
;
}
// Is it one field subselect?
if
(
select_lex
->
item_list
.
elements
!=
1
)
{
...
...
sql/sql_class.cc
View file @
b0c1e004
...
...
@@ -80,8 +80,8 @@ static void free_var(user_var_entry *entry)
****************************************************************************/
THD
::
THD
()
:
user_time
(
0
),
fatal_error
(
0
),
last_insert_id_used
(
0
),
insert_id_used
(
0
),
in_lock_tables
(
0
),
global_read_lock
(
0
),
bootstrap
(
0
)
insert_id_used
(
0
),
in_lock_tables
(
0
),
global_read_lock
(
0
),
bootstrap
(
0
),
having_fix_field
(
0
)
{
host
=
user
=
priv_user
=
db
=
query
=
ip
=
0
;
host_or_ip
=
"unknown ip"
;
...
...
sql/sql_class.h
View file @
b0c1e004
...
...
@@ -428,6 +428,8 @@ public:
bool
query_error
,
bootstrap
,
cleanup_done
;
bool
safe_to_cache_query
;
bool
volatile
killed
;
// TRUE when having fix field called
bool
having_fix_field
;
/*
If we do a purge of binary logs, log index info of the threads
that are currently reading it needs to be adjusted. To do that
...
...
sql/sql_select.cc
View file @
b0c1e004
...
...
@@ -229,7 +229,11 @@ JOIN::prepare(TABLE_LIST *tables_init,
{
thd
->
where
=
"having clause"
;
thd
->
allow_sum_func
=
1
;
if
(
having
->
fix_fields
(
thd
,
tables_list
)
||
thd
->
fatal_error
)
bool
having_fix_field_store
=
thd
->
having_fix_field
;
thd
->
having_fix_field
=
1
;
bool
having_fix_rc
=
having
->
fix_fields
(
thd
,
tables_list
);
thd
->
having_fix_field
=
having_fix_field_store
;
if
(
having_fix_rc
||
thd
->
fatal_error
)
DBUG_RETURN
(
-
1
);
/* purecov: inspected */
if
(
having
->
with_sum_func
)
having
->
split_sum_func
(
all_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