summaryrefslogtreecommitdiff
path: root/sql/mysqld.cc
Commit message (Collapse)AuthorAgeFilesLines
* Merge 10.3 into 10.4Marko Mäkelä2018-11-061-0/+12
|\
| * Merge 10.2 into 10.3Marko Mäkelä2018-11-061-0/+12
| |\ | | | | | | | | | | | | | | | | | | | | | | | | main.derived_cond_pushdown: Move all 10.3 tests to the end, trim trailing white space, and add an "End of 10.3 tests" marker. Add --sorted_result to tests where the ordering is not deterministic. main.win_percentile: Add --sorted_result to tests where the ordering is no longer deterministic.
| | * Merge 10.1 into 10.2Marko Mäkelä2018-11-061-0/+12
| | |\
| | | * Merge branch '10.0' into 10.1Sergei Golubchik2018-10-301-0/+12
| | | |\
| | | | * Fix typo in 5936d43afb6ad5a75d9eed17eb39e8c00a08a684Marko Mäkelä2018-10-121-1/+1
| | | | |
| | | | * threadpool_size can contribute to the wanted_filesDaniel Black2018-10-121-0/+4
| | | | |
| | | | * MDEV-17413 Crash in my_malloc_size_cb_func() during shutdown withVladislav Vaintroub2018-10-091-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | forceful connection close. Fix is to ensure that when close_connection() is called from shutdown thread, current_thd is set. This that allocation callback for THD specific memory won't assert(in debug version), or crash (in 10.1 and later) close_connection() allocates THD specific memory e.g when it writes the final error packet, and compression is ON for the connection.
* | | | | Merge 10.3 into 10.4Marko Mäkelä2018-10-171-7/+9
|\ \ \ \ \ | |/ / / /
| * | | | Merge 10.2 into 10.3Marko Mäkelä2018-10-111-7/+9
| |\ \ \ \ | | |/ / /
| | * | | Merge 10.1 into 10.2Marko Mäkelä2018-10-111-7/+9
| | |\ \ \ | | | |/ /
| | | * | MDEV-17413 - Don't crash in my_malloc_size_cb_func()Vladislav Vaintroub2018-10-091-7/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | if thread specific memory is requested and current_thd is NULL. Leave DBUG_ASSERT() in place, to check in DBUG version.
* | | | | Merge 10.3 into 10.4Marko Mäkelä2018-10-101-4/+0
|\ \ \ \ \ | |/ / / /
| * | | | Merge 10.2 into 10.3Marko Mäkelä2018-10-091-4/+0
| |\ \ \ \ | | |/ / /
| | * | | MDEV-14581 Server does not clear diagnostics between sessionsVladislav Vaintroub2018-10-051-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | Amend previous patch, so it works in all cases (also for "change user" command, and for RESET CONNECTION in 10.3)
* | | | | Merge branch 'bb-10.4-wlad' into 10.4Vladislav Vaintroub2018-10-051-417/+124
|\ \ \ \ \
| * | | | | MDEV-10384 Windows : Refactor threading in mysqld startup.Vladislav Vaintroub2018-10-051-417/+124
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove threads that are doing nothing but wait - main thread now handles the connections (if threadpool is used, also threadpool threads would wait for connections) - thread for socket and pipe connections are removed - shutdown thread is now removed, we wait for shutdown notification in main thread as well - kill_server() is also called inside the main thread, after connection loop finished.
* | | | | | Merge 10.3 into 10.4Marko Mäkelä2018-10-051-1/+1
|\ \ \ \ \ \ | |/ / / / / |/| / / / / | |/ / / /
| * | | | Merge branch '10.2' into 10.3Sergei Golubchik2018-09-281-1/+1
| |\ \ \ \ | | |/ / /
| | * | | Merge branch '10.1' into 10.2Oleksandr Byelkin2018-09-141-1/+1
| | |\ \ \ | | | |/ /
| | | * | MDEV-15436: If log_bin and log_bin_index is different SST with rsync fails.Jan Lindström2018-09-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem was that in SST log_bin_index name and directory was not handled and passed to rsync SST script. wsrep_sst_common.sh Read binlog index dirname and filename if --binlog-index parameter is provided. Read binlog filenames from that file from donor and write transfered binlog filenames to that file in joiner. mysqld.cc, mysqld.h Moved opt_binlog_index_name from static to global and added it to extern. wsrep_sst.cc generate_binlog_index_opt_val New function to generate binlog index name if opt_binlog_index_name is given on configuration. sst_prepare_other Add binlog index configuration to SST command. wsrep_sst.h Add new SST parameter --binlog-index Add test case.
* | | | | Merge 10.3 into 10.4Marko Mäkelä2018-09-111-11/+11
|\ \ \ \ \ | |/ / / /
| * | | | Merge 10.2 into 10.3Marko Mäkelä2018-09-061-14/+0
| |\ \ \ \ | | |/ / /
| | * | | Merge 10.1 into 10.2Marko Mäkelä2018-08-311-14/+0
| | |\ \ \ | | | |/ /
| | | * | Revert MDEV-9519 due to regressionsMarko Mäkelä2018-08-311-14/+0
| | | | | | | | | | | | | | | | | | | | This reverts commit 75dfd4acb995789ca5f86ccbd361fff9d2797e79.
| * | | | Merge 10.2 into 10.3Marko Mäkelä2018-08-281-11/+25
| |\ \ \ \ | | |/ / /
| | * | | Merge 10.1 into 10.2Marko Mäkelä2018-08-211-11/+25
| | |\ \ \ | | | |/ /
| | | * | Merge branch '10.0' into 10.1Oleksandr Byelkin2018-08-211-11/+11
| | | |\ \ | | | | |/
| | | | * Merge branch '5.5' into 10.0Oleksandr Byelkin2018-08-151-11/+11
| | | | |\
| | | | | * MDEV-16963 Tighten named pipe access controlVladislav Vaintroub2018-08-131-11/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use real DACL instead of NULL DACL. Grant Everyone just read/write access to pipe (instead of all access like previously with NULL ACL)
| | | * | | This is patch for the https://jira.mariadb.org/browse/MDEV-9519 issue:Julius Goryavsky2018-08-151-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If we have a 2+ node cluster which is replicating from an async master and the binlog_format is set to STATEMENT and multi-row inserts are executed on a table with an auto_increment column such that values are automatically generated by MySQL, then the server node generates wrong auto_increment values, which are different from what was generated on the async master. The causes and fixes: 1. We need to improve processing of changing the auto-increment values after changing the cluster size. 2. If wsrep auto_increment_control switched on during operation of the node, then we should immediately update the auto_increment_increment and auto_increment_offset global variables, without waiting of the next invocation of the wsrep_view_handler_cb() callback. In the current version these variables retain its initial values if wsrep_auto_increment_control is switched on during operation of the node, which leads to inconsistent results on the different nodes in some scenarios. 3. If wsrep auto_increment_control switched off during operation of the node, then we must return the original values of the auto_increment_increment and auto_increment_offset global variables, as the user has set. To make this possible, we need to add a "shadow copies" of these variables (which stores the latest values set by the user).
* | | | | | MDEV-16536 Remove shared memory transportVladislav Vaintroub2018-08-201-322/+18
| | | | | |
* | | | | | Merge 10.3 into 10.4Marko Mäkelä2018-08-161-3/+9
|\ \ \ \ \ \ | |/ / / / /
| * | | | | Merge branch '10.2' into 10.3Sergei Golubchik2018-08-121-1/+1
| |\ \ \ \ \ | | |/ / / /
| | * | | | SLES11 OpenSSL 0.9.8 supportSergei Golubchik2018-08-091-1/+1
| | | | | |
| * | | | | Merge 10.2 into 10.3Marko Mäkelä2018-08-031-2/+8
| |\ \ \ \ \ | | |/ / / /
| | * | | | Merge 10.1 into 10.2Marko Mäkelä2018-08-021-2/+8
| | |\ \ \ \ | | | |/ / /
| | | * | | MDEV-16689: core-file should become a real server variablebb-10.1-MDEV-16689Oleksandr Byelkin2018-07-201-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | Mysql Bug#56124 bug analog fix using Sys_var_bit.
| | | * | | Merge branch '10.0' into bb-10.1-mergebb-10.1-merge-sanjaOleksandr Byelkin2018-07-191-1/+6
| | | |\ \ \ | | | | |/ /
| | | | * | Post-fix after MDEV-8540 - do not close stdin on Windows.Vladislav Vaintroub2018-07-021-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | It is not open.
| | | | * | MDEV-8540 - Crash on server shutdown since 10.0.16Sergey Vojtovich2018-06-271-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Only close stdin if it was open initinally. Otherwise we may close file descriptor which is reused for different puprose (specifically for binlog index file in case of this bug).
| | | * | | MDEV-13577 slave_parallel_mode=optimistic should not report the mode's ↵Sergei Golubchik2018-06-201-10/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | specific temporary errors Revert 7bbe324fc17 Fix the bug differently (in log_event.cc) Fix the test case to actually fail without the bug fix
| | | * | | MDEV-13577 slave_parallel_mode=optimistic should not report the mode'sAndrei Elkin2018-06-121-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | specific temporary errors The optimistic parallel slave's worker thread could face a run-time error due to the algorithm's specifics which allows for conflicts like the reported "Can't find record in 'table'". A typical stack is like {noformat} #0 handler::print_error (this=0x61c00008f8a0, error=149, errflag=0) at handler.cc:3650 #1 0x0000555555e95361 in write_record (thd=thd@entry=0x62a0000a2208, table=table@entry=0x61f00008ce88, info=info@entry=0x7fffdee356d0) at sql_insert.cc:1944 #2 0x0000555555ea7767 in mysql_insert (thd=thd@entry=0x62a0000a2208, table_list=0x61b00012ada0, fields=..., values_list=..., update_fields=..., update_values=..., duplic=<optimized out>, ignore=<optimized out>) at sql_insert.cc:1039 #3 0x0000555555efda90 in mysql_execute_command (thd=thd@entry=0x62a0000a2208) at sql_parse.cc:3927 #4 0x0000555555f0cc50 in mysql_parse (thd=0x62a0000a2208, rawbuf=<optimized out>, length=<optimized out>, parser_state=<optimized out>) at sql_parse.cc:7449 #5 0x00005555566d4444 in Query_log_event::do_apply_event (this=0x61200005b9c8, rgi=<optimized out>, query_arg=<optimized out>, q_len_arg=<optimized out>) at log_event.cc:4508 #6 0x00005555566d639e in Query_log_event::do_apply_event (this=<optimized out>, rgi=<optimized out>) at log_event.cc:4185 #7 0x0000555555d738cf in Log_event::apply_event (rgi=0x61d0001ea080, this=0x61200005b9c8) at log_event.h:1343 #8 apply_event_and_update_pos_apply (ev=ev@entry=0x61200005b9c8, thd=thd@entry=0x62a0000a2208, rgi=rgi@entry=0x61d0001ea080, reason=<optimized out>) at slave.cc:3479 #9 0x0000555555d8596b in apply_event_and_update_pos_for_parallel (ev=ev@entry=0x61200005b9c8, thd=thd@entry=0x62a0000a2208, rgi=rgi@entry=0x61d0001ea080) at slave.cc:3623 #10 0x00005555562aca83 in rpt_handle_event (qev=qev@entry=0x6190000fa088, rpt=rpt@entry=0x62200002bd68) at rpl_parallel.cc:50 #11 0x00005555562bd04e in handle_rpl_parallel_thread (arg=arg@entry=0x62200002bd68) at rpl_parallel.cc:1258 {noformat} Here {{handler::print_error}} computes whether to error log the current error when --log-warnings > 1. The decision flag is consulted bu {{my_message_sql()}} which can be eventually called. In the bug case the decision is to log. However in the optimistic mode slave applier case any conflict is attempted to resolve with rollback and retry to success. Hence the logging is at least extraneous. The case is fixed with adding a new flag {{ME_LOG_AS_WARN}} which {{handler::print_error}} may propagate further on through {{my_error}} when the error comes from an optimistically running slave worker thread. The new flag effectively requests the warning level for the errlog record, while the thread's DA records the actual error (which is regarded as temporary one by the parallel slave error handler).
| | | * | | Merge 10.0 into 10.1Marko Mäkelä2018-04-241-1/+1
| | | |\ \ \ | | | | |/ /
| | | | * | Merge branch '5.5' into 10.0Sergei Golubchik2018-04-201-1/+1
| | | | |\ \ | | | | | |/
| | | | | * Merge branch 'mysql/5.5' into 5.5Sergei Golubchik2018-04-191-1/+1
| | | | | |\
| | | | | | * Bug#26585560 - MYSQL DAEMON SHOULD CREATE ITS PID FILE ASShishir Jaiswal2017-12-021-1/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ROOT DESCRIPTION =========== If the .pid file is created at a world-writable location, it can be compromised by replacing the server's pid with another running server's (or some other non-mysql process) PID causing abnormal behaviour. ANALYSIS ======== In such a case, user should be warned that .pid file is being created at a world-writable location. FIX === A new function is_file_or_dir_world_writable() is defined and it is called in create_pid_file() before .pid file creation. If the location is world-writable, a relevant warning is thrown. NOTE ==== 1. PID file is always created with permission bit 0664, so for outside world its read-only. 2. Ignoring the case when permission is denied to get the dir stats since the .pid file creation would fail anyway in such a case.
* | | | | | | mysys: ME_ERROR_LOG_ONLY flagSergei Golubchik2018-06-041-1/+3
| | | | | | |
* | | | | | | mysys: rename ME_xxx flags to match plugin apiSergei Golubchik2018-06-041-6/+6
| | | | | | |
* | | | | | | Merge branch '10.3' into 10.4Igor Babaev2018-06-031-39/+33
|\ \ \ \ \ \ \ | |/ / / / / /
| * | | | | | Merge 10.2 into 10.3Marko Mäkelä2018-05-291-1/+2
| |\ \ \ \ \ \ | | |/ / / / /