From bef95a4bbea0a3a42ad26798d3c3aa326dc282bf Mon Sep 17 00:00:00 2001 From: Michael Widenius Date: Wed, 5 Jun 2013 23:53:35 +0300 Subject: -Run test suite with smaller aria keybuffer size (to make it possible to run more tests in parallel) -Added test and extra code to ensure we don't leave keyread on for a handler table. -Create on disk temporary files always with long data pointers if SQL_SMALL_RESULT is not used. This ensures that we can handle temporary files bigger than 4G. mysql-test/include/default_mysqld.cnf: Run test suite with smaller aria keybuffer size mysql-test/suite/maria/maria3.result: Run test suite with smaller aria keybuffer size mysql-test/suite/sys_vars/r/aria_pagecache_buffer_size_basic.result: Run test suite with smaller aria keybuffer size sql/handler.cc: Disable key read (extra safety if something went wrong) sql/multi_range_read.cc: Ensure we have don't leave keyread on for secondary_file sql/opt_range.cc: Simplify code with mark_columns_used_by_index_no_reset() Ensure that read_keys_and_merge() disableds keyread if it enables it sql/opt_subselect.cc: Remove not anymore used argument for create_internal_tmp_table() sql/sql_derived.cc: Remove not anymore used argument for create_internal_tmp_table() sql/sql_select.cc: Use 'enable_keyread()' instead of calling HA_EXTRA_RESET. (Makes debugging easier) Create on disk temporary files always with long data pointers if SQL_SMALL_RESULT is not used. This ensures that we can handle temporary files bigger than 4G. Remove not anymore used argument for create_internal_tmp_table() More DBUG sql/sql_select.h: Remove not anymore used argument for create_internal_tmp_table() --- sql/opt_subselect.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sql/opt_subselect.cc') diff --git a/sql/opt_subselect.cc b/sql/opt_subselect.cc index c0a01dded35..660d52e20fe 100644 --- a/sql/opt_subselect.cc +++ b/sql/opt_subselect.cc @@ -4107,7 +4107,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)) -- cgit v1.2.1 From 9651a6f5745c330111b5281e69a7d52fc8261d0d Mon Sep 17 00:00:00 2001 From: Sergey Petrunya Date: Tue, 16 Jul 2013 09:22:17 +0400 Subject: mdev-4173: Wrong result (extra row) with semijoin=on, joins in outer query, LEFT JOIN in the subquery Apply the patch from Patryk Pomykalski: - create_internal_tmp_table_from_heap() will now return information whether the last row that we tried to write was a duplicate row. (mysql-5.6 also has this change) --- sql/opt_subselect.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'sql/opt_subselect.cc') diff --git a/sql/opt_subselect.cc b/sql/opt_subselect.cc index 660d52e20fe..773897474f3 100644 --- a/sql/opt_subselect.cc +++ b/sql/opt_subselect.cc @@ -4227,9 +4227,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); } -- cgit v1.2.1