Commit graph

75 commits

Author SHA1 Message Date
Marko Mäkelä
1fbdcada73 Merge 10.2 into 10.3 2020-04-28 22:29:13 +03:00
Marko Mäkelä
5a1d931529 Speed up innodb_gis.rtree_split
INSERT...SELECT reading from an InnoDB table is slow due to
creating explicit record locks. Use the sequence engine instead.

Also, remove the space before rtr_page_need_second_split
to actually make the debug injection work.
2020-04-28 19:37:07 +03:00
Marko Mäkelä
84db10f27b Merge 10.2 into 10.3 2020-04-15 09:56:03 +03:00
Oleksandr Byelkin
cb4da5da74 MDEV-20604: Duplicate key value is silently truncated to 64 characters in print_keydup_error
Added indication of truncated string for "s" and "M" formats
2020-04-01 11:34:32 +02:00
Marko Mäkelä
44298e4dea Merge 10.2 into 10.3
Also, clean up the test innodb_gis.geometry a little further.
2020-03-20 18:12:17 +02:00
Marko Mäkelä
e28b4b68d3 MDEV-14057: Fix some tests 2020-03-19 06:58:49 +02:00
Alexey Botchkov
a0ce62f804 MDEV-14057 InnoDB GIS tests fail.
Tests fixed.
MBR::Within() function fixed.
2020-03-18 13:55:21 +04:00
Alexey Botchkov
e64a3df4dc MDEV-21959 GIS error message doesn't show the wrong value, just the type.
Error message now shows the whole value.
2020-03-17 13:11:46 +04:00
Sergei Petrunia
e709eb9bf7 Merge branch '10.2' into 10.3
# Conflicts:
#	mysql-test/suite/galera/r/MW-388.result
#	mysql-test/suite/galera/t/MW-388.test
#	mysql-test/suite/innodb/r/truncate_inject.result
#	mysql-test/suite/innodb/t/truncate_inject.test
#	mysql-test/suite/rpl/r/rpl_stop_slave.result
#	mysql-test/suite/rpl/t/rpl_stop_slave.test
#	sql/sp_head.cc
#	sql/sp_head.h
#	sql/sql_lex.cc
#	sql/sql_yacc.yy
#	storage/xtradb/buf/buf0dblwr.cc
2020-01-17 00:46:40 +03:00
Alice Sherepa
60d7011c5f MDEV-21360 global debug_dbug pre-test value restoration issues 2020-01-15 18:06:24 +01:00
Monty
a071e0e029 Merge branch '10.2' into 10.3 2019-09-03 13:17:32 +03:00
Monty
9cba6c5aa3 Updated mtr files to support different compiled in options
This allows one to run the test suite even if any of the following
options are changed:
- character-set-server
- collation-server
- join-cache-level
- log-basename
- max-allowed-packet
- optimizer-switch
- query-cache-size and query-cache-type
- skip-name-resolve
- table-definition-cache
- table-open-cache
- Some innodb options
etc

Changes:
- Don't print out the value of system variables as one can't depend on
  them to being constants.
- Don't set global variables to 'default' as the default may not
  be the same as the test was started with if there was an additional
  option file. Instead save original value and reset it at end of test.
- Test that depends on the latin1 character set should include
  default_charset.inc or set the character set to latin1
- Test that depends on the original optimizer switch, should include
  default_optimizer_switch.inc
- Test that depends on the value of a specific system variable should
  set it in the test (like optimizer_use_condition_selectivity)
- Split subselect3.test into subselect3.test and subselect3.inc to
  make it easier to set and reset system variables.
- Added .opt files for test that required specfic options that could
  be changed by external configuration files.
- Fixed result files in rockdsb & tokudb that had not been updated for
  a while.
2019-09-01 19:17:35 +03:00
Marko Mäkelä
32ec5fb979 Merge 10.2 into 10.3 2019-08-21 15:23:45 +03:00
Marko Mäkelä
e279c0076d MDEV-17187: Code cleanup
fkerr_t: Errors for the foreign key checks. Replaces ulint,
which used #define that looked like dberr_t literals.

wsrep_dict_foreign_find_index(): Remove. Use
dict_foreign_find_index() instead, with default parameters.

