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/include | |
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/include')
54 files changed, 479 insertions, 511 deletions
diff --git a/storage/innobase/include/btr0btr.ic b/storage/innobase/include/btr0btr.ic index c24b1603bd2..1f39b52f3c8 100644 --- a/storage/innobase/include/btr0btr.ic +++ b/storage/innobase/include/btr0btr.ic @@ -109,7 +109,7 @@ btr_page_set_level( ut_ad(level <= BTR_MAX_NODE_LEVEL); mlog_write_ulint(page + PAGE_HEADER + PAGE_LEVEL, level, - MLOG_2BYTES, mtr); + MLOG_2BYTES, mtr); } /************************************************************ @@ -124,9 +124,9 @@ btr_page_get_next( { ut_ad(page && mtr); ut_ad(mtr_memo_contains(mtr, buf_block_align(page), - MTR_MEMO_PAGE_X_FIX) - || mtr_memo_contains(mtr, buf_block_align(page), - MTR_MEMO_PAGE_S_FIX)); + MTR_MEMO_PAGE_X_FIX) + || mtr_memo_contains(mtr, buf_block_align(page), + MTR_MEMO_PAGE_S_FIX)); return(mach_read_from_4(page + FIL_PAGE_NEXT)); } @@ -194,7 +194,7 @@ btr_node_ptr_get_child_page_no( /* The child address is in the last field */ field = rec_get_nth_field(rec, offsets, - rec_offs_n_fields(offsets) - 1, &len); + rec_offs_n_fields(offsets) - 1, &len); ut_ad(len == 4); @@ -202,7 +202,8 @@ btr_node_ptr_get_child_page_no( if (UNIV_UNLIKELY(page_no == 0)) { fprintf(stderr, -"InnoDB: a nonsensical page number 0 in a node ptr record at offset %lu\n", + "InnoDB: a nonsensical page number 0" + " in a node ptr record at offset %lu\n", (ulong) ut_align_offset(rec, UNIV_PAGE_SIZE)); buf_page_print(buf_frame_align(rec)); } @@ -221,13 +222,13 @@ btr_leaf_page_release( mtr_t* mtr) /* in: mtr */ { ut_ad(!mtr_memo_contains(mtr, buf_block_align(page), - MTR_MEMO_MODIFY)); + MTR_MEMO_MODIFY)); if (latch_mode == BTR_SEARCH_LEAF) { mtr_memo_release(mtr, buf_block_align(page), - MTR_MEMO_PAGE_S_FIX); + MTR_MEMO_PAGE_S_FIX); } else { ut_ad(latch_mode == BTR_MODIFY_LEAF); mtr_memo_release(mtr, buf_block_align(page), - MTR_MEMO_PAGE_X_FIX); + MTR_MEMO_PAGE_X_FIX); } } diff --git a/storage/innobase/include/btr0cur.h b/storage/innobase/include/btr0cur.h index d5dd4f3010a..1d41a345699 100644 --- a/storage/innobase/include/btr0cur.h +++ b/storage/innobase/include/btr0cur.h @@ -583,9 +583,11 @@ to know struct size! */ struct btr_cur_struct { dict_index_t* index; /* index where positioned */ page_cur_t page_cur; /* page cursor */ - page_t* left_page; /* this field is used to store a pointer - to the left neighbor page, in the cases - BTR_SEARCH_PREV and BTR_MODIFY_PREV */ + page_t* left_page; /* this field is used to store + a pointer to the left neighbor + page, in the cases + BTR_SEARCH_PREV and + BTR_MODIFY_PREV */ /*------------------------------*/ que_thr_t* thr; /* this field is only used when btr_cur_search_... is called for an diff --git a/storage/innobase/include/btr0cur.ic b/storage/innobase/include/btr0cur.ic index 7fbdf6035b0..76a4ff938a2 100644 --- a/storage/innobase/include/btr0cur.ic +++ b/storage/innobase/include/btr0cur.ic @@ -101,8 +101,8 @@ btr_cur_compress_recommendation( page = btr_cur_get_page(cursor); if ((page_get_data_size(page) < BTR_CUR_PAGE_COMPRESS_LIMIT) - || ((btr_page_get_next(page, mtr) == FIL_NULL) - && (btr_page_get_prev(page, mtr) == FIL_NULL))) { + || ((btr_page_get_next(page, mtr) == FIL_NULL) + && (btr_page_get_prev(page, mtr) == FIL_NULL))) { /* The page fillfactor has dropped below a predefined minimum value OR the level in the B-tree contains just @@ -110,7 +110,7 @@ btr_cur_compress_recommendation( root page. */ if (dict_tree_get_page((cursor->index)->tree) - == buf_frame_get_page_no(page)) { + == buf_frame_get_page_no(page)) { /* It is the root page */ @@ -144,9 +144,9 @@ btr_cur_can_delete_without_compress( page = btr_cur_get_page(cursor); if ((page_get_data_size(page) - rec_size < BTR_CUR_PAGE_COMPRESS_LIMIT) - || ((btr_page_get_next(page, mtr) == FIL_NULL) - && (btr_page_get_prev(page, mtr) == FIL_NULL)) - || (page_get_n_recs(page) < 2)) { + || ((btr_page_get_next(page, mtr) == FIL_NULL) + && (btr_page_get_prev(page, mtr) == FIL_NULL)) + || (page_get_n_recs(page) < 2)) { /* The page fillfactor will drop below a predefined minimum value, OR the level in the B-tree contains just @@ -154,7 +154,7 @@ btr_cur_can_delete_without_compress( compression if this is not the root page. */ if (dict_tree_get_page((cursor->index)->tree) - == buf_frame_get_page_no(page)) { + == buf_frame_get_page_no(page)) { /* It is the root page */ diff --git a/storage/innobase/include/btr0pcur.ic b/storage/innobase/include/btr0pcur.ic index a8aa82cf203..66462530716 100644 --- a/storage/innobase/include/btr0pcur.ic +++ b/storage/innobase/include/btr0pcur.ic @@ -20,7 +20,7 @@ btr_pcur_get_rel_pos( ut_ad(cursor->old_rec); ut_ad(cursor->old_stored == BTR_PCUR_OLD_STORED); ut_ad(cursor->pos_state == BTR_PCUR_WAS_POSITIONED - || cursor->pos_state == BTR_PCUR_IS_POSITIONED); + || cursor->pos_state == BTR_PCUR_IS_POSITIONED); return(cursor->rel_pos); } @@ -120,7 +120,7 @@ btr_pcur_get_up_match( btr_cur_t* btr_cursor; ut_ad((cursor->pos_state == BTR_PCUR_WAS_POSITIONED) - || (cursor->pos_state == BTR_PCUR_IS_POSITIONED)); + || (cursor->pos_state == BTR_PCUR_IS_POSITIONED)); btr_cursor = btr_pcur_get_btr_cur(cursor); @@ -143,7 +143,7 @@ btr_pcur_get_low_match( btr_cur_t* btr_cursor; ut_ad((cursor->pos_state == BTR_PCUR_WAS_POSITIONED) - || (cursor->pos_state == BTR_PCUR_IS_POSITIONED)); + || (cursor->pos_state == BTR_PCUR_IS_POSITIONED)); btr_cursor = btr_pcur_get_btr_cur(cursor); ut_ad(btr_cursor->low_match != ULINT_UNDEFINED); @@ -198,7 +198,7 @@ btr_pcur_is_on_user_rec( ut_ad(cursor->latch_mode != BTR_NO_LATCHES); if ((btr_pcur_is_before_first_on_page(cursor, mtr)) - || (btr_pcur_is_after_last_on_page(cursor, mtr))) { + || (btr_pcur_is_after_last_on_page(cursor, mtr))) { return(FALSE); } @@ -491,7 +491,7 @@ btr_pcur_open( btr_cursor = btr_pcur_get_btr_cur(cursor); btr_cur_search_to_nth_level(index, 0, tuple, mode, latch_mode, - btr_cursor, 0, mtr); + btr_cursor, 0, mtr); cursor->pos_state = BTR_PCUR_IS_POSITIONED; cursor->trx_if_known = NULL; @@ -533,7 +533,7 @@ btr_pcur_open_with_no_init( btr_cursor = btr_pcur_get_btr_cur(cursor); btr_cur_search_to_nth_level(index, 0, tuple, mode, latch_mode, - btr_cursor, has_search_latch, mtr); + btr_cursor, has_search_latch, mtr); cursor->pos_state = BTR_PCUR_IS_POSITIONED; cursor->old_stored = BTR_PCUR_OLD_NOT_STORED; @@ -568,7 +568,7 @@ btr_pcur_open_at_index_side( } btr_cur_open_at_index_side(from_left, index, latch_mode, - btr_pcur_get_btr_cur(pcur), mtr); + btr_pcur_get_btr_cur(pcur), mtr); pcur->pos_state = BTR_PCUR_IS_POSITIONED; pcur->old_stored = BTR_PCUR_OLD_NOT_STORED; @@ -595,7 +595,7 @@ btr_pcur_open_at_rnd_pos( btr_pcur_init(cursor); btr_cur_open_at_rnd_pos(index, latch_mode, - btr_pcur_get_btr_cur(cursor), mtr); + btr_pcur_get_btr_cur(cursor), mtr); cursor->pos_state = BTR_PCUR_IS_POSITIONED; cursor->old_stored = BTR_PCUR_OLD_NOT_STORED; diff --git a/storage/innobase/include/buf0buf.h b/storage/innobase/include/buf0buf.h index 12aac878614..110ef36a296 100644 --- a/storage/innobase/include/buf0buf.h +++ b/storage/innobase/include/buf0buf.h @@ -156,8 +156,8 @@ improve debugging. Only values RW_S_LATCH and RW_X_LATCH are allowed as LA! */ NOTE! The following macros should be used instead of buf_page_optimistic_get_func, to improve debugging. Only values RW_S_LATCH and RW_X_LATCH are allowed as LA! */ -#define buf_page_optimistic_get(LA, BL, G, MC, MTR) buf_page_optimistic_get_func(\ - LA, BL, G, MC, __FILE__, __LINE__, MTR) +#define buf_page_optimistic_get(LA, BL, G, MC, MTR) \ + buf_page_optimistic_get_func(LA, BL, G, MC, __FILE__, __LINE__, MTR) /************************************************************************ This is the general function used to get optimistic access to a database page. */ diff --git a/storage/innobase/include/buf0buf.ic b/storage/innobase/include/buf0buf.ic index 3c7a64cbcb0..015de862705 100644 --- a/storage/innobase/include/buf0buf.ic +++ b/storage/innobase/include/buf0buf.ic @@ -28,7 +28,7 @@ buf_block_peek_if_too_old( buf_block_t* block) /* in: block to make younger */ { return(buf_pool->freed_page_clock >= block->freed_page_clock - + 1 + (buf_pool->curr_size / 1024)); + + 1 + (buf_pool->curr_size / 1024)); } /************************************************************************* @@ -82,8 +82,8 @@ buf_pool_is_block( void* ptr) /* in: pointer to memory */ { if ((buf_pool->blocks <= (buf_block_t*)ptr) - && ((buf_block_t*)ptr < buf_pool->blocks - + buf_pool->max_size)) { + && ((buf_block_t*)ptr < buf_pool->blocks + + buf_pool->max_size)) { return(TRUE); } @@ -151,7 +151,7 @@ buf_block_get_frame( ut_ad(block < buf_pool->blocks + buf_pool->max_size); ut_ad(block->state != BUF_BLOCK_NOT_USED); ut_ad((block->state != BUF_BLOCK_FILE_PAGE) - || (block->buf_fix_count > 0)); + || (block->buf_fix_count > 0)); return(block->frame); } @@ -209,16 +209,19 @@ buf_block_align( frame_zero = buf_pool->frame_zero; if (UNIV_UNLIKELY((ulint)ptr < (ulint)frame_zero) - || UNIV_UNLIKELY((ulint)ptr > (ulint)(buf_pool->high_end))) { + || UNIV_UNLIKELY((ulint)ptr > (ulint)(buf_pool->high_end))) { ut_print_timestamp(stderr); fprintf(stderr, -"InnoDB: Error: trying to access a stray pointer %p\n" -"InnoDB: buf pool start is at %p, end at %p\n" -"InnoDB: Probable reason is database corruption or memory\n" -"InnoDB: corruption. If this happens in an InnoDB database recovery, see\n" -"InnoDB: http://dev.mysql.com/doc/refman/5.1/en/forcing-recovery.html\n" -"InnoDB: how to force recovery.\n", + "InnoDB: Error: trying to access a stray pointer %p\n" + "InnoDB: buf pool start is at %p, end at %p\n" + "InnoDB: Probable reason is database corruption" + " or memory\n" + "InnoDB: corruption. If this happens in an" + " InnoDB database recovery, see\n" + "InnoDB: http://dev.mysql.com/doc/refman/5.1/en/" + "forcing-recovery.html\n" + "InnoDB: how to force recovery.\n", ptr, frame_zero, buf_pool->high_end); ut_error; @@ -245,16 +248,19 @@ buf_frame_align( frame = ut_align_down(ptr, UNIV_PAGE_SIZE); if (UNIV_UNLIKELY((ulint)frame < (ulint)(buf_pool->frame_zero)) - || UNIV_UNLIKELY((ulint)frame >= (ulint)(buf_pool->high_end))) { + || UNIV_UNLIKELY((ulint)frame >= (ulint)(buf_pool->high_end))) { ut_print_timestamp(stderr); fprintf(stderr, -"InnoDB: Error: trying to access a stray pointer %p\n" -"InnoDB: buf pool start is at %p, end at %p\n" -"InnoDB: Probable reason is database corruption or memory\n" -"InnoDB: corruption. If this happens in an InnoDB database recovery, see\n" -"InnoDB: http://dev.mysql.com/doc/refman/5.1/en/forcing-recovery.html\n" -"InnoDB: how to force recovery.\n", + "InnoDB: Error: trying to access a stray pointer %p\n" + "InnoDB: buf pool start is at %p, end at %p\n" + "InnoDB: Probable reason is database corruption" + " or memory\n" + "InnoDB: corruption. If this happens in an" + " InnoDB database recovery, see\n" + "InnoDB: http://dev.mysql.com/doc/refman/5.1/en/" + "forcing-recovery.html\n" + "InnoDB: how to force recovery.\n", ptr, buf_pool->frame_zero, buf_pool->high_end); ut_error; @@ -449,7 +455,7 @@ buf_frame_modify_clock_inc( #ifdef UNIV_SYNC_DEBUG ut_ad((mutex_own(&(buf_pool->mutex)) && (block->buf_fix_count == 0)) - || rw_lock_own(&(block->lock), RW_LOCK_EXCLUSIVE)); + || rw_lock_own(&(block->lock), RW_LOCK_EXCLUSIVE)); #endif /*UNIV_SYNC_DEBUG */ UT_DULINT_INC(block->modify_clock); @@ -470,7 +476,7 @@ buf_block_modify_clock_inc( { #ifdef UNIV_SYNC_DEBUG ut_ad((mutex_own(&(buf_pool->mutex)) && (block->buf_fix_count == 0)) - || rw_lock_own(&(block->lock), RW_LOCK_EXCLUSIVE)); + || rw_lock_own(&(block->lock), RW_LOCK_EXCLUSIVE)); #endif /* UNIV_SYNC_DEBUG */ UT_DULINT_INC(block->modify_clock); @@ -490,7 +496,7 @@ buf_block_get_modify_clock( { #ifdef UNIV_SYNC_DEBUG ut_ad(rw_lock_own(&(block->lock), RW_LOCK_SHARED) - || rw_lock_own(&(block->lock), RW_LOCK_EXCLUSIVE)); + || rw_lock_own(&(block->lock), RW_LOCK_EXCLUSIVE)); #endif /* UNIV_SYNC_DEBUG */ return(block->modify_clock); @@ -551,7 +557,7 @@ buf_page_hash_get( fold = buf_page_address_fold(space, offset); HASH_SEARCH(hash, buf_pool->page_hash, fold, block, - (block->space == space) && (block->offset == offset)); + (block->space == space) && (block->offset == offset)); ut_a(block == NULL || block->state == BUF_BLOCK_FILE_PAGE); return(block); @@ -580,9 +586,9 @@ buf_page_get_release_on_io( buf_frame_t* frame; frame = buf_page_get_gen(space, offset, rw_latch, guess, - BUF_GET_IF_IN_POOL, - __FILE__, __LINE__, - mtr); + BUF_GET_IF_IN_POOL, + __FILE__, __LINE__, + mtr); if (frame != NULL) { return(frame); diff --git a/storage/innobase/include/buf0flu.ic b/storage/innobase/include/buf0flu.ic index ea619cd4063..b304673f8be 100644 --- a/storage/innobase/include/buf0flu.ic +++ b/storage/innobase/include/buf0flu.ic @@ -59,7 +59,7 @@ buf_flush_note_modification( buf_flush_insert_into_flush_list(block); } else { ut_ad(ut_dulint_cmp(block->oldest_modification, - mtr->start_lsn) <= 0); + mtr->start_lsn) <= 0); } ++srv_buf_pool_write_requests; @@ -99,7 +99,7 @@ buf_flush_recv_note_modification( buf_flush_insert_sorted_into_flush_list(block); } else { ut_ad(ut_dulint_cmp(block->oldest_modification, - start_lsn) <= 0); + start_lsn) <= 0); } mutex_exit(&(buf_pool->mutex)); diff --git a/storage/innobase/include/buf0rea.h b/storage/innobase/include/buf0rea.h index 380a42f4b80..e4620172860 100644 --- a/storage/innobase/include/buf0rea.h +++ b/storage/innobase/include/buf0rea.h @@ -94,7 +94,8 @@ buf_read_recv_pages( /* The size in pages of the area which the read-ahead algorithms read if invoked */ -#define BUF_READ_AHEAD_AREA ut_min(64, ut_2_power_up(buf_pool->curr_size / 32)) +#define BUF_READ_AHEAD_AREA \ + ut_min(64, ut_2_power_up(buf_pool->curr_size / 32)) /* Modes used in read-ahead */ #define BUF_READ_IBUF_PAGES_ONLY 131 diff --git a/storage/innobase/include/data0data.h b/storage/innobase/include/data0data.h index 8e906fcb2e5..40592c3c0ce 100644 --- a/storage/innobase/include/data0data.h +++ b/storage/innobase/include/data0data.h @@ -320,14 +320,6 @@ void dfield_print_also_hex( /*==================*/ dfield_t* dfield); /* in: dfield */ -/***************************************************************** -Print a dfield value using ut_print_buf. */ - -void -dfield_print_raw( -/*=============*/ - FILE* f, /* in: output stream */ - dfield_t* dfield); /* in: dfield */ /************************************************************** The following function prints the contents of a tuple. */ diff --git a/storage/innobase/include/data0data.ic b/storage/innobase/include/data0data.ic index 6b07ade2934..77fce029851 100644 --- a/storage/innobase/include/data0data.ic +++ b/storage/innobase/include/data0data.ic @@ -52,7 +52,7 @@ dfield_get_data( { ut_ad(field); ut_ad((field->len == UNIV_SQL_NULL) - || (field->data != &data_error)); + || (field->data != &data_error)); return(field->data); } @@ -69,7 +69,7 @@ dfield_get_len( { ut_ad(field); ut_ad((field->len == UNIV_SQL_NULL) - || (field->data != &data_error)); + || (field->data != &data_error)); return(field->len); } @@ -146,9 +146,9 @@ dfield_datas_are_binary_equal( len = field1->len; if ((len != field2->len) - || ((len != UNIV_SQL_NULL) - && (0 != ut_memcmp(field1->data, field2->data, - len)))) { + || ((len != UNIV_SQL_NULL) + && (0 != ut_memcmp(field1->data, field2->data, + len)))) { return(FALSE); } @@ -262,7 +262,7 @@ dtuple_create( ut_ad(heap); tuple = (dtuple_t*) mem_heap_alloc(heap, sizeof(dtuple_t) - + n_fields * sizeof(dfield_t)); + + n_fields * sizeof(dfield_t)); tuple->info_bits = 0; tuple->n_fields = n_fields; tuple->n_fields_cmp = n_fields; @@ -426,7 +426,7 @@ dtuple_contains_null( for (i = 0; i < n; i++) { if (dfield_get_len(dtuple_get_nth_field(tuple, i)) - == UNIV_SQL_NULL) { + == UNIV_SQL_NULL) { return(TRUE); } diff --git a/storage/innobase/include/data0type.ic b/storage/innobase/include/data0type.ic index aabf471a70c..d2027592c09 100644 --- a/storage/innobase/include/data0type.ic +++ b/storage/innobase/include/data0type.ic @@ -59,12 +59,12 @@ dtype_set_mblen( if (dtype_is_string_type(type->mtype)) { #ifndef UNIV_HOTBACKUP innobase_get_cset_width(dtype_get_charset_coll(type->prtype), - &type->mbminlen, &type->mbmaxlen); + &type->mbminlen, &type->mbmaxlen); ut_ad(type->mbminlen <= type->mbmaxlen); #else /* !UNIV_HOTBACKUP */ #ifdef notdefined -printf("ibbackup: DEBUG: type->mtype=%lu, type->prtype=%lu\n", - type->mtype, type->prtype); + printf("ibbackup: DEBUG: type->mtype=%lu, type->prtype=%lu\n", + type->mtype, type->prtype); #endif ut_a(type->mtype <= DATA_BINARY); #ifdef notdefined @@ -208,7 +208,7 @@ dtype_get_pad_char( case DATA_FIXBINARY: case DATA_BINARY: if (UNIV_UNLIKELY(dtype_get_charset_coll(type->prtype) - == DATA_MYSQL_BINARY_CHARSET_COLL)) { + == DATA_MYSQL_BINARY_CHARSET_COLL)) { /* Starting from 5.0.18, do not pad VARBINARY or BINARY columns. */ return(ULINT_UNDEFINED); @@ -257,8 +257,8 @@ dtype_new_store_for_order_and_null_size( } /* In versions < 4.1.2 we had: if (type->prtype & DATA_NONLATIN1) { - buf[0] = buf[0] | 64; - } + buf[0] = buf[0] | 64; + } */ buf[1] = (byte)(type->prtype & 0xFFUL); @@ -296,7 +296,7 @@ dtype_read_for_order_and_null_size( type->len = mach_read_from_2(buf + 2); type->prtype = dtype_form_prtype(type->prtype, - data_mysql_default_charset_coll); + data_mysql_default_charset_coll); dtype_set_mblen(type); } @@ -368,80 +368,81 @@ dtype_get_fixed_size( switch (mtype) { case DATA_SYS: #ifdef UNIV_DEBUG - switch (type->prtype & DATA_MYSQL_TYPE_MASK) { - default: - ut_ad(0); - return(0); - case DATA_ROW_ID: - ut_ad(type->len == DATA_ROW_ID_LEN); - break; - case DATA_TRX_ID: - ut_ad(type->len == DATA_TRX_ID_LEN); - break; - case DATA_ROLL_PTR: - ut_ad(type->len == DATA_ROLL_PTR_LEN); - break; - case DATA_MIX_ID: - ut_ad(type->len == DATA_MIX_ID_LEN); - break; - } + switch (type->prtype & DATA_MYSQL_TYPE_MASK) { + default: + ut_ad(0); + return(0); + case DATA_ROW_ID: + ut_ad(type->len == DATA_ROW_ID_LEN); + break; + case DATA_TRX_ID: + ut_ad(type->len == DATA_TRX_ID_LEN); + break; + case DATA_ROLL_PTR: + ut_ad(type->len == DATA_ROLL_PTR_LEN); + break; + case DATA_MIX_ID: + ut_ad(type->len == DATA_MIX_ID_LEN); + break; + } #endif /* UNIV_DEBUG */ case DATA_CHAR: case DATA_FIXBINARY: case DATA_INT: case DATA_FLOAT: case DATA_DOUBLE: - return(dtype_get_len(type)); + return(dtype_get_len(type)); case DATA_MYSQL: - if (type->prtype & DATA_BINARY_TYPE) { - return(dtype_get_len(type)); - } else { + if (type->prtype & DATA_BINARY_TYPE) { + return(dtype_get_len(type)); + } else { #ifdef UNIV_HOTBACKUP - if (type->mbminlen == type->mbmaxlen) { - return(dtype_get_len(type)); - } + if (type->mbminlen == type->mbmaxlen) { + return(dtype_get_len(type)); + } #else /* UNIV_HOTBACKUP */ - /* We play it safe here and ask MySQL for - mbminlen and mbmaxlen. Although - type->mbminlen and type->mbmaxlen are - initialized if and only if type->prtype - is (in one of the 3 functions in this file), - it could be that none of these functions - has been called. */ - - ulint mbminlen, mbmaxlen; - - innobase_get_cset_width( - dtype_get_charset_coll(type->prtype), - &mbminlen, &mbmaxlen); - - if (UNIV_UNLIKELY(type->mbminlen != mbminlen) - || UNIV_UNLIKELY(type->mbmaxlen != mbmaxlen)) { - - ut_print_timestamp(stderr); - fprintf(stderr, " InnoDB: " - "mbminlen=%lu, " - "mbmaxlen=%lu, " - "type->mbminlen=%lu, " - "type->mbmaxlen=%lu\n", - (ulong) mbminlen, - (ulong) mbmaxlen, - (ulong) type->mbminlen, - (ulong) type->mbmaxlen); - } - if (mbminlen == mbmaxlen) { - return(dtype_get_len(type)); - } -#endif /* !UNIV_HOTBACKUP */ + /* We play it safe here and ask MySQL for + mbminlen and mbmaxlen. Although + type->mbminlen and type->mbmaxlen are + initialized if and only if type->prtype + is (in one of the 3 functions in this file), + it could be that none of these functions + has been called. */ + + ulint mbminlen, mbmaxlen; + + innobase_get_cset_width + (dtype_get_charset_coll(type->prtype), + &mbminlen, &mbmaxlen); + + if (UNIV_UNLIKELY(type->mbminlen != mbminlen) + || UNIV_UNLIKELY(type->mbmaxlen != mbmaxlen)) { + + ut_print_timestamp(stderr); + fprintf(stderr, " InnoDB: " + "mbminlen=%lu, " + "mbmaxlen=%lu, " + "type->mbminlen=%lu, " + "type->mbmaxlen=%lu\n", + (ulong) mbminlen, + (ulong) mbmaxlen, + (ulong) type->mbminlen, + (ulong) type->mbmaxlen); } - /* fall through for variable-length charsets */ + if (mbminlen == mbmaxlen) { + return(dtype_get_len(type)); + } +#endif /* !UNIV_HOTBACKUP */ + } + /* fall through for variable-length charsets */ case DATA_VARCHAR: case DATA_BINARY: case DATA_DECIMAL: case DATA_VARMYSQL: case DATA_BLOB: - return(0); - default: ut_error; + return(0); + default: + ut_error; } return(0); @@ -459,46 +460,46 @@ dtype_get_min_size( switch (type->mtype) { case DATA_SYS: #ifdef UNIV_DEBUG - switch (type->prtype & DATA_MYSQL_TYPE_MASK) { - default: - ut_ad(0); - return(0); - case DATA_ROW_ID: - ut_ad(type->len == DATA_ROW_ID_LEN); - break; - case DATA_TRX_ID: - ut_ad(type->len == DATA_TRX_ID_LEN); - break; - case DATA_ROLL_PTR: - ut_ad(type->len == DATA_ROLL_PTR_LEN); - break; - case DATA_MIX_ID: - ut_ad(type->len == DATA_MIX_ID_LEN); - break; - } + switch (type->prtype & DATA_MYSQL_TYPE_MASK) { + default: + ut_ad(0); + return(0); + case DATA_ROW_ID: + ut_ad(type->len == DATA_ROW_ID_LEN); + break; + case DATA_TRX_ID: + ut_ad(type->len == DATA_TRX_ID_LEN); + break; + case DATA_ROLL_PTR: + ut_ad(type->len == DATA_ROLL_PTR_LEN); + break; + case DATA_MIX_ID: + ut_ad(type->len == DATA_MIX_ID_LEN); + break; + } #endif /* UNIV_DEBUG */ case DATA_CHAR: case DATA_FIXBINARY: case DATA_INT: case DATA_FLOAT: case DATA_DOUBLE: - return(type->len); + return(type->len); case DATA_MYSQL: - if ((type->prtype & DATA_BINARY_TYPE) - || type->mbminlen == type->mbmaxlen) { - return(type->len); - } - /* this is a variable-length character set */ - ut_a(type->mbminlen > 0); - ut_a(type->mbmaxlen > type->mbminlen); - ut_a(type->len % type->mbmaxlen == 0); - return(type->len * type->mbminlen / type->mbmaxlen); + if ((type->prtype & DATA_BINARY_TYPE) + || type->mbminlen == type->mbmaxlen) { + return(type->len); + } + /* this is a variable-length character set */ + ut_a(type->mbminlen > 0); + ut_a(type->mbmaxlen > type->mbminlen); + ut_a(type->len % type->mbmaxlen == 0); + return(type->len * type->mbminlen / type->mbmaxlen); case DATA_VARCHAR: case DATA_BINARY: case DATA_DECIMAL: case DATA_VARMYSQL: case DATA_BLOB: - return(0); + return(0); default: ut_error; } diff --git a/storage/innobase/include/dict0boot.h b/storage/innobase/include/dict0boot.h index 39e3bdf72b0..41ce0ac059a 100644 --- a/storage/innobase/include/dict0boot.h +++ b/storage/innobase/include/dict0boot.h @@ -108,7 +108,8 @@ dict_create(void); #define DICT_HDR_TABLE_IDS 36 /* Root of the table index tree */ #define DICT_HDR_COLUMNS 40 /* Root of the column index tree */ #define DICT_HDR_INDEXES 44 /* Root of the index index tree */ -#define DICT_HDR_FIELDS 48 /* Root of the index field index tree */ +#define DICT_HDR_FIELDS 48 /* Root of the index field + index tree */ #define DICT_HDR_FSEG_HEADER 56 /* Segment header for the tablespace segment into which the dictionary diff --git a/storage/innobase/include/dict0dict.ic b/storage/innobase/include/dict0dict.ic index c65fdde81e9..de00148535f 100644 --- a/storage/innobase/include/dict0dict.ic +++ b/storage/innobase/include/dict0dict.ic @@ -163,7 +163,7 @@ dict_table_get_sys_col( ut_ad(table->magic_n == DICT_TABLE_MAGIC_N); col = dict_table_get_nth_col(table, table->n_cols - - DATA_N_SYS_COLS + sys); + - DATA_N_SYS_COLS + sys); ut_ad(col->type.mtype == DATA_SYS); ut_ad(col->type.prtype == (sys | DATA_NOT_NULL)); @@ -324,8 +324,8 @@ dict_index_get_sys_col_pos( return(col->clust_pos); } - return(dict_index_get_nth_col_pos(index, - dict_table_get_sys_col_no(index->table, type))); + return(dict_index_get_nth_col_pos + (index, dict_table_get_sys_col_no(index->table, type))); } /************************************************************************* @@ -366,8 +366,8 @@ dict_index_get_nth_type( dict_index_t* index, /* in: index */ ulint pos) /* in: position of the field */ { - return(dict_col_get_type(dict_field_get_col( - dict_index_get_nth_field(index, pos)))); + return(dict_col_get_type(dict_field_get_col + (dict_index_get_nth_field(index, pos)))); } /************************************************************************ @@ -380,8 +380,8 @@ dict_index_get_nth_col_no( dict_index_t* index, /* in: index */ ulint pos) /* in: position of the field */ { - return(dict_col_get_no(dict_field_get_col( - dict_index_get_nth_field(index, pos)))); + return(dict_col_get_no(dict_field_get_col + (dict_index_get_nth_field(index, pos)))); } /************************************************************************* @@ -514,7 +514,7 @@ dict_table_check_if_in_cache_low( table_fold = ut_fold_string(table_name); HASH_SEARCH(name_hash, dict_sys->table_hash, table_fold, table, - ut_strcmp(table->name, table_name) == 0); + ut_strcmp(table->name, table_name) == 0); return(table); } @@ -564,7 +564,7 @@ dict_table_get_on_id_low( fold = ut_fold_dulint(table_id); HASH_SEARCH(id_hash, dict_sys->table_id_hash, fold, table, - ut_dulint_cmp(table->id, table_id) == 0); + ut_dulint_cmp(table->id, table_id) == 0); if (table == NULL) { table = dict_load_table_on_id(table_id); } diff --git a/storage/innobase/include/dict0mem.h b/storage/innobase/include/dict0mem.h index 427991180f6..e8682b79387 100644 --- a/storage/innobase/include/dict0mem.h +++ b/storage/innobase/include/dict0mem.h @@ -132,8 +132,6 @@ struct dict_col_struct{ const char* name; /* name */ dtype_t type; /* data type */ dict_table_t* table; /* back pointer to table of this column */ - ulint aux; /* this is used as an auxiliary variable - in some of the functions below */ }; /* DICT_MAX_INDEX_COL_LEN is measured in bytes and is the max index column diff --git a/storage/innobase/include/eval0eval.ic b/storage/innobase/include/eval0eval.ic index 26e9b8e41fe..caffa2e0bfd 100644 --- a/storage/innobase/include/eval0eval.ic +++ b/storage/innobase/include/eval0eval.ic @@ -79,7 +79,7 @@ eval_sym( column */ dfield_copy_data(que_node_get_val(sym_node), - que_node_get_val(sym_node->indirection)); + que_node_get_val(sym_node->indirection)); } } @@ -230,5 +230,5 @@ eval_node_copy_val( dfield2 = que_node_get_val(node2); eval_node_copy_and_alloc_val(node1, dfield_get_data(dfield2), - dfield_get_len(dfield2)); + dfield_get_len(dfield2)); } diff --git a/storage/innobase/include/fut0lst.ic b/storage/innobase/include/fut0lst.ic index 4681a1ce509..6c7e863b078 100644 --- a/storage/innobase/include/fut0lst.ic +++ b/storage/innobase/include/fut0lst.ic @@ -38,11 +38,11 @@ flst_write_addr( { ut_ad(faddr && mtr); ut_ad(mtr_memo_contains(mtr, buf_block_align(faddr), - MTR_MEMO_PAGE_X_FIX)); + MTR_MEMO_PAGE_X_FIX)); mlog_write_ulint(faddr + FIL_ADDR_PAGE, addr.page, MLOG_4BYTES, mtr); mlog_write_ulint(faddr + FIL_ADDR_BYTE, addr.boffset, - MLOG_2BYTES, mtr); + MLOG_2BYTES, mtr); } /************************************************************************ @@ -61,7 +61,7 @@ flst_read_addr( addr.page = mtr_read_ulint(faddr + FIL_ADDR_PAGE, MLOG_4BYTES, mtr); addr.boffset = mtr_read_ulint(faddr + FIL_ADDR_BYTE, MLOG_2BYTES, - mtr); + mtr); return(addr); } @@ -75,7 +75,7 @@ flst_init( mtr_t* mtr) /* in: mini-transaction handle */ { ut_ad(mtr_memo_contains(mtr, buf_block_align(base), - MTR_MEMO_PAGE_X_FIX)); + MTR_MEMO_PAGE_X_FIX)); mlog_write_ulint(base + FLST_LEN, 0, MLOG_4BYTES, mtr); flst_write_addr(base + FLST_FIRST, fil_addr_null, mtr); flst_write_addr(base + FLST_LAST, fil_addr_null, mtr); diff --git a/storage/innobase/include/ibuf0ibuf.ic b/storage/innobase/include/ibuf0ibuf.ic index 7e75fccc160..4c5f6dbf5e1 100644 --- a/storage/innobase/include/ibuf0ibuf.ic +++ b/storage/innobase/include/ibuf0ibuf.ic @@ -80,7 +80,7 @@ ibuf_should_try( decide */ { if (!(index->type & DICT_CLUSTERED) - && (ignore_sec_unique || !(index->type & DICT_UNIQUE))) { + && (ignore_sec_unique || !(index->type & DICT_UNIQUE))) { ibuf_flush_count++; @@ -165,8 +165,8 @@ ibuf_index_page_calc_free( /* out: value for ibuf bitmap bits */ page_t* page) /* in: non-unique secondary index page */ { - return(ibuf_index_page_calc_free_bits( - page_get_max_insert_size_after_reorganize(page, 1))); + return(ibuf_index_page_calc_free_bits + (page_get_max_insert_size_after_reorganize(page, 1))); } /**************************************************************************** @@ -201,7 +201,7 @@ ibuf_update_free_bits_if_full( # error "ULINT32_UNDEFINED <= UNIV_PAGE_SIZE" #endif after = ibuf_index_page_calc_free_bits(max_ins_size - - increase); + - increase); #ifdef UNIV_IBUF_DEBUG ut_a(after <= ibuf_index_page_calc_free(page)); #endif diff --git a/storage/innobase/include/lock0lock.ic b/storage/innobase/include/lock0lock.ic index c7a71bb45d8..feec460bec8 100644 --- a/storage/innobase/include/lock0lock.ic +++ b/storage/innobase/include/lock0lock.ic @@ -47,7 +47,7 @@ lock_rec_hash( ulint page_no)/* in: page number */ { return(hash_calc_hash(lock_rec_fold(space, page_no), - lock_sys->rec_hash)); + lock_sys->rec_hash)); } /************************************************************************* diff --git a/storage/innobase/include/log0log.ic b/storage/innobase/include/log0log.ic index 898a8f3b6e3..06deff196bc 100644 --- a/storage/innobase/include/log0log.ic +++ b/storage/innobase/include/log0log.ic @@ -33,7 +33,7 @@ log_block_get_flush_bit( byte* log_block) /* in: log block */ { if (LOG_BLOCK_FLUSH_BIT_MASK - & mach_read_from_4(log_block + LOG_BLOCK_HDR_NO)) { + & mach_read_from_4(log_block + LOG_BLOCK_HDR_NO)) { return(TRUE); } @@ -74,7 +74,7 @@ log_block_get_hdr_no( byte* log_block) /* in: log block */ { return(~LOG_BLOCK_FLUSH_BIT_MASK - & mach_read_from_4(log_block + LOG_BLOCK_HDR_NO)); + & mach_read_from_4(log_block + LOG_BLOCK_HDR_NO)); } /**************************************************************** @@ -166,7 +166,7 @@ log_block_set_checkpoint_no( dulint no) /* in: checkpoint no */ { mach_write_to_4(log_block + LOG_BLOCK_CHECKPOINT_NO, - ut_dulint_get_low(no)); + ut_dulint_get_low(no)); } /**************************************************************** @@ -227,7 +227,7 @@ log_block_get_checksum( byte* log_block) /* in: log block */ { return(mach_read_from_4(log_block + OS_FILE_LOG_BLOCK_SIZE - - LOG_BLOCK_CHECKSUM)); + - LOG_BLOCK_CHECKSUM)); } /**************************************************************** @@ -240,8 +240,8 @@ log_block_set_checksum( ulint checksum) /* in: checksum */ { mach_write_to_4(log_block + OS_FILE_LOG_BLOCK_SIZE - - LOG_BLOCK_CHECKSUM, - checksum); + - LOG_BLOCK_CHECKSUM, + checksum); } /**************************************************************** @@ -287,7 +287,7 @@ log_block_init_in_old_format( log_block_set_hdr_no(log_block, no); mach_write_to_4(log_block + OS_FILE_LOG_BLOCK_SIZE - - LOG_BLOCK_CHECKSUM, no); + - LOG_BLOCK_CHECKSUM, no); log_block_set_data_len(log_block, LOG_BLOCK_HDR_SIZE); log_block_set_first_rec_group(log_block, 0); } @@ -333,8 +333,8 @@ log_reserve_and_write_fast( ut_memcpy(log->buf + log->buf_free, str, len); log_block_set_data_len(ut_align_down(log->buf + log->buf_free, - OS_FILE_LOG_BLOCK_SIZE), - data_len); + OS_FILE_LOG_BLOCK_SIZE), + data_len); #ifdef UNIV_LOG_DEBUG log->old_buf_free = log->buf_free; log->old_lsn = log->lsn; @@ -349,7 +349,7 @@ log_reserve_and_write_fast( #ifdef UNIV_LOG_DEBUG log_check_log_recs(log->buf + log->old_buf_free, - log->buf_free - log->old_buf_free, log->old_lsn); + log->buf_free - log->old_buf_free, log->old_lsn); #endif return(lsn); } diff --git a/storage/innobase/include/log0recv.h b/storage/innobase/include/log0recv.h index 7bdf8bf6100..091bbe34562 100644 --- a/storage/innobase/include/log0recv.h +++ b/storage/innobase/include/log0recv.h @@ -214,27 +214,6 @@ void recv_recovery_from_archive_finish(void); /*===================================*/ #endif /* UNIV_LOG_ARCHIVE */ -/*********************************************************************** -Checks that a replica of a space is identical to the original space. */ - -void -recv_compare_spaces( -/*================*/ - ulint space1, /* in: space id */ - ulint space2, /* in: space id */ - ulint n_pages);/* in: number of pages */ -/*********************************************************************** -Checks that a replica of a space is identical to the original space. Disables -ibuf operations and flushes and invalidates the buffer pool pages after the -test. This function can be used to check the recovery before dict or trx -systems are initialized. */ - -void -recv_compare_spaces_low( -/*====================*/ - ulint space1, /* in: space id */ - ulint space2, /* in: space id */ - ulint n_pages);/* in: number of pages */ /* Block of log record data */ typedef struct recv_data_struct recv_data_t; @@ -361,11 +340,6 @@ roll-forward */ #define RECV_BEING_PROCESSED 73 #define RECV_PROCESSED 74 -/* The number which is added to a space id to obtain the replicate space -in the debug version: spaces with an odd number as the id are replicate -spaces */ -#define RECV_REPLICA_SPACE_ADD 1 - extern ulint recv_n_pool_free_frames; #ifndef UNIV_NONINL diff --git a/storage/innobase/include/mach0data.ic b/storage/innobase/include/mach0data.ic index 2199565aff4..03ece7529a8 100644 --- a/storage/innobase/include/mach0data.ic +++ b/storage/innobase/include/mach0data.ic @@ -65,7 +65,7 @@ mach_read_from_2( ut_ad(b); return( ((ulint)(b[0]) << 8) + (ulint)(b[1]) - ); + ); } /************************************************************ @@ -131,7 +131,7 @@ mach_read_from_3( return( ((ulint)(b[0]) << 16) + ((ulint)(b[1]) << 8) + (ulint)(b[2]) - ); + ); } /*********************************************************** @@ -146,22 +146,10 @@ mach_write_to_4( { ut_ad(b); -#if (0 == 1) && !defined(__STDC__) && defined(UNIV_INTEL) && (UNIV_WORD_SIZE == 4) && defined(UNIV_VISUALC) - - /* We do not use this even on Intel, because unaligned accesses may - be slow */ - - __asm MOV EAX, n - __asm BSWAP EAX /* Intel is little-endian, must swap bytes */ - __asm MOV n, EAX - - *((ulint*)b) = n; -#else b[0] = (byte)(n >> 24); b[1] = (byte)(n >> 16); b[2] = (byte)(n >> 8); b[3] = (byte)n; -#endif } /************************************************************ @@ -174,28 +162,12 @@ mach_read_from_4( /* out: ulint integer */ byte* b) /* in: pointer to four bytes */ { -#if (0 == 1) && !defined(__STDC__) && defined(UNIV_INTEL) && (UNIV_WORD_SIZE == 4) && defined(UNIV_VISUALC) - /* We do not use this even on Intel, because unaligned accesses may - be slow */ - - ulint res; - - ut_ad(b); - - __asm MOV EDX, b - __asm MOV ECX, DWORD PTR [EDX] - __asm BSWAP ECX /* Intel is little-endian, must swap bytes */ - __asm MOV res, ECX - - return(res); -#else ut_ad(b); return( ((ulint)(b[0]) << 24) + ((ulint)(b[1]) << 16) + ((ulint)(b[2]) << 8) + (ulint)(b[3]) - ); -#endif + ); } /************************************************************* @@ -492,7 +464,7 @@ mach_dulint_get_much_compressed_size( } return(1 + mach_get_compressed_size(ut_dulint_get_high(n)) - + mach_get_compressed_size(ut_dulint_get_low(n))); + + mach_get_compressed_size(ut_dulint_get_low(n))); } /************************************************************* diff --git a/storage/innobase/include/mem0mem.ic b/storage/innobase/include/mem0mem.ic index db0ab7aba8c..069f8de36cb 100644 --- a/storage/innobase/include/mem0mem.ic +++ b/storage/innobase/include/mem0mem.ic @@ -77,7 +77,7 @@ void mem_block_set_type(mem_block_t* block, ulint type) { ut_ad((type == MEM_HEAP_DYNAMIC) || (type == MEM_HEAP_BUFFER) - || (type == MEM_HEAP_BUFFER + MEM_HEAP_BTR_SEARCH)); + || (type == MEM_HEAP_BUFFER + MEM_HEAP_BTR_SEARCH)); block->type = type; } @@ -150,7 +150,7 @@ mem_heap_alloc( block to the heap */ if (mem_block_get_len(block) - < mem_block_get_free(block) + MEM_SPACE_NEEDED(n)) { + < mem_block_get_free(block) + MEM_SPACE_NEEDED(n)) { block = mem_heap_add_block(heap, n); @@ -228,12 +228,12 @@ mem_heap_free_heap_top( /* Validate the heap and get its total allocated size */ mem_heap_validate_or_print(heap, NULL, FALSE, &error, &total_size, - NULL, NULL); + NULL, NULL); ut_a(!error); /* Get the size below top pointer */ mem_heap_validate_or_print(heap, old_top, FALSE, &error, &size, NULL, - NULL); + NULL); ut_a(!error); #endif @@ -242,7 +242,7 @@ mem_heap_free_heap_top( while (block != NULL) { if (((byte*)block + mem_block_get_free(block) >= old_top) - && ((byte*)block <= old_top)) { + && ((byte*)block <= old_top)) { /* Found the right block */ break; @@ -280,8 +280,8 @@ mem_heap_free_heap_top( /* If free == start, we may free the block if it is not the first one */ - if ((heap != block) && (mem_block_get_free(block) == - mem_block_get_start(block))) { + if ((heap != block) && (mem_block_get_free(block) + == mem_block_get_start(block))) { mem_heap_block_free(heap, block); } } @@ -354,7 +354,7 @@ mem_heap_free_top( /* Subtract the free field of block */ mem_block_set_free(block, mem_block_get_free(block) - - MEM_SPACE_NEEDED(n)); + - MEM_SPACE_NEEDED(n)); #ifdef UNIV_MEM_DEBUG ut_ad(mem_block_get_start(block) <= mem_block_get_free(block)); @@ -366,8 +366,8 @@ mem_heap_free_top( /* If free == start, we may free the block if it is not the first one */ - if ((heap != block) && (mem_block_get_free(block) == - mem_block_get_start(block))) { + if ((heap != block) && (mem_block_get_free(block) + == mem_block_get_start(block))) { mem_heap_block_free(heap, block); } } @@ -407,10 +407,11 @@ mem_heap_create_func( if (n > 0) { block = mem_heap_create_block(NULL, n, init_block, type, - file_name, line); + file_name, line); } else { block = mem_heap_create_block(NULL, MEM_BLOCK_START_SIZE, - init_block, type, file_name, line); + init_block, type, + file_name, line); } if (block == NULL) { @@ -496,7 +497,7 @@ mem_alloc_func( void* buf; heap = mem_heap_create_func(n, NULL, MEM_HEAP_DYNAMIC, file_name, - line); + line); /* Note that as we created the first block in the heap big enough for the buffer requested by the caller, the buffer will be in the @@ -506,7 +507,7 @@ mem_alloc_func( buf = mem_heap_alloc(heap, n); ut_a((byte*)heap == (byte*)buf - MEM_BLOCK_HEADER_SIZE - - MEM_FIELD_HEADER_SIZE); + - MEM_FIELD_HEADER_SIZE); return(buf); } @@ -526,7 +527,7 @@ mem_free_func( mem_heap_t* heap; heap = (mem_heap_t*)((byte*)ptr - MEM_BLOCK_HEADER_SIZE - - MEM_FIELD_HEADER_SIZE); + - MEM_FIELD_HEADER_SIZE); mem_heap_free_func(heap, file_name, line); } diff --git a/storage/innobase/include/mtr0log.ic b/storage/innobase/include/mtr0log.ic index 1a5ef033f87..5b1d1ed34d9 100644 --- a/storage/innobase/include/mtr0log.ic +++ b/storage/innobase/include/mtr0log.ic @@ -165,7 +165,7 @@ mlog_write_initial_log_record_fast( ulint offset; ut_ad(mtr_memo_contains(mtr, buf_block_align(ptr), - MTR_MEMO_PAGE_X_FIX)); + MTR_MEMO_PAGE_X_FIX)); ut_ad(type <= MLOG_BIGGEST_TYPE); ut_ad(ptr && log_ptr); @@ -182,9 +182,9 @@ mlog_write_initial_log_record_fast( mtr->n_log_recs++; #ifdef UNIV_LOG_DEBUG -/* fprintf(stderr, - "Adding to mtr log record type %lu space %lu page no %lu\n", - type, space, offset); */ + /* fprintf(stderr, + "Adding to mtr log record type %lu space %lu page no %lu\n", + type, space, offset); */ #endif #ifdef UNIV_DEBUG diff --git a/storage/innobase/include/mtr0mtr.h b/storage/innobase/include/mtr0mtr.h index 3167ea3bc03..9e8250cb545 100644 --- a/storage/innobase/include/mtr0mtr.h +++ b/storage/innobase/include/mtr0mtr.h @@ -70,7 +70,8 @@ flag value must give the length also! */ #define MLOG_PAGE_CREATE ((byte)19) /* create an index page */ #define MLOG_UNDO_INSERT ((byte)20) /* insert entry in an undo log */ -#define MLOG_UNDO_ERASE_END ((byte)21) /* erase an undo log page end */ +#define MLOG_UNDO_ERASE_END ((byte)21) /* erase an undo log + page end */ #define MLOG_UNDO_INIT ((byte)22) /* initialize a page in an undo log */ #define MLOG_UNDO_HDR_DISCARD ((byte)23) /* discard an update undo log diff --git a/storage/innobase/include/os0file.h b/storage/innobase/include/os0file.h index 4ab7fda7358..5ffcdf7e58c 100644 --- a/storage/innobase/include/os0file.h +++ b/storage/innobase/include/os0file.h @@ -723,8 +723,10 @@ This function returns information about the specified file */ ibool os_file_get_status( /*===============*/ - /* out: TRUE if stat information found */ + /* out: TRUE if stat + information found */ const char* path, /* in: pathname of the file */ - os_file_stat_t* stat_info); /* information of a file in a directory */ + os_file_stat_t* stat_info); /* information of a file in a + directory */ #endif diff --git a/storage/innobase/include/page0cur.ic b/storage/innobase/include/page0cur.ic index 243550c055f..b747874abc2 100644 --- a/storage/innobase/include/page0cur.ic +++ b/storage/innobase/include/page0cur.ic @@ -162,11 +162,11 @@ page_cur_search( ut_ad(dtuple_check_typed(tuple)); page_cur_search_with_match(page, index, tuple, mode, - &up_matched_fields, - &up_matched_bytes, - &low_matched_fields, - &low_matched_bytes, - cursor); + &up_matched_fields, + &up_matched_bytes, + &low_matched_fields, + &low_matched_bytes, + cursor); return(low_matched_fields); } @@ -205,6 +205,6 @@ page_cur_rec_insert( mtr_t* mtr) /* in: mini-transaction handle */ { return(page_cur_insert_rec_low(cursor, NULL, index, rec, - offsets, mtr)); + offsets, mtr)); } diff --git a/storage/innobase/include/page0page.ic b/storage/innobase/include/page0page.ic index b33eeaceb1c..9348acd5ffc 100644 --- a/storage/innobase/include/page0page.ic +++ b/storage/innobase/include/page0page.ic @@ -93,8 +93,8 @@ page_header_get_ptr( ut_ad(page); ut_ad((field == PAGE_FREE) - || (field == PAGE_LAST_INSERT) - || (field == PAGE_HEAP_TOP)); + || (field == PAGE_LAST_INSERT) + || (field == PAGE_HEAP_TOP)); offs = page_header_get_field(page, field); @@ -122,8 +122,8 @@ page_header_set_ptr( ut_ad(page); ut_ad((field == PAGE_FREE) - || (field == PAGE_LAST_INSERT) - || (field == PAGE_HEAP_TOP)); + || (field == PAGE_LAST_INSERT) + || (field == PAGE_HEAP_TOP)); if (ptr == NULL) { offs = 0; @@ -149,7 +149,7 @@ page_header_reset_last_insert( ut_ad(page && mtr); mlog_write_ulint(page + PAGE_HEADER + PAGE_LAST_INSERT, 0, - MLOG_2BYTES, mtr); + MLOG_2BYTES, mtr); } /**************************************************************** @@ -163,7 +163,7 @@ page_is_comp( page_t* page) /* in: index page */ { return(UNIV_EXPECT(page_header_get_field(page, PAGE_N_HEAP) & 0x8000, - 0x8000)); + 0x8000)); } /**************************************************************** @@ -245,9 +245,9 @@ page_rec_is_user_rec_low( ut_ad(offset <= UNIV_PAGE_SIZE - PAGE_EMPTY_DIR_START); return(UNIV_LIKELY(offset != PAGE_NEW_SUPREMUM) - && UNIV_LIKELY(offset != PAGE_NEW_INFIMUM) - && UNIV_LIKELY(offset != PAGE_OLD_INFIMUM) - && UNIV_LIKELY(offset != PAGE_OLD_SUPREMUM)); + && UNIV_LIKELY(offset != PAGE_NEW_INFIMUM) + && UNIV_LIKELY(offset != PAGE_OLD_INFIMUM) + && UNIV_LIKELY(offset != PAGE_OLD_SUPREMUM)); } /**************************************************************** @@ -263,7 +263,7 @@ page_rec_is_supremum_low( ut_ad(offset <= UNIV_PAGE_SIZE - PAGE_EMPTY_DIR_START); return(UNIV_UNLIKELY(offset == PAGE_NEW_SUPREMUM) - || UNIV_UNLIKELY(offset == PAGE_OLD_SUPREMUM)); + || UNIV_UNLIKELY(offset == PAGE_OLD_SUPREMUM)); } /**************************************************************** @@ -279,7 +279,7 @@ page_rec_is_infimum_low( ut_ad(offset <= UNIV_PAGE_SIZE - PAGE_EMPTY_DIR_START); return(UNIV_UNLIKELY(offset == PAGE_NEW_INFIMUM) - || UNIV_UNLIKELY(offset == PAGE_OLD_INFIMUM)); + || UNIV_UNLIKELY(offset == PAGE_OLD_INFIMUM)); } /**************************************************************** @@ -291,8 +291,7 @@ page_rec_is_user_rec( /* out: TRUE if a user record */ const rec_t* rec) /* in: record */ { - return(page_rec_is_user_rec_low( - ut_align_offset(rec, UNIV_PAGE_SIZE))); + return(page_rec_is_user_rec_low(ut_align_offset(rec, UNIV_PAGE_SIZE))); } /**************************************************************** @@ -304,8 +303,7 @@ page_rec_is_supremum( /* out: TRUE if the supremum record */ const rec_t* rec) /* in: record */ { - return(page_rec_is_supremum_low( - ut_align_offset(rec, UNIV_PAGE_SIZE))); + return(page_rec_is_supremum_low(ut_align_offset(rec, UNIV_PAGE_SIZE))); } /**************************************************************** @@ -317,8 +315,7 @@ page_rec_is_infimum( /* out: TRUE if the infimum record */ const rec_t* rec) /* in: record */ { - return(page_rec_is_infimum_low( - ut_align_offset(rec, UNIV_PAGE_SIZE))); + return(page_rec_is_infimum_low(ut_align_offset(rec, UNIV_PAGE_SIZE))); } /***************************************************************** @@ -357,17 +354,17 @@ page_cmp_dtuple_rec_with_match( rec_offset = ut_align_offset(rec, UNIV_PAGE_SIZE); if (UNIV_UNLIKELY(rec_offset == PAGE_NEW_INFIMUM) - || UNIV_UNLIKELY(rec_offset == PAGE_OLD_INFIMUM)) { + || UNIV_UNLIKELY(rec_offset == PAGE_OLD_INFIMUM)) { return(1); } if (UNIV_UNLIKELY(rec_offset == PAGE_NEW_SUPREMUM) - || UNIV_UNLIKELY(rec_offset == PAGE_OLD_SUPREMUM)) { + || UNIV_UNLIKELY(rec_offset == PAGE_OLD_SUPREMUM)) { return(-1); } return(cmp_dtuple_rec_with_match(dtuple, rec, offsets, - matched_fields, - matched_bytes)); + matched_fields, + matched_bytes)); } /***************************************************************** @@ -430,8 +427,9 @@ page_dir_set_n_heap( { ut_ad(n_heap < 0x8000); - page_header_set_field(page, PAGE_N_HEAP, n_heap | (0x8000 & - page_header_get_field(page, PAGE_N_HEAP))); + page_header_set_field(page, PAGE_N_HEAP, n_heap + | (0x8000 + & page_header_get_field(page, PAGE_N_HEAP))); } /***************************************************************** @@ -447,7 +445,7 @@ page_dir_get_nth_slot( ut_ad(page_dir_get_n_slots(page) > n); return(page + UNIV_PAGE_SIZE - PAGE_DIR - - (n + 1) * PAGE_DIR_SLOT_SIZE); + - (n + 1) * PAGE_DIR_SLOT_SIZE); } /****************************************************************** @@ -535,7 +533,7 @@ page_dir_calc_reserved_space( ulint n_recs) /* in: number of records */ { return((PAGE_DIR_SLOT_SIZE * n_recs + PAGE_DIR_SLOT_MIN_N_OWNED - 1) - / PAGE_DIR_SLOT_MIN_N_OWNED); + / PAGE_DIR_SLOT_MIN_N_OWNED); } /**************************************************************** @@ -558,13 +556,14 @@ page_rec_get_next( if (UNIV_UNLIKELY(offs >= UNIV_PAGE_SIZE)) { fprintf(stderr, -"InnoDB: Next record offset is nonsensical %lu in record at offset %lu\n" -"InnoDB: rec address %p, first buffer frame %p\n" -"InnoDB: buffer pool high end %p, buf fix count %lu\n", - (ulong)offs, (ulong)(rec - page), - rec, buf_pool->frame_zero, - buf_pool->high_end, - (ulong)buf_block_align(rec)->buf_fix_count); + "InnoDB: Next record offset is nonsensical %lu" + " in record at offset %lu\n" + "InnoDB: rec address %p, first buffer frame %p\n" + "InnoDB: buffer pool high end %p, buf fix count %lu\n", + (ulong)offs, (ulong)(rec - page), + (void*) rec, (void*) buf_pool->frame_zero, + (void*) buf_pool->high_end, + (ulong) buf_block_align(rec)->buf_fix_count); buf_page_print(page); ut_error; @@ -683,10 +682,10 @@ page_get_data_size( ulint ret; ret = (ulint)(page_header_get_field(page, PAGE_HEAP_TOP) - - (page_is_comp(page) - ? PAGE_NEW_SUPREMUM_END - : PAGE_OLD_SUPREMUM_END) - - page_header_get_field(page, PAGE_GARBAGE)); + - (page_is_comp(page) + ? PAGE_NEW_SUPREMUM_END + : PAGE_OLD_SUPREMUM_END) + - page_header_get_field(page, PAGE_GARBAGE)); ut_ad(ret < UNIV_PAGE_SIZE); @@ -704,15 +703,15 @@ page_get_free_space_of_empty( { if (UNIV_LIKELY(comp)) { return((ulint)(UNIV_PAGE_SIZE - - PAGE_NEW_SUPREMUM_END - - PAGE_DIR - - 2 * PAGE_DIR_SLOT_SIZE)); + - PAGE_NEW_SUPREMUM_END + - PAGE_DIR + - 2 * PAGE_DIR_SLOT_SIZE)); } return((ulint)(UNIV_PAGE_SIZE - - PAGE_OLD_SUPREMUM_END - - PAGE_DIR - - 2 * PAGE_DIR_SLOT_SIZE)); + - PAGE_OLD_SUPREMUM_END + - PAGE_DIR + - 2 * PAGE_DIR_SLOT_SIZE)); } /**************************************************************** @@ -735,14 +734,16 @@ page_get_max_insert_size( if (page_is_comp(page)) { occupied = page_header_get_field(page, PAGE_HEAP_TOP) - - PAGE_NEW_SUPREMUM_END + page_dir_calc_reserved_space( - n_recs + page_dir_get_n_heap(page) - 2); + - PAGE_NEW_SUPREMUM_END + + page_dir_calc_reserved_space + (n_recs + page_dir_get_n_heap(page) - 2); free_space = page_get_free_space_of_empty(TRUE); } else { occupied = page_header_get_field(page, PAGE_HEAP_TOP) - - PAGE_OLD_SUPREMUM_END + page_dir_calc_reserved_space( - n_recs + page_dir_get_n_heap(page) - 2); + - PAGE_OLD_SUPREMUM_END + + page_dir_calc_reserved_space + (n_recs + page_dir_get_n_heap(page) - 2); free_space = page_get_free_space_of_empty(FALSE); } @@ -819,7 +820,7 @@ page_mem_free( garbage = page_header_get_field(page, PAGE_GARBAGE); page_header_set_field(page, PAGE_GARBAGE, - garbage + rec_offs_size(offsets)); + garbage + rec_offs_size(offsets)); } #ifdef UNIV_MATERIALIZE diff --git a/storage/innobase/include/que0que.ic b/storage/innobase/include/que0que.ic index 70be4068147..a20108a7820 100644 --- a/storage/innobase/include/que0que.ic +++ b/storage/innobase/include/que0que.ic @@ -230,9 +230,9 @@ que_thr_peek_stop( trx = graph->trx; if (graph->state != QUE_FORK_ACTIVE - || trx->que_state == TRX_QUE_LOCK_WAIT - || (UT_LIST_GET_LEN(trx->signals) > 0 - && trx->que_state == TRX_QUE_RUNNING)) { + || trx->que_state == TRX_QUE_LOCK_WAIT + || (UT_LIST_GET_LEN(trx->signals) > 0 + && trx->que_state == TRX_QUE_RUNNING)) { return(TRUE); } @@ -250,7 +250,7 @@ que_graph_is_select( que_t* graph) /* in: graph */ { if (graph->fork_type == QUE_FORK_SELECT_SCROLL - || graph->fork_type == QUE_FORK_SELECT_NON_SCROLL) { + || graph->fork_type == QUE_FORK_SELECT_NON_SCROLL) { return(TRUE); } diff --git a/storage/innobase/include/read0read.ic b/storage/innobase/include/read0read.ic index 276e01b9f4a..9785cf1b3ce 100644 --- a/storage/innobase/include/read0read.ic +++ b/storage/innobase/include/read0read.ic @@ -69,8 +69,9 @@ read_view_sees_trx_id( for (i = 0; i < n_ids; i++) { - cmp = ut_dulint_cmp(trx_id, - read_view_get_nth_trx_id(view, n_ids - i - 1)); + cmp = ut_dulint_cmp + (trx_id, + read_view_get_nth_trx_id(view, n_ids - i - 1)); if (cmp <= 0) { return(cmp < 0); } diff --git a/storage/innobase/include/rem0cmp.ic b/storage/innobase/include/rem0cmp.ic index 954634737bc..5653ec1ac44 100644 --- a/storage/innobase/include/rem0cmp.ic +++ b/storage/innobase/include/rem0cmp.ic @@ -40,9 +40,10 @@ cmp_dfield_dfield( { ut_ad(dfield_check_typed(dfield1)); - return(cmp_data_data(dfield_get_type(dfield1), - dfield_get_data(dfield1), dfield_get_len(dfield1), - dfield_get_data(dfield2), dfield_get_len(dfield2))); + return(cmp_data_data + (dfield_get_type(dfield1), + dfield_get_data(dfield1), dfield_get_len(dfield1), + dfield_get_data(dfield2), dfield_get_len(dfield2))); } /***************************************************************** @@ -65,5 +66,5 @@ cmp_rec_rec( ulint match_b = 0; return(cmp_rec_rec_with_match(rec1, rec2, offsets1, offsets2, index, - &match_f, &match_b)); + &match_f, &match_b)); } diff --git a/storage/innobase/include/rem0rec.ic b/storage/innobase/include/rem0rec.ic index e716241f26c..5e4c0ea0664 100644 --- a/storage/innobase/include/rem0rec.ic +++ b/storage/innobase/include/rem0rec.ic @@ -289,10 +289,10 @@ rec_get_next_offs( (int16_t) field_value + ut_align_offset(...) < UNIV_PAGE_SIZE */ ut_ad((field_value >= 32768 - ? field_value - 65536 - : field_value) - + ut_align_offset(rec, UNIV_PAGE_SIZE) - < UNIV_PAGE_SIZE); + ? field_value - 65536 + : field_value) + + ut_align_offset(rec, UNIV_PAGE_SIZE) + < UNIV_PAGE_SIZE); #endif if (field_value == 0) { @@ -336,7 +336,8 @@ rec_set_next_offs( as a non-negative number */ field_value = (ulint)((lint)next - - (lint)ut_align_offset(rec, UNIV_PAGE_SIZE)); + - (lint)ut_align_offset + (rec, UNIV_PAGE_SIZE)); field_value &= REC_NEXT_MASK; } else { field_value = 0; @@ -363,7 +364,8 @@ rec_get_n_fields_old( ut_ad(rec); ret = rec_get_bit_field_2(rec, REC_OLD_N_FIELDS, - REC_OLD_N_FIELDS_MASK, REC_OLD_N_FIELDS_SHIFT); + REC_OLD_N_FIELDS_MASK, + REC_OLD_N_FIELDS_SHIFT); ut_ad(ret <= REC_MAX_N_FIELDS); ut_ad(ret > 0); @@ -385,7 +387,7 @@ rec_set_n_fields_old( ut_ad(n_fields > 0); rec_set_bit_field_2(rec, n_fields, REC_OLD_N_FIELDS, - REC_OLD_N_FIELDS_MASK, REC_OLD_N_FIELDS_SHIFT); + REC_OLD_N_FIELDS_MASK, REC_OLD_N_FIELDS_SHIFT); } /********************************************************** @@ -402,7 +404,7 @@ rec_get_status( ut_ad(rec); ret = rec_get_bit_field_1(rec, REC_NEW_STATUS, - REC_NEW_STATUS_MASK, REC_NEW_STATUS_SHIFT); + REC_NEW_STATUS_MASK, REC_NEW_STATUS_SHIFT); ut_ad((ret & ~REC_NEW_STATUS_MASK) == 0); return(ret); @@ -456,8 +458,8 @@ rec_get_n_owned( ut_ad(rec); ret = rec_get_bit_field_1(rec, - comp ? REC_NEW_N_OWNED : REC_OLD_N_OWNED, - REC_N_OWNED_MASK, REC_N_OWNED_SHIFT); + comp ? REC_NEW_N_OWNED : REC_OLD_N_OWNED, + REC_N_OWNED_MASK, REC_N_OWNED_SHIFT); ut_ad(ret <= REC_MAX_N_OWNED); return(ret); @@ -477,8 +479,8 @@ rec_set_n_owned( ut_ad(n_owned <= REC_MAX_N_OWNED); rec_set_bit_field_1(rec, n_owned, - comp ? REC_NEW_N_OWNED : REC_OLD_N_OWNED, - REC_N_OWNED_MASK, REC_N_OWNED_SHIFT); + comp ? REC_NEW_N_OWNED : REC_OLD_N_OWNED, + REC_N_OWNED_MASK, REC_N_OWNED_SHIFT); } /********************************************************** @@ -496,8 +498,8 @@ rec_get_info_bits( ut_ad(rec); ret = rec_get_bit_field_1(rec, - comp ? REC_NEW_INFO_BITS : REC_OLD_INFO_BITS, - REC_INFO_BITS_MASK, REC_INFO_BITS_SHIFT); + comp ? REC_NEW_INFO_BITS : REC_OLD_INFO_BITS, + REC_INFO_BITS_MASK, REC_INFO_BITS_SHIFT); ut_ad((ret & ~REC_INFO_BITS_MASK) == 0); return(ret); @@ -517,8 +519,8 @@ rec_set_info_bits( ut_ad((bits & ~REC_INFO_BITS_MASK) == 0); rec_set_bit_field_1(rec, bits, - comp ? REC_NEW_INFO_BITS : REC_OLD_INFO_BITS, - REC_INFO_BITS_MASK, REC_INFO_BITS_SHIFT); + comp ? REC_NEW_INFO_BITS : REC_OLD_INFO_BITS, + REC_INFO_BITS_MASK, REC_INFO_BITS_SHIFT); } /********************************************************** @@ -534,7 +536,7 @@ rec_set_status( ut_ad((bits & ~REC_NEW_STATUS_MASK) == 0); rec_set_bit_field_1(rec, bits, REC_NEW_STATUS, - REC_NEW_STATUS_MASK, REC_NEW_STATUS_SHIFT); + REC_NEW_STATUS_MASK, REC_NEW_STATUS_SHIFT); } /********************************************************** @@ -595,13 +597,15 @@ rec_get_deleted_flag( ulint comp) /* in: nonzero=compact page format */ { if (UNIV_EXPECT(comp, REC_OFFS_COMPACT)) { - return(UNIV_UNLIKELY(rec_get_bit_field_1(rec, - REC_NEW_INFO_BITS, REC_INFO_DELETED_FLAG, - REC_INFO_BITS_SHIFT))); + return(UNIV_UNLIKELY + (rec_get_bit_field_1(rec, REC_NEW_INFO_BITS, + REC_INFO_DELETED_FLAG, + REC_INFO_BITS_SHIFT))); } else { - return(UNIV_UNLIKELY(rec_get_bit_field_1(rec, - REC_OLD_INFO_BITS, REC_INFO_DELETED_FLAG, - REC_INFO_BITS_SHIFT))); + return(UNIV_UNLIKELY + (rec_get_bit_field_1(rec, REC_OLD_INFO_BITS, + REC_INFO_DELETED_FLAG, + REC_INFO_BITS_SHIFT))); } } @@ -656,8 +660,8 @@ rec_get_heap_no( ut_ad(rec); ret = rec_get_bit_field_2(rec, - comp ? REC_NEW_HEAP_NO : REC_OLD_HEAP_NO, - REC_HEAP_NO_MASK, REC_HEAP_NO_SHIFT); + comp ? REC_NEW_HEAP_NO : REC_OLD_HEAP_NO, + REC_HEAP_NO_MASK, REC_HEAP_NO_SHIFT); ut_ad(ret <= REC_MAX_HEAP_NO); return(ret); @@ -676,8 +680,8 @@ rec_set_heap_no( ut_ad(heap_no <= REC_MAX_HEAP_NO); rec_set_bit_field_2(rec, heap_no, - comp ? REC_NEW_HEAP_NO : REC_OLD_HEAP_NO, - REC_HEAP_NO_MASK, REC_HEAP_NO_SHIFT); + comp ? REC_NEW_HEAP_NO : REC_OLD_HEAP_NO, + REC_HEAP_NO_MASK, REC_HEAP_NO_SHIFT); } /********************************************************** @@ -695,7 +699,7 @@ rec_get_1byte_offs_flag( #endif return(rec_get_bit_field_1(rec, REC_OLD_SHORT, REC_OLD_SHORT_MASK, - REC_OLD_SHORT_SHIFT)); + REC_OLD_SHORT_SHIFT)); } /********************************************************** @@ -713,7 +717,7 @@ rec_set_1byte_offs_flag( ut_ad(flag <= TRUE); rec_set_bit_field_1(rec, flag, REC_OLD_SHORT, REC_OLD_SHORT_MASK, - REC_OLD_SHORT_SHIFT); + REC_OLD_SHORT_SHIFT); } /********************************************************** @@ -814,7 +818,7 @@ rec_offs_n_fields( ut_ad(n_fields > 0); ut_ad(n_fields <= REC_MAX_N_FIELDS); ut_ad(n_fields + REC_OFFS_HEADER_SIZE - <= rec_offs_get_n_alloc(offsets)); + <= rec_offs_get_n_alloc(offsets)); return(n_fields); } @@ -842,16 +846,16 @@ rec_offs_validate( if (index) { ulint max_n_fields; ut_ad((ulint) index == offsets[3]); - max_n_fields = ut_max( - dict_index_get_n_fields(index), - dict_index_get_n_unique_in_tree(index) + 1); + max_n_fields = ut_max + (dict_index_get_n_fields(index), + dict_index_get_n_unique_in_tree(index) + 1); if (comp && rec) { switch (rec_get_status(rec)) { case REC_STATUS_ORDINARY: break; case REC_STATUS_NODE_PTR: - max_n_fields = - dict_index_get_n_unique_in_tree(index) + 1; + max_n_fields = dict_index_get_n_unique_in_tree + (index) + 1; break; case REC_STATUS_INFIMUM: case REC_STATUS_SUPREMUM: @@ -960,7 +964,7 @@ rec_offs_nth_extern( ut_ad(rec_offs_validate(NULL, NULL, offsets)); ut_ad(n < rec_offs_n_fields(offsets)); return(UNIV_UNLIKELY(rec_offs_base(offsets)[1 + n] - & REC_OFFS_EXTERNAL)); + & REC_OFFS_EXTERNAL)); } /********************************************************** @@ -976,7 +980,7 @@ rec_offs_nth_sql_null( ut_ad(rec_offs_validate(NULL, NULL, offsets)); ut_ad(n < rec_offs_n_fields(offsets)); return(UNIV_UNLIKELY(rec_offs_base(offsets)[1 + n] - & REC_OFFS_SQL_NULL)); + & REC_OFFS_SQL_NULL)); } /********************************************************** @@ -992,7 +996,7 @@ rec_offs_nth_size( ut_ad(rec_offs_validate(NULL, NULL, offsets)); ut_ad(n < rec_offs_n_fields(offsets)); return((rec_offs_base(offsets)[1 + n] - rec_offs_base(offsets)[n]) - & REC_OFFS_MASK); + & REC_OFFS_MASK); } /********************************************************** @@ -1129,7 +1133,7 @@ rec_1_get_field_start_offs( } return(rec_1_get_prev_field_end_info(rec, n) - & ~REC_1BYTE_SQL_NULL_MASK); + & ~REC_1BYTE_SQL_NULL_MASK); } /********************************************************** @@ -1152,7 +1156,7 @@ rec_2_get_field_start_offs( } return(rec_2_get_prev_field_end_info(rec, n) - & ~(REC_2BYTE_SQL_NULL_MASK | REC_2BYTE_EXTERN_MASK)); + & ~(REC_2BYTE_SQL_NULL_MASK | REC_2BYTE_EXTERN_MASK)); } /********************************************************** @@ -1282,7 +1286,7 @@ rec_offs_set_n_fields( ut_ad(n_fields > 0); ut_ad(n_fields <= REC_MAX_N_FIELDS); ut_ad(n_fields + REC_OFFS_HEADER_SIZE - <= rec_offs_get_n_alloc(offsets)); + <= rec_offs_get_n_alloc(offsets)); offsets[1] = n_fields; } @@ -1302,7 +1306,7 @@ rec_offs_data_size( ut_ad(rec_offs_validate(NULL, NULL, offsets)); size = rec_offs_base(offsets)[rec_offs_n_fields(offsets)] - & REC_OFFS_MASK; + & REC_OFFS_MASK; ut_ad(size < UNIV_PAGE_SIZE); return(size); } @@ -1437,11 +1441,11 @@ rec_get_converted_size( ut_ad(dtuple_check_typed(dtuple)); ut_ad(index->type & DICT_UNIVERSAL - || dtuple_get_n_fields(dtuple) == - (((dtuple_get_info_bits(dtuple) & REC_NEW_STATUS_MASK) - == REC_STATUS_NODE_PTR) - ? dict_index_get_n_unique_in_tree(index) + 1 - : dict_index_get_n_fields(index))); + || dtuple_get_n_fields(dtuple) + == (((dtuple_get_info_bits(dtuple) & REC_NEW_STATUS_MASK) + == REC_STATUS_NODE_PTR) + ? dict_index_get_n_unique_in_tree(index) + 1 + : dict_index_get_n_fields(index))); if (dict_table_is_comp(index->table)) { return(rec_get_converted_size_new(index, dtuple)); @@ -1449,8 +1453,8 @@ rec_get_converted_size( data_size = dtuple_get_data_size(dtuple); - extra_size = rec_get_converted_extra_size( - data_size, dtuple_get_n_fields(dtuple)); + extra_size = rec_get_converted_extra_size + (data_size, dtuple_get_n_fields(dtuple)); return(data_size + extra_size); } diff --git a/storage/innobase/include/row0mysql.h b/storage/innobase/include/row0mysql.h index 48fb7432b54..be285037767 100644 --- a/storage/innobase/include/row0mysql.h +++ b/storage/innobase/include/row0mysql.h @@ -602,9 +602,10 @@ struct row_prebuilt_struct { selects */ dtuple_t* search_tuple; /* prebuilt dtuple used in selects */ byte row_id[DATA_ROW_ID_LEN]; - /* if the clustered index was generated, - the row id of the last row fetched is - stored here */ + /* if the clustered index was + generated, the row id of the + last row fetched is stored + here */ dtuple_t* clust_ref; /* prebuilt dtuple used in sel/upd/del */ ulint select_lock_type;/* LOCK_NONE, LOCK_S, or LOCK_X */ diff --git a/storage/innobase/include/row0purge.h b/storage/innobase/include/row0purge.h index 2653f8a354d..174dd239eb5 100644 --- a/storage/innobase/include/row0purge.h +++ b/storage/innobase/include/row0purge.h @@ -58,7 +58,8 @@ struct purge_node_struct{ it */ dict_table_t* table; /* table where purge is done */ ulint cmpl_info;/* compiler analysis info of an update */ - upd_t* update; /* update vector for a clustered index record */ + upd_t* update; /* update vector for a clustered index + record */ dtuple_t* ref; /* NULL, or row reference to the next row to handle */ dtuple_t* row; /* NULL, or a copy (also fields copied to diff --git a/storage/innobase/include/row0row.h b/storage/innobase/include/row0row.h index 22ad4cb4d6d..bea7627cd86 100644 --- a/storage/innobase/include/row0row.h +++ b/storage/innobase/include/row0row.h @@ -80,10 +80,9 @@ dtuple_t* row_build( /*======*/ /* out, own: row built; see the NOTE below! */ - ulint type, /* in: ROW_COPY_POINTERS, ROW_COPY_DATA, or - ROW_COPY_ALSO_EXTERNALS, - the two last copy also the data fields to - heap as the first only places pointers to + ulint type, /* in: ROW_COPY_POINTERS or ROW_COPY_DATA; + the latter copies also the data fields to + heap while the first only places pointers to data fields on the index page, and thus is more efficient */ dict_index_t* index, /* in: clustered index */ @@ -235,7 +234,6 @@ row_search_index_entry( #define ROW_COPY_DATA 1 #define ROW_COPY_POINTERS 2 -#define ROW_COPY_ALSO_EXTERNALS 3 /* The allowed latching order of index records is the following: (1) a secondary index record -> diff --git a/storage/innobase/include/row0row.ic b/storage/innobase/include/row0row.ic index 7cf09d25eed..de417f3d971 100644 --- a/storage/innobase/include/row0row.ic +++ b/storage/innobase/include/row0row.ic @@ -58,7 +58,7 @@ row_get_rec_trx_id( return(trx_read_trx_id(rec + offset)); } else { return(row_get_rec_sys_field(DATA_TRX_ID, - rec, index, offsets)); + rec, index, offsets)); } } @@ -84,7 +84,7 @@ row_get_rec_roll_ptr( return(trx_read_roll_ptr(rec + offset + DATA_TRX_ID_LEN)); } else { return(row_get_rec_sys_field(DATA_ROLL_PTR, - rec, index, offsets)); + rec, index, offsets)); } } @@ -110,7 +110,7 @@ row_set_rec_trx_id( trx_write_trx_id(rec + offset, trx_id); } else { row_set_rec_sys_field(DATA_TRX_ID, - rec, index, offsets, trx_id); + rec, index, offsets, trx_id); } } @@ -136,7 +136,7 @@ row_set_rec_roll_ptr( trx_write_roll_ptr(rec + offset + DATA_TRX_ID_LEN, roll_ptr); } else { row_set_rec_sys_field(DATA_ROLL_PTR, - rec, index, offsets, roll_ptr); + rec, index, offsets, roll_ptr); } } @@ -175,7 +175,7 @@ row_build_row_ref_fast( if (field_no != ULINT_UNDEFINED) { field = rec_get_nth_field(rec, offsets, - field_no, &len); + field_no, &len); dfield_set_data(dfield, field, len); } } diff --git a/storage/innobase/include/row0sel.h b/storage/innobase/include/row0sel.h index 70b08d82994..96273a18cd5 100644 --- a/storage/innobase/include/row0sel.h +++ b/storage/innobase/include/row0sel.h @@ -298,15 +298,17 @@ struct sel_node_struct{ /* TRUE if the aggregate row has already been fetched for the current cursor */ - ibool can_get_updated;/* this is TRUE if the select is in a - single-table explicit cursor which can - get updated within the stored procedure, - or in a searched update or delete; - NOTE that to determine of an explicit - cursor if it can get updated, the - parser checks from a stored procedure - if it contains positioned update or - delete statements */ + ibool can_get_updated;/* this is TRUE if the select + is in a single-table explicit + cursor which can get updated + within the stored procedure, + or in a searched update or + delete; NOTE that to determine + of an explicit cursor if it + can get updated, the parser + checks from a stored procedure + if it contains positioned + update or delete statements */ sym_node_t* explicit_cursor;/* not NULL if an explicit cursor */ UT_LIST_BASE_NODE_T(sym_node_t) copy_variables; /* variables whose values we have to diff --git a/storage/innobase/include/row0sel.ic b/storage/innobase/include/row0sel.ic index d58daf79969..1f92b99271e 100644 --- a/storage/innobase/include/row0sel.ic +++ b/storage/innobase/include/row0sel.ic @@ -60,11 +60,11 @@ open_step( if (node->op_type == ROW_SEL_OPEN_CURSOR) { -/* if (sel_node->state == SEL_NODE_CLOSED) { */ + /* if (sel_node->state == SEL_NODE_CLOSED) { */ - sel_node_reset_cursor(sel_node); -/* } else { - err = DB_ERROR; + sel_node_reset_cursor(sel_node); + /* } else { + err = DB_ERROR; } */ } else { if (sel_node->state != SEL_NODE_CLOSED) { diff --git a/storage/innobase/include/row0undo.h b/storage/innobase/include/row0undo.h index 29cfbc9ac20..0be09ed1822 100644 --- a/storage/innobase/include/row0undo.h +++ b/storage/innobase/include/row0undo.h @@ -86,7 +86,8 @@ struct undo_node_struct{ clustered index record */ dict_table_t* table; /* table where undo is done */ ulint cmpl_info;/* compiler analysis of an update */ - upd_t* update; /* update vector for a clustered index record */ + upd_t* update; /* update vector for a clustered index + record */ dtuple_t* ref; /* row reference to the next row to handle */ dtuple_t* row; /* a copy (also fields copied to heap) of the row to handle */ diff --git a/storage/innobase/include/row0upd.ic b/storage/innobase/include/row0upd.ic index d5a797df651..5e852559fe4 100644 --- a/storage/innobase/include/row0upd.ic +++ b/storage/innobase/include/row0upd.ic @@ -90,11 +90,11 @@ upd_field_set_field_no( dict_index_name_print(stderr, trx, index); fprintf(stderr, "\n" "InnoDB: but index only has %lu fields\n", - (ulong) dict_index_get_n_fields(index)); + (ulong) dict_index_get_n_fields(index)); } dtype_copy(dfield_get_type(&(upd_field->new_val)), - dict_index_get_nth_type(index, field_no)); + dict_index_get_nth_type(index, field_no)); } /************************************************************************* @@ -114,7 +114,7 @@ row_upd_rec_sys_fields( ut_ad(rec_offs_validate(rec, index, offsets)); #ifdef UNIV_SYNC_DEBUG ut_ad(!buf_block_align(rec)->is_hashed - || rw_lock_own(&btr_search_latch, RW_LOCK_EX)); + || rw_lock_own(&btr_search_latch, RW_LOCK_EX)); #endif /* UNIV_SYNC_DEBUG */ row_set_rec_trx_id(rec, index, offsets, trx->id); diff --git a/storage/innobase/include/sync0rw.h b/storage/innobase/include/sync0rw.h index 616d3eeb978..e5f3e1341c5 100644 --- a/storage/innobase/include/sync0rw.h +++ b/storage/innobase/include/sync0rw.h @@ -61,9 +61,9 @@ Creates, or rather, initializes an rw-lock object in a specified memory location (which must be appropriately aligned). The rw-lock is initialized to the non-locked state. Explicit freeing of the rw-lock with rw_lock_free is necessary only if the memory block containing it is freed. */ -#define rw_lock_create(L, level) rw_lock_create_func((L), (level), __FILE__, __LINE__, #L) +#define rw_lock_create(L, level) \ + rw_lock_create_func((L), (level), __FILE__, __LINE__, #L) -/*=====================*/ /********************************************************************** Creates, or rather, initializes an rw-lock object in a specified memory location (which must be appropriately aligned). The rw-lock is initialized diff --git a/storage/innobase/include/sync0rw.ic b/storage/innobase/include/sync0rw.ic index 02b12f40bc9..defe0692aa8 100644 --- a/storage/innobase/include/sync0rw.ic +++ b/storage/innobase/include/sync0rw.ic @@ -144,7 +144,7 @@ rw_lock_s_lock_low( #ifdef UNIV_SYNC_DEBUG rw_lock_add_debug_info(lock, pass, RW_LOCK_SHARED, file_name, - line); + line); #endif lock->last_s_file_name = file_name; lock->last_s_line = line; @@ -280,7 +280,7 @@ rw_lock_s_lock_func_nowait( #ifdef UNIV_SYNC_DEBUG rw_lock_add_debug_info(lock, 0, RW_LOCK_SHARED, file_name, - line); + line); #endif lock->last_s_file_name = file_name; @@ -313,11 +313,11 @@ rw_lock_x_lock_func_nowait( if (UNIV_UNLIKELY(rw_lock_get_reader_count(lock) != 0)) { } else if (UNIV_LIKELY(rw_lock_get_writer(lock) - == RW_LOCK_NOT_LOCKED)) { + == RW_LOCK_NOT_LOCKED)) { rw_lock_set_writer(lock, RW_LOCK_EX); lock->writer_thread = curr_thread; lock->pass = 0; - relock: +relock: lock->writer_count++; #ifdef UNIV_SYNC_DEBUG @@ -329,8 +329,8 @@ rw_lock_x_lock_func_nowait( success = TRUE; } else if (rw_lock_get_writer(lock) == RW_LOCK_EX - && lock->pass == 0 - && os_thread_eq(lock->writer_thread, curr_thread)) { + && lock->pass == 0 + && os_thread_eq(lock->writer_thread, curr_thread)) { goto relock; } @@ -373,7 +373,7 @@ rw_lock_s_unlock_func( signal the object */ if (UNIV_UNLIKELY(lock->waiters) - && lock->reader_count == 0) { + && lock->reader_count == 0) { sg = TRUE; rw_lock_set_waiters(lock, 0); @@ -453,7 +453,7 @@ rw_lock_x_unlock_func( /* If there may be waiters, signal the lock */ if (UNIV_UNLIKELY(lock->waiters) - && lock->writer_count == 0) { + && lock->writer_count == 0) { sg = TRUE; rw_lock_set_waiters(lock, 0); diff --git a/storage/innobase/include/sync0sync.h b/storage/innobase/include/sync0sync.h index 64b245246f8..7d795e60efd 100644 --- a/storage/innobase/include/sync0sync.h +++ b/storage/innobase/include/sync0sync.h @@ -39,8 +39,9 @@ location (which must be appropriately aligned). The mutex is initialized in the reset state. Explicit freeing of the mutex with mutex_free is necessary only if the memory block containing it is freed. */ -#define mutex_create(M, level) mutex_create_func((M), (level), __FILE__, __LINE__, #M) -/*===================*/ +#define mutex_create(M, level) \ + mutex_create_func((M), (level), __FILE__, __LINE__, #M) + /********************************************************************** Creates, or rather, initializes a mutex object in a specified memory location (which must be appropriately aligned). The mutex is initialized diff --git a/storage/innobase/include/sync0sync.ic b/storage/innobase/include/sync0sync.ic index f384e43779f..bcecc3478b3 100644 --- a/storage/innobase/include/sync0sync.ic +++ b/storage/innobase/include/sync0sync.ic @@ -66,25 +66,28 @@ mutex_test_and_set( lw = &(mutex->lock_word); __asm MOV ECX, lw - __asm MOV EDX, 1 - __asm XCHG EDX, DWORD PTR [ECX] - __asm MOV res, EDX - - /* The fence below would prevent this thread from reading the data - structure protected by the mutex before the test-and-set operation is - committed, but the fence is apparently not needed: - - In a posting to comp.arch newsgroup (August 10, 1997) Andy Glew said - that in P6 a LOCKed instruction like XCHG establishes a fence with - respect to memory reads and writes and thus an explicit fence is not - needed. In P5 he seemed to agree with a previous newsgroup poster that - LOCKed instructions serialize all instruction execution, and, - consequently, also memory operations. This is confirmed in Intel - Software Dev. Manual, Vol. 3. */ - - /* mutex_fence(); */ - - return(res); + __asm MOV EDX, 1 + __asm XCHG EDX, DWORD PTR [ECX] + __asm MOV res, EDX + + /* The fence below would prevent this thread from + reading the data structure protected by the mutex + before the test-and-set operation is committed, but + the fence is apparently not needed: + + In a posting to comp.arch newsgroup (August 10, 1997) + Andy Glew said that in P6 a LOCKed instruction like + XCHG establishes a fence with respect to memory reads + and writes and thus an explicit fence is not + needed. In P5 he seemed to agree with a previous + newsgroup poster that LOCKed instructions serialize + all instruction execution, and, consequently, also + memory operations. This is confirmed in Intel Software + Dev. Manual, Vol. 3. */ + + /* mutex_fence(); */ + + return(res); #elif defined(not_defined) && defined(__GNUC__) && defined(UNIV_INTEL_X86) ulint* lw; ulint res; @@ -98,8 +101,8 @@ mutex_test_and_set( code, and the second line tells the input to the asm code. */ asm volatile("movl $1, %%eax; xchgl (%%ecx), %%eax" : - "=eax" (res), "=m" (*lw) : - "ecx" (lw)); + "=eax" (res), "=m" (*lw) : + "ecx" (lw)); return(res); #else ibool ret; @@ -135,10 +138,10 @@ mutex_reset_lock_word( lw = &(mutex->lock_word); __asm MOV EDX, 0 - __asm MOV ECX, lw - __asm XCHG EDX, DWORD PTR [ECX] + __asm MOV ECX, lw + __asm XCHG EDX, DWORD PTR [ECX] #elif defined(not_defined) && defined(__GNUC__) && defined(UNIV_INTEL_X86) - ulint* lw; + ulint* lw; lw = &(mutex->lock_word); @@ -147,11 +150,11 @@ mutex_reset_lock_word( syntax. The 'l' after the mnemonics denotes a 32-bit operation. */ asm volatile("movl $0, %%eax; xchgl (%%ecx), %%eax" : - "=m" (*lw) : - "ecx" (lw) : - "eax"); /* gcc does not seem to understand that our asm code - resets eax: tell it explicitly that after the third - ':' */ + "=m" (*lw) : + "ecx" (lw) : + "eax"); /* gcc does not seem to understand + that our asm code resets eax: tell it + explicitly that after the third ':' */ #else mutex->lock_word = 0; @@ -167,8 +170,8 @@ mutex_get_lock_word( /*================*/ mutex_t* mutex) /* in: mutex */ { -volatile ulint* ptr; /* declared volatile to ensure that - lock_word is loaded from memory */ + volatile ulint* ptr; /* declared volatile to ensure that + lock_word is loaded from memory */ ut_ad(mutex); ptr = &(mutex->lock_word); @@ -185,8 +188,8 @@ mutex_get_waiters( /* out: value to set */ mutex_t* mutex) /* in: mutex */ { -volatile ulint* ptr; /* declared volatile to ensure that - the value is read from memory */ + volatile ulint* ptr; /* declared volatile to ensure that + the value is read from memory */ ut_ad(mutex); ptr = &(mutex->waiters); @@ -252,10 +255,10 @@ mutex_enter_func( the atomic test_and_set; we could peek, and possibly save time. */ #ifndef UNIV_HOTBACKUP - mutex->count_using++; + mutex->count_using++; #endif /* UNIV_HOTBACKUP */ - if (!mutex_test_and_set(mutex)) { + if (!mutex_test_and_set(mutex)) { #ifdef UNIV_SYNC_DEBUG mutex_set_debug_info(mutex, file_name, line); #endif diff --git a/storage/innobase/include/trx0rec.ic b/storage/innobase/include/trx0rec.ic index cd02ed9e04c..a1ddc127ec7 100644 --- a/storage/innobase/include/trx0rec.ic +++ b/storage/innobase/include/trx0rec.ic @@ -77,7 +77,7 @@ trx_undo_rec_copy( trx_undo_rec_t* rec_copy; len = mach_read_from_2(undo_rec) + buf_frame_align(undo_rec) - - undo_rec; + - undo_rec; rec_copy = mem_heap_alloc(heap, len); ut_memcpy(rec_copy, undo_rec, len); diff --git a/storage/innobase/include/trx0rseg.ic b/storage/innobase/include/trx0rseg.ic index 4de7a4ab144..eb1893587a6 100644 --- a/storage/innobase/include/trx0rseg.ic +++ b/storage/innobase/include/trx0rseg.ic @@ -67,12 +67,13 @@ trx_rsegf_get_nth_undo( { if (UNIV_UNLIKELY(n >= TRX_RSEG_N_SLOTS)) { fprintf(stderr, - "InnoDB: Error: trying to get slot %lu of rseg\n", (unsigned long) n); + "InnoDB: Error: trying to get slot %lu of rseg\n", + (ulong) n); ut_error; } - return(mtr_read_ulint(rsegf + TRX_RSEG_UNDO_SLOTS + - n * TRX_RSEG_SLOT_SIZE, MLOG_4BYTES, mtr)); + return(mtr_read_ulint(rsegf + TRX_RSEG_UNDO_SLOTS + + n * TRX_RSEG_SLOT_SIZE, MLOG_4BYTES, mtr)); } /******************************************************************* @@ -88,12 +89,13 @@ trx_rsegf_set_nth_undo( { if (UNIV_UNLIKELY(n >= TRX_RSEG_N_SLOTS)) { fprintf(stderr, - "InnoDB: Error: trying to set slot %lu of rseg\n", (unsigned long) n); + "InnoDB: Error: trying to set slot %lu of rseg\n", + (ulong) n); ut_error; } mlog_write_ulint(rsegf + TRX_RSEG_UNDO_SLOTS + n * TRX_RSEG_SLOT_SIZE, - page_no, MLOG_4BYTES, mtr); + page_no, MLOG_4BYTES, mtr); } /******************************************************************** diff --git a/storage/innobase/include/trx0sys.ic b/storage/innobase/include/trx0sys.ic index e0653609b36..9c950be09f0 100644 --- a/storage/innobase/include/trx0sys.ic +++ b/storage/innobase/include/trx0sys.ic @@ -100,7 +100,7 @@ trx_sysf_get( ut_ad(mtr); header = TRX_SYS + buf_page_get(TRX_SYS_SPACE, TRX_SYS_PAGE_NO, - RW_X_LATCH, mtr); + RW_X_LATCH, mtr); #ifdef UNIV_SYNC_DEBUG buf_page_dbg_add_level(header, SYNC_TRX_SYS_HEADER); @@ -128,8 +128,8 @@ trx_sysf_rseg_get_space( ut_ad(i < TRX_SYS_N_RSEGS); return(mtr_read_ulint(sys_header + TRX_SYS_RSEGS - + i * TRX_SYS_RSEG_SLOT_SIZE - + TRX_SYS_RSEG_SPACE, MLOG_4BYTES, mtr)); + + i * TRX_SYS_RSEG_SLOT_SIZE + + TRX_SYS_RSEG_SPACE, MLOG_4BYTES, mtr)); } /********************************************************************* @@ -152,8 +152,8 @@ trx_sysf_rseg_get_page_no( ut_ad(i < TRX_SYS_N_RSEGS); return(mtr_read_ulint(sys_header + TRX_SYS_RSEGS - + i * TRX_SYS_RSEG_SLOT_SIZE - + TRX_SYS_RSEG_PAGE_NO, MLOG_4BYTES, mtr)); + + i * TRX_SYS_RSEG_SLOT_SIZE + + TRX_SYS_RSEG_PAGE_NO, MLOG_4BYTES, mtr)); } /********************************************************************* @@ -175,10 +175,10 @@ trx_sysf_rseg_set_space( ut_ad(i < TRX_SYS_N_RSEGS); mlog_write_ulint(sys_header + TRX_SYS_RSEGS - + i * TRX_SYS_RSEG_SLOT_SIZE - + TRX_SYS_RSEG_SPACE, - space, - MLOG_4BYTES, mtr); + + i * TRX_SYS_RSEG_SLOT_SIZE + + TRX_SYS_RSEG_SPACE, + space, + MLOG_4BYTES, mtr); } /********************************************************************* @@ -201,10 +201,10 @@ trx_sysf_rseg_set_page_no( ut_ad(i < TRX_SYS_N_RSEGS); mlog_write_ulint(sys_header + TRX_SYS_RSEGS - + i * TRX_SYS_RSEG_SLOT_SIZE - + TRX_SYS_RSEG_PAGE_NO, - page_no, - MLOG_4BYTES, mtr); + + i * TRX_SYS_RSEG_SLOT_SIZE + + TRX_SYS_RSEG_PAGE_NO, + page_no, + MLOG_4BYTES, mtr); } /********************************************************************* @@ -327,8 +327,8 @@ trx_is_active( } trx = trx_get_on_id(trx_id); - if (trx && (trx->conc_state == TRX_ACTIVE || - trx->conc_state == TRX_PREPARED)) { + if (trx && (trx->conc_state == TRX_ACTIVE + || trx->conc_state == TRX_PREPARED)) { return(TRUE); } @@ -358,7 +358,7 @@ trx_sys_get_new_trx_id(void) repeatedly started! */ if (ut_dulint_get_low(trx_sys->max_trx_id) - % TRX_SYS_TRX_ID_WRITE_MARGIN == 0) { + % TRX_SYS_TRX_ID_WRITE_MARGIN == 0) { trx_sys_flush_max_trx_id(); } diff --git a/storage/innobase/include/trx0trx.h b/storage/innobase/include/trx0trx.h index 94f85366d1e..8232699c7f9 100644 --- a/storage/innobase/include/trx0trx.h +++ b/storage/innobase/include/trx0trx.h @@ -670,9 +670,11 @@ struct trx_struct{ error, or empty. */ }; -#define TRX_MAX_N_THREADS 32 /* maximum number of concurrent - threads running a single operation of - a transaction, e.g., a parallel query */ +#define TRX_MAX_N_THREADS 32 /* maximum number of + concurrent threads running a + single operation of a + transaction, e.g., a parallel + query */ /* Transaction types */ #define TRX_USER 1 /* normal user transaction */ #define TRX_PURGE 2 /* purge transaction: this is not diff --git a/storage/innobase/include/trx0trx.ic b/storage/innobase/include/trx0trx.ic index 3992225ed8b..d562db233e9 100644 --- a/storage/innobase/include/trx0trx.ic +++ b/storage/innobase/include/trx0trx.ic @@ -94,5 +94,5 @@ trx_new_rec_locks_contain( dict_index_t* index) /* in: index */ { return(trx->new_rec_locks[0] == index - || trx->new_rec_locks[1] == index); + || trx->new_rec_locks[1] == index); } diff --git a/storage/innobase/include/trx0undo.h b/storage/innobase/include/trx0undo.h index 83f022cc2c5..87849ab42c3 100644 --- a/storage/innobase/include/trx0undo.h +++ b/storage/innobase/include/trx0undo.h @@ -26,7 +26,7 @@ trx_undo_build_roll_ptr( ibool is_insert, /* in: TRUE if insert undo log */ ulint rseg_id, /* in: rollback segment id */ ulint page_no, /* in: page number */ - ulint offset); /* in: offset of the undo entry within page */ + ulint offset); /* in: offset of the undo entry within page */ /*************************************************************************** Decodes a roll pointer dulint. */ UNIV_INLINE @@ -96,7 +96,7 @@ trx_undo_page_get_prev_rec( /* out: pointer to record, NULL if none */ trx_undo_rec_t* rec, /* in: undo log record */ ulint page_no,/* in: undo log header page number */ - ulint offset); /* in: undo log header offset on page */ + ulint offset);/* in: undo log header offset on page */ /********************************************************************** Returns the next undo log record on the page in the specified log, or NULL if none exists. */ @@ -107,7 +107,7 @@ trx_undo_page_get_next_rec( /* out: pointer to record, NULL if none */ trx_undo_rec_t* rec, /* in: undo log record */ ulint page_no,/* in: undo log header page number */ - ulint offset); /* in: undo log header offset on page */ + ulint offset);/* in: undo log header offset on page */ /********************************************************************** Returns the last undo record on the page in the specified undo log, or NULL if none exists. */ @@ -129,7 +129,7 @@ trx_undo_page_get_first_rec( /* out: pointer to record, NULL if none */ page_t* undo_page,/* in: undo log page */ ulint page_no,/* in: undo log header page number */ - ulint offset); /* in: undo log header offset on page */ + ulint offset);/* in: undo log header offset on page */ /*************************************************************************** Gets the previous record in an undo log. */ diff --git a/storage/innobase/include/trx0undo.ic b/storage/innobase/include/trx0undo.ic index 1678b292590..f28f36ade03 100644 --- a/storage/innobase/include/trx0undo.ic +++ b/storage/innobase/include/trx0undo.ic @@ -61,7 +61,7 @@ trx_undo_decode_roll_ptr( *rseg_id = (high / (256 * 256)) % 128; *page_no = (high % (256 * 256)) * 256 * 256 - + (low / 256) / 256; + + (low / 256) / 256; } /*************************************************************************** @@ -179,7 +179,7 @@ trx_undo_page_get_start( if (page_no == buf_frame_get_page_no(undo_page)) { start = mach_read_from_2(offset + undo_page - + TRX_UNDO_LOG_START); + + TRX_UNDO_LOG_START); } else { start = TRX_UNDO_PAGE_HDR + TRX_UNDO_PAGE_HDR_SIZE; } @@ -210,11 +210,11 @@ trx_undo_page_get_end( if (end == 0) { end = mach_read_from_2(undo_page + TRX_UNDO_PAGE_HDR - + TRX_UNDO_PAGE_FREE); + + TRX_UNDO_PAGE_FREE); } } else { end = mach_read_from_2(undo_page + TRX_UNDO_PAGE_HDR - + TRX_UNDO_PAGE_FREE); + + TRX_UNDO_PAGE_FREE); } return(end); diff --git a/storage/innobase/include/trx0xa.h b/storage/innobase/include/trx0xa.h index e90ce47ffcf..df85cd663cb 100644 --- a/storage/innobase/include/trx0xa.h +++ b/storage/innobase/include/trx0xa.h @@ -144,7 +144,8 @@ struct xa_switch_t { on this list */ #define XA_RBPROTO XA_RBBASE+5 /* A protocol error occurred in the resource manager */ -#define XA_RBTIMEOUT XA_RBBASE+6 /* A transaction branch took too long */ +#define XA_RBTIMEOUT XA_RBBASE+6 /* A transaction branch took + too long */ #define XA_RBTRANSIENT XA_RBBASE+7 /* May retry the transaction branch */ #define XA_RBEND XA_RBTRANSIENT /* The inclusive upper bound of the rollback codes */ diff --git a/storage/innobase/include/univ.i b/storage/innobase/include/univ.i index c1f028ef4a3..e60241b0ff3 100644 --- a/storage/innobase/include/univ.i +++ b/storage/innobase/include/univ.i @@ -96,8 +96,6 @@ memory is read outside the allocated blocks. */ #define UNIV_BTR_DEBUG #define UNIV_LIGHT_MEM_DEBUG -#define YYDEBUG 1 - #ifdef HAVE_purify /* The following sets all new allocated memory to zero before use: this can be used to eliminate unnecessary Purify warnings, but note that diff --git a/storage/innobase/include/ut0byte.ic b/storage/innobase/include/ut0byte.ic index 9829b3a2c46..020cf9cedd9 100644 --- a/storage/innobase/include/ut0byte.ic +++ b/storage/innobase/include/ut0byte.ic @@ -62,7 +62,7 @@ ut_conv_dulint_to_longlong( dulint d) /* in: dulint */ { return((ib_longlong)d.low - + (((ib_longlong)d.high) << 32)); + + (((ib_longlong)d.high) << 32)); } /*********************************************************** diff --git a/storage/innobase/include/ut0rnd.ic b/storage/innobase/include/ut0rnd.ic index 455007c7d9b..625c378489a 100644 --- a/storage/innobase/include/ut0rnd.ic +++ b/storage/innobase/include/ut0rnd.ic @@ -71,8 +71,7 @@ ut_rnd_gen_ulint(void) n_bits = 8 * sizeof(ulint); - ut_rnd_ulint_counter = - UT_RND1 * ut_rnd_ulint_counter + UT_RND2; + ut_rnd_ulint_counter = UT_RND1 * ut_rnd_ulint_counter + UT_RND2; rnd = ut_rnd_gen_next_ulint(ut_rnd_ulint_counter); @@ -151,7 +150,7 @@ ut_fold_ulint_pair( ulint n2) /* in: ulint */ { return(((((n1 ^ n2 ^ UT_HASH_RANDOM_MASK2) << 8) + n1) - ^ UT_HASH_RANDOM_MASK) + n2); + ^ UT_HASH_RANDOM_MASK) + n2); } /***************************************************************** @@ -164,7 +163,7 @@ ut_fold_dulint( dulint d) /* in: dulint */ { return(ut_fold_ulint_pair(ut_dulint_get_low(d), - ut_dulint_get_high(d))); + ut_dulint_get_high(d))); } /***************************************************************** |