Commit graph

50420 commits

Author SHA1 Message Date
unknown
7d6d02ca9d Merge bk-internal.mysql.com:/home/bk/mysql-maria
into  mysql.com:/home/my/mysql-maria
2007-12-17 13:12:55 +02:00
unknown
2b7a69457c Merge bk-internal.mysql.com:/home/bk/mysql-maria
into  janus.mylan:/usr/home/serg/Abk/mysql-maria
2007-12-17 09:56:52 +01:00
unknown
2943444ae4 Fixed bug when comparing row types to see if file format has changed 2007-12-17 01:44:35 +02:00
unknown
3e27ec4e90 Merge bk-internal.mysql.com:/home/bk/mysql-maria
into  mysql.com:/home/my/mysql-maria


mysql-test/r/maria-recovery.result:
  Auto merged
storage/maria/ha_maria.cc:
  Auto merged
storage/maria/ma_blockrec.c:
  Auto merged
storage/maria/ma_blockrec.h:
  Auto merged
storage/maria/ma_create.c:
  Auto merged
storage/maria/ma_key_recover.c:
  Auto merged
storage/maria/ma_open.c:
  Auto merged
storage/maria/ma_recovery.c:
  Auto merged
storage/maria/maria_def.h:
  Auto merged
2007-12-17 01:18:23 +02:00
unknown
cc589bef15 Fixed bug in undo_key_delete; Caused crashed key files in recovery
Maria is now used for internal temporary tables in MySQL
Better usage of VARCHAR and long strings in temporary tables
Use packed fields if BLOCK_RECORD is used
null_bytes are not anymore stored in a separate field
New interface to remember and restore scan position
Fixed bugs in unique handling
Don't sync Maria temporary tables
Lock control file while it's used to stop several processes from using it
Changed value of MA_DONT_OVERWRITE_FILE as it collided with MY_SYNC_DIR
Split MY_DONT_WAIT into MY_NO_WAIT and MY_SHORT_WAIT (for my_lock())
Added MY_FORCE_LOCK


include/my_sys.h:
  Changed value of MA_DONT_OVERWRITE_FILE as it collided with MY_SYNC_DIR
  Split MY_DONT_WAIT into MY_NO_WAIT and MY_SHORT_WAIT (for my_lock())
  Added MY_FORCE_LOCK
include/myisam.h:
  Make MyISAM columndef compile time compatible with Maria
