diff options
author | unknown <tsmith@maint1.mysql.com> | 2006-09-05 03:52:15 +0200 |
---|---|---|
committer | unknown <tsmith@maint1.mysql.com> | 2006-09-05 03:52:15 +0200 |
commit | 0da158aa2f8ea28e20359701d3fae0d7d3dd09de (patch) | |
tree | 53a9a2f242d2a61c1a3f936b0a15fe42e9df2aac /storage/innobase/page | |
parent | fbf2bc183aad7dd3a25bf0877ebdf89f946674b4 (diff) | |
download | mariadb-git-0da158aa2f8ea28e20359701d3fae0d7d3dd09de.tar.gz |
Applied InnoDB 5.1 snapshot ss787.
Bugs fixed:
- Bug #20791 valgrind errors in InnoDB
Remove Valgrind warning of Bug #20791 : in new database
creation, we read the doublewrite buffer magic number from
uninitialized memory; the code worked because it was extremely
unlikely that the memory would contain the magic number
- Bug #21784 DROP TABLE crashes 5.1.12-pre if concurrent
queries on the table
remove update_thd() in ::store_lock()
Also includes numerous coding style fixes, etc. See file-level
comments for details.
sql/ha_innodb.cc:
Applied InnoDB 5.1 snapshot ss787.
r755:
Merge a patch from MySQL AB (Mats Kindal):
Lock and unlock prepare_commit_mutex under the same conditions.
r782:
Fix bug #21784 of a crash in DROP TABLE with concurrent queries on the table
storage/innobase/Makefile.am:
Applied InnoDB 5.1 snapshot ss787.
r772:
Merge changes from MySQL AB:
ChangeSet
2006/08/23 13:59:16-07:00 brian@zim.(none)
This patch removes need for a innodb to have its own configure.
storage/innobase/btr/btr0btr.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r764:
Split lines before an opening parenthesis, not after one.
Replace some printf(...) in debug builds with fprintf(stderr, ...).
r765:
Split lines before binary operators, not after them.
storage/innobase/btr/btr0cur.c:
Applied InnoDB 5.1 snapshot ss787.
r761:
btr_cur_search_to_nth_level(): Document where cursor is left at in
PAGE_CUR_LE searches.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r765:
Split lines before binary operators, not after them.
storage/innobase/btr/btr0pcur.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r765:
Split lines before binary operators, not after them.
storage/innobase/btr/btr0sea.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/buf/buf0buf.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r764:
Split lines before an opening parenthesis, not after one.
Replace some printf(...) in debug builds with fprintf(stderr, ...).
r765:
Split lines before binary operators, not after them.
storage/innobase/buf/buf0flu.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r764:
Split lines before an opening parenthesis, not after one.
Replace some printf(...) in debug builds with fprintf(stderr, ...).
r765:
Split lines before binary operators, not after them.
storage/innobase/buf/buf0lru.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r764:
Split lines before an opening parenthesis, not after one.
Replace some printf(...) in debug builds with fprintf(stderr, ...).
storage/innobase/buf/buf0rea.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r765:
Split lines before binary operators, not after them.
storage/innobase/data/data0data.c:
Applied InnoDB 5.1 snapshot ss787.
r743:
dfield_print_raw(): Make static. Print at most 1000 bytes to avoid
excessive space usage of the error log.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r765:
Split lines before binary operators, not after them.
storage/innobase/data/data0type.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/dict/dict0boot.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/dict/dict0crea.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/dict/dict0dict.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r764:
Split lines before an opening parenthesis, not after one.
Replace some printf(...) in debug builds with fprintf(stderr, ...).
r765:
Split lines before binary operators, not after them.
r767:
Remove dict_col_t::aux, which was only used when copying an index definition
to the data dictionary cache.
storage/innobase/dict/dict0load.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r765:
Split lines before binary operators, not after them.
storage/innobase/dict/dict0mem.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/eval/eval0eval.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r765:
Split lines before binary operators, not after them.
storage/innobase/eval/eval0proc.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/fil/fil0fil.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r764:
Split lines before an opening parenthesis, not after one.
Replace some printf(...) in debug builds with fprintf(stderr, ...).
r765:
Split lines before binary operators, not after them.
storage/innobase/fsp/fsp0fsp.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r764:
Split lines before an opening parenthesis, not after one.
Replace some printf(...) in debug builds with fprintf(stderr, ...).
r765:
Split lines before binary operators, not after them.
storage/innobase/fut/fut0lst.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/ha/ha0ha.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/ibuf/ibuf0ibuf.c:
Applied InnoDB 5.1 snapshot ss787.
r735:
Remove all traces of the obsolete concept of replicate spaces.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r764:
Split lines before an opening parenthesis, not after one.
Replace some printf(...) in debug builds with fprintf(stderr, ...).
r765:
Split lines before binary operators, not after them.
storage/innobase/include/btr0btr.ic:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/btr0cur.h:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/btr0cur.ic:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/btr0pcur.ic:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/buf0buf.h:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/buf0buf.ic:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/buf0flu.ic:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/buf0rea.h:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/data0data.h:
Applied InnoDB 5.1 snapshot ss787.
r743:
dfield_print_raw(): Make static. Print at most 1000 bytes to avoid
excessive space usage of the error log.
storage/innobase/include/data0data.ic:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/data0type.ic:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/dict0boot.h:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/dict0dict.ic:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/dict0mem.h:
Applied InnoDB 5.1 snapshot ss787.
r767:
Remove dict_col_t::aux, which was only used when copying an index definition
to the data dictionary cache.
storage/innobase/include/eval0eval.ic:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/fut0lst.ic:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/ibuf0ibuf.ic:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/lock0lock.ic:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/log0log.ic:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/log0recv.h:
Applied InnoDB 5.1 snapshot ss787.
r735:
Remove all traces of the obsolete concept of replicate spaces.
storage/innobase/include/mach0data.ic:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/mem0mem.ic:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r765:
Split lines before binary operators, not after them.
storage/innobase/include/mtr0log.ic:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/mtr0mtr.h:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/os0file.h:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/page0cur.ic:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/page0page.ic:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r764:
Split lines before an opening parenthesis, not after one.
Replace some printf(...) in debug builds with fprintf(stderr, ...).
storage/innobase/include/que0que.ic:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/read0read.ic:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/rem0cmp.ic:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/rem0rec.ic:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r765:
Split lines before binary operators, not after them.
storage/innobase/include/row0mysql.h:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/row0purge.h:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/row0row.h:
Applied InnoDB 5.1 snapshot ss787.
r777:
Remove unused code.
row_build(): Remove type==ROW_COPY_ALSO_EXTERNALS, because it is never
passed.
storage/innobase/include/row0row.ic:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/row0sel.h:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/row0sel.ic:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/row0undo.h:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/row0upd.ic:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/sync0rw.h:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/sync0rw.ic:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/sync0sync.h:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/sync0sync.ic:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/trx0rec.ic:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/trx0rseg.ic:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r765:
Split lines before binary operators, not after them.
storage/innobase/include/trx0sys.ic:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r765:
Split lines before binary operators, not after them.
storage/innobase/include/trx0trx.h:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/trx0trx.ic:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/trx0undo.h:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/trx0undo.ic:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/trx0xa.h:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/univ.i:
Applied InnoDB 5.1 snapshot ss787.
r772:
Merge changes from MySQL AB:
ChangeSet
2006/08/23 13:59:16-07:00 brian@zim.(none)·
This patch removes need for a innodb to have its own configure.·
univ.i: Replace ../ib_config.h with config.h.
r777:
Remove unused code.
univ.i: Do not #define YYDEBUG, because it is only useful for debugging
the grammar of the Bison-generated InnoDB SQL parser.
storage/innobase/include/ut0byte.ic:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/include/ut0rnd.ic:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r765:
Split lines before binary operators, not after them.
storage/innobase/lock/lock0lock.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r764:
Split lines before an opening parenthesis, not after one.
Replace some printf(...) in debug builds with fprintf(stderr, ...).
r765:
Split lines before binary operators, not after them.
storage/innobase/log/log0log.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r764:
Split lines before an opening parenthesis, not after one.
Replace some printf(...) in debug builds with fprintf(stderr, ...).
r765:
Split lines before binary operators, not after them.
storage/innobase/log/log0recv.c:
Applied InnoDB 5.1 snapshot ss787.
r735:
Remove all traces of the obsolete concept of replicate spaces.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r764:
Split lines before an opening parenthesis, not after one.
Replace some printf(...) in debug builds with fprintf(stderr, ...).
r765:
Split lines before binary operators, not after them.
storage/innobase/mem/mem0dbg.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r765:
Split lines before binary operators, not after them.
storage/innobase/mem/mem0mem.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/mem/mem0pool.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/mtr/mtr0log.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/mtr/mtr0mtr.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r765:
Split lines before binary operators, not after them.
storage/innobase/os/os0file.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r765:
Split lines before binary operators, not after them.
storage/innobase/os/os0proc.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r765:
Split lines before binary operators, not after them.
storage/innobase/os/os0sync.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/os/os0thread.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/page/page0cur.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r765:
Split lines before binary operators, not after them.
storage/innobase/page/page0page.c:
Applied InnoDB 5.1 snapshot ss787.
r761:
btr_cur_search_to_nth_level(): Document where cursor is left at in
PAGE_CUR_LE searches.
r762:
page_validate(): Add missing space to error print, for real this time,
following an error in r761.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r764:
Split lines before an opening parenthesis, not after one.
Replace some printf(...) in debug builds with fprintf(stderr, ...).
r765:
Split lines before binary operators, not after them.
storage/innobase/pars/pars0opt.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/pars/pars0pars.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r764:
Split lines before an opening parenthesis, not after one.
Replace some printf(...) in debug builds with fprintf(stderr, ...).
r765:
Split lines before binary operators, not after them.
storage/innobase/que/que0que.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/read/read0read.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/rem/rem0cmp.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r764:
Split lines before an opening parenthesis, not after one.
Replace some printf(...) in debug builds with fprintf(stderr, ...).
r765:
Split lines before binary operators, not after them.
storage/innobase/rem/rem0rec.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r765:
Split lines before binary operators, not after them.
storage/innobase/row/row0ins.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r764:
Split lines before an opening parenthesis, not after one.
Replace some printf(...) in debug builds with fprintf(stderr, ...).
r765:
Split lines before binary operators, not after them.
storage/innobase/row/row0mysql.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r764:
Split lines before an opening parenthesis, not after one.
Replace some printf(...) in debug builds with fprintf(stderr, ...).
r765:
Split lines before binary operators, not after them.
storage/innobase/row/row0purge.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/row/row0row.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r765:
Split lines before binary operators, not after them.
r777:
Remove unused code.
row_build(): Remove type==ROW_COPY_ALSO_EXTERNALS, because it is never
passed.
storage/innobase/row/row0sel.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r764:
Split lines before an opening parenthesis, not after one.
Replace some printf(...) in debug builds with fprintf(stderr, ...).
r765:
Split lines before binary operators, not after them.
storage/innobase/row/row0uins.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/row/row0umod.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/row/row0undo.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/row/row0upd.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r765:
Split lines before binary operators, not after them.
storage/innobase/row/row0vers.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/srv/srv0srv.c:
Applied InnoDB 5.1 snapshot ss787.
r741:
srv_master_thread(): Add OS_THREAD_DUMMY_RETURN to get rid of a compiler
warning "no return value from a function returning non-void".
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r764:
Split lines before an opening parenthesis, not after one.
Replace some printf(...) in debug builds with fprintf(stderr, ...).
r765:
Split lines before binary operators, not after them.
r780:
Add a warning comment above the place where we set srv_main_thread_op_info
to "waiting for server activity" that mentions that this string should not
be changed.
storage/innobase/srv/srv0start.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r765:
Split lines before binary operators, not after them.
storage/innobase/sync/sync0arr.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r765:
Split lines before binary operators, not after them.
storage/innobase/sync/sync0rw.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/sync/sync0sync.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/thr/thr0loc.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/trx/trx0purge.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r765:
Split lines before binary operators, not after them.
storage/innobase/trx/trx0rec.c:
Applied InnoDB 5.1 snapshot ss787.
r735:
Remove all traces of the obsolete concept of replicate spaces.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r765:
Split lines before binary operators, not after them.
storage/innobase/trx/trx0roll.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/trx/trx0rseg.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/trx/trx0sys.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r765:
Split lines before binary operators, not after them.
storage/innobase/trx/trx0trx.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r764:
Split lines before an opening parenthesis, not after one.
Replace some printf(...) in debug builds with fprintf(stderr, ...).
r765:
Split lines before binary operators, not after them.
storage/innobase/trx/trx0undo.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r765:
Split lines before binary operators, not after them.
storage/innobase/ut/ut0byte.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/ut/ut0dbg.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r764:
Split lines before an opening parenthesis, not after one.
Replace some printf(...) in debug builds with fprintf(stderr, ...).
storage/innobase/ut/ut0mem.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/ut/ut0ut.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
r765:
Split lines before binary operators, not after them.
storage/innobase/ut/ut0vec.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
storage/innobase/ut/ut0wqueue.c:
Applied InnoDB 5.1 snapshot ss787.
r763:
Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).
Diffstat (limited to 'storage/innobase/page')
-rw-r--r-- | storage/innobase/page/page0cur.c | 224 | ||||
-rw-r--r-- | storage/innobase/page/page0page.c | 264 |
2 files changed, 264 insertions, 224 deletions
diff --git a/storage/innobase/page/page0cur.c b/storage/innobase/page/page0cur.c index 70943ec3c8a..2a440c4f479 100644 --- a/storage/innobase/page/page0cur.c +++ b/storage/innobase/page/page0cur.c @@ -66,29 +66,29 @@ page_cur_try_search_shortcut( rec = page_header_get_ptr(page, PAGE_LAST_INSERT); offsets = rec_get_offsets(rec, index, offsets, - dtuple_get_n_fields(tuple), &heap); + dtuple_get_n_fields(tuple), &heap); ut_ad(rec); ut_ad(page_rec_is_user_rec(rec)); ut_pair_min(&low_match, &low_bytes, - *ilow_matched_fields, *ilow_matched_bytes, - *iup_matched_fields, *iup_matched_bytes); + *ilow_matched_fields, *ilow_matched_bytes, + *iup_matched_fields, *iup_matched_bytes); up_match = low_match; up_bytes = low_bytes; if (page_cmp_dtuple_rec_with_match(tuple, rec, offsets, - &low_match, &low_bytes) < 0) { + &low_match, &low_bytes) < 0) { goto exit_func; } next_rec = page_rec_get_next(rec); offsets = rec_get_offsets(next_rec, index, offsets, - dtuple_get_n_fields(tuple), &heap); + dtuple_get_n_fields(tuple), &heap); if (page_cmp_dtuple_rec_with_match(tuple, next_rec, offsets, - &up_match, &up_bytes) >= 0) { + &up_match, &up_bytes) >= 0) { goto exit_func; } @@ -96,11 +96,11 @@ page_cur_try_search_shortcut( #ifdef UNIV_SEARCH_DEBUG page_cur_search_with_match(page, index, tuple, PAGE_CUR_DBG, - iup_matched_fields, - iup_matched_bytes, - ilow_matched_fields, - ilow_matched_bytes, - &cursor2); + iup_matched_fields, + iup_matched_bytes, + ilow_matched_fields, + ilow_matched_bytes, + &cursor2); ut_a(cursor2.rec == cursor->rec); if (next_rec != page_get_supremum_rec(page)) { @@ -163,20 +163,20 @@ page_cur_rec_field_extends( rec_f = rec_get_nth_field(rec, offsets, n, &rec_f_len); if (type->mtype == DATA_VARCHAR - || type->mtype == DATA_CHAR - || type->mtype == DATA_FIXBINARY - || type->mtype == DATA_BINARY - || type->mtype == DATA_BLOB - || type->mtype == DATA_VARMYSQL - || type->mtype == DATA_MYSQL) { + || type->mtype == DATA_CHAR + || type->mtype == DATA_FIXBINARY + || type->mtype == DATA_BINARY + || type->mtype == DATA_BLOB + || type->mtype == DATA_VARMYSQL + || type->mtype == DATA_MYSQL) { if (dfield_get_len(dfield) != UNIV_SQL_NULL - && rec_f_len != UNIV_SQL_NULL - && rec_f_len >= dfield_get_len(dfield) - && 0 == cmp_data_data_slow(type, - dfield_get_data(dfield), - dfield_get_len(dfield), - rec_f, dfield_get_len(dfield))) { + && rec_f_len != UNIV_SQL_NULL + && rec_f_len >= dfield_get_len(dfield) + && !cmp_data_data_slow(type, + dfield_get_data(dfield), + dfield_get_len(dfield), + rec_f, dfield_get_len(dfield))) { return(TRUE); } @@ -236,7 +236,7 @@ page_cur_search_with_match( *offsets_ = (sizeof offsets_) / sizeof *offsets_; ut_ad(page && tuple && iup_matched_fields && iup_matched_bytes - && ilow_matched_fields && ilow_matched_bytes && cursor); + && ilow_matched_fields && ilow_matched_bytes && cursor); ut_ad(dtuple_validate(tuple)); ut_ad(dtuple_check_typed(tuple)); #ifdef UNIV_DEBUG @@ -246,23 +246,24 @@ page_cur_search_with_match( # ifdef PAGE_CUR_LE_OR_EXTENDS if (mode != PAGE_CUR_LE_OR_EXTENDS) # endif /* PAGE_CUR_LE_OR_EXTENDS */ - ut_ad((mode == PAGE_CUR_L) || (mode == PAGE_CUR_LE) - || (mode == PAGE_CUR_G) || (mode == PAGE_CUR_GE)); + ut_ad(mode == PAGE_CUR_L || mode == PAGE_CUR_LE + || mode == PAGE_CUR_G || mode == PAGE_CUR_GE); #endif /* UNIV_DEBUG */ page_check_dir(page); #ifdef PAGE_CUR_ADAPT if ((page_header_get_field(page, PAGE_LEVEL) == 0) - && (mode == PAGE_CUR_LE) - && (page_header_get_field(page, PAGE_N_DIRECTION) > 3) - && (page_header_get_ptr(page, PAGE_LAST_INSERT)) - && (page_header_get_field(page, PAGE_DIRECTION) == PAGE_RIGHT)) { - - if (page_cur_try_search_shortcut(page, index, tuple, - iup_matched_fields, iup_matched_bytes, - ilow_matched_fields, ilow_matched_bytes, - cursor)) { + && (mode == PAGE_CUR_LE) + && (page_header_get_field(page, PAGE_N_DIRECTION) > 3) + && (page_header_get_ptr(page, PAGE_LAST_INSERT)) + && (page_header_get_field(page, PAGE_DIRECTION) == PAGE_RIGHT)) { + + if (page_cur_try_search_shortcut + (page, index, tuple, + iup_matched_fields, iup_matched_bytes, + ilow_matched_fields, ilow_matched_bytes, + cursor)) { return; } } @@ -306,11 +307,12 @@ page_cur_search_with_match( mid_rec = page_dir_slot_get_rec(slot); ut_pair_min(&cur_matched_fields, &cur_matched_bytes, - low_matched_fields, low_matched_bytes, - up_matched_fields, up_matched_bytes); + low_matched_fields, low_matched_bytes, + up_matched_fields, up_matched_bytes); offsets = rec_get_offsets(mid_rec, index, offsets, - dtuple_get_n_fields_cmp(tuple), &heap); + dtuple_get_n_fields_cmp(tuple), + &heap); cmp = cmp_dtuple_rec_with_match(tuple, mid_rec, offsets, &cur_matched_fields, @@ -321,11 +323,11 @@ low_slot_match: low_matched_fields = cur_matched_fields; low_matched_bytes = cur_matched_bytes; - } else if (UNIV_LIKELY(cmp /* == -1 */)) { + } else if (UNIV_EXPECT(cmp, -1)) { #ifdef PAGE_CUR_LE_OR_EXTENDS if (mode == PAGE_CUR_LE_OR_EXTENDS - && page_cur_rec_field_extends(tuple, mid_rec, - offsets, cur_matched_fields)) { + && page_cur_rec_field_extends + (tuple, mid_rec, offsets, cur_matched_fields)) { goto low_slot_match; } @@ -339,7 +341,7 @@ up_slot_match: #ifdef PAGE_CUR_LE_OR_EXTENDS || mode == PAGE_CUR_LE_OR_EXTENDS #endif /* PAGE_CUR_LE_OR_EXTENDS */ - ) { + ) { goto low_slot_match; } else { @@ -361,11 +363,12 @@ up_slot_match: mid_rec = page_rec_get_next(low_rec); ut_pair_min(&cur_matched_fields, &cur_matched_bytes, - low_matched_fields, low_matched_bytes, - up_matched_fields, up_matched_bytes); + low_matched_fields, low_matched_bytes, + up_matched_fields, up_matched_bytes); offsets = rec_get_offsets(mid_rec, index, offsets, - dtuple_get_n_fields_cmp(tuple), &heap); + dtuple_get_n_fields_cmp(tuple), + &heap); cmp = cmp_dtuple_rec_with_match(tuple, mid_rec, offsets, &cur_matched_fields, @@ -376,11 +379,11 @@ low_rec_match: low_matched_fields = cur_matched_fields; low_matched_bytes = cur_matched_bytes; - } else if (UNIV_LIKELY(cmp /* == -1 */)) { + } else if (UNIV_EXPECT(cmp, -1)) { #ifdef PAGE_CUR_LE_OR_EXTENDS if (mode == PAGE_CUR_LE_OR_EXTENDS - && page_cur_rec_field_extends(tuple, mid_rec, - offsets, cur_matched_fields)) { + && page_cur_rec_field_extends + (tuple, mid_rec, offsets, cur_matched_fields)) { goto low_rec_match; } @@ -393,7 +396,7 @@ up_rec_match: #ifdef PAGE_CUR_LE_OR_EXTENDS || mode == PAGE_CUR_LE_OR_EXTENDS #endif /* PAGE_CUR_LE_OR_EXTENDS */ - ) { + ) { goto low_rec_match; } else { @@ -410,10 +413,10 @@ up_rec_match: dbg_matched_bytes = 0; offsets = rec_get_offsets(low_rec, index, offsets, - ULINT_UNDEFINED, &heap); + ULINT_UNDEFINED, &heap); dbg_cmp = page_cmp_dtuple_rec_with_match(tuple, low_rec, offsets, - &dbg_matched_fields, - &dbg_matched_bytes); + &dbg_matched_fields, + &dbg_matched_bytes); if (mode == PAGE_CUR_G) { ut_a(dbg_cmp >= 0); } else if (mode == PAGE_CUR_GE) { @@ -434,10 +437,10 @@ up_rec_match: dbg_matched_bytes = 0; offsets = rec_get_offsets(up_rec, index, offsets, - ULINT_UNDEFINED, &heap); + ULINT_UNDEFINED, &heap); dbg_cmp = page_cmp_dtuple_rec_with_match(tuple, up_rec, offsets, - &dbg_matched_fields, - &dbg_matched_bytes); + &dbg_matched_fields, + &dbg_matched_bytes); if (mode == PAGE_CUR_G) { ut_a(dbg_cmp == -1); } else if (mode == PAGE_CUR_GE) { @@ -533,7 +536,7 @@ page_cur_insert_rec_write_log( ut_a(rec_size < UNIV_PAGE_SIZE); ut_ad(buf_frame_align(insert_rec) == buf_frame_align(cursor_rec)); ut_ad(!page_rec_is_comp(insert_rec) - == !dict_table_is_comp(index->table)); + == !dict_table_is_comp(index->table)); comp = page_rec_is_comp(insert_rec); { @@ -548,9 +551,9 @@ page_cur_insert_rec_write_log( *ins_offs_ = (sizeof ins_offs_) / sizeof *ins_offs_; cur_offs = rec_get_offsets(cursor_rec, index, cur_offs_, - ULINT_UNDEFINED, &heap); + ULINT_UNDEFINED, &heap); ins_offs = rec_get_offsets(insert_rec, index, ins_offs_, - ULINT_UNDEFINED, &heap); + ULINT_UNDEFINED, &heap); extra_size = rec_offs_extra_size(ins_offs); cur_extra_size = rec_offs_extra_size(cur_offs); @@ -583,9 +586,10 @@ page_cur_insert_rec_write_log( ins_ptr++; cur_ptr++; } else if ((i < extra_size) - && (i >= extra_size - (comp - ? REC_N_NEW_EXTRA_BYTES - : REC_N_OLD_EXTRA_BYTES))) { + && (i >= extra_size + - (comp + ? REC_N_NEW_EXTRA_BYTES + : REC_N_OLD_EXTRA_BYTES))) { i = extra_size; ins_ptr = insert_rec; cur_ptr = cursor_rec; @@ -598,9 +602,11 @@ page_cur_insert_rec_write_log( if (mtr_get_log_mode(mtr) != MTR_LOG_SHORT_INSERTS) { log_ptr = mlog_open_and_write_index(mtr, insert_rec, index, - comp - ? MLOG_COMP_REC_INSERT : MLOG_REC_INSERT, - 2 + 5 + 1 + 5 + 5 + MLOG_BUF_MARGIN); + comp + ? MLOG_COMP_REC_INSERT + : MLOG_REC_INSERT, + 2 + 5 + 1 + 5 + 5 + + MLOG_BUF_MARGIN); if (!log_ptr) { /* Logging in mtr is switched off during crash @@ -611,7 +617,7 @@ page_cur_insert_rec_write_log( log_end = &log_ptr[2 + 5 + 1 + 5 + 5 + MLOG_BUF_MARGIN]; /* Write the cursor rec offset as a 2-byte ulint */ mach_write_to_2(log_ptr, cursor_rec - - buf_frame_align(cursor_rec)); + - buf_frame_align(cursor_rec)); log_ptr += 2; } else { log_ptr = mlog_open(mtr, 5 + 1 + 5 + 5 + MLOG_BUF_MARGIN); @@ -623,10 +629,10 @@ page_cur_insert_rec_write_log( log_end = &log_ptr[5 + 1 + 5 + 5 + MLOG_BUF_MARGIN]; } - if ((rec_get_info_and_status_bits(insert_rec, comp) != - rec_get_info_and_status_bits(cursor_rec, comp)) - || (extra_size != cur_extra_size) - || (rec_size != cur_rec_size)) { + if ((rec_get_info_and_status_bits(insert_rec, comp) + != rec_get_info_and_status_bits(cursor_rec, comp)) + || (extra_size != cur_extra_size) + || (rec_size != cur_rec_size)) { extra_info_yes = 1; } else { @@ -636,11 +642,12 @@ page_cur_insert_rec_write_log( /* Write the record end segment length and the extra info storage flag */ log_ptr += mach_write_compressed(log_ptr, 2 * (rec_size - i) - + extra_info_yes); + + extra_info_yes); if (extra_info_yes) { /* Write the info bits */ - mach_write_to_1(log_ptr, - rec_get_info_and_status_bits(insert_rec, comp)); + mach_write_to_1 + (log_ptr, + rec_get_info_and_status_bits(insert_rec, comp)); log_ptr++; /* Write the record origin offset */ @@ -786,11 +793,11 @@ page_cur_parse_insert_rec( } offsets = rec_get_offsets(cursor_rec, index, offsets, - ULINT_UNDEFINED, &heap); + ULINT_UNDEFINED, &heap); if (extra_info_yes == 0) { - info_and_status_bits = rec_get_info_and_status_bits( - cursor_rec, page_is_comp(page)); + info_and_status_bits = rec_get_info_and_status_bits + (cursor_rec, page_is_comp(page)); origin_offset = rec_offs_extra_size(offsets); mismatch_index = rec_offs_size(offsets) - end_seg_len; } @@ -827,12 +834,12 @@ page_cur_parse_insert_rec( ut_memcpy(buf + mismatch_index, ptr, end_seg_len); rec_set_info_and_status_bits(buf + origin_offset, page_is_comp(page), - info_and_status_bits); + info_and_status_bits); page_cur_position(cursor_rec, &cursor); offsets = rec_get_offsets(buf + origin_offset, index, offsets, - ULINT_UNDEFINED, &heap); + ULINT_UNDEFINED, &heap); page_cur_rec_insert(&cursor, buf + origin_offset, index, offsets, mtr); if (buf != buf1) { @@ -868,9 +875,11 @@ page_cur_insert_rec_low( byte* insert_buf = NULL; ulint rec_size; byte* page; /* the relevant page */ - rec_t* last_insert; /* cursor position at previous insert */ + rec_t* last_insert; /* cursor position at previous + insert */ rec_t* insert_rec; /* inserted record */ - ulint heap_no; /* heap number of the inserted record */ + ulint heap_no; /* heap number of the inserted + record */ rec_t* current_rec; /* current record after which the new record is inserted */ rec_t* next_rec; /* next record after current before @@ -899,7 +908,7 @@ page_cur_insert_rec_low( } else { if (!offsets) { offsets = rec_get_offsets(rec, index, offsets, - ULINT_UNDEFINED, &heap); + ULINT_UNDEFINED, &heap); } ut_ad(rec_offs_validate(rec, index, offsets)); rec_size = rec_offs_size(offsets); @@ -918,9 +927,9 @@ page_cur_insert_rec_low( /* 3. Create the record */ if (tuple != NULL) { insert_rec = rec_convert_dtuple_to_rec(insert_buf, - index, tuple); + index, tuple); offsets = rec_get_offsets(insert_rec, index, offsets, - ULINT_UNDEFINED, &heap); + ULINT_UNDEFINED, &heap); } else { insert_rec = rec_copy(insert_buf, rec, offsets); ut_ad(rec_offs_validate(rec, index, offsets)); @@ -953,26 +962,30 @@ page_cur_insert_rec_low( last_insert = page_header_get_ptr(page, PAGE_LAST_INSERT); ut_ad(!last_insert || !comp - || rec_get_node_ptr_flag(last_insert) - == rec_get_node_ptr_flag(insert_rec)); + || rec_get_node_ptr_flag(last_insert) + == rec_get_node_ptr_flag(insert_rec)); if (last_insert == NULL) { page_header_set_field(page, PAGE_DIRECTION, PAGE_NO_DIRECTION); page_header_set_field(page, PAGE_N_DIRECTION, 0); } else if ((last_insert == current_rec) - && (page_header_get_field(page, PAGE_DIRECTION) != PAGE_LEFT)) { + && (page_header_get_field(page, PAGE_DIRECTION) + != PAGE_LEFT)) { page_header_set_field(page, PAGE_DIRECTION, PAGE_RIGHT); page_header_set_field(page, PAGE_N_DIRECTION, - page_header_get_field(page, PAGE_N_DIRECTION) + 1); + page_header_get_field + (page, PAGE_N_DIRECTION) + 1); } else if ((page_rec_get_next(insert_rec) == last_insert) - && (page_header_get_field(page, PAGE_DIRECTION) != PAGE_RIGHT)) { + && (page_header_get_field(page, PAGE_DIRECTION) + != PAGE_RIGHT)) { page_header_set_field(page, PAGE_DIRECTION, PAGE_LEFT); page_header_set_field(page, PAGE_N_DIRECTION, - page_header_get_field(page, PAGE_N_DIRECTION) + 1); + page_header_get_field + (page, PAGE_N_DIRECTION) + 1); } else { page_header_set_field(page, PAGE_DIRECTION, PAGE_NO_DIRECTION); page_header_set_field(page, PAGE_N_DIRECTION, 0); @@ -997,7 +1010,7 @@ page_cur_insert_rec_low( /* 9. Write log record of the insert */ page_cur_insert_rec_write_log(insert_rec, rec_size, current_rec, - index, mtr); + index, mtr); if (UNIV_LIKELY_NULL(heap)) { mem_heap_free(heap); @@ -1022,9 +1035,9 @@ page_copy_rec_list_to_created_page_write_log( ut_ad(!!page_is_comp(page) == dict_table_is_comp(index->table)); log_ptr = mlog_open_and_write_index(mtr, page, index, - page_is_comp(page) - ? MLOG_COMP_LIST_END_COPY_CREATED - : MLOG_LIST_END_COPY_CREATED, 4); + page_is_comp(page) + ? MLOG_COMP_LIST_END_COPY_CREATED + : MLOG_LIST_END_COPY_CREATED, 4); ut_a(log_ptr); mlog_close(mtr, log_ptr + 4); @@ -1069,7 +1082,7 @@ page_parse_copy_rec_list_to_created_page( while (ptr < rec_end) { ptr = page_cur_parse_insert_rec(TRUE, ptr, end_ptr, - index, page, mtr); + index, page, mtr); } ut_a(ptr == rec_end); @@ -1130,11 +1143,11 @@ page_copy_rec_list_end_to_created_page( in the debug version */ page_dir_set_n_slots(new_page, UNIV_PAGE_SIZE / 2); page_header_set_ptr(new_page, PAGE_HEAP_TOP, - new_page + UNIV_PAGE_SIZE - 1); + new_page + UNIV_PAGE_SIZE - 1); #endif log_ptr = page_copy_rec_list_to_created_page_write_log(new_page, - index, mtr); + index, mtr); log_data_len = dyn_array_get_data_size(&(mtr->log)); @@ -1155,7 +1168,7 @@ page_copy_rec_list_end_to_created_page( /* should be do ... until, comment by Jani */ while (rec != page_get_supremum_rec(page)) { offsets = rec_get_offsets(rec, index, offsets, - ULINT_UNDEFINED, &heap); + ULINT_UNDEFINED, &heap); insert_rec = rec_copy(heap_top, rec, offsets); rec_set_next_offs(prev_rec, comp, insert_rec - new_page); @@ -1185,13 +1198,13 @@ page_copy_rec_list_end_to_created_page( } page_cur_insert_rec_write_log(insert_rec, rec_size, prev_rec, - index, mtr); + index, mtr); prev_rec = insert_rec; rec = page_rec_get_next(rec); } if ((slot_index > 0) && (count + 1 - + (PAGE_DIR_SLOT_MAX_N_OWNED + 1) / 2 + + (PAGE_DIR_SLOT_MAX_N_OWNED + 1) / 2 <= PAGE_DIR_SLOT_MAX_N_OWNED)) { /* We can merge the two last dir slots. This operation is here to make this function imitate exactly the equivalent @@ -1218,7 +1231,7 @@ page_copy_rec_list_end_to_created_page( mach_write_to_4(log_ptr, log_data_len); rec_set_next_offs(insert_rec, comp, - comp ? PAGE_NEW_SUPREMUM : PAGE_OLD_SUPREMUM); + comp ? PAGE_NEW_SUPREMUM : PAGE_OLD_SUPREMUM); slot = page_dir_get_nth_slot(new_page, 1 + slot_index); @@ -1254,9 +1267,9 @@ page_cur_delete_rec_write_log( ut_ad(!!page_rec_is_comp(rec) == dict_table_is_comp(index->table)); log_ptr = mlog_open_and_write_index(mtr, rec, index, - page_rec_is_comp(rec) - ? MLOG_COMP_REC_DELETE - : MLOG_REC_DELETE, 2); + page_rec_is_comp(rec) + ? MLOG_COMP_REC_DELETE + : MLOG_REC_DELETE, 2); if (!log_ptr) { /* Logging in mtr is switched off during crash recovery: @@ -1306,8 +1319,9 @@ page_cur_parse_delete_rec( page_cur_position(rec, &cursor); page_cur_delete_rec(&cursor, index, - rec_get_offsets(rec, index, offsets_, - ULINT_UNDEFINED, &heap), mtr); + rec_get_offsets(rec, index, offsets_, + ULINT_UNDEFINED, &heap), + mtr); if (UNIV_LIKELY_NULL(heap)) { mem_heap_free(heap); } @@ -1390,7 +1404,7 @@ page_cur_delete_rec( page_rec_set_next(prev_rec, next_rec); page_header_set_field(page, PAGE_N_RECS, - (ulint)(page_get_n_recs(page) - 1)); + (ulint)(page_get_n_recs(page) - 1)); /* 4. If the deleted record is pointed to by a dir slot, update the record pointer in slot. In the following if-clause we assume that diff --git a/storage/innobase/page/page0page.c b/storage/innobase/page/page0page.c index a7a0dd4b788..0c869445546 100644 --- a/storage/innobase/page/page0page.c +++ b/storage/innobase/page/page0page.c @@ -104,9 +104,10 @@ page_dir_find_owner_slot( if (UNIV_UNLIKELY(slot == first_slot)) { fprintf(stderr, - "InnoDB: Probable data corruption on page %lu\n" - "InnoDB: Original record ", - (ulong) buf_frame_get_page_no(page)); + "InnoDB: Probable data corruption on" + " page %lu\n" + "InnoDB: Original record ", + (ulong) buf_frame_get_page_no(page)); if (page_is_comp(page)) { fputs("(compact record)", stderr); @@ -115,17 +116,17 @@ page_dir_find_owner_slot( } fputs("\n" - "InnoDB: on that page.\n" - "InnoDB: Cannot find the dir slot for record ", - stderr); + "InnoDB: on that page.\n" + "InnoDB: Cannot find the dir slot for record ", + stderr); if (page_is_comp(page)) { fputs("(compact record)", stderr); } else { rec_print_old(stderr, page - + mach_decode_2(rec_offs_bytes)); + + mach_decode_2(rec_offs_bytes)); } fputs("\n" - "InnoDB: on that page!\n", stderr); + "InnoDB: on that page!\n", stderr); buf_page_print(page); @@ -163,7 +164,7 @@ page_dir_slot_check( ut_a(page_rec_check(page_dir_slot_get_rec(slot))); n_owned = rec_get_n_owned(page_dir_slot_get_rec(slot), - page_is_comp(page)); + page_is_comp(page)); if (slot == page_dir_get_nth_slot(page, 0)) { ut_a(n_owned == 1); @@ -242,17 +243,17 @@ page_mem_alloc( *offsets_ = (sizeof offsets_) / sizeof *offsets_; offsets = rec_get_offsets(rec, index, offsets, - ULINT_UNDEFINED, &heap); + ULINT_UNDEFINED, &heap); if (rec_offs_size(offsets) >= need) { page_header_set_ptr(page, PAGE_FREE, - page_rec_get_next(rec)); + page_rec_get_next(rec)); garbage = page_header_get_field(page, PAGE_GARBAGE); ut_ad(garbage >= need); page_header_set_field(page, PAGE_GARBAGE, - garbage - need); + garbage - need); *heap_no = rec_get_heap_no(rec, page_is_comp(page)); @@ -297,8 +298,9 @@ page_create_write_log( mtr_t* mtr, /* in: mini-transaction handle */ ulint comp) /* in: nonzero=compact page format */ { - mlog_write_initial_log_record(frame, - comp ? MLOG_COMP_PAGE_CREATE : MLOG_PAGE_CREATE, mtr); + mlog_write_initial_log_record(frame, comp + ? MLOG_COMP_PAGE_CREATE + : MLOG_PAGE_CREATE, mtr); } /*************************************************************** @@ -379,7 +381,7 @@ page_create( dfield_set_data(field, "infimum", 8); dtype_set(dfield_get_type(field), - DATA_VARCHAR, DATA_ENGLISH | DATA_NOT_NULL, 8, 0); + DATA_VARCHAR, DATA_ENGLISH | DATA_NOT_NULL, 8, 0); /* Set the corresponding physical record to its place in the page record heap */ @@ -387,13 +389,13 @@ page_create( infimum_rec = rec_convert_dtuple_to_rec(heap_top, index, tuple); - ut_a(infimum_rec == - page + (comp ? PAGE_NEW_INFIMUM : PAGE_OLD_INFIMUM)); + ut_a(infimum_rec == page + + (comp ? PAGE_NEW_INFIMUM : PAGE_OLD_INFIMUM)); rec_set_n_owned(infimum_rec, comp, 1); rec_set_heap_no(infimum_rec, comp, 0); offsets = rec_get_offsets(infimum_rec, index, NULL, - ULINT_UNDEFINED, &heap); + ULINT_UNDEFINED, &heap); heap_top = rec_get_end(infimum_rec, offsets); @@ -405,22 +407,22 @@ page_create( dfield_set_data(field, "supremum", comp ? 8 : 9); dtype_set(dfield_get_type(field), - DATA_VARCHAR, DATA_ENGLISH | DATA_NOT_NULL, comp ? 8 : 9, 0); + DATA_VARCHAR, DATA_ENGLISH | DATA_NOT_NULL, comp ? 8 : 9, 0); supremum_rec = rec_convert_dtuple_to_rec(heap_top, index, tuple); - ut_a(supremum_rec == - page + (comp ? PAGE_NEW_SUPREMUM : PAGE_OLD_SUPREMUM)); + ut_a(supremum_rec == page + + (comp ? PAGE_NEW_SUPREMUM : PAGE_OLD_SUPREMUM)); rec_set_n_owned(supremum_rec, comp, 1); rec_set_heap_no(supremum_rec, comp, 1); offsets = rec_get_offsets(supremum_rec, index, offsets, - ULINT_UNDEFINED, &heap); + ULINT_UNDEFINED, &heap); heap_top = rec_get_end(supremum_rec, offsets); - ut_ad(heap_top == - page + (comp ? PAGE_NEW_SUPREMUM_END : PAGE_OLD_SUPREMUM_END)); + ut_ad(heap_top == page + + (comp ? PAGE_NEW_SUPREMUM_END : PAGE_OLD_SUPREMUM_END)); mem_heap_free(heap); @@ -437,7 +439,7 @@ page_create( page_header_set_field(page, PAGE_N_RECS, 0); page_set_max_trx_id(page, ut_dulint_zero); memset(heap_top, 0, UNIV_PAGE_SIZE - PAGE_EMPTY_DIR_START - - (heap_top - page)); + - (heap_top - page)); /* 5. SET POINTERS IN RECORDS AND DIR SLOTS */ @@ -486,11 +488,11 @@ page_copy_rec_list_end_no_locks( } ut_a((ibool)!!page_is_comp(new_page) - == dict_table_is_comp(index->table)); + == dict_table_is_comp(index->table)); ut_a(page_is_comp(new_page) == page_is_comp(page)); ut_a(mach_read_from_2(new_page + UNIV_PAGE_SIZE - 10) == (ulint) - (page_is_comp(new_page) - ? PAGE_NEW_INFIMUM : PAGE_OLD_INFIMUM)); + (page_is_comp(new_page) + ? PAGE_NEW_INFIMUM : PAGE_OLD_INFIMUM)); page_cur_set_before_first(new_page, &cur2); @@ -504,9 +506,9 @@ page_copy_rec_list_end_no_locks( break; } offsets = rec_get_offsets(cur1_rec, index, offsets, - ULINT_UNDEFINED, &heap); + ULINT_UNDEFINED, &heap); if (UNIV_UNLIKELY(!page_cur_rec_insert(&cur2, cur1_rec, index, - offsets, mtr))) { + offsets, mtr))) { /* Track an assertion failure reported on the mailing list on June 18th, 2003 */ @@ -515,7 +517,8 @@ page_copy_rec_list_end_no_locks( ut_print_timestamp(stderr); fprintf(stderr, -"InnoDB: rec offset %lu, cur1 offset %lu, cur2 offset %lu\n", + "InnoDB: rec offset %lu, cur1 offset %lu," + " cur2 offset %lu\n", (ulong)(rec - page), (ulong)(page_cur_get_rec(&cur1) - page), (ulong)(page_cur_get_rec(&cur2) - new_page)); @@ -548,10 +551,10 @@ page_copy_rec_list_end( { if (page_dir_get_n_heap(new_page) == 2) { page_copy_rec_list_end_to_created_page(new_page, page, rec, - index, mtr); + index, mtr); } else { page_copy_rec_list_end_no_locks(new_page, page, rec, - index, mtr); + index, mtr); } /* Update the lock table, MAX_TRX_ID, and possible hash index */ @@ -604,9 +607,9 @@ page_copy_rec_list_start( rec_t* ins_rec; rec_t* cur1_rec = page_cur_get_rec(&cur1); offsets = rec_get_offsets(cur1_rec, index, offsets, - ULINT_UNDEFINED, &heap); + ULINT_UNDEFINED, &heap); ins_rec = page_cur_rec_insert(&cur2, cur1_rec, index, - offsets, mtr); + offsets, mtr); ut_a(ins_rec); page_cur_move_to_next(&cur1); @@ -640,9 +643,9 @@ page_delete_rec_list_write_log( { byte* log_ptr; ut_ad(type == MLOG_LIST_END_DELETE - || type == MLOG_LIST_START_DELETE - || type == MLOG_COMP_LIST_END_DELETE - || type == MLOG_COMP_LIST_START_DELETE); + || type == MLOG_LIST_START_DELETE + || type == MLOG_COMP_LIST_END_DELETE + || type == MLOG_COMP_LIST_START_DELETE); log_ptr = mlog_open_and_write_index(mtr, rec, index, type, 2); if (log_ptr) { @@ -672,9 +675,9 @@ page_parse_delete_rec_list( ulint offset; ut_ad(type == MLOG_LIST_END_DELETE - || type == MLOG_LIST_START_DELETE - || type == MLOG_COMP_LIST_END_DELETE - || type == MLOG_COMP_LIST_START_DELETE); + || type == MLOG_LIST_START_DELETE + || type == MLOG_COMP_LIST_END_DELETE + || type == MLOG_COMP_LIST_START_DELETE); /* Read the record offset as a 2-byte ulint */ @@ -694,9 +697,10 @@ page_parse_delete_rec_list( ut_ad(!!page_is_comp(page) == dict_table_is_comp(index->table)); if (type == MLOG_LIST_END_DELETE - || type == MLOG_COMP_LIST_END_DELETE) { + || type == MLOG_COMP_LIST_END_DELETE) { page_delete_rec_list_end(page, page + offset, index, - ULINT_UNDEFINED, ULINT_UNDEFINED, mtr); + ULINT_UNDEFINED, + ULINT_UNDEFINED, mtr); } else { page_delete_rec_list_start(page, page + offset, index, mtr); } @@ -750,8 +754,9 @@ page_delete_rec_list_end( rec = page_rec_get_next(rec); } - page_delete_rec_list_write_log(rec, index, - comp ? MLOG_COMP_LIST_END_DELETE : MLOG_LIST_END_DELETE, mtr); + page_delete_rec_list_write_log(rec, index, comp + ? MLOG_COMP_LIST_END_DELETE + : MLOG_LIST_END_DELETE, mtr); if (rec == sup) { @@ -775,10 +780,10 @@ page_delete_rec_list_end( while (rec2 != sup) { ulint s; offsets = rec_get_offsets(rec2, index, offsets, - ULINT_UNDEFINED, &heap); + ULINT_UNDEFINED, &heap); s = rec_offs_size(offsets); ut_ad(rec2 - page + s - rec_offs_extra_size(offsets) - < UNIV_PAGE_SIZE); + < UNIV_PAGE_SIZE); ut_ad(size + s < UNIV_PAGE_SIZE); size += s; n_recs++; @@ -828,11 +833,11 @@ page_delete_rec_list_end( page_rec_set_next(last_rec, free); page_header_set_ptr(page, PAGE_FREE, rec); - page_header_set_field(page, PAGE_GARBAGE, - size + page_header_get_field(page, PAGE_GARBAGE)); + page_header_set_field(page, PAGE_GARBAGE, size + + page_header_get_field(page, PAGE_GARBAGE)); page_header_set_field(page, PAGE_N_RECS, - (ulint)(page_get_n_recs(page) - n_recs)); + (ulint)(page_get_n_recs(page) - n_recs)); } /***************************************************************** @@ -880,7 +885,7 @@ page_delete_rec_list_start( while (page_cur_get_rec(&cur1) != rec) { offsets = rec_get_offsets(page_cur_get_rec(&cur1), index, - offsets, ULINT_UNDEFINED, &heap); + offsets, ULINT_UNDEFINED, &heap); page_cur_delete_rec(&cur1, index, offsets, mtr); } @@ -922,7 +927,8 @@ page_move_rec_list_end( ut_ad(new_data_size >= old_data_size); page_delete_rec_list_end(page, split_rec, index, - new_n_recs - old_n_recs, new_data_size - old_data_size, mtr); + new_n_recs - old_n_recs, + new_data_size - old_data_size, mtr); } /***************************************************************** @@ -1002,7 +1008,7 @@ page_dir_delete_slots( slot = page_dir_get_nth_slot(page, start + n); page_dir_slot_set_n_owned(slot, - sum_owned + page_dir_slot_get_n_owned(slot)); + sum_owned + page_dir_slot_get_n_owned(slot)); /* 3. Destroy start and other slots by copying slots */ for (i = start + n; i < n_slots; i++) { @@ -1314,7 +1320,8 @@ page_dir_print( "PAGE DIRECTORY\n" "Page address %p\n" "Directory stack top at offs: %lu; number of slots: %lu\n", - page, (ulong)(page_dir_get_nth_slot(page, n - 1) - page), (ulong) n); + page, (ulong)(page_dir_get_nth_slot(page, n - 1) - page), + (ulong) n); for (i = 0; i < n; i++) { slot = page_dir_get_nth_slot(page, i); if ((i == pr_n) && (i < n - pr_n)) { @@ -1322,9 +1329,11 @@ page_dir_print( } if ((i < pr_n) || (i >= n - pr_n)) { fprintf(stderr, - "Contents of slot: %lu: n_owned: %lu, rec offs: %lu\n", - (ulong) i, (ulong) page_dir_slot_get_n_owned(slot), - (ulong)(page_dir_slot_get_rec(slot) - page)); + "Contents of slot: %lu: n_owned: %lu," + " rec offs: %lu\n", + (ulong) i, + (ulong) page_dir_slot_get_n_owned(slot), + (ulong)(page_dir_slot_get_rec(slot) - page)); } } fprintf(stderr, "Total of %lu records\n" @@ -1364,7 +1373,7 @@ page_print_list( count = 0; for (;;) { offsets = rec_get_offsets(cur.rec, index, offsets, - ULINT_UNDEFINED, &heap); + ULINT_UNDEFINED, &heap); page_rec_print(cur.rec, offsets); if (count == pr_n) { @@ -1386,7 +1395,7 @@ page_print_list( if (count + pr_n >= n_recs) { offsets = rec_get_offsets(cur.rec, index, offsets, - ULINT_UNDEFINED, &heap); + ULINT_UNDEFINED, &heap); page_rec_print(cur.rec, offsets); } count++; @@ -1478,15 +1487,15 @@ page_rec_validate( if (!(n_owned <= PAGE_DIR_SLOT_MAX_N_OWNED)) { fprintf(stderr, "InnoDB: Dir slot of rec %lu, n owned too big %lu\n", - (ulong)(rec - page), (ulong) n_owned); + (ulong)(rec - page), (ulong) n_owned); return(FALSE); } if (!(heap_no < page_dir_get_n_heap(page))) { fprintf(stderr, - "InnoDB: Heap no of rec %lu too big %lu %lu\n", - (ulong)(rec - page), (ulong) heap_no, - (ulong) page_dir_get_n_heap(page)); + "InnoDB: Heap no of rec %lu too big %lu %lu\n", + (ulong)(rec - page), (ulong) heap_no, + (ulong) page_dir_get_n_heap(page)); return(FALSE); } @@ -1508,18 +1517,20 @@ page_check_dir( n_slots = page_dir_get_n_slots(page); if (page_dir_slot_get_rec(page_dir_get_nth_slot(page, 0)) - != page_get_infimum_rec(page)) { + != page_get_infimum_rec(page)) { fprintf(stderr, -"InnoDB: Page directory corruption: supremum not pointed to\n"); + "InnoDB: Page directory corruption:" + " infimum not pointed to\n"); buf_page_print(page); } if (page_dir_slot_get_rec(page_dir_get_nth_slot(page, n_slots - 1)) - != page_get_supremum_rec(page)) { + != page_get_supremum_rec(page)) { fprintf(stderr, -"InnoDB: Page directory corruption: supremum not pointed to\n"); + "InnoDB: Page directory corruption:" + " supremum not pointed to\n"); buf_page_print(page); } } @@ -1553,7 +1564,8 @@ page_simple_validate( if (n_slots > UNIV_PAGE_SIZE / 4) { fprintf(stderr, - "InnoDB: Nonsensical number %lu of page dir slots\n", (ulong) n_slots); + "InnoDB: Nonsensical number %lu of page dir slots\n", + (ulong) n_slots); goto func_exit; } @@ -1563,9 +1575,12 @@ page_simple_validate( if (rec_heap_top > page_dir_get_nth_slot(page, n_slots - 1)) { fprintf(stderr, - "InnoDB: Record heap and dir overlap on a page, heap top %lu, dir %lu\n", - (ulong)(page_header_get_ptr(page, PAGE_HEAP_TOP) - page), - (ulong)(page_dir_get_nth_slot(page, n_slots - 1) - page)); + "InnoDB: Record heap and dir overlap on a page," + " heap top %lu, dir %lu\n", + (ulong) + (page_header_get_ptr(page, PAGE_HEAP_TOP) - page), + (ulong) + (page_dir_get_nth_slot(page, n_slots - 1) - page)); goto func_exit; } @@ -1585,8 +1600,10 @@ page_simple_validate( if (rec > rec_heap_top) { fprintf(stderr, - "InnoDB: Record %lu is above rec heap top %lu\n", - (ulong)(rec - page), (ulong)(rec_heap_top - page)); + "InnoDB: Record %lu is above" + " rec heap top %lu\n", + (ulong)(rec - page), + (ulong)(rec_heap_top - page)); goto func_exit; } @@ -1596,17 +1613,19 @@ page_simple_validate( if (rec_get_n_owned(rec, comp) != own_count) { fprintf(stderr, - "InnoDB: Wrong owned count %lu, %lu, rec %lu\n", - (ulong) rec_get_n_owned(rec, comp), - (ulong) own_count, - (ulong)(rec - page)); + "InnoDB: Wrong owned count %lu, %lu," + " rec %lu\n", + (ulong) rec_get_n_owned(rec, comp), + (ulong) own_count, + (ulong)(rec - page)); goto func_exit; } if (page_dir_slot_get_rec(slot) != rec) { fprintf(stderr, - "InnoDB: Dir slot does not point to right rec %lu\n", + "InnoDB: Dir slot does not point" + " to right rec %lu\n", (ulong)(rec - page)); goto func_exit; @@ -1626,11 +1645,12 @@ page_simple_validate( } if (rec_get_next_offs(rec, comp) < FIL_PAGE_DATA - || rec_get_next_offs(rec, comp) >= UNIV_PAGE_SIZE) { + || rec_get_next_offs(rec, comp) >= UNIV_PAGE_SIZE) { fprintf(stderr, - "InnoDB: Next record offset nonsensical %lu for rec %lu\n", - (ulong) rec_get_next_offs(rec, comp), - (ulong)(rec - page)); + "InnoDB: Next record offset" + " nonsensical %lu for rec %lu\n", + (ulong) rec_get_next_offs(rec, comp), + (ulong)(rec - page)); goto func_exit; } @@ -1639,8 +1659,9 @@ page_simple_validate( if (count > UNIV_PAGE_SIZE) { fprintf(stderr, - "InnoDB: Page record list appears to be circular %lu\n", - (ulong) count); + "InnoDB: Page record list appears" + " to be circular %lu\n", + (ulong) count); goto func_exit; } @@ -1662,8 +1683,8 @@ page_simple_validate( if (page_header_get_field(page, PAGE_N_RECS) + 2 != count + 1) { fprintf(stderr, "InnoDB: n recs wrong %lu %lu\n", - (ulong) page_header_get_field(page, PAGE_N_RECS) + 2, - (ulong) (count + 1)); + (ulong) page_header_get_field(page, PAGE_N_RECS) + 2, + (ulong) (count + 1)); goto func_exit; } @@ -1673,18 +1694,21 @@ page_simple_validate( while (rec != NULL) { if (rec < page + FIL_PAGE_DATA - || rec >= page + UNIV_PAGE_SIZE) { + || rec >= page + UNIV_PAGE_SIZE) { fprintf(stderr, - "InnoDB: Free list record has a nonsensical offset %lu\n", - (ulong)(rec - page)); + "InnoDB: Free list record has" + " a nonsensical offset %lu\n", + (ulong) (rec - page)); goto func_exit; } if (rec > rec_heap_top) { fprintf(stderr, - "InnoDB: Free list record %lu is above rec heap top %lu\n", - (ulong)(rec - page), (ulong)(rec_heap_top - page)); + "InnoDB: Free list record %lu" + " is above rec heap top %lu\n", + (ulong) (rec - page), + (ulong) (rec_heap_top - page)); goto func_exit; } @@ -1693,7 +1717,8 @@ page_simple_validate( if (count > UNIV_PAGE_SIZE) { fprintf(stderr, - "InnoDB: Page free list appears to be circular %lu\n", + "InnoDB: Page free list appears" + " to be circular %lu\n", (ulong) count); goto func_exit; } @@ -1704,8 +1729,8 @@ page_simple_validate( if (page_dir_get_n_heap(page) != count + 1) { fprintf(stderr, "InnoDB: N heap is wrong %lu, %lu\n", - (ulong) page_dir_get_n_heap(page), - (ulong) (count + 1)); + (ulong) page_dir_get_n_heap(page), + (ulong) (count + 1)); goto func_exit; } @@ -1766,14 +1791,14 @@ page_validate( n_slots = page_dir_get_n_slots(page); - if (!(page_header_get_ptr(page, PAGE_HEAP_TOP) <= - page_dir_get_nth_slot(page, n_slots - 1))) { + if (!(page_header_get_ptr(page, PAGE_HEAP_TOP) + <= page_dir_get_nth_slot(page, n_slots - 1))) { fputs("InnoDB: Record heap and dir overlap on a page ", - stderr); + stderr); dict_index_name_print(stderr, NULL, index); fprintf(stderr, ", %p, %p\n", - page_header_get_ptr(page, PAGE_HEAP_TOP), + page_header_get_ptr(page, PAGE_HEAP_TOP), page_dir_get_nth_slot(page, n_slots - 1)); goto func_exit; @@ -1792,12 +1817,12 @@ page_validate( for (;;) { rec = cur.rec; offsets = rec_get_offsets(rec, index, offsets, - ULINT_UNDEFINED, &heap); + ULINT_UNDEFINED, &heap); if (comp && page_rec_is_user_rec(rec) - && rec_get_node_ptr_flag(rec) - != (ibool) - (btr_page_get_level_low(page) != 0)) { + && rec_get_node_ptr_flag(rec) + != (ibool) + (btr_page_get_level_low(page) != 0)) { fputs("InnoDB: node_ptr flag mismatch\n", stderr); goto func_exit; } @@ -1809,9 +1834,10 @@ page_validate( /* Check that the records are in the ascending order */ if ((count >= 2) && (!page_cur_is_after_last(&cur))) { if (!(1 == cmp_rec_rec(rec, old_rec, - offsets, old_offsets, index))) { + offsets, old_offsets, index))) { fprintf(stderr, - "InnoDB: Records in wrong order on page %lu", + "InnoDB: Records in wrong order" + " on page %lu ", (ulong) buf_frame_get_page_no(page)); dict_index_name_print(stderr, NULL, index); fputs("\nInnoDB: previous record ", stderr); @@ -1836,7 +1862,7 @@ page_validate( /* No other record may overlap this */ fputs("InnoDB: Record overlaps another\n", - stderr); + stderr); goto func_exit; } @@ -1847,16 +1873,16 @@ page_validate( /* This is a record pointed to by a dir slot */ if (rec_get_n_owned(rec, comp) != own_count) { fprintf(stderr, - "InnoDB: Wrong owned count %lu, %lu\n", - (ulong) rec_get_n_owned(rec, comp), - (ulong) own_count); + "InnoDB: Wrong owned count %lu, %lu\n", + (ulong) rec_get_n_owned(rec, comp), + (ulong) own_count); goto func_exit; } if (page_dir_slot_get_rec(slot) != rec) { - fputs( - "InnoDB: Dir slot does not point to right rec\n", - stderr); + fputs("InnoDB: Dir slot does not" + " point to right rec\n", + stderr); goto func_exit; } @@ -1874,7 +1900,7 @@ page_validate( } if (rec_get_next_offs(rec, comp) < FIL_PAGE_DATA - || rec_get_next_offs(rec, comp) >= UNIV_PAGE_SIZE) { + || rec_get_next_offs(rec, comp) >= UNIV_PAGE_SIZE) { fprintf(stderr, "InnoDB: Next record offset wrong %lu\n", (ulong) rec_get_next_offs(rec, comp)); @@ -1906,14 +1932,14 @@ page_validate( if (page_header_get_field(page, PAGE_N_RECS) + 2 != count + 1) { fprintf(stderr, "InnoDB: n recs wrong %lu %lu\n", - (ulong) page_header_get_field(page, PAGE_N_RECS) + 2, - (ulong) (count + 1)); + (ulong) page_header_get_field(page, PAGE_N_RECS) + 2, + (ulong) (count + 1)); goto func_exit; } if (data_size != page_get_data_size(page)) { fprintf(stderr, - "InnoDB: Summed data size %lu, returned by func %lu\n", + "InnoDB: Summed data size %lu, returned by func %lu\n", (ulong) data_size, (ulong) page_get_data_size(page)); goto func_exit; } @@ -1923,7 +1949,7 @@ page_validate( while (rec != NULL) { offsets = rec_get_offsets(rec, index, offsets, - ULINT_UNDEFINED, &heap); + ULINT_UNDEFINED, &heap); if (!page_rec_validate(rec, offsets)) { goto func_exit; @@ -1935,8 +1961,8 @@ page_validate( for (i = 0; i < rec_offs_size(offsets); i++) { if (buf[offs + i] != 0) { - fputs( - "InnoDB: Record overlaps another in free list\n", stderr); + fputs("InnoDB: Record overlaps another" + " in free list\n", stderr); goto func_exit; } @@ -1959,7 +1985,7 @@ func_exit: mem_heap_free(heap); if (ret == FALSE) { - func_exit2: +func_exit2: fprintf(stderr, "InnoDB: Apparent corruption in page %lu in ", (ulong) buf_frame_get_page_no(page)); dict_index_name_print(stderr, NULL, index); |