Commit graph

1000 commits

Author SHA1 Message Date
Sachin Setiya
d036cc9b2f Fix WSREP_PATCH_VERSION 2017-04-06 15:41:54 +05:30
Jan Lindström
50eb40a2a8 MDEV-11738: Mariadb uses 100% of several of my 8 cpus doing nothing
MDEV-11581: Mariadb starts InnoDB encryption threads
when key has not changed or data scrubbing turned off

Background: Key rotation is based on background threads
(innodb-encryption-threads) periodically going through
all tablespaces on fil_system. For each tablespace
current used key version is compared to max key age
(innodb-encryption-rotate-key-age). This process
naturally takes CPU. Similarly, in same time need for
scrubbing is investigated. Currently, key rotation
is fully supported on Amazon AWS key management plugin
only but InnoDB does not have knowledge what key
management plugin is used.

This patch re-purposes innodb-encryption-rotate-key-age=0
to disable key rotation and background data scrubbing.
All new tables are added to special list for key rotation
and key rotation is based on sending a event to
background encryption threads instead of using periodic
checking (i.e. timeout).

fil0fil.cc: Added functions fil_space_acquire_low()
to acquire a tablespace when it could be dropped concurrently.
This function is used from fil_space_acquire() or
fil_space_acquire_silent() that will not print
any messages if we try to acquire space that does not exist.
fil_space_release() to release a acquired tablespace.
fil_space_next() to iterate tablespaces in fil_system
using fil_space_acquire() and fil_space_release().
Similarly, fil_space_keyrotation_next() to iterate new
list fil_system->rotation_list where new tables.
are added if key rotation is disabled.
Removed unnecessary functions fil_get_first_space_safe()
fil_get_next_space_safe()

fil_node_open_file(): After page 0 is read read also
crypt_info if it is not yet read.

btr_scrub_lock_dict_func()
buf_page_check_corrupt()
buf_page_encrypt_before_write()
buf_merge_or_delete_for_page()
lock_print_info_all_transactions()
row_fts_psort_info_init()
row_truncate_table_for_mysql()
row_drop_table_for_mysql()
    Use fil_space_acquire()/release() to access fil_space_t.

buf_page_decrypt_after_read():
    Use fil_space_get_crypt_data() because at this point
    we might not yet have read page 0.

fil0crypt.cc/fil0fil.h: Lot of changes. Pass fil_space_t* directly
to functions needing it and store fil_space_t* to rotation state.
Use fil_space_acquire()/release() when iterating tablespaces
and removed unnecessary is_closing from fil_crypt_t. Use
fil_space_t::is_stopping() to detect when access to
tablespace should be stopped. Removed unnecessary
fil_space_get_crypt_data().

fil_space_create(): Inform key rotation that there could
be something to do if key rotation is disabled and new
table with encryption enabled is created.
Remove unnecessary functions fil_get_first_space_safe()
and fil_get_next_space_safe(). fil_space_acquire()
and fil_space_release() are used instead. Moved
fil_space_get_crypt_data() and fil_space_set_crypt_data()
to fil0crypt.cc.

fsp_header_init(): Acquire fil_space_t*, write crypt_data
and release space.

check_table_options()
	Renamed FIL_SPACE_ENCRYPTION_* TO FIL_ENCRYPTION_*

i_s.cc: Added ROTATING_OR_FLUSHING field to
information_schema.innodb_tablespace_encryption
to show current status of key rotation.
2017-03-14 16:23:10 +02:00
Sergei Golubchik
2033844319 test failures in buildbot 2017-03-11 16:23:31 +01:00
iangilfillan
f0ec34002a Correct FSF address 2017-03-10 18:21:29 +01:00
Marko Mäkelä
ad0c218a44 Merge 10.0 into 10.1
Also, implement MDEV-11027 a little differently from 5.5 and 10.0:

recv_apply_hashed_log_recs(): Change the return type back to void
(DB_SUCCESS was always returned).

Report progress also via systemd using sd_notifyf().
2017-03-09 08:53:08 +02:00
Vicențiu Ciorbaru
5d0c123007 Add missing sys_var test for innodb_stats_include_delete_marked 2017-03-05 01:00:21 +02:00
Vicențiu Ciorbaru
1acfa942ed Merge branch '5.5' into 10.0 2017-03-03 01:37:54 +02:00
Nirbhay Choubey
2e8fa1c2b2 MDEV-12058: MariaDB Test Suite issue with test sys_vars.secure_file_priv.test
Try to remove bug50373.txt before using it in SELECT .. OUTFILE
(in case its a leftover from previous test runs).
2017-02-13 17:29:32 -05:00
Marko Mäkelä
2e67e66c3a Merge 10.0 into 10.1 2017-02-08 08:53:34 +02:00
Marko Mäkelä
f162704570 Rewrite the innodb.log_file_size test with DBUG_EXECUTE_IF.
Remove the debug parameter innodb_force_recovery_crash that was
introduced into MySQL 5.6 by me in WL#6494 which allowed InnoDB
to resize the redo log on startup.

