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/srv/srv0srv.c | |
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/srv/srv0srv.c')
-rw-r--r-- | storage/innobase/srv/srv0srv.c | 410 |
1 files changed, 227 insertions, 183 deletions
diff --git a/storage/innobase/srv/srv0srv.c b/storage/innobase/srv/srv0srv.c index a475db031a3..b781a601039 100644 --- a/storage/innobase/srv/srv0srv.c +++ b/storage/innobase/srv/srv0srv.c @@ -85,10 +85,13 @@ ibool srv_file_per_table = FALSE; /* store to its own file each table created by an user; data dictionary tables are in the system tablespace 0 */ -ibool srv_locks_unsafe_for_binlog = FALSE; /* Place locks to records only - i.e. do not use next-key locking - except on duplicate key checking and - foreign key checking */ +ibool srv_locks_unsafe_for_binlog = FALSE; /* Place locks to + records only i.e. do + not use next-key + locking except on + duplicate key checking + and foreign key + checking */ ulint srv_n_data_files = 0; char** srv_data_file_names = NULL; ulint* srv_data_file_sizes = NULL; /* size in database pages */ @@ -793,9 +796,11 @@ srv_release_threads( if (srv_print_thread_releases) { fprintf(stderr, - "Releasing thread %lu type %lu from slot %lu meter %lu\n", - (ulong) slot->id, (ulong) type, (ulong) i, - (ulong) srv_meter[SRV_RECOVERY]); + "Releasing thread %lu type %lu" + " from slot %lu meter %lu\n", + (ulong) slot->id, (ulong) type, + (ulong) i, + (ulong) srv_meter[SRV_RECOVERY]); } count++; @@ -892,24 +897,24 @@ srv_init(void) /* create dummy table and index for old-style infimum and supremum */ table = dict_mem_table_create("SYS_DUMMY1", - DICT_HDR_SPACE, 1, 0); + DICT_HDR_SPACE, 1, 0); dict_mem_table_add_col(table, "DUMMY", DATA_CHAR, - DATA_ENGLISH | DATA_NOT_NULL, 8, 0); + DATA_ENGLISH | DATA_NOT_NULL, 8, 0); - srv_sys->dummy_ind1 = dict_mem_index_create("SYS_DUMMY1", - "SYS_DUMMY1", DICT_HDR_SPACE, 0, 1); + srv_sys->dummy_ind1 = dict_mem_index_create + ("SYS_DUMMY1", "SYS_DUMMY1", DICT_HDR_SPACE, 0, 1); dict_index_add_col(srv_sys->dummy_ind1, - dict_table_get_nth_col(table, 0), 0); + dict_table_get_nth_col(table, 0), 0); srv_sys->dummy_ind1->table = table; /* create dummy table and index for new-style infimum and supremum */ table = dict_mem_table_create("SYS_DUMMY2", - DICT_HDR_SPACE, 1, DICT_TF_COMPACT); + DICT_HDR_SPACE, 1, DICT_TF_COMPACT); dict_mem_table_add_col(table, "DUMMY", DATA_CHAR, - DATA_ENGLISH | DATA_NOT_NULL, 8, 0); - srv_sys->dummy_ind2 = dict_mem_index_create("SYS_DUMMY2", - "SYS_DUMMY2", DICT_HDR_SPACE, 0, 1); + DATA_ENGLISH | DATA_NOT_NULL, 8, 0); + srv_sys->dummy_ind2 = dict_mem_index_create + ("SYS_DUMMY2", "SYS_DUMMY2", DICT_HDR_SPACE, 0, 1); dict_index_add_col(srv_sys->dummy_ind2, - dict_table_get_nth_col(table, 0), 0); + dict_table_get_nth_col(table, 0), 0); srv_sys->dummy_ind2->table = table; /* avoid ut_ad(index->cached) in dict_index_get_n_unique_in_tree */ @@ -987,9 +992,9 @@ srv_conc_enter_innodb( retry: if (trx->declared_to_be_inside_innodb) { ut_print_timestamp(stderr); - fputs( -" InnoDB: Error: trying to declare trx to enter InnoDB, but\n" -"InnoDB: it already is declared.\n", stderr); + fputs(" InnoDB: Error: trying to declare trx" + " to enter InnoDB, but\n" + "InnoDB: it already is declared.\n", stderr); trx_print(stderr, trx, 0); putc('\n', stderr); os_fast_mutex_unlock(&srv_conc_mutex); @@ -1008,11 +1013,11 @@ retry: return; } - /* If the transaction is not holding resources, - let it sleep for SRV_THREAD_SLEEP_DELAY microseconds, and try again then */ + /* If the transaction is not holding resources, let it sleep + for SRV_THREAD_SLEEP_DELAY microseconds, and try again then */ if (!has_slept && !trx->has_search_latch - && NULL == UT_LIST_GET_FIRST(trx->trx_locks)) { + && NULL == UT_LIST_GET_FIRST(trx->trx_locks)) { has_slept = TRUE; /* We let is sleep only once to avoid starvation */ @@ -1227,11 +1232,11 @@ srv_normalize_init_values(void) for (i = 0; i < n; i++) { srv_data_file_sizes[i] = srv_data_file_sizes[i] - * ((1024 * 1024) / UNIV_PAGE_SIZE); + * ((1024 * 1024) / UNIV_PAGE_SIZE); } srv_last_file_size_max = srv_last_file_size_max - * ((1024 * 1024) / UNIV_PAGE_SIZE); + * ((1024 * 1024) / UNIV_PAGE_SIZE); srv_log_file_size = srv_log_file_size / UNIV_PAGE_SIZE; @@ -1313,21 +1318,29 @@ srv_table_reserve_slot_for_mysql(void) ut_print_timestamp(stderr); fprintf(stderr, -" InnoDB: There appear to be %lu MySQL threads currently waiting\n" -"InnoDB: inside InnoDB, which is the upper limit. Cannot continue operation.\n" -"InnoDB: We intentionally generate a seg fault to print a stack trace\n" -"InnoDB: on Linux. But first we print a list of waiting threads.\n", (ulong) i); + " InnoDB: There appear to be %lu MySQL" + " threads currently waiting\n" + "InnoDB: inside InnoDB, which is the" + " upper limit. Cannot continue operation.\n" + "InnoDB: We intentionally generate" + " a seg fault to print a stack trace\n" + "InnoDB: on Linux. But first we print" + " a list of waiting threads.\n", (ulong) i); for (i = 0; i < OS_THREAD_MAX_N; i++) { slot = srv_mysql_table + i; fprintf(stderr, -"Slot %lu: thread id %lu, type %lu, in use %lu, susp %lu, time %lu\n", - (ulong) i, (ulong) os_thread_pf(slot->id), - (ulong) slot->type, (ulong) slot->in_use, - (ulong) slot->suspended, - (ulong) difftime(ut_time(), slot->suspend_time)); + "Slot %lu: thread id %lu, type %lu," + " in use %lu, susp %lu, time %lu\n", + (ulong) i, + (ulong) os_thread_pf(slot->id), + (ulong) slot->type, + (ulong) slot->in_use, + (ulong) slot->suspended, + (ulong) difftime(ut_time(), + slot->suspend_time)); } ut_error; @@ -1493,8 +1506,8 @@ srv_suspend_mysql_thread( mutex_exit(&kernel_mutex); - if (srv_lock_wait_timeout < 100000000 && - wait_time > (double)srv_lock_wait_timeout) { + if (srv_lock_wait_timeout < 100000000 + && wait_time > (double)srv_lock_wait_timeout) { trx->error_state = DB_LOCK_WAIT_TIMEOUT; } @@ -1600,7 +1613,7 @@ srv_printf_innodb_monitor( time */ time_elapsed = difftime(current_time, srv_last_monitor_time) - + 0.001; + + 0.001; srv_last_monitor_time = time(NULL); @@ -1614,8 +1627,8 @@ srv_printf_innodb_monitor( (ulong)time_elapsed); fputs("----------\n" - "SEMAPHORES\n" - "----------\n", file); + "SEMAPHORES\n" + "----------\n", file); sync_print(file); /* Conceptually, srv_innodb_monitor_mutex has a very high latching @@ -1627,8 +1640,8 @@ srv_printf_innodb_monitor( if (ftell(dict_foreign_err_file) != 0L) { fputs("------------------------\n" - "LATEST FOREIGN KEY ERROR\n" - "------------------------\n", file); + "LATEST FOREIGN KEY ERROR\n" + "------------------------\n", file); ut_copy_file(file, dict_foreign_err_file); } @@ -1653,64 +1666,66 @@ srv_printf_innodb_monitor( } } fputs("--------\n" - "FILE I/O\n" - "--------\n", file); + "FILE I/O\n" + "--------\n", file); os_aio_print(file); fputs("-------------------------------------\n" - "INSERT BUFFER AND ADAPTIVE HASH INDEX\n" - "-------------------------------------\n", file); + "INSERT BUFFER AND ADAPTIVE HASH INDEX\n" + "-------------------------------------\n", file); ibuf_print(file); ha_print_info(file, btr_search_sys->hash_index); fprintf(file, "%.2f hash searches/s, %.2f non-hash searches/s\n", - (btr_cur_n_sea - btr_cur_n_sea_old) - / time_elapsed, - (btr_cur_n_non_sea - btr_cur_n_non_sea_old) - / time_elapsed); + (btr_cur_n_sea - btr_cur_n_sea_old) + / time_elapsed, + (btr_cur_n_non_sea - btr_cur_n_non_sea_old) + / time_elapsed); btr_cur_n_sea_old = btr_cur_n_sea; btr_cur_n_non_sea_old = btr_cur_n_non_sea; fputs("---\n" - "LOG\n" - "---\n", file); + "LOG\n" + "---\n", file); log_print(file); fputs("----------------------\n" - "BUFFER POOL AND MEMORY\n" - "----------------------\n", file); + "BUFFER POOL AND MEMORY\n" + "----------------------\n", file); fprintf(file, - "Total memory allocated " ULINTPF - "; in additional pool allocated " ULINTPF "\n", - ut_total_allocated_memory, - mem_pool_get_reserved(mem_comm_pool)); + "Total memory allocated " ULINTPF + "; in additional pool allocated " ULINTPF "\n", + ut_total_allocated_memory, + mem_pool_get_reserved(mem_comm_pool)); fprintf(file, "Dictionary memory allocated " ULINTPF "\n", dict_sys->size); if (srv_use_awe) { fprintf(file, - "In addition to that %lu MB of AWE memory allocated\n", - (ulong) (srv_pool_size / ((1024 * 1024) / UNIV_PAGE_SIZE))); + "In addition to that %lu MB of AWE memory allocated\n", + (ulong) (srv_pool_size + / ((1024 * 1024) / UNIV_PAGE_SIZE))); } buf_print_io(file); fputs("--------------\n" - "ROW OPERATIONS\n" - "--------------\n", file); + "ROW OPERATIONS\n" + "--------------\n", file); fprintf(file, "%ld queries inside InnoDB, %lu queries in queue\n", (long) srv_conc_n_threads, (ulong) srv_conc_n_waiting_threads); fprintf(file, "%lu read views open inside InnoDB\n", - UT_LIST_GET_LEN(trx_sys->view_list)); + UT_LIST_GET_LEN(trx_sys->view_list)); n_reserved = fil_space_get_n_reserved_extents(0); if (n_reserved > 0) { fprintf(file, - "%lu tablespace extents now reserved for B-tree split operations\n", + "%lu tablespace extents now reserved for" + " B-tree split operations\n", (ulong) n_reserved); } @@ -1721,35 +1736,37 @@ srv_printf_innodb_monitor( srv_main_thread_op_info); #else fprintf(file, "Main thread id %lu, state: %s\n", - (ulong) srv_main_thread_id, - srv_main_thread_op_info); + (ulong) srv_main_thread_id, + srv_main_thread_op_info); #endif fprintf(file, - "Number of rows inserted " ULINTPF - ", updated " ULINTPF ", deleted " ULINTPF ", read " ULINTPF "\n", - srv_n_rows_inserted, - srv_n_rows_updated, - srv_n_rows_deleted, - srv_n_rows_read); + "Number of rows inserted " ULINTPF + ", updated " ULINTPF ", deleted " ULINTPF + ", read " ULINTPF "\n", + srv_n_rows_inserted, + srv_n_rows_updated, + srv_n_rows_deleted, + srv_n_rows_read); fprintf(file, - "%.2f inserts/s, %.2f updates/s, %.2f deletes/s, %.2f reads/s\n", - (srv_n_rows_inserted - srv_n_rows_inserted_old) - / time_elapsed, - (srv_n_rows_updated - srv_n_rows_updated_old) - / time_elapsed, - (srv_n_rows_deleted - srv_n_rows_deleted_old) - / time_elapsed, - (srv_n_rows_read - srv_n_rows_read_old) - / time_elapsed); - - srv_n_rows_inserted_old = srv_n_rows_inserted; + "%.2f inserts/s, %.2f updates/s," + " %.2f deletes/s, %.2f reads/s\n", + (srv_n_rows_inserted - srv_n_rows_inserted_old) + / time_elapsed, + (srv_n_rows_updated - srv_n_rows_updated_old) + / time_elapsed, + (srv_n_rows_deleted - srv_n_rows_deleted_old) + / time_elapsed, + (srv_n_rows_read - srv_n_rows_read_old) + / time_elapsed); + + srv_n_rows_inserted_old = srv_n_rows_inserted; srv_n_rows_updated_old = srv_n_rows_updated; srv_n_rows_deleted_old = srv_n_rows_deleted; srv_n_rows_read_old = srv_n_rows_read; - fputs("----------------------------\n" - "END OF INNODB MONITOR OUTPUT\n" - "============================\n", file); + fputs("----------------------------\n" + "END OF INNODB MONITOR OUTPUT\n" + "============================\n", file); mutex_exit(&srv_innodb_monitor_mutex); fflush(file); } @@ -1760,60 +1777,72 @@ Function to pass InnoDB status variables to MySQL */ void srv_export_innodb_status(void) { - mutex_enter(&srv_innodb_monitor_mutex); - export_vars.innodb_data_pending_reads= os_n_pending_reads; - export_vars.innodb_data_pending_writes= os_n_pending_writes; - export_vars.innodb_data_pending_fsyncs= - fil_n_pending_log_flushes + fil_n_pending_tablespace_flushes; - export_vars.innodb_data_fsyncs= os_n_fsyncs; - export_vars.innodb_data_read= srv_data_read; - export_vars.innodb_data_reads= os_n_file_reads; - export_vars.innodb_data_writes= os_n_file_writes; - export_vars.innodb_data_written= srv_data_written; - export_vars.innodb_buffer_pool_read_requests= buf_pool->n_page_gets; - export_vars.innodb_buffer_pool_write_requests= srv_buf_pool_write_requests; - export_vars.innodb_buffer_pool_wait_free= srv_buf_pool_wait_free; - export_vars.innodb_buffer_pool_pages_flushed= srv_buf_pool_flushed; - export_vars.innodb_buffer_pool_reads= srv_buf_pool_reads; - export_vars.innodb_buffer_pool_read_ahead_rnd= srv_read_ahead_rnd; - export_vars.innodb_buffer_pool_read_ahead_seq= srv_read_ahead_seq; - export_vars.innodb_buffer_pool_pages_data= UT_LIST_GET_LEN(buf_pool->LRU); - export_vars.innodb_buffer_pool_pages_dirty= UT_LIST_GET_LEN(buf_pool->flush_list); - export_vars.innodb_buffer_pool_pages_free= UT_LIST_GET_LEN(buf_pool->free); - export_vars.innodb_buffer_pool_pages_latched= buf_get_latched_pages_number(); - export_vars.innodb_buffer_pool_pages_total= buf_pool->curr_size; - export_vars.innodb_buffer_pool_pages_misc= buf_pool->max_size - - UT_LIST_GET_LEN(buf_pool->LRU) - UT_LIST_GET_LEN(buf_pool->free); - export_vars.innodb_page_size= UNIV_PAGE_SIZE; - export_vars.innodb_log_waits= srv_log_waits; - export_vars.innodb_os_log_written= srv_os_log_written; - export_vars.innodb_os_log_fsyncs= fil_n_log_flushes; - export_vars.innodb_os_log_pending_fsyncs= fil_n_pending_log_flushes; - export_vars.innodb_os_log_pending_writes= srv_os_log_pending_writes; - export_vars.innodb_log_write_requests= srv_log_write_requests; - export_vars.innodb_log_writes= srv_log_writes; - export_vars.innodb_dblwr_pages_written= srv_dblwr_pages_written; - export_vars.innodb_dblwr_writes= srv_dblwr_writes; - export_vars.innodb_pages_created= buf_pool->n_pages_created; - export_vars.innodb_pages_read= buf_pool->n_pages_read; - export_vars.innodb_pages_written= buf_pool->n_pages_written; - export_vars.innodb_row_lock_waits= srv_n_lock_wait_count; - export_vars.innodb_row_lock_current_waits= srv_n_lock_wait_current_count; - export_vars.innodb_row_lock_time= srv_n_lock_wait_time / 10000; + + export_vars.innodb_data_pending_reads + = os_n_pending_reads; + export_vars.innodb_data_pending_writes + = os_n_pending_writes; + export_vars.innodb_data_pending_fsyncs + = fil_n_pending_log_flushes + + fil_n_pending_tablespace_flushes; + export_vars.innodb_data_fsyncs = os_n_fsyncs; + export_vars.innodb_data_read = srv_data_read; + export_vars.innodb_data_reads = os_n_file_reads; + export_vars.innodb_data_writes = os_n_file_writes; + export_vars.innodb_data_written = srv_data_written; + export_vars.innodb_buffer_pool_read_requests = buf_pool->n_page_gets; + export_vars.innodb_buffer_pool_write_requests + = srv_buf_pool_write_requests; + export_vars.innodb_buffer_pool_wait_free = srv_buf_pool_wait_free; + export_vars.innodb_buffer_pool_pages_flushed = srv_buf_pool_flushed; + export_vars.innodb_buffer_pool_reads = srv_buf_pool_reads; + export_vars.innodb_buffer_pool_read_ahead_rnd = srv_read_ahead_rnd; + export_vars.innodb_buffer_pool_read_ahead_seq = srv_read_ahead_seq; + export_vars.innodb_buffer_pool_pages_data + = UT_LIST_GET_LEN(buf_pool->LRU); + export_vars.innodb_buffer_pool_pages_dirty + = UT_LIST_GET_LEN(buf_pool->flush_list); + export_vars.innodb_buffer_pool_pages_free + = UT_LIST_GET_LEN(buf_pool->free); + export_vars.innodb_buffer_pool_pages_latched + = buf_get_latched_pages_number(); + export_vars.innodb_buffer_pool_pages_total = buf_pool->curr_size; + + export_vars.innodb_buffer_pool_pages_misc = buf_pool->max_size + - UT_LIST_GET_LEN(buf_pool->LRU) + - UT_LIST_GET_LEN(buf_pool->free); + export_vars.innodb_page_size = UNIV_PAGE_SIZE; + export_vars.innodb_log_waits = srv_log_waits; + export_vars.innodb_os_log_written = srv_os_log_written; + export_vars.innodb_os_log_fsyncs = fil_n_log_flushes; + export_vars.innodb_os_log_pending_fsyncs = fil_n_pending_log_flushes; + export_vars.innodb_os_log_pending_writes = srv_os_log_pending_writes; + export_vars.innodb_log_write_requests = srv_log_write_requests; + export_vars.innodb_log_writes = srv_log_writes; + export_vars.innodb_dblwr_pages_written = srv_dblwr_pages_written; + export_vars.innodb_dblwr_writes = srv_dblwr_writes; + export_vars.innodb_pages_created = buf_pool->n_pages_created; + export_vars.innodb_pages_read = buf_pool->n_pages_read; + export_vars.innodb_pages_written = buf_pool->n_pages_written; + export_vars.innodb_row_lock_waits = srv_n_lock_wait_count; + export_vars.innodb_row_lock_current_waits + = srv_n_lock_wait_current_count; + export_vars.innodb_row_lock_time = srv_n_lock_wait_time / 10000; if (srv_n_lock_wait_count > 0) { export_vars.innodb_row_lock_time_avg = (ulint) (srv_n_lock_wait_time / 10000 / srv_n_lock_wait_count); } else { export_vars.innodb_row_lock_time_avg = 0; } - export_vars.innodb_row_lock_time_max= srv_n_lock_max_wait_time / 10000; - export_vars.innodb_rows_read= srv_n_rows_read; - export_vars.innodb_rows_inserted= srv_n_rows_inserted; - export_vars.innodb_rows_updated= srv_n_rows_updated; - export_vars.innodb_rows_deleted= srv_n_rows_deleted; - mutex_exit(&srv_innodb_monitor_mutex); + export_vars.innodb_row_lock_time_max + = srv_n_lock_max_wait_time / 10000; + export_vars.innodb_rows_read = srv_n_rows_read; + export_vars.innodb_rows_inserted = srv_n_rows_inserted; + export_vars.innodb_rows_updated = srv_n_rows_updated; + export_vars.innodb_rows_deleted = srv_n_rows_deleted; + mutex_exit(&srv_innodb_monitor_mutex); } /************************************************************************* @@ -1873,53 +1902,57 @@ loop: if (srv_innodb_status) { mutex_enter(&srv_monitor_file_mutex); rewind(srv_monitor_file); - srv_printf_innodb_monitor(srv_monitor_file, NULL, NULL); + srv_printf_innodb_monitor + (srv_monitor_file, NULL, NULL); os_file_set_eof(srv_monitor_file); mutex_exit(&srv_monitor_file_mutex); } if (srv_print_innodb_tablespace_monitor - && difftime(current_time, last_table_monitor_time) > 60) { + && difftime(current_time, last_table_monitor_time) > 60) { last_table_monitor_time = time(NULL); - fputs("================================================\n", - stderr); + fputs("========================" + "========================\n", + stderr); ut_print_timestamp(stderr); fputs(" INNODB TABLESPACE MONITOR OUTPUT\n" - "================================================\n", - stderr); + "========================" + "========================\n", + stderr); fsp_print(0); fputs("Validating tablespace\n", stderr); fsp_validate(0); fputs("Validation ok\n" - "---------------------------------------\n" - "END OF INNODB TABLESPACE MONITOR OUTPUT\n" - "=======================================\n", - stderr); + "---------------------------------------\n" + "END OF INNODB TABLESPACE MONITOR OUTPUT\n" + "=======================================\n", + stderr); } if (srv_print_innodb_table_monitor - && difftime(current_time, last_table_monitor_time) > 60) { + && difftime(current_time, last_table_monitor_time) > 60) { last_table_monitor_time = time(NULL); - fputs("===========================================\n", stderr); + fputs("===========================================\n", + stderr); ut_print_timestamp(stderr); fputs(" INNODB TABLE MONITOR OUTPUT\n" - "===========================================\n", - stderr); + "===========================================\n", + stderr); dict_print(); fputs("-----------------------------------\n" - "END OF INNODB TABLE MONITOR OUTPUT\n" - "==================================\n", - stderr); + "END OF INNODB TABLE MONITOR OUTPUT\n" + "==================================\n", + stderr); } } @@ -1939,9 +1972,9 @@ loop: wait_time = ut_difftime(ut_time(), slot->suspend_time); - if (srv_lock_wait_timeout < 100000000 && - (wait_time > (double) srv_lock_wait_timeout - || wait_time < 0)) { + if (srv_lock_wait_timeout < 100000000 + && (wait_time > (double) srv_lock_wait_timeout + || wait_time < 0)) { /* Timeout exceeded or a wrap-around in system time counter: cancel the lock request queued @@ -1951,8 +1984,9 @@ loop: granted: in that case do nothing */ if (thr_get_trx(slot->thr)->wait_lock) { - lock_cancel_waiting_and_release( - thr_get_trx(slot->thr)->wait_lock); + lock_cancel_waiting_and_release + (thr_get_trx(slot->thr) + ->wait_lock); } } } @@ -1967,9 +2001,9 @@ loop: } if (some_waits || srv_print_innodb_monitor - || srv_print_innodb_lock_monitor - || srv_print_innodb_tablespace_monitor - || srv_print_innodb_table_monitor) { + || srv_print_innodb_lock_monitor + || srv_print_innodb_tablespace_monitor + || srv_print_innodb_table_monitor) { goto loop; } @@ -2030,13 +2064,15 @@ loop: if (ut_dulint_cmp(new_lsn, old_lsn) < 0) { ut_print_timestamp(stderr); fprintf(stderr, -" InnoDB: Error: old log sequence number %lu %lu was greater\n" -"InnoDB: than the new log sequence number %lu %lu!\n" -"InnoDB: Please send a bug report to mysql@lists.mysql.com\n", - (ulong) ut_dulint_get_high(old_lsn), - (ulong) ut_dulint_get_low(old_lsn), - (ulong) ut_dulint_get_high(new_lsn), - (ulong) ut_dulint_get_low(new_lsn)); + " InnoDB: Error: old log sequence number %lu %lu" + " was greater\n" + "InnoDB: than the new log sequence number %lu %lu!\n" + "InnoDB: Please submit a bug report" + " to http://bugs.mysql.com\n", + (ulong) ut_dulint_get_high(old_lsn), + (ulong) ut_dulint_get_low(old_lsn), + (ulong) ut_dulint_get_high(new_lsn), + (ulong) ut_dulint_get_low(new_lsn)); } old_lsn = new_lsn; @@ -2053,9 +2089,11 @@ loop: if (fatal_cnt > 5) { fprintf(stderr, -"InnoDB: Error: semaphore wait has lasted > %lu seconds\n" -"InnoDB: We intentionally crash the server, because it appears to be hung.\n", - srv_fatal_semaphore_wait_threshold); + "InnoDB: Error: semaphore wait has lasted" + " > %lu seconds\n" + "InnoDB: We intentionally crash the server," + " because it appears to be hung.\n", + (ulong) srv_fatal_semaphore_wait_threshold); ut_error; } @@ -2174,7 +2212,7 @@ loop: srv_main_thread_op_info = "reserving kernel mutex"; n_ios_very_old = log_sys->n_log_ios + buf_pool->n_pages_read - + buf_pool->n_pages_written; + + buf_pool->n_pages_written; mutex_enter(&kernel_mutex); /* Store the user activity counter at the start of this loop */ @@ -2194,7 +2232,7 @@ loop: for (i = 0; i < 10; i++) { n_ios_old = log_sys->n_log_ios + buf_pool->n_pages_read - + buf_pool->n_pages_written; + + buf_pool->n_pages_written; srv_main_thread_op_info = "sleeping"; if (!skip_sleep) { @@ -2235,9 +2273,9 @@ loop: do an insert buffer merge. */ n_pend_ios = buf_get_n_pending_ios() - + log_sys->n_pending_writes; + + log_sys->n_pending_writes; n_ios = log_sys->n_log_ios + buf_pool->n_pages_read - + buf_pool->n_pages_written; + + buf_pool->n_pages_written; if (n_pend_ios < 3 && (n_ios - n_ios_old < 5)) { srv_main_thread_op_info = "doing insert buffer merge"; ibuf_contract_for_n_pages(TRUE, 5); @@ -2247,8 +2285,8 @@ loop: log_buffer_flush_to_disk(); } - if (buf_get_modified_ratio_pct() > - srv_max_buf_pool_modified_pct) { + if (UNIV_UNLIKELY(buf_get_modified_ratio_pct() + > srv_max_buf_pool_modified_pct)) { /* Try to keep the number of modified pages in the buffer pool under the limit wished by the user */ @@ -2287,7 +2325,7 @@ loop: n_pend_ios = buf_get_n_pending_ios() + log_sys->n_pending_writes; n_ios = log_sys->n_log_ios + buf_pool->n_pages_read - + buf_pool->n_pages_written; + + buf_pool->n_pages_written; if (n_pend_ios < 3 && (n_ios - n_ios_very_old < 200)) { srv_main_thread_op_info = "flushing buffer pool pages"; @@ -2344,14 +2382,14 @@ loop: the time it requires to flush 100 pages */ n_pages_flushed = buf_flush_batch(BUF_FLUSH_LIST, 100, - ut_dulint_max); + ut_dulint_max); } else { /* Otherwise, we only flush a small number of pages so that we do not unnecessarily use much disk i/o capacity from other work */ n_pages_flushed = buf_flush_batch(BUF_FLUSH_LIST, 10, - ut_dulint_max); + ut_dulint_max); } srv_main_thread_op_info = "making checkpoint"; @@ -2455,8 +2493,8 @@ flush_loop: srv_main_thread_op_info = "flushing buffer pool pages"; if (srv_fast_shutdown < 2) { - n_pages_flushed = - buf_flush_batch(BUF_FLUSH_LIST, 100, ut_dulint_max); + n_pages_flushed = buf_flush_batch + (BUF_FLUSH_LIST, 100, ut_dulint_max); } else { /* In the fastest shutdown we do not flush the buffer pool to data files: we set n_pages_flushed to 0 artificially. */ @@ -2500,18 +2538,18 @@ flush_loop: goto loop; } mutex_exit(&kernel_mutex); -/* + /* srv_main_thread_op_info = "archiving log (if log archive is on)"; log_archive_do(FALSE, &n_bytes_archived); -*/ + */ n_bytes_archived = 0; /* Keep looping in the background loop if still work to do */ if (srv_fast_shutdown && srv_shutdown_state > 0) { if (n_tables_to_drop + n_pages_flushed - + n_bytes_archived != 0) { + + n_bytes_archived != 0) { /* If we are doing a fast shutdown (= the default) we do not do purge or insert buffer merge. But we @@ -2522,9 +2560,9 @@ flush_loop: goto background_loop; } - } else if (n_tables_to_drop + - n_pages_purged + n_bytes_merged + n_pages_flushed - + n_bytes_archived != 0) { + } else if (n_tables_to_drop + + n_pages_purged + n_bytes_merged + n_pages_flushed + + n_bytes_archived != 0) { /* In a 'slow' shutdown we run purge and the insert buffer merge to completion */ @@ -2549,6 +2587,10 @@ suspend_thread: mutex_exit(&kernel_mutex); + /* DO NOT CHANGE THIS STRING. innobase_start_or_create_for_mysql() + waits for database activity to die down when converting < 4.1.x + databases, and relies on this string being exactly as it is. InnoDB + manual also mentions this string in several places. */ srv_main_thread_op_info = "waiting for server activity"; os_event_wait(event); @@ -2564,5 +2606,7 @@ suspend_thread: main thread goes back to loop. */ goto loop; + + OS_THREAD_DUMMY_RETURN; /* Not reached, avoid compiler warning */ } #endif /* !UNIV_HOTBACKUP */ |