mariadb/mysql-test/include/innodb_trx_weight.inc
unknown 32b5fb7323 Apply the following innodb-5.1-* snapshots: ss1489, ss1496, ss1550, ss1569.
After applying the snapshots, ensure that code conforms to the final version
of WL 3914.

It is signficant that, after these changes, InnoDB does not define MYSQL_SERVER,
and can be built as an independent storage engine plugin.

Fixes:
Bug#9709:  InnoDB inconsistensy causes "Operating System Error 32/33"
Bug#18828: If InnoDB runs out of undo slots, it returns misleading 'table is full'
Bug#20090: InnoDB: Error: trying to declare trx to enter InnoDB
Bug#20352: Make ibuf_contract_for_n_pages tunable
Bug#21101: Wrong error on exceeding max row size for InnoDB table
Bug#21293: Deadlock detection prefers to kill long running FOR UPDATE queries
Bug#22819: SHOW INNODB STATUS crashes the server with an assertion failure under high load
Bug#25078: Make the replication thread to ignore innodb_thread_concurrency
Bug#25645: Assertion failure in file srv0srv.c
Bug#28138: indexing column prefixes produces corruption in InnoDB


BitKeeper/deleted/.del-Makefile.am~55504c43d99979e4:
  Delete: storage/innobase/buf/Makefile.am
BitKeeper/deleted/.del-Makefile.am~79bb55303929b560:
  Delete: storage/innobase/dict/Makefile.am
BitKeeper/deleted/.del-Makefile.am~7cd88e5f9a8d7ce8:
  Delete: storage/innobase/data/Makefile.am
BitKeeper/deleted/.del-Makefile.am~e19a1fb29b1fe527:
  Delete: storage/innobase/btr/Makefile.am
BitKeeper/deleted/.del-Makefile.am~4ae65b009d41d1d:
  Delete: storage/innobase/eval/Makefile.am
BitKeeper/deleted/.del-Makefile.am~679131a02af3f6fb:
  Delete: storage/innobase/fsp/Makefile.am
BitKeeper/deleted/.del-Makefile.am~6acac9ae30eabdb3:
  Delete: storage/innobase/dyn/Makefile.am
BitKeeper/deleted/.del-Makefile.am~a5e6b4385717fcb7:
  Delete: storage/innobase/fil/Makefile.am
BitKeeper/deleted/.del-Makefile.am~11d601934b49c19:
  Delete: storage/innobase/fut/Makefile.am
BitKeeper/deleted/.del-Makefile.am~5aab37bf3b6c430:
  Delete: storage/innobase/ibuf/Makefile.am
BitKeeper/deleted/.del-Makefile.am~af2d719bb6e66986:
  Delete: storage/innobase/handler/Makefile.am
BitKeeper/deleted/.del-Makefile.am~f0dbbc7a78648e18:
  Delete: storage/innobase/ha/Makefile.am
BitKeeper/deleted/.del-Makefile.am~41684e54a5b0d26a:
  Delete: storage/innobase/log/Makefile.am
BitKeeper/deleted/.del-Makefile.am~edd95d7290ddeff3:
  Delete: storage/innobase/lock/Makefile.am
BitKeeper/deleted/.del-Makefile.i:
  Delete: storage/innobase/include/Makefile.i
BitKeeper/deleted/.del-Makefile.am~2a6ccdba41b591a3:
  Delete: storage/innobase/mach/Makefile.am
BitKeeper/deleted/.del-Makefile.am~2bd35bda856342:
  Delete: storage/innobase/os/Makefile.am
BitKeeper/deleted/.del-Makefile.am~8448688c5ab92132:
  Delete: storage/innobase/mem/Makefile.am
BitKeeper/deleted/.del-Makefile.am~b5a7a8cfa711b6de:
  Delete: storage/innobase/mtr/Makefile.am
BitKeeper/deleted/.del-Makefile.am~2cee8a309eb8eee2:
  Delete: storage/innobase/page/Makefile.am
BitKeeper/deleted/.del-Makefile.am~3d0553f8aa9c456b:
  Delete: storage/innobase/read/Makefile.am
BitKeeper/deleted/.del-Makefile.am~7b0c4abae6684f8c:
  Delete: storage/innobase/pars/Makefile.am
BitKeeper/deleted/.del-Makefile.am~d0e0dd55cbd413f0:
  Delete: storage/innobase/que/Makefile.am
BitKeeper/deleted/.del-Makefile.am~20a219ccf7825d65:
  Delete: storage/innobase/row/Makefile.am
BitKeeper/deleted/.del-Makefile.am~37bdfb2973b2442b:
  Delete: storage/innobase/rem/Makefile.am
BitKeeper/deleted/.del-Makefile.am~557098c4e5c01ee2:
  Delete: storage/innobase/thr/Makefile.am
BitKeeper/deleted/.del-Makefile.am~fdfe12f48c2499af:
  Delete: storage/innobase/sync/Makefile.am
BitKeeper/deleted/.del-Makefile.am~feb2280a52035d8d:
  Delete: storage/innobase/srv/Makefile.am
BitKeeper/deleted/.del-Makefile.am~456d34c4816dbda4:
  Delete: storage/innobase/ut/Makefile.am
BitKeeper/deleted/.del-Makefile.am~5ec2ef0d2c35e138:
  Delete: storage/innobase/usr/Makefile.am
BitKeeper/deleted/.del-Makefile.am~d25c456e48393313:
  Delete: storage/innobase/trx/Makefile.am
mysql-test/r/innodb.result:
  Apply the following innodb-5.1-* snapshots:  ss1489, ss1496, ss1550, ss1569.
  
  Revision r1421:
  Fix the innodb test by shifting some of the contents of the .result file.
  
  Approved by:	Marko
  
  
  Revision r1422:
  Fix for Bug#21101 - returns wrong error message when table column
  defs exceed the max row size.
  
  The fix returns a more appropriate error message. Add a test case to
  innodb.test and expected output to innodb.result.
mysql-test/t/innodb.test:
  Apply the following innodb-5.1-* snapshots:  ss1489, ss1496, ss1550, ss1569.
  
  Revision r1422:
  Fix for Bug#21101 - returns wrong error message when table column
  defs exceed the max row size.
  
  The fix returns a more appropriate error message. Add a test case to
  innodb.test and expected output to innodb.result.
