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 d72c22dee4 WL#3072 - Maria recovery.
* fix for bitmap vs checkpoint bug which could lead to corrupted
tables in case of crashes at certain moments: a bitmap could be flushed
to disk even though it was inconsistent with the log (it could be
flushed before REDO-UNDO are written to the log). One bug remains, need
code from others. Tests added. Fix is to pin unflushable bitmap pages,
and let checkpoint wait for them to be flushable.
* fix for long_trid!=0 assertion failure at Recovery.
* less useless wakeups in the background flush|checkpoint thread.
* store global_trid_generator in checkpoint record.


mysql-test/r/maria-recovery.result:
  result update
mysql-test/t/maria-recovery.test:
  make it easier to locate subtests
storage/maria/ma_bitmap.c:
  When we send a bitmap to the pagecache, if this bitmap is not in a
  flushable state we keep it pinned and add it to a list, it will be
  unpinned when the bitmap is flushable again.
  A new function _ma_bitmap_flush_all() used by checkpoint.
  A new function _ma_bitmap_flushable() used by block format to signal
  when it starts modifying a bitmap and when it is done with it.
storage/maria/ma_blockrec.c:
  When starting a row operation (insert/update/delete), mark that
  the bitmap is not flushable (because for example INSERT is going
  to over-allocate in the bitmap to prevent other threads from using
  our data pages). If a checkpoint comes at this moment it will wait
  for the bitmap to be flushable before flushing it.
  When the operation ends, bitmap becomes flushable again; that
  transition is done under the bitmap's mutex (needed for correct
  synchro with a concurrent checkpoint); but for INSERT/UPDATE this
  happens inside _ma_bitmap_release_unused() at a place where it already
  has the mutex, so the only penalty (mutex adding) is in DELETE and UNDO
  of INSERT. In case of errors after setting the bitmap unflushable,
  we must always set it back to flushable or checkpoint would block.
  Debug possibilities to force a sleep while the bitmap is over-allocated.
  In case of error in get_head_or_tail() in allocate_and_write_block_record(),
  we still need to unpin all pages.
  Bugfix: _ma_apply_redo_insert_row_blobs() produced wrong
  data_file_length.
storage/maria/ma_blockrec.h:
  new bitmap calls.
storage/maria/ma_checkpoint.c:
  filter_flush_indirect not needed anymore (flushing bitmap
  pages happens in _ma_bitmap_flush_all() now). So
  st_filter_param::is_data_file|pages_covered_by_bitmap not needed.
  Other filter_flush* don't need to flush bitmap anymore.
  Add debug possibility to flush all bitmap pages outside of a checkpoint,
  to simulate pagecache LRU eviction.
  When the background flush/checkpoint thread notices it has nothing
  to flush, it now sleeps directly until the next potential checkpoint
  moment instead of waking up every second.
  When in checkpoint we decide to not store a table in the checkpoint record
  (because it has logged no writes for example), we can also skip flushing
  this table.
storage/maria/ma_commit.c:
  comment is out-of-date
storage/maria/ma_key_recover.c:
  comment fix
storage/maria/ma_loghandler.c:
  comment is out-of-date
storage/maria/ma_open.c:
  comment is out-of-date
storage/maria/ma_pagecache.c:
  comment for bug to fix. And we don't take checkpoints at end of REDO
  phase yet so can trust block->type.
storage/maria/ma_recovery.c:
  Comments. Now-unneeded code for incomplete REDO-UNDO groups removed.
  When we forget about an old transaction we must really forget
  about it with bzero() (fixes the "long_trid!=0 assertion" recovery
  bug). When we delete a row with maria_delete() we turn on
  STATE_NOT_OPTIMIZED_ROWS so we do the same when we see a CLR_END
  for an UNDO_ROW_INSERT or when we execute an UNDO_ROW_INSERT (in both
  cases a row was deleted). Pick up max_long_trid from the checkpoint record.
storage/maria/maria_chk.c:
  comment
storage/maria/maria_def.h:
  MARIA_FILE_BITMAP gets new members: 'flushable', 'bitmap_cond' and
  'pinned_pages'.
storage/maria/trnman.c:
  I used to think that recovery only needs to know the maximum TrID
  of the lists of active and committed transactions. But no, sometimes
  both lists can even be empty and their TrID should not be reused.
  So Checkpoint now saves global_trid_generator in the checkpoint record.
storage/maria/trnman_public.h:
  macros to read/store a TrID
mysql-test/r/maria-recovery-bitmap.result:
  result is ok. Without the code fix, we would get a corruption message
  about the bitmap page in CHECK TABLE EXTENDED.
