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
unknown cec8ac3e07 WL#3071 Maria checkpoint
Finally this is the real checkpoint code.
It however exhibits unstabilities when a checkpoint runs concurrently
with data-modifying clients (table corruption, transaction log's
assertions) so for now a checkpoint is taken only at startup after
recovery and at shutdown, i.e. not in concurrent situations. Later
we will let it run periodically, as well as flush dirty pages
periodically (almost all needed code is there already, only pagecache
code is written but not committed).
WL#3072 Maria recovery
* replacing UNDO_ROW_PURGE with CLR_END; testing of those CLR_END via
ma_test2 which has INSERTs failing with duplicate keys.
* replaying of REDO_RENAME_TABLE
Now, off to test Recovery in ha_maria :)


BitKeeper/deleted/.del-ma_least_recently_dirtied.c:
  Delete: storage/maria/ma_least_recently_dirtied.c
BitKeeper/deleted/.del-ma_least_recently_dirtied.h:
  Delete: storage/maria/ma_least_recently_dirtied.h
storage/maria/Makefile.am:
  compile Checkpoint module
storage/maria/ha_maria.cc:
  When ha_maria starts, do a recovery from last checkpoint.
  Take a checkpoint when that recovery has ended and when ha_maria
  shuts down cleanly.
storage/maria/ma_blockrec.c:
  * even if my_sync() fails we have to my_close() (otherwise we leak
  a descriptor)
  * UNDO_ROW_PURGE is replaced by a simple CLR_END for UNDO_ROW_INSERT,
  as promised in the old comment; it gives us skipping during the
  UNDO phase.
storage/maria/ma_check.c:
  All REDOs before create_rename_lsn are ignored by Recovery. So
  create_rename_lsn must be set only after all data/index has been
  flushed and forced to disk. We thus move write_log_record_for_repair()
  to after _ma_flush_tables_files_after_repair().
storage/maria/ma_checkpoint.c:
  Checkpoint module.
storage/maria/ma_checkpoint.h:
  optional argument if caller wants a thread to periodically take
  checkpoints and flush dirty pages.
storage/maria/ma_create.c:
  * no need to init some vars as the initial bzero(share) takes care of this.
  * update to new function's name
  * even if we fail in my_sync() we have to my_close()
storage/maria/ma_extra.c:
  Checkpoint reads share->last_version under intern_lock, so we make
  maria_extra() update it under intern_lock. THR_LOCK_maria still needed
  because of _ma_test_if_reopen().
storage/maria/ma_init.c:
  destroy checkpoint module when Maria shuts down.
storage/maria/ma_loghandler.c:
  * UNDO_ROW_PURGE gone (see ma_blockrec.c)
  * we need to remember the LSN of the LOGREC_FILE_ID for a share,
  because this LSN is needed into the checkpoint record (Recovery wants
  to know the validity domain of an id->name mapping)
  * translog_get_horizon_no_lock() needed for Checkpoint
  * comment about failing assertion (Sanja knows)
  * translog_init_reader_data() thought that translog_read_record_header_scan()
  returns 0 in case of error, but 0 just means "0-length header".
  * translog_assign_id_to_share() now needs the MARIA_HA because
  LOGREC_FILE_ID uses a log-write hook.
  * Verify that (de)assignment of share->id happens only under intern_lock,
  as Checkpoint reads this id with intern_lock.
  * translog_purge() can accept TRANSLOG_ADDRESS, not necessarily
  a real LSN.
storage/maria/ma_loghandler.h:
  prototype updates
storage/maria/ma_open.c:
  no need to initialize "res"
storage/maria/ma_pagecache.c:
  When taking a checkpoint, we don't need to know the maximum rec_lsn
  of dirty pages; this LSN was intended to be used in the two-checkpoint
  rule, but last_checkpoint_lsn is as good.
  4 bytes for stored_list_size is enough as PAGECACHE::blocks (number
  of blocks which the pagecache can contain) is int.
storage/maria/ma_pagecache.h:
  new prototype
storage/maria/ma_recovery.c:
  * added replaying of REDO_RENAME_TABLE
  * UNDO_ROW_PURGE gone (see ma_blockrec.c), replaced by CLR_END
  * Recovery from the last checkpoint record now possible
  * In new_table() we skip the table if the id->name mapping is older than
  create_rename_lsn (mapping dates from lsn_of_file_id).
  * in get_MARIA_HA_from_REDO_record() we skip the record
  if the id->name mapping is newer than the record (can happen if processing
  a record which is before the checkpoint record).
  * parse_checkpoint_record() has to return a LSN, that's what caller expects
storage/maria/ma_rename.c:
  new function's name; log end zeroes of tables' names (ease recovery)
storage/maria/ma_test2.c:
  * equivalent of ma_test1's --test-undo added (named -u here).
  * -t=1 now stops right after creating the table, so that
  we can test undoing of INSERTs with duplicate keys (which tests the
  CLR_END logged by _ma_write_abort_block_record()).
