summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* MDEV-20574 Position of events reported by mysqlbinlog is wrong with ↵Sachin Setiya2019-10-089-35/+159
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | encrypted binlogs, SHOW BINLOG EVENTS reports the correct one. Analysis Mysqlbinlog output for encrypted binary log #Q> insert into tab1 values (3,'row 003') #190912 17:36:35 server id 10221 end_log_pos 980 CRC32 0x53bcb3d3 Table_map: `test`.`tab1` mapped to number 19 # at 940 #190912 17:36:35 server id 10221 end_log_pos 1026 CRC32 0xf2ae5136 Write_rows: table id 19 flags: STMT_END_F Here we can see Table_map_log_event ends at 980 but Next event starts at 940. And the reason for that is we do not send START_ENCRYPTION_EVENT to the slave Solution:- Send Start_encryption_log_event as Ignorable_log_event to slave(mysqlbinlog), So that mysqlbinlog can update its log_pos. Since Slave can request multiple FORMAT_DESCRIPTION_EVENT while master does not have so We only update slave master pos when master actually have the FORMAT_DESCRIPTION_EVENT. Similar logic should be applied for START_ENCRYPTION_EVENT. Also added the test case when new server reads the data from old server which does not send START_ENCRYPTION_EVENT to slave. Master Slave Upgrade Scenario. When Slave is updated first, Slave will have extra logic of handling START_ENCRYPTION_EVENT But master willnot be sending START_ENCRYPTION_EVENT. So there will be no issue. When Master is updated first, It will send START_ENCRYPTION_EVENT to slave , But slave will ignore this event in queue_event.
* Fix problem with warnings of new compilers.Oleksandr Byelkin2019-10-042-2/+0
|
* fix clang warningEugene Kosov2019-10-031-1/+1
|
* MDEV-20703: mariabackup creates binlog files in server binlog directory on ↵Vlad Lesin2019-10-012-4/+20
| | | | | | | | | | | | | | | | | --prepare --export step When "--export" mariabackup option is used, mariabackup starts the server in bootstrap mode to generate *.cfg files for the certain innodb tables. The started instance of the server reads options from the file, pointed out in "--defaults-file" mariabackup option. If the server uses the same config file as mariabackup, and binlog is switched on in that config file, then "mariabackup --prepare --export" will create binary log files in the server's binary log directory, what can cause issues. The fix is to add "--skip-log-bin" in mysld options when the server is started to generate *.cfg files.
* Merge remote-tracking branch 'origin/10.1' into 10.2Alexander Barkov2019-10-0110-9/+281
|\
| * Merge remote-tracking branch 'origin/5.5' into 10.1Alexander Barkov2019-10-013-8/+50
| |\
| | * MDEV-20704 An index on a double column erroneously uses prefix compressionAlexander Barkov2019-10-013-8/+50
| | |
| * | MDEV-20645: Replication consistency is broken as workers miss the error ↵Sujatha2019-09-306-0/+244
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | notification from an earlier failed group. Analysis: ======== In general if there are three groups. 1 - Inserts 32 which fails due to local entry '32' on slave. 2 - Inserts 33 3 - Inserts 34 Each group considers itself as a waiter and it waits for prior group 'waitee'. This is done in 'register_wait_for_prior_event_group_commit'. If there is no other parallel group being scheduled then no waitee will be there. Let us assume 3 groups are being scheduled in parallel. 3-> waits for 2-> waits for->1 '1' upon completion it checks is there any registered subsequent waiter. If so it wakes up the subsequent waiter with its execution status. This execution status is stored in wakeup_error. If '1' failed then it sends corresponding wakeup_error to 2. Then '2' aborts and it propagates error to '3'. So all further commits are aborted. This mechanism works only when all transactions reach a stage where they are waiting for their prior commit to complete. In case of optimistic following scenario occurs. 1,2,3 are scheduled in parallel. 3 - Reaches group_commit_code waits for 2 to complete. 1 - errors out sets stop_on_error_sub_id=1. When a group execution results in error its corresponding sub_id is set to 'stop_on_error_sub_id'. Any new groups queued for execution will check if their sub_id is > stop_on_error_sub_id. If it is true their execution will be skipped as prior group execution failed. 'skip_event_group=1' will be set. Since the execution of SQL thread is about to stop we just skip execution of all the following event groups. We still do all the normal waiting and wakeup processing between the event groups as a simple way to ensure that everything is stopped and cleaned up correctly. Upon error '1' transaction checks for registered waiters. Since no one is there it simply goes away. 2 - Starts the execution. It checks do I have a waitee. Since wait_commit_sub_id == entry->last_committed_sub_id no waitee is set. Secondly: 'entry->stop_on_error_sub_id' is set by '1'st execution. Now 'handle_parallel_thread' code checks if the current group 'sub_id' is greater than the 'sub_id' set within 'stop_on_error_sub_id'. Since the above is true 'skip_event_group=true' is set. Simply call 'wait_for_prior_commit' to wakeup all waiters. Group '2' didn't had any waitee and its execution is skipped. Hence its wakeup_error=0.It sends a positive wakeup signal to '3'. Which commits. This results in a missed transaction. i.e 33 is missed and 34 is committed. Fix: === When a worker learns that an earlier transaction execution has failed, and it should not proceed for further execution, it should mark its own execution status as failed so that it alerts its followers to abort as well.
| * | chkconfig in RPM server scriptletsSergei Golubchik2019-09-271-1/+1
| | | | | | | | | | | | | | | | | | | | | chkconfig --add and --del [might] invoke /sbin/insserv and even if chkconfig exists, insserv might not (SLES15). Ignore chkconfig --del errors - it's a "best effort" cleanup anyway
| * | MDEV-20614: Syntax error, and option put in wrong placeJulius Goryavsky2019-09-261-2/+3
| | | | | | | | | | | | | | | | | | A syntax error in the mysqld_multi.sh script has been fixed here + a "--defaults-group-suffix" option has been moved to the top of the mysqld options list.
* | | MDEV-20647 Fix and enable SphinxSE testsRobert Bindar2019-09-303-4/+33
| | |
* | | Fix -Wunused for CMAKE_BUILD_TYPE=RelWithDebInfoMarko Mäkelä2019-09-308-39/+23
| | | | | | | | | | | | | | | | | | | | | | | | For release builds, do not declare unused variables. unpack_row(): Omit a debug-only variable from WSREP diagnostic message. create_wsrep_THD(): Fix -Wmaybe-uninitialized for the PSI_thread_key.
* | | MDEV-20614: Syntax error, and option put in wrong placeJulius Goryavsky2019-09-271-2/+3
| | | | | | | | | | | | | | | | | | A syntax error in the mysqld_multi.sh script has been fixed here + a "--defaults-group-suffix" option has been moved to the top of the mysqld options list.
* | | MDEV-20688 Recovery crashes after unnecessarily reading a corrupted pageThirunarayanan Balathandayuthapani2019-09-273-18/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The test encryption.innodb-redo-badkey was accidentally disabled until commit 23657a21018d0b3d0464bbd55236113ebcd3d4b7 enabled it recently. Once it was enabled, it started failing randomly. recv_recover_corrupt_page(): Do not assume that any redo log exists for the page. A page may be unnecessarily read by read-ahead. When noting the corruption, reset recv_addr->state to RECV_PROCESSED, so that even if the same page is re-read again, we will only decrement recv_sys->n_addrs once.
* | | dict_load_table(): Remove constant parameter cached=trueMarko Mäkelä2019-09-277-32/+14
| | | | | | | | | | | | Spotted by Thirunarayanan Balathandayuthapani.
* | | Reduce rw_lock_debug_mutex contentionMarko Mäkelä2019-09-271-2/+22
| | | | | | | | | | | | | | | rw_lock_own(), rw_lock_own_flagged(): Traverse the rw_lock_t::debug_list only after quickly checking if the thread is holding X-latch or SX-latch.
* | | Remove a useless large test, and add a debug assertionMarko Mäkelä2019-09-274-77/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | The test innodb_fts.fulltext_table_evict was only creating 1000 tables with fulltext indexes, only to check that no tables with fulltext indexes are being evicted. The reason why tables containing fulltext indexes cannot be evicted is that fts_optimize_init() invokes dict_table_prevent_eviction().
* | | MDEV-19740: Fix GCC 9.2.1 -Wmaybe-uninitialized on AMD64Marko Mäkelä2019-09-276-22/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | For CMAKE_BUILD_TYPE=Debug, the default MYSQL_MAINTAINER_MODE=AUTO implies -Werror along with other flags in cmake/maintainer.cmake, which would break the debug builds when CMAKE_CXX_FLAGS include -O2. This fix includes a backport of 6dd3f24090ce2d237037eb09cf7db083ebbc92f9 from MariaDB 10.3.
* | | MDEV-19514 preparation: Extend innodb.innodb-change-buffer-recoveryMarko Mäkelä2019-09-263-32/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | Test innodb_read_only startup (which will be refused after a crash), and test also innodb_force_recovery=5, and extract some change buffer merge statistics. Omit any statistics about delete (purge) buffering, because purge could happen at any time. Use the sequence storage engine for populating the table.
* | | MDEV-20675 Crash in SHOW ENGINE INNODB STATUS with innodb_force_recovery=5Marko Mäkelä2019-09-261-0/+5
| | | | | | | | | | | | Add a test case. MariaDB Server 10.2 is not affected.
* | | Merge 10.1 into 10.2Marko Mäkelä2019-09-262-71/+17
|\ \ \ | |/ /
| * | Speed up main.sum_distinct-bigMarko Mäkelä2019-09-252-71/+17
| | | | | | | | | | | | | | | | | | | | | | | | Eliminate one InnoDB table with 128*16384 rows, and use the sequence engine instead. Also, run everything in a single transaction, to prevent purge from running concurrently unnecessarily. (Starting with MariaDB Server 10.3, purge would reset the DB_TRX_ID after INSERT.)
* | | Fixing tests according to MDEV-20655 maturity stable for user_variablesAlexander Barkov2019-09-241-1/+1
| | |
* | | Merge remote-tracking branch 'origin/10.1' into 10.2Alexander Barkov2019-09-2433-44/+257
|\ \ \ | |/ /
| * | Merge remote-tracking branch 'origin/5.5' into 10.1Alexander Barkov2019-09-2433-44/+257
| |\ \ | | |/
| | * MDEV-20495 Assertion `precision > 0' failed in decimal_bin_size upon CREATE ↵Alexander Barkov2019-09-2411-7/+222
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | .. SELECT with zerofilled decimal Also fixes: MDEV-20560 Assertion `precision > 0' failed in decimal_bin_size upon SELECT with MOD short unsigned decimal Changing the way how Item_func_mod calculates its max_length. It now uses decimal_precision(), decimal_scale() and unsigned_flag of its arguments, like all other Item_num_op descendants do.
| | * Update mysqld_safe.sh - introduce defaults-group-suffix handlingrantal2019-09-211-1/+4
| | | | | | | | | | | | "--defaults-group-suffix" must be be given as the first argument on the command-line of mysqld
| | * MDEV-4968 Old advices in mysql-log-rotate scriptchriscalender2019-09-211-5/+5
| | | | | | | | | | | | | | | | | | | | | * Change the comments in mysql-log-rotate.sh to refer to mysqld, not mysqld_safe as that's what most distros are using. * Change err-log to log-error as err-log is no longer valid. * Convert tab to space for consistency.
| | * Fix spelling mistakes in MyISAM code commentsIan Gilfillan2019-09-2019-29/+29
| | |
| | * MDEV-20596 Configure fails with newer CMakeRyan Coe2019-09-201-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix build error with newer cmake Fixes the following build error: CMake Error at cmake/os/Linux.cmake:29 (STRING): STRING sub-command REPLACE requires at least four arguments. Call Stack (most recent call first): CMakeLists.txt:101 (INCLUDE) CMake Error at cmake/os/Linux.cmake:29 (STRING): STRING sub-command REPLACE requires at least four arguments. Call Stack (most recent call first): CMakeLists.txt:101 (INCLUDE) The error happens when CMAKE_SHARED_LINKER_{LANG}_FLAGS is not set. Force the variable to be set to "" as input to prevent this. Signed-off-by: Ryan Coe <bluemrp9@gmail.com> Signed-off-by: Vicențiu Ciorbaru <vicentiu@mariadb.org>
* | | MDEV-20655 maturity stable for user_variablesRasmus Johansson2019-09-241-1/+1
| | |
* | | Remove the unused function btr_page_get()Marko Mäkelä2019-09-242-60/+1
| | | | | | | | | | | | btr_block_get(): Remove #ifdef around the definition
* | | Backporting 273d8eb12c40a6dcd05a8148bdfba3f1fd96e764 Proper fix for ↵Varun Gupta2019-09-2312-186/+85
| | | | | | | | | | | | disabling warnings in read_statistics_for_table()
* | | After-merge fix: Adjust a resultMarko Mäkelä2019-09-231-6/+6
| | |
* | | MDEV-17614 post-fix: Remove dead dup_chk_only=true code.Marko Mäkelä2019-09-234-56/+20
| | | | | | | | | | | | | | | The parameter dup_chk_only was always passed as a constant false. Remove the parameter and the dead code related to it.
* | | Merge 10.1 into 10.2Marko Mäkelä2019-09-239-16/+81
|\ \ \ | |/ /
| * | MDEV-18094: Query with order by limit picking index scan over filesortVarun Gupta2019-09-216-9/+62
| | | | | | | | | | | | | | | | | | In the function test_if_cheaper_ordering we make a decision if using an index is better than using filesort for ordering. If we chose to do range access then in test_quick_select we should make sure that cost for table scan is set to DBL_MAX so that it is not picked.
| * | MDEV-19207 systemd service: add instance name in descriptionChristian Hesse2019-09-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The unit files made systemd print: systemd[1]: Started MariaDB 10.3.13 database server (multi-instance). Let's add the instance name, so starting mariadb@foo.service makes it print: systemd[1]: Started MariaDB 10.3.13 database server (multi-instance foo).
| * | MDEV-19211 Fix mysqld_safe --dry-runVicențiu Ciorbaru2019-09-211-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | mysqld_safe --dry-run needs to either call exit or return, depending if it is being sourced or not, otherise return can lead to the error: return: can only `return' from a function or sourced script The original fix suggestion was proposed by FaramosCZ <mschorm@centrum.cz>
| * | Deb: Implement proper version detection in maintainer scriptsOtto Kekäläinen2019-09-181-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes bug introduced in commit 5415002. Using script run-time filename does not always work. One cannot assume that the filename is always the same as there might be temporary file names used by dpkg in certain situations. See Debian #920415. The same fix has been successfully in use in Debian official packages since February 2019: https://salsa.debian.org/mariadb-team/mariadb-10.3/commit/6440c0d6e75
* | | MDEV-19679 - CREATE SERVER needs tweaks for compatibility with CONNECT engineAnel Husakovic2019-09-209-19/+18
| | |
* | | MDEV 19205 Sphinx unable to connect using a host nameAnel Husakovic2019-09-202-0/+33
| | | | | | | | | | | | | | | | | | | | | - Enable the test `sphinx.sphinx` which was disabled by MDEV 10986, comit ee0094d2fd48dac0c - Add test case to `sphinx.sphinx` to cover host as localhost instead of `127.0.0.1` - Add result file for single test
* | | Fix Caribe 19992019-09-201-3/+4
| | | | | | | | | | | | | | | There's an annoying bug that prevents a Sphinx table to connect to a searchd using a host name. So the example table in the documentation https://mariadb.com/kb/en/library/about-sphinxse/#basic-usage that point's to "localhost" actually doesn't work. After some investigation I found two errors. The first one is a wrong check after the getaddrinfo call. The second is a wrong usage of the returned struct.
* | | MDEV-12646: systemd service file changes from FedoraDaniel Black2019-09-203-23/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Include comment header that describes overrides. Unit description now includes @VERSION@. After=syslog.target removed - redunant Add --basedir=@prefix to prevent /root/.my.cnf lookups. This is placed after $MYSQLD_OPTIONS in case a user sets a --{no,}default type options which has to be first in the mysqld arguements. Additional changes to multi instance (support-files/mariadb@.service.in): * added @SYSTEMD_EXECSTARTPRE@ / @SYSTEMD_EXECSTARTPOST@ * removed mariadb@bootstrap reference as galera_new_cluster as it's a little too proment. * use_galera_new_cluster.conf updated to override pre/post steps to ensure it has no side effects Signed-off-by: Daniel Black <daniel@linux.vnet.ibm.com>
* | | MDEV-16222: Move the test to gcol.innodb_virtual_debug_purgeMarko Mäkelä2019-09-206-98/+89
| | |
* | | MDEV-18438 Don't stream xtrabackup_info of extra-lsndirSimon Lipp2019-09-198-10/+62
| | |
* | | MDEV-20483 Follow-up fixThirunarayanan Balathandayuthapani2019-09-181-0/+12
| | | | | | | | | | | | | | | | | | At commit, trx->lock.table_locks (which is a cache of trx_locks) can consist of NULL pointers. Add a debug assertion for that, and clear the vector.
* | | Enable galera.MW-286 test case.Stepan Patryshev2019-09-181-2/+1
| | |
* | | Merge 10.1 into 10.2Marko Mäkelä2019-09-1842-515/+513
|\ \ \ | |/ /
| * | MDEV-19529 InnoDB hang on DROP FULLTEXT INDEXThirunarayanan Balathandayuthapani2019-09-1826-490/+169
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: ======= During dropping of fts index, InnoDB waits for fts_optimize_remove_table() and it holds dict_sys->mutex and dict_operaiton_lock even though the table id is not present in the queue. But fts_optimize_thread does wait for dict_sys->mutex to process the unrelated table id from the slot. Solution: ======== Whenever table is added to fts_optimize_wq, update the fts_status of in-memory fts subsystem to TABLE_IN_QUEUE. Whenever drop index wants to remove table from the queue, it can check the fts_status to decide whether it should send the MSG_DELETE_TABLE to the queue. Removed the following functions because these are all deadcode. dict_table_wait_for_bg_threads_to_exit(), fts_wait_for_background_thread_to_start(),fts_start_shutdown(), fts_shudown().