Commit graph

188233 commits

Author SHA1 Message Date
Vladislav Vaintroub
8d3795f173 MDEV-22487 WolfSSL - server prints "Please supply a buffer for error string"
Supplied buffer for error string, on WolfSSL's request.
2020-05-07 00:53:16 +02:00
Marko Mäkelä
2c3c851d2c Merge 10.3 into 10.4 2020-05-05 20:33:10 +03:00
Marko Mäkelä
474290540a MDEV-22465: DROP indexed COLUMN is wrongly claimed to be ALGORITHM=INSTANT
ha_innobase::check_if_supported_inplace_alter(): Do not allow
ALGORITHM=INSTANT for operations that avoid a table rebuild
but involve dropping (or creating) secondary indexes.
2020-05-05 20:32:14 +03:00
Kentoku SHIBA
69925c0d2e MDEV-20502 Queries against spider tables return wrong values for columns following constant declarations.
Add test cases.
2020-05-05 22:43:45 +09:00
Jan Lindström
37a01aceca MDEV-21489 : wsrep_cluster_conf_id has wrong value
Do not show exact value as it depends order of test execution.
Instead use # for correct values and ERROR for incorrect.
2020-05-05 09:48:03 +03:00
Marko Mäkelä
1ed98782e7 MDEV-22452: Fix cmake -DWITH_WSREP=OFF
commit 5e7e7153b4 accidentally
broke the build without WSREP, by misplacing an #endif.
2020-05-04 22:06:31 +03:00
Marko Mäkelä
8648b9bed8 Merge 10.2 into 10.3 2020-05-04 22:06:00 +03:00
Marko Mäkelä
1cccd3c7cc MDEV-7962: Fix cmake WITH_WSREP=OFF
commit d467bb7e5e accidentally
broke the build without WSREP, by misplacing an #endif.
2020-05-04 22:01:26 +03:00
Marko Mäkelä
3f65ce5781 Merge 10.1 into 10.2 2020-05-04 19:00:21 +03:00
Marko Mäkelä
d467bb7e5e MDEV-7962 post-push fixes
This is a partial backport of
commit 5e7e7153b4 from 10.4.

assert_trx_is_free(): Assert !is_wsrep().

trx_init(): Do not initialize trx->wsrep, because it must have been
initialized already.

trx_commit_in_memory(): Invoke wsrep_commit_ordered(). This call
was being skipped, because the transaction object had already been
freed to the pool.

trx_rollback_for_mysql(), innobase_commit_low(),
innobase_rollback_trx(): Always reset trx->wsrep.
2020-05-04 18:57:55 +03:00
Marko Mäkelä
5a270e6acc Add missing have_debug.inc 2020-05-04 18:49:48 +03:00
Marko Mäkelä
50f3a38e89 Add an end marker to a test 2020-05-04 18:31:30 +03:00
Marko Mäkelä
5e7e7153b4 MDEV-22452: Missing call to wsrep_commit_ordered in trx_t::commit()
This is a follow-up fix to the changes that were made in MDEV-7962.

assert_trx_is_free(): Assert !is_wsrep().

trx_init(): Do not initialize trx->wsrep, because it must have been
initialized already.

trx_t::commit_in_memory(): Invoke wsrep_commit_ordered(). This call
was being skipped, because the transaction object had already been
freed to the pool.