mysql-test/t/maria-recovery-bitmap-master.opt:
  usual when we crash mysqld in tests
mysql-test/t/maria-recovery-bitmap.test:
  test of recovery problems specific of the bitmap pages.
2007-12-14 16:14:12 +01:00
BitKeeper WL#3072 Maria recovery: 2007-12-10 23:26:53 +01:00
BUILD Merge janus.mylan:/usr/home/serg/Abk/mysql-5.1 2007-10-08 21:01:44 +02:00
client Merge bk-internal.mysql.com:/home/bk/mysql-maria 2007-10-20 01:33:12 +03:00
cmd-line-utils make_binary_distribution.sh: 2007-09-26 20:19:33 +02:00
config/ac-macros Merge kboortz@bk-internal.mysql.com:/home/bk/mysql-5.1-build 2007-09-26 18:49:09 +02:00
dbug Removed MARIA_BASE min_row_length (duplicate of min_block_length) 2007-12-12 23:57:28 +02: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 kboortz@bk-internal.mysql.com:/home/bk/mysql-5.1-build 2007-09-26 18:49:09 +02:00
include fixes for make distclean, solaris, macosx, windows 2007-12-13 13:28:35 +01:00
libmysql fixes for windows builds 2007-12-13 19:25:01 +01:00
libmysql_r Makefile.am: 2007-10-08 20:55:44 +02:00
libmysqld Merge kboortz@bk-internal.mysql.com:/home/bk/mysql-5.1-build 2007-09-26 18:49:09 +02:00
man my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
mysql-test WL#3072 - Maria recovery. 2007-12-14 16:14:12 +01:00
mysys windows fix: fix the #include directive 2007-12-14 09:47:00 +01:00
netware Merge trift2.:/MySQL/M50/netware2-5.0 2007-08-24 23:40:36 +02:00
plugin Merge janus.mylan:/usr/home/serg/Abk/mysql-5.1 2007-10-08 21:01:44 +02:00
pstack Makefile.am, configure.in: 2007-09-27 21:39:23 +02:00
regex Merge bk-internal.mysql.com:/home/bk/mysql-5.1-marvel 2007-08-16 18:21:47 +02:00
scripts Merge production.mysql.com:/usersnfs/jperkin/bk/build/5.0 2007-10-04 12:21:51 +02:00
server-tools Merge bk-internal.mysql.com:/home/bk/mysql-maria 2007-10-10 08:21:06 +03:00
sql Added error HA_ERR_FILE_TOO_SHORT to be used when files are shorter than expected (by my_read/my_pread) 2007-12-04 23:23:42 +02: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 Fixed a lot of compiler warnings and errors detected by Forte C++ on Solaris 2007-08-13 16:11:25 +03:00
storage WL#3072 - Maria recovery. 2007-12-14 16:14:12 +01:00
strings mysys/my_getopt.c 2007-10-19 00:32:51 +02:00
support-files Merge janus.mylan:/usr/home/serg/Abk/mysql-5.1 2007-10-08 21:01:44 +02:00
tests Merge dfischer@bk-internal.mysql.com:/home/bk/mysql-5.1-build 2007-08-24 10:13:03 +02:00
unittest Merge hynda.mysql.fi:/home/my/mysql-5.1-main 2007-09-27 17:05:07 +03:00
vio Merge pilot.(none):/data/msvensson/mysql/mysql-5.0-maint 2007-08-28 11:36:10 +02:00
win Merge production.mysql.com:/usersnfs/jperkin/bk/trees/50/push-5.0 2007-09-07 21:56:00 +02:00
zlib CMakeLists.txt, README, configure.js 2007-08-03 21:51:37 +02:00
.bzrignore Added error HA_ERR_FILE_TOO_SHORT to be used when files are shorter than expected (by my_read/my_pread) 2007-12-04 23:23:42 +02:00
.cvsignore
.tree-is-private - WL#3239 "log CREATE TABLE in Maria" 2007-06-22 14:49:37 +02:00
CMakeLists.txt CMakeLists.txt (many), win/README, mysql_manifest.cmake, configure.js: 2007-08-06 23:16:01 +02:00
configure.in restore plug.in - referenced by Makefile.am 2007-12-13 14:48:50 +01:00
COPYING
EXCEPTIONS-CLIENT EXCEPTIONS-CLIENT: 2007-03-14 18:28:16 +01:00
Makefile.am Merge janus.mylan:/usr/home/serg/Abk/mysql-5.1 2007-10-08 21:01:44 +02: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.