Commit graph

67784 commits

Author SHA1 Message Date
Daniel Black
7baa40dffa
MDEV-21976: mtr main.udf - broaden localhost (#1543)
Localhost, depending on the platform can return any
127.0.0.1/8 address.
2020-05-18 09:37:51 +03:00
Alexander Barkov
3df297271a MDEV-22579 No error when inserting DEFAULT(non_virtual_column) into a virtual column
The code erroneously allowed both:
INSERT INTO t1 (vcol) VALUES (DEFAULT);
INSERT INTO t1 (vcol) VALUES (DEFAULT(non_virtual_column));

The former is OK, but the latter is not.
Adding a new virtual method in Item:

virtual bool vcol_assignment_allowed_value() const { return false; }

Item_null, Item_param and Item_default_value override it.

Item_default_value overrides it in the way to:
- allow DEFAULT
- disallow DEFAULT(col)
2020-05-15 20:21:54 +04:00
Varun Gupta
efd68f5e31 MDEV-22498: SIGSEGV in Bitmap<64u>::merge on SELECT
For the case when the optimizer does the IN-EXISTS transformation,
the equality condition is injected in the WHERE OR HAVING clause of
the subquery. If the select list of the subquery has a reference to
the parent select make sure to use the reference and not the original
item.
2020-05-14 23:24:10 +05:30
Alexander Barkov
31f34b20f3 MDEV-22502 MDB crashes in CREATE TABLE AS SELECT when the precision of returning type = 0.
TRUNCATE(decimal_5_5) erroneously tried to create a DECIMAL(0,0) column.
Creating a DECIMAL(1,0) column instead.
2020-05-14 11:41:27 +04:00
Alexander Barkov
910c31928e MDEV-22503 MDB limits DECIMAL column precision to 16 doing CTAS with floor/ceil over DECIMAL(X,Y) where X > 16
The DECIMAL data type branch in Item_func_int_val::fix_length_and_dec()
incorrectly used DOUBLE-style length calculation, which resulted in
a smaller data type than the actual result of FLOOR()/CEIL() needs.
2020-05-14 08:40:46 +04:00
Oleksandr Byelkin
23d3d180ca Merge branch '10.1-release' into 10.1 2020-05-11 19:09:46 +02:00
Marko Mäkelä
1887b5ae87 MDEV-22501 Various issues when using --innodb-data-file-size-debug=-1
Let us limit the maximum value of the debug parameter
innodb_data_file_size to 256 MiB. It is only being used
in the test innodb.log_data_file_size, and the size
of the system tablespace should never exceed some 70 MiB
in ./mtr. Thus, 256 MiB should be a reasonable limit.

The fact that negative values that are passed to unsigned parameters
wrap around to the maximum value appears to be a regression due to
commit 18ef02b04d
and has been filed as bug MDEV-22219.
2020-05-08 13:27:57 +03:00
Sergei Golubchik
530da97c65 cleanup: foreign-keys.test vs foreign_key.test 2020-05-08 09:19:44 +02:00
Sergei Golubchik
6b521ac003 MDEV-22180 Planner opens unnecessary tables when updated table is referenced by foreign keys
under LOCK TABLES we still have to open everything, otherwise DML
prelocking will try to take an MDL on a table that wasn't in the
LOCK TABLES list.
2020-05-08 09:19:44 +02:00
Vladislav Vaintroub
8c4b526121 Windows, mtr : Fix "Subroutine HAVE_WIN32_CONSOLE redefined at (eval 25) line 1." 2020-05-07 00:40:48 +02:00
Sergei Golubchik
0fcc3abf4a MDEV-22180 Planner opens unnecessary tables when updated table is referenced by foreign keys
only MDL-prelock but do not open FK child tables for read-only (RESTRICT)
FK actions.

Tables still needs to be opened for CASCADE actions, see 9180e8666b
2020-05-06 20:24:48 +02:00
Sergei Golubchik
10aaa77509 Merge branch '5.5' into 10.1 2020-05-06 20:24:08 +02:00
Anel Husakovic
f7ba675555 MDEV-22344: Fix typos in comments 2020-05-06 18:15:32 +02:00
Marko Mäkelä
f20c63264a MDEV-21462: Actually test for the original bug
We must ensure that the NUL will not terminate the query string.
2020-05-06 13:47:55 +03:00
Marko Mäkelä
459e8619f2 MDEV-21462 main.processlist_notembedded fails to clean up
Replace the 30-second sleep in the test with proper
DEBUG_SYNC interlocking.
2020-05-06 11:51:44 +03:00
Vladislav Vaintroub
1af74d523a postfix after e3f5789ac0 - var/log/stdout.log contains escape sequences. 2020-05-05 12:49:29 +02:00
Elena Stepanova
ccb58b955e List of unstable tests for 10.1.45 release 2020-05-05 01:46:25 +03:00
Rasmus Johansson
95fa7bc89d MDEV-22273 jUnit patch: xml test result differs from MTR output in case if retry 2020-05-04 15:53:04 +00:00
Rasmus Johansson
dc2a858bed MDEV-22270 JUnit patch: test name contains classname 2020-05-04 15:53:04 +00:00
Thirunarayanan Balathandayuthapani
2748c4993c MDEV-19092 Server crash when renaming the column when
FOREIGN_KEY_CHECKS is disabled

- Referenced index can be null While renaming the referenced column name.
In that case, rename the referenced column name in dict_foreign_t and
find the equivalent referenced index.
2020-05-04 14:33:45 +05:30
Oleksandr Byelkin
23c6fb3e62 Merge branch '5.5' into 10.1 2020-04-30 17:36:41 +02:00
Sergei Golubchik
6bb28e0bc5 Bug#29915479 RUNNING COM_REGISTER_SLAVE WITHOUT COM_BINLOG_DUMP CAN RESULTS IN SERVER EXIT
in fact, in MariaDB it cannot, but it can show spurious slaves
in SHOW SLAVE HOSTS.

slave was registered in COM_REGISTER_SLAVE and un-registered after
COM_BINLOG_DUMP. If there was no COM_BINLOG_DUMP, it would never
unregister.
2020-04-30 10:13:18 +02:00
Daniel Black
de8c9b538f
mysql-test-run.pl - fix strict subs in HAVE_WIN32_CONSOLE (#1521)
Fix mtr error:

Bareword "HAVE_WIN32_CONSOLE" not allowed while "strict subs" in use at mysql-test-run.pl line 387.
Execution of mysql-test-run.pl aborted due to compilation errors.

Added in e3f5789ac0
2020-04-30 04:03:24 +02:00
Vladislav Vaintroub
e3f5789ac0 mysql-test-run.pl - show remaining test count and estimated time on Windows
Port this functionality from to Windows.
It requires Win32::Console module, which is already included into
Strawberry perl
2020-04-29 22:39:44 +02:00
Sergei Golubchik
59880df8cd Bug#28388217 - SERVER CAN FAIL WHILE REPLICATING CONDITIONAL COMMENTS
test case
2020-04-29 14:08:54 +02:00
Marko Mäkelä
713e427b2e InnoDB 5.6.48 2020-04-28 16:20:19 +03:00
Marko Mäkelä
7041807476 MDEV-22393 Corruption for SET GLOBAL innodb_ string variables
Several MYSQL_SYSVAR_STR parameters that employ both a validate
function callback fail to copy the string for saving the
validated value. The affected variables include the following:

innodb_ft_aux_table
innodb_ft_server_stopword_table
innodb_ft_user_stopword_table
innodb_buffer_pool_filename

The test case is an enhanced version of
mysql/mysql-server@0b0c30641f
and the code changes are inspired by their fixes.

We are also importing and adjusting the test innodb_fts.stopword
to get coverage for the variable innodb_ft_user_stopword_table.

buf_dump(), buf_load(): Protect srv_buf_dump_filename with
LOCK_global_system_variables.

fts_load_user_stopword(): Minor cleanup

fts_load_stopword(): Remove the parameter global_stopword_table.

innobase_fts_load_stopword(): Protect innodb_server_stopword_table
against concurrent SET GLOBAL.
2020-04-28 16:09:07 +03:00
Marko Mäkelä
d956175d0d XtraDB 5.6.47-87.0
The only change is a change of the version number.
As noted in commit 02af6278fb
there were no changes to InnoDB between MySQL 5.6.46 and 5.6.47
either.
2020-04-27 11:39:46 +03:00
Marko Mäkelä
6be05ceb05 MDEV-22203: WSREP_ON is unnecessarily expensive to evaluate
This is a backport of the applicable part of
commit 93475aff8d and
commit 2c39f69d34
from 10.4.

Before 10.4 and Galera 4, WSREP_ON is a macro that points to
a global Boolean variable, so it is not that expensive to
evaluate, but we will add an unlikely() hint around it.

WSREP_ON_NEW: Remove. This macro was introduced in
commit c863159c32
when reverting WSREP_ON to its previous definition.

We replace some use of WSREP_ON with WSREP(thd), like it was done
in 93475aff8d. Note: the macro
WSREP() in 10.1 is equivalent to WSREP_NNULL() in 10.4.

Item_func_rand::seed_random(): Avoid invoking current_thd
when WSREP is not enabled.
2020-04-27 09:40:51 +03:00
Anel Husakovic
bc1be39972 Fix failure for ipv6 not enabled
In case of ipv6 not enabled tests like `main.ipv6, rpl.rpl_ipv6` failed on
aarch buildbot.
Fix it by following commits 70dcb46e98 and 0bae1957dd for
`10.2`.
2020-04-24 14:05:42 +02:00
Elena Stepanova
5d856760fb MDEV-22349 MTR re-bootstrap modifies environment variable MYSQLD_BOOTSTRAP_CMD 2020-04-23 18:54:36 +03:00
Disconnect3d
280b158501 Fix wrong argument size passed to --parent-pid strncmp check
This PR fixes wrong size argument passed in `strncmp(arg, "--parent-pid", 10)` as the `"--parent-pid"` string has length of 12.

Closes #1502
2020-04-16 13:47:35 +02:00
Daniel Black
ae688808fa mtr: Only old windows patch-2.5.9 needs --binary
Windows GNU patch 2.7.6 is ok without it.

So account for the old buildbot version for now.

Linux works without it.

--binary fails on FreeBSD-12.0:

$ patch --version
patch 2.0-12u11 FreeBSD
$ patch --binary
patch: unrecognized option `--binary'
2020-04-14 16:58:53 +03:00
Marko Mäkelä
26f0cd8afc Merge 5.5 into 10.1 2020-04-14 15:43:12 +03:00
Vicențiu Ciorbaru
0b7a79c6b0 Revert "mtr: remove --binary from patch args"
This reverts commit 1749a68968.

The reason why we need --binary for patch is because of a bug in
patch.exe 2.5.9. We need to supply binary otherwise the patch program
crashes.
2020-04-13 16:25:32 +03:00
Vicențiu Ciorbaru
613bc18a36 sysvars_server_* tests need to have performance schema enabled
Tests will fail otherwise. Backport change from:
867809f23a
2020-04-13 14:22:58 +03:00
Daniel Black
1749a68968 mtr: remove --binary from patch args
This causes problems on FreeBSD which doesn't have a patch
that supports this.

Linux and Windows don't require it either.

Was added in c39877071a without
explaination.
2020-04-13 13:49:39 +03:00
Varun Gupta
c1394ab6b5 MDEV-22191: Range access is not picked when index_merge_sort_union is turned off
When index_merge_sort_union is turned off only ror scans were considered for range
scans, which is wrong.
To fix the problem ensure both ror scans and non ror scans are considered for range
access
2020-04-08 23:47:03 +05:30
Rasmus Johansson
5720db2b43 MDEV-22176 Add JUnit support to MTR to generate XML test result
A new parameter has been added called xml-report, with which the
filename of the XML file is given to which the XML result is
written. There is also xml-package for adding a package value in
the XML output. Example usage:
./mysql-test-run.pl main.events_bugs innodb.count_distinct
main.explain_json innodb.file_format_defaults json.json_no_table
--suite=main,innodb,json --force --xml-report=build123456789.xml
--xml-package=simpletestrun
2020-04-07 09:27:51 +00:00
Marko Mäkelä
f813131c7b Merge 5.5 into 10.1 2020-04-01 10:24:36 +03:00
Oleksandr Byelkin
f9639c2d1a MDEV-22037: Add ability to skip content of some tables (work around for MDEV-20939)
--ignore-table-data parameter added.
2020-03-25 16:03:22 +01:00
Thirunarayanan Balathandayuthapani
1f7be88141 MDEV-19092 Server crash when renaming the column when
FOREIGN_KEY_CHECKS is disabled

- dict_foreign_find_index() can return NULL if InnoDB already dropped
the foreign index when FOREIGN_KEY_CHECKS is disabled.
2020-03-25 17:10:36 +05:30
Alexander Barkov
328edf8560 MDEV-21977 main.func_math fails due to undefined behaviour
The problem happened in these line:

uval0= (ulonglong) (val0_negative ? -val0 : val0);
uval1= (ulonglong) (val1_negative ? -val1 : val1);

return check_integer_overflow(val0_negative ? -(longlong) res : res,
                              !val0_negative);

when unary minus was performed on -9223372036854775808.
This behavior is undefined in C/C++.
2020-03-20 15:24:06 +04:00
Igor Babaev
407b0a6ae7 MDEV-10466 Server crashed in SEL_ARG::store_min() with extended_keys=on
This bug could manifest itself in a very rare cases when the optimizer
chose an execution plan by which a joined table was accessed by a table
scan and the optimizer was checking whether ranges checked for each record
could improve this plan. In such cases the optimizer evaluates range
conditions over a table that depend on other tables. For such conditions
the constructed SEL_ARG trees are marked as MAYBE_KEY. If a SEL_ARG object
constructed for a sargable condition marked as RANGE_KEY had the same
first key part as a MAYBE_KEY SEL_ARG object and the key_and() function
was called for this pair of SEL_ARG objects then an invalid SEL_ARG
object could be constructed that ultimately could lead to a crash before
the execution phase.
2020-03-14 19:58:57 -07:00
Sergei Golubchik
5c1ed707a3 mtr: update heuristics for --parallel=auto
to work better for CPUs with more than 2000 bogomips.
old behavior is preserved if less than 2500 bogomips.
2020-03-14 12:38:26 +01:00
Igor Babaev
5af12e4635 MDEV-21932 A fast plan with ROR index-merge is ignored when
'index_merge_sort_union=off'

When index_merge_sort_union is set to 'off' and  index_merge_union is set
to 'on' then any evaluated index merge scan must consist only of ROR scans.
The cheapest out of such index merges must be chosen. This index merge
might not be the cheapest index merge.
2020-03-13 09:11:01 -07:00
Marko Mäkelä
1c40cb6877 Do not bother to disable non-existing tests 2020-03-10 13:27:05 +02:00
Vicențiu Ciorbaru
395f23a10d Remove unneded extra context line from test file to make it version independent 2020-02-28 19:54:08 +02:00
Anel Husakovic
b9689712e0 MDEV-21374: When "--help --verbose" prints out configuration file paths, the --defaults-file option is not considered
* `--defaults-file` option is showed only in `--help --verbose` if
applied
* `--default-extra-file` is showing correctly now in `--help --verbose`,
previously it was treated as a directory with appended `my.cnf`
2020-02-22 22:46:58 +01:00
Thirunarayanan Balathandayuthapani
80da232576 MDEV-21563 FTS thread aborts during shutdown
- Added the test case in innodb_fts suite
- Updated copyright year in row0mysql.cc
2020-02-07 15:22:23 +05:30