dict_foreign_push_index_error(): Do not add redundant quotes
around quoted table names.
2019-08-21 11:38:33 +03:00
Alexey Botchkov
c6efbc543d MDEV-17544 No warning when trying to name a primary key constraint.
Warning added.
2019-07-30 21:57:48 +04:00
Marko Mäkelä
3d56adbfac Merge 10.2 into 10.3 2019-05-16 14:24:29 +03:00
Marko Mäkelä
796486d19b MDEV-19485: Add a test case
The bug was introduced in MariaDB 10.4.0 by
commit 0e5a4ac253
but it is good to have a regression test for this scenario
in all applicable MariaDB versions.

Cover the purge of an undo log record that was written before
the completion of ADD SPATIAL INDEX.
2019-05-16 14:17:22 +03:00
Oleksandr Byelkin
31d6e9c3c8 Fix of error messages with big help of serg 2019-02-12 10:48:19 +01:00
Marko Mäkelä
0cdcb5f083 Re-record some results 2019-02-11 12:38:43 +02:00
Oleksandr Byelkin
65c5ef9b49 dirty merge 2019-02-07 13:59:31 +01:00
Sergei Golubchik
676f43da3a cleanup: don't ---replace_regex /#sql-.*/#sql-temporary/
no longer needed
2019-02-05 01:34:17 +01:00
Marko Mäkelä
45531949ae Merge 10.2 into 10.3 2018-12-18 09:15:41 +02:00
Alexey Botchkov
c4ab352b67 MDEV-14576 Include full name of object in message about incorrect value for column.
The error message modified.
Then the TABLE_SHARE::error_table_name() implementation taken from 10.3,
          to be used as a name of the table in this message.
2018-12-16 02:21:41 +04:00
Marko Mäkelä
df563e0c03 Merge 10.2 into 10.3
main.derived_cond_pushdown: Move all 10.3 tests to the end,
trim trailing white space, and add an "End of 10.3 tests" marker.
Add --sorted_result to tests where the ordering is not deterministic.

main.win_percentile: Add --sorted_result to tests where the
ordering is no longer deterministic.
2018-11-06 09:40:39 +02:00
Marko Mäkelä
8c9c583aff Remove a deprecation warning 2018-10-25 15:31:13 +03:00
Marko Mäkelä
05459706f2 Merge 10.2 into 10.3 2018-08-03 15:57:23 +03:00
Marko Mäkelä
de469a2f29 MDEV-14637: Fix hang due to persistent statistics
Similar to the tables SYS_FOREIGN and SYS_FOREIGN_COLS,
the tables mysql.innodb_table_stats and mysql.innodb_index_stats
are updated by the InnoDB internal SQL parser, which fails to
enforce the size limits of the data. Due to this, it is possible
for InnoDB to hang when there are persistent statistics defined on
partitioned tables where the total length of table name,
partition name and subpartition name exceeds the incorrectly
defined limit VARCHAR(64). That column should have been defined
as VARCHAR(199).

btr_node_ptr_max_size(): Interpret the VARCHAR(64) as VARCHAR(199),
to prevent a hang in the case that the upgrade script has not been
run.

dict_table_schema_check(): Ignore difference in the length of the
table_name column.

ha_innobase::max_supported_key_length(): For innodb_page_size=4k,
return a larger value so that the table mysql.innodb_index_stats
can be created. This could allow "impossible" tables to be created,
such that it is not possible to insert anything into a secondary
index when both the secondary key and the primary key are long,
but this is the easiest and most consistent way. The Oracle fix
would only ignore the maximum length violation for the two
statistics tables.

os_file_get_status_posix(), os_file_get_status_win32(): Handle
ENAMETOOLONG as well.

This patch is based on the following change in MySQL 5.7.23.
Not all changes were applied, and our variant allows persistent
statistics to work without hangs even if the table definitions
were not upgraded.

From fdbdce701ab8145ae234c9d401109dff4e4106cb Mon Sep 17 00:00:00 2001
From: Aditya A <aditya.a@oracle.com>
Date: Thu, 17 May 2018 16:11:43 +0530
Subject: [PATCH] Bug #26390736 THE FIELD TABLE_NAME (VARCHAR(64)) FROM
           MYSQL.INNODB_TABLE_STATS CAN OVERFLOW.

    In mysql.innodb_index_stats and mysql.innodb_table_stats
    tables the table name column didn't take into consideration
    partition names which can be more than varchar(64).
