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
0a65a224
Commit
0a65a224
authored
Dec 07, 2002
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
probably fix depended subselect cleanup
fixed cleanup on error message handling
parent
baebdcfc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
9 deletions
+9
-9
sql/sql_select.cc
sql/sql_select.cc
+9
-9
No files found.
sql/sql_select.cc
View file @
0a65a224
...
@@ -57,7 +57,7 @@ static store_key *get_store_key(THD *thd,
...
@@ -57,7 +57,7 @@ static store_key *get_store_key(THD *thd,
static
bool
make_simple_join
(
JOIN
*
join
,
TABLE
*
tmp_table
);
static
bool
make_simple_join
(
JOIN
*
join
,
TABLE
*
tmp_table
);
static
bool
make_join_select
(
JOIN
*
join
,
SQL_SELECT
*
select
,
COND
*
item
);
static
bool
make_join_select
(
JOIN
*
join
,
SQL_SELECT
*
select
,
COND
*
item
);
static
void
make_join_readinfo
(
JOIN
*
join
,
uint
options
);
static
void
make_join_readinfo
(
JOIN
*
join
,
uint
options
);
static
void
join_free
(
JOIN
*
join
);
static
void
join_free
(
JOIN
*
join
,
bool
full
);
static
bool
only_eq_ref_tables
(
JOIN
*
join
,
ORDER
*
order
,
table_map
tables
);
static
bool
only_eq_ref_tables
(
JOIN
*
join
,
ORDER
*
order
,
table_map
tables
);
static
void
update_depend_map
(
JOIN
*
join
);
static
void
update_depend_map
(
JOIN
*
join
);
static
void
update_depend_map
(
JOIN
*
join
,
ORDER
*
order
);
static
void
update_depend_map
(
JOIN
*
join
,
ORDER
*
order
);
...
@@ -403,8 +403,8 @@ JOIN::optimize()
...
@@ -403,8 +403,8 @@ JOIN::optimize()
{
{
// quick abort
// quick abort
delete
procedure
;
delete
procedure
;
error
=
thd
->
net
.
report
_error
?
-
1
:
1
;
error
=
thd
->
fatal
_error
?
-
1
:
1
;
DBUG_RETURN
(
-
1
);
// Return without cleanup
DBUG_RETURN
(
error
);
}
}
if
(
cond_value
==
Item
::
COND_FALSE
||
if
(
cond_value
==
Item
::
COND_FALSE
||
...
@@ -900,7 +900,7 @@ JOIN::exec()
...
@@ -900,7 +900,7 @@ JOIN::exec()
DBUG_PRINT
(
"info"
,(
"Creating group table"
));
DBUG_PRINT
(
"info"
,(
"Creating group table"
));
/* Free first data from old join */
/* Free first data from old join */
join_free
(
this
);
join_free
(
this
,
0
);
if
(
make_simple_join
(
this
,
exec_tmp_table
))
if
(
make_simple_join
(
this
,
exec_tmp_table
))
DBUG_VOID_RETURN
;
DBUG_VOID_RETURN
;
calc_group_buffer
(
this
,
group_list
);
calc_group_buffer
(
this
,
group_list
);
...
@@ -951,7 +951,7 @@ JOIN::exec()
...
@@ -951,7 +951,7 @@ JOIN::exec()
if
(
exec_tmp_table
->
distinct
)
if
(
exec_tmp_table
->
distinct
)
select_distinct
=
0
;
/* Each row is unique */
select_distinct
=
0
;
/* Each row is unique */
join_free
(
this
);
/* Free quick selects */
join_free
(
this
,
0
);
/* Free quick selects */
if
(
select_distinct
&&
!
group_list
)
if
(
select_distinct
&&
!
group_list
)
{
{
thd
->
proc_info
=
"Removing duplicates"
;
thd
->
proc_info
=
"Removing duplicates"
;
...
@@ -1066,7 +1066,7 @@ JOIN::cleanup(THD *thd)
...
@@ -1066,7 +1066,7 @@ JOIN::cleanup(THD *thd)
DBUG_ENTER
(
"JOIN::cleanup"
);
DBUG_ENTER
(
"JOIN::cleanup"
);
lock
=
0
;
// It's faster to unlock later
lock
=
0
;
// It's faster to unlock later
join_free
(
this
);
join_free
(
this
,
1
);
if
(
exec_tmp_table
)
if
(
exec_tmp_table
)
free_tmp_table
(
thd
,
exec_tmp_table
);
free_tmp_table
(
thd
,
exec_tmp_table
);
delete
select
;
delete
select
;
...
@@ -3033,7 +3033,7 @@ bool error_if_full_join(JOIN *join)
...
@@ -3033,7 +3033,7 @@ bool error_if_full_join(JOIN *join)
static
void
static
void
join_free
(
JOIN
*
join
)
join_free
(
JOIN
*
join
,
bool
full
)
{
{
JOIN_TAB
*
tab
,
*
end
;
JOIN_TAB
*
tab
,
*
end
;
DBUG_ENTER
(
"join_free"
);
DBUG_ENTER
(
"join_free"
);
...
@@ -3046,7 +3046,7 @@ join_free(JOIN *join)
...
@@ -3046,7 +3046,7 @@ join_free(JOIN *join)
*/
*/
if
(
join
->
tables
>
join
->
const_tables
)
// Test for not-const tables
if
(
join
->
tables
>
join
->
const_tables
)
// Test for not-const tables
free_io_cache
(
join
->
table
[
join
->
const_tables
]);
free_io_cache
(
join
->
table
[
join
->
const_tables
]);
if
(
join
->
select_lex
->
dependent
)
if
(
join
->
select_lex
->
dependent
&&
!
full
)
for
(
tab
=
join
->
join_tab
,
end
=
tab
+
join
->
tables
;
tab
!=
end
;
tab
++
)
for
(
tab
=
join
->
join_tab
,
end
=
tab
+
join
->
tables
;
tab
!=
end
;
tab
++
)
{
{
if
(
tab
->
table
)
if
(
tab
->
table
)
...
@@ -4678,7 +4678,7 @@ do_select(JOIN *join,List<Item> *fields,TABLE *table,Procedure *procedure)
...
@@ -4678,7 +4678,7 @@ do_select(JOIN *join,List<Item> *fields,TABLE *table,Procedure *procedure)
error
=
0
;
error
=
0
;
if
(
!
table
)
// If sending data to client
if
(
!
table
)
// If sending data to client
{
{
join_free
(
join
);
// Unlock all cursors
join_free
(
join
,
0
);
// Unlock all cursors
if
(
join
->
result
->
send_eof
())
if
(
join
->
result
->
send_eof
())
error
=
1
;
// Don't send error
error
=
1
;
// Don't send error
}
}
...
...
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