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
Mats Kindahl bd53d21417 Bug #36763
TRUNCATE TABLE fails to replicate when stmt-based binlogging is not supported.

There were two separate problems with the code, both of which are fixed with
this patch:

1. An error was printed by InnoDB for TRUNCATE TABLE in statement mode when
   the in isolation levels READ COMMITTED and READ UNCOMMITTED since InnoDB
   does permit statement-based replication for DML statements. However,
   the TRUNCATE TABLE is not transactional, but is a DDL, and should therefore
   be allowed to be replicated as a statement.

2. The statement was not logged in mixed mode because of the error above, but
   the error was not reported to the client.

This patch fixes the problem by treating TRUNCATE TABLE a DDL, that is, it is
always logged as a statement and not reporting an error from InnoDB for TRUNCATE
TABLE.


mysql-test/extra/binlog_tests/binlog_truncate.test:
  Adding new test to check that TRUNCATE TABLE is written correctly
  to the binary log.
mysql-test/extra/rpl_tests/rpl_truncate.test:
  Removing redundant testing by eliminating settings of BINLOG_FORMAT.
mysql-test/extra/rpl_tests/rpl_truncate_helper.test:
  Replacing slave and master reset code with include file.
  Removing settings of BINLOG_FORMAT.
  Replacing printing of table contents to compare master and slave
  with diff_tables.inc.
mysql-test/suite/binlog/t/binlog_truncate_innodb.test:
  Adding test for testing that TRUNCATE TABLE is logged correctly for InnoDB
  in all isolation levels.
mysql-test/suite/binlog/t/binlog_truncate_myisam.test:
  Adding test for testing that TRUNCATE TABLE is logged correctly for MyISAM.
mysql-test/suite/binlog/t/disabled.def:
  Disabling binlog_truncate_innodb since it does not work (yet).
sql/sql_base.cc:
  Correcting setting of capabilities flags to make the comparison with 0
  later in the code work correctly.
sql/sql_delete.cc:
  Re-organizing code to ensure that TRUNCATE TABLE is logged in statement
  format and that row format is not used unless there are rows to log (which
  there are not when delete_all_rows() is called, so this has to be logged
  as a statement).
2009-02-06 17:06:41 +01:00
.bzr-mysql Again, the branch designation "-bugteam" made it to the main tree, 2009-01-15 18:35:21 +01:00
BitKeeper
BUILD Merge the bashism removal from 5.0 up to 5.1-build 2008-12-28 16:18:08 +01:00
client Fix for 2009-01-14 18:50:51 +04:00
cmd-line-utils Merge pcg5ppc.xiphis.org:/Network/Servers/anubis.xiphis.org/home/antony/work/mysql-5.1-engines 2008-03-07 13:46:29 -08:00
config/ac-macros Fix Bug#32831: libmysql should be built with all charsets 2009-01-13 16:16:03 +01:00
dbug Bug#38522: 5 seconds delay when closing application using embedded server 2008-12-04 19:41:53 +01:00
Docs Makefile.am: 2008-04-08 11:44:18 +02:00
extra Bug#41612: resolve_stack_dump does not decode 5.1 stack trace 2008-12-19 08:47:28 -02:00
include Fix Bug#32831: libmysql should be built with all charsets 2009-01-13 16:16:03 +01:00
libmysql Bug#38522: 5 seconds delay when closing application using embedded server 2008-12-04 19:41:53 +01:00
libmysql_r
libmysqld Bug#38522: 5 seconds delay when closing application using embedded server 2008-12-04 19:41:53 +01:00
man Bug#37098 Get rid of "Installed (but unpackaged)" files in the RPM build 2008-08-27 16:03:39 +02:00
mysql-test Bug #36763 2009-02-06 17:06:41 +01:00
mysys Merge fix for bug 38364. 2009-01-13 10:50:22 -05:00
netware Merge from 5.0-bugteam local. 2008-08-18 13:33:00 -04:00
plugin
pstack
regex
scripts bug#41828: mysql_install_db misses mysqld options when using --basedir 2009-01-06 15:08:15 +00:00
server-tools merge 2008-09-01 11:48:21 +02:00
sql Bug #36763 2009-02-06 17:06:41 +01:00
sql-bench
sql-common auto-merge 2009-01-09 14:22:15 +01:00
storage Add another cast to ignore int/ulong difference in error types, silence warning on Win64 2009-01-16 17:49:07 +01:00
strings merged 5.1-main -> 5.1-bugteam 2009-01-05 18:10:20 +02:00
support-files Merge 2008-12-28 08:03:44 +01:00
tests Merge from 5.0-bugteam 2009-01-15 08:28:10 -02:00
unittest
vio Merge bk-internal.mysql.com:/home/bk/mysql-5.1-build 2008-02-21 19:53:37 -05:00
win Bug#38784: Mysql server crash if table is altered with partition changes. 2008-11-12 13:36:53 +01:00
zlib The header "config.h" needs to be included "early" to control other headers. 2008-10-13 14:23:39 +02:00
.bzrignore merge 2008-11-28 15:01:09 +01:00
.cvsignore
CMakeLists.txt Bug#38784: Mysql server crash if table is altered with partition changes. 2008-11-12 13:36:53 +01:00
configure.in Raise version number after cloning 5.1.31 2009-01-15 16:48:10 +01:00
COPYING
EXCEPTIONS-CLIENT
INSTALL-SOURCE
INSTALL-WIN-SOURCE
Makefile.am mysql-test/r/partition.result 2008-11-25 03:04:58 +01:00
README

This is a release of MySQL, a dual-license SQL database server.
MySQL is brought to you by the MySQL team at MySQL AB.

License information can be found in these files:
- For GPL (free) distributions, see the COPYING file and
  the EXCEPTIONS-CLIENT file.
- For commercial distributions, see the LICENSE.mysql file.


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 manual sections of special interest:

- If you are migrating from an older version of MySQL, please read the
  "Upgrading from..." section first!
- 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 Change History appendix.
- For the currently known bugs/misfeatures (known errors) see the Problems
  and Common Errors appendix.
- For a list of developers and other contributors, see the Credits
  appendix.

A local copy of the MySQL Reference Manual can be found in the Docs
directory in GNU Info format.  You can also browse the manual online or
download it in any of several formats at the URL given earlier in this
file.

************************************************************

IMPORTANT:

Bug or error reports should be sent to http://bugs.mysql.com.