2018-08-03 08:33:38 +03:00
Marko Mäkelä
c6ba758d1d Merge 10.2 into 10.3 2018-04-23 09:49:58 +03:00
Marko Mäkelä
469a4b02ce Fix an intermittent test failure 2018-04-21 20:59:26 +03:00
Marko Mäkelä
b006d2ead4 Merge bb-10.2-ext into 10.3 2018-02-15 10:22:03 +02:00
Alexander Barkov
3cad31f2a7 Merge remote-tracking branch 'origin/10.2' into bb-10.2-ext 2018-02-08 19:06:25 +04:00
Marko Mäkelä
1789e0ff03 Remove useless debug instrumentation row_print_geometry_data 2018-02-07 10:39:12 +02:00
Monty
b9b17e6340 Updated error message for wrong foreign key constraint 2018-01-30 21:33:56 +02:00
Marko Mäkelä
33714d2065 Merge bb-10.2-ext into 10.3 2018-01-30 21:04:48 +02:00
Marko Mäkelä
6d390bab4a Merge 10.2 into bb-10.2-ext 2018-01-30 20:18:25 +02:00
Marko Mäkelä
5010ab26de MDEV-14209 innodb_gis.rtree_debug produces huge server error logs
Do not SET DEBUG_DBUG=-d,... in tests. To disable debug instrumentation,
save and restore the original value of the variable DEBUG_DBUG.
Assigning -d,... will enable the output of a lot of unrelated DBUG
messages to the server error log.
2018-01-29 23:02:12 +02:00
Marko Mäkelä
fa7d85bb87 Merge bb-10.2-ext into 10.3 2018-01-05 22:52:06 +02:00
Monty
e9a2082634 Merge remote-tracking branch 'origin/10.2' into bb-10.2-ext
Conflicts:
	mysql-test/r/cte_nonrecursive.result
	mysql-test/suite/galera/r/galera_bf_abort.result
	mysql-test/suite/galera/r/galera_bf_abort_get_lock.result
	mysql-test/suite/galera/r/galera_bf_abort_sleep.result
	mysql-test/suite/galera/r/galera_enum.result
	mysql-test/suite/galera/r/galera_fk_conflict.result
	mysql-test/suite/galera/r/galera_insert_multi.result
	mysql-test/suite/galera/r/galera_many_indexes.result
	mysql-test/suite/galera/r/galera_mdl_race.result
	mysql-test/suite/galera/r/galera_nopk_bit.result
	mysql-test/suite/galera/r/galera_nopk_blob.result
	mysql-test/suite/galera/r/galera_nopk_large_varchar.result
	mysql-test/suite/galera/r/galera_nopk_unicode.result
	mysql-test/suite/galera/r/galera_pk_bigint_signed.result
	mysql-test/suite/galera/r/galera_pk_bigint_unsigned.result
	mysql-test/suite/galera/r/galera_serializable.result
	mysql-test/suite/galera/r/galera_toi_drop_database.result
	mysql-test/suite/galera/r/galera_toi_lock_exclusive.result
	mysql-test/suite/galera/r/galera_toi_truncate.result
	mysql-test/suite/galera/r/galera_unicode_pk.result
	mysql-test/suite/galera/r/galera_var_auto_inc_control_off.result
	mysql-test/suite/galera/r/galera_wsrep_log_conficts.result
	sql/field.cc
	sql/rpl_gtid.cc
	sql/share/errmsg-utf8.txt
	sql/sql_acl.cc
	sql/sql_parse.cc
	sql/sql_partition_admin.cc
	sql/sql_prepare.cc
	sql/sql_repl.cc
	sql/sql_table.cc
	sql/sql_yacc.yy
