Commit graph

11635 commits

Author SHA1 Message Date
Monty
1fe9092d06 Fix privilege checking for sequence
MDEV-13732 User with SELECT privilege can ALTER sequence
2018-02-14 16:43:22 +02:00
Marko Mäkelä
dc09f8f29c Merge 10.2 into bb-10.2-ext 2018-02-14 10:12:53 +02:00
Marko Mäkelä
c6e35276f1 Merge 10.1 into 10.2 2018-02-14 10:01:16 +02:00
Alexey Yurchenko
a33c9a07e5 GAL-506 breaks galera_defaults MTR test by upping repl.proto_max again. Fix this once and for all by overwriting it with constant string since it makes little sense to check for it in this test. 2018-02-14 09:58:18 +02:00
Marko Mäkelä
0c4aeef976 Merge 10.2 into bb-10.2-ext 2018-02-13 16:51:45 +02:00
Marko Mäkelä
a778a62822 Re-record a result; repl.proto_max is 8, not 7 2018-02-13 16:39:51 +02:00
Marko Mäkelä
d9955b22e9 Merge 10.1 into 10.2 2018-02-13 14:49:47 +02:00
Marko Mäkelä
2202afd541 Merge 10.0 into 10.1 2018-02-13 14:32:17 +02:00
Marko Mäkelä
c051eaba46 MDEV-14988 innodb_read_only tries to modify files if transactions were recovered in COMMITTED state
lock_trx_release_locks(): Relax a debug assertion to allow
recovered TRX_STATE_COMMITTED_IN_MEMORY transactions.

trx_commit_in_memory(): Add DEBUG_SYNC instrumentation.

trx_undo_insert_cleanup(): Skip persistent changes if innodb_read_only
is set. This should only happen when a recovered committed transaction
would be cleaned up at shutdown.
2018-02-13 14:29:32 +02:00
Sergei Golubchik
f7621f17bd rename mysql.user and mysql.db column
Truncate_versioning_priv->Delete_history_priv

because the command and the privilege were renamed
2018-02-12 23:43:48 +01:00
Sergei Golubchik
f51ecfee93 MDEV-15146 SQLError[4122]: View is not system versioned
don't expand AS OF in views, and, in particular, don't auto-add
AS OF NOW().
2018-02-12 23:43:48 +01:00
Sergei Golubchik
39157fbf05 Remove ER_NON_VERSIONED_FIELD_IN_HISTORICAL_QUERY 2018-02-12 23:43:47 +01:00
Sergei Golubchik
d0f5e56a20 MDEV-14785 SYSTEM_INVISIBLE behaviour not consistent
Hide INVISIBLE_SYSTEM columns from writes and from fix_vcol_expr().
2018-02-12 23:43:47 +01:00
Monty
54db0be3be Added Max_index_length and Temporary to SHOW TABLE STATUS
- Max_index_length is supported by MyISAM and Aria tables.
- Temporary is a placeholder to signal that a table is a
  temporary table. For the moment this is always "N", except
  "Y" for generated information_schema tables and NULL for
  views. Full temporary table support will be done in another task.
  (No reason to have to update a lot of result files twice in a row)
2018-02-12 17:17:26 +02:00
Monty
19dd14e648 Updated galera .result files 2018-02-12 17:17:26 +02:00
Marko Mäkelä
00f0c039d2 MDEV-15270 Mariabackup should not try to use doublewrite buffer
When Mariabackup gets a bad read of the first page of the system
tablespace file, it would inappropriately try to apply the doublewrite
buffer and write changes back to the data file (to the source file)!
This is very wrong and must be prevented.

The correct action would be to retry reading the system tablespace
as well as any other files whose first page was read incorrectly.
Fixing this was not attempted.

xb_load_tablespaces(): Shorten a bogus message to be more relevant.
The message can be displayed by --backup or --prepare.

xtrabackup_backup_func(), os_file_write_func(): Add a missing space
to a message.

Datafile::restore_from_doublewrite(): Do not even attempt the
operation in Mariabackup.

