diff options
Diffstat (limited to 'sql/opt_subselect.cc')
-rw-r--r-- | sql/opt_subselect.cc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sql/opt_subselect.cc b/sql/opt_subselect.cc index 34e705d3218..28d802375e2 100644 --- a/sql/opt_subselect.cc +++ b/sql/opt_subselect.cc @@ -4114,7 +4114,7 @@ SJ_TMP_TABLE::create_sj_weedout_tmp_table(THD *thd) recinfo++; if (share->db_type() == TMP_ENGINE_HTON) { - if (create_internal_tmp_table(table, keyinfo, start_recinfo, &recinfo, 0, 0)) + if (create_internal_tmp_table(table, keyinfo, start_recinfo, &recinfo, 0)) goto err; } if (open_tmp_table(table)) @@ -4234,9 +4234,13 @@ int SJ_TMP_TABLE::sj_weedout_check_row(THD *thd) /* create_internal_tmp_table_from_heap will generate error if needed */ if (!tmp_table->file->is_fatal_error(error, HA_CHECK_DUP)) DBUG_RETURN(1); /* Duplicate */ + + bool is_duplicate; if (create_internal_tmp_table_from_heap(thd, tmp_table, start_recinfo, - &recinfo, error, 1)) + &recinfo, error, 1, &is_duplicate)) DBUG_RETURN(-1); + if (is_duplicate) + DBUG_RETURN(1); } DBUG_RETURN(0); } |