2018-01-05 16:52:40 +02:00
Marko Mäkelä
9c9db1cbe2 MDEV-14059 Work around a problem exposed by InnoDB GIS debug check
row_sel_get_clust_rec_for_mysql(): Look up the page from the
buffer pool, similar to how MySQL 5.7 does it.
2018-01-05 12:10:16 +02:00
Marko Mäkelä
8dc77a72ea MDEV-14057 InnoDB GIS tests fail
Fix and enable some of the tests; some remain disabled.

The tests innodb_gis.rtree_old and innodb_gis.row_format
duplicated some versions of the test main.gis-rtree.
Instead of duplicating, source that test, in a new test
innodb_gis.innodb_gis_rtree.

Introduce innodb_row_format.combinations. Due to this,
ROW_FORMAT=COMPRESSED will not be covered in some tests
where it is covered in MySQL 5.7.
2018-01-04 19:46:23 +02:00
Marko Mäkelä
218dbf68b8 MDEV-14058 InnoDB Assertion failure !leaf on rem0rec.cc line 566 on test innodb_gis.rtree_recovery
The function rtr_update_mbr_field_in_place() is generating
MLOG_REC_UPDATE_IN_PLACE or MLOG_COMP_REC_UPDATE_IN_PLACE records
on non-leaf pages, even though MLOG_WRITE_STRING would perfectly
suffice for updating a fixed-length data field.

btr_cur_parse_update_in_place(): If flags==7, the record may be
from rtr_update_mbr_field_in_place(), and we must check if the
page is a leaf page. Otherwise, assume that it is.

btr_cur_update_in_place(): Assert that the page is a leaf page.
2018-01-04 19:35:53 +02:00
Marko Mäkelä
866ccc8890 Merge bb-10.2-ext into 10.3 2017-12-14 11:34:30 +02:00
Marko Mäkelä
1b5f0cbd46 Merge 10.2 into bb-10.2-ext 2017-12-14 09:53:19 +02:00
Marko Mäkelä
8063804943 Re-remove the file kill_and_restart_mysqld.inc 2017-12-14 08:40:09 +02:00
Marko Mäkelä
6402ca7870 MDEV-14016 Allow instant ADD COLUMN, ADD INDEX, LOCK=NONE
Ideally, we would move some code from
ha_innobase::prepare_inplace_alter_table() to
ha_innobase::check_if_supported_inplace_alter(),
but the API does not really allow us to return errors; it can
only inform which forms of ALGORITHM and LOCK are allowed.

So, we have to duplicate some logic between the "check" and "prepare"
phases. We do the duplication by calling common functions.

instant_alter_column_possible(): Check if instant column operation
is possible. Invoked from both
ha_innobase::check_if_supported_inplace_alter() and
prepare_inplace_alter_table_dict().

ha_innobase::check_if_supported_inplace_alter(): Before refusing
certain operations if FULLTEXT INDEX exist, check if instant ALTER TABLE
is possible and return early if it is the case.

prepare_inplace_alter_table_dict(): Before checking the limitations
on FULLTEXT INDEX, check if instant ALTER TABLE is possible, and suppress
the checks if it is the case. If instant ADD COLUMN is used when the
table already contains FULLTEXT INDEX, do account for a
hidden FTS_DOC_ID_INDEX in a debug assertion.
2017-11-02 12:08:52 +02:00
Alexander Barkov
835cbbcc7b Merge remote-tracking branch 'origin/bb-10.2-ext' into 10.3
TODO: enable MDEV-13049 optimization for 10.3
2017-10-30 20:47:39 +04:00
Alexander Barkov
003cb2f424 Merge remote-tracking branch 'origin/10.2' into bb-10.2-ext 2017-10-30 16:42:46 +04:00
Jan Lindström
a6a4c25bf7 MariaDB adjustments to innodb_gis tests.
Some test are still disabled as they provide different results,
fail on different error or crash.

Fixes also MDEV-14060 InnoDB: Foreign key constraint to
geometry type does not work where test intentionally tried
incorrect cases.
2017-10-25 06:47:08 +03:00
Jan Lindström
42e3e57426 MDEV-13626: Merge InnoDB test cases from MySQL 5.7
Add missing innodb_gis tests.
2017-10-25 06:47:08 +03:00
Alexander Barkov
30e7d6709f Merge remote-tracking branch 'origin/10.2' into bb-10.2-ext 2017-10-18 14:11:55 +04:00