Let innodb.log_file_size actually start up the server, but ensure
that the InnoDB storage engine refuses to start up in each of the
scenarios.
2017-02-05 17:07:16 +02:00
Nirbhay Choubey
cd8482c19e MDEV-11945: Fix description for "max_statement_time" in --help
max_statement_time also applies to non-SELECT queries.
2017-01-31 12:28:09 -05:00
Jan Lindström
8a4d605500 MDEV-11838: Innodb-encryption-algorithm default should be != none
Change default to zlib, this has effect only if user has
explicitly requested page compression and then user
naturally expects that pages are really compressed
if they can be compressed.
2017-01-19 12:20:54 +02:00
Vicențiu Ciorbaru
d807e41511 Post merge fix sysvars_innodb for xtradb 2017-01-17 01:22:08 +02:00
Vicențiu Ciorbaru
7b44c31be8 Merge remote-tracking branch 'origin/10.1' into 10.1
Extra merge due to more extra commits during merge process
2017-01-16 12:18:21 +02:00
Vicențiu Ciorbaru
8e15768731 Merge branch '10.0' into 10.1 2017-01-16 03:18:14 +02:00
Sergei Golubchik
7e2f9d092d max_session_mem_used server variable 2017-01-15 07:41:13 +01:00
Marko Mäkelä
384f4d1e36 Post-push fix for MDEV-11556: Make the debug variable UINT.
Sometimes innodb_data_file_size_debug was reported as INT UNSIGNED
instead of BIGINT UNSIGNED. Make it uint instead of ulong to get
a more deterministic result.
2017-01-07 15:27:59 +02:00
Marko Mäkelä
8451e09073 MDEV-11556 InnoDB redo log apply fails to adjust data file sizes
fil_space_t::recv_size: New member: recovered tablespace size in pages;
0 if no size change was read from the redo log,
or if the size change was implemented.

fil_space_set_recv_size(): New function for setting space->recv_size.

innodb_data_file_size_debug: A debug parameter for setting the system
tablespace size in recovery even when the redo log does not contain
any size changes. It is hard to write a small test case that would
cause the system tablespace to be extended at the critical moment.

recv_parse_log_rec(): Note those tablespaces whose size is being changed
by the redo log, by invoking fil_space_set_recv_size().

innobase_init(): Correct an error message, and do not require a larger
innodb_buffer_pool_size when starting up with a smaller innodb_page_size.

innobase_start_or_create_for_mysql(): Allow startup with any initial
size of the ibdata1 file if the autoextend attribute is set. Require
the minimum size of fixed-size system tablespaces to be 640 pages,
not 10 megabytes. Implement innodb_data_file_size_debug.

open_or_create_data_files(): Round the system tablespace size down
to pages, not to full megabytes, (Our test truncates the system
tablespace to more than 800 pages with innodb_page_size=4k.
InnoDB should not imagine that it was truncated to 768 pages
and then overwrite good pages in the tablespace.)

fil_flush_low(): Refactored from fil_flush().

fil_space_extend_must_retry(): Refactored from
fil_extend_space_to_desired_size().

fil_mutex_enter_and_prepare_for_io(): Extend the tablespace if
fil_space_set_recv_size() was called.

The test case has been successfully run with all the
innodb_page_size values 4k, 8k, 16k, 32k, 64k.
2016-12-30 09:52:24 +02:00
Sachin Setiya
d93bbcad36 MDEV-11479 Improved wsrep_dirty_reads
Updated sysvars_wsrep.result file.
2016-12-14 20:13:36 +05:30
Sachin Setiya
0c79de2419 MDEV-11479 Improved wsrep_dirty_reads
Tasks:-
         Changes in wsrep_dirty_reads variable
         1.) Global + Session scope (Current: session-only)
         2.) Can be set using command line.
         3.) Allow all commands that do not change data (besides SELECT)
         4.) Allow prepared Statements that do not change data
         5.) Works with wsrep_sync_wait enabled
2016-12-14 09:30:43 +05:30
Sergei Golubchik
2f20d297f8 Merge branch '10.0' into 10.1 2016-12-11 09:53:42 +01:00
Sergei Golubchik
3e8155c637 Merge branch '5.5' into 10.0 2016-12-09 16:33:48 +01:00
Alexey Botchkov
1d702ff07c MDEV-8329 MariaDB crashes when replicate_wild_ignore_table is set to NULL.
Rpl_filter::parse_filter_rule() made NULL-safe.
2016-12-07 14:42:08 +04:00
Elena Stepanova
ead6d0de02 Follow-up for MDEV-9451 - fix XtraDB rdiff files 2016-12-05 03:13:28 +02:00
Elena Stepanova
b0754ad45e Follow-up for MDEV-11429 - fix result files for embedded and 32-bit tests 2016-12-05 03:11:42 +02:00
Monty
2996f9aa88 MDEV-11429 Increase number of max table_open_cache instances
Increase max number of possible table_open_cache instances from 512K
to 1024K. This only affects user who are trying to set the variable over
the old limit.

