Commit graph

100 commits

Author SHA1 Message Date
Alexander Barkov
57f5c319af MDEV-21445 Strange/inconsistent behavior of IN condition when mixing numbers and strings 2022-07-06 15:42:21 +04:00
Sergei Golubchik
6f741eb6e4 Merge branch '10.2' into 10.3 2022-05-07 11:48:15 +02:00
Marko Mäkelä
20ae4816bb MDEV-28478: INSERT into SPATIAL INDEX in TEMPORARY table writes log
row_ins_sec_index_entry_low(): If a separate mini-transaction is
needed to adjust the minimum bounding rectangle (MBR) in the parent
page, we must disable redo logging if the table is a temporary table.
For temporary tables, no log is supposed to be written, because
the temporary tablespace will be reinitialized on server restart.

rtr_update_mbr_field(): Plug a memory leak.
2022-05-06 09:30:17 +03:00
Marko Mäkelä
e928fdbff1 Merge 10.2 into 10.3 2022-02-14 08:49:11 +02:00
Marko Mäkelä
1a7573d5a5 Disable innodb_gis.rtree_compress2 2022-02-11 12:58:42 +02:00
Oleksandr Byelkin
41a163ac5c Merge branch '10.2' into 10.3 2022-01-29 15:41:05 +01:00
Thirunarayanan Balathandayuthapani
474c6df804 MDEV-27417 InnoDB spatial index updates change buffer bitmap page
- InnoDB change buffer doesn't support spatial index. Spatial
index should avoid change the buffer bitmap page when the page
split happens.
2022-01-20 12:50:47 +02:00
Marko Mäkelä
687417e5c5 Merge 10.2 into 10.3 2021-08-23 16:51:16 +03:00
Marko Mäkelä
1f1d5606e0 Disable 2 commonly failing innodb_gis tests 2021-08-23 15:14:54 +03:00
Marko Mäkelä
cd65845a0e Merge 10.2 into 10.3
MDEV-18734 FIXME: vcol.partition triggers ASAN heap-use-after-free
2021-08-18 12:26:58 +03:00
Thirunarayanan Balathandayuthapani
89445b64fe MDEV-26131 SEGV in ha_innobase::discard_or_import_tablespace
Import operation without .cfg file fails when there is mismatch of index
between metadata table and .ibd file. Moreover, MDEV-19022 shows
that InnoDB can end up with index tree where non-leaf page has only
one child page. So it is unsafe to find the secondary index root page.

This patch does the following when importing the table without .cfg file:

1) If the metadata contains more than one index then InnoDB stops
the import operation and report the user to drop all secondary
indexes before doing import operation.

2) When the metadata contain only clustered index then InnoDB finds the
index id by reading page 0 & page 3 instead of traversing the
whole tablespace.
2021-08-16 15:32:07 +05:30
Marko Mäkelä
950a220060 Merge 10.2 into 10.3 2021-06-01 08:40:59 +03:00
Thirunarayanan Balathandayuthapani
c11c5f36d8 MDEV-25758 InnoDB spatial indexes miss large geometry fields after MDEV-25459
InnoDB should calculate the MBR for the first field of
spatial index and do the comparison with the clustered
index field MBR. Due to MDEV-25459 refactoring, InnoDB
calculate the length of the first field and fails with
too long column error.
2021-05-27 15:01:19 +05:30
Marko Mäkelä
d6d3d9ae2f Merge 10.2 into 10.3 2021-03-31 08:01:03 +03:00
Anel Husakovic
6769d1a078 MDEV-13467: Feature request: Support for ST_Distance_Sphere()
- Cherry-pick 51e48b9f89 - vscode gitignore
- Thanks Robin Dupret for the review.

Reviewed by:daniel@mariadb.org
            holyfoot@mariadb.com
2021-03-27 10:42:39 +01:00
Sergei Golubchik
0ab1e3914c Merge branch '10.2' into 10.3 2021-02-22 22:42:27 +01:00
Marko Mäkelä
739abf5195 Make innodb_gis.rtree_purge run faster
A locking SELECT from an InnoDB table is very slow especially
in debug builds. Replacing some INSERT...SELECT should not reduce
the test coverage, because the test will still do DELETE
(which will acquire explicit record locks).
2021-02-07 14:31:48 +02:00
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
Marko Mäkelä
bc43bf3e43 Merge 10.2 into 10.3 2020-01-20 08:41:52 +02:00
Marko Mäkelä
ceffabc421 Enable tests for --embedded 2020-01-20 08:41:13 +02: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
Alice Sherepa
b7fb30e930 MDEV-21360 global debug_dbug pre-test value restoration issues 2020-01-15 18:06:24 +01:00
Alexander Barkov
7e08ac0b41 Merge 10.2 (up to commit ef00ac4c86) into 10.3 2019-09-04 10:19:58 +04:00
Monty
a071e0e029 Merge branch '10.2' into 10.3 2019-09-03 13:17:32 +03:00
Monty
0d66358220 Disabled test in 32bit that uses too much memory or cpu 2019-09-02 17:18:04 +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