Commit graph

23 commits

Author SHA1 Message Date
Igor Babaev
9f79652625 Assertion failure with UPDATE of view using MERGE table
The problem was caused by an assertion that is not valid anymore.
2023-03-15 17:35:22 -07:00
Sergei Petrunia
9c401c8c39 MDEV-30525: Assertion `ranges > 0' fails in IO_AND_CPU_COST
Part #2: fix the case where table->stat_records()=1 (due to EITS
statistics), but the range returns rows=0.
2023-02-21 15:35:27 +03:00
Sergei Petrunia
d661696636 MDEV-30568: Assertion `cond_selectivity <= 1.000000001' failed in get_range_limit_read_cost
In get_range_limit_read_cost(), handle the case where range_rows=0.
2023-02-10 13:35:31 +02:00
Sergei Petrunia
5faf2ac01b MDEV-30525: Assertion `ranges > 0' fails in IO_AND_CPU_COST handler::keyread_time
Make get_best_group_min_max() exit early if the table has
table->records()=0. Attempting to compute loose scan over 0
groups eventually causes an assert when trying to get the
cost of reading 0 ranges.
2023-02-10 13:35:31 +02:00
Monty
76d2a77d52 MDEV-30088 Assertion `cond_selectivity <= 1.0' failed in get_range_limit_read_cost
Fixed cost calculation for MERGE tables with 0 tables
2023-02-10 12:58:50 +02:00
Monty
1f4a9f086a Removed "<select expression> INTO <destination>" deprication.
This was done after discussions with Igor, Sanja and Bar.

The main reason for removing the deprication was to ensure that MariaDB
is always backward compatible whenever possible.

Other things:
- Added statistics counters, mainly for the feedback plugin.
  - INTO OUTFILE
  - INTO variable
  - If INTO is using the old syntax (end of query)
2023-02-03 11:57:50 +03:00
Marko Mäkelä
4345d93100 Merge 10.7 into 10.8 2022-09-21 09:52:09 +03:00
Marko Mäkelä
44fd2c4b24 Merge 10.5 into 10.6 2022-09-20 16:53:20 +03:00
Alexander Barkov
fe844c16b6 Merge remote-tracking branch 'origin/10.4' into 10.5 2022-09-14 16:24:51 +04:00
Marko Mäkelä
18795f5512 Merge 10.3 into 10.4 2022-09-13 16:36:38 +03:00
Alexander Barkov
f1544424de MDEV-29446 Change SHOW CREATE TABLE to display default collation 2022-09-12 22:10:39 +04:00
Sergei Golubchik
d751f42a02 MDEV-27586 Auto-increment does not work with DESC on MERGE table
also fix handler::get_auto_increment()
2022-01-26 18:43:06 +01:00
Sergei Golubchik
d7e7f48eb4 MDEV-27407 Different ASC/DESC index attributes on MERGE and underlying table can cause wrong results
detect if merge children are "differently defined" regarding ASC/DESC
2022-01-26 18:43:06 +01:00
Sergei Golubchik
349a595bc4 cleanup: tests
* combine two test files with seemingly the same name
* comments
2022-01-26 18:43:05 +01:00
Varun Gupta
f691d9865b MDEV-7317: Make an index ignorable to the optimizer
This feature adds the functionality of ignorability for indexes.
Indexes are not ignored be default.

To control index ignorability explicitly for a new index,
use IGNORE or NOT IGNORE as part of the index definition for
CREATE TABLE, CREATE INDEX, or ALTER TABLE.

Primary keys (explicit or implicit) cannot be made ignorable.

The table INFORMATION_SCHEMA.STATISTICS get a new column named IGNORED that
would store whether an index needs to be ignored or not.
2021-03-04 22:50:00 +05:30
Vicențiu Ciorbaru
45bc7574fb MDEV-18650: Options deprecated in previous versions - storage_engine
Remove usage of deprecated variable storage_engine. It was deprecated in 5.5 but
it never issued a deprecation warning. Make it issue a warning in 10.5.1.

Replaced with default_storage_engine.
2020-02-13 13:42:01 +02:00
Sergei Golubchik
244f0e6dd8 Merge branch '10.3' into 10.4 2019-09-06 11:53:10 +02:00
Monty
a071e0e029 Merge branch '10.2' into 10.3 2019-09-03 13:17:32 +03:00
Igor Babaev
37deed3f37 Merge branch '10.4' into bb-10.4-mdev16188 2019-02-03 18:41:18 -08:00
Igor Babaev
658128af43 MDEV-16188 Use in-memory PK filters built from range index scans
This patch contains a full implementation of the optimization
that allows to use in-memory rowid / primary filters built for range  
conditions over indexes. In many cases usage of such filters reduce  
the number of disk seeks spent for fetching table rows.

In this implementation the choice of what possible filter to be applied  
(if any) is made purely on cost-based considerations.

This implementation re-achitectured the partial implementation of
the feature pushed by Galina Shalygina in the commit
8d5a11122c.

Besides this patch contains a better implementation of the generic  
handler function handler::multi_range_read_info_const() that
takes into account gaps between ranges when calculating the cost of
range index scans. It also contains some corrections of the
implementation of the handler function records_in_range() for MyISAM.

This patch supports the feature for InnoDB and MyISAM.
2019-02-03 14:56:12 -08:00
Varun Gupta
93c360e3a5 MDEV-15253: Default optimizer setting changes for MariaDB 10.4
use_stat_tables= PREFERABLY
optimizer_use_condition_selectivity= 4
2018-12-09 09:22:00 +05:30
Oleksandr Byelkin
de745ecf29 MDEV-11953: support of brackets in UNION/EXCEPT/INTERSECT operations 2018-07-04 19:13:55 +02:00
Michael Widenius
a7abddeffa Create 'main' test directory and move 't' and 'r' there 2018-03-29 13:59:44 +03:00
Renamed from mysql-test/r/merge.result (Browse further)