recv_init_crash_recovery_spaces(): Do not attempt to restore the
doublewrite buffer in Mariabackup (--prepare or --export), because
all pages should have been copied correctly in --backup already,
and because --backup should ignore the doublewrite buffer.

SysTablespace::read_lsn_and_check_flags(): Do not attempt to initialize
the doublewrite buffer in Mariabackup.

innodb_make_page_dirty(): Correct the bounds check.

Datafile::read_first_page(): Correct the name of the parameter.
2018-02-12 16:56:01 +02:00
Sergei Golubchik
4fd48678ae ALTER TABLE ... DROP COLUMN sys_start
update all unique keys, not just PK
2018-02-12 14:14:35 +01:00
Sergei Golubchik
dfd42ed990 ALTER TABLE ... DROP COLUMN sys_start should rename a "dropped" column 2018-02-12 14:14:35 +01:00
Sergei Golubchik
c847089e6e Cannot DROP VERSIONING without dropping all visible AS ROW fields 2018-02-12 13:46:08 +01:00
Sergei Golubchik
f3a49e7020 Don't allow adding AS ROW START column to a not versioned table 2018-02-12 13:46:08 +01:00
Sergei Golubchik
bc0ac28f69 ALTER TABLE ... DROP VERSIONING
don't add columns to the drop list, INVISIBLE_SYSTEM columns
cannot be recognized as specified by the user
2018-02-12 13:46:07 +01:00
Sergei Golubchik
711f3dd7f5 MDEV-13417 UPDATE produces wrong values if an updated column is later used as an update source
replication tests
2018-02-12 13:14:23 +01:00
Jerome Brauge
d943d7f712 MDEV-13417 UPDATE produces wrong values if an updated column is later used as an update source
Standard compatible behavior for UPDATE: all assignments in SET
are executed "simultaneously", not left-to-right. And `SET a=b,b=a`
will swap the values.
2018-02-12 13:14:23 +01:00
Marko Mäkelä
33f70c4d9c MDEV-13869 MariaDB slow start
When code from MySQL 5.7.9 was merged to MariaDB 10.2.2
in commit 2e814d4702
an assignment validate=true was inadvertently added to the function
dict_check_sys_tables().

This causes InnoDB to open every single .ibd file on startup, even
when no crash recovery was needed.

Simply removing the assignment would make some tests fail. We do the
best to retain almost the same level of inconsistency detection.
In the test innodb.table_flags, access to one of the tables will not
be blocked despite inconsistent flags.

dict_check_sys_tables(): Remove the problematic assignment, and skip
validation in normal startup.

dict_load_table_one(): If the .ibd file cannot be opened, mark the
table as corrupted and unreadable.

fil_node_open_file(): Validate FSP_SPACE_FLAGS with the expected
flags. If reading the tablespace fails, invalidate node->handle
instead of letting it remain stale. This bug was caught by a
fil_validate() assertion failure.

fsp_flags_try_adjust(): If the tablespace file is invalid, do nothing.
2018-02-12 14:06:04 +02:00
Alexander Barkov
da99e086f9 Merge remote-tracking branch 'origin/10.2' into bb-10.2-ext 2018-02-12 10:03:28 +04:00
Sergei Golubchik
49bcc82686 Merge branch '10.1' into 10.2 2018-02-11 13:47:16 +01:00
Alexey Botchkov
b88542681b MDEV-14611 ALTER TABLE EXCHANGE PARTITION does not work properly when used with DATA DIRECTORY.
When table is renamed, the InnoDB's dictionary cache didn't
        change the ib_table->data_dir_path accordingly.
        Now it's set to NULL.
2018-02-10 22:17:49 +04:00
Alexander Barkov
a2feeb3d6f After-merge fixes for "sys_vars.sysvars_innodb '32bit,xtradb'" test results. 2018-02-10 21:51:24 +04:00
Alexander Barkov
e07451f71f Merge remote-tracking branch 'origin/10.0' into 10.1 2018-02-10 00:06:10 +04:00
Marko Mäkelä
5559905d41 Merge 10.2 into bb-10.2-ext 2018-02-09 12:48:23 +02:00
Marko Mäkelä
7c1bd8fa04 Add back (and clean up) the test innodb_zip.prefix_index_liftedlimit
This MySQL 5.5 test innodb_zip.innodb_prefix_index_lifted
was renamed in MySQL 5.7. In
commit 2e814d4702
the test was inadvertently removed, instead of being renamed.