mysql-test/lib/mtr_process.pl:
  Removed confusing warning (It's common that there is a lot of other files than pid files)
mysql-test/mysql-test-run.pl:
  Added --sync-frm to speed up tests
mysql-test/r/maria-recovery.result:
  Updated results from wrong push
mysql-test/suite/rpl/t/rpl_innodb_bug28430.test:
  Marked test as --big
mysys/my_lock.c:
  If MY_FORCE_LOCK is given, use locking even if my_disable_locking is given
  If MY_NO_WAIT is given, return at once if lock is occupied
  If MY_SHORT_WAIT is given, wait some time for lock before returning (This was called MY_DONT_WAIT before)
mysys/my_thr_init.c:
  Fix that we don't give name to thread before it's properly initied
sql/handler.cc:
  Added myisam.h
sql/handler.h:
  Changes to use Maria for internal temporary tables
  Removed not needed argument to restart_rnd_next()
  Added function remember_rnd_pos()
sql/my_lock.c:
  If MY_FORCE_LOCK is given, use locking even if my_disable_locking is given
  If MY_NO_WAIT is given, return at once if lock is occupied
  If MY_SHORT_WAIT is given, wait some time for lock before returning (This was called MY_DONT_WAIT before)
sql/mysql_priv.h:
  Added maria_hton
sql/sql_class.h:
  Changes to use Maria for internal temporary tables
sql/sql_select.cc:
  Changes to use Maria for internal temporary tables
  Temporary tables didn't properly switch to dynamic row format if long strings was used
  Better usage of VARCHAR in temporary tables
  Use new interface to restart scan in duplicate removal
sql/sql_select.h:
  Changes to use Maria for internal temporary tables
sql/sql_show.cc:
  Changes to use Maria for internal temporary tables
  Removed all end space
sql/sql_table.cc:
  Set HA_OPTION_PACK_RECORD if we are not using default or static record
sql/sql_union.cc:
  If MY_FORCE_LOCK is given, use locking even if my_disable_locking is given
  If MY_NO_WAIT is given, return at once if lock is occupied
  If MY_SHORT_WAIT is given, wait some time for lock before returning (This was called MY_DONT_WAIT before)
sql/sql_update.cc:
  If MY_FORCE_LOCK is given, use locking even if my_disable_locking is given
  If MY_NO_WAIT is given, return at once if lock is occupied
  If MY_SHORT_WAIT is given, wait some time for lock before returning (This was called MY_DONT_WAIT before)
storage/maria/ha_maria.cc:
  Use packed fields
  null_bytes are not anymore stored in a separate field
  Changes to use Maria for internal temporary tables
  Give warning if we try to do an ALTER TABLE to a unusable row format
storage/maria/ha_maria.h:
  Allow Maria with block format to restart scanning at given position
storage/maria/ma_blockrec.c:
  Added functions to remember and restore scan position
  Allocate cur_row.extents so that we don't have to do a malloc on first read
  Fixed bug when using packed row without packed strings
  Removed unneeded calls to free_full_pages()
  Fixed unlikely bug when using old bitmap to read head page and head page had gone away
  Remember row position when doing undo of delete and update row (needed for undo of key delete)
storage/maria/ma_blockrec.h:
  Added functions to remember and restore scan position
storage/maria/ma_close.c:
  Don't sync temporary tables
storage/maria/ma_control_file.c:
  Lock control file while it's used to stop several processes from using it
storage/maria/ma_create.c:
  Fixed bug when using FIELD_NORMAL that was longer than FULL_PAGE_SIZE
  Fixed bug that casued fields to not be ordered according to offset
  Fixed bug in unique creation
storage/maria/ma_delete.c:
  Don't write record reference when deleting key.
  (Rowid is likely to be different when we undo this)
storage/maria/ma_dynrec.c:
  Fixed core dump when comparing records (happended in unique handling)
storage/maria/ma_extra.c:
  MY_DONT_WAIT -> MY_SHORT_WAIT
  Removed TODO comment. (Was not relevant as all other instances are guranteed to be closed when we the code is excecuted)
  Added DBUG_ASSERT() to prove above.
storage/maria/ma_key_recover.c:
  CLR's for UNDO_ROW_DELETE and UNDO_ROW_UPDATE now include rowid for the row.
  This was needed for undo_key_delete to work, as undo of delete row is likely to put row in a new position.
  undo_delete_key now doesn't include row position
storage/maria/ma_open.c:
  Added virtual functions for remembering and restoring scan position
  Fixed wrong key search method when using multi-byte character sets (Bug#32705)
  Store original column number in index file
  
  NOTE: Index files are now incompatible with previous versions!
  (Ok as we haven't yet made a public Maria release)
storage/maria/ma_recovery.c:
  Set info->cur_row.lastpos when reading CLR's for UNDO_ROW_DELETE or UNDO_ROW_UPDATE
storage/maria/ma_scan.c:
  Added default function to remember and restore scan position
storage/maria/maria_def.h:
  Added virtual functions & variables to remember and restore scan position
  Added MARIA_MAX_CONTROL_FILE_LOCK_RETRY
storage/myisam/ha_myisam.cc:
  Fixed compiler errors as columdef->type is now an enum, not an integer
  Added functions to remember and restore scan position
storage/myisam/ha_myisam.h:
  Added functions to remember and restore scan position
storage/myisam/mi_check.c:
  MY_DONT_WAIT -> MY_SHORT_WAIT
storage/myisam/mi_extra.c:
  MY_DONT_WAIT -> MY_SHORT_WAIT
storage/myisam/mi_open.c:
  MY_DONT_WAIT -> MY_SHORT_WAIT
storage/myisam/myisamdef.h:
  MY_DONT_WAIT -> MY_SHORT_WAIT
2007-12-17 01:17:37 +02:00
unknown
79e40ef6e4 test of removing logs.
storage/maria/unittest/ma_test_loghandler_nologs-t.c:
  New BitKeeper file ``storage/maria/unittest/ma_test_loghandler_nologs-t.c''
2007-12-16 19:39:06 +02:00
unknown
179fd77f5b page CRC calculating
storage/maria/ma_pagecrc.c:
  New BitKeeper file ``storage/maria/ma_pagecrc.c''
2007-12-16 15:26:22 +02:00
unknown
c4f4cd265d Merge bk-internal.mysql.com:/home/bk/mysql-maria
into  janus.mylan:/usr/home/serg/Abk/mysql-maria
2007-12-16 12:32:11 +01:00
unknown
c4c63a1425 my_uuid_init() was forgotten
mysys/my_uuid.c:
  de-corelate two randominit's
sql/mysqld.cc:
  my_uuid_init() was forgotten here
2007-12-16 12:31:29 +01:00
unknown
191ceaff57 postmerge changes. 2007-12-16 13:30:05 +02:00
unknown
18d408a913 Merge desktop.sanja.is.com.ua:/home/bell/mysql/bk/mysql-maria
into  desktop.sanja.is.com.ua:/home/bell/mysql/bk/work-maria-callback


storage/maria/Makefile.am:
  Auto merged
storage/maria/ma_blockrec.c:
  Auto merged
storage/maria/ma_check.c:
  Auto merged
storage/maria/ma_create.c:
  Auto merged
storage/maria/ma_loghandler.h:
  Auto merged
storage/maria/ma_open.c:
  Auto merged
storage/maria/ma_page.c:
  Auto merged
storage/maria/ma_pagecache.c:
  Auto merged
storage/maria/maria_chk.c:
  Auto merged
storage/maria/maria_def.h:
  Auto merged
storage/maria/unittest/ma_test_loghandler-t.c:
  Auto merged
storage/maria/unittest/ma_test_loghandler_first_lsn-t.c:
  Auto merged
storage/maria/unittest/ma_test_loghandler_max_lsn-t.c:
  Auto merged
storage/maria/unittest/ma_test_loghandler_multigroup-t.c:
  Auto merged
storage/maria/unittest/ma_test_loghandler_multithread-t.c:
  Auto merged
storage/maria/unittest/ma_test_loghandler_noflush-t.c:
  Auto merged
storage/maria/unittest/ma_test_loghandler_pagecache-t.c:
  Auto merged
storage/maria/unittest/ma_test_loghandler_purge-t.c:
  Auto merged
storage/maria/ma_bitmap.c:
  Merge.
storage/maria/ma_loghandler.c:
  Merge.
storage/maria/unittest/Makefile.am:
  Merge.
2007-12-16 01:33:04 +02:00
unknown
7b19ba34fc Pagecache callbacks support added.
Page CRC check based on pagecache support added.
Loghandler pagecache callbacks support added.
Loghandler filecache rewritten.
Support of deletting all logs added.


storage/maria/Makefile.am:
  New file with functions for CRC calculation.
storage/maria/ma_bitmap.c:
  Page CRC support.
storage/maria/ma_blockrec.c:
  Removed code replaced by pagecache callbacks.
storage/maria/ma_check.c:
  Page CRC support.
storage/maria/ma_create.c:
  Page CRC support.
storage/maria/ma_loghandler.c:
  Pagecache callbacks support.
  New file cache support.
  Removing log files support.
storage/maria/ma_loghandler.h:
  CRC_LENGTH replaced with CRC_SIZE
storage/maria/ma_open.c:
  Page CRC support.
storage/maria/ma_page.c:
  Page CRC support.
storage/maria/ma_pagecache.c:
  Pagecache callbacks support.
storage/maria/ma_pagecache.h:
  Pagecache callbacks support.
storage/maria/ma_panic.c:
  Page CRC support.
storage/maria/maria_chk.c:
  Page CRC support.
storage/maria/maria_def.h:
  Page CRC support.
storage/maria/unittest/Makefile.am:
  New test of removing logs.
storage/maria/unittest/ma_maria_log_cleanup.c:
  Memory leack fixed.
storage/maria/unittest/ma_pagecache_consist.c:
  Pagecache callbacks support.
storage/maria/unittest/ma_pagecache_single.c:
  Pagecache callbacks support.
storage/maria/unittest/ma_test_loghandler-t.c:
  Fixed the test error processing.
storage/maria/unittest/ma_test_loghandler_first_lsn-t.c:
  Fixed the test error processing.
storage/maria/unittest/ma_test_loghandler_max_lsn-t.c:
  Fixed the test error processing.
storage/maria/unittest/ma_test_loghandler_multigroup-t.c:
  Fixed the test error processing.
storage/maria/unittest/ma_test_loghandler_multithread-t.c:
  Fixed the test error processing.
storage/maria/unittest/ma_test_loghandler_noflush-t.c:
  Fixed the test error processing.
storage/maria/unittest/ma_test_loghandler_pagecache-t.c:
  Pagecache callbacks support.
storage/maria/unittest/ma_test_loghandler_purge-t.c:
  Fixed the test error processing.
storage/maria/unittest/test_file.c:
  Removed unneeded sync.
2007-12-15 23:31:22 +02:00
unknown
fabdf6df6d Postmerge fix.
storage/maria/ma_loghandler.c:
  Postmerge fix.
  New state of the log added to proicess correctly shutdown.
storage/maria/ma_loghandler.h:
  New state of the log added to proicess correctly shutdown.
2007-12-15 19:16:41 +02:00
unknown
98a2c5e3cf Merge desktop.sanja.is.com.ua:/home/bell/mysql/bk/mysql-maria
into  desktop.sanja.is.com.ua:/home/bell/mysql/bk/work-maria-readonly


storage/maria/ha_maria.cc:
  Auto merged
storage/maria/ma_create.c:
  Auto merged
storage/maria/ma_open.c:
  Auto merged
storage/maria/ma_test1.c:
  Auto merged
storage/maria/ma_test2.c:
  Auto merged
storage/maria/unittest/ma_test_loghandler-t.c:
  Auto merged
storage/maria/unittest/ma_test_loghandler_first_lsn-t.c:
  Auto merged
storage/maria/unittest/ma_test_loghandler_max_lsn-t.c:
  Auto merged
storage/maria/unittest/ma_test_loghandler_multigroup-t.c:
  Auto merged
storage/maria/unittest/ma_test_loghandler_multithread-t.c:
  Auto merged
storage/maria/unittest/ma_test_loghandler_noflush-t.c:
  Auto merged
storage/maria/unittest/ma_test_loghandler_pagecache-t.c:
  Auto merged
storage/maria/unittest/ma_test_loghandler_purge-t.c:
  Auto merged
storage/maria/ma_check.c:
  Merge.
storage/maria/ma_loghandler.c:
  Merge.
storage/maria/ma_loghandler.h:
  Merge.
storage/maria/maria_read_log.c:
  Merge.
storage/maria/unittest/Makefile.am:
  Merge.
2007-12-15 16:07:16 +02:00
unknown
d225521c76 Transaction log behaviour in case of write
error fixed (switching to the read only mode).
Added read only mode of transactions log handler.


storage/maria/ha_maria.cc:
  Transaction log initialization parameters change.
storage/maria/ma_check.c:
  New status variable of transactional log.
storage/maria/ma_create.c:
  New status variable of transactional log.
storage/maria/ma_loghandler.c:
  - New status variable added.
  - Checking the status variable in the loghandler
  interface functions added
  - All fails of loghandler functions revised.
  - UNRECOVERABLE_ERROR() removed.
  - Switching to read only mode added where it nead.
  - Checking of log state added before writes log content
    and changing status variables like sent_to_file, n_buffers_only, flushed.
  - Readonly loghandler initialization added.
  - Fixed problem with example table transactional log initialization.
storage/maria/ma_loghandler.h:
  Readonly loghandler initialization added.
  Fixed problem with example table transactional log initialization.
  New status variable added.
storage/maria/ma_open.c:
  New status variable of transactional log.
storage/maria/ma_test1.c:
  Transaction log initialization parameters change.
storage/maria/ma_test2.c:
  Transaction log initialization parameters change.
storage/maria/maria_read_log.c:
  Transaction loghandler initialization in read only mode in
  case of only dysplay parameter.
storage/maria/unittest/Makefile.am:
  Test of readonly mode added.
storage/maria/unittest/ma_test_loghandler-t.c:
  Transaction log initialization parameters change.
  Fixed problem with example table transactional log initialization.
  Fixed incorrect fprintf call parameters.
storage/maria/unittest/ma_test_loghandler_first_lsn-t.c:
  Transaction log initialization parameters change.
  Fixed problem with example table transactional log initialization.
storage/maria/unittest/ma_test_loghandler_max_lsn-t.c:
  Transaction log initialization parameters change.
  Fixed problem with example table transactional log initialization.
storage/maria/unittest/ma_test_loghandler_multigroup-t.c:
  Useing this test also as read only loghandler test.
  Transaction log initialization parameters change.
  Fixed problem with example table transactional log initialization.
storage/maria/unittest/ma_test_loghandler_multithread-t.c:
  Transaction log initialization parameters change.
  Fixed problem with example table transactional log initialization.
storage/maria/unittest/ma_test_loghandler_noflush-t.c:
  Transaction log initialization parameters change.
  Fixed problem with example table transactional log initialization.
storage/maria/unittest/ma_test_loghandler_pagecache-t.c:
  Transaction log initialization parameters change.
  Fixed problem with example table transactional log initialization.
storage/maria/unittest/ma_test_loghandler_purge-t.c:
  Transaction log initialization parameters change.
  Fixed problem with example table transactional log initialization.
2007-12-15 15:44:29 +02:00
unknown
223c6e9d81 Merge gbichot@bk-internal.mysql.com:/home/bk/mysql-maria
into  gbichot4.local:/home/mysql_src/mysql-maria-monty


storage/maria/ma_blockrec.c:
  Auto merged
2007-12-15 14:23:43 +01:00
unknown
1cc48d1629 WL#3072 Maria Recovery.
Updates to the bitmap flush/pin logic to prepare for when we support
multiple writers.


storage/maria/ma_bitmap.c:
  Read lock is less bad than write lock.
  Changing bitmap->flushable to a counter, to prepare for when multiple
  writers are allowed on a table.
  Using bitmap->flush_all_requested instead of share->in_checkpoint; the
  latter can be true for the time of a whole checkpoint even though
  the checkpoint is not yet handling our table, or has already handled it,
  so to decrease the number of broadcasts we use a dedicated my_bool
  which is true only when checkpoint is handling this table's bitmap.
  _ma_bitmap_flushable(share,+1) waits for a concurrent _ma_bitmap_flush_all()
  to finish before incrementing non_flushable; without this, with multiple
  writers there may always be one thread making the bitmap unflushable
  and thus checkpoint would stall.
storage/maria/ma_blockrec.c:
  update to new prototype: "flushable is FALSE|TRUE" becomes "add 1|-1 to
  non_flushable".
storage/maria/ma_blockrec.h:
  new prototype
storage/maria/maria_def.h:
  MARIA_FILE_BITMAP::flushable becomes a counter.
  New MARIA_FILE_BITMAP::flush_all_requested.
2007-12-15 14:17:23 +01:00
unknown
fe2636faaa include sys/stat.h
remove duplicate symbol


configure.in:
  include sys/stat.h
include/my_global.h:
  include sys/stat.h
sql/mysqld.cc:
  remove duplicate symbol
2007-12-15 13:07:40 +01:00
unknown
2df4e9996a pushbuild fixes to please gcc and darwin/ppc64
include/my_atomic.h:
  transparent_union doesn't work in g++, doesn't work on darwin/ppc64
storage/maria/ma_blockrec.c:
  compiler warning
storage/maria/ma_loghandler.c:
  compiler warning
storage/maria/ma_page.c:
  compiler warning
2007-12-14 23:26:17 +01:00
unknown
105ce5386d fix for pushbuild test failure
mysql-test/t/ps_maria.test:
  test Maria presence before setting Maria variables
2007-12-14 17:40:08 +01:00
unknown
914f219c83 fix for some gcc -ansi warnings.
storage/maria/ma_checkpoint.c:
  gcc -ansi warnings
storage/maria/ma_pagecache.c:
  comment
storage/maria/ma_recovery.c:
  gcc -ansi warnings
2007-12-14 17:24:46 +01:00
unknown
8e8362cc50 Merge gbichot@bk-internal.mysql.com:/home/bk/mysql-maria
into  gbichot4.local:/home/mysql_src/mysql-maria-monty
2007-12-14 16:14:59 +01:00
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
unknown
313bb4831d more cmake fixes 2007-12-14 10:51:07 +01:00
unknown
9c4998fc12 Merge bk-internal.mysql.com:/home/bk/mysql-maria
into  janus.mylan:/usr/home/serg/Abk/mysql-maria
2007-12-14 09:47:36 +01:00
unknown
f970477b36 windows fix: fix the #include directive 2007-12-14 09:47:00 +01:00
unknown
531a78f180 postreview changes.
storage/maria/ma_loghandler.c:
  Using pthread_cond instead of WQUEUE.
2007-12-13 23:46:59 +02:00
unknown
6b89901cdf Merge desktop.sanja.is.com.ua:/home/bell/mysql/bk/mysql-maria
into  desktop.sanja.is.com.ua:/home/bell/mysql/bk/work-maria-testfail


mysql-test/t/maria-recovery.test:
  Auto merged
storage/maria/ma_loghandler.c:
  Auto merged
2007-12-13 22:14:45 +02:00
unknown
77e08a745b Fixed maximum file size change. Now it flush buffer after
switching to new one which prevent deadlock.


mysql-test/r/maria-purge.result:
  Fixed test which use setting maria_checkpoint_interval to force
    checkpoint now.
mysql-test/t/maria-purge.test:
  Fixed test which use setting maria_checkpoint_interval to force
    checkpoint now.
2007-12-13 22:12:44 +02:00
unknown
01ea6c1e7f fixes for windows builds 2007-12-13 19:25:01 +01:00
unknown
92fe98d7d7 restore plug.in - referenced by Makefile.am 2007-12-13 14:48:50 +01:00
unknown
bcf526b72a fixes for make distclean, solaris, macosx, windows
BitKeeper/deleted/.del-plug.in:
  Delete: storage/myisam/plug.in
configure.in:
  MyISAM should be the first plugin in the list for now
  check for thr_yield, just in case
include/my_pthread.h:
  pthread_yield for windows, solaris, macosx
storage/Makefile.am:
  fix for make distclean (myisam was listed twice in SUBDIRS)
2007-12-13 13:28:35 +01:00
unknown
ebafe3e4db Postreview changes.
mysql-test/r/maria-big.result:
  Change to make maria-purge more stable: increasing file size
    to let all records fit in one log.
mysql-test/r/maria-connect.result:
  Change to make maria-purge more stable: increasing file size
    to let all records fit in one log.
mysql-test/r/maria-purge.result:
  Change to make maria-purge more stable.
mysql-test/r/maria.result:
  Change to make maria-purge more stable: increasing file size
    to let all records fit in one log.
mysql-test/r/ps_maria.result:
  Change to make maria-purge more stable: increasing file size
    to let all records fit in one log.
mysql-test/t/maria-big.test:
  Change to make maria-purge more stable: increasing file size
    to let all records fit in one log.
mysql-test/t/maria-connect.test:
  Change to make maria-purge more stable: increasing file size
    to let all records fit in one log.
mysql-test/t/maria-purge.test:
  Change to make maria-purge more stable.
mysql-test/t/maria-recovery.test:
  Change to make maria-purge more stable: increasing file size
    to let all records fit in one log.
mysql-test/t/maria.test:
  Change to make maria-purge more stable: increasing file size
    to let all records fit in one log.
mysql-test/t/ps_maria.test:
  Change to make maria-purge more stable: increasing file size
    to let all records fit in one log.
2007-12-13 12:26:55 +02:00
unknown
298541f7a3 Merge bk-internal.mysql.com:/home/bk/mysql-maria
into  mysql.com:/home/my/mysql-maria


storage/maria/ma_blockrec.c:
  Auto merged
storage/maria/ma_check.c:
  Auto merged
storage/maria/ma_loghandler.c:
  Auto merged
storage/maria/maria_def.h:
  Auto merged
2007-12-13 00:01:19 +02:00
unknown
8224c76fbd Removed MARIA_BASE min_row_length (duplicate of min_block_length)
Cleanup of recent code changes in dbug and my_thr_init
Added name for each safe_mutex (for better DBUG and error reporting)
Fixed that sort_info.max_records is calculated correctly. This fixed a bug in maria_chk
Removed duplicate printing of mutex address in dbug log


dbug/dbug.c:
  Cleanup of recent code changes
include/my_pthread.h:
  Added name for each safe_mutex (for better DBUG and error reporting)
mysys/my_thr_init.c:
  Cleanup of recent code changes
mysys/thr_mutex.c:
  Added name for each safe_mutex (for better DBUG and error reporting)
mysys/wqueue.c:
  Removed some mutex printing (as it's done now when we take mutex)
storage/maria/Makefile.am:
  Fixed that 'make tags' works with xemacs
storage/maria/ma_blockrec.c:
  base.min_row_length -> base.min_block_length
  (As they where basicly the same variable)
storage/maria/ma_check.c:
  Moved more common stuff to initialize_variables_for_repair
  Fixed that sort_info.max_records is calculated correctly. This fixed a bug in maria_chk
storage/maria/ma_create.c:
  More comments
  Fixed that min_pack_length is calculated more correctly
  Removed duplicate variable base.min_row_length
storage/maria/ma_loghandler.c:
  Removed duplicate printing of mutex address
storage/maria/ma_open.c:
  Removed base.min_row_length
storage/maria/ma_packrec.c:
  Removed not anymore needed code
  (One should not change any .base variables as this will affect repair with unpack)
storage/maria/maria_def.h:
  Removed base.min_row_length
2007-12-12 23:57:28 +02:00
unknown
f7df9addba WL#3072 - Maria Recovery: recovery of state.auto_increment.
When we log UNDO_KEY_INSERT for an auto_inc key, we update
state.auto_increment (not anymore at the end of maria_write() except
if this is a non-transactional table). When Recovery sees UNDO_KEY_INSERT
in the REDO phase, it reads the auto_inc value from it and updates
state.auto_increment.


mysql-test/r/maria-recovery.result:
  Without the code fix, there would be in CHECK TABLE:
  "Auto-increment value: 0 is smaller than max used value: 3"
  and no AUTO_INCREMENT= clause in SHOW CREATE TABLE.
mysql-test/t/maria-recovery.test:
  Test of recovery of state.auto_increment: from an old table,
  does the replaying of the log set state.auto_increment to
  what it should be.
storage/maria/ma_check.c:
  new way of calling ma_retrieve_auto_increment(): pass key
storage/maria/ma_key.c:
  ma_retrieve_auto_increment() now operates directly with a pointer
  to the key and not on the record.
storage/maria/ma_key_recover.c:
  dedicated write_hook_for_undo_key_insert(): sets state.auto_increment
  under log's mutex.
storage/maria/ma_key_recover.h:
  Dedicated hook for UNDO_KEY_INSERT, to set state.auto_increment.
  Such hook needs a new member st_msg_write_hook_for_undo_key::auto_increment,
  which contains the auto_increment value inserted.
storage/maria/ma_loghandler.c:
  UNDO_KEY_INSERT gets a dedicated write_hook, to set auto_increment.
storage/maria/ma_recovery.c:
  When in the REDO phase we see UNDO_KEY_INSERT: if the state is older
  than this record, and the key is the auto_increment one, read
  the key's value from the log record and update state.auto_increment.
storage/maria/ma_test_all.sh:
  use $maria_path to be able to run from /dev/shm (faster)
storage/maria/ma_update.c:
  bool is more of C++, using my_bool.
  If table is transactional, state.auto_increment is already updated
  in write_hook_for_undo_key_insert().
storage/maria/ma_write.c:
  If table is transactional, state.auto_increment is not updated at
  the end of maria_write() but rather in write_hook_for_undo_key_insert()
  (under log's mutex, so that a concurrent checkpoint does not read
  state.auto_increment while it is changing - corrupted).
  _ma_ck_write_btree_with_log() extracts the auto_increment value
  from the key, puts it into msg.auto_increment, and this is passed
  to write_hook_for_undo_key_insert().
storage/maria/maria_def.h:
  change of prototype of ma_retrieve_auto_increment()
storage/maria/maria_read_log.c:
  use default log file size. Use separate page caches for table
  and logs (needed if maria_block_size!=TRANSLOG_PAGE_SIZE).
2007-12-12 22:33:36 +01:00
unknown
f84ce57c4f Merge gbichot@bk-internal.mysql.com:/home/bk/mysql-maria
into  gbichot4.local:/home/mysql_src/mysql-maria-monty
2007-12-11 19:41:19 +01:00
unknown
5051a8e093 WL#3072 Maria recovery: small fixes to ma_test_recovery
(output was not repeatable accross machines).


storage/maria/ma_check.c:
  comment
storage/maria/ma_test_recovery.expected:
  output update
storage/maria/ma_test_recovery:
  * data_file_length/key_file_length differ between machines because
  ma_test2 uses srand(). Removing them from output.
  * there is no reason to copy/restore logs, test should work without
  * applying log to recreate tables should not change log, testing this.
2007-12-11 19:38:40 +01:00
unknown
edfa162972 Logfile size put in allowed boumnds. 2007-12-11 18:10:43 +02:00
unknown
894081ceb9 Postmerge changes.
storage/maria/ma_loghandler.c:
  Fixed compiler warning.
  translog_mutex_unlock -> pthread_mutex_unlock: postmerge change.
storage/maria/unittest/ma_test_loghandler_max_lsn-t.c:
  Fixed forgoten log size out of bounds.
2007-12-11 17:12:21 +02:00
unknown
b5b0d94dc0 Merge desktop.sanja.is.com.ua:/home/bell/mysql/bk/mysql-maria
into  desktop.sanja.is.com.ua:/home/bell/mysql/bk/work-maria-logpurge


storage/maria/ma_checkpoint.c:
  Auto merged
storage/maria/ma_loghandler.c:
  Auto merged
storage/maria/ma_loghandler.h:
  Auto merged
storage/maria/ma_recovery.c:
  Auto merged
2007-12-11 15:26:47 +02:00
unknown
fed1d21b1d Post review fix (serg).
Added more checks.


storage/maria/ha_maria.cc:
  Let control size to my_get_opts().
storage/maria/ma_loghandler.c:
  Let control size to my_get_opts().
  Removed unused function.
  Assert to check log file size.
  Additional compilation warnings.
storage/maria/ma_loghandler.h:
  New log size bounds.
  Removed unused function.
storage/maria/unittest/ma_test_loghandler-t.c:
  Fixed test to confirm new log size bounds.
2007-12-11 15:26:08 +02:00
unknown
8120175827 Merge desktop.sanja.is.com.ua:/home/bell/mysql/bk/mysql-maria
into  desktop.sanja.is.com.ua:/home/bell/mysql/bk/work-maria-testfail


storage/maria/ma_loghandler.c:
  Auto merged
2007-12-11 09:17:36 +02:00
unknown
6a6674a674 Page number calculation fixed. 2007-12-11 09:17:10 +02:00
unknown
13f45b160b WL#3072 Maria recovery:
fix for bug: if a crash happened right after writing a REDO like this:
REDO - UNDO - REDO*, then recovery would ignore the last REDO* (ok),
rollback: REDO - UNDO - REDO* - REDO - CLR, and a next recovery would
thus execute REDO* instead of skipping it again. Recovery now logs
LOGREC_INCOMPLETE_GROUP when it meets REDO* for the first time,
to draw a boundary and ensure it is always skipped. Tested by hand.
Note: ma_test_all fails "maria_chk: error: Key 1 - Found too many records"
not due to this patch (failed before).


BitKeeper/triggers/post-commit:
  no truncation of the commit mail, or how to review patches?
mysql-test/include/maria_verify_recovery.inc:
  let caller choose the statement used to crash (sometimes we
  want the crash to happen at special places)
mysql-test/t/maria-recovery.test:
  user of maria_verify_recovery.inc now specifies statement which the
  script should use for crashing.
storage/maria/ma_bitmap.c:
  it's easier to search for all places using functions from the bitmap
  module (like in ma_blockrec.c) if those exported functions all start
  with "_ma_bitmap": renaming some of them.
  Assertion that when we read a bitmap page, overwriting bitmap->map,
  we are not losing information (i.e. bitmap->changed is false).
storage/maria/ma_blockrec.c:
  update to new names. Adding code (disabled, protected by a #ifdef)
  that I use to test certain crash scenarios (more to come).
storage/maria/ma_blockrec.h:
  update to new names
storage/maria/ma_checkpoint.c:
  update to new names
storage/maria/ma_extra.c:
  update to new names
storage/maria/ma_loghandler.c:
  new LOGREC_INCOMPLETE_GROUP
storage/maria/ma_loghandler.h:
  new LOGREC_INCOMPLETE_GROUP
storage/maria/ma_recovery.c:
  When at the end of the REDO phase we have identified some transactions
  with incomplete REDO groups (REDOs without an UNDO or CLR_END),
  for each of them we log LOGREC_INCOMPLETE_GROUP. This way, the
  upcoming UNDO phase can write more records for such transaction,
  a future recovery won't pair the incomplete group with the
  CLR_END (as there is LOGREC_INCOMPLETE_GROUP to draw a boundary).
2007-12-10 23:26:53 +01:00
unknown
12a81c39cd ma_recovery.c:
SCCS merged
.del-ma_key_redo.c:
  Auto merged


BitKeeper/deleted/.del-ma_key_redo.c:
  Auto merged
storage/maria/ma_recovery.c:
  SCCS merged
2007-12-10 19:15:50 +01:00
unknown
11d729166c Merge abelkin@bk-internal.mysql.com:/home/bk/mysql-maria
into  desktop.sanja.is.com.ua:/home/bell/mysql/bk/mysql-maria
2007-12-10 15:52:01 +02:00
unknown
29d18bf0bb Fixed bug in first log file detecting function.
storage/maria/ma_loghandler.c:
  min_file should be for sure unexistant file for right search.
2007-12-10 15:49:57 +02:00
unknown
e8b0bb4769 Fixed bug in allocation of dynamic record buffer in Maria
Unified printing of mutex addresses to make them easier to compare


mysys/thr_mutex.c:
  Unified printing of mutex addresses to make them easier to compare
storage/maria/ma_dynrec.c:
  Fixed indentation
storage/maria/ma_open.c:
  Fixed bug in allocation of dynamic record buffer
2007-12-10 14:21:45 +02:00
unknown
abe1031ea8 Fixed some compiler errors
mysys/my_thr_init.c:
  Added missing DBUG_OFF
storage/maria/ma_loghandler.c:
  Fixed wrong macro
2007-12-10 03:37:29 +02:00