summaryrefslogtreecommitdiff
path: root/sql/rpl_mi.cc
Commit message (Collapse)AuthorAgeFilesLines
* cleanup: PSI key is *always* the first argumentSergei Golubchik2020-03-101-6/+5
|
* perfschema memory related instrumentation changesSergei Golubchik2020-03-101-6/+9
|
* perfschema - various collateral cleanups and small changesSergei Golubchik2020-03-101-0/+2
|
* Merge branch '10.3' into 10.4Oleksandr Byelkin2019-12-091-1/+1
|\
| * Lintian complains on spelling errorFaustin Lammler2019-12-021-1/+1
| | | | | | | | | | The lintian check complains on spelling error: https://salsa.debian.org/mariadb-team/mariadb-10.3/-/jobs/95739
* | Merge 10.3 into 10.4Marko MÀkelÀ2019-07-251-9/+0
|\ \ | |/
| * Merge 10.2 into 10.3Eugene Kosov2019-07-161-9/+0
| |\
| | * Merge 10.1 into 10.2Eugene Kosov2019-07-091-9/+0
| | |\
| | | * fix Galera memory leakEugene Kosov2019-07-081-7/+0
| | | | | | | | | | | | | | | | This was caused by 7f2cfa8f47cf05d8dbea65ced3656fd0fc6efbf5
| | | * MDEV-8874 Replication filters configured in my.cnf are ignored if slave ↔Sachin2019-06-271-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | reset and reconfigured Don't delete the rpl_filter on RESET SLAVE.
* | | | Merge branch '10.3' into 10.4Oleksandr Byelkin2019-06-141-1/+1
|\ \ \ \ | |/ / /
| * | | Merge branch '10.2' into 10.3Oleksandr Byelkin2019-06-141-1/+1
| |\ \ \ | | |/ /
| | * | Merge 10.1 into 10.2Marko MÀkelÀ2019-06-121-1/+1
| | |\ \ | | | |/
| | | * MDEV-18913: typo in error logSujatha2019-05-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: ======== Following typo in error log: 2019-03-13 15:58:10 0 [Note] Reading of all Master_info entries succeded Should be 'succeeded' Fix: === Fixed the typo with the right word 'succeeded'.
* | | | Merge branch '10.3' into 10.4Oleksandr Byelkin2019-05-191-1/+1
|\ \ \ \ | |/ / /
| * | | Merge 10.2 into 10.3Marko MÀkelÀ2019-05-141-1/+1
| |\ \ \ | | |/ /
| | * | Merge 10.1 into 10.2Marko MÀkelÀ2019-05-131-1/+1
| | |\ \ | | | |/
| | | * Merge branch '5.5' into 10.1Vicențiu Ciorbaru2019-05-111-1/+1
| | | |\
| | | | * Update FSF AddressVicențiu Ciorbaru2019-05-111-1/+1
| | | | | | | | | | | | | | | | | | | | * Update wrong zip-code
* | | | | MDEV-18400 - Move shutdown handling to main threadSergey Vojtovich2019-01-291-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signal handler is now respoinsible for setting abort_loop and breaking poll() in main thread. The rest is handled by main thread itself. Removed redundant LOCK_error_log init/destroy wrappers. Removed redundant unireg_end(): it is trivial and it has only one caller. Removed unused ready_to_exit from PFS. Removed kill_in_progress: duplicates abort_loop. Removed shutdown_in_progress: duplicates abort_loop. Removed ready_to_exit: was used to make sure main thread waits for cleanups, which are now done by main thread itself. Removed SIGNALS_DONT_BREAK_READ, MAYBE_BROKEN_SYSCALL, kill_broken_server: never defined/used. Make clean_up() static.
* | | | | mysys: rename ME_xxx flags to match plugin apiSergei Golubchik2018-06-041-3/+3
|/ / / /
* | | | Add likely/unlikely to speed up executionMonty2018-05-071-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added to: - if (error) - Lex - sql_yacc.yy and sql_yacc_ora.yy - In header files to alloc() calls - Added thd argument to thd_net_is_killed()
* | | | Mdev-10664 Add statuses about optimistic parallel replication stallsSachin Setiya2018-04-191-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In this commit we are adding three more status variable to SHOW SLAVE STATUS. Slave_DDL_Events and Slave_Non_Transactional_Events. Slave_DDL_Groups:- This status variable counts the occurrence of DDL statements Slave_Non_Transactional_Groups:- This variable count the occurrence of non-transnational event group. Slave_Transactional_Groups:- This variable count the occurrence of transnational event group. Patch Credit:- Kristian Nielsen
* | | | MDEV-15091 : Windows, 64bit: reenable and fix warning C4267 (conversion from ↔Vladislav Vaintroub2018-02-061-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 'size_t' to 'type', possible loss of data) Handle string length as size_t, consistently (almost always:)) Change function prototypes to accept size_t, where in the past ulong or uint were used. change local/member variables to size_t when appropriate. This fix excludes rocksdb, spider,spider, sphinx and connect for now.
* | | | Merge branch 'bb-10.2-ext' into 10.3Sergei Golubchik2017-08-261-3/+3
|\ \ \ \
| * \ \ \ Merge branch '10.2' into bb-10.2-extSergei Golubchik2017-08-251-3/+3
| |\ \ \ \ | | |/ / /
| | * | | Merge branch '10.1' into 10.2Sergei Golubchik2017-08-171-3/+3
| | |\ \ \ | | | |/ /
| | | * | Merge branch '10.0' into 10.1Sergei Golubchik2017-08-081-3/+3
| | | |\ \
| | | | * | memory leak: add a missing end_relay_log_info()Sergei Golubchik2017-07-271-0/+1
| | | | | |
| | | | * | Merge remote-tracking branch 'origin/5.5' into 10.0Vicențiu Ciorbaru2017-07-251-3/+2
| | | | |\ \ | | | | | |/
| | | | | * Merge remote-tracking branch 'mysql/5.5' into 5.5Sergei Golubchik2017-07-181-3/+2
| | | | | |\
| | | | | | * Bug#24901077: RESET SLAVE ALL DOES NOT ALWAYS RESET SLAVESujatha Sivakumar2017-02-281-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Description: ============ If you have a relay log index file that has ended up with some relay log files that do not exists, then RESET SLAVE ALL is not enough to get back to a clean state. Analysis: ========= In the bug scenario slave server is in stopped state and some of the relay logs got deleted but the relay log index file is not updated. During slave server restart replication initialization fails as some of the required relay logs are missing. User executes RESET SLAVE/RESET SLAVE ALL command to start a clean slave. As per the documentation RESET SLAVE command clears the master info and relay log info repositories, deletes all the relay log files, and starts a new relay log file. But in a scenario where the slave server's Relay_log_info object is not initialized slave will not purge the existing relay logs. Hence the index file still remains in a bad state. Users will not be able to start the slave unless these files are cleared. Fix: === RESET SLAVE/RESET SLAVE ALL commands should do the cleanup even in a scenario where Relay_log_info object initialization failed. Backported a flag named 'error_on_rli_init_info' which is required to identify slave's Relay_log_info object initialization failure. This flag exists in MySQL-5.6 onwards as part of BUG#14021292 fix. During RESET SLAVE/RESET SLAVE ALL execution this flag indicates the Relay_log_info initialization failure. In such a case open the relay log index/relay log files and do the required clean up.
| | | | | | * Updated/added copyright headersMySQL Build Team2012-02-161-1/+1
| | | | | | |\
| | | | | | * | BUG#11752315 - 43460: STOP SLAVE UNABLE TO COMPLETE WHEN SLAVE THREAD IS ↔Manish Kumar2012-01-231-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | TRYING TO RECONNECT TO Problem : The basic problem is the way the thread sleeps in mysql-5.5 and also in mysql-5.1 when we execute a stop slave on windows platform. On windows platform if the stop slave is executed after the master dies, we have this long wait before the stop slave return a value. This is because there is a sleep of the thread. The sleep is uninterruptable in the two above version, which was fixed by Davi patch for the BUG#11765860 for mysql-trunk. Backporting his patch for mysql-5.5 fixes the problem. Solution : A new pair of mutex and condition variable is introduced to synchronize thread sleep and finalization. A new mutex is required because the slave threads are terminated while holding the slave thread locks (run_lock), which can not be relinquished during termination as this would affect the lock order.
| | | | | | * | BUG#11809016 - NO WAY TO DISCOVER AN INSTANCE IS NO LONGER A SLAVE FOLLOWING ↔Alfranio Correia2011-07-181-1/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MYSQL BUG#28796 Before BUG#28796, an empty host was used to identify that an instance was no longer a slave. However, BUG#28796 changed this behavior and one cannot set an empty host. Besides, a RESET SLAVE only cleans up information on the next event to retrieve from the master, disables ssl and resets heartbeat period. So a call to SHOW SLAVE STATUS after issuing a RESET SLAVE still returns some valid information, such as host, port, user and password. To fix this problem, we have introduced the command RESET SLAVE ALL that does what a regular RESET SLAVE does and also clears host, port, user and password information thus allowing users to identify when an instance is no longer a slave.
| | | | | | * | Updated/added copyright headersKent Boortz2011-06-301-2/+2
| | | | | | |\ \ | | | | | | | |/
| | | | | | | * Updated/added copyright headersKent Boortz2011-06-301-2/+4
| | | | | | | |
| | | | | | * | Merge of mysql-trunk-bugfixing into mysql-trunk-merge.Davi Arnaut2010-07-151-1/+23
| | | | | | |\ \
| | | | | | | * | Bug#34043: Server loops excessively in _checkchunk() when safemalloc is enabledDavi Arnaut2010-07-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Essentially, the problem is that safemalloc is excruciatingly slow as it checks all allocated blocks for overrun at each memory management primitive, yielding a almost exponential slowdown for the memory management functions (malloc, realloc, free). The overrun check basically consists of verifying some bytes of a block for certain magic keys, which catches some simple forms of overrun. Another minor problem is violation of aliasing rules and that its own internal list of blocks is prone to corruption. Another issue with safemalloc is rather the maintenance cost as the tool has a significant impact on the server code. Given the magnitude of memory debuggers available nowadays, especially those that are provided with the platform malloc implementation, maintenance of a in-house and largely obsolete memory debugger becomes a burden that is not worth the effort due to its slowness and lack of support for detecting more common forms of heap corruption. Since there are third-party tools that can provide the same functionality at a lower or comparable performance cost, the solution is to simply remove safemalloc. Third-party tools can provide the same functionality at a lower or comparable performance cost. The removal of safemalloc also allows a simplification of the malloc wrappers, removing quite a bit of kludge: redefinition of my_malloc, my_free and the removal of the unused second argument of my_free. Since free() always check whether the supplied pointer is null, redudant checks are also removed. Also, this patch adds unit testing for my_malloc and moves my_realloc implementation into the same file as the other memory allocation primitives.
| | | | | | | * | BUG#54509: rpl_show_slave_running crashes the server sporadicallyLuis Soares2010-06-241-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: SQL and IO thread were racing for the IO_CACHE. The former to flush it, the latter to close it. In some cases this would cause the SQL thread to lock an invalid IO_CACHE mutex (it had been destroyed by IO thread). This would happen when SQL thread was initializing the master.info Solution: We solve this by locking the log and checking if it is hot. If it is we keep the log while seeking. Otherwise we release it right away, because a log can get from hot to cold, but not from cold to hot.
| | | | | | * | | Merge of mysql-5.1-bugteam into mysql-trunk-merge.Davi Arnaut2010-07-091-8/+5
| | | | | | |\ \ \ | | | | | | | |/ / | | | | | | |/| / | | | | | | | |/
| | | | | | | * BUG#53657: Slave crashed with error 22 when trying to lock mutexLuis Soares2010-05-241-5/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | at mf_iocache.c, line 1722 The slave crashed while two threads: IO thread and user thread raced for the same mutex (the append_buffer_lock protecting the relay log's IO_CACHE). The IO thread was trying to flush the cache, and for that was grabbing the append_buffer_lock. However, the other thread was closing and reopening the relay log when the IO thread tried to lock. Closing and reopening the log includes destroying and reinitialising the IO_CACHE mutex. Therefore, the IO thread tried to lock a destroyed mutex. We fix this by backporting patch for BUG#50364 which fixed this bug in mysql server 5.5+. The patch deploys missing synchronization when flush_master_info is called and the relay log is flushed by the IO thread. In detail the patch backports revision (from mysql-trunk): - luis.soares@sun.com-20100203165617-b1yydr0ee24ycpjm This patch already includes the post-push fix also in BUG#50364: - luis.soares@sun.com-20100222002629-0cijwqk6baxhj7gr
| | | | | | * | Bug#53983 Placeholder for MASTER_BIND in master.infoMagnus BlÄudd2010-06-021-3/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Reserve line 17 in master.info for master_bind which has been added in MySQL Cluster 6.3 - move the line for "list of server id for ignorable servers" to line 18
| | | | | | * | WL#5030: Split and remove mysql_priv.hMats Kindahl2010-03-311-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch: - Moves all definitions from the mysql_priv.h file into header files for the component where the variable is defined - Creates header files if the component lacks one - Eliminates all include directives from mysql_priv.h - Eliminates all circular include cycles - Rename time.cc to sql_time.cc - Rename mysql_priv.h to sql_priv.h
| | | | | | * | BUG#50364: manual merge to mysql-next-mr-bugfixing.Luis Soares2010-02-031-3/+16
| | | | | | |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts ========= Text conflict in sql/repl_failsafe.cc Additional changes ================== Replace references to pthread_mutex with mysql_mutex
| | | | | | | * | BUG#50364: FLUSH LOGS crashes the server (rpl.rpl_heartbeat_basicLuis Soares2010-02-031-3/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fails in PB sporadically) The IO thread can concurrently access the relay log IO_CACHE while another thread is performing an FLUSH LOGS procedure. FLUSH LOGS closes and reopens the relay log and while doing so it (re)initializes its IO_CACHE. During this procedure the IO_CACHE mutex is also reinitialized, which can cause problems if some other thread (namely the IO THREAD) is concurrently accessing it at the time . This patch fixes the problem by extending the interface of the flush_master_info function to also include a second paramater, "need_relay_log_lock", stating whether the thread should grab the relay log lock or not before actually flushing the relay log. Also, IO thread now calls flush_master_info with this flag set when it flushes master info with in the event read_event loop. Finally, we also increase loop time in rpl_heartbeat_basic test case, so that the number of calls to flush logs doubles, stressing this part of the code a little more.
| | | | | | * | | Patch to eliminate warnings in mysql-next-mr-bugteam.Mats Kindahl2010-01-251-2/+2
| | | | | | | | |
| | | | | | * | | WL#2360 Performance schemaMarc Alff2010-01-061-20/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Part IV: sql instrumentation
| | | | | | * | | BUG#48048: Deprecated constructs need removal in BetonyLuis Soares2009-11-041-42/+22
| | | | | | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | NOTE: Backport of: bzr log -r revid:sp1r-serg@sergbook.mysql.com-20070505200319-38337 ------------------------------------------------------------ revno: 2469.263.4 committer: serg@sergbook.mysql.com timestamp: Sat 2007-05-05 13:03:19 -0700 message: Removing deprecated features: --master-XXX command-line options log_bin_trust_routine_creators table_type BACKUP TABLE ... RESTORE TABLE ... SHOW PLUGIN LOAD TABLE ... FROM MASTER LOAD DATA FROM MASTER SHOW INNODB STATUS SHOW MUTEX STATUS SHOW TABLE TYPES ... TIMESTAMP(N) ... TYPE=engine RESET SLAVE don't reset connection parameters anymore LOAD DATA: check opt_secure_file_priv before access(filename) improved WARN_DEPRECATED macro
| | | | | | * | merge from 5.1-rpl+2 repo to a local branch with HB and bug@27808 fixesAndrei Elkin2009-10-011-7/+20
| | | | | | |\ \