The absence of this test caused a regression in MariaDB 10.2:
MDEV-15257 Invalid CREATE INDEX fails to report error correctly
2018-02-09 10:03:53 +02:00
Sergei Golubchik
b75d8453d4 MDEV-14868 MariaDB server crashes after using ROLLBACK TO when encrypt_tmp_files=ON
add a test that restores the data from a binlog
2018-02-08 22:54:37 +01:00
Sergei Golubchik
60dfe12be3 MDEV-14868 MariaDB server crashes after using ROLLBACK TO when encrypt_tmp_files=ON
Fix reinit_io_cache(WRITE_CACHE) with non-zero seek_offset.
Run encryption.tempfiles with and without binlog checksums.
2018-02-08 22:54:37 +01:00
Sergei Golubchik
47d1679ac6 fix encryption.tempfiles to check that encrypt_tmp_files is ON 2018-02-08 22:54:37 +01:00
Jan Lindström
06d77eb43a MDEV-14427: encryption.innodb-bad-key-change failed in buildbot
Timing problem as sometimes table is marked as encrypted but
sometimes we are not sure and table is just marked missing.
2018-02-08 18:53:01 +02:00
Marko Mäkelä
c567369ad7 Merge 10.2 into bb-10.2-ext 2018-02-08 17:48:19 +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
Jan Lindström
3969d97e6a MDEV-14427: encryption.innodb-bad-key-change failed in buildbot
Timing problem as sometimes table is marked as encrypted but
sometimes we are not sure and table is just marked missing.
2018-02-08 14:57:39 +02:00
Marko Mäkelä
be6307c0fa Merge 10.1 into 10.2 2018-02-08 13:53:21 +02:00
Marko Mäkelä
871f2a6ee2 Merge 10.0 into 10.1 2018-02-08 13:29:08 +02:00
Marko Mäkelä
9216a4f69f Make the test innodb.recovery_shutdown more robust
Before killing the server, we have to FLUSH TABLES in order to
prevent the corruption of any MyISAM system tables.
2018-02-08 13:26:44 +02:00
Marko Mäkelä
5421e3aee7 MDEV-15249 Crash in MVCC read after IMPORT TABLESPACE
PageConverter::adjust_cluster_record(): Instead of writing
the invalid value DB_ROLL_PTR=0, write a value that indicates
a fresh insert, that is, prevents the DB_ROLL_PTR from being
dereferenced in any circumstances.

It can be argued that IMPORT TABLESPACE should actually
update the dict_index_t::trx_id to prevent older transactions
from accessing the table, similar to what I did on table
rebuild in MySQL 5.6.6 in
03f81a55f2
2018-02-08 12:59:32 +02:00
Andrei Elkin
7bcf5e2907 MDEV-15238 rpl.perf_buildin_semisync_issue40 sporadically fails on BB
The test was used to result in mismatch due to unaccounted specifics
of the master-slave handshake protocol that sets the Slave_IO_Running
status to true while the semisync master status is set to active a bit later.

The test is refined to expect that.
2018-02-07 19:59:20 +02:00
Monty
5c057b3fef Disabled galera_ist_progress at it always fails in 10.2 2018-02-07 17:25:46 +02:00
Marko Mäkelä
10590dd39c MDEV-15199 Referential integrity broken in ON DELETE CASCADE
MDEV-14222 Unnecessary 'cascade' memory allocation for every updated row
when there is no FOREIGN KEY

This reverts the MySQL 5.7.2 change
377774689b
which introduced these problems. MariaDB 10.2.2 inherited these problems
in commit 2e814d4702.

