mariadb/mysql-test/suite/maria
Monty 07b02ab40e MDEV-31356: Range cost calculations does not take into account join_buffer
This patch also fixes
MDEV-31391 Assertion `((best.records_out) == 0.0 ... failed

Cost changes caused by this change:
- range queries with join buffer now have a notable smaller cost.
- range ranges are bit more expensive as the MULTI_RANGE_COST is now
  properly applied to it in all cases (this extra cost is equal to a
  key lookup).
- table scan cost is slight smaller as we now assume data is cached in
  the engine after the first scan pass. (We did this before for range
  scans and other access methods).
- partition tables had wrong values for max_row_blocks and
  max_index_blocks.  Correcting this, causes range access on
  partitioned tables to have slightly higher cost because of the
  increased estimated IO.
- Using first match + join buffer caused 'filtered' to be calcualted
  wrong.  (Only affected EXPLAIN, not query costs).
- Added cost_without_join_buffer to optimizer_trace.
- check_quick_select() adjusted the number of rows according to persistent
  statistics, but did not adjust cost. Now fixed.

The big change in the patch are:

- In best_access_path(), where we now are using storing the cost in
  'ALL_READ_COST cost' and only converting it to a double at the end.
   This allows us to more exactly calculate the effect of the join_cache.
- In JOIN_TAB::estimate_scan_time(), store the cost also in a
  ALL_READ_COST object.

One of effect if this change is that when joining very small tables:

t1    some_access_method
t2    range
t3    ALL         Use join buffer

This is swiched to

t1      some_access_method
t3      ALL
t2      range      use join buffer

Both plans has the same cost, but as table scan in this case has less
cost than rang, the table scan will be considered first and thus have
precidence.

Test case changes:
- optimizer_trace          - Addition of cost_without_join_buffer
- subselect_mat_cost_bugs  - Small tables and scan versus range
- range & range_mrr_icp    - Range + join_cache is faster than ref
- optimizer_trace          - cost_without_join_buffer, smaller scan cost,
                             range setup cost.
- mrr                      - range+join_buffer used as smaller cost
2023-06-07 18:42:58 +03:00
..
alter.result Merge 10.5 into 10.6 2022-09-20 16:53:20 +03:00
alter.test Fix all warnings given by UBSAN 2021-05-19 22:54:14 +02:00
aria_log_dir_path.result MDEV-30971 Add a new system variable aria_data_home_dir 2023-04-04 16:05:55 +04:00
aria_log_dir_path.test MDEV-30971 Add a new system variable aria_data_home_dir 2023-04-04 16:05:55 +04:00
aria_pack_mdev14183.result fix tests 2020-01-24 15:38:25 +01:00
aria_pack_mdev14183.test MDEV-14183: aria_pack segfaults in compress_maria_file 2020-01-23 14:20:57 +03:00
aria_sort_buffer.result MDEV-24750 Various corruptions caused by Aria subsystem... 2021-02-03 02:22:47 +02:00
aria_sort_buffer.test MDEV-24750 Various corruptions caused by Aria subsystem... 2021-02-03 02:22:47 +02:00
bulk_insert_crash.opt mtr: aix - stack-trace is optional 2021-07-22 15:22:47 +10:00
bulk_insert_crash.result Merge 10.5 into 10.6 2021-04-21 11:45:00 +03:00
bulk_insert_crash.test Fixed crash in aria recovery when using bulk insert 2020-05-26 20:05:17 +03:00
collations.result MDEV-10759 Fix Aria to support 2-byte collation IDs 2016-12-02 14:05:16 +02:00
collations.test MDEV-10759 Fix Aria to support 2-byte collation IDs 2016-12-02 14:05:16 +02:00
compat_aliases-master.opt Created suites for heap, archive and csv. 2012-04-04 00:16:38 +03:00
concurrent.result Merge 10.1 into 10.2 2018-08-31 15:10:02 +03:00
concurrent.test MDEV-15797 Assertion `thd->killed != 0' failed in ha_maria::enable_indexes 2018-08-27 22:00:14 +03:00
crash-recursive.result Fixed crashing bug in recursive SQL if write to tmp table would fail 2023-03-02 13:11:54 +02:00
crash-recursive.test Fixed crashing bug in recursive SQL if write to tmp table would fail 2023-03-02 13:11:54 +02:00
create.opt Fixed maria.create test 2020-11-30 19:57:50 +02:00
create.result Merge branch '10.4' into 10.5 2020-11-01 14:26:15 +01:00
create.test Fixed failing maria.create test 2020-11-09 19:36:10 +02:00
disabled.def MDEV-16421 Make system tables crash safe 2018-08-14 12:18:38 +03:00
distinct.result 5.3 merge. 2013-05-20 12:36:30 +02:00
distinct.test 5.3 merge. 2013-05-20 12:36:30 +02:00
dynamic.result MDEV-13748 Assertion `status_var.local_memory_used == 0 || !debug_assert_on_not_freed_memory' failed in virtual THD::~THD after query with INTERSECT 2018-02-14 18:41:37 +01:00
dynamic.test MDEV-13748 Assertion `status_var.local_memory_used == 0 || !debug_assert_on_not_freed_memory' failed in virtual THD::~THD after query with INTERSECT 2018-02-14 18:41:37 +01:00
encrypt-no-key.result Fixed maria.maria-recover and maria.encrypt-no-key test files 2022-06-13 16:10:41 +03:00
encrypt-no-key.test Fixed maria.maria-recover and maria.encrypt-no-key test files 2022-06-13 16:10:41 +03:00
encrypt-wrong-key.result MDEV-8724 Assertion `rc == 0' failed in ma_decrypt on reading an Aria table 2016-01-28 14:06:05 +02:00
encrypt-wrong-key.test Fix mtr tests with file_key_managment extension for Windows 2021-06-04 14:57:13 +02:00
fulltext2.result MDEV-11241 Certain combining marks cause MariaDB to crash when doing Full-Text searches 2022-01-28 21:36:33 +01:00
fulltext2.test Merge branch '10.5' into 10.6 2022-02-03 17:01:31 +01:00
group_commit.result Created suites for heap, archive and csv. 2012-04-04 00:16:38 +03:00
group_commit.test Created suites for heap, archive and csv. 2012-04-04 00:16:38 +03:00
icp.result Adjust costs for rowid filter 2023-02-21 15:35:27 +03:00
icp.test MDEV-18650: Options deprecated in previous versions - storage_engine 2020-02-13 13:42:01 +02:00
insert_select-7314.result MDEV-6720 - enable connection log in mysqltest by default 2016-03-31 10:11:16 +04:00
insert_select-7314.test 5.5 merge 2015-01-21 12:03:02 +01:00
insert_select.result MDEV-6720 - enable connection log in mysqltest by default 2016-03-31 10:11:16 +04:00
insert_select.test Fixed MDEV-7314: Deadlock when doing insert-select with Aria 2015-01-18 20:38:07 +02:00
kill.result MDEV-14996 kill during FLUSH TABLES FOR EXPORT causes assert 2019-06-27 20:57:25 +03:00
kill.test MDEV-14996 kill during FLUSH TABLES FOR EXPORT causes assert 2019-06-27 20:57:25 +03:00
lock.result Merge remote-tracking branch 'origin/10.4' into 10.5 2022-09-14 16:24:51 +04:00
lock.test Fix for crash in Aria LOCK TABLES + CREATE TRIGGER 2020-06-14 19:39:43 +03:00
locking.result Created suites for heap, archive and csv. 2012-04-04 00:16:38 +03:00
locking.test Created suites for heap, archive and csv. 2012-04-04 00:16:38 +03:00
maria-autoinc.result MDEV-29446 Change SHOW CREATE TABLE to display default collation 2022-09-12 22:10:39 +04:00
maria-autoinc.test MDEV-15352 AUTO_INCREMENT breaks after updating a column value to a negative number 2018-06-14 13:13:23 +04:00
maria-autozerofill.result MDEV-17913 Encrypted transactional Aria tables remain corrupt after crash recovery, automatic repairment does not work 2021-04-06 14:57:22 +03:00
maria-autozerofill.test MDEV-17913 Encrypted transactional Aria tables remain corrupt after crash recovery, automatic repairment does not work 2021-04-06 14:57:22 +03:00
maria-big.result MDEV-18650: Options deprecated in previous versions - storage_engine 2020-02-13 13:42:01 +02:00
maria-big.test MDEV-18650: Options deprecated in previous versions - storage_engine 2020-02-13 13:42:01 +02:00
maria-big2.result Created suites for heap, archive and csv. 2012-04-04 00:16:38 +03:00
maria-big2.test Created suites for heap, archive and csv. 2012-04-04 00:16:38 +03:00
maria-connect.result Fix spelling mistake in error message 2020-08-21 23:00:56 +03:00
maria-connect.test Aria will now register it's transactions 2020-05-23 12:29:10 +03:00
maria-gis-recovery.opt mtr: aix - stack-trace is optional 2021-07-22 15:22:47 +10:00
maria-gis-recovery.result Merge 10.5 into 10.6 2022-09-20 16:53:20 +03:00
maria-gis-recovery.test Updated mtr files to support different compiled in options 2019-09-01 19:17:35 +03:00
maria-gis-rtree-dynamic.result Merge remote-tracking branch 'origin/10.4' into 10.5 2022-09-14 16:24:51 +04:00
maria-gis-rtree-dynamic.test MDEV-18650: Options deprecated in previous versions - storage_engine 2020-02-13 13:42:01 +02:00
maria-gis-rtree-trans.result Merge remote-tracking branch 'origin/10.4' into 10.5 2022-09-14 16:24:51 +04:00
maria-gis-rtree-trans.test MDEV-18650: Options deprecated in previous versions - storage_engine 2020-02-13 13:42:01 +02:00
maria-gis-rtree.result Merge remote-tracking branch 'origin/10.4' into 10.5 2022-09-14 16:24:51 +04:00
maria-gis-rtree.test MDEV-18650: Options deprecated in previous versions - storage_engine 2020-02-13 13:42:01 +02:00
maria-mvcc.result MDEV-29446 Change SHOW CREATE TABLE to display default collation 2022-09-12 22:10:39 +04:00
maria-mvcc.test Created suites for heap, archive and csv. 2012-04-04 00:16:38 +03:00
maria-no-logging.result Merge 10.3 into 10.4 2022-09-13 16:36:38 +03:00
maria-no-logging.test MDEV-17665 Assertion `!share and other errors on concurrent Aria operations 2020-09-25 13:07:04 +03:00
maria-page-checksum.result MDEV-29446 Change SHOW CREATE TABLE to display default collation 2022-09-12 22:10:39 +04:00
maria-page-checksum.test fix for maria.maria test 2013-07-13 22:29:17 +02:00
maria-partitioning.result Make error messages from DROP TABLE and DROP TABLE IF EXISTS consistent 2020-06-14 19:39:42 +03:00
maria-partitioning.test MDEV-18650: Options deprecated in previous versions - storage_engine 2020-02-13 13:42:01 +02:00
maria-preload.result Fixed MDEV-3815: Aria engine return "The table is full" (ERROR 1114) inserting record, while MyISAM and InnoDB doesn't 2014-02-11 19:40:33 +02:00
maria-preload.test Created suites for heap, archive and csv. 2012-04-04 00:16:38 +03:00
maria-purge.result MDEV-18650: Options deprecated in previous versions - storage_engine 2020-02-13 13:42:01 +02:00
maria-purge.test MDEV-18650: Options deprecated in previous versions - storage_engine 2020-02-13 13:42:01 +02:00
maria-recover-master.opt MDEV-8542 - The "aria_recover" variable should be renamed "aria_recover_options" 2015-11-26 11:34:17 +04:00
maria-recover.result Fixed maria.maria-recover and maria.encrypt-no-key test files 2022-06-13 16:10:41 +03:00
maria-recover.test Fixed maria.maria-recover and maria.encrypt-no-key test files 2022-06-13 16:10:41 +03:00
maria-recovery-big-master.opt mtr: aix - stack-trace is optional 2021-07-22 15:22:47 +10:00
maria-recovery-big.result Merge 10.5 into 10.6 2021-04-21 11:45:00 +03:00
maria-recovery-big.test Created suites for heap, archive and csv. 2012-04-04 00:16:38 +03:00
maria-recovery-bitmap-master.opt mtr: aix - stack-trace is optional 2021-07-22 15:22:47 +10:00
maria-recovery-bitmap.result Merge 10.5 into 10.6 2021-04-21 11:45:00 +03:00
maria-recovery-bitmap.test Created suites for heap, archive and csv. 2012-04-04 00:16:38 +03:00
maria-recovery-master.opt mtr: aix - stack-trace is optional 2021-07-22 15:22:47 +10:00
maria-recovery-rtree-ft-master.opt mtr: aix - stack-trace is optional 2021-07-22 15:22:47 +10:00
maria-recovery-rtree-ft.result Merge 10.5 into 10.6 2021-04-21 11:45:00 +03:00
maria-recovery-rtree-ft.test merge with mysql-5.5.30 minus few incorrect or not applicable changesets 2013-02-28 18:42:49 +01:00
maria-recovery.result Merge 10.5 into 10.6 2022-09-20 16:53:20 +03:00
maria-recovery.test Updated mtr files to support different compiled in options 2019-09-01 19:17:35 +03:00
maria-recovery2-master.opt mtr: aix - stack-trace is optional 2021-07-22 15:22:47 +10:00
maria-recovery2.result Merge 10.5 into 10.6 2021-04-21 11:45:00 +03:00
maria-recovery2.test 5.5 merge 2013-06-06 17:51:28 +02:00
maria-recovery3-master.opt mtr: aix - stack-trace is optional 2021-07-22 15:22:47 +10:00
maria-recovery3.result Add support for minimum field width for strings to my_vsnprintf() 2021-05-19 22:27:29 +02:00
maria-recovery3.test Created suites for heap, archive and csv. 2012-04-04 00:16:38 +03:00
maria-ucs2.result Merge 10.5 into 10.6 2022-09-20 16:53:20 +03:00
maria-ucs2.test MDEV-18650: Options deprecated in previous versions - storage_engine 2020-02-13 13:42:01 +02:00
maria.result Merge 10.5 into 10.6 2022-09-20 16:53:20 +03:00
maria.test Merge 10.5 into 10.6 2022-04-21 17:46:40 +03:00
maria2.result MDEV-27434 DESC attribute does not work with auto-increment on secondary column of multi-part index 2022-01-26 18:43:06 +01:00
maria2.test MDEV-27434 DESC attribute does not work with auto-increment on secondary column of multi-part index 2022-01-26 18:43:06 +01:00
maria3.result Merge 10.5 into 10.6 2023-04-11 16:15:19 +03:00
maria3.test MDEV-24312 master_host has 60 character limit, increase to 255 bytes 2021-04-20 16:36:56 +02:00
maria_notembedded.result MDEV-18650: Options deprecated in previous versions - storage_engine 2020-02-13 13:42:01 +02:00
maria_notembedded.test MDEV-18650: Options deprecated in previous versions - storage_engine 2020-02-13 13:42:01 +02:00
maria_partition.result MDEV-18650: Options deprecated in previous versions - storage_engine 2020-02-13 13:42:01 +02:00
maria_partition.test MDEV-18650: Options deprecated in previous versions - storage_engine 2020-02-13 13:42:01 +02:00
maria_showlog_error.result MDEV-6720 - enable connection log in mysqltest by default 2016-03-31 10:11:16 +04:00
maria_showlog_error.test Created suites for heap, archive and csv. 2012-04-04 00:16:38 +03:00
max_length.result Merge 10.5 into 10.6 2022-09-20 16:53:20 +03:00
max_length.test Extend have_sanitizer with ASAN+UBSAN and MSAN 2022-02-23 15:48:08 +02:00
mrr.result MDEV-31356: Range cost calculations does not take into account join_buffer 2023-06-07 18:42:58 +03:00
mrr.test MDEV-24312 master_host has 60 character limit, increase to 255 bytes 2021-04-20 16:36:56 +02:00
optimize.result MDEV-3870 - Valgrind warnings on OPTIMIZE MyISAM or Aria TABLE with disabled 2015-06-09 23:24:03 +04:00
optimize.test MDEV-3870 - Valgrind warnings on OPTIMIZE MyISAM or Aria TABLE with disabled 2015-06-09 23:24:03 +04:00
partition.result MDEV-19254 Server crashes in maria_status with partitioned table 2019-08-19 19:49:45 +03:00
partition.test MDEV-19254 Server crashes in maria_status with partitioned table 2019-08-19 19:49:45 +03:00
ps_maria.result Merge 10.3 into 10.4 2022-09-13 16:36:38 +03:00
ps_maria.test Created suites for heap, archive and csv. 2012-04-04 00:16:38 +03:00
repair.result MDEV-17223 Assertion `thd->killed != 0' failed in ha_maria::enable_indexes 2022-02-16 17:16:10 +02:00
repair.test MDEV-17223 Assertion `thd->killed != 0' failed in ha_maria::enable_indexes 2022-02-16 17:16:10 +02:00
rollback.result Merge 10.5 into 10.6 2022-11-10 17:30:15 +02:00
rollback.test Merge 10.5 into 10.6 2022-11-10 17:30:15 +02:00
small_blocksize-master.opt Created suites for heap, archive and csv. 2012-04-04 00:16:38 +03:00
small_blocksize.result Post-merge buildbot fixes: 2013-07-05 19:57:48 +04:00
small_blocksize.test Created suites for heap, archive and csv. 2012-04-04 00:16:38 +03:00
suite.pm MDEV-8542 - The "aria_recover" variable should be renamed "aria_recover_options" 2015-11-26 11:34:17 +04:00
system_tables.result Changed FLUSH TABLES to not change share version 2018-12-09 22:12:26 +02:00
system_tables.test Changed FLUSH TABLES to not change share version 2018-12-09 22:12:26 +02:00
temporary.result MDEV-19595 fixed 2019-06-19 00:35:44 +03:00
temporary.test MDEV-19595 fixed 2019-06-19 00:35:44 +03:00
transaction.result Aria will now register it's transactions 2020-05-23 12:29:10 +03:00
transaction.test Aria will now register it's transactions 2020-05-23 12:29:10 +03:00
truncate.result MDEV-29446 Change SHOW CREATE TABLE to display default collation 2022-09-12 22:10:39 +04:00
truncate.test Fixed MDEV-3890: Server crash inserting record on a temporary table after truncating it 2013-01-25 21:40:42 +02:00