storage/maria/ma_test_recovery.expected:
  Result of testing undoing of INSERTs with duplicate keys; there are
  some differences in maria_chk -dvv but they are normal (removing
  records does not shrink data/index file, does not put back the
  "analyzed, optimized keys"(etc) index state.
storage/maria/ma_test_recovery:
  Test undoing of INSERTs with duplicate keys, using ma_test2;
  when such INSERT happens, it logs REDO_INSERT, UNDO_INSERT, REDO_DELETE,
  CLR_END; we abort after that, and test that CLR_END causes recovery
  to jump over UNDO_INSERT.
storage/maria/ma_write.c:
  comment
storage/maria/maria_chk.c:
  comment
storage/maria/maria_def.h:
  * a new bit in MARIA_SHARE::in_checkpoint, used to build a list
  of unique shares during Checkpoint.
  * MARIA_SHARE::lsn_of_file_id added: the LSN of the last LOGREC_FILE_ID
  for this share; needed to know to which LSN domain the mappings
  found in the Checkpoint record apply (new mappings should not apply
  to old REDOs).
storage/maria/trnman.c:
  * small changes to how trnman_collect_transactions() fills its buffer;
  it also uses a non-dummy lsn_read_non_atomic() found in ma_checkpoint.h
2007-09-12 11:27:34 +02:00
BitKeeper propagation to maria_repair_by_sort() and maria_repair_parallel() 2007-08-08 11:36:41 +02:00
BUILD Merge bk-internal.mysql.com:/home/bk/mysql-maria 2007-09-11 01:59:40 +03:00
client code of the "mysqltest --global-subst" hack made a bit less horrible. 2007-08-10 15:53:41 +02:00
cmd-line-utils Merge pilot.(none):/data/msvensson/mysql/mysql-5.0-maint 2007-06-07 09:22:26 +02:00
config/ac-macros sql_parse.cc, config-win.h, config-netware.h: 2007-05-27 23:21:03 +02:00
dbug WL#3817: Simplify string / memory area types and make things more consistent (first part) 2007-05-10 12:59:39 +03:00
debian Made changes to debian control files to support building 5.1 packages. 2007-04-20 16:15:30 -07:00
Docs Merge mysql.com:/home/kent/bk/tmp/mysql-5.0-build 2007-03-22 19:44:14 +01:00
extra Merge whalegate.ndb.mysql.com:/home/tomas/mysql-5.1-new-ndb 2007-06-17 17:21:27 +02:00
include Fixed some bugs when using undo of VARCHAR fields 2007-09-11 01:58:15 +03:00
libmysql Merge jamppa@bk-internal.mysql.com:/home/bk/mysql-5.1 2007-07-07 18:33:43 +03:00
libmysql_r my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
libmysqld Merge trift2.:/MySQL/M50/push-5.0 2007-06-18 20:22:18 +02:00
man my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
mysql-test Fixed some bugs when using undo of VARCHAR fields 2007-09-11 01:58:15 +03:00
mysys Merge gbichot@bk-internal.mysql.com:/home/bk/mysql-maria 2007-08-29 17:53:54 +02:00
netware netware/*.def : Allocate 128K stack for all executables (bug#23504) 2007-06-07 12:59:31 +02:00
plugin Merge jamppa@bk-internal.mysql.com:/home/bk/mysql-5.1 2007-06-27 17:49:12 +03:00
pstack my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
regex WL#3817: Simplify string / memory area types and make things more consistent (first part) 2007-05-10 12:59:39 +03:00
scripts Patch for the following bugs: 2007-06-28 21:34:54 +04:00
server-tools Merge quadxeon.mysql.com:/benchmarks/ext3/TOSAVE/tsmith/bk/51 2007-06-05 17:51:30 +02:00
sql Fixed some bugs when using undo of VARCHAR fields 2007-09-11 01:58:15 +03:00
sql-bench Fixed REPAIR/CHECK/ANALYZE TABLE for tables with new BLOCK-ROW format. 2007-07-01 16:20:57 +03:00
sql-common Merge bk@192.168.21.1:mysql-5.1-opt 2007-06-29 10:51:42 +05:00
storage WL#3071 Maria checkpoint 2007-09-12 11:27:34 +02:00
strings Merge mysql.com:/home/bar/mysql-work/mysql-5.0.b27345 2007-07-03 14:06:57 +05:00
support-files Merge jamppa@bk-internal.mysql.com:/home/bk/mysql-maria 2007-07-04 12:20:53 +03:00
tests Merge bodhi.(none):/opt/local/work/mysql-5.0-runtime 2007-07-02 01:55:01 +04:00
unittest Merge jamppa@bk-internal.mysql.com:/home/bk/mysql-5.1 2007-06-27 17:49:12 +03:00
vio Merge quadxeon.mysql.com:/benchmarks/ext3/TOSAVE/tsmith/bk/51 2007-06-05 17:51:30 +02:00
win Embedded Server doesn't build on Windows. 2007-06-15 14:32:16 -04:00
zlib Merge mysql.com:/home/kent/bk/tmp3/mysql-5.0-build 2007-04-11 01:48:43 +02:00
.bzrignore Added maria_commit() and maria_begin() to be used with external tests 2007-08-29 09:03:10 +03:00
.cvsignore Import changeset 2000-07-31 21:29:14 +02:00
.tree-is-private - WL#3239 "log CREATE TABLE in Maria" 2007-06-22 14:49:37 +02:00
CMakeLists.txt Embedded Server doesn't build on Windows. 2007-06-15 14:32:16 -04:00
configure.in Merge jamppa@bk-internal.mysql.com:/home/bk/mysql-5.1 2007-07-07 22:13:36 +03:00
COPYING - manual.texi will be replaced with a manual written in DocBook/XML. This ChangeSet removes all 2005-04-13 11:51:38 +02:00
EXCEPTIONS-CLIENT EXCEPTIONS-CLIENT: 2007-03-14 18:28:16 +01:00
Makefile.am Merge jamppa@bk-internal.mysql.com:/home/bk/mysql-5.1 2007-06-27 17:49:12 +03:00
README make_binary_distribution.sh: 2006-11-07 22:26:37 +01:00

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.