mariadb/tests
Monty 15e889c300 MDEV-30699: Updated prev_record_reads() to be more exact
The old code in prev_record_reads() did give wrong estimates when a
join_buffer was used or if the table was depending on more than one
other tables. When join_cache is used, it will cause a re-order of row
combinations, which causes more calls to the engine for tables that
are depending on tables before the join_cached one.

The new prev_records_read() code provides more exact estimates and
should never give a 'too low estimate', assuming that the data to the
function is correct

The definition of prev_record_read() is also updated.
The new definition is:
  "Estimate the number of engine ha_index_read_calls for EQ_REF tables
  when taking into account the one-row-cache in join_read_always_key()"

The cost of using prev_record_reads() value is changed. The value is
now used similar as before to calculate the cost of the storage engine
calls. However the cost of the WHERE cost is changed to take into
account the total number of row combinations as the WHERE has to be
checked even if the one-row-cache is used. This makes the cost
slightly higher than before (for the same prev_record_reads() value).

Other things:
- Cached return value of prev_record_read() in best_access_path() to
  avoid some function calls.
- Fixed bug where position[].use_join_buffer was set in
  best_acess_path() when join buffer was not used. This confused the
  semi join optimizer to try to reoptimize plans that did not need to be
  reoptimized.
  The effect of the bug fix is that we avoid doing some re-optimziations
  with semi-joins when join_buffer is not used. In these cases the value
  shown for the 'Filtering' column in EXPLAIN EXTENDED may change.
- Added 'prev_record.cc' that was used to verify the logic in
  prev_record_reads().

Changes in test suite:
- EQ_REF tables are moved up to be earlier. This is because either the
  higher WHERE cost when EQ_REF is used with more row combination or
  change of cost when using join_cache.
- Filtered has changed (to the better) for some cases using semi-joins
  subselect_sj.test subselect_sj_jcl6.test
2023-02-21 15:36:39 +03:00
..
async_queries.c Added 'const' to arguments in get_one_option and find_typeset() 2021-02-08 12:16:29 +02:00
auto_increment.res
auto_increment.tst
big_record.pl Merge 10.4 into 10.5 2020-07-02 09:41:44 +03:00
bug25714.c Merge branch '5.5' into 10.1 2019-05-11 22:19:05 +03:00
check_async_queries.pl Switch Perl DBI scripts from DBD::mysql to DBD::MariaDB driver 2019-07-19 13:39:20 +03:00
check_costs.pl Fixed check_costs.pl to always create table if table does not exists 2023-02-15 15:50:21 +03:00
CMakeLists.txt MDEV-21303 Make executables MariaDB named 2020-03-21 20:20:29 +01:00
connect_test.c Update FSF Address 2019-05-11 21:29:06 +03:00
consistent_snapshot.pl Switch Perl DBI scripts from DBD::mysql to DBD::MariaDB driver 2019-07-19 13:39:20 +03:00
deadlock_test.c Update FSF Address 2019-05-11 21:29:06 +03:00
drop_test.pl Merge branch '10.4' into 10.5 2020-09-29 16:59:36 +05:30
export.pl mtr: use env for perl 2020-06-23 03:24:46 +02:00
fork2_test.pl MDEV-23697: perl -w -> perl 2020-09-24 08:09:56 +10:00
fork_big.pl Merge branch '10.4' into 10.5 2020-09-29 16:59:36 +05:30
fork_big2.pl Merge branch '10.4' into 10.5 2020-09-29 16:59:36 +05:30
function.res
function.tst
grant.res
index_corrupt.pl Merge branch '10.4' into 10.5 2020-09-29 16:59:36 +05:30
insert_and_repair.pl Merge branch '10.4' into 10.5 2020-09-29 16:59:36 +05:30
insert_test.c Update FSF Address 2019-05-11 21:29:06 +03:00
list_test.c MDEV-25602 get rid of __WIN__ in favor of standard _WIN32 2021-06-06 13:21:03 +02:00
lock_test.pl mtr: use env for perl 2020-06-23 03:24:46 +02:00
lock_test.res
mail_to_db.pl Merge branch '10.4' into 10.5 2020-09-29 16:59:36 +05:30
myisam-big-rows.tst
mysql_client_fw.c unify client/tool version string 2023-01-19 12:39:28 +01:00
mysql_client_test.c Merge branch '10.10' into 10.11 2022-11-02 13:08:01 +01:00
nonblock-wrappers.h MDEV-25602 get rid of __WIN__ in favor of standard _WIN32 2021-06-06 13:21:03 +02:00
pmail.pl Merge branch '10.4' into 10.5 2020-09-29 16:59:36 +05:30
prev_record.cc MDEV-30699: Updated prev_record_reads() to be more exact 2023-02-21 15:36:39 +03:00
rename_test.pl Merge branch '10.4' into 10.5 2020-09-29 16:59:36 +05:30
restore-lock.smack
select_test.c Update FSF Address 2019-05-11 21:29:06 +03:00
showdb_test.c MDEV-25602 get rid of __WIN__ in favor of standard _WIN32 2021-06-06 13:21:03 +02:00
ssl_test.c MDEV-25602 get rid of __WIN__ in favor of standard _WIN32 2021-06-06 13:21:03 +02:00
table_types.pl mtr: use env for perl 2020-06-23 03:24:46 +02:00
test_delayed_insert.pl Merge branch '10.4' into 10.5 2020-09-29 16:59:36 +05:30
thread_test.c MDEV-25602 get rid of __WIN__ in favor of standard _WIN32 2021-06-06 13:21:03 +02:00
truncate.pl Merge branch '10.4' into 10.5 2020-09-29 16:59:36 +05:30