Commit 0da158aa authored by unknown's avatar unknown

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).
parent fbf2bc18
...@@ -6787,19 +6787,17 @@ ha_innobase::store_lock( ...@@ -6787,19 +6787,17 @@ ha_innobase::store_lock(
row_prebuilt_t* prebuilt = (row_prebuilt_t*) innobase_prebuilt; row_prebuilt_t* prebuilt = (row_prebuilt_t*) innobase_prebuilt;
trx_t* trx; trx_t* trx;
/* Call update_thd() to update prebuilt->trx to point to the trx /* Note that trx in this function is NOT necessarily prebuilt->trx
object of thd! Failure to do this caused a serious memory because we call update_thd() later, in ::external_lock()! Failure to
corruption bug in 5.1.11. */ understand this caused a serious memory corruption bug in 5.1.11. */
update_thd(thd); trx = check_trx_exists(thd);
trx = prebuilt->trx;
/* NOTE: MySQL can call this function with lock 'type' TL_IGNORE! /* NOTE: MySQL can call this function with lock 'type' TL_IGNORE!
Be careful to ignore TL_IGNORE if we are going to do something with Be careful to ignore TL_IGNORE if we are going to do something with
only 'real' locks! */ only 'real' locks! */
/* If no MySQL tables is use we need to set isolation level /* If no MySQL table is in use, we need to set the isolation level
of the transaction. */ of the transaction. */
if (lock_type != TL_IGNORE if (lock_type != TL_IGNORE
...@@ -6809,7 +6807,13 @@ ha_innobase::store_lock( ...@@ -6809,7 +6807,13 @@ ha_innobase::store_lock(
thd->variables.tx_isolation); thd->variables.tx_isolation);
} }
if ((lock_type == TL_READ && thd->in_lock_tables) || if (thd->lex->sql_command == SQLCOM_DROP_TABLE) {
/* MySQL calls this function in DROP TABLE though this table
handle may belong to another thd that is running a query. Let
us in that case skip any changes to the prebuilt struct. */
} else if ((lock_type == TL_READ && thd->in_lock_tables) ||
(lock_type == TL_READ_HIGH_PRIORITY && thd->in_lock_tables) || (lock_type == TL_READ_HIGH_PRIORITY && thd->in_lock_tables) ||
lock_type == TL_READ_WITH_SHARED_LOCKS || lock_type == TL_READ_WITH_SHARED_LOCKS ||
lock_type == TL_READ_NO_INSERT || lock_type == TL_READ_NO_INSERT ||
...@@ -7400,7 +7404,9 @@ innobase_xa_prepare( ...@@ -7400,7 +7404,9 @@ innobase_xa_prepare(
int error = 0; int error = 0;
trx_t* trx = check_trx_exists(thd); trx_t* trx = check_trx_exists(thd);
if (thd->lex->sql_command != SQLCOM_XA_PREPARE) { if (thd->lex->sql_command != SQLCOM_XA_PREPARE &&
(all || !(thd->options & (OPTION_NOT_AUTOCOMMIT | OPTION_BEGIN))))
{
/* For ibbackup to work the order of transactions in binlog /* For ibbackup to work the order of transactions in binlog
and InnoDB must be the same. Consider the situation and InnoDB must be the same. Consider the situation
...@@ -7625,6 +7631,19 @@ SHOW_VAR innodb_status_variables_export[]= { ...@@ -7625,6 +7631,19 @@ SHOW_VAR innodb_status_variables_export[]= {
{NullS, NullS, SHOW_LONG} {NullS, NullS, SHOW_LONG}
}; };
static int show_innodb_vars(THD *thd, SHOW_VAR *var, char *buff)
{
innodb_export_status();
var->type= SHOW_ARRAY;
var->value= (char *) &innodb_status_variables;
return 0;
}
SHOW_VAR innodb_status_variables_export[]= {
{"Innodb", (char*) &show_innodb_vars, SHOW_FUNC},
{NullS, NullS, SHOW_LONG}
};
struct st_mysql_storage_engine innobase_storage_engine= struct st_mysql_storage_engine innobase_storage_engine=
{ MYSQL_HANDLERTON_INTERFACE_VERSION, &innobase_hton}; { MYSQL_HANDLERTON_INTERFACE_VERSION, &innobase_hton};
......
...@@ -87,7 +87,8 @@ EXTRA_DIST = include/btr0btr.h include/btr0btr.ic include/btr0cur.h include/btr ...@@ -87,7 +87,8 @@ EXTRA_DIST = include/btr0btr.h include/btr0btr.ic include/btr0cur.h include/btr
include/ut0byte.h include/ut0byte.ic include/ut0dbg.h include/ut0lst.h \ include/ut0byte.h include/ut0byte.ic include/ut0dbg.h include/ut0lst.h \
include/ut0mem.h include/ut0mem.ic include/ut0rnd.h include/ut0rnd.ic \ include/ut0mem.h include/ut0mem.ic include/ut0rnd.h include/ut0rnd.ic \
include/ut0sort.h include/ut0ut.h include/ut0ut.ic include/ut0vec.h include/ut0vec.ic include/ha_prototypes.h \ include/ut0sort.h include/ut0ut.h include/ut0ut.ic include/ut0vec.h include/ut0vec.ic include/ha_prototypes.h \
include/ut0list.h include/ut0list.ic include/ut0wqueue.h \ include/ut0list.h include/ut0list.ic \
include/ut0wqueue.h \
CMakeLists.txt CMakeLists.txt
noinst_LIBRARIES = libinnobase.a noinst_LIBRARIES = libinnobase.a
......
This diff is collapsed.
This diff is collapsed.
...@@ -92,9 +92,9 @@ btr_pcur_store_position( ...@@ -92,9 +92,9 @@ btr_pcur_store_position(
offs = ut_align_offset(rec, UNIV_PAGE_SIZE); offs = ut_align_offset(rec, UNIV_PAGE_SIZE);
ut_ad(mtr_memo_contains(mtr, buf_block_align(page), ut_ad(mtr_memo_contains(mtr, buf_block_align(page),
MTR_MEMO_PAGE_S_FIX) MTR_MEMO_PAGE_S_FIX)
|| mtr_memo_contains(mtr, buf_block_align(page), || mtr_memo_contains(mtr, buf_block_align(page),
MTR_MEMO_PAGE_X_FIX)); MTR_MEMO_PAGE_X_FIX));
ut_a(cursor->latch_mode != BTR_NO_LATCHES); ut_a(cursor->latch_mode != BTR_NO_LATCHES);
if (UNIV_UNLIKELY(page_get_n_recs(page) == 0)) { if (UNIV_UNLIKELY(page_get_n_recs(page) == 0)) {
...@@ -133,14 +133,13 @@ btr_pcur_store_position( ...@@ -133,14 +133,13 @@ btr_pcur_store_position(
} }
cursor->old_stored = BTR_PCUR_OLD_STORED; cursor->old_stored = BTR_PCUR_OLD_STORED;
cursor->old_rec = dict_tree_copy_rec_order_prefix(tree, rec, cursor->old_rec = dict_tree_copy_rec_order_prefix
&cursor->old_n_fields, (tree, rec, &cursor->old_n_fields,
&cursor->old_rec_buf, &cursor->old_rec_buf, &cursor->buf_size);
&cursor->buf_size);
cursor->block_when_stored = buf_block_align(page); cursor->block_when_stored = buf_block_align(page);
cursor->modify_clock = buf_block_get_modify_clock( cursor->modify_clock = buf_block_get_modify_clock
cursor->block_when_stored); (cursor->block_when_stored);
} }
/****************************************************************** /******************************************************************
...@@ -165,7 +164,7 @@ btr_pcur_copy_stored_position( ...@@ -165,7 +164,7 @@ btr_pcur_copy_stored_position(
pcur_receive->old_rec_buf = mem_alloc(pcur_donate->buf_size); pcur_receive->old_rec_buf = mem_alloc(pcur_donate->buf_size);
ut_memcpy(pcur_receive->old_rec_buf, pcur_donate->old_rec_buf, ut_memcpy(pcur_receive->old_rec_buf, pcur_donate->old_rec_buf,
pcur_donate->buf_size); pcur_donate->buf_size);
pcur_receive->old_rec = pcur_receive->old_rec_buf pcur_receive->old_rec = pcur_receive->old_rec_buf
+ (pcur_donate->old_rec - pcur_donate->old_rec_buf); + (pcur_donate->old_rec - pcur_donate->old_rec_buf);
} }
...@@ -206,8 +205,8 @@ btr_pcur_restore_position( ...@@ -206,8 +205,8 @@ btr_pcur_restore_position(
mem_heap_t* heap; mem_heap_t* heap;
if (UNIV_UNLIKELY(cursor->old_stored != BTR_PCUR_OLD_STORED) if (UNIV_UNLIKELY(cursor->old_stored != BTR_PCUR_OLD_STORED)
|| UNIV_UNLIKELY(cursor->pos_state != BTR_PCUR_WAS_POSITIONED || UNIV_UNLIKELY(cursor->pos_state != BTR_PCUR_WAS_POSITIONED
&& cursor->pos_state != BTR_PCUR_IS_POSITIONED)) { && cursor->pos_state != BTR_PCUR_IS_POSITIONED)) {
ut_print_buf(stderr, cursor, sizeof(btr_pcur_t)); ut_print_buf(stderr, cursor, sizeof(btr_pcur_t));
if (cursor->trx_if_known) { if (cursor->trx_if_known) {
trx_print(stderr, cursor->trx_if_known, 0); trx_print(stderr, cursor->trx_if_known, 0);
...@@ -216,19 +215,20 @@ btr_pcur_restore_position( ...@@ -216,19 +215,20 @@ btr_pcur_restore_position(
ut_error; ut_error;
} }
if (UNIV_UNLIKELY(cursor->rel_pos == BTR_PCUR_AFTER_LAST_IN_TREE if (UNIV_UNLIKELY
|| cursor->rel_pos == BTR_PCUR_BEFORE_FIRST_IN_TREE)) { (cursor->rel_pos == BTR_PCUR_AFTER_LAST_IN_TREE
|| cursor->rel_pos == BTR_PCUR_BEFORE_FIRST_IN_TREE)) {
/* In these cases we do not try an optimistic restoration, /* In these cases we do not try an optimistic restoration,
but always do a search */ but always do a search */
btr_cur_open_at_index_side( btr_cur_open_at_index_side
cursor->rel_pos == BTR_PCUR_BEFORE_FIRST_IN_TREE, (cursor->rel_pos == BTR_PCUR_BEFORE_FIRST_IN_TREE,
btr_pcur_get_btr_cur(cursor)->index, latch_mode, btr_pcur_get_btr_cur(cursor)->index, latch_mode,
btr_pcur_get_btr_cur(cursor), mtr); btr_pcur_get_btr_cur(cursor), mtr);
cursor->block_when_stored = cursor->block_when_stored
buf_block_align(btr_pcur_get_page(cursor)); = buf_block_align(btr_pcur_get_page(cursor));
return(FALSE); return(FALSE);
} }
...@@ -239,12 +239,13 @@ btr_pcur_restore_position( ...@@ -239,12 +239,13 @@ btr_pcur_restore_position(
page = btr_cur_get_page(btr_pcur_get_btr_cur(cursor)); page = btr_cur_get_page(btr_pcur_get_btr_cur(cursor));
if (UNIV_LIKELY(latch_mode == BTR_SEARCH_LEAF) if (UNIV_LIKELY(latch_mode == BTR_SEARCH_LEAF)
|| UNIV_LIKELY(latch_mode == BTR_MODIFY_LEAF)) { || UNIV_LIKELY(latch_mode == BTR_MODIFY_LEAF)) {
/* Try optimistic restoration */ /* Try optimistic restoration */
if (UNIV_LIKELY(buf_page_optimistic_get(latch_mode, if (UNIV_LIKELY
cursor->block_when_stored, page, (buf_page_optimistic_get(latch_mode,
cursor->modify_clock, mtr))) { cursor->block_when_stored, page,
cursor->modify_clock, mtr))) {
cursor->pos_state = BTR_PCUR_IS_POSITIONED; cursor->pos_state = BTR_PCUR_IS_POSITIONED;
#ifdef UNIV_SYNC_DEBUG #ifdef UNIV_SYNC_DEBUG
buf_page_dbg_add_level(page, SYNC_TREE_NODE); buf_page_dbg_add_level(page, SYNC_TREE_NODE);
...@@ -262,14 +263,16 @@ btr_pcur_restore_position( ...@@ -262,14 +263,16 @@ btr_pcur_restore_position(
index = btr_pcur_get_btr_cur(cursor)->index; index = btr_pcur_get_btr_cur(cursor)->index;
heap = mem_heap_create(256); heap = mem_heap_create(256);
offsets1 = rec_get_offsets(cursor->old_rec, offsets1 = rec_get_offsets
index, NULL, (cursor->old_rec, index, NULL,
cursor->old_n_fields, &heap); cursor->old_n_fields, &heap);
offsets2 = rec_get_offsets(rec, index, NULL, offsets2 = rec_get_offsets
cursor->old_n_fields, &heap); (rec, index, NULL,
cursor->old_n_fields, &heap);
ut_ad(cmp_rec_rec(cursor->old_rec,
rec, offsets1, offsets2, index) == 0); ut_ad(!cmp_rec_rec(cursor->old_rec,
rec, offsets1, offsets2,
index));
mem_heap_free(heap); mem_heap_free(heap);
#endif /* UNIV_DEBUG */ #endif /* UNIV_DEBUG */
return(TRUE); return(TRUE);
...@@ -285,7 +288,7 @@ btr_pcur_restore_position( ...@@ -285,7 +288,7 @@ btr_pcur_restore_position(
tree = btr_cur_get_tree(btr_pcur_get_btr_cur(cursor)); tree = btr_cur_get_tree(btr_pcur_get_btr_cur(cursor));
tuple = dict_tree_build_data_tuple(tree, cursor->old_rec, tuple = dict_tree_build_data_tuple(tree, cursor->old_rec,
cursor->old_n_fields, heap); cursor->old_n_fields, heap);
/* Save the old search mode of the cursor */ /* Save the old search mode of the cursor */
old_mode = cursor->search_mode; old_mode = cursor->search_mode;
...@@ -300,26 +303,27 @@ btr_pcur_restore_position( ...@@ -300,26 +303,27 @@ btr_pcur_restore_position(
} }
btr_pcur_open_with_no_init(btr_pcur_get_btr_cur(cursor)->index, tuple, btr_pcur_open_with_no_init(btr_pcur_get_btr_cur(cursor)->index, tuple,
mode, latch_mode, cursor, 0, mtr); mode, latch_mode, cursor, 0, mtr);
/* Restore the old search mode */ /* Restore the old search mode */
cursor->search_mode = old_mode; cursor->search_mode = old_mode;
if (cursor->rel_pos == BTR_PCUR_ON if (cursor->rel_pos == BTR_PCUR_ON
&& btr_pcur_is_on_user_rec(cursor, mtr) && btr_pcur_is_on_user_rec(cursor, mtr)
&& 0 == cmp_dtuple_rec(tuple, btr_pcur_get_rec(cursor), && 0 == cmp_dtuple_rec(tuple, btr_pcur_get_rec(cursor),
rec_get_offsets(btr_pcur_get_rec(cursor), rec_get_offsets
btr_pcur_get_btr_cur(cursor)->index, (btr_pcur_get_rec(cursor),
NULL, ULINT_UNDEFINED, &heap))) { btr_pcur_get_btr_cur(cursor)->index,
NULL, ULINT_UNDEFINED, &heap))) {
/* We have to store the NEW value for the modify clock, since /* We have to store the NEW value for the modify clock, since
the cursor can now be on a different page! But we can retain the cursor can now be on a different page! But we can retain
the value of old_rec */ the value of old_rec */
cursor->block_when_stored = cursor->block_when_stored = buf_block_align
buf_block_align(btr_pcur_get_page(cursor)); (btr_pcur_get_page(cursor));
cursor->modify_clock = cursor->modify_clock = buf_block_get_modify_clock
buf_block_get_modify_clock(cursor->block_when_stored); (cursor->block_when_stored);
cursor->old_stored = BTR_PCUR_OLD_STORED; cursor->old_stored = BTR_PCUR_OLD_STORED;
mem_heap_free(heap); mem_heap_free(heap);
...@@ -467,14 +471,14 @@ btr_pcur_move_backward_from_page( ...@@ -467,14 +471,14 @@ btr_pcur_move_backward_from_page(
space = buf_frame_get_space_id(page); space = buf_frame_get_space_id(page);
if (btr_pcur_is_before_first_on_page(cursor, mtr) if (btr_pcur_is_before_first_on_page(cursor, mtr)
&& (prev_page_no != FIL_NULL)) { && (prev_page_no != FIL_NULL)) {
prev_page = btr_pcur_get_btr_cur(cursor)->left_page; prev_page = btr_pcur_get_btr_cur(cursor)->left_page;
btr_leaf_page_release(page, latch_mode, mtr); btr_leaf_page_release(page, latch_mode, mtr);
page_cur_set_after_last(prev_page, page_cur_set_after_last(prev_page,
btr_pcur_get_page_cur(cursor)); btr_pcur_get_page_cur(cursor));
} else if (prev_page_no != FIL_NULL) { } else if (prev_page_no != FIL_NULL) {
/* The repositioned cursor did not end on an infimum record on /* The repositioned cursor did not end on an infimum record on
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -67,9 +67,9 @@ dtype_get_at_most_n_mbchars( ...@@ -67,9 +67,9 @@ dtype_get_at_most_n_mbchars(
if (dtype->mbminlen != dtype->mbmaxlen) { if (dtype->mbminlen != dtype->mbmaxlen) {
ut_a(!(prefix_len % dtype->mbmaxlen)); ut_a(!(prefix_len % dtype->mbmaxlen));
return(innobase_get_at_most_n_mbchars( return(innobase_get_at_most_n_mbchars
dtype_get_charset_coll(dtype->prtype), (dtype_get_charset_coll(dtype->prtype),
prefix_len, data_len, str)); prefix_len, data_len, str));
} }
if (prefix_len < data_len) { if (prefix_len < data_len) {
...@@ -98,8 +98,8 @@ dtype_is_string_type( ...@@ -98,8 +98,8 @@ dtype_is_string_type(
ulint mtype) /* in: InnoDB main data type code: DATA_CHAR, ... */ ulint mtype) /* in: InnoDB main data type code: DATA_CHAR, ... */
{ {
if (mtype <= DATA_BLOB if (mtype <= DATA_BLOB
|| mtype == DATA_MYSQL || mtype == DATA_MYSQL
|| mtype == DATA_VARMYSQL) { || mtype == DATA_VARMYSQL) {
return(TRUE); return(TRUE);
} }
...@@ -120,8 +120,8 @@ dtype_is_binary_string_type( ...@@ -120,8 +120,8 @@ dtype_is_binary_string_type(
ulint prtype) /* in: precise type */ ulint prtype) /* in: precise type */
{ {
if ((mtype == DATA_FIXBINARY) if ((mtype == DATA_FIXBINARY)
|| (mtype == DATA_BINARY) || (mtype == DATA_BINARY)
|| (mtype == DATA_BLOB && (prtype & DATA_BINARY_TYPE))) { || (mtype == DATA_BLOB && (prtype & DATA_BINARY_TYPE))) {
return(TRUE); return(TRUE);
} }
...@@ -143,7 +143,7 @@ dtype_is_non_binary_string_type( ...@@ -143,7 +143,7 @@ dtype_is_non_binary_string_type(
ulint prtype) /* in: precise type */ ulint prtype) /* in: precise type */
{ {
if (dtype_is_string_type(mtype) == TRUE if (dtype_is_string_type(mtype) == TRUE
&& dtype_is_binary_string_type(mtype, prtype) == FALSE) { && dtype_is_binary_string_type(mtype, prtype) == FALSE) {
return(TRUE); return(TRUE);
} }
...@@ -258,9 +258,9 @@ dtype_print( ...@@ -258,9 +258,9 @@ dtype_print(
len = type->len; len = type->len;
if ((type->mtype == DATA_SYS) if ((type->mtype == DATA_SYS)
|| (type->mtype == DATA_VARCHAR) || (type->mtype == DATA_VARCHAR)
|| (type->mtype == DATA_CHAR)) { || (type->mtype == DATA_CHAR)) {
putc(' ', stderr); putc(' ', stderr);
if (prtype == DATA_ROW_ID) { if (prtype == DATA_ROW_ID) {
fputs("DATA_ROW_ID", stderr); fputs("DATA_ROW_ID", stderr);
len = DATA_ROW_ID_LEN; len = DATA_ROW_ID_LEN;
...@@ -317,9 +317,9 @@ dtype_get_max_size( ...@@ -317,9 +317,9 @@ dtype_get_max_size(
case DATA_BINARY: case DATA_BINARY:
case DATA_DECIMAL: case DATA_DECIMAL:
case DATA_VARMYSQL: case DATA_VARMYSQL:
return(type->len); return(type->len);
case DATA_BLOB: case DATA_BLOB:
return(ULINT_MAX); return(ULINT_MAX);
default: default:
ut_error; ut_error;
} }
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -65,7 +65,7 @@ dict_mem_table_create( ...@@ -65,7 +65,7 @@ dict_mem_table_create(
table->cached = FALSE; table->cached = FALSE;
table->cols = mem_heap_alloc(heap, (n_cols + DATA_N_SYS_COLS) table->cols = mem_heap_alloc(heap, (n_cols + DATA_N_SYS_COLS)
* sizeof(dict_col_t)); * sizeof(dict_col_t));
UT_LIST_INIT(table->indexes); UT_LIST_INIT(table->indexes);
table->auto_inc_lock = mem_heap_alloc(heap, lock_get_size()); table->auto_inc_lock = mem_heap_alloc(heap, lock_get_size());
...@@ -177,9 +177,9 @@ dict_mem_index_create( ...@@ -177,9 +177,9 @@ dict_mem_index_create(
index->n_def = index->n_nullable = 0; index->n_def = index->n_nullable = 0;
index->n_fields = n_fields; index->n_fields = n_fields;
index->fields = mem_heap_alloc(heap, 1 + n_fields index->fields = mem_heap_alloc(heap, 1 + n_fields
* sizeof(dict_field_t)); * sizeof(dict_field_t));
/* The '1 +' above prevents allocation /* The '1 +' above prevents allocation
of an empty mem block */ of an empty mem block */
index->stat_n_diff_key_vals = NULL; index->stat_n_diff_key_vals = NULL;
index->cached = FALSE; index->cached = FALSE;
......
This diff is collapsed.
...@@ -51,7 +51,8 @@ if_step( ...@@ -51,7 +51,8 @@ if_step(
for (;;) { for (;;) {
eval_exp(elsif_node->cond); eval_exp(elsif_node->cond);
if (eval_node_get_ibool_val(elsif_node->cond)) { if (eval_node_get_ibool_val
(elsif_node->cond)) {
/* The condition evaluated to TRUE: /* The condition evaluated to TRUE:
start execution from the first start execution from the first
...@@ -104,7 +105,7 @@ while_step( ...@@ -104,7 +105,7 @@ while_step(
ut_ad(que_node_get_type(node) == QUE_NODE_WHILE); ut_ad(que_node_get_type(node) == QUE_NODE_WHILE);
ut_ad((thr->prev_node == que_node_get_parent(node)) ut_ad((thr->prev_node == que_node_get_parent(node))
|| (que_node_get_next(thr->prev_node) == NULL)); || (que_node_get_next(thr->prev_node) == NULL));
/* Evaluate the condition */ /* Evaluate the condition */
...@@ -192,8 +193,8 @@ for_step( ...@@ -192,8 +193,8 @@ for_step(
loop_var_value = eval_node_get_int_val(node->loop_start_limit); loop_var_value = eval_node_get_int_val(node->loop_start_limit);
node->loop_end_value = eval_node_get_int_val( node->loop_end_value
node->loop_end_limit); = eval_node_get_int_val(node->loop_end_limit);
} }
/* Check if we should do another loop */ /* Check if we should do another loop */
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -583,9 +583,11 @@ to know struct size! */ ...@@ -583,9 +583,11 @@ to know struct size! */
struct btr_cur_struct { struct btr_cur_struct {
dict_index_t* index; /* index where positioned */ dict_index_t* index; /* index where positioned */
page_cur_t page_cur; /* page cursor */ page_cur_t page_cur; /* page cursor */
page_t* left_page; /* this field is used to store a pointer page_t* left_page; /* this field is used to store
to the left neighbor page, in the cases a pointer to the left neighbor
BTR_SEARCH_PREV and BTR_MODIFY_PREV */ page, in the cases
BTR_SEARCH_PREV and
BTR_MODIFY_PREV */
/*------------------------------*/ /*------------------------------*/
que_thr_t* thr; /* this field is only used when que_thr_t* thr; /* this field is only used when
btr_cur_search_... is called for an btr_cur_search_... is called for an
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment