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
Monty 91ab42a823 Clean up and speed up interfaces for binary row logging
MDEV-21605 Clean up and speed up interfaces for binary row logging
MDEV-21617 Bug fix for previous version of this code

The intention is to have as few 'if' as possible in ha_write() and
related functions. This is done by pre-calculating once per statement the
row_logging state for all tables.

Benefits are simpler and faster code both when binary logging is disabled
and when it's enabled.

Changes:
- Added handler->row_logging to make it easy to check it table should be
  row logged. This also made it easier to disabling row logging for system,
  internal and temporary tables.
- The tables row_logging capabilities are checked once per "statements
  that updates tables" in THD::binlog_prepare_for_row_logging() which
  is called when needed from THD::decide_logging_format().
- Removed most usage of tmp_disable_binlog(), reenable_binlog() and
  temporary saving and setting of thd->variables.option_bits.
- Moved checks that can't change during a statement from
  check_table_binlog_row_based() to check_table_binlog_row_based_internal()
- Removed flag row_already_logged (used by sequence engine)
- Moved binlog_log_row() to a handler::
- Moved write_locked_table_maps() to THD::binlog_write_table_maps() as
  most other related binlog functions are in THD.
- Removed binlog_write_table_map() and binlog_log_row_internal() as
  they are now obsolete as 'has_transactions()' is pre-calculated in
  prepare_for_row_logging().
- Remove 'is_transactional' argument from binlog_write_table_map() as this
  can now be read from handler.
- Changed order of 'if's in handler::external_lock() and wsrep_mysqld.h
  to first evaluate fast and likely cases before more complex ones.
- Added error checking in ha_write_row() and related functions if
  binlog_log_row() failed.
- Don't clear check_table_binlog_row_based_result in
  clear_cached_table_binlog_row_based_flag() as it's not needed.
- THD::clear_binlog_table_maps() has been replaced with
  THD::reset_binlog_for_next_statement()
- Added 'MYSQL_OPEN_IGNORE_LOGGING_FORMAT' flag to open_and_lock_tables()
  to avoid calculating of binary log format for internal opens. This flag
  is also used to avoid reading statistics tables for internal tables.
