summaryrefslogtreecommitdiff
path: root/sql/sql_select.cc
diff options
context:
space:
mode:
authorunknown <bell@sanja.is.com.ua>2006-01-18 13:49:37 +0200
committerunknown <bell@sanja.is.com.ua>2006-01-18 13:49:37 +0200
commit029eb594550859b3516d1a98292621551eb8e85d (patch)
tree7a65291242cfc0165ae748da49bbb7d2700b4b97 /sql/sql_select.cc
parent984484015c2a629c01686bc5ef324855dc9bba3f (diff)
parente7c25ed4a1b086e208a6fa6b7ee1ab0cc50c41b6 (diff)
downloadmariadb-git-029eb594550859b3516d1a98292621551eb8e85d.tar.gz
Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-4.1
into sanja.is.com.ua:/home/bell/mysql/bk/work-bug8-4.1 sql/sql_class.cc: Auto merged sql/sql_select.cc: Auto merged
Diffstat (limited to 'sql/sql_select.cc')
-rw-r--r--sql/sql_select.cc14
1 files changed, 14 insertions, 0 deletions
diff --git a/sql/sql_select.cc b/sql/sql_select.cc
index 1b09913dcc8..ec62e80ba13 100644
--- a/sql/sql_select.cc
+++ b/sql/sql_select.cc
@@ -4107,6 +4107,20 @@ JOIN::join_free(bool full)
problems in free_elements() as some of the elements are then deleted.
*/
tmp_table_param.copy_funcs.empty();
+ /*
+ If we have tmp_join and 'this' JOIN is not tmp_join and
+ tmp_table_param.copy_field's of them are equal then we have to remove
+ pointer to tmp_table_param.copy_field from tmp_join, because it qill
+ be removed in tmp_table_param.cleanup().
+ */
+ if (tmp_join &&
+ tmp_join != this &&
+ tmp_join->tmp_table_param.copy_field ==
+ tmp_table_param.copy_field)
+ {
+ tmp_join->tmp_table_param.copy_field=
+ tmp_join->tmp_table_param.save_copy_field= 0;
+ }
tmp_table_param.cleanup();
}
DBUG_VOID_RETURN;