MariaDB server is a community developed fork of MySQL server. Started by core members of the original MySQL team, MariaDB actively works with outside developers to deliver the most featureful, stable, and sanely licensed open SQL server in the industry.
Find a file
Sujatha Sivakumar c6d8569d41 Bug#13596613:SHOW SLAVE STATUS GIVES WRONG OUTPUT WITH
MASTER-MASTER AND USING SET USE

Problem:
=======
In a master-master set-up, a master can show a wrong
'SHOW SLAVE STATUS' output.

Requirements:
- master-master
- log_slave_updates

This is caused when using SET user-variables and then using
it to perform writes. From then on the master that performed
the insert will have a SHOW SLAVE STATUS that is wrong and  
it will never get updated until a write happens on the other
master. On"Master A" the "exec_master_log_pos" is not
getting updated.

Analysis:
========
Slave receives a "User_var" event from the master and after
applying the event, when "log_slave_updates" option is
enabled the slave tries to write this applied event into
its own binary log. At the time of writing this event the
slave should use the "originating server-id". But in the
above case the sever always logs the  "user var events"
by using its global server-id. Due to this in a
"master-master" replication when the event comes back to the
originating server the "User_var_event" doesn't get skipped.
"User_var_events" are context based events and they always
follow with a query event which marks their end of group.
Due to the above mentioned problem with "User_var_event"
logging the "User_var_event" never gets skipped where as
its corresponding "query_event" gets skipped. Hence the
"User_var" event always waits for the next "query event"
and the "Exec_master_log_position" does not get updated
properly.

