MDEV-5984: EITS: Incorrect filtered% value for single-table select with range access
- Fix calculate_cond_selectivity_for_table() to work correctly with range accesses
over multi-component keys:
= First, take selectivity of all possible range scans into account. Remember which
fields were used bt the range scans.
= Then, calculate selectivity produced by sargable predicates on fields. If a
field was used in a possible range access, assume its selectivity is already
taken into account.
- Fix table_cond_selectivity(): when quick select is used, selectivity of
COND(table) is taken into account in matching_candidates_in_table(). In
table_cond_selectivity() we should not apply it for the second time.
By implementing index_last
modified:
storage/connect/ha_connect.cc
storage/connect/ha_connect.h
storage/connect/xindex.cpp
- Adding the TYPE_BIN Connect internal type
(not tested and not used yet)
modified:
storage/connect/global.h
storage/connect/value.cpp
storage/connect/value.h
conversion from TEXT to VARCHAR in PROXY and MYSQL tables.
modified:
storage/connect/ha_connect.cc
storage/connect/myconn.cpp
storage/connect/myconn.h
storage/connect/myutil.cpp
storage/connect/tabmysql.cpp
storage/connect/tabutil.cpp
- Add the xmap system variable addressing whether file mapping should be used
to handle indexing.
modified:
storage/connect/CMakeLists.txt
storage/connect/ha_connect.cc
storage/connect/xindex.cpp
storage/connect/xindex.h
- Do take care of ~ in Linux version of _fullpath (not tested yet)
modified:
storage/connect/osutil.c
(for case-insensitive filesystems)
sql/events.cc:
for "SHOW EVENTS IN db_name"
sql/sp_head.h:
for "CREATE EVENT", and everything SP-related
sql/sql_acl.cc:
privilege check for mysql_change_db()
sql/sql_db.cc:
for metadata locking of db names
sql/sql_parse.cc:
any_db is a constant, it is not writable
sql/sql_show.cc:
for SHOW CREATE TRIGGER and other trigger-related statements
MDEV-5971 Asymmetry between CAST(DATE'2001-00-00') to INT and TO CHAR in prepared statements
Consistently set maybe_null flag, even not-NULL temporal literal may become NULL
in the restrictive sql_mode.
This will help the following replicaition scenario:
MariaDB 10.0 master (statement replication) -> MariaDB 10.0 slave (row based replication) -> MySQL or MariaDB 5.x slave
mysql-test/r/mysqld--help.result:
Updated help text
mysql-test/suite/rpl/r/create_or_replace_mix.result:
Added more tests
mysql-test/suite/rpl/r/create_or_replace_row.result:
Added more tests
mysql-test/suite/rpl/r/create_or_replace_statement.result:
Added more tests
mysql-test/suite/rpl/t/create_or_replace.inc:
Added more tests
sql/handler.h:
Added org_options so that we can detect what come from the query and what was possible added later.
sql/sql_insert.cc:
Only write CREATE OR REPLACE if was originally specified or if we delete a conflicting table as part of create
sql/sql_parse.cc:
Remember orginal create options
sql/sql_table.cc:
Only write CREATE OR REPLACE if was originally specified or if we delete a conflicting table as part of create
sql/sys_vars.cc:
Updated help text
TABLE_SHARE::visit_subgraph
tc_acquire_table() is not ready to update TABLE::in_use without mutex:
thr1: table= free_tables.pop_front(); // table->in_use is 0
thr2: tdc_remove_table();
thr2: find_deadlock(); // assert(table->in_use != 0)
thr1: table->in_use= thd;
Protect update of TABLE::in_use by LOCK_table_share.
to use named pipe on Windows by specifying the host as '.'
This addresses MDEV-5952.
modified:
storage/connect/myconn.cpp
- Clean some unused code
modified:
storage/connect/connect.cc
storage/connect/connect.h
storage/connect/ha_connect.cc
storage/connect/ha_connect.h
- Histogram::find_bucket() should not walk off the end of the value range.
- Address review feedback in Histogram::point_selectivity(): different handling
for zero-width buckets, and explanations.
MDEV-5839 TokuDB tables not properly cleaned on DROP DATABASE
TokuDB does not support discover_table_names() and writes no files
in the database directory, so automatic filename-based
discover_table_names() doesn't work either. So, it must force .frm
file to disk in ::create()