The FOREIGN KEY CASCADE and SET NULL operations implemented as
procedural recursion are consuming more than 8 kilobytes of stack
(9 stack frames) per iteration in a non-debug GNU/Linux AMD64 build.
This is why we need to limit the maximum recursion depth to 15 steps
instead of the 255 that it used to be in MySQL 5.7 and MariaDB 10.2.

A corresponding change was made in MySQL 5.7.21 in
7b26dc98a6
2018-02-07 10:39:12 +02:00
Marko Mäkelä
b68dac88b3 MDEV-15219 FOREIGN KEY CASCADE or SET NULL operations will not resume after lock wait
This corruption was introduced in MDEV-13331. It would have been caught
by the MySQL 5.7 test innodb.update-cascade which MariaDB was missing
until now.

row_ins_check_foreign_constraint(): Never replace err == DB_LOCK_WAIT
with other values than DB_LOCK_WAIT_TIMEOUT.
2018-02-07 10:39:12 +02:00
Marko Mäkelä
1789e0ff03 Remove useless debug instrumentation row_print_geometry_data 2018-02-07 10:39:12 +02:00
Marko Mäkelä
883496782f Merge bb-10.2-ext into 10.3 2018-02-06 17:12:17 +02:00
Marko Mäkelä
560b9895d4 MDEV-15115 Assertion failure in CREATE SEQUENCE...ROW_FORMAT=REDUNDANT
dict_tf_is_valid(): Allow no-rollback tables in ROW_FORMAT=REDUNDANT.
2018-02-06 17:09:26 +02:00
Sergei Golubchik
4771ae4b22 Merge branch 'github/10.1' into 10.2 2018-02-06 14:50:50 +01:00
Jan Lindström
60f51af755 MDEV-15042: INSERT ON DUPLICATE KEY UPDATE produces error 1032 (Can't find record)
Problem was that wrong error message was returned when insert
returned FK-error and there was no duplicate key to process.

row_ins
	If error from insert was DB_NO_REFERENCED_ROW and there was
	no duplicate key we should ignore ON DUPLICATE KEY UPDATE
	and return original error message.
2018-02-05 18:21:28 +02:00
Marko Mäkelä
3f42529a6f Merge 10.0 into 10.1 2018-02-05 09:25:33 +02:00
Marko Mäkelä
cb5374801e MDEV-15202 innodb.log_file_size failed in buildbot
Suppress some messages that are emitted rarely
(when the FIL_PAGE_FILE_FLUSH_LSN of the first page of ibdata1
does not match the latest redo log checkpoint).
2018-02-05 09:23:36 +02:00
Marko Mäkelä
a988c70922 After-merge test result fix 2018-02-03 12:49:41 +02:00
Sergei Golubchik
c383418cbf Merge branch 'github/10.0-galera' into 10.1 2018-02-03 08:09:06 +01:00
Marko Mäkelä
9390ff53fc MDEV-14958 Merge new release of InnoDB MySQL 5.7.21 to 10.2
Two follow-up tasks were filed for MySQL 5.7.21 changes that
were not applied here:

MDEV-15179 performance_schema.file_instances does not reflect RENAME TABLE
MDEV-14222 Unnecessary 'cascade' memory allocation for every updated
row when there is no FOREIGN KEY
2018-02-02 21:11:49 +02:00
Marko Mäkelä
d4ea179e13 MDEV-13626: Merge InnoDB test cases from MySQL 5.7 (part 7)
Import and adjust the innodb.innodb_buffer_pool_resize tests,
except innodb.innodb_buffer_pool_resize_debug, which would time out.

buf_pool_clear_hash_index(): Adjust assertions.
2018-02-02 16:15:13 +02:00
Sergei Golubchik
d4df7bc9b1 Merge branch 'github/10.0' into 10.1 2018-02-02 10:09:44 +01:00
Marko Mäkelä
44314c768f MDEV-15165 InnoDB purge for index on virtual column is trying to access an incomplete record
The algorithm change is based on a MySQL 8.0 fix for
BUG #26818787: ASSERTION: DATA0DATA.IC:430:TUPLE
by Krzysztof Kapuścik
ee606e62bb

If a record had been inserted in place of a delete-marked purgeable
record by modifying that record, and purge was accessing that record
before the off-page columns were written, row_build_index_entry()
would have returned NULL, causing a crash.

row_vers_non_virtual_fields_equal(): Check whether all non-virtual fields
of an index are equal. Replaces row_vers_non_vc_match(). A more complex
version of this function was called row_vers_non_vc_index_entry_match()
in the MySQL 8.0 fix.

row_vers_impl_x_locked_low(): This change is not directly related to
the reported problem, but apparently to the removal of the function
row_vers_non_vc_match(). This function checks if a secondary index
record was modified by a transaction that has not been committed yet.
For comparing the non-virtual columns, construct a secondary index
tuple from the table row.

row_vers_vc_matches_cluster(): Replace row_vers_non_vc_match() with
code that is equivalent to the row_vers_non_vc_index_entry_match()
in the MySQL 8.0 fix. Also, deduplicate some code by using goto.
2018-02-01 18:53:41 +02:00
Vladislav Vaintroub
13479cef08 Tests : Fix result file 2018-02-01 12:50:58 +00:00
Jan Lindström
c7e5feb259 Merge tag 'mariadb-10.0.34' into 10.0-galera
Conflicts:
	storage/innobase/lock/lock0lock.cc
	storage/xtradb/lock/lock0lock.cc
	storage/xtradb/lock/lock0wait.cc
	support-files/mysql.server.sh
2018-02-01 14:09:48 +02:00
Jan Lindström
5a9c63ab55 MDEV-10949: innodb_disallow_writes does not work as expected
Test seems to pass fine.
2018-02-01 13:37:07 +02:00
Marko Mäkelä
67d89e4d7d MDEV-15143 InnoDB: Rollback of trx with id 0 completed
When InnoDB has completed the rollback of a recovered transaction,
it used to display the transaction identifier.

This was broken in MySQL 5.7.2 in
2f5f3cd3ac
which was merged to MariaDB 10.2.2 in
commit 2e814d4702.

trx_rollback_active(): Cache the transaction ID before it will be
reset by transaction commit. Do not display the message if the
rollback was interrupted by shutdown (MDEV-13797, MDEV-12352).
2018-01-31 12:06:46 +02:00
Monty
b9b17e6340 Updated error message for wrong foreign key constraint 2018-01-30 21:33:56 +02:00
Monty
a7e352b54d Changed database, tablename and alias to be LEX_CSTRING
This was done in, among other things:
- thd->db and thd->db_length
- TABLE_LIST tablename, db, alias and schema_name
- Audit plugin database name
- lex->db
- All db and table names in Alter_table_ctx
- st_select_lex db

Other things:
- Changed a lot of functions to take const LEX_CSTRING* as argument
  for db, table_name and alias. See init_one_table() as an example.
- Changed some function arguments from LEX_CSTRING to const LEX_CSTRING
- Changed some lists from LEX_STRING to LEX_CSTRING
- threads_mysql.result changed because process list_db wasn't always
  correctly updated
- New append_identifier() function that takes LEX_CSTRING* as arguments
- Added new element tmp_buff to Alter_table_ctx to separate temp name
  handling from temporary space
- Ensure we store the length after my_casedn_str() of table/db names
- Removed not used version of rename_table_in_stat_tables()
- Changed Natural_join_column::table_name and db_name() to never return
  NULL (used for print)
- thd->get_db() now returns db as a printable string (thd->db.str or "")
2018-01-30 21:33:55 +02:00
Marko Mäkelä
921c5e9314 Merge bb-10.2-ext into 10.3
MDEV-11415 Remove excessive undo logging during ALTER TABLE…ALGORITHM=COPY

Move a test from innodb.rename_table_debug to innodb.alter_copy.

ha_innobase::extra(HA_EXTRA_BEGIN_ALTER_COPY): Register id-versioned
tables so that mysql.transaction_registry will be updated, even for
empty tables that are subjected to ALTER TABLE…ALGORITHM=COPY.
2018-01-30 21:26:53 +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ä
0c1f220611 Merge 10.2 into bb-10.2-ext 2018-01-30 20:47:12 +02:00
Marko Mäkelä
0ba6aaf030 MDEV-11415 Remove excessive undo logging during ALTER TABLE…ALGORITHM=COPY
If a crash occurs during ALTER TABLE…ALGORITHM=COPY, InnoDB would spend
a lot of time rolling back writes to the intermediate copy of the table.
To reduce the amount of busy work done, a work-around was introduced in
commit fd069e2bb3 in MySQL 4.1.8 and 5.0.2,
to commit the transaction after every 10,000 inserted rows.

A proper fix would have been to disable the undo logging altogether and
to simply drop the intermediate copy of the table on subsequent server
startup. This is what happens in MariaDB 10.3 with MDEV-14717,MDEV-14585.
In MariaDB 10.2, the intermediate copy of the table would be left behind
with a name starting with the string #sql.

This is a backport of a bug fix from MySQL 8.0.0 to MariaDB,
contributed by jixianliang <271365745@qq.com>.

Unlike recent MySQL, MariaDB supports ALTER IGNORE. For that operation
InnoDB must for now keep the undo logging enabled, so that the latest
row can be rolled back in case of an error.

In Galera cluster, the LOAD DATA statement will retain the existing
behaviour and commit the transaction after every 10,000 rows if
the parameter wsrep_load_data_splitting=ON is set. The logic to do
so (the wsrep_load_data_split() function and the call
handler::extra(HA_EXTRA_FAKE_START_STMT)) are joint work
by Ji Xianliang and Marko Mäkelä.

The original fix:

Author: Thirunarayanan Balathandayuthapani <thirunarayanan.balathandayuth@oracle.com>
Date:   Wed Dec 2 16:09:15 2015 +0530

Bug#17479594 AVOID INTERMEDIATE COMMIT WHILE DOING ALTER TABLE ALGORITHM=COPY

Problem:

During ALTER TABLE, we commit and restart the transaction for every
10,000 rows, so that the rollback after recovery would not take so long.

Fix:

Suppress the undo logging during copy alter operation. If fts_index is
present then insert directly into fts auxiliary table rather
than doing at commit time.

ha_innobase::num_write_row: Remove the variable.

ha_innobase::write_row(): Remove the hack for committing every 10000 rows.

row_lock_table_for_mysql(): Remove the extra 2 parameters.

lock_get_src_table(), lock_is_table_exclusive(): Remove.

Reviewed-by: Marko Mäkelä <marko.makela@oracle.com>
Reviewed-by: Shaohua Wang <shaohua.wang@oracle.com>
Reviewed-by: Jon Olav Hauglid <jon.hauglid@oracle.com>
2018-01-30 20:24:23 +02:00
Marko Mäkelä
6d390bab4a Merge 10.2 into bb-10.2-ext 2018-01-30 20:18:25 +02:00
Monty
5478547c96 Fixed failing tests
- Galera tests that was not updated with connection change
  messages
- Test where out of memory error was changed (We are now using the
  standard out of memory error in most places)
- Removed tokudb tests that uses include files that doesn't exist
  in MariaDB
- Removed not supported mariadb startup option from option file
2018-01-30 15:04:08 +02:00
Monty
cea431e1f7 Fix some wrong test result
- Galera tests that was not updated with connection change
  messages
- Disabled some TokuDB tests that always timed out.
  These should be enabled again when we have an option to
  specicy timeouts per tests.
2018-01-30 14:56:33 +02:00
Vladislav Vaintroub
4808996b12 Fix result file 2018-01-29 23:07:26 +00: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
Vladislav Vaintroub
160a94ee7a Fix result files (changed error message) 2018-01-29 20:04:32 +00:00
Alexander Barkov
2e43c4584e Fixing versioning.insert and versioning.replace test failes.
Tests started to fail after a merge of MDEV-15107 (from bb-10.2-ext to 10.3),
because MDEV-15107 additionally fixed this problem:
  MDEV-15112 Inconsistent evaluation of spvariable=0 in strict mode

Modifying tests not to reply on the pre-MDEV-15112 behavior.
2018-01-29 19:52:34 +04:00
Marko Mäkelä
b76881a23c 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 16:39:54 +02:00
Marko Mäkelä
a5fcced7d1 Merge 5.5 into 10.0 2018-01-29 16:32:59 +02:00
Marko Mäkelä
547ec8ce27 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 16:25:26 +02:00
Michael Widenius
a7e12fd42b Fixed failing tests rpl_semi_sync_skip_repl.test
Removed not used have_semisync_plugin.inc
2018-01-29 14:53:13 +02:00
Jan Lindström
2749d25096 MDEV-13499: Backing up table that "doesn't exist in engine" cause crash in mariabackup when using encryption
Problem was that there is intentional crah when .ibd file does
not found. In mariabackup case we should avoid this crash.
2018-01-29 14:23:22 +02:00
Alexander Barkov
c7a2f23a7b Merge remote-tracking branch 'origin/bb-10.2-ext' into 10.3 2018-01-29 12:44:20 +04:00
Alexey Botchkov
b4a2baffa8 MDEV-11084 Select statement with partition selection against MyISAM table opens all partitions.
Now we don't open partitions if it was explicitly cpecified.
        ha_partition::m_opened_partition bitmap added to track
        partitions that were actually opened.
2018-01-29 11:01:14 +04:00
Monty
84514ec643 Merge remote-tracking branch 'origin/10.2' into bb-10.2-ext
Conflicts:
	sql/table.cc
2018-01-27 15:20:01 +02:00
Andrei Elkin
c09371dce6 MDEV-14721 Big transaction events get lost on semisync master when
replicate_events_marked_for_skip=FILTER_ON_MASTER

When events of a big transaction are binlogged offsetting over 2GB from
the beginning of the log the semisync master's dump thread
lost such events.
The events were skipped by the Dump thread that found their skipping
status erroneously.

The current fixes make sure the skipping status is computed correctly.
The test verifies them simulating the 2GB offset.
2018-01-27 14:35:54 +02:00
Sergey Vojtovich
ce04790065 MDEV-14482 - Cache line contention on ut_rnd_ulint_counter()
InnoDB RNG maintains global state, causing otherwise unnecessary bus
traffic. Even worse this is cross-mutex traffic. That is different
mutexes suffer from contention.

Fixed delay of 4 was verified to give best throughput by OLTP update
index and read-write benchmarks on Intel Broadwell (2/20/40) and
ARM (1/46/46).
2018-01-26 10:25:33 +04:00
Sergei Golubchik
a0702dbcda MDEV-11539 test_if_reopen: Assertion `strcmp(share->unique_file_name,filename) || share->last_version' failed upon select from I_S
remove HA_EXTRA_PREPARE_FOR_RENAME - neither OPTIMIZE nor REPAIR need it
(was introduced in b58e79566c when replacing remove_table_from_cache()
with wait_while_table_is_used() even though remove_table_from_cache()
did not have it).
2018-01-25 14:03:24 +01:00
Vicențiu Ciorbaru
1c10b256b3 Port innodb_print_lock_wait_timeout_info_basic from Percona
The test checks the new sys_var added to xtradb from Percona
2018-01-25 12:16:27 +02:00
Vicențiu Ciorbaru
d69d488b8c Remove innodb.test "keep away" comment
This was a leftover post 5.5->10.0 merge. It should've been deleted
there.
2018-01-24 17:55:26 +02:00
Marko Mäkelä
9875d5c3e1 Merge bb-10.2-ext into 10.3 2018-01-24 14:00:33 +02:00
Vladislav Vaintroub
524221e7a3 try to fix [Warning] InnoDB: innodb_open_files=20 is exceeded (20) files stay open)
on Appveyor
2018-01-24 11:23:44 +00:00
Vicențiu Ciorbaru
d833bb65d5 Merge remote-tracking branch '5.5' into 10.0 2018-01-24 12:29:31 +02:00
Marko Mäkelä
906ce0962d MDEV-7049 MySQL#74585 - InnoDB: Failing assertion: *mbmaxlen < 5 in file ha_innodb.cc line 1904
InnoDB limited the maximum number of bytes per character to 4.
But, the filename character set that was introduced in MySQL 5.1
uses up to 5 bytes per character.

To allow InnoDB tables to be created with wider characters, let
us split the mbminmaxlen fields into mbminlen, mbmaxlen, and increase
the limit to 7 bytes per character. This will increase the payload size
of dtype_t and dict_col_t by one bit. The storage size will be unchanged
(54 bits and 77 bits will use the same number of bytes as the
previous sizes 53 and 76 bits).
2018-01-22 11:18:10 +02:00
Marko Mäkelä
c425dcd8f2 Merge 10.2 into bb-10.2-ext 2018-01-22 09:04:32 +02:00
Marko Mäkelä
4f8555f1f6 MDEV-14941 Timeouts on persistent statistics tables caused by MDEV-14511
MDEV-14511 tried to avoid some consistency problems related to InnoDB
persistent statistics. The persistent statistics are being written by
an InnoDB internal SQL interpreter that requires the InnoDB data dictionary
cache to be locked.

Before MDEV-14511, the statistics were written during DDL in separate
transactions, which could unnecessarily reduce performance (each commit
would require a redo log flush) and break atomicity, because the statistics
would be updated separately from the dictionary transaction.

However, because it is unacceptable to hold the InnoDB data dictionary
cache locked while suspending the execution for waiting for a
transactional lock (in the mysql.innodb_index_stats or
mysql.innodb_table_stats tables) to be released, any lock conflict
was immediately be reported as "lock wait timeout".

To fix MDEV-14941, an attempt to reduce these lock conflicts by acquiring
transactional locks on the user tables in both the statistics and DDL
operations was made, but it would still not entirely prevent lock conflicts
on the mysql.innodb_index_stats and mysql.innodb_table_stats tables.

Fixing the remaining problems would require a change that is too intrusive
for a GA release series, such as MariaDB 10.2.

Thefefore, we revert the change MDEV-14511. To silence the
MDEV-13201 assertion, we use the pre-existing flag trx_t::internal.
2018-01-22 08:58:47 +02:00
Monty
27a5d96bcb Merge remote-tracking branch 'origin/10.2' into bb-10.2-ext
Conflicts:
	sql/sp_rcontext.cc
2018-01-21 20:32:48 +02:00
Monty
50de7d1303 Fixed MDEV-14326 engine ARIA with row_format=FIXED is broken
The problem was that max_size was acciently set to 1 in some
cases.

Other things:
- Adjust max_rows if min_rows > max_rows.
- Removed not used variable varchar_length
- Adjusted max_pack_length (safety fix)
2018-01-18 15:19:32 +02:00
Marko Mäkelä
745e6498ea After-merge fix to a test 2018-01-18 09:28:37 +02:00
Marko Mäkelä
4ef2e43080 Merge bb-10.2-ext into 10.3 2018-01-17 16:33:40 +02:00
Marko Mäkelä
656f66def2 Follow-up fix to MDEV-14585 Automatically remove #sql- tables in InnoDB dictionary during recovery
If InnoDB is killed while ALTER TABLE...ALGORITHM=COPY is in progress,
after recovery there could be undo log records some records that were
inserted into an intermediate copy of the table. Due to these undo log
records, InnoDB would resurrect locks at recovery, and the intermediate
table would be locked while we are trying to drop it. This would cause
a call to row_rename_table_for_mysql(), either from
row_mysql_drop_garbage_tables() or from the rollback of a RENAME
operation that was part of the ALTER TABLE.

row_rename_table_for_mysql(): Do not attempt to parse FOREIGN KEY
constraints when renaming from #sql-something to #sql-something-else,
because it does not make any sense.

row_drop_table_for_mysql(): When deferring DROP TABLE due to locks,
do not rename the table if its name already starts with the #sql-
prefix, which is what row_mysql_drop_garbage_tables() uses.
Previously, the too strict prefix #sql-ib was used, and some
tables were renamed unnecessarily.
2018-01-17 16:21:56 +02:00