storage/innobase/btr/btr0btr.c:
  Apply the following innodb-5.1-* snapshots:  ss1489, ss1496, ss1550, ss1569.
  
  Revision r1546:
  When buffering an insert to a prefix index of a variable-length column,
  do not incorrectly mark the column as fixed-length.  (Bug#28138)
  
  ibuf_entry_build(): Instead of prefix_len, pass fixed_len to
  dtype_new_store_for_order_and_null_size().  Add debug assertions.
  
  btr_index_rec_validate(): Correct a comment about prefix indexes.
  
  rec_get_converted_size_new(), rec_convert_dtuple_to_rec_new(): Add
  debug assertions and comments.
  
  dict_col_type_assert_equal(): New debug function.
storage/innobase/data/data0data.c:
  Apply the following innodb-5.1-* snapshots:  ss1489, ss1496, ss1550, ss1569.
  
  Revision r1490:
  Add #include <ctype.h>.  Apparently, this header is no longer included by
  the common headers.  This may be related to WL#2936
  (pluggable storage engines).
storage/innobase/data/data0type.c:
  Apply the following innodb-5.1-* snapshots:  ss1489, ss1496, ss1550, ss1569.
  
  Revision r1513:
  Split ut_a(a && b [&& c...]); into separate ut_a(a); ut_a(b); [ut_a(c); ...].
  This makes it possible to see which expression was false by looking at the
  error message.
  
  Approved by:	Marko
storage/innobase/dict/dict0crea.c:
  Apply the following innodb-5.1-* snapshots:  ss1489, ss1496, ss1550, ss1569.
  
  Revision r1423:
  Fix for Bug#18828. Return DB_TOO_MANY_CONCURRENT_TRXS when we run out
  of UNDO slots in the rollback segment. This is a partial fix since the
  MySQL error code requested to properly report the error condition back
  to the client has not yet materialized. Currently we have #ifdef'd the
  error code translation in ha_innodb.cc. This will have to be changed
  as and when MySQl add the new requested code or an equivalent code
  that we can then use.
  
  Given the above, currently we will get the old behaviour, not the "fixed"
  and intended behaviour.
storage/innobase/dict/dict0dict.c:
  Apply the following innodb-5.1-* snapshots:  ss1489, ss1496, ss1550, ss1569.
  
  Revision r1490:
  Add #include <ctype.h>.  Apparently, this header is no longer included by
  the common headers.  This may be related to WL#2936
  (pluggable storage engines).
  
  
  Revision r1513:
  Split ut_a(a && b [&& c...]); into separate ut_a(a); ut_a(b); [ut_a(c); ...].
  This makes it possible to see which expression was false by looking at the
  error message.
  
  Approved by:	Marko
  
  
  Revision r1528:
  Define an auxiliary macro UT_BITS_IN_BYTES() and use it where possible.
  
  
  Revision r1529:
  Revert r799, which was supposed to prevent similar cases as Bug#21638.
  In reality, the patch breaks the handling of prefix indexes of
  variable-length columns in ROW_FORMAT=COMPACT.  Reverting the patch
  is only a partial fix of Bug#28138.
  
  
  Revision r1535:
  Document that DICT_MAX_INDEX_COL_LEN must not be changed.
storage/innobase/fsp/fsp0fsp.c:
  Apply the following innodb-5.1-* snapshots:  ss1489, ss1496, ss1550, ss1569.
  
  Revision r1513:
  Split ut_a(a && b [&& c...]); into separate ut_a(a); ut_a(b); [ut_a(c); ...].
  This makes it possible to see which expression was false by looking at the
  error message.
  
  Approved by:	Marko
  
  
  Revision r1528:
  Define an auxiliary macro UT_BITS_IN_BYTES() and use it where possible.
storage/innobase/ibuf/ibuf0ibuf.c:
  Apply the following innodb-5.1-* snapshots:  ss1489, ss1496, ss1550, ss1569.
  
  Revision r1420:
  Output to the error log information about the limitations of
  UNIV_IBUF_DEBUG.
  
  innobase_start_or_create_for_mysql(): Note that crash recovery is broken
  when UNIV_IBUF_DEBUG is defined.
  
  ibuf_counts[]: Make this a two-dimensional array.  No need to allocate
  anything from the heap.  Eliminate ibuf_counts_inited, as the array
  will be zero-filled by the runtime environment.
  
  ibuf_count_check(): New function, to print out an explanation before
  assertion failure.
  
  
  Revision r1528:
  Define an auxiliary macro UT_BITS_IN_BYTES() and use it where possible.
  
  
  Revision r1546:
  When buffering an insert to a prefix index of a variable-length column,
  do not incorrectly mark the column as fixed-length.  (Bug#28138)
  
  ibuf_entry_build(): Instead of prefix_len, pass fixed_len to
  dtype_new_store_for_order_and_null_size().  Add debug assertions.
  
  btr_index_rec_validate(): Correct a comment about prefix indexes.
  
  rec_get_converted_size_new(), rec_convert_dtuple_to_rec_new(): Add
  debug assertions and comments.
  
  dict_col_type_assert_equal(): New debug function.
storage/innobase/include/db0err.h:
  Apply the following innodb-5.1-* snapshots:  ss1489, ss1496, ss1550, ss1569.
  
  Revision r1423:
  Fix for Bug#18828. Return DB_TOO_MANY_CONCURRENT_TRXS when we run out
  of UNDO slots in the rollback segment. This is a partial fix since the
  MySQL error code requested to properly report the error condition back
  to the client has not yet materialized. Currently we have #ifdef'd the
  error code translation in ha_innodb.cc. This will have to be changed
  as and when MySQl add the new requested code or an equivalent code
  that we can then use.
  
  Given the above, currently we will get the old behaviour, not the "fixed"
  and intended behaviour.
storage/innobase/include/dict0dict.h:
  Apply the following innodb-5.1-* snapshots:  ss1489, ss1496, ss1550, ss1569.
  
  Revision r1546:
  When buffering an insert to a prefix index of a variable-length column,
  do not incorrectly mark the column as fixed-length.  (Bug#28138)
  
  ibuf_entry_build(): Instead of prefix_len, pass fixed_len to
  dtype_new_store_for_order_and_null_size().  Add debug assertions.
  
  btr_index_rec_validate(): Correct a comment about prefix indexes.
  
  rec_get_converted_size_new(), rec_convert_dtuple_to_rec_new(): Add
  debug assertions and comments.
  
  dict_col_type_assert_equal(): New debug function.
storage/innobase/include/dict0dict.ic:
  Apply the following innodb-5.1-* snapshots:  ss1489, ss1496, ss1550, ss1569.
  
  Revision r1546:
  When buffering an insert to a prefix index of a variable-length column,
  do not incorrectly mark the column as fixed-length.  (Bug#28138)
  
  ibuf_entry_build(): Instead of prefix_len, pass fixed_len to
  dtype_new_store_for_order_and_null_size().  Add debug assertions.
  
  btr_index_rec_validate(): Correct a comment about prefix indexes.
  
  rec_get_converted_size_new(), rec_convert_dtuple_to_rec_new(): Add
  debug assertions and comments.
  
  dict_col_type_assert_equal(): New debug function.
storage/innobase/include/dict0mem.h:
  Apply the following innodb-5.1-* snapshots:  ss1489, ss1496, ss1550, ss1569.
  
  Revision r1535:
  Document that DICT_MAX_INDEX_COL_LEN must not be changed.
  
  
  Revision r1536:
  Change the comment to a more appropriate one. Discussed with Heikki on IM.
  
  Approved by:	Heikki
storage/innobase/include/ha_prototypes.h:
  Apply the following innodb-5.1-* snapshots:  ss1489, ss1496, ss1550, ss1569.
  
  Revision r1482:
  Fix Bug#25078 by always letting the replication thread on the slave
  server to enter InnoDB. This can be made further customizable by the
  user if we introduce a new config parameter. This will wait until
  config parameters can be easily added.
  
  Approved by:	Marko
  
  
  Revision r1501:
  Fix Bug#21293: Consider transactions that had edited non-transactional
  tables heavier than ones that had not. This helps killing the "right"
  transaction in case of a deadlock.
  
  Approved by:	Heikki
storage/innobase/include/os0file.h:
  Apply the following innodb-5.1-* snapshots:  ss1489, ss1496, ss1550, ss1569.
  
  Revision r1431:
  Fix Bug#9709 by retrying (forever) if ERROR_SHARING_VIOLATION or
  ERROR_LOCK_VIOLATION is encountered during file operation.
  This is caused by backup software, so InnoDB should retry while the backup
  software is done with the file.
  
  Approved by:	Heikki
storage/innobase/include/rem0rec.ic:
  Apply the following innodb-5.1-* snapshots:  ss1489, ss1496, ss1550, ss1569.
  
  Revision r1569:
  Fix some in:/out: comments.
  
  Approved by:	Marko
storage/innobase/include/row0mysql.h:
  Apply the following innodb-5.1-* snapshots:  ss1489, ss1496, ss1550, ss1569.
  
  Revision r1422:
  Fix for Bug#21101 - returns wrong error message when table column
  defs exceed the max row size.
  
  The fix returns a more appropriate error message. Add a test case to
  innodb.test and expected output to innodb.result.
storage/innobase/include/trx0trx.h:
  Apply the following innodb-5.1-* snapshots:  ss1489, ss1496, ss1550, ss1569.
  
  Revision r1462:
  Fix typo in comment.
  
  
  Revision r1486:
  Improve the comment for trx_struct::undo_no.
  
  Suggested by:	Heikki
  
  
  Revision r1488:
  Make InnoDB pluggable.  That is, merge the modifications from MySQL WL#2936
  and adapt some things.
  
  Note that ha_innodb.cc depends on mysql_tmpfile() being declared in
  <mysql/plugin.h>.  Until the function is declared there, you can
  uncomment the buggy definition of mysql_tmpfile in ha_innodb.cc.
  
  Remove storage/innobase/*/Makefile.am.  The whole compilation is driven by
  storage/innobase/Makefile.am and storage/innobase/plug.in.
  
  plug.in: Declare InnoDB as a dynamic plugin.
  
  ha_innodb.h: Remove the declarations of many global variables.  The variables
  are no longer directly referenced outside of storage/innobase.
  
  trx_t: Add the field trx->duplicates.
  
  trx_create(): Initialize the fields trx->active_trans and trx->duplicates.
  
  innobase_query_is_update(): Remove.  Consult trx->duplicates instead.
  
  
  Revision r1497:
  Add the number of locks acquired by a transaction to its weight when
  choosing the lightest transaction to kill when a deadlock occurs.
  This fixes Bug#21293 partially.
  
  Approved by:	Heikki
  
  
  
  Revision r1501:
  Fix Bug#21293: Consider transactions that had edited non-transactional
  tables heavier than ones that had not. This helps killing the "right"
  transaction in case of a deadlock.
  
  Approved by:	Heikki
storage/innobase/include/trx0undo.h:
  Apply the following innodb-5.1-* snapshots:  ss1489, ss1496, ss1550, ss1569.
  
  Revision r1423:
  Fix for Bug#18828. Return DB_TOO_MANY_CONCURRENT_TRXS when we run out
  of UNDO slots in the rollback segment. This is a partial fix since the
  MySQL error code requested to properly report the error condition back
  to the client has not yet materialized. Currently we have #ifdef'd the
  error code translation in ha_innodb.cc. This will have to be changed
  as and when MySQl add the new requested code or an equivalent code
  that we can then use.
  
  Given the above, currently we will get the old behaviour, not the "fixed"
  and intended behaviour.
storage/innobase/include/ut0ut.h:
  Apply the following innodb-5.1-* snapshots:  ss1489, ss1496, ss1550, ss1569.
  
  Revision r1528:
  Define an auxiliary macro UT_BITS_IN_BYTES() and use it where possible.
storage/innobase/lock/lock0lock.c:
  Apply the following innodb-5.1-* snapshots:  ss1489, ss1496, ss1550, ss1569.
  
  Revision r1457:
  Fix Bug#22819, remove assertion. (http://bugs.mysql.com/bug.php?id=22819)
  
  
  Revision r1497:
  Add the number of locks acquired by a transaction to its weight when
  choosing the lightest transaction to kill when a deadlock occurs.
  This fixes Bug#21293 partially.
  
  Approved by:	Heikki
  
  
  
  Revision r1513:
  Split ut_a(a && b [&& c...]); into separate ut_a(a); ut_a(b); [ut_a(c); ...].
  This makes it possible to see which expression was false by looking at the
  error message.
  
  Approved by:	Marko
storage/innobase/log/log0log.c:
  Apply the following innodb-5.1-* snapshots:  ss1489, ss1496, ss1550, ss1569.
  
  Revision r1521:
  Forward port r1520 from branches/5.0
  
  Patch to allow monitor threads to stop before proceeding with normal shutdown. 
  Also have a separate time counter for tablespace monitor.
  
  reviewed by: Heikki
  
  
  Revision r1524:
  Undo bad space formatting introduced in earlier commit r1521
  
  spotted by: Marko
  
  
  Revision r1533:
  logs_empty_and_mark_files_at_shutdown(): Remove trailing whitespace that
  was added in r1521.
storage/innobase/os/os0file.c:
  Apply the following innodb-5.1-* snapshots:  ss1489, ss1496, ss1550, ss1569.
  
  Revision r1431:
  Fix Bug#9709 by retrying (forever) if ERROR_SHARING_VIOLATION or
  ERROR_LOCK_VIOLATION is encountered during file operation.
  This is caused by backup software, so InnoDB should retry while the backup
  software is done with the file.
  
  Approved by:	Heikki
storage/innobase/rem/rem0rec.c:
  Apply the following innodb-5.1-* snapshots:  ss1489, ss1496, ss1550, ss1569.
  
  Revision r1528:
  Define an auxiliary macro UT_BITS_IN_BYTES() and use it where possible.
  
  
  Revision r1531:
  rec_get_converted_size_new(): Simplify and move a debug assertion.
  
  
  Revision r1546:
  When buffering an insert to a prefix index of a variable-length column,
  do not incorrectly mark the column as fixed-length.  (Bug#28138)
  
  ibuf_entry_build(): Instead of prefix_len, pass fixed_len to
  dtype_new_store_for_order_and_null_size().  Add debug assertions.
  
  btr_index_rec_validate(): Correct a comment about prefix indexes.
  
  rec_get_converted_size_new(), rec_convert_dtuple_to_rec_new(): Add
  debug assertions and comments.
  
  dict_col_type_assert_equal(): New debug function.
  
  
  Revision r1555:
  rec_get_converted_size_new(): The total size of the infimum and supremum
  records in ROW_FORMAT=COMPACT is REC_N_NEW_EXTRA_BYTES + 8.  The
  REC_N_NEW_EXTRA_BYTES was accidentally omitted in r1546.  This function
  should never be called on those records, though.
  
  
  Revision r1569:
  Fix some in:/out: comments.
  
  Approved by:	Marko
storage/innobase/row/row0ins.c:
  Apply the following innodb-5.1-* snapshots:  ss1489, ss1496, ss1550, ss1569.
  
  Revision r1485:
  Minor cleanup.
  
  row_ins_check_foreign_constraint(), row_ins_scan_sec_index_for_duplicate():
  Make use of the predicates page_rec_is_infimum() and page_rec_is_supremum().
  
  
  Revision r1488:
  Make InnoDB pluggable.  That is, merge the modifications from MySQL WL#2936
  and adapt some things.
  
  Note that ha_innodb.cc depends on mysql_tmpfile() being declared in
  <mysql/plugin.h>.  Until the function is declared there, you can
  uncomment the buggy definition of mysql_tmpfile in ha_innodb.cc.
  
  Remove storage/innobase/*/Makefile.am.  The whole compilation is driven by
  storage/innobase/Makefile.am and storage/innobase/plug.in.
  
  plug.in: Declare InnoDB as a dynamic plugin.
  
  ha_innodb.h: Remove the declarations of many global variables.  The variables
  are no longer directly referenced outside of storage/innobase.
  
  trx_t: Add the field trx->duplicates.
  
  trx_create(): Initialize the fields trx->active_trans and trx->duplicates.
  
  innobase_query_is_update(): Remove.  Consult trx->duplicates instead.
  
  
  Revision r1513:
  Split ut_a(a && b [&& c...]); into separate ut_a(a); ut_a(b); [ut_a(c); ...].
  This makes it possible to see which expression was false by looking at the
  error message.
  
  Approved by:	Marko
storage/innobase/row/row0mysql.c:
  Apply the following innodb-5.1-* snapshots:  ss1489, ss1496, ss1550, ss1569.
  
  Revision r1422:
  Fix for Bug#21101 - returns wrong error message when table column
  defs exceed the max row size.
  
  The fix returns a more appropriate error message. Add a test case to
  innodb.test and expected output to innodb.result.
  
  
  Revision r1423:
  Fix for Bug#18828. Return DB_TOO_MANY_CONCURRENT_TRXS when we run out
  of UNDO slots in the rollback segment. This is a partial fix since the
  MySQL error code requested to properly report the error condition back
  to the client has not yet materialized. Currently we have #ifdef'd the
  error code translation in ha_innodb.cc. This will have to be changed
  as and when MySQl add the new requested code or an equivalent code
  that we can then use.
  
  Given the above, currently we will get the old behaviour, not the "fixed"
  and intended behaviour.
storage/innobase/row/row0row.c:
  Apply the following innodb-5.1-* snapshots:  ss1489, ss1496, ss1550, ss1569.
  
  Revision r1513:
  Split ut_a(a && b [&& c...]); into separate ut_a(a); ut_a(b); [ut_a(c); ...].
  This makes it possible to see which expression was false by looking at the
  error message.
  
  Approved by:	Marko
  
  
  Revision r1529:
  Revert r799, which was supposed to prevent similar cases as Bug#21638.
  In reality, the patch breaks the handling of prefix indexes of
  variable-length columns in ROW_FORMAT=COMPACT.  Reverting the patch
  is only a partial fix of Bug#28138.
storage/innobase/row/row0sel.c:
  Apply the following innodb-5.1-* snapshots:  ss1489, ss1496, ss1550, ss1569.
  
  Revision r1452:
  Fix phantom reads (http://bugs.mysql.com/27197) following Heikki's
  patch in the bug followup.
  
  Approved by:	Heikki
  
  
  
  Revision r1455:
  Reindent with tabs instead of spaces.
  
  Spotted by:	Marko
storage/innobase/srv/srv0srv.c:
  Apply the following innodb-5.1-* snapshots:  ss1489, ss1496, ss1550, ss1569.
  
  Revision r1424:
  Bug#20352. Added variable srv_insert_buffer_batch_size. We want to make
  this variable settable. Since the pluggable engine interface currently
  doesn't provide a usable mechanism, we will add the latter functionality
  once it's available.
  
  
  Revision r1426:
  Fix code indentation from r1424.
  
  
  Revision r1459:
  Fix typo in the comment.
  
  
  Revision r1482:
  Fix Bug#25078 by always letting the replication thread on the slave
  server to enter InnoDB. This can be made further customizable by the
  user if we introduce a new config parameter. This will wait until
  config parameters can be easily added.
  
  Approved by:	Marko
  
  
  Revision r1487:
  Fix typo in comment.
  
  Spotted by:	Marko
  
  
  Revision r1521:
  Forward port r1520 from branches/5.0
  
  Patch to allow monitor threads to stop before proceeding with normal shutdown. 
  Also have a separate time counter for tablespace monitor.
  
  reviewed by: Heikki
  
  
  Revision r1532:
  srv_lock_timeout_and_monitor_thread(): Correct the indentation that was
  broken in r1521.
  
  
  Revision r1553:
  Fix Bug#20090 as suggested in the bug followup by Heikki.
  
  Approved by:	Heikki
storage/innobase/srv/srv0start.c:
  Apply the following innodb-5.1-* snapshots:  ss1489, ss1496, ss1550, ss1569.
  
  Revision r1420:
  Output to the error log information about the limitations of
  UNIV_IBUF_DEBUG.
  
  innobase_start_or_create_for_mysql(): Note that crash recovery is broken
  when UNIV_IBUF_DEBUG is defined.
  
  ibuf_counts[]: Make this a two-dimensional array.  No need to allocate
  anything from the heap.  Eliminate ibuf_counts_inited, as the array
  will be zero-filled by the runtime environment.
  
  ibuf_count_check(): New function, to print out an explanation before
  assertion failure.
storage/innobase/sync/sync0arr.c:
  Apply the following innodb-5.1-* snapshots:  ss1489, ss1496, ss1550, ss1569.
  
  Revision r1513:
  Split ut_a(a && b [&& c...]); into separate ut_a(a); ut_a(b); [ut_a(c); ...].
  This makes it possible to see which expression was false by looking at the
  error message.
  
  Approved by:	Marko
storage/innobase/trx/trx0rec.c:
  Apply the following innodb-5.1-* snapshots:  ss1489, ss1496, ss1550, ss1569.
  
  Revision r1423:
  Fix for Bug#18828. Return DB_TOO_MANY_CONCURRENT_TRXS when we run out
  of UNDO slots in the rollback segment. This is a partial fix since the
  MySQL error code requested to properly report the error condition back
  to the client has not yet materialized. Currently we have #ifdef'd the
  error code translation in ha_innodb.cc. This will have to be changed
  as and when MySQl add the new requested code or an equivalent code
  that we can then use.
  
  Given the above, currently we will get the old behaviour, not the "fixed"
  and intended behaviour.
storage/innobase/trx/trx0trx.c:
  Apply the following innodb-5.1-* snapshots:  ss1489, ss1496, ss1550, ss1569.
  
  Revision r1488:
  Make InnoDB pluggable.  That is, merge the modifications from MySQL WL#2936
  and adapt some things.
  
  Note that ha_innodb.cc depends on mysql_tmpfile() being declared in
  <mysql/plugin.h>.  Until the function is declared there, you can
  uncomment the buggy definition of mysql_tmpfile in ha_innodb.cc.
  
  Remove storage/innobase/*/Makefile.am.  The whole compilation is driven by
  storage/innobase/Makefile.am and storage/innobase/plug.in.
  
  plug.in: Declare InnoDB as a dynamic plugin.
  
  ha_innodb.h: Remove the declarations of many global variables.  The variables
  are no longer directly referenced outside of storage/innobase.
  
  trx_t: Add the field trx->duplicates.
  
  trx_create(): Initialize the fields trx->active_trans and trx->duplicates.
  
  innobase_query_is_update(): Remove.  Consult trx->duplicates instead.
  
  
  Revision r1491:
  Fix typo in comment.
  
  
  Revision r1497:
  Add the number of locks acquired by a transaction to its weight when
  choosing the lightest transaction to kill when a deadlock occurs.
  This fixes Bug#21293 partially.
  
  Approved by:	Heikki
  
  
  
  Revision r1501:
  Fix Bug#21293: Consider transactions that had edited non-transactional
  tables heavier than ones that had not. This helps killing the "right"
  transaction in case of a deadlock.
  
  Approved by:	Heikki
  
  
  Revision r1522:
  trx0trx.c: Add missing #include "ha_prototypes.h".
storage/innobase/trx/trx0undo.c:
  Apply the following innodb-5.1-* snapshots:  ss1489, ss1496, ss1550, ss1569.
  
  Revision r1423:
  Fix for Bug#18828. Return DB_TOO_MANY_CONCURRENT_TRXS when we run out
  of UNDO slots in the rollback segment. This is a partial fix since the
  MySQL error code requested to properly report the error condition back
  to the client has not yet materialized. Currently we have #ifdef'd the
  error code translation in ha_innodb.cc. This will have to be changed
  as and when MySQl add the new requested code or an equivalent code
  that we can then use.
  
  Given the above, currently we will get the old behaviour, not the "fixed"
  and intended behaviour.
storage/innobase/ut/ut0ut.c:
  Apply the following innodb-5.1-* snapshots:  ss1489, ss1496, ss1550, ss1569.
  
  Revision r1490:
  Add #include <ctype.h>.  Apparently, this header is no longer included by
  the common headers.  This may be related to WL#2936
  (pluggable storage engines).
mysql-test/r/innodb_trx_weight.result:
  Apply the following innodb-5.1-* snapshots:  ss1489, ss1496, ss1550, ss1569.
  
  Revision r1498:
  Add a test about the behavior introduced in r1497.
  
  
  Revision r1501:
  Fix Bug#21293: Consider transactions that had edited non-transactional
  tables heavier than ones that had not. This helps killing the "right"
  transaction in case of a deadlock.
  
  Approved by:	Heikki
mysql-test/include/innodb_trx_weight.inc:
  Apply the following innodb-5.1-* snapshots:  ss1489, ss1496, ss1550, ss1569.
  
  Revision r1501:
  Fix Bug#21293: Consider transactions that had edited non-transactional
  tables heavier than ones that had not. This helps killing the "right"
  transaction in case of a deadlock.
  
  Approved by:	Heikki
  
  
  Revision r1556:
  mysql-test/innodb_trx_weight.inc: Add username root to the "connect" statement.
  The Unix user running mysql-test-run usually does not have any privileges
  on the MySQL test database.
mysql-test/t/innodb_trx_weight.test:
  Fixes after merging InnoDB snapshots.
  
  Revision r1498:
  Add a test about the behavior introduced in r1497.
  
  
  Revision r1501:
  Fix Bug#21293: Consider transactions that had edited non-transactional
  tables heavier than ones that had not. This helps killing the "right"
  transaction in case of a deadlock.
  
  Approved by:	Heikki
sql/sql_class.cc:
  Fixes after merging InnoDB snapshots.
storage/innobase/Makefile.am:
  Fixes after merging InnoDB snapshots.
  
  Revision r1488:
  Make InnoDB pluggable.  That is, merge the modifications from MySQL WL#2936
  and adapt some things.
  
  Note that ha_innodb.cc depends on mysql_tmpfile() being declared in
  <mysql/plugin.h>.  Until the function is declared there, you can
  uncomment the buggy definition of mysql_tmpfile in ha_innodb.cc.
  
  Remove storage/innobase/*/Makefile.am.  The whole compilation is driven by
  storage/innobase/Makefile.am and storage/innobase/plug.in.
  
  plug.in: Declare InnoDB as a dynamic plugin.
  
  ha_innodb.h: Remove the declarations of many global variables.  The variables
  are no longer directly referenced outside of storage/innobase.
  
  trx_t: Add the field trx->duplicates.
  
  trx_create(): Initialize the fields trx->active_trans and trx->duplicates.
  
  innobase_query_is_update(): Remove.  Consult trx->duplicates instead.
  
  
  Revision r1488:
  Make InnoDB pluggable.  That is, merge the modifications from MySQL WL#2936
  and adapt some things.
  
  Note that ha_innodb.cc depends on mysql_tmpfile() being declared in
  <mysql/plugin.h>.  Until the function is declared there, you can
  uncomment the buggy definition of mysql_tmpfile in ha_innodb.cc.
  
  Remove storage/innobase/*/Makefile.am.  The whole compilation is driven by
  storage/innobase/Makefile.am and storage/innobase/plug.in.
  
  plug.in: Declare InnoDB as a dynamic plugin.
  
  ha_innodb.h: Remove the declarations of many global variables.  The variables
  are no longer directly referenced outside of storage/innobase.
  
  trx_t: Add the field trx->duplicates.
  
  trx_create(): Initialize the fields trx->active_trans and trx->duplicates.
  
  innobase_query_is_update(): Remove.  Consult trx->duplicates instead.
  
  
  Revision r1488:
  Make InnoDB pluggable.  That is, merge the modifications from MySQL WL#2936
  and adapt some things.
  
  Note that ha_innodb.cc depends on mysql_tmpfile() being declared in
  <mysql/plugin.h>.  Until the function is declared there, you can
  uncomment the buggy definition of mysql_tmpfile in ha_innodb.cc.
  
  Remove storage/innobase/*/Makefile.am.  The whole compilation is driven by
  storage/innobase/Makefile.am and storage/innobase/plug.in.
  
  plug.in: Declare InnoDB as a dynamic plugin.
  
  ha_innodb.h: Remove the declarations of many global variables.  The variables
  are no longer directly referenced outside of storage/innobase.
  
  trx_t: Add the field trx->duplicates.
  
  trx_create(): Initialize the fields trx->active_trans and trx->duplicates.
  
  innobase_query_is_update(): Remove.  Consult trx->duplicates instead.
  
  
  Revision r1488:
  Make InnoDB pluggable.  That is, merge the modifications from MySQL WL#2936
  and adapt some things.
  
  Note that ha_innodb.cc depends on mysql_tmpfile() being declared in
  <mysql/plugin.h>.  Until the function is declared there, you can
  uncomment the buggy definition of mysql_tmpfile in ha_innodb.cc.
  
  Remove storage/innobase/*/Makefile.am.  The whole compilation is driven by
  storage/innobase/Makefile.am and storage/innobase/plug.in.
  
  plug.in: Declare InnoDB as a dynamic plugin.
  
  ha_innodb.h: Remove the declarations of many global variables.  The variables
  are no longer directly referenced outside of storage/innobase.
  
  trx_t: Add the field trx->duplicates.
  
  trx_create(): Initialize the fields trx->active_trans and trx->duplicates.
  
  innobase_query_is_update(): Remove.  Consult trx->duplicates instead.
  
  
  Revision r1488:
  Make InnoDB pluggable.  That is, merge the modifications from MySQL WL#2936
  and adapt some things.
  
  Note that ha_innodb.cc depends on mysql_tmpfile() being declared in
  <mysql/plugin.h>.  Until the function is declared there, you can
  uncomment the buggy definition of mysql_tmpfile in ha_innodb.cc.
  
  Remove storage/innobase/*/Makefile.am.  The whole compilation is driven by
  storage/innobase/Makefile.am and storage/innobase/plug.in.
  
  plug.in: Declare InnoDB as a dynamic plugin.
  
  ha_innodb.h: Remove the declarations of many global variables.  The variables
  are no longer directly referenced outside of storage/innobase.
  
  trx_t: Add the field trx->duplicates.
  
  trx_create(): Initialize the fields trx->active_trans and trx->duplicates.
  
  innobase_query_is_update(): Remove.  Consult trx->duplicates instead.
  
  
  Revision r1488:
  Make InnoDB pluggable.  That is, merge the modifications from MySQL WL#2936
  and adapt some things.
  
  Note that ha_innodb.cc depends on mysql_tmpfile() being declared in
  <mysql/plugin.h>.  Until the function is declared there, you can
  uncomment the buggy definition of mysql_tmpfile in ha_innodb.cc.
  
  Remove storage/innobase/*/Makefile.am.  The whole compilation is driven by
  storage/innobase/Makefile.am and storage/innobase/plug.in.
  
  plug.in: Declare InnoDB as a dynamic plugin.
  
  ha_innodb.h: Remove the declarations of many global variables.  The variables
  are no longer directly referenced outside of storage/innobase.
  
  trx_t: Add the field trx->duplicates.
  
  trx_create(): Initialize the fields trx->active_trans and trx->duplicates.
  
  innobase_query_is_update(): Remove.  Consult trx->duplicates instead.
  
  
  Revision r1488:
  Make InnoDB pluggable.  That is, merge the modifications from MySQL WL#2936
  and adapt some things.
  
  Note that ha_innodb.cc depends on mysql_tmpfile() being declared in
  <mysql/plugin.h>.  Until the function is declared there, you can
  uncomment the buggy definition of mysql_tmpfile in ha_innodb.cc.
  
  Remove storage/innobase/*/Makefile.am.  The whole compilation is driven by
  storage/innobase/Makefile.am and storage/innobase/plug.in.
  
  plug.in: Declare InnoDB as a dynamic plugin.
  
  ha_innodb.h: Remove the declarations of many global variables.  The variables
  are no longer directly referenced outside of storage/innobase.
  
  trx_t: Add the field trx->duplicates.
  
  trx_create(): Initialize the fields trx->active_trans and trx->duplicates.
  
  innobase_query_is_update(): Remove.  Consult trx->duplicates instead.
  
  
  Revision r1488:
  Make InnoDB pluggable.  That is, merge the modifications from MySQL WL#2936
  and adapt some things.
  
  Note that ha_innodb.cc depends on mysql_tmpfile() being declared in
  <mysql/plugin.h>.  Until the function is declared there, you can
  uncomment the buggy definition of mysql_tmpfile in ha_innodb.cc.
  
  Remove storage/innobase/*/Makefile.am.  The whole compilation is driven by
  storage/innobase/Makefile.am and storage/innobase/plug.in.
  
  plug.in: Declare InnoDB as a dynamic plugin.
  
  ha_innodb.h: Remove the declarations of many global variables.  The variables
  are no longer directly referenced outside of storage/innobase.
  
  trx_t: Add the field trx->duplicates.
  
  trx_create(): Initialize the fields trx->active_trans and trx->duplicates.
  
  innobase_query_is_update(): Remove.  Consult trx->duplicates instead.
  
  
  Revision r1488:
  Make InnoDB pluggable.  That is, merge the modifications from MySQL WL#2936
  and adapt some things.
  
  Note that ha_innodb.cc depends on mysql_tmpfile() being declared in
  <mysql/plugin.h>.  Until the function is declared there, you can
  uncomment the buggy definition of mysql_tmpfile in ha_innodb.cc.
  
  Remove storage/innobase/*/Makefile.am.  The whole compilation is driven by
  storage/innobase/Makefile.am and storage/innobase/plug.in.
  
  plug.in: Declare InnoDB as a dynamic plugin.
  
  ha_innodb.h: Remove the declarations of many global variables.  The variables
  are no longer directly referenced outside of storage/innobase.
  
  trx_t: Add the field trx->duplicates.
  
  trx_create(): Initialize the fields trx->active_trans and trx->duplicates.
  
  innobase_query_is_update(): Remove.  Consult trx->duplicates instead.
  
  
  Revision r1488:
  Make InnoDB pluggable.  That is, merge the modifications from MySQL WL#2936
  and adapt some things.
  
  Note that ha_innodb.cc depends on mysql_tmpfile() being declared in
  <mysql/plugin.h>.  Until the function is declared there, you can
  uncomment the buggy definition of mysql_tmpfile in ha_innodb.cc.
  
  Remove storage/innobase/*/Makefile.am.  The whole compilation is driven by
  storage/innobase/Makefile.am and storage/innobase/plug.in.
  
  plug.in: Declare InnoDB as a dynamic plugin.
  
  ha_innodb.h: Remove the declarations of many global variables.  The variables
  are no longer directly referenced outside of storage/innobase.
  
  trx_t: Add the field trx->duplicates.
  
  trx_create(): Initialize the fields trx->active_trans and trx->duplicates.
  
  innobase_query_is_update(): Remove.  Consult trx->duplicates instead.
  
  
  Revision r1488:
  Make InnoDB pluggable.  That is, merge the modifications from MySQL WL#2936
  and adapt some things.
  
  Note that ha_innodb.cc depends on mysql_tmpfile() being declared in
  <mysql/plugin.h>.  Until the function is declared there, you can
  uncomment the buggy definition of mysql_tmpfile in ha_innodb.cc.
  
  Remove storage/innobase/*/Makefile.am.  The whole compilation is driven by
  storage/innobase/Makefile.am and storage/innobase/plug.in.
  
  plug.in: Declare InnoDB as a dynamic plugin.
  
  ha_innodb.h: Remove the declarations of many global variables.  The variables
  are no longer directly referenced outside of storage/innobase.
  
  trx_t: Add the field trx->duplicates.
  
  trx_create(): Initialize the fields trx->active_trans and trx->duplicates.
  
  innobase_query_is_update(): Remove.  Consult trx->duplicates instead.
  
  
  Revision r1488:
  Make InnoDB pluggable.  That is, merge the modifications from MySQL WL#2936
  and adapt some things.
  
  Note that ha_innodb.cc depends on mysql_tmpfile() being declared in
  <mysql/plugin.h>.  Until the function is declared there, you can
  uncomment the buggy definition of mysql_tmpfile in ha_innodb.cc.
  
  Remove storage/innobase/*/Makefile.am.  The whole compilation is driven by
  storage/innobase/Makefile.am and storage/innobase/plug.in.
  
  plug.in: Declare InnoDB as a dynamic plugin.
  
  ha_innodb.h: Remove the declarations of many global variables.  The variables
  are no longer directly referenced outside of storage/innobase.
  
  trx_t: Add the field trx->duplicates.
  
  trx_create(): Initialize the fields trx->active_trans and trx->duplicates.
  
  innobase_query_is_update(): Remove.  Consult trx->duplicates instead.
  
  
  Revision r1488:
  Make InnoDB pluggable.  That is, merge the modifications from MySQL WL#2936
  and adapt some things.
  
  Note that ha_innodb.cc depends on mysql_tmpfile() being declared in
  <mysql/plugin.h>.  Until the function is declared there, you can
  uncomment the buggy definition of mysql_tmpfile in ha_innodb.cc.
  
  Remove storage/innobase/*/Makefile.am.  The whole compilation is driven by
  storage/innobase/Makefile.am and storage/innobase/plug.in.
  
  plug.in: Declare InnoDB as a dynamic plugin.
  
  ha_innodb.h: Remove the declarations of many global variables.  The variables
  are no longer directly referenced outside of storage/innobase.
  
  trx_t: Add the field trx->duplicates.
  
  trx_create(): Initialize the fields trx->active_trans and trx->duplicates.
  
  innobase_query_is_update(): Remove.  Consult trx->duplicates instead.
  
  
  Revision r1488:
  Make InnoDB pluggable.  That is, merge the modifications from MySQL WL#2936
  and adapt some things.
  
  Note that ha_innodb.cc depends on mysql_tmpfile() being declared in
  <mysql/plugin.h>.  Until the function is declared there, you can
  uncomment the buggy definition of mysql_tmpfile in ha_innodb.cc.
  
  Remove storage/innobase/*/Makefile.am.  The whole compilation is driven by
  storage/innobase/Makefile.am and storage/innobase/plug.in.
  
  plug.in: Declare InnoDB as a dynamic plugin.
  
  ha_innodb.h: Remove the declarations of many global variables.  The variables
  are no longer directly referenced outside of storage/innobase.
  
  trx_t: Add the field trx->duplicates.
  
  trx_create(): Initialize the fields trx->active_trans and trx->duplicates.
  
  innobase_query_is_update(): Remove.  Consult trx->duplicates instead.
  
  
  Revision r1488:
  Make InnoDB pluggable.  That is, merge the modifications from MySQL WL#2936
  and adapt some things.
  
  Note that ha_innodb.cc depends on mysql_tmpfile() being declared in
  <mysql/plugin.h>.  Until the function is declared there, you can
  uncomment the buggy definition of mysql_tmpfile in ha_innodb.cc.
  
  Remove storage/innobase/*/Makefile.am.  The whole compilation is driven by
  storage/innobase/Makefile.am and storage/innobase/plug.in.
  
  plug.in: Declare InnoDB as a dynamic plugin.
  
  ha_innodb.h: Remove the declarations of many global variables.  The variables
  are no longer directly referenced outside of storage/innobase.
  
  trx_t: Add the field trx->duplicates.
  
  trx_create(): Initialize the fields trx->active_trans and trx->duplicates.
  
  innobase_query_is_update(): Remove.  Consult trx->duplicates instead.
  
  
  Revision r1488:
  Make InnoDB pluggable.  That is, merge the modifications from MySQL WL#2936
  and adapt some things.
  
  Note that ha_innodb.cc depends on mysql_tmpfile() being declared in
  <mysql/plugin.h>.  Until the function is declared there, you can
  uncomment the buggy definition of mysql_tmpfile in ha_innodb.cc.
  
  Remove storage/innobase/*/Makefile.am.  The whole compilation is driven by
  storage/innobase/Makefile.am and storage/innobase/plug.in.
  
  plug.in: Declare InnoDB as a dynamic plugin.
  
  ha_innodb.h: Remove the declarations of many global variables.  The variables
  are no longer directly referenced outside of storage/innobase.
  
  trx_t: Add the field trx->duplicates.
  
  trx_create(): Initialize the fields trx->active_trans and trx->duplicates.
  
  innobase_query_is_update(): Remove.  Consult trx->duplicates instead.
  
  
  Revision r1488:
  Make InnoDB pluggable.  That is, merge the modifications from MySQL WL#2936
  and adapt some things.
  
  Note that ha_innodb.cc depends on mysql_tmpfile() being declared in
  <mysql/plugin.h>.  Until the function is declared there, you can
  uncomment the buggy definition of mysql_tmpfile in ha_innodb.cc.
  
  Remove storage/innobase/*/Makefile.am.  The whole compilation is driven by
  storage/innobase/Makefile.am and storage/innobase/plug.in.
  
  plug.in: Declare InnoDB as a dynamic plugin.
  
  ha_innodb.h: Remove the declarations of many global variables.  The variables
  are no longer directly referenced outside of storage/innobase.
  
  trx_t: Add the field trx->duplicates.
  
  trx_create(): Initialize the fields trx->active_trans and trx->duplicates.
  
  innobase_query_is_update(): Remove.  Consult trx->duplicates instead.
  
  
  Revision r1488:
  Make InnoDB pluggable.  That is, merge the modifications from MySQL WL#2936
  and adapt some things.
  
  Note that ha_innodb.cc depends on mysql_tmpfile() being declared in
  <mysql/plugin.h>.  Until the function is declared there, you can
  uncomment the buggy definition of mysql_tmpfile in ha_innodb.cc.
  
  Remove storage/innobase/*/Makefile.am.  The whole compilation is driven by
  storage/innobase/Makefile.am and storage/innobase/plug.in.
  
  plug.in: Declare InnoDB as a dynamic plugin.
  
  ha_innodb.h: Remove the declarations of many global variables.  The variables
  are no longer directly referenced outside of storage/innobase.
  
  trx_t: Add the field trx->duplicates.
  
  trx_create(): Initialize the fields trx->active_trans and trx->duplicates.
  
  innobase_query_is_update(): Remove.  Consult trx->duplicates instead.
  
  
  Revision r1488:
  Make InnoDB pluggable.  That is, merge the modifications from MySQL WL#2936
  and adapt some things.
  
  Note that ha_innodb.cc depends on mysql_tmpfile() being declared in
  <mysql/plugin.h>.  Until the function is declared there, you can
  uncomment the buggy definition of mysql_tmpfile in ha_innodb.cc.
  
  Remove storage/innobase/*/Makefile.am.  The whole compilation is driven by
  storage/innobase/Makefile.am and storage/innobase/plug.in.
  
  plug.in: Declare InnoDB as a dynamic plugin.
  
  ha_innodb.h: Remove the declarations of many global variables.  The variables
  are no longer directly referenced outside of storage/innobase.
  
  trx_t: Add the field trx->duplicates.
  
  trx_create(): Initialize the fields trx->active_trans and trx->duplicates.
  
  innobase_query_is_update(): Remove.  Consult trx->duplicates instead.
  
  
  Revision r1488:
  Make InnoDB pluggable.  That is, merge the modifications from MySQL WL#2936
  and adapt some things.
  
  Note that ha_innodb.cc depends on mysql_tmpfile() being declared in
  <mysql/plugin.h>.  Until the function is declared there, you can
  uncomment the buggy definition of mysql_tmpfile in ha_innodb.cc.
  
  Remove storage/innobase/*/Makefile.am.  The whole compilation is driven by
  storage/innobase/Makefile.am and storage/innobase/plug.in.
  
  plug.in: Declare InnoDB as a dynamic plugin.
  
  ha_innodb.h: Remove the declarations of many global variables.  The variables
  are no longer directly referenced outside of storage/innobase.
  
  trx_t: Add the field trx->duplicates.
  
  trx_create(): Initialize the fields trx->active_trans and trx->duplicates.
  
  innobase_query_is_update(): Remove.  Consult trx->duplicates instead.
  
  
  Revision r1488:
  Make InnoDB pluggable.  That is, merge the modifications from MySQL WL#2936
  and adapt some things.
  
  Note that ha_innodb.cc depends on mysql_tmpfile() being declared in
  <mysql/plugin.h>.  Until the function is declared there, you can
  uncomment the buggy definition of mysql_tmpfile in ha_innodb.cc.
  
  Remove storage/innobase/*/Makefile.am.  The whole compilation is driven by
  storage/innobase/Makefile.am and storage/innobase/plug.in.
  
  plug.in: Declare InnoDB as a dynamic plugin.
  
  ha_innodb.h: Remove the declarations of many global variables.  The variables
  are no longer directly referenced outside of storage/innobase.
  
  trx_t: Add the field trx->duplicates.
  
  trx_create(): Initialize the fields trx->active_trans and trx->duplicates.
  
  innobase_query_is_update(): Remove.  Consult trx->duplicates instead.
  
  
  Revision r1488:
  Make InnoDB pluggable.  That is, merge the modifications from MySQL WL#2936
  and adapt some things.
  
  Note that ha_innodb.cc depends on mysql_tmpfile() being declared in
  <mysql/plugin.h>.  Until the function is declared there, you can
  uncomment the buggy definition of mysql_tmpfile in ha_innodb.cc.
  
  Remove storage/innobase/*/Makefile.am.  The whole compilation is driven by
  storage/innobase/Makefile.am and storage/innobase/plug.in.
  
  plug.in: Declare InnoDB as a dynamic plugin.
  
  ha_innodb.h: Remove the declarations of many global variables.  The variables
  are no longer directly referenced outside of storage/innobase.
  
  trx_t: Add the field trx->duplicates.
  
  trx_create(): Initialize the fields trx->active_trans and trx->duplicates.
  
  innobase_query_is_update(): Remove.  Consult trx->duplicates instead.
  
  
  Revision r1488:
  Make InnoDB pluggable.  That is, merge the modifications from MySQL WL#2936
  and adapt some things.
  
  Note that ha_innodb.cc depends on mysql_tmpfile() being declared in
  <mysql/plugin.h>.  Until the function is declared there, you can
  uncomment the buggy definition of mysql_tmpfile in ha_innodb.cc.
  
  Remove storage/innobase/*/Makefile.am.  The whole compilation is driven by
  storage/innobase/Makefile.am and storage/innobase/plug.in.
  
  plug.in: Declare InnoDB as a dynamic plugin.
  
  ha_innodb.h: Remove the declarations of many global variables.  The variables
  are no longer directly referenced outside of storage/innobase.
  
  trx_t: Add the field trx->duplicates.
  
  trx_create(): Initialize the fields trx->active_trans and trx->duplicates.
  
  innobase_query_is_update(): Remove.  Consult trx->duplicates instead.
  
  
  Revision r1488:
  Make InnoDB pluggable.  That is, merge the modifications from MySQL WL#2936
  and adapt some things.
  
  Note that ha_innodb.cc depends on mysql_tmpfile() being declared in
  <mysql/plugin.h>.  Until the function is declared there, you can
  uncomment the buggy definition of mysql_tmpfile in ha_innodb.cc.
  
  Remove storage/innobase/*/Makefile.am.  The whole compilation is driven by
  storage/innobase/Makefile.am and storage/innobase/plug.in.
  
  plug.in: Declare InnoDB as a dynamic plugin.
  
  ha_innodb.h: Remove the declarations of many global variables.  The variables
  are no longer directly referenced outside of storage/innobase.
  
  trx_t: Add the field trx->duplicates.
  
  trx_create(): Initialize the fields trx->active_trans and trx->duplicates.
  
  innobase_query_is_update(): Remove.  Consult trx->duplicates instead.
  
  
  Revision r1488:
  Make InnoDB pluggable.  That is, merge the modifications from MySQL WL#2936
  and adapt some things.
  
  Note that ha_innodb.cc depends on mysql_tmpfile() being declared in
  <mysql/plugin.h>.  Until the function is declared there, you can
  uncomment the buggy definition of mysql_tmpfile in ha_innodb.cc.
  
  Remove storage/innobase/*/Makefile.am.  The whole compilation is driven by
  storage/innobase/Makefile.am and storage/innobase/plug.in.
  
  plug.in: Declare InnoDB as a dynamic plugin.
  
  ha_innodb.h: Remove the declarations of many global variables.  The variables
  are no longer directly referenced outside of storage/innobase.
  
  trx_t: Add the field trx->duplicates.
  
  trx_create(): Initialize the fields trx->active_trans and trx->duplicates.
  
  innobase_query_is_update(): Remove.  Consult trx->duplicates instead.
  
  
  Revision r1488:
  Make InnoDB pluggable.  That is, merge the modifications from MySQL WL#2936
  and adapt some things.
  
  Note that ha_innodb.cc depends on mysql_tmpfile() being declared in
  <mysql/plugin.h>.  Until the function is declared there, you can
  uncomment the buggy definition of mysql_tmpfile in ha_innodb.cc.
  
  Remove storage/innobase/*/Makefile.am.  The whole compilation is driven by
  storage/innobase/Makefile.am and storage/innobase/plug.in.
  
  plug.in: Declare InnoDB as a dynamic plugin.
  
  ha_innodb.h: Remove the declarations of many global variables.  The variables
  are no longer directly referenced outside of storage/innobase.
  
  trx_t: Add the field trx->duplicates.
  
  trx_create(): Initialize the fields trx->active_trans and trx->duplicates.
  
  innobase_query_is_update(): Remove.  Consult trx->duplicates instead.
  
  
  Revision r1488:
  Make InnoDB pluggable.  That is, merge the modifications from MySQL WL#2936
  and adapt some things.
  
  Note that ha_innodb.cc depends on mysql_tmpfile() being declared in
  <mysql/plugin.h>.  Until the function is declared there, you can
  uncomment the buggy definition of mysql_tmpfile in ha_innodb.cc.
  
  Remove storage/innobase/*/Makefile.am.  The whole compilation is driven by
  storage/innobase/Makefile.am and storage/innobase/plug.in.
  
  plug.in: Declare InnoDB as a dynamic plugin.
  
  ha_innodb.h: Remove the declarations of many global variables.  The variables
  are no longer directly referenced outside of storage/innobase.
  
  trx_t: Add the field trx->duplicates.
  
  trx_create(): Initialize the fields trx->active_trans and trx->duplicates.
  
  innobase_query_is_update(): Remove.  Consult trx->duplicates instead.
  
  
  Revision r1488:
  Make InnoDB pluggable.  That is, merge the modifications from MySQL WL#2936
  and adapt some things.
  
  Note that ha_innodb.cc depends on mysql_tmpfile() being declared in
  <mysql/plugin.h>.  Until the function is declared there, you can
  uncomment the buggy definition of mysql_tmpfile in ha_innodb.cc.
  
  Remove storage/innobase/*/Makefile.am.  The whole compilation is driven by
  storage/innobase/Makefile.am and storage/innobase/plug.in.
  
  plug.in: Declare InnoDB as a dynamic plugin.
  
  ha_innodb.h: Remove the declarations of many global variables.  The variables
  are no longer directly referenced outside of storage/innobase.
  
  trx_t: Add the field trx->duplicates.
  
  trx_create(): Initialize the fields trx->active_trans and trx->duplicates.
  
  innobase_query_is_update(): Remove.  Consult trx->duplicates instead.
  
  
  Revision r1488:
  Make InnoDB pluggable.  That is, merge the modifications from MySQL WL#2936
  and adapt some things.
  
  Note that ha_innodb.cc depends on mysql_tmpfile() being declared in
  <mysql/plugin.h>.  Until the function is declared there, you can
  uncomment the buggy definition of mysql_tmpfile in ha_innodb.cc.
  
  Remove storage/innobase/*/Makefile.am.  The whole compilation is driven by
  storage/innobase/Makefile.am and storage/innobase/plug.in.
  
  plug.in: Declare InnoDB as a dynamic plugin.
  
  ha_innodb.h: Remove the declarations of many global variables.  The variables
  are no longer directly referenced outside of storage/innobase.
  
  trx_t: Add the field trx->duplicates.
  
  trx_create(): Initialize the fields trx->active_trans and trx->duplicates.
  
  innobase_query_is_update(): Remove.  Consult trx->duplicates instead.
  
  
  Revision r1488:
  Make InnoDB pluggable.  That is, merge the modifications from MySQL WL#2936
  and adapt some things.
  
  Note that ha_innodb.cc depends on mysql_tmpfile() being declared in
  <mysql/plugin.h>.  Until the function is declared there, you can
  uncomment the buggy definition of mysql_tmpfile in ha_innodb.cc.
  
  Remove storage/innobase/*/Makefile.am.  The whole compilation is driven by
  storage/innobase/Makefile.am and storage/innobase/plug.in.
  
  plug.in: Declare InnoDB as a dynamic plugin.
  
  ha_innodb.h: Remove the declarations of many global variables.  The variables
  are no longer directly referenced outside of storage/innobase.
  
  trx_t: Add the field trx->duplicates.
  
  trx_create(): Initialize the fields trx->active_trans and trx->duplicates.
  
  innobase_query_is_update(): Remove.  Consult trx->duplicates instead.
  
  
  Revision r1488:
  Make InnoDB pluggable.  That is, merge the modifications from MySQL WL#2936
  and adapt some things.
  
  Note that ha_innodb.cc depends on mysql_tmpfile() being declared in
  <mysql/plugin.h>.  Until the function is declared there, you can
  uncomment the buggy definition of mysql_tmpfile in ha_innodb.cc.
  
  Remove storage/innobase/*/Makefile.am.  The whole compilation is driven by
  storage/innobase/Makefile.am and storage/innobase/plug.in.
  
  plug.in: Declare InnoDB as a dynamic plugin.
  
  ha_innodb.h: Remove the declarations of many global variables.  The variables
  are no longer directly referenced outside of storage/innobase.
  
  trx_t: Add the field trx->duplicates.
  
  trx_create(): Initialize the fields trx->active_trans and trx->duplicates.
  
  innobase_query_is_update(): Remove.  Consult trx->duplicates instead.
storage/innobase/handler/ha_innodb.cc:
  Fixes after merging InnoDB snapshots.
  
  Revision r1422:
  Fix for Bug#21101 - returns wrong error message when table column
  defs exceed the max row size.
  
  The fix returns a more appropriate error message. Add a test case to
  innodb.test and expected output to innodb.result.
  
  
  Revision r1423:
  Fix for Bug#18828. Return DB_TOO_MANY_CONCURRENT_TRXS when we run out
  of UNDO slots in the rollback segment. This is a partial fix since the
  MySQL error code requested to properly report the error condition back
  to the client has not yet materialized. Currently we have #ifdef'd the
  error code translation in ha_innodb.cc. This will have to be changed
  as and when MySQl add the new requested code or an equivalent code
  that we can then use.
  
  Given the above, currently we will get the old behaviour, not the "fixed"
  and intended behaviour.
  
  
  
  Revision r1425:
  Fixed a missing function decoration that slipped into r1422.
  
  
  Revision r1434:
  Fix typo.
  
  
  Revision r1442:
  Potential fix for Bug#25645:
  
  "Move innobase_release_stat_resources(trx) outside the 'if' in
  ha_innobase::external_lock(). That would add more safety that whatever
  MySQL does at a query end, there would be no risk of a hang on the btr
  search latch."
  
  Also call innobase_release_temporary_latches() in the beginning of
  ha_innobase::close().
  
  Approved by:	Heikki
  
  
  Revision r1453:
  Bugfix: only call innobase_release_temporary_latches() in case of current_thd
  is not NULL, otherwise we get NULL pointer dereferencing.
  
  Approved by:	Heikki
  
  
  Revision r1474:
  Fix typo in comment: the exact prototype is in
  include/data0type.ic, not in data/data0type.ic
  
  
  
  Revision r1482:
  Fix Bug#25078 by always letting the replication thread on the slave
  server to enter InnoDB. This can be made further customizable by the
  user if we introduce a new config parameter. This will wait until
  config parameters can be easily added.
  
  Approved by:	Marko
  
  
  Revision r1488:
  Make InnoDB pluggable.  That is, merge the modifications from MySQL WL#2936
  and adapt some things.
  
  Note that ha_innodb.cc depends on mysql_tmpfile() being declared in
  <mysql/plugin.h>.  Until the function is declared there, you can
  uncomment the buggy definition of mysql_tmpfile in ha_innodb.cc.
  
  Remove storage/innobase/*/Makefile.am.  The whole compilation is driven by
  storage/innobase/Makefile.am and storage/innobase/plug.in.
  
  plug.in: Declare InnoDB as a dynamic plugin.
  
  ha_innodb.h: Remove the declarations of many global variables.  The variables
  are no longer directly referenced outside of storage/innobase.
  
  trx_t: Add the field trx->duplicates.
  
  trx_create(): Initialize the fields trx->active_trans and trx->duplicates.
  
  innobase_query_is_update(): Remove.  Consult trx->duplicates instead.
  
  
  Revision r1489:
  thd_to_trx(), check_trx_exists(): Remove the handlerton parameter.  It is a
  singleton object whose address is stored into innodb_hton_ptr.
  
  
  Revision r1492:
  Convert innobase_buffer_pool_size and innobase_log_file_size types from
  longlong to long long because MYSQL_SYSVAR_LONGLONG marco expects long long
  type.
  
  Also change
  ((ulint)innobase_buffer_pool_size) / 1024
  to
  (ulint)(innobase_buffer_pool_size / 1024)
  and remove comment which is no longer true.
  
  Provided that innobase_buffer_pool_size is always 64bits these statements
  are equivalent if ulint is 64 bit (well it will screw up if
  innobase_buffer_pool_size is negative). And if ulint is 32 bit the later
  variant gives a little more chance that the value will fit.
  
  Approved by:	Heikki
  
  
  Revision r1493:
  ha_innodb.cc: Remove the declarations of some global InnoDB variables
  whose name starts with srv_.  These variables are declared in the header
  files that are covered by #include directives in ha_innodb.cc.
  
  
  Revision r1495:
  Introduce the function reset_template() for resetting some fields of
  row_prebuilt_t; currently prebuilt->read_just_key and
  prebuilt->keep_other_fields_on_keyread.
  
  
  Revision r1496:
  ha_innobase::extra(): Replace references to prebuilt->trx with
  thd_to_trx(ha_thd()), in order to avoid potential memory corruption.
  
  
  Revision r1501:
  Fix Bug#21293: Consider transactions that had edited non-transactional
  tables heavier than ones that had not. This helps killing the "right"
  transaction in case of a deadlock.
  
  Approved by:	Heikki
  
  
  Revision r1513:
  Split ut_a(a && b [&& c...]); into separate ut_a(a); ut_a(b); [ut_a(c); ...].
  This makes it possible to see which expression was false by looking at the
  error message.
  
  Approved by:	Marko
  
  
  Revision r1527:
  Cleanup in ha_innodb.cc:
  
  thd_is_replication_slave_thread(), thd_has_edited_nontrans_tables():
  Remove blank line between the function comment and the function
  definition.  There should be exactly one line between the return
  type and the function comment, and this line should be one of
  '', 'static', 'UNIV_INLINE', and 'extern "C"'.
  
  
  Revision r1538:
  Do not return error in ha_innobase::info if srv_force_recovery >= 4. This is to allow for 
  normal processing of the query by MySQL instead of generating an error.
  
  Reviewed by: Heikki
  
  
  
  Revision r1551:
  ha_innobase::innobase_read_and_init_auto_inc(): Remember and restore
  prebuilt->sql_stat_start.  In an ALTER TABLE statement in the innodb_gis
  test, an ut_ad() assertion failed, because no IX lock had been acquired
  on the table, because prebuilt->sql_stat_start was inadvertently reset
  to FALSE, by this function.  This function was called via
  ha_innobase::info() and mysql_prepare_alter_table().
storage/innobase/plug.in:
  Fixes after merging InnoDB snapshots.
  
  Revision r1488:
  Make InnoDB pluggable.  That is, merge the modifications from MySQL WL#2936
  and adapt some things.
  
  Note that ha_innodb.cc depends on mysql_tmpfile() being declared in
  <mysql/plugin.h>.  Until the function is declared there, you can
  uncomment the buggy definition of mysql_tmpfile in ha_innodb.cc.
  
  Remove storage/innobase/*/Makefile.am.  The whole compilation is driven by
  storage/innobase/Makefile.am and storage/innobase/plug.in.
  
  plug.in: Declare InnoDB as a dynamic plugin.
  
  ha_innodb.h: Remove the declarations of many global variables.  The variables
  are no longer directly referenced outside of storage/innobase.
  
  trx_t: Add the field trx->duplicates.
  
  trx_create(): Initialize the fields trx->active_trans and trx->duplicates.
  
  innobase_query_is_update(): Remove.  Consult trx->duplicates instead.
storage/innobase/handler/ha_innodb.h:
  Fixes after merging InnoDB snapshots.
  
  Revision r1488:
  Make InnoDB pluggable.  That is, merge the modifications from MySQL WL#2936
  and adapt some things.
  
  Note that ha_innodb.cc depends on mysql_tmpfile() being declared in
  <mysql/plugin.h>.  Until the function is declared there, you can
  uncomment the buggy definition of mysql_tmpfile in ha_innodb.cc.
  
  Remove storage/innobase/*/Makefile.am.  The whole compilation is driven by
  storage/innobase/Makefile.am and storage/innobase/plug.in.
  
  plug.in: Declare InnoDB as a dynamic plugin.
  
  ha_innodb.h: Remove the declarations of many global variables.  The variables
  are no longer directly referenced outside of storage/innobase.
  
  trx_t: Add the field trx->duplicates.
  
  trx_create(): Initialize the fields trx->active_trans and trx->duplicates.
  
  innobase_query_is_update(): Remove.  Consult trx->duplicates instead.
2007-07-10 05:37:43 -06:00

51 lines
861 B
SQL

-- connect (con1,localhost,root,,)
-- connect (con2,localhost,root,,)
-- connection con1
SET autocommit=0;
SELECT * FROM t1 FOR UPDATE;
-- if ($con1_extra_sql_present) {
-- eval $con1_extra_sql
-- }
-- connection con2
SET autocommit=0;
SELECT * FROM t2 FOR UPDATE;
-- if ($con2_extra_sql_present) {
-- eval $con2_extra_sql
-- }
-- if ($con1_should_be_rolledback) {
-- connection con1
-- send
INSERT INTO t2 VALUES (0);
-- connection con2
INSERT INTO t1 VALUES (0);
ROLLBACK;
-- connection con1
-- error ER_LOCK_DEADLOCK
-- reap
-- }
# else
-- if (!$con1_should_be_rolledback) {
-- connection con2
-- send
INSERT INTO t1 VALUES (0);
-- connection con1
INSERT INTO t2 VALUES (0);
ROLLBACK;
-- connection con2
-- error ER_LOCK_DEADLOCK
-- reap
-- }
-- connection default
DELETE FROM t5_nontrans;
-- disconnect con1
-- disconnect con2