mariadb/mysql-test/suite/funcs_1
Monty 727491b72a Added test cases for preceding test
This includes all test changes from
"Changing all cost calculation to be given in milliseconds"
and forwards.

Some of the things that caused changes in the result files:

- As part of fixing tests, I added 'echo' to some comments to be able to
  easier find out where things where wrong.
- MATERIALIZED has now a higher cost compared to X than before. Because
  of this some MATERIALIZED types have changed to DEPENDEND SUBQUERY.
  - Some test cases that required MATERIALIZED to repeat a bug was
    changed by adding more rows to force MATERIALIZED to happen.
- 'Filtered' in SHOW EXPLAIN has in many case changed from 100.00 to
  something smaller. This is because now filtered also takes into
  account the smallest possible ref access and filters, even if they
  where not used. Another reason for 'Filtered' being smaller is that
  we now also take into account implicit filtering done for subqueries
  using FIRSTMATCH.
  (main.subselect_no_exists_to_in)
  This is caluculated in best_access_path() and stored in records_out.
- Table orders has changed because more accurate costs.
- 'index' and 'ALL' for small tables has changed to use 'range' or
   'ref' because of optimizer_scan_setup_cost.
- index can be changed to 'range' as 'range' optimizer assumes we don't
  have to read the blocks from disk that range optimizer has already read.
  This can be confusing in the case where there is no obvious where clause
  but instead there is a hidden 'key_column > NULL' added by the optimizer.
  (main.subselect_no_exists_to_in)
- Scan on primary clustered key does not report 'Using Index' anymore
  (It's a table scan, not an index scan).
- For derived tables, the number of rows is now 100 instead of 2,
  which can be seen in EXPLAIN.
- More tests have "Using index for group by" as the cost of this
  optimization is now more correct (lower).
- A primary key could be preferred for a normal key, even if it would
  access more rows, as it's faster to do 1 lokoup and 3 'index_next' on a
  clustered primary key than one lookup trough a secondary.
  (main.stat_tables_innodb)

Notes:

- There was a 4.7% more calls to best_extension_by_limited_search() in
  the main.greedy_optimizer test.  However examining the test results
  it looked that the plans where slightly better (eq_ref where more
  chained together) so I assume this is ok.
- I have verified a few test cases where there was notable/unexpected
  changes in the plan and in all cases the new optimizer plans where
  faster.  (main.greedy_optimizer and some others)
2023-02-03 00:00:35 +03:00
..
bitdata
cursors
datadict MDEV-5215 prerequisite: remove test and test_* database hacks in the test suite 2022-11-01 16:33:00 +01:00
include MDEV-16708: fix in test failures(added --enable_prepared_warnings/--disable_prepared_warnings) 2021-06-17 19:30:24 +02:00
lib mtr: use env for perl 2020-06-23 03:24:46 +02:00
r Added test cases for preceding test 2023-02-03 00:00:35 +03:00
storedproc Updated mtr files to support different compiled in options 2019-09-01 19:17:35 +03:00
t MDEV-5215 prerequisite: remove test and test_* database hacks in the test suite 2022-11-01 16:33:00 +01:00
triggers MDEV-5215 prerequisite: remove test and test_* database hacks in the test suite 2022-11-01 16:33:00 +01:00
views Lintian complains on spelling error 2019-12-02 12:41:13 +02:00
disabled.def
README.txt

2008-02-29 Matthias Leich
=========================

1. The testsuite "funcs_1" is mostly intended for additional (compared
   to the common regression tests stored in mysql-test/t) checks
   of features (VIEWS, INFORMATION_SCHEMA, STORED PROCEDURES,...)
   introduced with MySQL 5.0.

2. There were some extensions of this suite when new information_schema
   views were introduced. But in most cases the tests for these views
   were stored within the regression testsuite (mysql-test/t).

   INFORMATION_SCHEMA views introduced with MySQL 5.1
   ==================================================
   ENGINES       (partially tested here)
   EVENTS        (partially tested here)
   FILES
   GLOBAL_STATUS
   GLOBAL_VARIABLES
   PARTITIONS
   PLUGINS
   PROCESSLIST   (full tested here)
   PROFILING
   REFERENTIAL_CONSTRAINTS
   SESSION_STATUS
   SESSION_VARIABLES

3. Some hints for maintainers of this suite:
   - SHOW TABLES ... LIKE '<pattern>'
     does a case sensitive comparison between the tablename and
     the pattern.
     The names of the tables within the informationschema are in uppercase.
     So please use something like
        SHOW TABLES FOR information_schema LIKE 'TABLES'
     when you intend to get the same non empty result set on OS with and
     without case sensitive filesystems and default configuration.
   - The name of the data dictionary is 'information_schema' (lowercase).
   - Server on OS with filesystem with case sensitive filenames
     (= The files 'abc' and 'Abc' can coexist.)
     + default configuration
     Example of behaviour:
     DROP DATABASE information_schema;
     ERROR 42000: Access denied for user ... to database 'information_schema'
     DROP DATABASE INFORMATION_SCHEMA;
     ERROR 42000: Access denied for user ... to database 'INFORMATION_SCHEMA'
   - Try to unify results by
     --replace_result $engine_type <engine_to_be_tested>
     if we could expect that the results for storage engine variants of a
     test differ only in the engine names.
     This makes future maintenance easier.
   - Avoid the use of include/show_msg*.inc.
     They produce "SQL" noise which annoys during server debugging and can be
     easy replaced by "--echo ...".