trx_rollback_for_mysql(), innobase_commit_low(),
innobase_close_connection(): Always reset trx->wsrep.
2020-05-04 18:31:30 +03:00
mkaruza
f5cff8980a
MDEV-22453: Missing suite.pm for galera_3nodes_sr (#1522) 2020-05-04 18:21:46 +03:00
Oleksandr Byelkin
7fb73ed143 Merge branch '10.2' into 10.3 2020-05-04 16:47:11 +02:00
Thirunarayanan Balathandayuthapani
a1eb151327 MDEV-22410 Change the error when table schema mismatch happens
- InnoDB gives "table is marked as crashed and should be repaired" when
table schema mismatch.
2020-05-04 19:11:39 +05:30
Thirunarayanan Balathandayuthapani
42bba9782b MDEV-22446 InnoDB aborts while adding instant column for discarded tablespace
- Instant alter should change the metadata alone when table is
discarded. It shouldn't try to add metadata record in clustered index.
Also make the clustered index to non-instant format.
2020-05-04 16:23:34 +05:30
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
Jan Lindström
d002ec2c87 MDEV-21489 : wsrep_cluster_conf_id has wrong value
Variable was not updated after initialization.
2020-05-04 11:06:40 +03:00
Oleksandr Byelkin
5008fc709b New Connector C 2020-05-04 10:00:07 +02:00
Thirunarayanan Balathandayuthapani
ec9908b257 MDEV-16288 ALTER TABLE…ALGORITHM=DEFAULT does not override alter_algorithm
- ALTER_ALGORITHM should be substituted when there is no mention of
algorithm in alter statement.
- Introduced algorithm(thd) in Alter_info. It returns the
user requested algorithm. If user doesn't specify algorithm explicitly then
it returns alter_algorithm variable.
- changed algorithm() to get_algorithm(thd) to return algorithm name for
displaying the error.
- set_requested_algorithm(algo_value) to avoid direct assignment on
requested_algorithm variable.
- Avoid direct access of requested_algorithm to encapsulate
requested_algorithm variable
2020-05-04 09:35:38 +05:30
Thirunarayanan Balathandayuthapani
f98017bb6d MDEV-16288 ALTER TABLE…ALGORITHM=DEFAULT does not override alter_algorithm
- Added the test case to prove that alter_algorithm variable doesn't
affect when ALTER statement during PREPARE PHASE or CREATE PROCEDURE.
Only when execution/call happens, alter uses the alter_algorithm
variable when user does not mention algorithm explicitly
2020-05-04 09:35:38 +05:30
Oleksandr Byelkin
79c29296ce Merge 'connect/10.2' into 10.2 2020-05-02 09:47:02 +02:00
Oleksandr Byelkin
ca091e6372 Merge branch '10.1' into 10.2 2020-05-02 08:44:17 +02:00
Varun Gupta
644d9f38b9 MDEV-21480: Unique key using ref access though eq_ref access can be used
For a unique key if all the keyparts are NOT NULL or the predicates involving
the keyparts is NULL rejecting, then we can use EQ_REF access instead of ref
access with the unique key
2020-05-01 15:17:10 +05:30
Oleksandr Byelkin
d233fd14a3 Merge branch 'merge-pcre' into 10.1 2020-04-30 21:27:32 +02:00
Oleksandr Byelkin
4fc8961d49 Merge remote-tracking branch 'connect/10.1' into 10.1 2020-04-30 18:57:45 +02:00
Oleksandr Byelkin
da1fbcb665 Merge branch 'merge-tokudb-5.6' into 10.1 2020-04-30 18:56:55 +02:00
Oleksandr Byelkin
c1291d7a6b 8.44 2020-04-30 18:40:02 +02:00
Oleksandr Byelkin
15db581ecb 5.6.47-87.0 2020-04-30 18:29:36 +02:00
Oleksandr Byelkin
23c6fb3e62 Merge branch '5.5' into 10.1 2020-04-30 17:36:41 +02:00
Eugene Kosov
7f9dc0d84a split log_t::buf into two buffers
Maybe this patch will help catch problems like buffer overflow.

log_t::first_in_use: removed

log_t::buf: this is where mtr_t are supposed to append data
log_t::flush_buf: this is from server writes to a file

Those two buffers are std::swap()ped when some thread is gonna write
to a file
2020-04-30 11:56:16 +03:00
Sergei Golubchik
6a31aea5a1 BUG#30301356 - SOME EVENTS ARE DELAYED AFTER DROPPING EVENT
queues.c cleanup and refactoring.

Restore old version of _downhead() (from before cd483c5520)
that works well in an average case. Use it for queue_fix().

Move existing specialized version of _downhead() to queue_replace()
where it'll be handling the case it was specifically optimized for
(moving the element to the end of the queue).
And correct it to fix the heap not only down, but also up
(this fixes BUG#30301356).

Add unit tests.

Collateral cosmetic fixes.
2020-04-30 10:13:21 +02:00
Sergei Golubchik
69bd73173d correct off-by-one error in CONCAT
CONCAT_WS didn't have it
2020-04-30 10:13:21 +02:00
Anushree Prakash B
e8e67bd4a4 Bug#30689251 - BACKPORT TO MYSQL-5.6, BUG#29597896 - NULL POINTER DEREFERENCE IN LIBMYSQL
DESCRIPTION:
============
There can be issues if the packets sent by the server
are not proper. Certain checks should be performed at the
client side while unpacking fields data.

FIX:
====
Check for the appropriate fields data and error out if it
is not present.

RB: 23601
2020-04-30 10:13:21 +02:00
Sivert Sorumgard
39c60116e8 Bug#30628268: OUT OF MEMORY CRASH
The event scheduler has a THD which is used for e.g. keeping track
of the timing of the events. Thus, each scheduling of an event will
make use of this THD, which in turn allocates memory in the THD's
mem root. However, the mem root was never cleared, and hence, the
memory occupied would monotonically increase throughout the life
time of the server.

The root cause was found by Jon Olav Hauglid, and this fix clears the
THD's mem root for each event being scheduled.

Change-Id: I462d2b9fd9658c9f33ab5080f7cd0e0ea28382df
2020-04-30 10:13:21 +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
9b744ea0d3 MDEV-22419 update windows timezone data from using newest ICU source
Also fix the link to unicode.org repo, it is now on github.
2020-04-30 01:21:44 +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
Eugene Kosov
28325b0863 add WITH_DBUG_TRACE CMake variable
This is a way do disable DBUG_ENTER()/DBUG_EXIT() stuff which is
needed to dbug trace. Those who doesn't need it may avoid tests
slowdown with -DWITH_DBUG_TRACE=OFF

dbug/tests.c: add define which is neede always in this test

innodb.log_file_name_debug.test: do not depend on DBUG trace stuff
in test

Benchmark results: each test eats less CPU and you can have more
parallel jobs in MTR.

patched:
./mtr -mem -par=8 -suite=innodb  185.34s user 86.85s system 133% cpu 3:23.27 total
./mtr -mem -par=8 -suite=main    80.96s  user 36.01s system 182% cpu 1:04.07 total

main.select                              [ pass ]   1660
main.select                              [ pass ]   1513
main.select                              [ pass ]   1543
main.select                              [ pass ]   1660
main.select                              [ pass ]   1521
main.select                              [ pass ]   1511
main.select                              [ pass ]   1508
main.select                              [ pass ]   1520
main.select                              [ pass ]   1514
main.select                              [ pass ]   1522

vanilla:
./mtr -mem -par=8 -suite=innodb  203.61s user 92.16s system 140% cpu 3:30.16 total
./mtr -mem -par=8 -suite=main    94.11s  user 35.51s system 206% cpu 1:02.69 total

main.select                              [ pass ]   2032
main.select                              [ pass ]   2017
main.select                              [ pass ]   2040
main.select                              [ pass ]   2183
main.select                              [ pass ]   2253
main.select                              [ pass ]   2075
main.select                              [ pass ]   2109
main.select                              [ pass ]   2080
main.select                              [ pass ]   2098
main.select                              [ pass ]   2114
2020-04-29 20:13:14 +03:00
Sergei Golubchik
8c534bdeb8 cleanup: remove dbug keywords that are never used 2020-04-29 18:17:08 +02:00
Varun Gupta
7f03a93348 MDEV-22160: SIGSEGV in st_join_table::save_explain_data on SELECT
Adding a test case for rowid filter, the crash was fixed by MDEV-22191
2020-04-29 20:22:18 +05:30
Jan Lindström
7a546650fa MDEV-20916: Galera test failure on galera.galera_parallel_autoinc_largetrx: Result content mismatch
Add wait_condition to make sure that node contains all the rows
expected.
2020-04-29 17:04:10 +03:00
Sergei Petrunia
7bc6735736 MDEV-22401: Optimizer trace: multi-component range is not printed correctly
KEY_MULTI_RANGE::range_flag does not have correct flag bits for
per-endpoint flags (NEAR_MIN, NEAR_MAX, NO_MIN_RANGE, NO_MAX_RANGE).
It only has bits for flags that describe both endpoints.
So
- Document this.
- Switch optimizer trace to using {start|end}_key.flag values, instead.
  This fixes the bug.
- Switch records_in_column_ranges() to doing that too. (This used to
  work, because KEY_MULTI_RANGE::range_flag had correct flag value
  for the last key component, and EITS only uses one-component
  pseudo-indexes)
2020-04-29 16:31:16 +03:00
Sergei Golubchik
59880df8cd Bug#28388217 - SERVER CAN FAIL WHILE REPLICATING CONDITIONAL COMMENTS
test case
2020-04-29 14:08:54 +02:00
Maheedhar PV
4d1de554bb Bug#28388217 - SERVER CAN FAIL WHILE REPLICATING CONDITIONAL COMMENTS
Cause:
In case of version based condtional comments, if the condition evaluates
to false, it is converted to a regular comment for replication by
replacing "!"  by " ".

Nested comment in a conditional comment is replicated as is. Nested
comments are supported only in case of conditional comments and when a
the comment on slave is no more a conditional comment, the statement
execution fails on the slave.

Fix:
Convert the nested comment, start from "/*" to "(*" and comment end from
"*/" to "*)" for replication.

Change-Id: I1a8e385a267b2370529eade094f0258fa96886c0
2020-04-29 14:08:54 +02:00
Sergei Golubchik
a13157a561 don't enable -Werror in ft-index 2020-04-29 14:08:54 +02:00
Marko Mäkelä
5ba2aa1ddc MDEV-7962: Remove one more wsrep_on()
trx_rollback_to_savepoint(): Invoke trx_t::is_wsrep().
2020-04-29 14:54:36 +03:00
Daniel Black
ba2061da52 MDEV-21595: innodb offset_t rename to rec_offs
thanks to:

perl -i -pe 's/\boffset_t\b/rec_offs/g' $(git grep -lw offset_t storage/innobase)
2020-04-29 12:02:47 +03:00