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.
  • MariaDB\ 71.8%
  • C++ 16.4%
  • C 10.4%
  • Shell 0.5%
  • Perl 0.4%
  • Other 0.3%
Find a file
Jan Lindström 283e9cf4cb MDEV-11656: 'Data structure corruption' IMPORT TABLESPACE doesn't work for encrypted InnoDB tables if space_id changed
Problem was that for encryption we use temporary scratch area for
reading and writing tablespace pages. But if page was not really
decrypted the correct updated page was not moved to scratch area
that was then written. This can happen e.g. for page 0 as it is
newer encrypted even if encryption is enabled and as we write
the contents of old page 0 to tablespace it contained naturally
incorrect space_id that is then later noted and error message
was written. Updated page with correct space_id was lost.

If tablespace is encrypted we use additional
temporary scratch area where pages are read
for decrypting readptr == crypt_io_buffer != io_buffer.

Destination for decryption is a buffer pool block
block->frame == dst == io_buffer that is updated.
Pages that did not require decryption even when
tablespace is marked as encrypted are not copied
instead block->frame is set to src == readptr.

If tablespace was encrypted we copy updated page to
writeptr != io_buffer. This fixes above bug.

For encryption we again use temporary scratch area
writeptr != io_buffer == dst
that is then written to the tablespace

(1) For normal tables src == dst ==  writeptr
ut_ad(!encrypted && !page_compressed ?
	src == dst && dst == writeptr + (i * size):1);
(2) For page compressed tables src == dst == writeptr
ut_ad(page_compressed && !encrypted ?
	src == dst && dst == writeptr + (i * size):1);
(3) For encrypted tables src != dst != writeptr
ut_ad(encrypted ?
	src != dst && dst != writeptr + (i * size):1);
2016-12-28 16:32:45 +02:00
BUILD remove die() from BUILD/autorun.sh 2016-08-25 15:56:53 +06:00
client Merge branch '10.0' into 10.1 2016-12-11 09:53:42 +01:00
cmake Fix broken cmake -DBUILD_CONFIG=mysql_release on Windows. 2016-12-14 19:20:17 +00:00
dbug dbug: correct trace for DBUG_RETURN(func()); -- gcc only 2015-11-16 07:55:55 +01:00
debian Merge branch '10.0' into 10.1 2016-12-11 09:53:42 +01:00
Docs Merge branch '10.0' into 10.1 2016-03-21 13:02:53 +01:00
extra Merge branch '10.0-galera' into 10.1 2016-11-02 13:44:07 +01:00
include Merge branch '10.0' into 10.1 2016-12-11 09:53:42 +01:00
libmysql Merge branch '10.0-galera' into 10.1 2016-11-02 13:44:07 +01:00
libmysqld Merge branch '5.5' into 10.0 2016-07-12 22:20:46 +02:00
libservices rename {sys_vars,sql_plugin_services}.h -> *.ic 2015-06-28 12:09:46 +02:00
man Merge branch '10.0' into 10.1 2016-12-11 09:53:42 +01:00
mysql-test MDEV-11656: 'Data structure corruption' IMPORT TABLESPACE doesn't work for encrypted InnoDB tables if space_id changed 2016-12-28 16:32:45 +02:00
mysys Merge tag 'mariadb-10.0.28' into 10.0-galera 2016-10-28 15:50:13 -04:00
mysys_ssl Merge branch '10.0' into 10.1 2015-12-21 21:24:22 +01:00
pcre Merge branch '10.0' into 10.1 2016-06-28 22:01:55 +02:00
plugin wsrep_info plugin: Fix test case 2016-11-14 11:02:57 -05:00
randgen/conf
scripts Merge branch '10.0' into 10.1 2016-12-11 09:53:42 +01:00
sql MDEV-11060 sql/protocol.cc:532: void Protocol::end_statement(): Assertion `0' failed 2016-12-14 12:45:50 +05:30
sql-bench fix sql-bench test-table-elimination view leak. see MDEV-10310 for details 2016-07-12 22:21:49 +02:00
sql-common Merge branch '10.0' into 10.1 2016-08-25 12:40:09 +02:00
storage MDEV-11656: 'Data structure corruption' IMPORT TABLESPACE doesn't work for encrypted InnoDB tables if space_id changed 2016-12-28 16:32:45 +02:00
strings Merge branch '10.0' into 10.1 2016-12-11 09:53:42 +01:00
support-files Merge tag 'mariadb-10.0.28' into 10.0-galera 2016-10-28 15:50:13 -04:00
tests MDEV-11082 mysql_client_test: test_ps_query_cache fails with group-concat-max-len=1M 2016-10-19 03:02:13 +03:00
unittest Merge branch '10.0' into 10.1 2016-03-24 09:24:02 +01:00
vio Merge branch '10.0' into 10.1 2016-08-25 12:40:09 +02:00
win Merge branch '10.0' into 10.1 2016-12-11 09:53:42 +01:00
wsrep Merge branch '10.0-galera' into bb-10.1-serg 2016-08-25 15:39:39 -04:00
zlib Backport from trunk: 2014-05-07 17:09:14 +02:00
.gitattributes Merge branch 'connect/10.1' into 10.1 2016-06-28 22:12:50 +02:00
.gitignore - New version of the java JdbcInterface 2016-05-23 15:08:51 +02:00
BUILD-CMAKE various documentation updates 2012-06-18 16:57:58 -04:00
CMakeLists.txt MDEV-10412 fix WITH_ASAN option for 10.1 2016-07-24 10:06:18 -04:00
config.h.cmake Bug#24707666: DEFAULT SETTING FOR SECURE-FILE-PRIV SHOULD BE 2016-09-28 20:06:19 +05:30
configure.cmake Merge branch '10.0' into 10.1 2016-12-11 09:53:42 +01:00
COPYING
COPYING.LESSER MWL#192: non-blocking client API, after-review fixes. 2012-01-06 12:43:18 +01:00
COPYING.thirdparty split README into the actual README and third-party licenses 2014-05-24 18:23:46 +02:00
CREDITS Update contributors 2016-09-19 12:31:19 +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 various documentation updates 2012-06-18 16:57:58 -04:00
README Merge branch '10.0' into 10.1 2016-02-23 21:35:05 +01:00
VERSION bump the VERSION 2016-12-15 10:34:41 -05:00

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.
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 Foundation and the MariaDB Corporation, 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:
http://mariadb.org/
https://mariadb.com/kb/en/
https://mariadb.com/kb/en/mariadb-vs-mysql-features/
https://mariadb.com/kb/en/mariadb-versus-mysql-features/
https://mariadb.com/kb/en/mariadb-versus-mysql-compatibility/

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

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

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

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, COPYING.LESSER,
and COPYING.thirdparty files.

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

IMPORTANT:

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

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

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

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