- Added OPTION_BINLOG_LOG_OFF as a simple way to turn of binlog temporary
  for create (instead of using THD::sql_log_bin_off.
- Removed flag THD::sql_log_bin_off (not needed anymore)
- Speed up THD::decide_logging_format() by remembering if blackhole engine
  is used and avoid a loop over all tables if it's not used
  (the common case).
- THD::decide_logging_format() is not called anymore if no tables are used
  for the statement. This will speed up pure stored procedure code with
  about 5%+ according to some simple tests.
- We now get annotated events on slave if a CREATE ... SELECT statement
  is transformed on the slave from statement to row logging.
- In the original code, the master could come into a state where row
  logging is enforced for all future events if statement could be used.
  This is now partly fixed.

Other changes:
- Ensure that all tables used by a statement has query_id set.
- Had to restore the row_logging flag for not used tables in
  THD::binlog_write_table_maps (not normal scenario)
- Removed injector::transaction::use_table(server_id_type sid, table tbl)
  as it's not used.
- Cleaned up set_slave_thread_options()
- Some more DBUG_ENTER/DBUG_RETURN, code comments and minor indentation
  changes.
- Ensure we only call THD::decide_logging_format_low() once in
  mysql_insert() (inefficiency).
- Don't annotate INSERT DELAYED
- Removed zeroing pos_in_table_list in THD::open_temporary_table() as it's
  already 0
2020-03-24 21:00:03 +02:00
BUILD Fixed BUILD scripts for gcc 6.x 2019-08-23 22:03:54 +02:00
client Merge 10.4 into 10.5 2020-03-23 10:50:14 +02:00
cmake MDEV-22003 mysql_config disappeared from 10.5 (e.g. binary tarball or source build) 2020-03-24 02:39:32 +01:00
dbug Merge 10.2 into 10.3 2019-12-12 14:41:51 +02:00
debian autobake-deb.sh: include symlinks in the final listing 2020-03-24 02:39:32 +01:00
Docs Switch Perl DBI scripts from DBD::mysql to DBD::MariaDB driver 2019-07-19 13:39:20 +03:00
extra MDEV-21303 Make executables MariaDB named 2020-03-21 20:20:29 +01:00
include handler::rebind() 2020-03-24 20:47:41 +02:00
libmariadb@1768cb6c32 new (fixed) version of CC. 2020-03-18 09:33:26 +01:00
libmysqld Added support for replication for S3 2020-03-24 21:00:02 +02:00
libservices Merge branch '10.3' into 10.4 2019-05-19 20:55:37 +02:00
man MDEV-21303 Make executables MariaDB named 2020-03-21 20:20:29 +01:00
mysql-test Clean up and speed up interfaces for binary row logging 2020-03-24 21:00:03 +02:00
mysys restore stack traces that were broken by ebfe8c4e0e 2020-03-16 01:13:01 +01:00
mysys_ssl Update WolfSSL, remove older workarounds. 2019-07-28 13:45:15 +02:00
plugin Merge branch '10.4' into 10.5 2020-03-11 17:52:49 +01:00
randgen/conf Group commit for maria engine. 2010-02-12 15:12:28 +02:00
scripts MDEV-22009 mysqlhotcopy tool and wsrep scripts not found 2020-03-24 02:39:32 +01:00
sql Clean up and speed up interfaces for binary row logging 2020-03-24 21:00:03 +02:00
sql-bench Merge 10.4 into 10.5 2019-12-16 07:47:17 +02:00
sql-common cleanup: PSI key is *always* the first argument 2020-03-10 19:24:23 +01:00
storage Improve update handler (long unique keys on blobs) 2020-03-24 21:00:02 +02:00
strings Merge 10.4 into 10.5 2020-03-17 07:58:41 +02:00
support-files Merge branch '10.4' into 10.5 2020-03-11 17:52:49 +01:00
tests MDEV-21303 Make executables MariaDB named 2020-03-21 20:20:29 +01:00
tpool MDEV-16264: Eliminate unsafe os_aio_userdata_t type cast 2020-03-12 19:43:45 +02:00
unittest Merge 10.4 into 10.5 2020-03-23 10:50:14 +02:00
vio perfschema socket instrumentation related changes 2020-03-10 19:24:23 +01:00
win MDEV-21303 Make executables MariaDB named 2020-03-21 20:20:29 +01:00
wsrep-lib@dcdd7435bd Update wsrep-lib submodule. 2020-02-19 09:35:48 +02:00
zlib Fixed compiler warnings from gcc 7.4.1 2020-01-29 23:23:55 +02:00
.clang-format Merge 10.4 into 10.5 2019-12-27 21:17:16 +02:00
.gitattributes Merge branch '10.0' into 10.1 2018-05-05 14:01:59 +02:00
.gitignore Ignore mariadb-config.1 2020-03-24 20:47:41 +02:00
.gitmodules Fix github urls of submodules 2019-07-02 17:25:36 +04:00
.travis.compiler.sh travis: use galera-4 in 10.4 branch (#1226) 2019-03-14 08:20:32 +02:00
.travis.yml Travis-CI: Optimize the selection of tests to be smaller and more diverse 2020-03-23 21:28:29 +00:00
appveyor.yml Appveyor configuration and addition of badge 2019-05-09 10:56:15 +02:00
BUILD-CMAKE Minor spelling fixes in code comments, docs and output 2018-01-12 16:49:02 +02:00
CMakeLists.txt MDEV-21580: Allow packed sort keys in sort buffer 2020-03-10 15:09:17 +05:30
config.h.cmake Merge branch '10.4' into 10.5 2020-03-11 17:52:49 +01:00
configure.cmake Merge commit '10.3' into 10.4 2020-03-11 13:27:10 +01:00
CONTRIBUTING.md Add CONTRIBUTING file and modify README file about live QA regarding new contributors 2018-12-04 23:15:33 +04:00
COPYING Update FSF Address 2019-05-11 21:29:06 +03:00
CREDITS Update contributors 2018-09-10 16:47:44 +04:00
EXCEPTIONS-CLIENT MDEV-5645 MariaDB-5.5.35 - references are made to an "EXCEPTIONS-CLIENT" file but it does not exist 2014-05-31 13:18:56 +02:00
INSTALL-SOURCE Update AskMonty and Atlassian references to MariaDB 2016-03-08 15:24:01 +02:00
INSTALL-WIN-SOURCE Update AskMonty and Atlassian references to MariaDB 2016-03-08 15:24:01 +02:00
KNOWN_BUGS.txt Changed some MySQL names in messages to MariaDB 2018-12-09 20:49:05 +02:00
README.md Changed Travis to 10.5 2020-01-27 10:37:32 +02:00
THIRDPARTY Merge 10.1 into 10.2 2019-05-13 17:54:04 +03:00
VERSION bump the VERSION 2020-02-14 10:46:08 -05:00

Code status:

  • Travis CI status travis-ci.org (10.5 branch)
  • Appveyor CI status ci.appveyor.com

MariaDB: drop-in replacement for MySQL

MariaDB is designed as a drop-in replacement of MySQL(R) with more features, new storage engines, fewer bugs, and better performance.

MariaDB is brought to you by the MariaDB Foundation and the MariaDB corporation. Please read the CREDITS file for details about the MariaDB Foundation, and who is developing MariaDB.

MariaDB is developed by many of the original developers of MySQL who now work for the MariaDB Corporation, the MariaDB Foundation and by many people in the community.

MySQL, which is the base of MariaDB, is a product and trademark of Oracle Corporation, Inc. For a list of developers and other contributors, see the Credits appendix. You can also run 'SHOW authors' to get a list of active contributors.

A description of the MariaDB project and a manual can be found at:

https://mariadb.com/kb/en/

https://mariadb.com/kb/en/mariadb-vs-mysql-features/

https://mariadb.com/kb/en/mariadb-versus-mysql-compatibility/

https://mariadb.com/kb/en/library/new-and-old-releases/

https://mariadb.org/

As MariaDB is a full replacement of MySQL, the MySQL manual at http://dev.mysql.com/doc is generally applicable.

Help

More help is available from the Maria Discuss mailing list https://launchpad.net/~maria-discuss and the #maria IRC channel on Freenode.

Live QA for beginner contributors

MariaDB has a dedicated time each week when we answer new contributor questions live on Zulip and IRC. From 8:00 to 10:00 UTC on Mondays, and 10:00 to 12:00 UTC on Thursdays, anyone can ask any questions theyd like, and a live developer will be available to assist.

New contributors can ask questions any time, but we will provide immediate feedback during that interval.

Licensing


NOTE:

MariaDB is specifically available only under version 2 of the GNU General Public License (GPLv2). (I.e. Without the "any later version" clause.) This is inherited from MySQL. Please see the README file in the MySQL distribution for more information.

License information can be found in the COPYING file. Third party license information can be found in the THIRDPARTY file.


Bug Reports

Bug and/or error reports regarding MariaDB should be submitted at: https://jira.mariadb.org

For reporting security vulnerabilities see: https://mariadb.org/about/security-policy/

Bugs in the MySQL code can also be submitted at: https://bugs.mysql.com

The code for MariaDB, including all revision history, can be found at: https://github.com/MariaDB/server