Fix:
===
`MYSQL_BIN_LOG::write' function is used to write events
into binary log. Within this function a new object for
"User_var_log_event" is created and this new object is used
to write the "User_var" event in the binlog. "User var"
event is inherited from "Log_event". This "Log_event" has
different overloaded constructors. When a "THD" object
is present "Log_event(thd,...)" constructor should be used
to initialise the objects and in the absence of a valid
"THD" object "Log_event()" minimal constructor should be
used. In the above mentioned problem always default minimal
constructor was used which is incorrect. This minimal
constructor is replaced with "Log_event(thd,...)".
2012-08-14 14:11:01 +05:30
.bzr-mysql merge mysql-5.0-security->mysql-5.1-security 2011-08-17 13:25:33 +03:00
BitKeeper
BUILD Updated/added copyright headers 2011-06-30 17:37:13 +02:00
client BUG#11757312: MYSQLBINLOG DOES NOT ACCEPT INPUT FROM STDIN 2012-08-08 22:15:46 +05:30
cmd-line-utils Fixes required to build on AIX 2012-01-11 18:40:29 +01:00
config/ac-macros Bug#57991: Compiler flag change build error : adler32.c 2010-12-07 13:06:20 -02:00
dbug Merge 2010-12-29 00:47:05 +01:00
Docs INSTALL-BINARY placeholder: change invalid URLs (request from Kristofer) 2012-07-31 20:41:46 +02:00
extra Bug #13115401: -SSL-KEY VALUE IS NOT VALIDATED AND IT ALLOWS INSECURE 2012-08-11 15:43:04 +05:30
include Bug#13928675 MYSQL CLIENT COPYRIGHT NOTICE MUST 2012-08-07 18:58:19 +05:30
libmysql Bug #13708485: malformed resultset packet crashes client 2012-06-28 18:38:55 +03:00
libmysql_r Merge from mysql-5.0-bugteam. 2010-11-24 13:07:37 +03:00
libmysqld Merge unpushed changes from 5.1.64-release 2012-07-12 10:00:14 +02:00
man Updated/added copyright headers 2011-06-30 17:37:13 +02:00
mysql-test Bug #13115401: -SSL-KEY VALUE IS NOT VALIDATED AND IT ALLOWS INSECURE 2012-08-11 15:43:04 +05:30
mysys BUG#11762670:MY_B_WRITE RETURN VALUE IGNORED 2012-07-10 14:23:17 +05:30
netware Bug #45058 init_available_charsets uses double checked locking 2009-12-12 19:11:25 +01:00
plugin Updated/added copyright headers 2011-07-03 17:47:37 +02:00
regex Updated/added copyright headers 2011-06-30 17:37:13 +02:00
scripts Bug#13741677 MYSQL_SECURE_INSTALLATION DOES NOT 2012-07-26 21:47:03 +05:30
server-tools Updated/added copyright headers 2011-06-30 17:37:13 +02:00
sql Bug#13596613:SHOW SLAVE STATUS GIVES WRONG OUTPUT WITH 2012-08-14 14:11:01 +05:30
sql-bench Updated/added copyright headers 2011-06-30 17:37:13 +02:00
sql-common Bug #13708485: malformed resultset packet crashes client 2012-06-28 18:38:55 +03:00
storage Bug#14399148 INNODB TABLES UNDER LOAD PRODUCE DUPLICATE COPIES OF ROWS 2012-08-09 09:55:29 +03:00
strings Bug #13889741: HANDLE_FATAL_SIGNAL IN _DB_ENTER_ | 2012-07-05 13:41:16 +03:00
support-files Fix bug#11886309: RPM UPGRADE OF MYSQL ADVANCED GPL TO MYSQL SERVER ADVANCED DOES NOT WORK 2011-10-04 15:58:19 +02:00
tests mysql_client_fw.c was not included in make dist 2012-07-10 11:57:24 +02:00
unittest Updated/added copyright headers 2012-02-15 17:21:38 +01:00
vio Bug #13115401: -SSL-KEY VALUE IS NOT VALIDATED AND IT ALLOWS INSECURE 2012-08-11 15:43:04 +05:30
win Updated/added copyright headers 2011-07-03 17:47:37 +02:00
zlib
.bzrignore Bug#12361113: CRASH WHEN "LOAD INDEX INTO CACHE" WITH TOO 2011-12-12 14:07:02 +01:00
.cvsignore
CMakeLists.txt Bug #14035452 - MODULARIZE MYSQL_CLIENT_TEST 2012-07-19 12:57:36 +02:00
configure.in Reverting broken configure/make stuff 2012-07-19 15:55:41 +02:00
COPYING Use a new version of "COPYING", the GPL text. 2010-03-04 14:26:27 +01:00
INSTALL-SOURCE
INSTALL-WIN-SOURCE
Makefile.am Reverting broken configure/make stuff 2012-07-19 15:55:41 +02:00
README Upmerge the copyright year change, from 5.0 to 5.1. 2012-02-28 12:44:21 +01:00

MySQL Server 5.1

This is a release of MySQL, a dual-license SQL database server.
For the avoidance of doubt, this particular copy of the software 
is released under the version 2 of the GNU General Public License. 
MySQL is brought to you by Oracle.

Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.

License information can be found in the COPYING file.

MySQL FOSS License Exception
We want free and open source software applications under certain
licenses to be able to use specified GPL-licensed MySQL client
libraries despite the fact that not all such FOSS licenses are
compatible with version 2 of the GNU General Public License.  
Therefore there are special exceptions to the terms and conditions 
of the GPLv2 as applied to these client libraries, which are 
identified and described in more detail in the FOSS License 
Exception at 
<http://www.mysql.com/about/legal/licensing/foss-exception.html>.

This distribution may include materials developed by third
parties. For license and attribution notices for these
materials, please refer to the documentation that accompanies
this distribution (see the "Licenses for Third-Party Components"
appendix) or view the online documentation at 
<http://dev.mysql.com/doc/>.

GPLv2 Disclaimer
For the avoidance of doubt, except that if any license choice
other than GPL or LGPL is available it will apply instead, 
Oracle elects to use only the General Public License version 2 
(GPLv2) at this time for any software where a choice of GPL 
license versions is made available with the language indicating 
that GPLv2 or any later version may be used, or where a choice 
of which version of the GPL is applied is otherwise unspecified.

For further information about MySQL or additional documentation, 
see:
- The latest information about MySQL: http://www.mysql.com
- The current MySQL documentation: http://dev.mysql.com/doc

Some Reference Manual sections of special interest:
- If you are migrating from an older version of MySQL, please 
  read the "Upgrading from..." section.
- To see what MySQL can do, take a look at the features section.
- For installation instructions, see the Installing and Upgrading
  chapter.
- For the new features/bugfix history, see the MySQL Change History 
  appendix.

You can browse the MySQL Reference Manual online or download it 
in any of several formats at the URL given earlier in this file.
Source distributions include a local copy of the manual in the
Docs directory.