mariadb/storage
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
..
archive azio.c, azlib.h: 2007-09-07 13:27:52 +02:00
blackhole Merge bk-internal.mysql.com:/home/bk/mysql-5.1-marvel 2007-08-16 18:21:47 +02:00
csv Merge hynda.mysql.fi:/home/my/mysql-5.1-main 2007-09-27 17:05:07 +03:00
example Merge bk-internal.mysql.com:/data0/bk/mysql-5.1 2007-08-27 20:20:08 +02:00
federated fixed type conversion warnings revealed by bug 30639 2007-09-21 10:15:16 +02:00
heap fixed type conversion warnings revealed by bug 30639 2007-09-21 10:15:16 +02:00
innobase Merge trift-lap.fambruehe:/MySQL/M51/push-5.1 2007-09-27 16:51:40 +02:00
maria WL#3072 - Maria Recovery: recovery of state.auto_increment. 2007-12-12 22:33:36 +01:00
myisam 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
myisammrg Merge hynda.mysql.fi:/home/my/mysql-5.1-main 2007-09-27 17:05:07 +03:00
ndb align types 2007-09-29 09:26:33 +02:00
Makefile.am Merge gbichot3.local:/home/mysql_src/mysql-5.1-for-maria 2007-02-28 17:50:51 +01:00