Delete not used test table_open_cache_instances_basic
(Need to be added back and rewritten in 10.2)
2016-12-02 14:05:16 +02:00
Sergei Golubchik
a98c85bb50 Merge branch '10.0-galera' into 10.1 2016-11-02 13:44:07 +01:00
sensssz
74961760a4 A few fixes for VATS in 10.1 2016-10-25 18:57:03 -04:00
Sergei Golubchik
235876d70e update test results after merge 2016-09-29 14:21:14 +02:00
Jan Lindström
1d55cfce10 Do not use os_file_read() directly for reading first page of the
tablespace. Instead use fil_read() with syncronous setting.
Fix test failures and mask tablespace number as it could
change in concurrent mtr runs.
2016-09-22 21:47:27 +03:00
Jan Lindström
2bedc3978b MDEV-9931: InnoDB reads first page of every .ibd file at startup
Analysis: By design InnoDB was reading first page of every .ibd file
at startup to find out is tablespace encrypted or not. This is
because tablespace could have been encrypted always, not
encrypted newer or encrypted based on configuration and this
information can be find realible only from first page of .ibd file.

Fix: Do not read first page of every .ibd file at startup. Instead
whenever tablespace is first time accedded we will read the first
page to find necessary information about tablespace encryption
status.

TODO: Add support for SYS_TABLEOPTIONS where all table options
encryption information included will be stored.
2016-09-22 16:38:24 +03:00
Sergei Golubchik
8494039757 fix the test to work
without preceding sys_vars.wsrep_provider_basic
2016-09-06 16:34:25 +02:00
Nirbhay Choubey
3575618237 Post merge fixes. 2016-08-25 21:28:26 -04:00
Nirbhay Choubey
90266e8a0e Merge branch '10.0-galera' into bb-10.1-serg 2016-08-25 15:39:39 -04:00
Sergei Golubchik
6b1863b830 Merge branch '10.0' into 10.1 2016-08-25 12:40:09 +02:00
Nirbhay Choubey
c309e99ff9 Merge branch '10.0' into 10.0-galera 2016-08-24 19:30:32 -04:00
Nirbhay Choubey
3f481e52e4 Fixes for failing tests (post-merge). 2016-08-21 20:09:05 -04:00
Sergei Golubchik
309c08c17c Merge branch '5.5' into 10.0 2016-08-10 19:19:05 +02:00
Sergei Golubchik
0098d789c9 MDEV-10465 general_log_file can be abused
Windows!
2016-08-09 13:25:40 +02:00
Sergei Golubchik
2a54a530a9 MDEV-10465 general_log_file can be abused
followup
2016-08-08 21:27:30 +02:00
Sergei Golubchik
470f2598cc MDEV-10465 general_log_file can be abused
This issue was discovered by
Dawid Golunski (http://legalhackers.com)
2016-08-03 20:56:24 +02:00
Nirbhay Choubey
67480fc5fd MDEV-10429: sys_vars.sysvars_wsrep fails in buildbot on host 'work' (valgrind builder)
- Fixed the test
- Improved comment for wsrep_drupal_282555_workaround
2016-07-28 15:49:59 -04:00
Nirbhay Choubey
e373f60fd1 MW-265 Add support for wsrep_max_ws_rows
Update test results.
2016-07-20 18:12:17 -04:00
Elena Stepanova
1168c1a3b9 Fix embedded and 32-bit test results after MDEV-8580 2016-07-14 03:55:33 +03:00
Sergei Golubchik
12dc083a45 MDEV-8580 For some BOOLEAN or ENUM sysvars list of valid values is not generated
set the 'typelib' member for plugin boolean sysvars
2016-07-13 08:55:26 +02:00
Sergei Golubchik
33492ec8d4 update tests for 32bit 2016-06-29 21:53:56 +02:00
Sergei Golubchik
3361aee591 Merge branch '10.0' into 10.1 2016-06-28 22:01:55 +02:00
Nirbhay Choubey
47e4e5dfd9 MDEV-6699: wsrep_node_name not automatically set to hostname
Update sys_vars.sysvars_wsrep test.
2016-06-27 18:06:18 -04:00
Nirbhay Choubey
b57232d3cb MDEV-6699 : wsrep_node_name not automatically set to hostname
Fixed by using hostname (glob_hostname) as default value for
wsrep_node_name system variable.
Added a test case.
2016-06-27 17:56:59 -04:00
Sergei Petrunia
825427fa9f Update test results 2016-06-03 10:58:32 +03:00