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
06e4a969
Commit
06e4a969
authored
Sep 12, 2012
by
Tor Didriksen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Backport Bug#13724099
parent
95f6e191
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
7 deletions
+21
-7
sql/sql_list.h
sql/sql_list.h
+9
-2
sql/sql_select.cc
sql/sql_select.cc
+12
-5
No files found.
sql/sql_list.h
View file @
06e4a969
#ifndef INCLUDES_MYSQL_SQL_LIST_H
#define INCLUDES_MYSQL_SQL_LIST_H
/*
Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
/* Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
...
...
@@ -165,6 +164,14 @@ protected:
public:
uint
elements
;
bool
operator
==
(
const
base_list
&
rhs
)
const
{
return
elements
==
rhs
.
elements
&&
first
==
rhs
.
first
&&
last
==
rhs
.
last
;
}
inline
void
empty
()
{
elements
=
0
;
first
=
&
end_of_list
;
last
=&
first
;}
inline
base_list
()
{
empty
();
}
/**
...
...
sql/sql_select.cc
View file @
06e4a969
/* Copyright (c) 2000, 201
1
, Oracle and/or its affiliates. All rights reserved.
/* Copyright (c) 2000, 201
2
, Oracle and/or its affiliates. All rights reserved.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
...
...
@@ -1676,6 +1676,8 @@ JOIN::optimize()
*/
void
JOIN
::
restore_tmp
()
{
DBUG_PRINT
(
"info"
,
(
"restore_tmp this %p tmp_join %p"
,
this
,
tmp_join
));
DBUG_ASSERT
(
tmp_join
!=
this
);
memcpy
(
tmp_join
,
this
,
(
size_t
)
sizeof
(
JOIN
));
}
...
...
@@ -7090,13 +7092,18 @@ void JOIN::cleanup(bool full)
{
if
(
tmp_join
)
tmp_table_param
.
copy_field
=
0
;
group_fields
.
delete_elements
();
/*
Ensure that the
above
delete_elements() would not be called
Ensure that the
following
delete_elements() would not be called
twice for the same list.
*/
if
(
tmp_join
&&
tmp_join
!=
this
)
tmp_join
->
group_fields
=
group_fields
;
if
(
tmp_join
&&
tmp_join
!=
this
&&
tmp_join
->
group_fields
==
this
->
group_fields
)
tmp_join
->
group_fields
.
empty
();
// Run Cached_item DTORs!
group_fields
.
delete_elements
();
/*
We can't call delete_elements() on copy_funcs as this will cause
problems in free_elements() as some of the elements are then deleted.
...
...
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