Commit graph

96 commits

Author SHA1 Message Date
Sergey Vojtovich
70564eb62d Applying InnoDB snapshot, fixes BUG#38901
Detailed revision comments:

r6613 | inaam | 2010-02-09 20:23:09 +0200 (Tue, 09 Feb 2010) | 11 lines
branches/5.1: Fix Bug #38901
InnoDB logs error repeatedly when trying to load page into buffer pool

In buf_page_get_gen() if we are unable to read a page (because of
corruption or some other reason) we keep on retrying. This fills up
error log with millions of entries in no time and we'd eventually run
out of disk space. This patch limits the number of attempts that we
make (currently set to 100) and after that we abort with a message.

rb://241 Approved by: Heikki
2010-02-26 13:03:58 +04:00
Satya B
83d5ca950b Applying InnoDB snapshot 5.1-ss6344, Fixes BUG#47814
and also applying 5.1-ss6355

Detailed revision comments:

r6324 | jyang | 2009-12-17 06:54:24 +0200 (Thu, 17 Dec 2009) | 8 lines
branches/5.1: Fix bug #47814 - Diagnostics are frequently not
printed after a long lock wait in InnoDB. Separate out the 
lock wait timeout check thread from monitor information
printing thread.

rb://200 Approved by Marko.

r6349 | marko | 2009-12-22 11:09:54 +0200 (Tue, 22 Dec 2009) | 3 lines
branches/5.1: lock_print_info_summary(): Remove a reference to
innobase_mysql_end_print_arbitrary_thd() that should have been
removed in r6347 when removing the function.

r6350 | marko | 2009-12-22 11:11:09 +0200 (Tue, 22 Dec 2009) | 1 line
branches/5.1: Remove an obsolete declaration of LOCK_thread_count.
2009-12-23 12:29:34 +05:30
Satya B
2f04df4ab0 Applying InnoDB snapshot 5.1-ss6344, part 2. Fixes BUG#41609 but does
not address the printouts issue

Detailed revision comments:

r6310 | marko | 2009-12-15 15:23:54 +0200 (Tue, 15 Dec 2009) | 30 lines
branches/5.1: Merge r4922 from branches/zip.

This the fix for the first part of Bug #41609 from InnoDB Plugin to
the built-in InnoDB in MySQL 5.1. This allows InnoDB Hot Backup to
back up a database while the built-in InnoDB in MySQL 5.1 is creating
temporary tables. (This fix does not address the printouts about
missing .ibd files for temporary tables at InnoDB startup, which was
committed to branches/zip in r6252.)

rb://219 approved by Sunny Bains.

branches/zip: Distinguish temporary tables in MLOG_FILE_CREATE.
This addresses Mantis Issue #23 in InnoDB Hot Backup and some
of MySQL Bug #41609.

In MLOG_FILE_CREATE, we need to distinguish temporary tables, so that
InnoDB Hot Backup can work correctly.  It turns out that we can do this
easily, by using a bit of the previously unused parameter for page number.
(The page number parameter of MLOG_FILE_CREATE has been written as 0 
ever since MySQL 4.1, which introduced MLOG_FILE_CREATE.)

MLOG_FILE_FLAG_TEMP: A flag for indicating a temporary table in
the page number parameter of MLOG_FILE_ operations.

fil_op_write_log(): Add the parameter log_flags.

fil_op_log_parse_or_replay(): Add the parameter log_flags.
Do not replay MLOG_FILE_CREATE when MLOG_FILE_FLAG_TEMP is set in log_flags.
This only affects ibbackup --apply-log.  InnoDB itself never replays file
operations.
2009-12-21 15:50:32 +05:30
Gleb Shchepa
60b76cd729 Bug #38883 (reopened): thd_security_context is not thread safe, crashes?
manual merge 5.0-->5.1, updating InnoDB plugin.
2009-12-01 14:38:40 +04:00
Satya B
4b3114b60d Applying InnoDB snapshot 5.1-ss6242, part 7. Fixes BUG#49032
1. BUG#49032 - auto_increment field does not initialize to last value 
               in InnoDB Storage Engine

2. Fix whitespace issues and fix tests and make read float/double arg const

Detailed revision comments:

r6231 | sunny | 2009-11-25 10:26:27 +0200 (Wed, 25 Nov 2009) | 7 lines
branches/5.1: Fix BUG#49032 - auto_increment field does not initialize to last value in InnoDB Storage Engine.

We use the appropriate function to read the column value for non-integer
autoinc column types, namely float and double.

rb://208. Approved by Marko.

r6232 | sunny | 2009-11-25 10:27:39 +0200 (Wed, 25 Nov 2009) | 2 lines
branches/5.1: This is an interim fix, fix white space errors.

r6233 | sunny | 2009-11-25 10:28:35 +0200 (Wed, 25 Nov 2009) | 2 lines
branches/5.1: This is an interim fix, fix tests and make read float/double arg const.


r6234 | sunny | 2009-11-25 10:29:03 +0200 (Wed, 25 Nov 2009) | 2 lines
branches/5.1: This is an interim fix, fix whitepsace issues.
2009-11-30 15:11:38 +05:30
Satya B
1888750627 Applying InnoDB snapshot 5.1-ss6242, part 2. Fixes BUG#3139
1. BUG#3139 - Mysql crashes: "windows error 995" after several 
              selects on a large DB

Detailed revision comments:

r6154 | calvin | 2009-11-11 02:51:17 +0200 (Wed, 11 Nov 2009) | 17 lines
branches/5.1: fix bug#3139: Mysql crashes: 'windows error 995'
after several selects on a large DB

During stress environment, Windows AIO may fail with error code
ERROR_OPERATION_ABORTED. InnoDB does not handle the error, rather
crashes. The cause of the error is unknown, but likely due to
faulty hardware or driver.

This patch introduces a new error code OS_FILE_OPERATION_ABORTED,
which maps to Windows ERROR_OPERATION_ABORTED (995). When the error
is detected during AIO, the InnoDB will issue a synchronous retry
(read/write).

This patch has been extensively tested by MySQL support.

Approved by: Marko
rb://196
2009-11-30 14:10:31 +05:30
Satya B
ca79b2bcb9 Applying InnoDB snapshot 5.1-ss6242, part 1. Fixes BUG#32430
1. BUG#32430 - 'show innodb status' causes errors Invalid (old?) table
               or database name in logs

2. White space fixup

Detailed revision comments:

r6136 | marko | 2009-11-04 12:28:10 +0200 (Wed, 04 Nov 2009) | 15 lines
branches/5.1: Port r6134 from branches/zip:

  ------------------------------------------------------------------------
  r6134 | marko | 2009-11-04 07:57:29 +0000 (Wed, 04 Nov 2009) | 5 lines

  branches/zip: innobase_convert_identifier(): Convert table names with
  explain_filename() to address Bug #32430: 'show innodb status'
  causes errors Invalid (old?) table or database name in logs.

  rb://134 approved by Sunny Bains
  ------------------------------------------------------------------------

innobase_print_identifier(): Replace with innobase_convert_name().

innobase_convert_identifier(): New function, called by innobase_convert_name().
r6152 | vasil | 2009-11-10 15:30:20 +0200 (Tue, 10 Nov 2009) | 4 lines
branches/5.1:

White space fixup.
2009-11-30 13:56:45 +05:30
Satya B
bb4778b57f Applying InnoDB snashot 5.1-ss5488, part 1
1. Fixes build warnings caused by applying snapshot 5.1-ss5282

2. Fix the Makefile.am in storage/innobase to remove the header file
   'fsp0types.h' which was added twice to fix build warning generated 
   after applying the 5.1-ss5282 snapshot

Detailed revision comments:

r5410 | marko | 2009-06-24 22:26:34 +0300 (Wed, 24 Jun 2009) | 2 lines
branches/5.1: Add missing #include "mtr0log.h" to avoid warnings
when compiling with -DUNIV_MUST_NOT_INLINE.
2009-07-10 15:55:08 +05:30
Satya B
889b96b9c9 merge to mysql-5.1-bugteam 2009-06-29 18:33:11 +05:30
Satya B
7d0675f613 Applying InnoDB snashot 5.1-ss5343, Fixes BUG#45357
1. BUG#45357 - 5.1.35 crashes with Failing assertion: index->type & DICT_CLUSTERED

2. Also fixes the compilation problem when the flag -DUNIV_MUST_NOT_INLINE

Detailed revision comments:

r5340 | marko | 2009-06-17 12:11:49 +0300 (Wed, 17 Jun 2009) | 4 lines
branches/5.1: row_unlock_for_mysql(): When the clustered index is unknown,
refuse to unlock the record.
(Bug #45357, caused by the fix of Bug #39320).
rb://132 approved by Sunny Bains.
r5339 | marko | 2009-06-17 11:01:37 +0300 (Wed, 17 Jun 2009) | 2 lines
branches/5.1: Add missing #include "mtr0log.h" so that the code compiles
with -DUNIV_MUST_NOT_INLINE.
2009-06-22 16:58:00 +05:30
Satya B
03bd6f025b Applying InnoDB snashot 5.1-ss5282, Fix for BUG#45097
BUG#45097 - Hang during recovery, redo logs for doublewrite buffer pages 

Detailed revision comments:

r5128 | vasil | 2009-05-26 17:26:37 +0300 (Tue, 26 May 2009) | 7 lines
branches/5.1:

Fix Bug#45097 Hang during recovery, redo logs for doublewrite buffer pages

Do not write redo log for the pages in the doublewrite buffer. Also, do not
make a dummy change to the page because this is not needed.

r5150 | vasil | 2009-05-27 18:56:03 +0300 (Wed, 27 May 2009) | 4 lines
branches/5.1:

Whitespace fixup.
2009-06-11 18:35:12 +05:30
Satya B
afa76a9d7a Applying InnoDB snashot 5.1-ss5282, PRE-Fix for BUG#45097
BUG#45097 - Hang during recovery, redo logs for doublewrite buffer pages 

Detailed revision comments:

r5126 | vasil | 2009-05-26 16:57:12 +0300 (Tue, 26 May 2009) | 9 lines
branches/5.1:

Preparation for the fix of
Bug#45097 Hang during recovery, redo logs for doublewrite buffer pages 

Non-functional change: move FSP_* macros from fsp0fsp.h to a new file
fsp0types.h. This is needed in order to be able to use FSP_EXTENT_SIZE 
in mtr0log.ic.

r5127 | vasil | 2009-05-26 17:05:43 +0300 (Tue, 26 May 2009) | 9 lines
branches/5.1:

Preparation for the fix of
Bug#45097 Hang during recovery, redo logs for doublewrite buffer pages

Do not include unnecessary headers mtr0log.h and fut0lst.h in trx0sys.h
and include fsp0fsp.h just before it is needed. This is needed in order
to be able to use TRX_SYS_SPACE in mtr0log.ic.
2009-06-11 18:21:54 +05:30
Satya B
07b9358860 Applying InnoDB snashot 5.1-ss5024,part 3. Fixes BUG#42101
BUG#42101 - Race condition in innodb_commit_concurrency

Detailed revision comments:

r4994 | marko | 2009-05-14 15:04:55 +0300 (Thu, 14 May 2009) | 18 lines
branches/5.1: Prevent a race condition in innobase_commit() by ensuring
that innodb_commit_concurrency>0 remains constant at run time. (Bug #42101)

srv_commit_concurrency: Make this a static variable in ha_innodb.cc.

innobase_commit_concurrency_validate(): Check that innodb_commit_concurrency
is not changed from or to 0 at run time.  This is needed, because
innobase_commit() assumes that innodb_commit_concurrency>0 remains constant.
Without this limitation, the checks for innodb_commit_concurrency>0
in innobase_commit() should be removed and that function would have to
acquire and release commit_cond_m at least twice per invocation.
Normally, innodb_commit_concurrency=0, and introducing the mutex operations
would mean significant overhead.

innodb_bug42101.test, innodb_bug42101-nonzero.test: Test cases.

rb://123 approved by Heikki Tuuri
2009-05-19 13:50:28 +05:30
Satya B
c470d5e46e Applying InnoDB snashot 5.1-ss4699, part 3. Fixes BUG#43660
1) BUG#43660 - SHOW INDEXES/ANALYZE does NOT update cardinality 
               for indexes of InnoDB table

Detailed revision comments:

r4699 | vasil | 2009-04-09 14:01:52 +0300 (Thu, 09 Apr 2009) | 15 lines
branches/5.1:

Fix Bug#43660 SHOW INDEXES/ANALYZE does NOT update cardinality for indexes
of InnoDB table

by replacing the PRNG that is used to pick random pages with a better
one.

This is based on r4670 but also adds a new configuration option and
enables the fix only if this option is changed. Please skip the present
revision when merging.

Approved by:	Heikki (via email)
2009-04-15 18:11:54 +05:30
Satya B
58c33f5514 Applying InnoDB snashot 5.1-ss4699, part 1. Fixes BUG#39320 and other
problems

1) BUG#39320 - innodb crash in file btr/btr0pcur.c line 217 with 
               innodb_locks_unsafe_for_binlog

2) Fixes bug in multi-table semi consistent reads.

3) Fixes email address from dev@innodb.com to innodb_dev_ww@oracle.com

4) Fixes warning message generated by main.innodb test


Detailed revision comments:

r4399 | marko | 2009-03-12 09:38:05 +0200 (Thu, 12 Mar 2009) | 5 lines
branches/5.1: row_sel_get_clust_rec_for_mysql(): Store the cursor position
also for unlock_row().  (Bug #39320)

rb://96 approved by Heikki Tuuri.

r4400 | marko | 2009-03-12 10:06:44 +0200 (Thu, 12 Mar 2009) | 8 lines
branches/5.1: Fix a bug in multi-table semi-consistent reads.
Remember the acquired record locks per table handle (row_prebuilt_t)
rather than per transaction (trx_t), so that unlock_row should successfully
unlock all non-matching rows in multi-table operations.
This deficiency was found while investigating Bug #39320.

rb://94 approved by Heikki Tuuri.

r4481 | marko | 2009-03-19 15:01:48 +0200 (Thu, 19 Mar 2009) | 6 lines
branches/5.1: row_unlock_for_mysql(): Do not unlock records that were
modified by the current transaction.  This bug was introduced or unmasked
in r4400.

rb://97 approved by Heikki Tuuri

r4573 | vasil | 2009-03-30 14:17:13 +0300 (Mon, 30 Mar 2009) | 4 lines
branches/5.1:

Fix email address from dev@innodb.com to innodb_dev_ww@oracle.com

r4574 | vasil | 2009-03-30 14:27:08 +0300 (Mon, 30 Mar 2009) | 38 lines
branches/5.1:

Restore the state of INNODB_THREAD_CONCURRENCY to silence this warning:

  TEST                                      RESULT   TIME (ms)
  ------------------------------------------------------------
  
  worker[1] Using MTR_BUILD_THREAD 250, with reserved ports 12500..12509
  main.innodb                              [ pass ]   8803
  
  MTR's internal check of the test case 'main.innodb' failed.
  This means that the test case does not preserve the state that existed
  before the test case was executed.  Most likely the test case did not
  do a proper clean-up.
  This is the diff of the states of the servers before and after the
  test case was executed:
  mysqltest: Logging to '/tmp/autotest.sh-20090330_033000-5.1.5Hg8CY/mysql-5.1/mysql-test/var/tmp/check-mysqld_1.log'.
  mysqltest: Results saved in '/tmp/autotest.sh-20090330_033000-5.1.5Hg8CY/mysql-5.1/mysql-test/var/tmp/check-mysqld_1.result'.
  mysqltest: Connecting to server localhost:12500 (socket /tmp/autotest.sh-20090330_033000-5.1.5Hg8CY/mysql-5.1/mysql-test/var/tmp/mysqld.1.sock) as 'root', connection 'default', attempt 0 ...
  mysqltest: ... Connected.
  mysqltest: Start processing test commands from './include/check-testcase.test' ...
  mysqltest: ... Done processing test commands.
  --- /tmp/autotest.sh-20090330_033000-5.1.5Hg8CY/mysql-5.1/mysql-test/var/tmp/check-mysqld_1.result	2009-03-30 14:12:31.000000000 +0300
  +++ /tmp/autotest.sh-20090330_033000-5.1.5Hg8CY/mysql-5.1/mysql-test/var/tmp/check-mysqld_1.reject	2009-03-30 14:12:41.000000000 +0300
  @@ -99,7 +99,7 @@
   INNODB_SUPPORT_XA	ON
   INNODB_SYNC_SPIN_LOOPS	20
   INNODB_TABLE_LOCKS	ON
  -INNODB_THREAD_CONCURRENCY	8
  +INNODB_THREAD_CONCURRENCY	16
   INNODB_THREAD_SLEEP_DELAY	10000
   INSERT_ID	0
   INTERACTIVE_TIMEOUT	28800
  
  mysqltest: Result content mismatch
  
  not ok

r4576 | vasil | 2009-03-30 16:25:10 +0300 (Mon, 30 Mar 2009) | 4 lines
branches/5.1:

Revert a change to Makefile.am that I committed accidentally in c4574.
2009-04-15 17:16:08 +05:30
Ignacio Galarza
0d588edf61 auto-merge 2009-03-17 16:29:24 -04:00
Timothy Smith
d2e4204a1e Applying InnoDB snashot 5.1-ss4007, part 1. Fixes
Bug #41571: MySQL segfaults after innodb recovery

Detailed revision comments:

r4004 | marko | 2009-01-20 16:19:00 +0200 (Tue, 20 Jan 2009) | 12 lines
branches/5.1: Merge r4003 from branches/5.0:

rec_set_nth_field(): When the field already is SQL null,
do nothing when it is being changed to SQL null. (Bug #41571)

Normally, MySQL does not pass "do-nothing" updates to the storage engine.
When it does and a column of an InnoDB table that is in ROW_FORMAT=COMPACT
is being updated from NULL to NULL, the InnoDB buffer pool will be corrupted
without this fix.

rb://81 approved by Heikki Tuuri
2009-03-02 18:09:35 -07:00
Timothy Smith
20b1c21bf0 Applying InnoDB snashot 5.1-ss3931, part 1. Fixes
Bug #38187: Error 153 when creating savepoints

Detailed revision comments:

r3911 | sunny | 2009-01-13 14:15:24 +0200 (Tue, 13 Jan 2009) | 13 lines
branches/5.1: Fix Bug#38187 Error 153 when creating savepoints
InnoDB previously treated savepoints as a stack e.g.,
  SAVEPOINT a;
  SAVEPOINT b;
  SAVEPOINT c;
  SAVEPOINT b; <- This would delete b and c.

This fix changes the behavior to:
  SAVEPOINT a;
  SAVEPOINT b;
  SAVEPOINT c;
  SAVEPOINT b; <- Does not delete savepoint c
2009-03-02 18:06:44 -07:00
Ignacio Galarza
5b7347bda3 Bug#29125 Windows Server X64: so many compiler warnings
- Remove bothersome warning messages.  This change focuses on the warnings 
that are covered by the ignore file: support-files/compiler_warnings.supp.
- Strings are guaranteed to be max uint in length
2009-02-13 11:41:47 -05:00
Timothy Smith
13927f53c5 Applying InnoDB snapshot innodb-5.1-ss3603
Detailed description of changes:
r3590 | marko | 2008-12-18 15:33:36 +0200 (Thu, 18 Dec 2008) | 11 lines
branches/5.1: When converting a record to MySQL format, copy the default
column values for columns that are SQL NULL.  This addresses failures in
row-based replication (Bug #39648).

row_prebuilt_t: Add default_rec, for the default values of the columns in
MySQL format.

row_sel_store_mysql_rec(): Use prebuilt->default_rec instead of
padding columns.

rb://64 approved by Heikki Tuuri
2009-01-12 23:35:05 +01:00
Timothy Smith
8759d9275d Applying InnoDB snapshot innodb-5.1-ss3603
Detailed description of changes:
r3588 | inaam | 2008-12-18 14:26:54 +0200 (Thu, 18 Dec 2008) | 8 lines
branches/5.1

It is a bug in unused code. If we don't calculate the hash value when
calculating the mutex number then two pages which map to same hash
value can get two different mutex numbers.

Approved by: Marko
2009-01-12 23:32:50 +01:00
Timothy Smith
897d00ce89 Applying InnoDB snapshot innodb-5.1-ss3603
Detailed description of changes:
r2929 | marko | 2008-10-29 21:26:14 +0200 (Wed, 29 Oct 2008) | 13 lines
branches/5.1: dtype_get_sql_null_size(): return the correct storage
size of a SQL NULL column. (Bug #40369)

When MySQL Bug #20877 was fixed in r834, this function was
accidentally modified to return 0 or 1. Apparently, the only impact of
this bug is that fixed-length columns cannot be updated in-place from
or to SQL NULL, even in ROW_FORMAT=REDUNDANT.  After this fix,
fixed-length columns in ROW_FORMAT=REDUNDANT will have a constant
storage size as they should, no matter if NULL or non-NULL.  The bug
caused fixed-length NULL columns to occupy 1 byte.

rb://37 approved by Heikki over IM.
2009-01-12 23:27:11 +01:00
Timothy Smith
293e9c49c4 Applying InnoDB snapshot innodb-5.1-ss3603
Detailed description of changes:
r2902 | vasil | 2008-10-28 12:10:25 +0200 (Tue, 28 Oct 2008) | 10 lines
branches/5.1:

Fix Bug#38189 innodb_stats_on_metadata missing

Make the variable innodb_stats_on_metadata visible to the users and
also settable at runtime. Previously it was only "visible" as a command
line startup option to mysqld.

Approved by:	Marko (https://svn.innodb.com/rb/r/36)
2009-01-12 23:08:22 +01:00
Timothy Smith
d29aaf893c Apply InnoDB snapshot innodb-5.1-ss2858, part 15. Fixes
Bug #39830: Table autoinc value not updated on first insert.
Bug #35498: Cannot get table test/table1 auto-inccounter value in ::info
Bug #36411: Failed to read auto-increment value from storage engine" in 5.1.24 auto-inc

Detailed revision comments:

r2854 | sunny | 2008-10-23 08:30:32 +0300 (Thu, 23 Oct 2008) | 13 lines
branches/5.1: Backport changes from branches/zip r2725

Simplify the autoinc initialization code. This removes the
non-determinism related to reading the table's autoinc value for the first
time. This change has also reduced the sizeof dict_table_t by sizeof(ibool)
bytes because we don't need the dict_table_t::autoinc_inited field anymore.

rb://16
2008-12-14 13:59:50 -07:00
Timothy Smith
a32e048645 Apply InnoDB snapshot innodb-5.1-ss2858, part 13. Fixes
Bug #40224: New AUTOINC changes mask reporting of deadlock/timeout errors


Detailed revision comments:

r2849 | sunny | 2008-10-22 12:01:18 +0300 (Wed, 22 Oct 2008) | 8 lines
branches/5.1: Return the actual error code encountered when allocating
a new autoinc value. The change in behavior (bug) was introduced in 5.1.22
when we introduced the new AUTOINC locking model.

rb://31
2008-12-14 13:56:33 -07:00
Timothy Smith
22f6a8424c Apply InnoDB snapshot innodb-5.1-2858, part 7.
A follow-up fix for Bug 38839, which exposed a pre-existing bug in the
autoinc handling.

Detailed revision comments:

r2722 | sunny | 2008-10-04 02:48:04 +0300 (Sat, 04 Oct 2008) | 18 lines
branches/5.1: This bug has always existed but was masked by other errors. The
fix for bug# 38839 triggered this bug. When the offset and increment are > 1
we need to calculate the next value taking into consideration the two
variables. Previously we simply assumed they were 1 particularly offset was
never used. MySQL does its own calculation and that's probably why it seemed
to work in the past. We would return what we thought was the correct next
value and then MySQL would recalculate the actual value from that and return
it to the caller (e.g., handler::write_row()). Several new tests have been
added that try and catch some edge cases. The tests exposed a wrap around
error in MySQL next value calculation which was filed as bug 39828. The tests
will need to be updated once MySQL fix that bug.

One good side effect of this fix is that dict_table_t size has been
reduced by 8 bytes because we have moved the autoinc_increment field to
the row_prebuilt_t structure. See review-board for a detailed discussion.

rb://3
2008-12-14 13:42:37 -07:00
Timothy Smith
f4d38a034f Apply InnoDB snapshot innodb-5.1-ss2858, part 3.
branches/5.1:

Silence a compilation warning in UNIV_DEBUG.

Approved by:    Marko (via IM)
2008-12-14 13:27:13 -07:00
Timothy Smith
19cdcb1f6b Apply InnoDB snapshot innodb-5.1-ss2858, part 2. Fixes
Bug#38231: Innodb crash in lock_reset_all_on_table() on TRUNCATE + LOCK / UNLOCK

branches/5.1:

Fix Bug#38231 Innodb crash in lock_reset_all_on_table() on TRUNCATE + LOCK / UNLOCK

In TRUNCATE TABLE and discard tablespace: do not remove table-level S
and X locks and do not assert on such locks not being wait locks.
Leave such locks alone.

Approved by:    Heikki (rb://14)
2008-12-14 13:00:37 -07:00
Timothy Smith
2450190eed Apply InnoDB snapshot innodb-5.1-ss2637, part 1. Fixes
Bug #37885: row_search_for_mysql may gap lock unnecessarily with SQL comments in query


Detailed revision comments:

r2603 | marko | 2008-08-21 16:25:05 +0300 (Thu, 21 Aug 2008) | 10 lines
branches/5.1: Identify SELECT statements by thd_sql_command() == SQLCOM_SELECT
instead of parsing the query string.  This fixes MySQL Bug #37885 without
us having to implement lexical analysis of SQL comments in yet another place.

thd_is_select(): A new predicate.

row_search_for_mysql(): Use thd_is_select().

Approved by Heikki.
2008-12-14 12:28:19 -07:00
Timothy Smith
f6bf85c09e Complete application of InnoDB snapshot innodb-5.1-ss2545.
Fix race condition which could result in freeing a struct that is
still in use by another thread.


Detailed revision comments:

r2537 | inaam | 2008-07-15 20:46:03 +0300 (Tue, 15 Jul 2008) | 12 lines
branches/5.1   issue# 4

Fixed a timing hole where a thread dropping an index can free the
in-memory index struct while another thread is still using
that structure to remove entries from adaptive hash index belonging
to one of the pages that belongs to the index being dropped.

The fix is to have a reference counter in the index struct and to
wait for this counter to drop to zero beforing freeing the struct.

Reviewed by: Heikki

r2543 | inaam | 2008-07-22 18:57:43 +0300 (Tue, 22 Jul 2008) | 7 lines
branches/5.1:

Removed UNIV_INLINE qualifier from btr_search_info_get_ref_count().
Otherwise compilation failed on non-debug builds.

Pointed by: Vasil
2008-12-14 12:25:33 -07:00
Timothy Smith
efbac9aabc Complete application of InnoDB snapshot innodb-5.1-ss2485, part 1. Fixes
Bug #36819: ut_usectime does not handle errors from gettimeofday


Detailed revision comments:

r2480 | vasil | 2008-05-27 11:40:07 +0300 (Tue, 27 May 2008) | 11 lines
branches/5.1:

Fix Bug#36819 ut_usectime does not handle errors from gettimeofday

by retrying gettimeofday() several times if it fails in ut_usectime().
If it fails on all calls then return error to the caller to be handled
at higher level.

Update the variable innodb_row_lock_time_max in SHOW STATUS output only
if ut_usectime() was successful.
2008-12-14 12:18:59 -07:00
Timothy Smith
239ab2c46a Cherry-pick some changes from innodb-5.1-ss2479 snapshot. Includes fixes for
Bug#36600 and Bug#36793:

Bug #36600 SHOW STATUS takes a lot of CPU in buf_get_latched_pages_number

Fix by removing the Innodb_buffer_pool_pages_latched variable from SHOW
STATUS output in non-UNIV_DEBUG compilation.

Bug #36793 rpl_innodb_bug28430 fails on Solaris

This is a back port from branches/zip. This code has been tested on a
big-endian machine too.
2008-08-19 18:37:41 -06:00
unknown
1f21098a9b apply snapshot innodb-5.1-ss2387
------------------------------------------------------------------------
r2361 | sunny | 2008-03-12 09:08:09 +0200 (Wed, 12 Mar 2008) | 3 lines
Changed paths:
   M /branches/5.1/include/srv0srv.h
   M /branches/5.1/os/os0file.c
   M /branches/5.1/srv/srv0srv.c
   M /branches/5.1/srv/srv0start.c

branches/5.1: Remove the innodb_flush_method fdatasync option since it was
not being used and there was a potential it could mislead users.

------------------------------------------------------------------------
r2367 | marko | 2008-03-17 10:23:03 +0200 (Mon, 17 Mar 2008) | 5 lines
Changed paths:
   M /branches/5.1/handler/ha_innodb.cc

branches/5.1: ha_innobase::check_if_incompatible_data(): Check
HA_CREATE_USED_ROW_FORMAT before comparing row_type.  Previously,
the comparison was incorrectly guarded by the presence of an
AUTO_INCREMENT attribute.

------------------------------------------------------------------------
r2374 | vasil | 2008-03-18 09:35:30 +0200 (Tue, 18 Mar 2008) | 11 lines
Changed paths:
   M /branches/5.1/dict/dict0dict.c
   A /branches/5.1/mysql-test/innodb_bug35220.result
   A /branches/5.1/mysql-test/innodb_bug35220.test

branches/5.1:

Fix Bug#35220 ALTER TABLE too picky on reserved word "foreign".

In ALTER TABLE, change the internal parser to search for
``FOREIGN[[:space:]]'' instead of only ``FOREIGN'' when parsing
ALTER TABLE ... DROP FOREIGN KEY ...; otherwise it could be mistaken
with ALTER TABLE ... DROP foreign_col;

Approved by:    Heikki

------------------------------------------------------------------------
r2379 | vasil | 2008-03-19 18:48:00 +0200 (Wed, 19 Mar 2008) | 10 lines
Changed paths:
   M /branches/5.1/os/os0file.c

branches/5.1:

Fix Bug#34823:
fsync() occasionally returns ENOLCK and causes InnoDB to restart mysqld

Create a wrapper to fsync(2) that retries the operation if the error is
ENOLCK. Use that wrapper instead of fsync(2).

Approved by:    Heikki

------------------------------------------------------------------------
r2380 | sunny | 2008-03-21 05:03:56 +0200 (Fri, 21 Mar 2008) | 9 lines
Changed paths:
   M /branches/5.1/include/trx0undo.h
   M /branches/5.1/trx/trx0trx.c
   M /branches/5.1/trx/trx0undo.c

branches/5.1: Fix for Bug# 35352. We've added a heuristic that checks
the size of the UNDO slots cache lists (insert and upate). If either of
cached lists has more than 500 entries then we add any UNDO slots that are
freed, to the common free list instead of the cache list, this is to avoid
the case where all the free slots end up in only one of the lists on startup
after a crash.

Tested with test case for 26590 and passes all mysql-test(s).

------------------------------------------------------------------------
r2383 | vasil | 2008-03-26 09:35:22 +0200 (Wed, 26 Mar 2008) | 4 lines
Changed paths:
   M /branches/5.1/include/row0mysql.h

branches/5.1:

Fix typo in comment.

------------------------------------------------------------------------
r2384 | vasil | 2008-03-26 18:26:54 +0200 (Wed, 26 Mar 2008) | 20 lines
Changed paths:
   A /branches/5.1/mysql-test/innodb_bug34300.result
   A /branches/5.1/mysql-test/innodb_bug34300.test
   M /branches/5.1/row/row0sel.c

branches/5.1:

Fix Bug#34300 Tinyblob & tinytext fields currupted after export/import and alter in 5.1

Copy the BLOB fields, that are stored internally, to a safe place
(prebuilt->blob_heap) when converting a row from InnoDB format to
MySQL format in row_sel_store_mysql_rec().

The bug was introduced in:

 ------------------------------------------------------------------------
 r587 | osku | 2006-05-23 15:35:58 +0300 (Tue, 23 May 2006) | 3 lines

 Optimize BLOB selects by using prebuilt->blob_heap directly instead of first
 reading BLOB data to a temporary heap and then copying it to
 prebuilt->blob_heap.
 ------------------------------------------------------------------------

Approved by:    Heikki

------------------------------------------------------------------------
r2386 | vasil | 2008-03-27 07:45:02 +0200 (Thu, 27 Mar 2008) | 22 lines
Changed paths:
   M /branches/5.1/mysql-test/innodb.result

branches/5.1:

Merge change from MySQL (this fixes the failing innodb test):

ChangeSet@1.1810.3601.4, 2008-02-07 02:33:21+04:00, gshchepa@host.loc +9 -0
  Fixed bug#30059.
  Server handles truncation for assignment of too-long values
  into CHAR/VARCHAR/TEXT columns in a different ways when the
  truncated characters are spaces:
  1. CHAR(N) columns silently ignore end-space truncation;
  2. TEXT columns post a truncation warning/error in the
     non-strict/strict mode.
  3. VARCHAR columns always post a truncation note in
     any mode.

  Space truncation processing has been synchronised over
  CHAR/VARCHAR/TEXT columns: current behavior of VARCHAR
  columns has been propagated as standard.

  Binary-encoded string/BLOB columns are not affected.


------------------------------------------------------------------------
r2387 | vasil | 2008-03-27 08:49:05 +0200 (Thu, 27 Mar 2008) | 8 lines
Changed paths:
   M /branches/5.1/row/row0sel.c

branches/5.1:

Check whether *trx->mysql_query_str is != NULL in addition to
trx->mysql_query_str. This adds more safety.

This may or may not fix Bug#35226 RBR event crashes slave.


------------------------------------------------------------------------


storage/innobase/dict/dict0dict.c:
  apply snapshot innodb-5.1-ss2387
storage/innobase/handler/ha_innodb.cc:
  apply snapshot innodb-5.1-ss2387
storage/innobase/include/row0mysql.h:
  apply snapshot innodb-5.1-ss2387
storage/innobase/include/srv0srv.h:
  apply snapshot innodb-5.1-ss2387
storage/innobase/include/trx0undo.h:
  apply snapshot innodb-5.1-ss2387
storage/innobase/os/os0file.c:
  apply snapshot innodb-5.1-ss2387
storage/innobase/row/row0sel.c:
  apply snapshot innodb-5.1-ss2387
storage/innobase/srv/srv0srv.c:
  apply snapshot innodb-5.1-ss2387
storage/innobase/srv/srv0start.c:
  apply snapshot innodb-5.1-ss2387
storage/innobase/trx/trx0trx.c:
  apply snapshot innodb-5.1-ss2387
storage/innobase/trx/trx0undo.c:
  apply snapshot innodb-5.1-ss2387
2008-03-27 15:13:10 +01:00
unknown
9aaab69ab1 Apply innodb-5.1-ss2360 snapshot
Fixes:
- Bug #34920: auto_increment resets to 1 on foreign key creation
  We need to use/inherit the passed in autoinc counter for ALTER TABLE
  statements too.


mysql-test/r/innodb.result:
  Apply innodb-5.1-ss2360 snapshot
  
  Revision r2345:
  branches/5.1: Fix Bug# 34920. We need to use/inherit the passed in autoinc
  counter for ALTER TABLE statements too.
mysql-test/t/innodb.test:
  Apply innodb-5.1-ss2360 snapshot
  
  Revision r2345:
  branches/5.1: Fix Bug# 34920. We need to use/inherit the passed in autoinc
  counter for ALTER TABLE statements too.
storage/innobase/dict/dict0dict.c:
  Apply innodb-5.1-ss2360 snapshot
  
  Revision r2353:
  branches/5.1: Change the InnoDB autoinc type to ulint64. For this added a
  new typedef to univ.i (ib_ulonglong). Added checks for overflow and removed
  the assertion where it crashed previously, since the type has now changed
  to unsigned, it doesn't make sense to check for < 0. Added new tests, to
  check for overflow, for the different INT types supported for both
  signed and unsigned.
storage/innobase/handler/ha_innodb.cc:
  Apply innodb-5.1-ss2360 snapshot
  
  Revision r2353:
  branches/5.1: Change the InnoDB autoinc type to ulint64. For this added a
  new typedef to univ.i (ib_ulonglong). Added checks for overflow and removed
  the assertion where it crashed previously, since the type has now changed
  to unsigned, it doesn't make sense to check for < 0. Added new tests, to
  check for overflow, for the different INT types supported for both
  signed and unsigned.
  
  
  Revision r2345:
  branches/5.1: Fix Bug# 34920. We need to use/inherit the passed in autoinc
  counter for ALTER TABLE statements too.
storage/innobase/handler/ha_innodb.h:
  Apply innodb-5.1-ss2360 snapshot
  
  Revision r2353:
  branches/5.1: Change the InnoDB autoinc type to ulint64. For this added a
  new typedef to univ.i (ib_ulonglong). Added checks for overflow and removed
  the assertion where it crashed previously, since the type has now changed
  to unsigned, it doesn't make sense to check for < 0. Added new tests, to
  check for overflow, for the different INT types supported for both
  signed and unsigned.
storage/innobase/include/dict0dict.h:
  Apply innodb-5.1-ss2360 snapshot
  
  Revision r2353:
  branches/5.1: Change the InnoDB autoinc type to ulint64. For this added a
  new typedef to univ.i (ib_ulonglong). Added checks for overflow and removed
  the assertion where it crashed previously, since the type has now changed
  to unsigned, it doesn't make sense to check for < 0. Added new tests, to
  check for overflow, for the different INT types supported for both
  signed and unsigned.
storage/innobase/include/dict0mem.h:
  Apply innodb-5.1-ss2360 snapshot
  
  Revision r2353:
  branches/5.1: Change the InnoDB autoinc type to ulint64. For this added a
  new typedef to univ.i (ib_ulonglong). Added checks for overflow and removed
  the assertion where it crashed previously, since the type has now changed
  to unsigned, it doesn't make sense to check for < 0. Added new tests, to
  check for overflow, for the different INT types supported for both
  signed and unsigned.
storage/innobase/include/row0sel.h:
  Apply innodb-5.1-ss2360 snapshot
  
  Revision r2353:
  branches/5.1: Change the InnoDB autoinc type to ulint64. For this added a
  new typedef to univ.i (ib_ulonglong). Added checks for overflow and removed
  the assertion where it crashed previously, since the type has now changed
  to unsigned, it doesn't make sense to check for < 0. Added new tests, to
  check for overflow, for the different INT types supported for both
  signed and unsigned.
storage/innobase/include/univ.i:
  Apply innodb-5.1-ss2360 snapshot
  
  Revision r2353:
  branches/5.1: Change the InnoDB autoinc type to ulint64. For this added a
  new typedef to univ.i (ib_ulonglong). Added checks for overflow and removed
  the assertion where it crashed previously, since the type has now changed
  to unsigned, it doesn't make sense to check for < 0. Added new tests, to
  check for overflow, for the different INT types supported for both
  signed and unsigned.
storage/innobase/row/row0sel.c:
  Apply innodb-5.1-ss2360 snapshot
  
  Revision r2353:
  branches/5.1: Change the InnoDB autoinc type to ulint64. For this added a
  new typedef to univ.i (ib_ulonglong). Added checks for overflow and removed
  the assertion where it crashed previously, since the type has now changed
  to unsigned, it doesn't make sense to check for < 0. Added new tests, to
  check for overflow, for the different INT types supported for both
  signed and unsigned.
2008-03-27 02:40:45 +01:00
unknown
4b25d5b10c Applied InnoDB snapshot innodb-5.1-ss2298
Fixes the following bugs:

- Bug #33349: possible race condition revolving around data dictionary and repartitioning
  Introduce retry/sleep logic as a workaround for a transient bug
  where ::open fails for partitioned tables randomly if we are using
  one file per table.

- Bug #34053: normal users can enable innodb_monitor logging
  In CREATE TABLE and DROP TABLE check whether the table in question is one
  of the magic innodb_monitor tables and whether the user has enough rights
  to mess with it before doing anything else.

- Bug #22868: 'Thread thrashing' with > 50 concurrent conns under an upd-intensive workloadw
- Bug #29560: InnoDB >= 5.0.30 hangs on adaptive hash rw-lock 'waiting for an X-lock'
  This is a combination of changes that forward port the scalability fix applied to 5.0
  through r1001.
  It reverts changes r149 and r122 (these were 5.1 specific changes made in lieu of
  scalability fix of 5.0)
  Then it applies r1001 to 5.0 which is the original scalability fix.
  Finally it applies r2082 which fixes an issue with the original fix.

- Bug #30930: Add auxiliary function to retrieve THD::thread_id
  Add thd_get_thread_id() function.  Also make check_global_access() function
  visible to InnoDB under INNODB_COMPATIBILITY_HOOKS #define.


include/mysql/plugin.h:
  Add thd_get_thread_id() accessor function
mysql-test/r/innodb.result:
  Applied InnoDB snapshot innodb-5.1-ss2298
  
  Revision r2261:
  branches/5.1: Merge a change from MySQL AB:
  
  ChangeSet@2007-10-13 15:49:42+03:00, aelkin@koti.dsl.inet.fi
  
  Bug #29136 erred multi-delete on trans table does not rollback the statement
  
  innodb.test, innodb.result: trans table specific test added
mysql-test/t/innodb.test:
  Applied InnoDB snapshot innodb-5.1-ss2298
sql/mysql_priv.h:
  Make check_global_access() declaration available if when
  INNODB_COMPATIBILITY_HOOKS is defined.
sql/sql_class.cc:
  Add thd_get_thread_id() accessor function.
  
  Add 'extern "C"' to definition for thd_get_xid().  Not strictly
  needed, but in keeping with our coding style.
storage/innobase/btr/btr0cur.c:
  Applied InnoDB snapshot innodb-5.1-ss2298
  
  Revision r2295:
  branches/5.1:
  
  Merge r2294 from branches/5.0:
  
  Fix typo and add comma in comment.
storage/innobase/handler/ha_innodb.cc:
  Applied InnoDB snapshot innodb-5.1-ss2298
  
  - But remove the declaration of check_global_access() from ha_innodb.cc,
    because it is now visible in mysql_priv.h under INNODB_COMPATIBILITY_HOOKS
  
  Revision r2270:
  branches/5.1:
  
  Rename the user visible parameter innodb-use-adaptive-hash-indexes to
  innodb-adaptive-hash-index so that it is in sync with MySQL 5.0.
  
  Suggested by:	Heikki
  Approved by:	Heikki
  
  
  Revision r2236:
  branches/5.1: bug#33349
  
  Introduce retry/sleep logic as a workaround for a transient bug
  where ::open fails for partitioned tables randomly if we are using
  one file per table.
  
  
  Reviewed by: Heikki
  
  
  Revision r2282:
  branches/5.1:
  
  Fix Bug#34053:
  * In CREATE TABLE and DROP TABLE check whether the table in question is one
    of the magic innodb_monitor tables and whether the user has enough rights
    to mess with it before doing anything else.
  * Implement a mysql-test testcase.
  
  Approved by:	Heikki
  
  
  Revision r2246:
  branches/5.1:
  
  Fix formatting of the autoinc-lock-mode command line parameter.
  
  Old view (./mysqld --help --verbose):
  
    --innodb-autoinc-lock-mode=#
                        The AUTOINC lock modes supported by InnoDB:
    0 => Old
                        style AUTOINC locking (for backward compatibility)
    1 =>
                        New style AUTOINC locking
    2 => No AUTOINC locking
                        (unsafe for SBR)
  
  New view:
  
    --innodb-autoinc-lock-mode=#
                        The AUTOINC lock modes supported by InnoDB:
                        0 => Old style AUTOINC locking (for backward
                        compatibility)
                        1 => New style AUTOINC locking
                        2 => No AUTOINC locking (unsafe for SBR)
  
  Looks like these strings are "automatically" wrapped by MySQL in the
  following way:
  * newlines (\n) in the string are ignored
  * newline separator (\n) is inserted every 57 or so characters.
  * lots of white space is appended to each inserted new line.
  
  Approved by:	Heikki
storage/innobase/include/os0sync.h:
  Applied InnoDB snapshot innodb-5.1-ss2298
  
  Revision r2268:
  branches/5.1: Port of r2267
  
  This is a combination of changes that forward port the scalability fix applied to 5.0
  through r1001.
  It reverts changes r149 and r122 (these were 5.1 specific changes made in lieu of
  scalability fix of 5.0)
  Then it applies r1001 to 5.0 which is the original scalability fix.
  Finally it applies r2082 which fixes an issue with the original fix.
  
  Reviewed by: Heikki
storage/innobase/include/read0read.h:
  Applied InnoDB snapshot innodb-5.1-ss2298
  
  Revision r2188:
  branches/5.1: Remove unused field can_be_too_old from read_view_struct.
storage/innobase/include/row0mysql.h:
  Applied InnoDB snapshot innodb-5.1-ss2298
  
  Revision r2282:
  branches/5.1:
  
  Fix Bug#34053:
  * In CREATE TABLE and DROP TABLE check whether the table in question is one
    of the magic innodb_monitor tables and whether the user has enough rights
    to mess with it before doing anything else.
  * Implement a mysql-test testcase.
  
  Approved by:	Heikki
  
  
  Revision r2272:
  branches/5.1:
  
  Fix typo in comment.
storage/innobase/include/sync0arr.h:
  Applied InnoDB snapshot innodb-5.1-ss2298
  
  Revision r2268:
  branches/5.1: Port of r2267
  
  This is a combination of changes that forward port the scalability fix applied to 5.0
  through r1001.
  It reverts changes r149 and r122 (these were 5.1 specific changes made in lieu of
  scalability fix of 5.0)
  Then it applies r1001 to 5.0 which is the original scalability fix.
  Finally it applies r2082 which fixes an issue with the original fix.
  
  Reviewed by: Heikki
storage/innobase/include/sync0rw.h:
  Applied InnoDB snapshot innodb-5.1-ss2298
  
  Revision r2268:
  branches/5.1: Port of r2267
  
  This is a combination of changes that forward port the scalability fix applied to 5.0
  through r1001.
  It reverts changes r149 and r122 (these were 5.1 specific changes made in lieu of
  scalability fix of 5.0)
  Then it applies r1001 to 5.0 which is the original scalability fix.
  Finally it applies r2082 which fixes an issue with the original fix.
  
  Reviewed by: Heikki
storage/innobase/include/sync0rw.ic:
  Applied InnoDB snapshot innodb-5.1-ss2298
  
  Revision r2268:
  branches/5.1: Port of r2267
  
  This is a combination of changes that forward port the scalability fix applied to 5.0
  through r1001.
  It reverts changes r149 and r122 (these were 5.1 specific changes made in lieu of
  scalability fix of 5.0)
  Then it applies r1001 to 5.0 which is the original scalability fix.
  Finally it applies r2082 which fixes an issue with the original fix.
  
  Reviewed by: Heikki
storage/innobase/include/sync0sync.h:
  Applied InnoDB snapshot innodb-5.1-ss2298
  
  Revision r2268:
  branches/5.1: Port of r2267
  
  This is a combination of changes that forward port the scalability fix applied to 5.0
  through r1001.
  It reverts changes r149 and r122 (these were 5.1 specific changes made in lieu of
  scalability fix of 5.0)
  Then it applies r1001 to 5.0 which is the original scalability fix.
  Finally it applies r2082 which fixes an issue with the original fix.
  
  Reviewed by: Heikki
storage/innobase/include/sync0sync.ic:
  Applied InnoDB snapshot innodb-5.1-ss2298
  
  Revision r2268:
  branches/5.1: Port of r2267
  
  This is a combination of changes that forward port the scalability fix applied to 5.0
  through r1001.
  It reverts changes r149 and r122 (these were 5.1 specific changes made in lieu of
  scalability fix of 5.0)
  Then it applies r1001 to 5.0 which is the original scalability fix.
  Finally it applies r2082 which fixes an issue with the original fix.
  
  Reviewed by: Heikki
storage/innobase/os/os0sync.c:
  Applied InnoDB snapshot innodb-5.1-ss2298
  
  Revision r2268:
  branches/5.1: Port of r2267
  
  This is a combination of changes that forward port the scalability fix applied to 5.0
  through r1001.
  It reverts changes r149 and r122 (these were 5.1 specific changes made in lieu of
  scalability fix of 5.0)
  Then it applies r1001 to 5.0 which is the original scalability fix.
  Finally it applies r2082 which fixes an issue with the original fix.
  
  Reviewed by: Heikki
storage/innobase/read/read0read.c:
  Applied InnoDB snapshot innodb-5.1-ss2298
  
  Revision r2188:
  branches/5.1: Remove unused field can_be_too_old from read_view_struct.
storage/innobase/row/row0mysql.c:
  Applied InnoDB snapshot innodb-5.1-ss2298
  
  Revision r2282:
  branches/5.1:
  
  Fix Bug#34053:
  * In CREATE TABLE and DROP TABLE check whether the table in question is one
    of the magic innodb_monitor tables and whether the user has enough rights
    to mess with it before doing anything else.
  * Implement a mysql-test testcase.
  
  Approved by:	Heikki
  
  
  Revision r2272:
  branches/5.1:
  
  Fix typo in comment.
storage/innobase/srv/srv0srv.c:
  Applied InnoDB snapshot innodb-5.1-ss2298
  
  Revision r2268:
  branches/5.1: Port of r2267
  
  This is a combination of changes that forward port the scalability fix applied to 5.0
  through r1001.
  It reverts changes r149 and r122 (these were 5.1 specific changes made in lieu of
  scalability fix of 5.0)
  Then it applies r1001 to 5.0 which is the original scalability fix.
  Finally it applies r2082 which fixes an issue with the original fix.
  
  Reviewed by: Heikki
storage/innobase/sync/sync0arr.c:
  Applied InnoDB snapshot innodb-5.1-ss2298
  
  Revision r2268:
  branches/5.1: Port of r2267
  
  This is a combination of changes that forward port the scalability fix applied to 5.0
  through r1001.
  It reverts changes r149 and r122 (these were 5.1 specific changes made in lieu of
  scalability fix of 5.0)
  Then it applies r1001 to 5.0 which is the original scalability fix.
  Finally it applies r2082 which fixes an issue with the original fix.
  
  Reviewed by: Heikki
storage/innobase/sync/sync0rw.c:
  Applied InnoDB snapshot innodb-5.1-ss2298
  
  Revision r2268:
  branches/5.1: Port of r2267
  
  This is a combination of changes that forward port the scalability fix applied to 5.0
  through r1001.
  It reverts changes r149 and r122 (these were 5.1 specific changes made in lieu of
  scalability fix of 5.0)
  Then it applies r1001 to 5.0 which is the original scalability fix.
  Finally it applies r2082 which fixes an issue with the original fix.
  
  Reviewed by: Heikki
storage/innobase/sync/sync0sync.c:
  Applied InnoDB snapshot innodb-5.1-ss2298
  
  Revision r2268:
  branches/5.1: Port of r2267
  
  This is a combination of changes that forward port the scalability fix applied to 5.0
  through r1001.
  It reverts changes r149 and r122 (these were 5.1 specific changes made in lieu of
  scalability fix of 5.0)
  Then it applies r1001 to 5.0 which is the original scalability fix.
  Finally it applies r2082 which fixes an issue with the original fix.
  
  Reviewed by: Heikki
mysql-test/r/innodb_bug34053.result:
  Applied InnoDB snapshot innodb-5.1-ss2298
  
  Revision r2282:
  branches/5.1:
  
  Fix Bug#34053:
  * In CREATE TABLE and DROP TABLE check whether the table in question is one
    of the magic innodb_monitor tables and whether the user has enough rights
    to mess with it before doing anything else.
  * Implement a mysql-test testcase.
  
  Approved by:	Heikki
mysql-test/t/innodb_bug34053.test:
  Applied InnoDB snapshot innodb-5.1-ss2298
  
  Revision r2282:
  branches/5.1:
  
  Fix Bug#34053:
  * In CREATE TABLE and DROP TABLE check whether the table in question is one
    of the magic innodb_monitor tables and whether the user has enough rights
    to mess with it before doing anything else.
  * Implement a mysql-test testcase.
  
  Approved by:	Heikki
2008-02-19 09:44:09 -07:00
unknown
fcd89fccfd Applied InnoDB snapshot innodb-5.1-ss2093
Fixes the following bug:

- Bug #32125: Database crash due to ha_innodb.cc:3896: ulint convert_search_mode_to_innobase

  When unknown find_flag is encountered in convert_search_mode_to_innobase()
  do not call assert(0); instead queue a MySQL error using my_error() and
  return the error code PAGE_CUR_UNSUPP. Change the functions that call
  convert_search_mode_to_innobase() to handle that error code by "canceling"
  execution and returning appropriate error code further upstream.


storage/innobase/dict/dict0dict.c:
  Applied InnoDB snapshot innodb-5.1-ss2093
  
  Revision r2092:
  Remove the unused function innobase_convert_from_filename() that was
  inadvertently added in r590.
storage/innobase/handler/ha_innodb.cc:
  Applied InnoDB snapshot innodb-5.1-ss2093
  
  Revision r2088:
  Fix Bug#32125 (http://bugs.mysql.com/32125)
  "Database crash due to ha_innodb.cc:3896: ulint convert_search_mode_to_innobase":
  
  When unknown find_flag is encountered in convert_search_mode_to_innobase()
  do not call assert(0); instead queue a MySQL error using my_error() and
  return the error code PAGE_CUR_UNSUPP. Change the functions that call
  convert_search_mode_to_innobase() to handle that error code by "canceling"
  execution and returning appropriate error code further upstream.
  
  Approved by:	Heikki (via IM)
  
  
  
  Revision r2093:
  convert_search_mode_to_innobase(): Add the missing case label
  HA_READ_MBR_EQUAL that was forgotten in r2088.
  
  
  Revision r2089:
  Non-functional change: convert the switch in convert_search_mode_to_innobase()
  to the InnoDB coding style.
  
  
  Revision r2092:
  Remove the unused function innobase_convert_from_filename() that was
  inadvertently added in r590.
storage/innobase/include/page0cur.h:
  Applied InnoDB snapshot innodb-5.1-ss2093
  
  Revision r2088:
  Fix Bug#32125 (http://bugs.mysql.com/32125)
  "Database crash due to ha_innodb.cc:3896: ulint convert_search_mode_to_innobase":
  
  When unknown find_flag is encountered in convert_search_mode_to_innobase()
  do not call assert(0); instead queue a MySQL error using my_error() and
  return the error code PAGE_CUR_UNSUPP. Change the functions that call
  convert_search_mode_to_innobase() to handle that error code by "canceling"
  execution and returning appropriate error code further upstream.
  
  Approved by:	Heikki (via IM)
2007-11-20 12:23:18 -07:00
unknown
bdffce056b Apply snapshot innodb-5.1-ss2034
The following bugs are fixed:

Bug #31860: Server crashes after inserting into InnoDB table with auto_increment column
  In the Bug 16979 fix there was an erroneous assertion that
  autoincrement columns can't contain negative values. With the fix, the
  autoincrement table counter is set to 0 if the maximum value read from
  the autoinc column index is negative.


mysql-test/r/innodb.result:
  Apply snapshot innodb-5.1-ss2034
  
  Revision r2034:
  Fix for Bug# 31860, in the Bug 16979 fix there was an erroneous assertion that
  autoincrement columns can't contain negative values. With the fix, the
  autoincrement table counter is set to 0 if the maximum value read from
  the autoinc column index is negative.
  
  Add test for the bug fix but the test is not really useful as the server
  needs to be restarted half way through the test. It has been added for 
  reference only.
mysql-test/t/innodb.test:
  Apply snapshot innodb-5.1-ss2034
  
  Revision r2034:
  Fix for Bug# 31860, in the Bug 16979 fix there was an erroneous assertion that
  autoincrement columns can't contain negative values. With the fix, the
  autoincrement table counter is set to 0 if the maximum value read from
  the autoinc column index is negative.
  
  Add test for the bug fix but the test is not really useful as the server
  needs to be restarted half way through the test. It has been added for 
  reference only.
storage/innobase/handler/ha_innodb.cc:
  Apply snapshot innodb-5.1-ss2034
  
  Revision r2017:
  Use "InnoDB:" prefix in error messages.
  
  
  Revision r2018:
  Remove ut_print_timestamp(), this should have been removed when the following
  changes were made by MySQL.
  
  	ChangeSet@1.1810.467.1  2005-08-11 19:19:20+03:00  jani@omakaista.fi
  
  Fix error message so that it conforms to "  InnoDB: Error: ...".
storage/innobase/include/univ.i:
  Apply snapshot innodb-5.1-ss2034
  
  Revision r2015:
  UNIV_MEM_ASSERT_RW(), UNIV_MEM_ASSERT_W(): Remove warnings on 64-bit systems.
storage/innobase/row/row0sel.c:
  Apply snapshot innodb-5.1-ss2034
  
  Revision r2034:
  Fix for Bug# 31860, in the Bug 16979 fix there was an erroneous assertion that
  autoincrement columns can't contain negative values. With the fix, the
  autoincrement table counter is set to 0 if the maximum value read from
  the autoinc column index is negative.
  
  Add test for the bug fix but the test is not really useful as the server
  needs to be restarted half way through the test. It has been added for 
  reference only.
storage/innobase/sync/sync0sync.c:
  Apply snapshot innodb-5.1-ss2034
  
  Revision r2017:
  Use "InnoDB:" prefix in error messages.
2007-11-06 16:40:50 -07:00
unknown
e2513bf07f Apply snapshot innodb-5.1-ss1989
Fixes the following bugs:

Bug #30706: SQL thread on slave is allowed to block client queries when slave load is high
  Add (innodb|innobase|srv)_replication_delay MySQL config parameter.

Bug #30888: Innodb table + stored procedure + row deletion = server crash
  While adding code for the low level read of the AUTOINC value from the index,
  the case for MEDIUM ints which are 3 bytes was missed triggering an
  assertion.

Bug #30907: Regression: "--innodb_autoinc_lock_mode=0" (off) not same as older releases
  We don't rely on *first_value to be 0 when checking whether
  get_auto_increment() has been invoked for the first time in a multi-row
  INSERT. We instead use trx_t::n_autoinc_rows. Initialize trx::n_autoinc_rows
  inside ha_innobase::start_stmt() too.

Bug #31444: "InnoDB: Error: MySQL is freeing a thd" in innodb_mysql.test
  ha_innobase::external_lock(): Update prebuilt->mysql_has_locked and
  trx->n_mysql_tables_in_use only after row_lock_table_for_mysql() returns
  DB_SUCCESS.  A timeout on LOCK TABLES would lead to an inconsistent state,
  which would cause trx_free() to print a warning.

Bug #31494: innodb + 5.1 + read committed crash, assertion
  Set an error code when a deadlock occurs in semi-consistent read.


mysql-test/r/innodb.result:
  Apply snapshot innodb-5.1-ss1989
  
  Also, a test is moved into the new innodb_autoinc_lock_mode_zero
  test, because it depends on a non-default setting for a read-only
  variable.
  
  Revision r1821:
  Merge a change from MySQL AB:
  
  ChangeSet@1.2536.50.1  2007-08-02 12:45:56-07:00  igor@mysql.com
  
  Fixed bug#28404.
  This patch adds cost estimation for the queries with ORDER BY / GROUP BY
  and LIMIT.
  If there was a ref/range access to the table whose rows were required
  to be ordered in the result set the optimizer always employed this access
  though a scan by a different index that was compatible with the required
  order could be cheaper to produce the first L rows of the result set.
  Now for such queries the optimizer makes a choice between the cheapest
  ref/range accesses not compatible with the given order and index scans
  compatible with it.
  
  innodb.result: Adjusted results for test cases affected fy the fix for
  bug #28404.
  
  
  Revision r1781:
  Fix a test case that was broken after Bug#16979 fix. See r1645 and r1735.
  The variable used in the tests below was introduced in r1735.
  
  
  Revision r1792:
  innodb.result: Revert r1655, which should have been reverted as part of r1781.
  
  
  Revision r1843:
  Add test for Bug# 21409, the actual bug was fixed in r1334.
mysql-test/t/innodb.test:
  Apply snapshot innodb-5.1-ss1989
  
  Also, a test is moved into the new innodb_autoinc_lock_mode_zero
  test, because it depends on a non-default setting for a read-only
  variable.
  
  Revision r1781:
  Fix a test case that was broken after Bug#16979 fix. See r1645 and r1735.
  The variable used in the tests below was introduced in r1735.
  
  
  Revision r1843:
  Add test for Bug# 21409, the actual bug was fixed in r1334.
storage/innobase/buf/buf0lru.c:
  Apply snapshot innodb-5.1-ss1989
  
  Revision r1819:
  Merge r1815:1817 from branches/zip: Improve Valgrind instrumentation.
  
  UNIV_MEM_ASSERT_RW(): New macro, to check that the contents of a memory
  area is defined.
  
  UNIV_MEM_ASSERT_W(): New macro, to check that a memory area is writable.
  
  UNIV_MEM_ASSERT_AND_FREE(): New macro, to check that the memory is
  writable before declaring it free (unwritable).  This replaces UNIV_MEM_FREE()
  in many places.
  
  mem_init_buf(): Check that the memory is writable, and declare it undefined.
  
  mem_erase_buf(): Check that the memory is writable, and declare it freed.
storage/innobase/dict/dict0dict.c:
  Apply snapshot innodb-5.1-ss1989
  
  Revision r1894:
  Add debug lock checks to autoinc functions. Add lock guards around an
  invocation of dict_table_autoinc_initialize().
storage/innobase/dict/dict0load.c:
  Apply snapshot innodb-5.1-ss1989
  
  Revision r1974:
  Prevent loading of tables that have unsupported features most notably
  FTS indexes.
storage/innobase/handler/ha_innodb.cc:
  Apply snapshot innodb-5.1-ss1989
  
  Revision r1850:
  Implement this feature request:
  http://bugs.mysql.com/30706
  
  * Add a function that returns the number of microseconds since
    epoch - ut_time_us().
  
  * Add (innodb|innobase|srv)_replication_delay MySQL config parameter.
  
  * Add UT_WAIT_FOR() macro that waits for a specified condition to occur
    until a timeout elapses.
  
  * Using all of the above, handle the replication thread specially in
    srv_conc_enter_innodb().
  
  Approved by:	Heikki
  
  
  
  Revision r1887:
  Merge changes from MySQL AB:
  
  ChangeSet@1.2528.115.25  2007-08-27 18:18:14-06:00  tsmith@hindu.god
  
  Fix some Windows compiler warnings.
  
  dict0mem.c: Fix compiler warning with a cast.
  
  ha_innodb.cc: Change type to fix a compiler warning.
  
  
  Revision r1809:
  ha_innobase::external_lock(): Update prebuilt->mysql_has_locked and
  trx->n_mysql_tables_in_use only after row_lock_table_for_mysql()
  returns DB_SUCCESS.  A timeout on LOCK TABLES would lead to an
  inconsistent state, which would cause trx_free() to print a warning.
  
  This was later reported as Bug #31444.
  
  
  Revision r1833:
  Add /*== ... === */ decoration that was missing around some auto-inc functions.
  Add a missing comment, fix the length of a decoration.  Initialize the *value
  out parameter in ha_innobase::innobase_get_auto_increment().
  
  
  Revision r1866:
  Revert r1850 as MySQL did not approve the addition.
  
  log for r1850:
  
  Implement this feature request:
  http://bugs.mysql.com/30706
  
  * Add a function that returns the number of microseconds since
    epoch - ut_time_us().
  
  * Add (innodb|innobase|srv)_replication_delay MySQL config parameter.
  
  * Add UT_WAIT_FOR() macro that waits for a specified condition to occur
    until a timeout elapses.
  
  * Using all of the above, handle the replication thread specially in
    srv_conc_enter_innodb().
  
  
  Revision r1846:
  Add config option innodb_use_adaptive_hash_indexes to enable/disable
  adaptive hash indexes. It is enabled by default (no change in default
  behavior).
  
  Approved by:	Marko
  
  
  Revision r1974:
  Prevent loading of tables that have unsupported features most notably
  FTS indexes.
  
  
  Revision r1829:
  Add assertion to enforce check of an implicit invariant and add comment about
  retry of autoinc read semantics. We always reread the table's autoinc counter
  after attempting to initialize it i.e., we want to guarantee that a read of
  autoinc valus that is returned to the caller is always covered by the
  AUTOINC locking mechanism.
  
  
  Revision r1787:
  Move the prototype of innobase_print_identifier() from ut0ut.c to
  ha_prototypes.h.  Enclose the definitions in ha_prototypes.h in
  #ifndef UNIV_HOTBACKUP.
  
  
  Revision r1888:
  Merge a change from MySQL AB:
  
  ChangeSet@1.2528.115.30  2007-08-28 10:17:15-06:00  tsmith@hindu.god
  
  Fix another compiler warning on Windows in InnoDB.
  
  ha_innodb.cc:
  
  Fix compiler warning: ::get_auto_increment takes a ulonglong
  for nb_desired_values, but InnoDB's trx struct stores it as
  a ulint (unsigned long).  Probably harmless, as a single
  statement won't be asking for more than 2^32 rows.
  
  
  Revision r1987:
  Bug fix: The problem was that when write_row() attempted to update the max
  autoinc value, and if it was rolled back because of a deadlock, the 
  deadlock error (transaction rollback) was not being propagated back to MySQL.
  
  
  Revision r1889:
  Merge a change from MySQL AB:
  
  ChangeSet@1.2560  2007-09-21 10:15:16+02:00  gkodinov@local
  
  ha_innodb.cc: fixed type conversion warnings revealed by bug 30639 
  
  
  Revision r1989:
  Suppress printing of deadlock errors while reading the autoinc value.
  DB_DEADLOCK errors are part of normal processing and excessive printing
  of these error messages could be disconcerting for users. 
  
  
  Revision r1828:
  Fix two bugs:
  
  Bug# 30907: We don't rely on *first_value to be 0 when checking whether
  get_auto_increment() has been invoked for the first time in a multi-row
  INSERT. We instead use trx_t::n_autoinc_rows. Initialize trx::n_autoinc_rows
  inside ha_innobase::start_stmt() too.
  
  Bug# 30888: While adding code for the low level read of the AUTOINC value
  from the index, the case for MEDIUM ints which are 3 bytes was missed
  triggering an assertion.
storage/innobase/handler/ha_innodb.h:
  Apply snapshot innodb-5.1-ss1989
  
  Revision r1844:
  Remove the prototypes of some functions inside #if 0.
  The function definitions were removed in r1746.
storage/innobase/ibuf/ibuf0ibuf.c:
  Apply snapshot innodb-5.1-ss1989
  
  Revision r1965:
  ibuf_insert_to_index_page(): Fix typos in diagnostic output.
storage/innobase/include/db0err.h:
  Apply snapshot innodb-5.1-ss1989
  
  Revision r1974:
  Prevent loading of tables that have unsupported features most notably
  FTS indexes.
storage/innobase/include/ha_prototypes.h:
  Apply snapshot innodb-5.1-ss1989
  
  Revision r1787:
  Move the prototype of innobase_print_identifier() from ut0ut.c to
  ha_prototypes.h.  Enclose the definitions in ha_prototypes.h in
  #ifndef UNIV_HOTBACKUP.
storage/innobase/include/mach0data.h:
  Apply snapshot innodb-5.1-ss1989
  
  Revision r1779:
  Fix a bug that handles the case where the host specific byte order matches
  the InnoDB storage byte order, which is big-endian.
storage/innobase/include/mach0data.ic:
  Apply snapshot innodb-5.1-ss1989
  
  Revision r1779:
  Fix a bug that handles the case where the host specific byte order matches
  the InnoDB storage byte order, which is big-endian.
storage/innobase/include/mem0dbg.h:
  Apply snapshot innodb-5.1-ss1989
  
  Revision r1830:
  Improve memory debugging.  This is follow-up to r1819.
  
  mem_heap_validate(): Compile this function also if UNIV_MEM_DEBUG is
  defined.  Previously, this function was only compiled with UNIV_DEBUG.
  
  mem_heap_free_heap_top(): Flag the memory allocated, not freed, for
  Valgrind.  Otherwise, Valgrind would complain on the second call of
  mem_heap_empty().
  
  UNIV_MEM_ASSERT_RW(), UNIV_MEM_ASSERT_W(): Display additional diagnostics
  for failed Valgrind checks.
storage/innobase/include/mem0mem.ic:
  Apply snapshot innodb-5.1-ss1989
  
  Revision r1830:
  Improve memory debugging.  This is follow-up to r1819.
  
  mem_heap_validate(): Compile this function also if UNIV_MEM_DEBUG is
  defined.  Previously, this function was only compiled with UNIV_DEBUG.
  
  mem_heap_free_heap_top(): Flag the memory allocated, not freed, for
  Valgrind.  Otherwise, Valgrind would complain on the second call of
  mem_heap_empty().
  
  UNIV_MEM_ASSERT_RW(), UNIV_MEM_ASSERT_W(): Display additional diagnostics
  for failed Valgrind checks.
  
  
  Revision r1937:
  mem_heap_free_top(): Remove a bogus Valgrind warning.
  
  
  Revision r1819:
  Merge r1815:1817 from branches/zip: Improve Valgrind instrumentation.
  
  UNIV_MEM_ASSERT_RW(): New macro, to check that the contents of a memory
  area is defined.
  
  UNIV_MEM_ASSERT_W(): New macro, to check that a memory area is writable.
  
  UNIV_MEM_ASSERT_AND_FREE(): New macro, to check that the memory is
  writable before declaring it free (unwritable).  This replaces UNIV_MEM_FREE()
  in many places.
  
  mem_init_buf(): Check that the memory is writable, and declare it undefined.
  
  mem_erase_buf(): Check that the memory is writable, and declare it freed.
storage/innobase/include/rem0rec.ic:
  Apply snapshot innodb-5.1-ss1989
  
  Revision r1918:
  Improve Valgrind instrumentation.
  
  rec_offs_set_n_alloc(): Use UNIV_MEM_ASSERT_AND_ALLOC().
  
  UNIV_MEM_ASSERT_AND_ALLOC(): New directive, similar to
  UNIV_MEM_ASSERT_AND_FREE().
storage/innobase/include/row0mysql.h:
  Apply snapshot innodb-5.1-ss1989
  
  Revision r1783:
  Correct the function comments of row_create_table_for_mysql() and
  row_drop_table_for_mysql().
storage/innobase/include/sync0rw.h:
  Apply snapshot innodb-5.1-ss1989
  
  Revision r1757:
  Enclose rw_lock_validate() in #ifdef UNIV_DEBUG.  It is only called by
  debug assertions.
storage/innobase/include/univ.i:
  Apply snapshot innodb-5.1-ss1989
  
  Revision r1827:
  Merge r1826 from branches/zip: UNIV_MEM_ASSERT_AND_FREE():
  Use UNIV_MEM_ASSERT_W() instead of UNIV_MEM_ASSERT_RW().
  The memory area need not be initialized.
  This mistake was made in r1815.
  
  
  Revision r1918:
  Improve Valgrind instrumentation.
  
  rec_offs_set_n_alloc(): Use UNIV_MEM_ASSERT_AND_ALLOC().
  
  UNIV_MEM_ASSERT_AND_ALLOC(): New directive, similar to
  UNIV_MEM_ASSERT_AND_FREE().
  
  
  Revision r1830:
  Improve memory debugging.  This is follow-up to r1819.
  
  mem_heap_validate(): Compile this function also if UNIV_MEM_DEBUG is
  defined.  Previously, this function was only compiled with UNIV_DEBUG.
  
  mem_heap_free_heap_top(): Flag the memory allocated, not freed, for
  Valgrind.  Otherwise, Valgrind would complain on the second call of
  mem_heap_empty().
  
  UNIV_MEM_ASSERT_RW(), UNIV_MEM_ASSERT_W(): Display additional diagnostics
  for failed Valgrind checks.
  
  
  Revision r1819:
  Merge r1815:1817 from branches/zip: Improve Valgrind instrumentation.
  
  UNIV_MEM_ASSERT_RW(): New macro, to check that the contents of a memory
  area is defined.
  
  UNIV_MEM_ASSERT_W(): New macro, to check that a memory area is writable.
  
  UNIV_MEM_ASSERT_AND_FREE(): New macro, to check that the memory is
  writable before declaring it free (unwritable).  This replaces UNIV_MEM_FREE()
  in many places.
  
  mem_init_buf(): Check that the memory is writable, and declare it undefined.
  
  mem_erase_buf(): Check that the memory is writable, and declare it freed.
  
  
  Revision r1948:
  UNIV_MEM_ASSERT_RW(), UNIV_MEM_ASSERT_W(): Display also __FILE__ and __LINE__
  when these Valgrind checks fail.
storage/innobase/include/ut0ut.h:
  Apply snapshot innodb-5.1-ss1989
  
  Revision r1850:
  Implement this feature request:
  http://bugs.mysql.com/30706
  
  * Add a function that returns the number of microseconds since
    epoch - ut_time_us().
  
  * Add (innodb|innobase|srv)_replication_delay MySQL config parameter.
  
  * Add UT_WAIT_FOR() macro that waits for a specified condition to occur
    until a timeout elapses.
  
  * Using all of the above, handle the replication thread specially in
    srv_conc_enter_innodb().
  
  Approved by:	Heikki
  
  
  
  Revision r1862:
  Add ut_snprintf() function. On Windows this needs to be implemented
  using auxiliary functions because there is no snprintf-variant on
  Windows that behaves exactly as specified in the standard:
  
  * Always return the number of characters that would have been printed
    if the size were unlimited (not including the final `\0').
  * Always '\0'-terminate the result
  * Do not touch the buffer if size=0, only return the number of characters
    that would have been printed. Can be used to estimate the size needed
    and to allocate it dynamically.
  
  See http://www.freebsd.org/cgi/query-pr.cgi?pr=87260 for the reason why
  2 ap variables are used.
  
  Approved by:	Heikki
  
  
  Revision r1866:
  Revert r1850 as MySQL did not approve the addition.
  
  log for r1850:
  
  Implement this feature request:
  http://bugs.mysql.com/30706
  
  * Add a function that returns the number of microseconds since
    epoch - ut_time_us().
  
  * Add (innodb|innobase|srv)_replication_delay MySQL config parameter.
  
  * Add UT_WAIT_FOR() macro that waits for a specified condition to occur
    until a timeout elapses.
  
  * Using all of the above, handle the replication thread specially in
    srv_conc_enter_innodb().
storage/innobase/mem/mem0dbg.c:
  Apply snapshot innodb-5.1-ss1989
  
  Revision r1830:
  Improve memory debugging.  This is follow-up to r1819.
  
  mem_heap_validate(): Compile this function also if UNIV_MEM_DEBUG is
  defined.  Previously, this function was only compiled with UNIV_DEBUG.
  
  mem_heap_free_heap_top(): Flag the memory allocated, not freed, for
  Valgrind.  Otherwise, Valgrind would complain on the second call of
  mem_heap_empty().
  
  UNIV_MEM_ASSERT_RW(), UNIV_MEM_ASSERT_W(): Display additional diagnostics
  for failed Valgrind checks.
  
  
  Revision r1819:
  Merge r1815:1817 from branches/zip: Improve Valgrind instrumentation.
  
  UNIV_MEM_ASSERT_RW(): New macro, to check that the contents of a memory
  area is defined.
  
  UNIV_MEM_ASSERT_W(): New macro, to check that a memory area is writable.
  
  UNIV_MEM_ASSERT_AND_FREE(): New macro, to check that the memory is
  writable before declaring it free (unwritable).  This replaces UNIV_MEM_FREE()
  in many places.
  
  mem_init_buf(): Check that the memory is writable, and declare it undefined.
  
  mem_erase_buf(): Check that the memory is writable, and declare it freed.
storage/innobase/mem/mem0mem.c:
  Apply snapshot innodb-5.1-ss1989
  
  Revision r1819:
  Merge r1815:1817 from branches/zip: Improve Valgrind instrumentation.
  
  UNIV_MEM_ASSERT_RW(): New macro, to check that the contents of a memory
  area is defined.
  
  UNIV_MEM_ASSERT_W(): New macro, to check that a memory area is writable.
  
  UNIV_MEM_ASSERT_AND_FREE(): New macro, to check that the memory is
  writable before declaring it free (unwritable).  This replaces UNIV_MEM_FREE()
  in many places.
  
  mem_init_buf(): Check that the memory is writable, and declare it undefined.
  
  mem_erase_buf(): Check that the memory is writable, and declare it freed.
storage/innobase/row/row0mysql.c:
  Apply snapshot innodb-5.1-ss1989
  
  Revision r1786:
  row_create_table_for_mysql(), row_truncate_table_for_mysql(),
  row_drop_table_for_mysql(): Do not mention innodb_force_recovery
  when newraw is set.
  
  
  Revision r1790:
  row_drop_table_for_mysql(): Before calling
  dict_table_remove_from_cache(table) and thus freeing the memory
  allocated for the table, copy the table name.  This avoids reading
  freed memory when name == table->name.
  
  Approved by Sunny.
  
  
  Revision r1783:
  Correct the function comments of row_create_table_for_mysql() and
  row_drop_table_for_mysql().
  
  
  Revision r1894:
  Add debug lock checks to autoinc functions. Add lock guards around an
  invocation of dict_table_autoinc_initialize().
storage/innobase/row/row0sel.c:
  Apply snapshot innodb-5.1-ss1989
  
  Revision r1782:
  Add comment that the variable dest should be word aligned. After discussion
  on IM with Heikki.
  
  
  Revision r1988:
  Set an error code when a deadlock occurs in semi-consistent read.  (Bug #31494)
  
  innodb-semi-consistent: New tests for InnoDB semi-consistent reads.
  Unfortunately, these will not trigger Bug #31494, because there merely
  occur lock wait timeouts, not deadlocks.
  
  
  Revision r1820:
  Use the clustered index and not the one selected by the optimizer in the plan,
  when building a previous version of the row. This bug is triggered when
  running queries via InnoDB's internal SQL parser; when InnoDB's optimizer
  selects a secondary index for the plan.
  
  
  Revision r1828:
  Fix two bugs:
  
  Bug# 30907: We don't rely on *first_value to be 0 when checking whether
  get_auto_increment() has been invoked for the first time in a multi-row
  INSERT. We instead use trx_t::n_autoinc_rows. Initialize trx::n_autoinc_rows
  inside ha_innobase::start_stmt() too.
  
  Bug# 30888: While adding code for the low level read of the AUTOINC value
  from the index, the case for MEDIUM ints which are 3 bytes was missed
  triggering an assertion.
  
  
  Revision r1779:
  Fix a bug that handles the case where the host specific byte order matches
  the InnoDB storage byte order, which is big-endian.
storage/innobase/sync/sync0rw.c:
  Apply snapshot innodb-5.1-ss1989
  
  Revision r1757:
  Enclose rw_lock_validate() in #ifdef UNIV_DEBUG.  It is only called by
  debug assertions.
storage/innobase/ut/ut0ut.c:
  Apply snapshot innodb-5.1-ss1989
  
  Revision r1850:
  Implement this feature request:
  http://bugs.mysql.com/30706
  
  * Add a function that returns the number of microseconds since
    epoch - ut_time_us().
  
  * Add (innodb|innobase|srv)_replication_delay MySQL config parameter.
  
  * Add UT_WAIT_FOR() macro that waits for a specified condition to occur
    until a timeout elapses.
  
  * Using all of the above, handle the replication thread specially in
    srv_conc_enter_innodb().
  
  Approved by:	Heikki
  
  
  
  Revision r1873:
  snprintf() should always return non-negative result. According to
  Microsoft documentation about _vscprintf():
  
    If format is a null pointer, the invalid parameter handler is invoked,
    as described in Parameter Validation. If execution is allowed to
    continue, the functions return -1 and set errno to EINVAL.
  
  The UNIX variant of snprintf() segfaults if format is a NULL pointer
  (similar to strlen(NULL) for example), so it is better to conform to
  this behavior and crash our custom Windows version instead of
  returning -1. Noone would expect -1 to be returned from snprintf().
  
  Cosmetic: Add a space after typecast.
  
  Approved by:	Marko
  
  
  Revision r1862:
  Add ut_snprintf() function. On Windows this needs to be implemented
  using auxiliary functions because there is no snprintf-variant on
  Windows that behaves exactly as specified in the standard:
  
  * Always return the number of characters that would have been printed
    if the size were unlimited (not including the final `\0').
  * Always '\0'-terminate the result
  * Do not touch the buffer if size=0, only return the number of characters
    that would have been printed. Can be used to estimate the size needed
    and to allocate it dynamically.
  
  See http://www.freebsd.org/cgi/query-pr.cgi?pr=87260 for the reason why
  2 ap variables are used.
  
  Approved by:	Heikki
  
  
  Revision r1866:
  Revert r1850 as MySQL did not approve the addition.
  
  log for r1850:
  
  Implement this feature request:
  http://bugs.mysql.com/30706
  
  * Add a function that returns the number of microseconds since
    epoch - ut_time_us().
  
  * Add (innodb|innobase|srv)_replication_delay MySQL config parameter.
  
  * Add UT_WAIT_FOR() macro that waits for a specified condition to occur
    until a timeout elapses.
  
  * Using all of the above, handle the replication thread specially in
    srv_conc_enter_innodb().
  
  
  Revision r1787:
  Move the prototype of innobase_print_identifier() from ut0ut.c to
  ha_prototypes.h.  Enclose the definitions in ha_prototypes.h in
  #ifndef UNIV_HOTBACKUP.
  
  
  Revision r1789:
  ut_print_namel(): Do not assume that all '/' are separators between
  database and table names.
  
  Approved by Heikki.
  
  
  Revision r1936:
  ut_print_buf(): Add a Valgrind check that the buffer is wholly defined.
mysql-test/r/innodb-semi-consistent.result:
  Apply snapshot innodb-5.1-ss1989
  
  
  Revision r1988:
  Set an error code when a deadlock occurs in semi-consistent read.  (Bug #31494)
  
  innodb-semi-consistent: New tests for InnoDB semi-consistent reads.
  Unfortunately, these will not trigger Bug #31494, because there merely
  occur lock wait timeouts, not deadlocks.
mysql-test/r/innodb_autoinc_lock_mode_zero.result:
  New test, using read-only setting --innodb-autoinc-lock-mode=0
mysql-test/t/innodb-semi-consistent-master.opt:
  Apply snapshot innodb-5.1-ss1989
  
  
  Revision r1988:
  Set an error code when a deadlock occurs in semi-consistent read.  (Bug #31494)
  
  innodb-semi-consistent: New tests for InnoDB semi-consistent reads.
  Unfortunately, these will not trigger Bug #31494, because there merely
  occur lock wait timeouts, not deadlocks.
mysql-test/t/innodb-semi-consistent.test:
  Apply snapshot innodb-5.1-ss1989
  
  
  Revision r1988:
  Set an error code when a deadlock occurs in semi-consistent read.  (Bug #31494)
  
  innodb-semi-consistent: New tests for InnoDB semi-consistent reads.
  Unfortunately, these will not trigger Bug #31494, because there merely
  occur lock wait timeouts, not deadlocks.
mysql-test/t/innodb_autoinc_lock_mode_zero-master.opt:
  New test, using read-only setting --innodb-autoinc-lock-mode=0
mysql-test/t/innodb_autoinc_lock_mode_zero.test:
  New test, using read-only setting --innodb-autoinc-lock-mode=0
2007-11-06 15:42:58 -07:00
unknown
a859c59454 Apply InnoDB snapshot innodb-5.1-ss1751.
Bug #16979: AUTO_INC lock in InnoDB works a table level lock
  Add a table level counter that tracks the number of AUTOINC locks that are
  pending and/or granted on a table. We peek at this value to determine whether
  a transaction doing a simple INSERT in innodb_autoinc_lock_mode = 1, needs to
  acquire the AUTOINC lock or not. This change is related to Bug# 16979.
Bug #27950: Duplicate entry error in auto-inc after mysqld restart
  We check whether the AUTOINC sub-system has been initialized (first) by
  holding the AUTOINC mutex and if initialization is required then we
  initialize using our normal procedure.


storage/innobase/dict/dict0boot.c:
  Apply InnoDB snapshot innodb-5.1-ss1751.
storage/innobase/dict/dict0crea.c:
  Apply InnoDB snapshot innodb-5.1-ss1751.
storage/innobase/dict/dict0load.c:
  Apply InnoDB snapshot innodb-5.1-ss1751.
storage/innobase/dict/dict0mem.c:
  Apply InnoDB snapshot innodb-5.1-ss1751.
  
  Revision r1749:
  Add a table level counter that tracks the number of AUTOINC locks that are
  pending and/or granted on a table. We peek at this value to determine whether
  a transaction doing a simple INSERT in innodb_autoinc_lock_mode = 1, needs to
  acquire the AUTOINC lock or not. This change is related to Bug# 16979.
storage/innobase/handler/ha_innodb.cc:
  Apply InnoDB snapshot innodb-5.1-ss1751.
  
  Revision r1735:
  Add variable "innodb_autoinc_lock_mode"  to control the behavior of the
  AUTOINC locking. There are three modes, 0 for backward compatibility, 1 for the
  new style locking (default, safe for statement-based replication) and
  2 for no AUTOINC locking (unsafe for statement-based replication).
  
  
  Revision r1750:
  We check whether the AUTOINC sub-system has been initialized (first) by
  holding the AUTOINC mutex and if initialization is required then we
  initialize using our normal procedure. This change is related to Bug#27950.
  
  
  Revision r1746:
  Remove some code from ha_innodb.cc that was already enclosed in #if 0.
  The code was related to replication and group commit, and it was
  unreachable already as of MySQL 5.0.
  
  Approved by Heikki
  
  
  Revision r1749:
  Add a table level counter that tracks the number of AUTOINC locks that are
  pending and/or granted on a table. We peek at this value to determine whether
  a transaction doing a simple INSERT in innodb_autoinc_lock_mode = 1, needs to
  acquire the AUTOINC lock or not. This change is related to Bug# 16979.
storage/innobase/include/dict0mem.h:
  Apply InnoDB snapshot innodb-5.1-ss1751.
  
  Revision r1749:
  Add a table level counter that tracks the number of AUTOINC locks that are
  pending and/or granted on a table. We peek at this value to determine whether
  a transaction doing a simple INSERT in innodb_autoinc_lock_mode = 1, needs to
  acquire the AUTOINC lock or not. This change is related to Bug# 16979.
  
  
  
  Revision r1747:
  Correct an outdated comment about dict_table_t:col_names that should have
  been adjusted in r1719, or r1264 in branches/zip.
storage/innobase/include/mem0mem.ic:
  Apply InnoDB snapshot innodb-5.1-ss1751.
  
  Revision r1744:
  Merge r1739 from branches/zip:
  
  mem_heap_free_heap_top(): Declare the memory freed with UNIV_MEM_FREE().
  Before this change, the memory freed by mem_heap_empty() was not completely
  flagged free in UNIV_DEBUG_VALGRIND builds.  After this change, Valgrind
  will hopefully catch all errors caught by UNIV_MEM_DEBUG.
storage/innobase/include/sync0rw.ic:
  Apply InnoDB snapshot innodb-5.1-ss1751.
  
  Revision r1751:
  rw_lock_s_lock_func(): Correct a typo in a comment.
storage/innobase/include/trx0trx.h:
  Apply InnoDB snapshot innodb-5.1-ss1751.
  
  Revision r1742:
  Remove some unused fields of trx_t: mysql_master_log_file_name,
  mysql_master_log_pos, repl_wait_binlog_name, repl_wait_binlog_pos.
  
  Approved by Heikki.
storage/innobase/lock/lock0lock.c:
  Apply InnoDB snapshot innodb-5.1-ss1751.
  
  Revision r1749:
  Add a table level counter that tracks the number of AUTOINC locks that are
  pending and/or granted on a table. We peek at this value to determine whether
  a transaction doing a simple INSERT in innodb_autoinc_lock_mode = 1, needs to
  acquire the AUTOINC lock or not. This change is related to Bug# 16979.
storage/innobase/mtr/mtr0log.c:
  Apply InnoDB snapshot innodb-5.1-ss1751.
storage/innobase/pars/pars0pars.c:
  Apply InnoDB snapshot innodb-5.1-ss1751.
storage/innobase/srv/srv0srv.c:
  Apply InnoDB snapshot innodb-5.1-ss1751.
storage/innobase/trx/trx0sys.c:
  Apply InnoDB snapshot innodb-5.1-ss1751.
  
  Revision r1743:
  trx_sys_print_mysql_binlog_offset_from_page(): Enclose the definition
  in #ifdef UNIV_HOTBACKUP, to match the function declaration.
storage/innobase/trx/trx0trx.c:
  Apply InnoDB snapshot innodb-5.1-ss1751.
  
  Revision r1742:
  Remove some unused fields of trx_t: mysql_master_log_file_name,
  mysql_master_log_pos, repl_wait_binlog_name, repl_wait_binlog_pos.
  
  Approved by Heikki.
2007-08-25 03:55:38 -06:00
unknown
6d4b3c5800 Apply InnoDB snapshot innodb-5.1-ss1726.
Bug #16979: AUTO_INC lock in InnoDB works a table level lock
  - this is a major change in InnoDB auto-inc handling.
Bug #27950: Duplicate entry error in auto-inc after mysqld restart
  - Init AUTOINC from delete_row().
Bug #28781: InnoDB increments auto-increment value incorrectly with ON DUPLICATE KEY UPDATE
  - Use value specified by MySQL, in update_row().


mysql-test/r/innodb.result:
  Apply InnoDB snapshot innodb-5.1-ss1726.
  
  Revision r1655:
  Fix the innodb.test failure mentioned in r1654.
storage/innobase/dict/dict0dict.c:
  Apply InnoDB snapshot innodb-5.1-ss1726.
  
  Revision r1645:
  Fix for bug# 16979, this is a major change in InnoDB auto-inc handling. There
  is one test that fails as of this commit. The updated test case should be
  part of the snapshot from MySQL shortly.
  
  Fix for bug# 27950 - Init AUTOINC from delete_row().
  
  Fix for bug# 28781 - Use value specified by MySQL, in update_row().
  
  Summary of structural changes:
  ==============================
  InnoDB needs to hold a table level lock for AUTOINC allocations to overcome
  the non-determinism inherent in MySQL SBR for INSERT ... SELECT. In this fix 
  for simple INSERT statements (including multi-value inserts), we try and avoid
  acquiring the special AUTOINC table level lock unless another transaction has
  already reserved the AUTOINC table level lock, in which case we fall back
  to the old behavior of acquiring the AUTOINC table level lock.
  
  The max AUTOINC value is now read directly using the low level interface
  of InnoDB.
  
  
  Revision r1719:
  Merge r1264 from branches/zip: Avoid memory fragmentation when
  adding column definitions to tables.
  
  dict_mem_table_add_col(): Add the parameter "heap" for temporary memory
  allocation.  Allow it and "name" to be NULL.  These parameters are NULL
  when creating dummy indexes.
  
  dict_add_col_name(): Remove calls to ut_malloc() and ut_free().
  
  dict_table_get_col_name(): Allow table->col_names to be NULL.
  
  dict_table_add_system_columns(), dict_table_add_to_cache():
  Add the parameter "heap".
  ---
  Additional changes that had to be merged from branches/zip:
  
  dict_table_add_system_columns(): New function, factored out from
  dict_table_add_to_cache().
  
  mlog_parse_index(): Add some consistency checks, and make use of
  dict_table_add_system_columns().
storage/innobase/dict/dict0mem.c:
  Apply InnoDB snapshot innodb-5.1-ss1726.
  
  Revision r1645:
  Fix for bug# 16979, this is a major change in InnoDB auto-inc handling. There
  is one test that fails as of this commit. The updated test case should be
  part of the snapshot from MySQL shortly.
  
  Fix for bug# 27950 - Init AUTOINC from delete_row().
  
  Fix for bug# 28781 - Use value specified by MySQL, in update_row().
  
  Summary of structural changes:
  ==============================
  InnoDB needs to hold a table level lock for AUTOINC allocations to overcome
  the non-determinism inherent in MySQL SBR for INSERT ... SELECT. In this fix 
  for simple INSERT statements (including multi-value inserts), we try and avoid
  acquiring the special AUTOINC table level lock unless another transaction has
  already reserved the AUTOINC table level lock, in which case we fall back
  to the old behavior of acquiring the AUTOINC table level lock.
  
  The max AUTOINC value is now read directly using the low level interface
  of InnoDB.
  
  
  Revision r1719:
  Merge r1264 from branches/zip: Avoid memory fragmentation when
  adding column definitions to tables.
  
  dict_mem_table_add_col(): Add the parameter "heap" for temporary memory
  allocation.  Allow it and "name" to be NULL.  These parameters are NULL
  when creating dummy indexes.
  
  dict_add_col_name(): Remove calls to ut_malloc() and ut_free().
  
  dict_table_get_col_name(): Allow table->col_names to be NULL.
  
  dict_table_add_system_columns(), dict_table_add_to_cache():
  Add the parameter "heap".
  ---
  Additional changes that had to be merged from branches/zip:
  
  dict_table_add_system_columns(): New function, factored out from
  dict_table_add_to_cache().
  
  mlog_parse_index(): Add some consistency checks, and make use of
  dict_table_add_system_columns().
storage/innobase/handler/ha_innodb.cc:
  Apply InnoDB snapshot innodb-5.1-ss1726.
  
  Revision r1645:
  Fix for bug# 16979, this is a major change in InnoDB auto-inc handling. There
  is one test that fails as of this commit. The updated test case should be
  part of the snapshot from MySQL shortly.
  
  Fix for bug# 27950 - Init AUTOINC from delete_row().
  
  Fix for bug# 28781 - Use value specified by MySQL, in update_row().
  
  Summary of structural changes:
  ==============================
  InnoDB needs to hold a table level lock for AUTOINC allocations to overcome
  the non-determinism inherent in MySQL SBR for INSERT ... SELECT. In this fix 
  for simple INSERT statements (including multi-value inserts), we try and avoid
  acquiring the special AUTOINC table level lock unless another transaction has
  already reserved the AUTOINC table level lock, in which case we fall back
  to the old behavior of acquiring the AUTOINC table level lock.
  
  The max AUTOINC value is now read directly using the low level interface
  of InnoDB.
  
  
  Revision r1718:
  Replace mysql_byte with uchar and remove the #define mysql_byte from
  ha_innodb.cc.  This cleanup was made possible as of r1550:
  
  
  Revision r1658:
  check_trx_exists(): Remove a redundant function call and assignment that
  was added by someone at MySQL.
  
  
  Revision r1656:
  
  
  Revision r1719:
  Merge r1264 from branches/zip: Avoid memory fragmentation when
  adding column definitions to tables.
  
  dict_mem_table_add_col(): Add the parameter "heap" for temporary memory
  allocation.  Allow it and "name" to be NULL.  These parameters are NULL
  when creating dummy indexes.
  
  dict_add_col_name(): Remove calls to ut_malloc() and ut_free().
  
  dict_table_get_col_name(): Allow table->col_names to be NULL.
  
  dict_table_add_system_columns(), dict_table_add_to_cache():
  Add the parameter "heap".
  ---
  Additional changes that had to be merged from branches/zip:
  
  dict_table_add_system_columns(): New function, factored out from
  dict_table_add_to_cache().
  
  mlog_parse_index(): Add some consistency checks, and make use of
  dict_table_add_system_columns().
  
  
  Revision r1654:
  
  One test case in innodb.test fails because of auto-increment
  changes in r1562:1653:
  
  $diff innodb.result innodb.reject
  504c504
  < 3	test2		this will work
  ---
  > 4	test2		this will work
storage/innobase/handler/ha_innodb.h:
  Apply InnoDB snapshot innodb-5.1-ss1726.
  
  Revision r1645:
  Fix for bug# 16979, this is a major change in InnoDB auto-inc handling. There
  is one test that fails as of this commit. The updated test case should be
  part of the snapshot from MySQL shortly.
  
  Fix for bug# 27950 - Init AUTOINC from delete_row().
  
  Fix for bug# 28781 - Use value specified by MySQL, in update_row().
  
  Summary of structural changes:
  ==============================
  InnoDB needs to hold a table level lock for AUTOINC allocations to overcome
  the non-determinism inherent in MySQL SBR for INSERT ... SELECT. In this fix 
  for simple INSERT statements (including multi-value inserts), we try and avoid
  acquiring the special AUTOINC table level lock unless another transaction has
  already reserved the AUTOINC table level lock, in which case we fall back
  to the old behavior of acquiring the AUTOINC table level lock.
  
  The max AUTOINC value is now read directly using the low level interface
  of InnoDB.
  
  
  Revision r1654:
  
  One test case in innodb.test fails because of auto-increment
  changes in r1562:1653:
  
  $diff innodb.result innodb.reject
  504c504
  < 3	test2		this will work
  ---
  > 4	test2		this will work
storage/innobase/ibuf/ibuf0ibuf.c:
  Apply InnoDB snapshot innodb-5.1-ss1726.
  
  Revision r1715:
  ibuf0ibuf.c: Remove the unused prototype for dict_index_print_low()
  that was inadvertently added in r832.
  
  
  Revision r1719:
  Merge r1264 from branches/zip: Avoid memory fragmentation when
  adding column definitions to tables.
  
  dict_mem_table_add_col(): Add the parameter "heap" for temporary memory
  allocation.  Allow it and "name" to be NULL.  These parameters are NULL
  when creating dummy indexes.
  
  dict_add_col_name(): Remove calls to ut_malloc() and ut_free().
  
  dict_table_get_col_name(): Allow table->col_names to be NULL.
  
  dict_table_add_system_columns(), dict_table_add_to_cache():
  Add the parameter "heap".
  ---
  Additional changes that had to be merged from branches/zip:
  
  dict_table_add_system_columns(): New function, factored out from
  dict_table_add_to_cache().
  
  mlog_parse_index(): Add some consistency checks, and make use of
  dict_table_add_system_columns().
storage/innobase/include/dict0dict.h:
  Apply InnoDB snapshot innodb-5.1-ss1726.
  
  Revision r1645:
  Fix for bug# 16979, this is a major change in InnoDB auto-inc handling. There
  is one test that fails as of this commit. The updated test case should be
  part of the snapshot from MySQL shortly.
  
  Fix for bug# 27950 - Init AUTOINC from delete_row().
  
  Fix for bug# 28781 - Use value specified by MySQL, in update_row().
  
  Summary of structural changes:
  ==============================
  InnoDB needs to hold a table level lock for AUTOINC allocations to overcome
  the non-determinism inherent in MySQL SBR for INSERT ... SELECT. In this fix 
  for simple INSERT statements (including multi-value inserts), we try and avoid
  acquiring the special AUTOINC table level lock unless another transaction has
  already reserved the AUTOINC table level lock, in which case we fall back
  to the old behavior of acquiring the AUTOINC table level lock.
  
  The max AUTOINC value is now read directly using the low level interface
  of InnoDB.
  
  
  Revision r1719:
  Merge r1264 from branches/zip: Avoid memory fragmentation when
  adding column definitions to tables.
  
  dict_mem_table_add_col(): Add the parameter "heap" for temporary memory
  allocation.  Allow it and "name" to be NULL.  These parameters are NULL
  when creating dummy indexes.
  
  dict_add_col_name(): Remove calls to ut_malloc() and ut_free().
  
  dict_table_get_col_name(): Allow table->col_names to be NULL.
  
  dict_table_add_system_columns(), dict_table_add_to_cache():
  Add the parameter "heap".
  ---
  Additional changes that had to be merged from branches/zip:
  
  dict_table_add_system_columns(): New function, factored out from
  dict_table_add_to_cache().
  
  mlog_parse_index(): Add some consistency checks, and make use of
  dict_table_add_system_columns().
storage/innobase/include/dict0mem.h:
  Apply InnoDB snapshot innodb-5.1-ss1726.
  
  Revision r1645:
  Fix for bug# 16979, this is a major change in InnoDB auto-inc handling. There
  is one test that fails as of this commit. The updated test case should be
  part of the snapshot from MySQL shortly.
  
  Fix for bug# 27950 - Init AUTOINC from delete_row().
  
  Fix for bug# 28781 - Use value specified by MySQL, in update_row().
  
  Summary of structural changes:
  ==============================
  InnoDB needs to hold a table level lock for AUTOINC allocations to overcome
  the non-determinism inherent in MySQL SBR for INSERT ... SELECT. In this fix 
  for simple INSERT statements (including multi-value inserts), we try and avoid
  acquiring the special AUTOINC table level lock unless another transaction has
  already reserved the AUTOINC table level lock, in which case we fall back
  to the old behavior of acquiring the AUTOINC table level lock.
  
  The max AUTOINC value is now read directly using the low level interface
  of InnoDB.
  
  
  Revision r1719:
  Merge r1264 from branches/zip: Avoid memory fragmentation when
  adding column definitions to tables.
  
  dict_mem_table_add_col(): Add the parameter "heap" for temporary memory
  allocation.  Allow it and "name" to be NULL.  These parameters are NULL
  when creating dummy indexes.
  
  dict_add_col_name(): Remove calls to ut_malloc() and ut_free().
  
  dict_table_get_col_name(): Allow table->col_names to be NULL.
  
  dict_table_add_system_columns(), dict_table_add_to_cache():
  Add the parameter "heap".
  ---
  Additional changes that had to be merged from branches/zip:
  
  dict_table_add_system_columns(): New function, factored out from
  dict_table_add_to_cache().
  
  mlog_parse_index(): Add some consistency checks, and make use of
  dict_table_add_system_columns().
storage/innobase/include/lock0lock.h:
  Apply InnoDB snapshot innodb-5.1-ss1726.
  
  Revision r1664:
  lock_number_of_rows_locked(): Fix a typo in comment, and make the comments
  in lock0lock.c and lock0lock.h identical.  The typo was incorrectly fixed in
  r1623.
storage/innobase/include/row0mysql.h:
  Apply InnoDB snapshot innodb-5.1-ss1726.
  
  Revision r1645:
  Fix for bug# 16979, this is a major change in InnoDB auto-inc handling. There
  is one test that fails as of this commit. The updated test case should be
  part of the snapshot from MySQL shortly.
  
  Fix for bug# 27950 - Init AUTOINC from delete_row().
  
  Fix for bug# 28781 - Use value specified by MySQL, in update_row().
  
  Summary of structural changes:
  ==============================
  InnoDB needs to hold a table level lock for AUTOINC allocations to overcome
  the non-determinism inherent in MySQL SBR for INSERT ... SELECT. In this fix 
  for simple INSERT statements (including multi-value inserts), we try and avoid
  acquiring the special AUTOINC table level lock unless another transaction has
  already reserved the AUTOINC table level lock, in which case we fall back
  to the old behavior of acquiring the AUTOINC table level lock.
  
  The max AUTOINC value is now read directly using the low level interface
  of InnoDB.
storage/innobase/include/row0sel.h:
  Apply InnoDB snapshot innodb-5.1-ss1726.
  
  Revision r1645:
  Fix for bug# 16979, this is a major change in InnoDB auto-inc handling. There
  is one test that fails as of this commit. The updated test case should be
  part of the snapshot from MySQL shortly.
  
  Fix for bug# 27950 - Init AUTOINC from delete_row().
  
  Fix for bug# 28781 - Use value specified by MySQL, in update_row().
  
  Summary of structural changes:
  ==============================
  InnoDB needs to hold a table level lock for AUTOINC allocations to overcome
  the non-determinism inherent in MySQL SBR for INSERT ... SELECT. In this fix 
  for simple INSERT statements (including multi-value inserts), we try and avoid
  acquiring the special AUTOINC table level lock unless another transaction has
  already reserved the AUTOINC table level lock, in which case we fall back
  to the old behavior of acquiring the AUTOINC table level lock.
  
  The max AUTOINC value is now read directly using the low level interface
  of InnoDB.
storage/innobase/include/trx0trx.h:
  Apply InnoDB snapshot innodb-5.1-ss1726.
  
  Revision r1645:
  Fix for bug# 16979, this is a major change in InnoDB auto-inc handling. There
  is one test that fails as of this commit. The updated test case should be
  part of the snapshot from MySQL shortly.
  
  Fix for bug# 27950 - Init AUTOINC from delete_row().
  
  Fix for bug# 28781 - Use value specified by MySQL, in update_row().
  
  Summary of structural changes:
  ==============================
  InnoDB needs to hold a table level lock for AUTOINC allocations to overcome
  the non-determinism inherent in MySQL SBR for INSERT ... SELECT. In this fix 
  for simple INSERT statements (including multi-value inserts), we try and avoid
  acquiring the special AUTOINC table level lock unless another transaction has
  already reserved the AUTOINC table level lock, in which case we fall back
  to the old behavior of acquiring the AUTOINC table level lock.
  
  The max AUTOINC value is now read directly using the low level interface
  of InnoDB.
storage/innobase/include/ut0mem.h:
  Apply InnoDB snapshot innodb-5.1-ss1726.
  
  Revision r1713:
  Fix typo in comment.
storage/innobase/log/log0recv.c:
  Apply InnoDB snapshot innodb-5.1-ss1726.
  
  Revision r1657:
  recv_init_crash_recovery(): remove trailing white space
storage/innobase/row/row0mysql.c:
  Apply InnoDB snapshot innodb-5.1-ss1726.
  
  Revision r1645:
  Fix for bug# 16979, this is a major change in InnoDB auto-inc handling. There
  is one test that fails as of this commit. The updated test case should be
  part of the snapshot from MySQL shortly.
  
  Fix for bug# 27950 - Init AUTOINC from delete_row().
  
  Fix for bug# 28781 - Use value specified by MySQL, in update_row().
  
  Summary of structural changes:
  ==============================
  InnoDB needs to hold a table level lock for AUTOINC allocations to overcome
  the non-determinism inherent in MySQL SBR for INSERT ... SELECT. In this fix 
  for simple INSERT statements (including multi-value inserts), we try and avoid
  acquiring the special AUTOINC table level lock unless another transaction has
  already reserved the AUTOINC table level lock, in which case we fall back
  to the old behavior of acquiring the AUTOINC table level lock.
  
  The max AUTOINC value is now read directly using the low level interface
  of InnoDB.
storage/innobase/row/row0sel.c:
  Apply InnoDB snapshot innodb-5.1-ss1726.
  
  Revision r1645:
  Fix for bug# 16979, this is a major change in InnoDB auto-inc handling. There
  is one test that fails as of this commit. The updated test case should be
  part of the snapshot from MySQL shortly.
  
  Fix for bug# 27950 - Init AUTOINC from delete_row().
  
  Fix for bug# 28781 - Use value specified by MySQL, in update_row().
  
  Summary of structural changes:
  ==============================
  InnoDB needs to hold a table level lock for AUTOINC allocations to overcome
  the non-determinism inherent in MySQL SBR for INSERT ... SELECT. In this fix 
  for simple INSERT statements (including multi-value inserts), we try and avoid
  acquiring the special AUTOINC table level lock unless another transaction has
  already reserved the AUTOINC table level lock, in which case we fall back
  to the old behavior of acquiring the AUTOINC table level lock.
  
  The max AUTOINC value is now read directly using the low level interface
  of InnoDB.
storage/innobase/trx/trx0trx.c:
  Apply InnoDB snapshot innodb-5.1-ss1726.
  
  Revision r1645:
  Fix for bug# 16979, this is a major change in InnoDB auto-inc handling. There
  is one test that fails as of this commit. The updated test case should be
  part of the snapshot from MySQL shortly.
  
  Fix for bug# 27950 - Init AUTOINC from delete_row().
  
  Fix for bug# 28781 - Use value specified by MySQL, in update_row().
  
  Summary of structural changes:
  ==============================
  InnoDB needs to hold a table level lock for AUTOINC allocations to overcome
  the non-determinism inherent in MySQL SBR for INSERT ... SELECT. In this fix 
  for simple INSERT statements (including multi-value inserts), we try and avoid
  acquiring the special AUTOINC table level lock unless another transaction has
  already reserved the AUTOINC table level lock, in which case we fall back
  to the old behavior of acquiring the AUTOINC table level lock.
  
  The max AUTOINC value is now read directly using the low level interface
  of InnoDB.
2007-08-24 19:14:52 -06:00
unknown
971050de26 Remove some redundant or unused code from InnoDB (feedback from
Marko after applying latest snapshot).


storage/innobase/handler/ha_innodb.cc:
  Remove redundant assignment to thd_to_trx(thd); trx is
  declared as a reference to thd_to_trx(thd) at the top
  of the function, so this assignment isn't useful.
storage/innobase/include/trx0trx.h:
  Remove two unused members from struct trx_struct.  allow_duplicates
  and replace_duplicates are not used; a single duplicates member is
  used instead to represent both flags.
2007-08-01 16:45:55 -06:00
unknown
31dffd10c0 Apply snapshot innodb-51-ss1644: Part #2.
I forgot to check in some new files: lock0priv.h lock0priv.ic lock0iter.c lock0iter.h


storage/innobase/include/lock0iter.h:
  BitKeeper file /home/tsmith/m/bk/inno/jul24/51/storage/innobase/include/lock0iter.h
storage/innobase/include/lock0priv.h:
  BitKeeper file /home/tsmith/m/bk/inno/jul24/51/storage/innobase/include/lock0priv.h
storage/innobase/include/lock0priv.ic:
  BitKeeper file /home/tsmith/m/bk/inno/jul24/51/storage/innobase/include/lock0priv.ic
storage/innobase/lock/lock0iter.c:
  BitKeeper file /home/tsmith/m/bk/inno/jul24/51/storage/innobase/lock/lock0iter.c
2007-07-25 13:29:57 -06:00
unknown
c2f0c211cd Apply snapshot innodb-51-ss1644
Fixes:
- Bug #23710: crash_commit_before fails if innodb_file_per_table=1
- Bug #28254: innodb crash if shutdown during innodb_table_monitor is running
- Bug #28604: innodb_force_recovery restricts data dump
- Bug #29097: fsp_get_available_space_in_free_extents() is capped at 4TB
- Bug #29155: Innodb "Parallel recovery" is not prevented


storage/innobase/Makefile.am:
  Apply snapshot innodb-51-ss1644
  
  Revision r1632:
  Add include/lock0priv.h to noinst_HEADERS in Makefile.am.
  
  
  
  Revision r1636:
  Move lock_get_type() from lock/lock0lock.c to include/lock0priv.ic:
  * lock0lock.c: remove lock_get_type() and include include/lock0priv.ic
  * lock0priv.h: include lock0priv.ic and add lock_get_type() prototype
  * Makefile.am: add lock0priv.ic to noinst_HEADERS
  * lock0priv.ic: introduce this new file containing the body of
    lock_get_type()
  
  This move is necessary in order to use lock_get_type() from other lock/
  source files (it's going to be used in lock/lock0iter.c).
  
  Approved by:	Heikki
  
  
  Revision r1638:
  Introduce a lock queue iterator for easy (and opaque) traversing of lock
  queues. Supports table and record lock queues via the same interface.
  
  There is only "get previous" method because currently there is no need
  for "get next" - it would be unused. Feel free to add one if needed.
  
  Approved by:	Heikki
storage/innobase/buf/buf0buf.c:
  Apply snapshot innodb-51-ss1644
  
  Revision r1624:
  Fix change missed as part of Bug 15815. Use a function to check if a block
  needs to be made younger.
  
  
  Revision r1581:
  Port extra Valgrind instrumentation (UNIV_DEBUG_VALGRIND) from branches/zip.
storage/innobase/buf/buf0lru.c:
  Apply snapshot innodb-51-ss1644
  
  Revision r1581:
  Port extra Valgrind instrumentation (UNIV_DEBUG_VALGRIND) from branches/zip.
storage/innobase/fsp/fsp0fsp.c:
  Apply snapshot innodb-51-ss1644
  
  Revision r1605:
  Fix Bug#29097 "fsp_get_available_space_in_free_extents() is capped at 4TB"
  by typecasting the variables before multiplying them, so that the result of
  the multiplication is of type "unsigned long long".
  
  I verified this fix by creating a sparse file of 6TB and forcing InnoDB to
  use it without overwriting it with zeroes (by commenting the code that
  overwrites :newraw files).
  
  New type ullint is introduced with the sole purpose of shortening
  "unsigned long long", please do not define it to something else than
  "unsigned long long".
  
  Approved by:	Heikki
storage/innobase/handler/ha_innodb.cc:
  Apply snapshot innodb-51-ss1644
  
  Revision r1605:
  Fix Bug#29097 "fsp_get_available_space_in_free_extents() is capped at 4TB"
  by typecasting the variables before multiplying them, so that the result of
  the multiplication is of type "unsigned long long".
  
  I verified this fix by creating a sparse file of 6TB and forcing InnoDB to
  use it without overwriting it with zeroes (by commenting the code that
  overwrites :newraw files).
  
  New type ullint is introduced with the sole purpose of shortening
  "unsigned long long", please do not define it to something else than
  "unsigned long long".
  
  Approved by:	Heikki
  
  
  Revision r1573:
  create_table_def(): Eliminate the inline function call to dict_table_is_comp()
  that was introduced in r1571.  Inlining is disabled in ha_innodb.cc.
  
  
  Revision r1574:
  innodb_check_for_record_too_big_error(): Divide the return value of
  page_get_free_space_of_empty_noninline() by 2.  Until r1571, that function
  did not return the same value as page_get_free_space_of_empty().
  
  
  Revision r1571:
  Fix a severe bug that was introduced in r1422 when fixing Bug 21101.
  When creating an index containing a too long record, InnoDB would
  dereference a NULL pointer when trying to determine the maximum row length.
  
  innodb_check_for_record_too_big_error(): Replace the dict_table_t*
  parameter with a Boolean flag.  There is not always a dict_table_t object
  when this function is called.
  
  page_get_free_space_of_empty_noninline(): Move the definition and
  declaration from row0mysql (!) to page0page.  Make the signature
  identical with page_get_free_space_of_empty().
  
  create_clustered_index_when_no_primary(): Add the parameter "comp".
  Remove unnecessary casts.
storage/innobase/include/buf0buf.ic:
  Apply snapshot innodb-51-ss1644
  
  Revision r1624:
  Fix change missed as part of Bug 15815. Use a function to check if a block
  needs to be made younger.
storage/innobase/include/fsp0fsp.h:
  Apply snapshot innodb-51-ss1644
  
  Revision r1605:
  Fix Bug#29097 "fsp_get_available_space_in_free_extents() is capped at 4TB"
  by typecasting the variables before multiplying them, so that the result of
  the multiplication is of type "unsigned long long".
  
  I verified this fix by creating a sparse file of 6TB and forcing InnoDB to
  use it without overwriting it with zeroes (by commenting the code that
  overwrites :newraw files).
  
  New type ullint is introduced with the sole purpose of shortening
  "unsigned long long", please do not define it to something else than
  "unsigned long long".
  
  Approved by:	Heikki
storage/innobase/include/lock0lock.h:
  Apply snapshot innodb-51-ss1644
  
  Revision r1623:
  Fix typo in comment.
  
  
  Revision r1628:
  lock_has_to_wait() is needed in the INFORMATION_SCHEMA implementation
  in order to determine which lock is blocking which. Make it non-static
  and put its definition in include/lock0lock.h.
  
  Approved by:	Heikki (via IM)
storage/innobase/include/mem0mem.ic:
  Apply snapshot innodb-51-ss1644
  
  Revision r1581:
  Port extra Valgrind instrumentation (UNIV_DEBUG_VALGRIND) from branches/zip.
storage/innobase/include/page0page.h:
  Apply snapshot innodb-51-ss1644
  
  Revision r1571:
  Fix a severe bug that was introduced in r1422 when fixing Bug 21101.
  When creating an index containing a too long record, InnoDB would
  dereference a NULL pointer when trying to determine the maximum row length.
  
  innodb_check_for_record_too_big_error(): Replace the dict_table_t*
  parameter with a Boolean flag.  There is not always a dict_table_t object
  when this function is called.
  
  page_get_free_space_of_empty_noninline(): Move the definition and
  declaration from row0mysql (!) to page0page.  Make the signature
  identical with page_get_free_space_of_empty().
  
  create_clustered_index_when_no_primary(): Add the parameter "comp".
  Remove unnecessary casts.
storage/innobase/include/row0mysql.h:
  Apply snapshot innodb-51-ss1644
  
  Revision r1571:
  Fix a severe bug that was introduced in r1422 when fixing Bug 21101.
  When creating an index containing a too long record, InnoDB would
  dereference a NULL pointer when trying to determine the maximum row length.
  
  innodb_check_for_record_too_big_error(): Replace the dict_table_t*
  parameter with a Boolean flag.  There is not always a dict_table_t object
  when this function is called.
  
  page_get_free_space_of_empty_noninline(): Move the definition and
  declaration from row0mysql (!) to page0page.  Make the signature
  identical with page_get_free_space_of_empty().
  
  create_clustered_index_when_no_primary(): Add the parameter "comp".
  Remove unnecessary casts.
storage/innobase/include/univ.i:
  Apply snapshot innodb-51-ss1644
  
  Revision r1605:
  Fix Bug#29097 "fsp_get_available_space_in_free_extents() is capped at 4TB"
  by typecasting the variables before multiplying them, so that the result of
  the multiplication is of type "unsigned long long".
  
  I verified this fix by creating a sparse file of 6TB and forcing InnoDB to
  use it without overwriting it with zeroes (by commenting the code that
  overwrites :newraw files).
  
  New type ullint is introduced with the sole purpose of shortening
  "unsigned long long", please do not define it to something else than
  "unsigned long long".
  
  Approved by:	Heikki
  
  
  Revision r1581:
  Port extra Valgrind instrumentation (UNIV_DEBUG_VALGRIND) from branches/zip.
storage/innobase/lock/lock0lock.c:
  Apply snapshot innodb-51-ss1644
  
  Revision r1631:
  Move lock_rec_find_set_bit() and lock_rec_get_prev() from
  lock/lock0lock.c to include/lock0priv.h and make them non-static.
  They will be used in lock/lock0iter.c.
  
  Approved by:	Heikki
  
  
  Revision r1636:
  Move lock_get_type() from lock/lock0lock.c to include/lock0priv.ic:
  * lock0lock.c: remove lock_get_type() and include include/lock0priv.ic
  * lock0priv.h: include lock0priv.ic and add lock_get_type() prototype
  * Makefile.am: add lock0priv.ic to noinst_HEADERS
  * lock0priv.ic: introduce this new file containing the body of
    lock_get_type()
  
  This move is necessary in order to use lock_get_type() from other lock/
  source files (it's going to be used in lock/lock0iter.c).
  
  Approved by:	Heikki
  
  
  Revision r1628:
  lock_has_to_wait() is needed in the INFORMATION_SCHEMA implementation
  in order to determine which lock is blocking which. Make it non-static
  and put its definition in include/lock0lock.h.
  
  Approved by:	Heikki (via IM)
  
  
  Revision r1629:
  Add "const" qualifiers to lock_get_type() and lock_get_mode().
  
  Approved by:	Sunny
  
  
  Revision r1626:
  Move lock_*struct structures from lock/lock0lock.c to include/lock0priv.h.
  
  This is needed in order to add more code to lock/ that uses members of
  these structures (internal to the lock module) but in a separate file,
  rather than lock0lock.c. lock0lock.c is a way too big already.
  
  Approved by:	Sunny
storage/innobase/log/log0recv.c:
  Apply snapshot innodb-51-ss1644
  
  Revision r1607:
  Bug#23710
  
  At InnoDB startup consider the case where log scan went beyond checkpoint_lsn as a crash and initiate crash recovery code path.
  
  reviewed by: Heikki
storage/innobase/mem/mem0mem.c:
  Apply snapshot innodb-51-ss1644
  
  Revision r1581:
  Port extra Valgrind instrumentation (UNIV_DEBUG_VALGRIND) from branches/zip.
storage/innobase/mem/mem0pool.c:
  Apply snapshot innodb-51-ss1644
  
  Revision r1581:
  Port extra Valgrind instrumentation (UNIV_DEBUG_VALGRIND) from branches/zip.
storage/innobase/os/os0file.c:
  Apply snapshot innodb-51-ss1644
  
  Revision r1613:
  Fix Bug#29155 by enabling file locking on FreeBSD.
  It has been disabled because InnoDB has refused to start on
  FreeBSD & LinuxThreads, but now it starts just fine.
  
  Approved by:	Heikki
storage/innobase/page/page0page.c:
  Apply snapshot innodb-51-ss1644
  
  Revision r1571:
  Fix a severe bug that was introduced in r1422 when fixing Bug 21101.
  When creating an index containing a too long record, InnoDB would
  dereference a NULL pointer when trying to determine the maximum row length.
  
  innodb_check_for_record_too_big_error(): Replace the dict_table_t*
  parameter with a Boolean flag.  There is not always a dict_table_t object
  when this function is called.
  
  page_get_free_space_of_empty_noninline(): Move the definition and
  declaration from row0mysql (!) to page0page.  Make the signature
  identical with page_get_free_space_of_empty().
  
  create_clustered_index_when_no_primary(): Add the parameter "comp".
  Remove unnecessary casts.
storage/innobase/rem/rem0rec.c:
  Apply snapshot innodb-51-ss1644
  
  Revision r1581:
  Port extra Valgrind instrumentation (UNIV_DEBUG_VALGRIND) from branches/zip.
storage/innobase/row/row0mysql.c:
  Apply snapshot innodb-51-ss1644
  
  Revision r1571:
  Fix a severe bug that was introduced in r1422 when fixing Bug 21101.
  When creating an index containing a too long record, InnoDB would
  dereference a NULL pointer when trying to determine the maximum row length.
  
  innodb_check_for_record_too_big_error(): Replace the dict_table_t*
  parameter with a Boolean flag.  There is not always a dict_table_t object
  when this function is called.
  
  page_get_free_space_of_empty_noninline(): Move the definition and
  declaration from row0mysql (!) to page0page.  Make the signature
  identical with page_get_free_space_of_empty().
  
  create_clustered_index_when_no_primary(): Add the parameter "comp".
  Remove unnecessary casts.
storage/innobase/sync/sync0rw.c:
  Apply snapshot innodb-51-ss1644
  
  Revision r1598:
  Add some comments.
  
  Approved by:	Heikki (via IM)
storage/innobase/sync/sync0sync.c:
  Apply snapshot innodb-51-ss1644
  
  Revision r1598:
  Add some comments.
  
  Approved by:	Heikki (via IM)
storage/innobase/trx/trx0sys.c:
  Apply snapshot innodb-51-ss1644
  
  Revision r1581:
  Port extra Valgrind instrumentation (UNIV_DEBUG_VALGRIND) from branches/zip.
storage/innobase/trx/trx0trx.c:
  Apply snapshot innodb-51-ss1644
  
  Revision r1595:
  trx_commit_for_mysql(): Avoid acquiring and releasing kernel_mutex when
  trx->sess or trx_dummy_sess is non-NULL.
storage/innobase/ut/ut0mem.c:
  Apply snapshot innodb-51-ss1644
  
  Revision r1581:
  Port extra Valgrind instrumentation (UNIV_DEBUG_VALGRIND) from branches/zip.
2007-07-24 19:34:31 -06:00
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
unknown
7cb8a33b1a Merge bk-internal.mysql.com:/home/bk/mysql-5.1
into  sergbook.mysql.com:/usr/home/serg/Abk/mysql-5.1-wl2936


client/mysql.cc:
  Auto merged
include/my_global.h:
  Auto merged
include/my_sys.h:
  Auto merged
include/mysql.h:
  Auto merged
mysql-test/r/im_utils.result:
  Auto merged
mysql-test/r/variables.result:
  Auto merged
mysql-test/t/ndb_dd_basic.test:
  Auto merged
mysql-test/t/partition_innodb.test:
  Auto merged
mysql-test/t/variables.test:
  Auto merged
mysys/array.c:
  Auto merged
mysys/typelib.c:
  Auto merged
sql/event_queue.cc:
  Auto merged
sql/ha_partition.cc:
  Auto merged
sql/ha_partition.h:
  Auto merged
sql/handler.cc:
  Auto merged
sql/handler.h:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/item_sum.cc:
  Auto merged
sql/log.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/set_var.h:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_cache.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_delete.cc:
  Auto merged
sql/sql_insert.cc:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_lex.h:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_partition.cc:
  Auto merged
sql/sql_plugin.cc:
  Auto merged
sql/sql_repl.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_show.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
sql/table.cc:
  Auto merged
sql/table.h:
  Auto merged
storage/example/ha_example.cc:
  Auto merged
storage/federated/ha_federated.cc:
  Auto merged
storage/heap/ha_heap.cc:
  Auto merged
storage/innobase/include/trx0trx.h:
  Auto merged
storage/myisam/ha_myisam.cc:
  Auto merged
storage/myisammrg/ha_myisammrg.cc:
  Auto merged
storage/ndb/src/mgmsrv/InitConfigFileParser.cpp:
  Auto merged
include/typelib.h:
  merged
mysql-test/mysql-test-run.pl:
  merged
mysql-test/r/flush2.result:
  merged
mysql-test/r/ndb_dd_basic.result:
  merged
mysql-test/r/partition_innodb.result:
  merged
mysql-test/r/ps_1general.result:
  merged
mysql-test/t/ps_1general.test:
  merged
sql/ha_ndbcluster.cc:
  merged
sql/item_create.cc:
  merged
sql/mysqld.cc:
  merged
sql/rpl_utility.h:
  merged
sql/set_var.cc:
  merged
sql/sql_class.cc:
  merged
sql/sql_yacc.yy:
  merged
storage/innobase/handler/ha_innodb.cc:
  merged
storage/innobase/handler/ha_innodb.h:
  merged
2007-04-16 10:37:50 +02:00
unknown
f3009f3f06 Applied innodb-5.1-ss1381 snapshot
Bug #27381: InnoDB exits when attempting to rename table to non-existant database
  Fix Bug#27381 by calling os_file_handle_error_no_exit() instead of
  os_file_handle_error().


mysql-test/t/innodb.test:
  Applied innodb-5.1-ss1381 snapshot
  
  Revision r1373:
  Port r1372 from branches/5.0: Merge a change from MySQL AB, and remove
  the innodb_gis test case.
  
  ChangeSet
    2007/02/19 13:57:06+03:00 kaa@polly.local
    Bug#18743: Several test cases fails if "classic" configuration in 5.0
    The problem happened because those tests were using "cp932" and "ucs2"
    without checking whether these character sets are available.
    This fix moves test parts to make character set specific parts be
    tested only if they are:
    - some parts were moved to "ctype_ucs.test" and "ctype_cp932.test"
    - some parts were moved to the newly added tests "innodb-ucs2.test",
    "mysqlbinglog-cp932.test" and "sp-ucs2.test"
  
  mysql-test/t/innodb.test
    2007/02/19 13:57:02+03:00 kaa@polly.local +0 -222
    Moved ucs2-specific test cases to innodb-ucs2.test
storage/innobase/Makefile.am:
  Applied innodb-5.1-ss1381 snapshot
  
  Revision r1353:
  Makefile.am: EXTRA_DIST: Add the grammar source files to the
  source distribution of MySQL.
storage/innobase/dict/dict0dict.c:
  Applied innodb-5.1-ss1381 snapshot
  
  Revision r1350:
  Lock the data dictionary during rollback.  This removes the rare
  debug assertion failure ut_ad(mutex_own(&(dict_sys->mutex))) in
  dict_table_get_on_id() after the rollback following crash recovery.
storage/innobase/handler/ha_innodb.cc:
  Applied innodb-5.1-ss1381 snapshot
  
  Revision r1377:
  Add static qualifiers to some symbols in ha_innodb.cc that are not
  referenced from other modules.
  
  
  Revision r1380:
  Remove ha_innobase::last_query_id and references to thd->query_id.
  
  MySQL calls external_lock at the beginning and end of a statement
  when it is not calling start_stmt or commit or rollback.  Thus,
  statement boundaries can be (and are already) detected without
  monitoring thd->query_id.
  
  The function innobase_commit() seemingly lacks the call to
  innobase_release_stat_resources(), which should be called at
  the end of every SQL statement.  The call was replaced by
  equivalent statements by Vadim Tkachenko when he implemented
  innodb_commit_concurrency in MySQL 5.0:
  
  http://mysql.bkbits.net:8080/mysql-5.0/?PAGE=patch&REV=1.1886.70.1
  
  
  Revision r1355:
  class ha_innobase: Replace statistic_increment() with ha_statistic_increment().
  
  ha_innobase::change_active_index(): Do not call current_thd unless
  UNIV_DEBUG is defined.
  
  
  Revision r1369:
  Merge a change from MySQL AB:
  
  ChangeSet@1.2409.1.83  2007-03-06 10:36:15-07:00  tsmith@hindu.god
  Bug #26598: Create variable to allow turning off of statistic gathering
  on metadata commands
  
  Add innodb_stats_on_metadata option, which enables gathering
  index statistics when processing metadata commands such as
  SHOW TABLE STATUS.  Default behavior of the server does not
  change (this option is enabled by default).
  
  
  Revision r1342:
  Minor cleanup in ha_innodb.cc.
  
  Remove the unused constants HA_INNOBASE_ROWS_IN_TABLE and
  HA_INNOBASE_RANGE_COUNT.  Declare innobase_active_counter static.
  
  
  Revision r1381:
  innobase_commit(): Correct the comments and formatting that were broken when
  innodb_commit_concurrency was implemented.
  
  
  Revision r1360:
  Minor cleanup.
  
  innobase_query_caching_of_table_permitted(): Make static.
  
  ha_innobase::register_query_cache_table(): Move the function
  definition from ha_innodb.h to ha_innodb.cc.  Add comments.
storage/innobase/handler/ha_innodb.h:
  Applied innodb-5.1-ss1381 snapshot
  
  Revision r1377:
  Add static qualifiers to some symbols in ha_innodb.cc that are not
  referenced from other modules.
  
  
  Revision r1380:
  Remove ha_innobase::last_query_id and references to thd->query_id.
  
  MySQL calls external_lock at the beginning and end of a statement
  when it is not calling start_stmt or commit or rollback.  Thus,
  statement boundaries can be (and are already) detected without
  monitoring thd->query_id.
  
  The function innobase_commit() seemingly lacks the call to
  innobase_release_stat_resources(), which should be called at
  the end of every SQL statement.  The call was replaced by
  equivalent statements by Vadim Tkachenko when he implemented
  innodb_commit_concurrency in MySQL 5.0:
  
  http://mysql.bkbits.net:8080/mysql-5.0/?PAGE=patch&REV=1.1886.70.1
  
  
  Revision r1369:
  Merge a change from MySQL AB:
  
  ChangeSet@1.2409.1.83  2007-03-06 10:36:15-07:00  tsmith@hindu.god
  Bug #26598: Create variable to allow turning off of statistic gathering
  on metadata commands
  
  Add innodb_stats_on_metadata option, which enables gathering
  index statistics when processing metadata commands such as
  SHOW TABLE STATUS.  Default behavior of the server does not
  change (this option is enabled by default).
  
  
  Revision r1360:
  Minor cleanup.
  
  innobase_query_caching_of_table_permitted(): Make static.
  
  ha_innobase::register_query_cache_table(): Move the function
  definition from ha_innodb.h to ha_innodb.cc.  Add comments.
storage/innobase/include/trx0trx.h:
  Applied innodb-5.1-ss1381 snapshot
  
  Revision r1344:
  Rename the Boolean field trx->type to trx->is_purge
  and remove the constants TRX_USER and TRX_PURGE.
  
  
  Revision r1343:
  trx_sig_struct: Remove state.  It is always assigned to TRX_SIG_WAITING
  and never tested.
storage/innobase/os/os0file.c:
  Applied innodb-5.1-ss1381 snapshot
  
  Revision r1352:
  Fix typo in comment in os/os0file.c
  
  Approved by:	heikki
  
  
  
  Revision r1366:
  Fix Bug#27381 by calling os_file_handle_error_no_exit() instead of
  os_file_handle_error().
  
  Approved by:	Heikki
storage/innobase/row/row0undo.c:
  Applied innodb-5.1-ss1381 snapshot
  
  Revision r1350:
  Lock the data dictionary during rollback.  This removes the rare
  debug assertion failure ut_ad(mutex_own(&(dict_sys->mutex))) in
  dict_table_get_on_id() after the rollback following crash recovery.
storage/innobase/trx/trx0purge.c:
  Applied innodb-5.1-ss1381 snapshot
  
  Revision r1344:
  Rename the Boolean field trx->type to trx->is_purge
  and remove the constants TRX_USER and TRX_PURGE.
storage/innobase/trx/trx0trx.c:
  Applied innodb-5.1-ss1381 snapshot
  
  Revision r1344:
  Rename the Boolean field trx->type to trx->is_purge
  and remove the constants TRX_USER and TRX_PURGE.
  
  
  Revision r1343:
  trx_sig_struct: Remove state.  It is always assigned to TRX_SIG_WAITING
  and never tested.
2007-03-28 22:46:28 -06:00
unknown
76de7d788c Apply the following InnoDB snapshots:
innodb-5.1-ss1318
innodb-5.1-ss1330
innodb-5.1-ss1332
innodb-5.1-ss1340

Fixes:
- Bug #21409: Incorrect result returned when in READ-COMMITTED with query_cache ON
  At low transaction isolation levels we let each consistent read set
  its own snapshot.

- Bug #23666: strange Innodb_row_lock_time_% values in show status; also millisecs wrong
  On Windows ut_usectime returns secs and usecs relative to the UNIX
  epoch (which is Jan, 1 1970).

- Bug #25494: LATEST DEADLOCK INFORMATION is not always cleared
  lock_deadlock_recursive(): When the search depth or length is exceeded,
  rewind lock_latest_err_file and display the two transactions at the
  point of aborting the search.

- Bug #25927: Foreign key with ON DELETE SET NULL on NOT NULL can crash server
  Prevent ALTER TABLE ... MODIFY ... NOT NULL on columns for which
  there is a foreign key constraint ON ... SET NULL.

- Bug #26835: Repeatable corruption of utf8-enabled tables inside InnoDB
  The bug could be reproduced as follows:

  Define a table so that the first column of the clustered index is
  a VARCHAR or a UTF-8 CHAR in a collation where sequences of bytes
  of differing length are considered equivalent.

  Insert and delete a record.  Before the delete-marked record is
  purged, insert another record whose first column is of different
  length but equivalent to the first record.  Under certain conditions,
  the insertion can be incorrectly performed as update-in-place.

  Likewise, an operation that could be done as update-in-place can
  unnecessarily be performed as delete and insert, but that would not
  cause corruption but merely degraded performance.


mysql-test/r/innodb.result:
  Apply the following InnoDB snapshots:
  innodb-5.1-ss1318
  innodb-5.1-ss1330
  innodb-5.1-ss1332
  innodb-5.1-ss1340
  
  Revision r1284:
  Merge changes from MySQL AB:
  
  ChangeSet
    2007/01/24 14:49:36+04:00 holyfoot@mysql.com 
    bug 22682 Test fails --without-geometry
    geometry dependent parts moved to proper .test files
  
  mysql-test/r/innodb.result
    2007/01/24 14:49:34+04:00 holyfoot@mysql.com +0 -2
    result fixed
  
  mysql-test/r/innodb_gis.result
    2007/01/24 14:49:34+04:00 holyfoot@mysql.com +2 -0
    result fixed
  
  mysql-test/t/innodb.test
    2007/01/24 14:49:34+04:00 holyfoot@mysql.com +0 -6
    HAVE_GEOMETRY dependent part moved to innodb_gis.test
  
  mysql-test/t/innodb_gis.test
    2007/01/24 14:49:35+04:00 holyfoot@mysql.com +6 -0
    HAVE_GEOMETRY dependent part moved here from innodb.test
  
  
  Revision r1186:
  dict_load_foreign(): Use a local variable instead of the 10-bit field
  foreign->n_fields in order to preserve ON UPDATE CASCADE and
  ON DELETE CASCADE flags.  For some reason, gcc does not warn about
  shifting a 10-bit field to right by 24 bits.  (Bug 24741)
  
  This bug was introduced while reducing the memory footprint of the
  InnoDB data dictionary (Bug 20877).
  
  innodb.test, innodb.result: Add a test case.
  
  
  Revision r1318:
  Add a test case for r1316 (Bug #25927).
  
  
  Revision r1340:
  innodb.test, innodb.result: Add test case for Bug #26835.
  The bug could be reproduced as follows:
  
  Define a table so that the first column of the clustered index is
  a VARCHAR or a UTF-8 CHAR in a collation where sequences of bytes
  of differing length are considered equivalent.
  
  Insert and delete a record.  Before the delete-marked record is
  purged, insert another record whose first column is of different
  length but equivalent to the first record.  Under certain conditions,
  the insertion can be incorrectly performed as update-in-place.
  
  Likewise, an operation that could be done as update-in-place can
  unnecessarily be performed as delete and insert, but that would not
  cause corruption but merely degraded performance.
mysql-test/t/innodb.test:
  Apply the following InnoDB snapshots:
  innodb-5.1-ss1318
  innodb-5.1-ss1330
  innodb-5.1-ss1332
  innodb-5.1-ss1340
  
  Revision r1284:
  Merge changes from MySQL AB:
  
  ChangeSet
    2007/01/24 14:49:36+04:00 holyfoot@mysql.com 
    bug 22682 Test fails --without-geometry
    geometry dependent parts moved to proper .test files
  
  mysql-test/r/innodb.result
    2007/01/24 14:49:34+04:00 holyfoot@mysql.com +0 -2
    result fixed
  
  mysql-test/r/innodb_gis.result
    2007/01/24 14:49:34+04:00 holyfoot@mysql.com +2 -0
    result fixed
  
  mysql-test/t/innodb.test
    2007/01/24 14:49:34+04:00 holyfoot@mysql.com +0 -6
    HAVE_GEOMETRY dependent part moved to innodb_gis.test
  
  mysql-test/t/innodb_gis.test
    2007/01/24 14:49:35+04:00 holyfoot@mysql.com +6 -0
    HAVE_GEOMETRY dependent part moved here from innodb.test
  
  
  Revision r1283:
  Merge changes from MySQL AB:
  
  ChangeSet
    2007/01/22 18:42:52+02:00 monty@mysql.com 
    Give warnings for unused objects
    Changed error message to be compatible with old error file
    Added new error message for new DUP_ENTRY syntax
  
  mysql-test/t/innodb.test
    2007/01/22 18:42:49+02:00 monty@mysql.com +14 -14
    Changed to use new error message
  
  
  Revision r1186:
  dict_load_foreign(): Use a local variable instead of the 10-bit field
  foreign->n_fields in order to preserve ON UPDATE CASCADE and
  ON DELETE CASCADE flags.  For some reason, gcc does not warn about
  shifting a 10-bit field to right by 24 bits.  (Bug 24741)
  
  This bug was introduced while reducing the memory footprint of the
  InnoDB data dictionary (Bug 20877).
  
  innodb.test, innodb.result: Add a test case.
  
  
  Revision r1318:
  Add a test case for r1316 (Bug #25927).
  
  
  Revision r1329:
  Merge changes from MySQL AB to mysql-test directives.
  The results are not affected.
  
  
  Revision r1340:
  innodb.test, innodb.result: Add test case for Bug #26835.
  The bug could be reproduced as follows:
  
  Define a table so that the first column of the clustered index is
  a VARCHAR or a UTF-8 CHAR in a collation where sequences of bytes
  of differing length are considered equivalent.
  
  Insert and delete a record.  Before the delete-marked record is
  purged, insert another record whose first column is of different
  length but equivalent to the first record.  Under certain conditions,
  the insertion can be incorrectly performed as update-in-place.
  
  Likewise, an operation that could be done as update-in-place can
  unnecessarily be performed as delete and insert, but that would not
  cause corruption but merely degraded performance.
storage/innobase/buf/buf0buf.c:
  Apply the following InnoDB snapshots:
  innodb-5.1-ss1318
  innodb-5.1-ss1330
  innodb-5.1-ss1332
  innodb-5.1-ss1340
  
  Revision r1242:
  Merge r1239 from
  branches/zip: Make mutex_own() work with UNIV_DEBUG, without UNIV_SYNC_DEBUG.
storage/innobase/buf/buf0flu.c:
  Apply the following InnoDB snapshots:
  innodb-5.1-ss1318
  innodb-5.1-ss1330
  innodb-5.1-ss1332
  innodb-5.1-ss1340
  
  Revision r1242:
  Merge r1239 from
  branches/zip: Make mutex_own() work with UNIV_DEBUG, without UNIV_SYNC_DEBUG.
storage/innobase/buf/buf0lru.c:
  Apply the following InnoDB snapshots:
  innodb-5.1-ss1318
  innodb-5.1-ss1330
  innodb-5.1-ss1332
  innodb-5.1-ss1340
  
  Revision r1242:
  Merge r1239 from
  branches/zip: Make mutex_own() work with UNIV_DEBUG, without UNIV_SYNC_DEBUG.
storage/innobase/dict/dict0boot.c:
  Apply the following InnoDB snapshots:
  innodb-5.1-ss1318
  innodb-5.1-ss1330
  innodb-5.1-ss1332
  innodb-5.1-ss1340
  
  Revision r1242:
  Merge r1239 from
  branches/zip: Make mutex_own() work with UNIV_DEBUG, without UNIV_SYNC_DEBUG.
storage/innobase/dict/dict0crea.c:
  Apply the following InnoDB snapshots:
  innodb-5.1-ss1318
  innodb-5.1-ss1330
  innodb-5.1-ss1332
  innodb-5.1-ss1340
  
  Revision r1242:
  Merge r1239 from
  branches/zip: Make mutex_own() work with UNIV_DEBUG, without UNIV_SYNC_DEBUG.
  
  
  Revision r1324:
  Merge changes from MySQL AB:
  
  ChangeSet@1.2452, 2007-02-23 13:13:55+02:00, monty@mysql.com +177 -0
    Fixed compiler warnings
    ...
    Fixed compiler warnings detected on windows64
storage/innobase/dict/dict0dict.c:
  Apply the following InnoDB snapshots:
  innodb-5.1-ss1318
  innodb-5.1-ss1330
  innodb-5.1-ss1332
  innodb-5.1-ss1340
  
  Revision r1242:
  Merge r1239 from
  branches/zip: Make mutex_own() work with UNIV_DEBUG, without UNIV_SYNC_DEBUG.
  
  
  Revision r1316:
  Prevent ALTER TABLE ... MODIFY ... NOT NULL on columns for which
  there is a foreign key constraint ON ... SET NULL.  (Bug #25927)
  
  dict_foreign_find_index(): Add paramettter check_null.
  
  dict_foreign_add_to_cache(): Do not allow ON DELETE SET NULL
  or ON UPDATE SET NULL if any of the referencing columns are declared NOT NULL.
  
  
  Revision r1324:
  Merge changes from MySQL AB:
  
  ChangeSet@1.2452, 2007-02-23 13:13:55+02:00, monty@mysql.com +177 -0
    Fixed compiler warnings
    ...
    Fixed compiler warnings detected on windows64
storage/innobase/dict/dict0load.c:
  Apply the following InnoDB snapshots:
  innodb-5.1-ss1318
  innodb-5.1-ss1330
  innodb-5.1-ss1332
  innodb-5.1-ss1340
  
  Revision r1186:
  dict_load_foreign(): Use a local variable instead of the 10-bit field
  foreign->n_fields in order to preserve ON UPDATE CASCADE and
  ON DELETE CASCADE flags.  For some reason, gcc does not warn about
  shifting a 10-bit field to right by 24 bits.  (Bug 24741)
  
  This bug was introduced while reducing the memory footprint of the
  InnoDB data dictionary (Bug 20877).
  
  innodb.test, innodb.result: Add a test case.
  
  
  Revision r1242:
  Merge r1239 from
  branches/zip: Make mutex_own() work with UNIV_DEBUG, without UNIV_SYNC_DEBUG.
  
  
  Revision r1324:
  Merge changes from MySQL AB:
  
  ChangeSet@1.2452, 2007-02-23 13:13:55+02:00, monty@mysql.com +177 -0
    Fixed compiler warnings
    ...
    Fixed compiler warnings detected on windows64
storage/innobase/fil/fil0fil.c:
  Apply the following InnoDB snapshots:
  innodb-5.1-ss1318
  innodb-5.1-ss1330
  innodb-5.1-ss1332
  innodb-5.1-ss1340
  
  Revision r1242:
  Merge r1239 from
  branches/zip: Make mutex_own() work with UNIV_DEBUG, without UNIV_SYNC_DEBUG.
storage/innobase/fsp/fsp0fsp.c:
  Apply the following InnoDB snapshots:
  innodb-5.1-ss1318
  innodb-5.1-ss1330
  innodb-5.1-ss1332
  innodb-5.1-ss1340
  
  Revision r1242:
  Merge r1239 from
  branches/zip: Make mutex_own() work with UNIV_DEBUG, without UNIV_SYNC_DEBUG.
storage/innobase/ha/ha0ha.c:
  Apply the following InnoDB snapshots:
  innodb-5.1-ss1318
  innodb-5.1-ss1330
  innodb-5.1-ss1332
  innodb-5.1-ss1340
  
  Revision r1242:
  Merge r1239 from
  branches/zip: Make mutex_own() work with UNIV_DEBUG, without UNIV_SYNC_DEBUG.
storage/innobase/handler/ha_innodb.cc:
  Apply the following InnoDB snapshots:
  innodb-5.1-ss1318
  innodb-5.1-ss1330
  innodb-5.1-ss1332
  innodb-5.1-ss1340
  
  Revision r1204:
  Change this in ha_innobase:
  
   void*           innobase_prebuilt;
  
  to this:
  
   row_prebuilt_t* prebuilt;
  
  by introducing the typedef in ha_innodb.h, and remove all the now needless
  local variables and casts in ha_innodb.cc.
  
  Revision r1298:
  ha_innodb.cc: Remove all references to thd->ha_data[hton->slot].
  
  thd_to_trx(thd, hton): Accessor for getting the InnoDB trx object
  of a MySQL thread object and an InnoDB handlerton.
  
  
  Revision r1292:
  Remove the declarations of some global functions in ha_innodb.h and declare
  them static in ha_innodb.cc.  These functions are invoked via function
  pointers in handlerton.
  
  
  Revision r1300:
  ha_innodb.cc: Replace thd->tablespace_op with thd_tablespace_op(thd).
  Plugins must treat class THD as an opaque type.
  
  
  Revision r1198:
  Merge a change from MySQL AB:
  
  ChangeSet@1.2372, 2006-12-31 02:29:11+01:00, kent@mysql.com +79 -0
    Many files:
      Removed "MySQL Finland AB & TCX DataKonsult AB" from copyright header
      Adjusted year(s) in copyright header 
      Added GPL copyright text
  
  
  Revision r1271:
  Merge changes from MySQL AB:
  
  Rename some FIELD_TYPE_ constants to MYSQL_TYPE_.
  
  Change the scope of a type cast of two dividends.
  
  
  Revision r1299:
  ha_innodb.cc: Replace thd->in_lock_tables with thd_in_lock_tables(thd).
  Plugins must treat class THD as an opaque type.
  
  
  Revision r1201:
  Apply patch from MySQL:
  
   ChangeSet@1.2353, 2006-12-19 16:57:51-07:00, tsmith@siva.hindu.god +13 -0
     Added innodb_rollback_on_timeout option to restore the 4.1 
     InnoDB timeout behavior (Bug 24200)
  
  Revision r1322:
  ha_innodb.cc: Remove the unused innobase_repl_ variables.
  
  
  Revision r1324:
  Merge changes from MySQL AB:
  
  ChangeSet@1.2452, 2007-02-23 13:13:55+02:00, monty@mysql.com +177 -0
    Fixed compiler warnings
    ...
    Fixed compiler warnings detected on windows64
  
  
  Revision r1334:
  Fix for Bug# 21409. At low transaction isolation levels we let each 
  consistent read set its own snapshot
storage/innobase/handler/ha_innodb.h:
  Apply the following InnoDB snapshots:
  innodb-5.1-ss1318
  innodb-5.1-ss1330
  innodb-5.1-ss1332
  innodb-5.1-ss1340
  
  Revision r1204:
  Change this in ha_innobase:
  
   void*           innobase_prebuilt;
  
  to this:
  
   row_prebuilt_t* prebuilt;
  
  by introducing the typedef in ha_innodb.h, and remove all the now needless
  local variables and casts in ha_innodb.cc.
  
  Revision r1292:
  Remove the declarations of some global functions in ha_innodb.h and declare
  them static in ha_innodb.cc.  These functions are invoked via function
  pointers in handlerton.
  
  
  Revision r1198:
  Merge a change from MySQL AB:
  
  ChangeSet@1.2372, 2006-12-31 02:29:11+01:00, kent@mysql.com +79 -0
    Many files:
      Removed "MySQL Finland AB & TCX DataKonsult AB" from copyright header
      Adjusted year(s) in copyright header 
      Added GPL copyright text
  
  
  Revision r1201:
  Apply patch from MySQL:
  
   ChangeSet@1.2353, 2006-12-19 16:57:51-07:00, tsmith@siva.hindu.god +13 -0
     Added innodb_rollback_on_timeout option to restore the 4.1 
     InnoDB timeout behavior (Bug 24200)
storage/innobase/ibuf/ibuf0ibuf.c:
  Apply the following InnoDB snapshots:
  innodb-5.1-ss1318
  innodb-5.1-ss1330
  innodb-5.1-ss1332
  innodb-5.1-ss1340
  
  Revision r1242:
  Merge r1239 from
  branches/zip: Make mutex_own() work with UNIV_DEBUG, without UNIV_SYNC_DEBUG.
storage/innobase/include/buf0buf.ic:
  Apply the following InnoDB snapshots:
  innodb-5.1-ss1318
  innodb-5.1-ss1330
  innodb-5.1-ss1332
  innodb-5.1-ss1340
  
  Revision r1242:
  Merge r1239 from
  branches/zip: Make mutex_own() work with UNIV_DEBUG, without UNIV_SYNC_DEBUG.
storage/innobase/include/buf0flu.ic:
  Apply the following InnoDB snapshots:
  innodb-5.1-ss1318
  innodb-5.1-ss1330
  innodb-5.1-ss1332
  innodb-5.1-ss1340
  
  Revision r1242:
  Merge r1239 from
  branches/zip: Make mutex_own() work with UNIV_DEBUG, without UNIV_SYNC_DEBUG.
storage/innobase/include/dict0dict.ic:
  Apply the following InnoDB snapshots:
  innodb-5.1-ss1318
  innodb-5.1-ss1330
  innodb-5.1-ss1332
  innodb-5.1-ss1340
  
  Revision r1242:
  Merge r1239 from
  branches/zip: Make mutex_own() work with UNIV_DEBUG, without UNIV_SYNC_DEBUG.
storage/innobase/include/ha0ha.ic:
  Apply the following InnoDB snapshots:
  innodb-5.1-ss1318
  innodb-5.1-ss1330
  innodb-5.1-ss1332
  innodb-5.1-ss1340
  
  Revision r1242:
  Merge r1239 from
  branches/zip: Make mutex_own() work with UNIV_DEBUG, without UNIV_SYNC_DEBUG.
storage/innobase/include/lock0lock.ic:
  Apply the following InnoDB snapshots:
  innodb-5.1-ss1318
  innodb-5.1-ss1330
  innodb-5.1-ss1332
  innodb-5.1-ss1340
  
  Revision r1242:
  Merge r1239 from
  branches/zip: Make mutex_own() work with UNIV_DEBUG, without UNIV_SYNC_DEBUG.
storage/innobase/include/log0log.ic:
  Apply the following InnoDB snapshots:
  innodb-5.1-ss1318
  innodb-5.1-ss1330
  innodb-5.1-ss1332
  innodb-5.1-ss1340
  
  Revision r1242:
  Merge r1239 from
  branches/zip: Make mutex_own() work with UNIV_DEBUG, without UNIV_SYNC_DEBUG.
storage/innobase/include/mem0mem.h:
  Apply the following InnoDB snapshots:
  innodb-5.1-ss1318
  innodb-5.1-ss1330
  innodb-5.1-ss1332
  innodb-5.1-ss1340
  
  Revision r1241:
  Remove the unused function mem_strdupq().
storage/innobase/include/mem0mem.ic:
  Apply the following InnoDB snapshots:
  innodb-5.1-ss1318
  innodb-5.1-ss1330
  innodb-5.1-ss1332
  innodb-5.1-ss1340
  
  Revision r1241:
  Remove the unused function mem_strdupq().
storage/innobase/include/rem0rec.ic:
  Apply the following InnoDB snapshots:
  innodb-5.1-ss1318
  innodb-5.1-ss1330
  innodb-5.1-ss1332
  innodb-5.1-ss1340
  
  Revision r1338:
  rec_offs_nth_size(): Treat n==0 as a special case.  (Bug #26835)
storage/innobase/include/sync0rw.ic:
  Apply the following InnoDB snapshots:
  innodb-5.1-ss1318
  innodb-5.1-ss1330
  innodb-5.1-ss1332
  innodb-5.1-ss1340
  
  Revision r1242:
  Merge r1239 from
  branches/zip: Make mutex_own() work with UNIV_DEBUG, without UNIV_SYNC_DEBUG.
storage/innobase/include/sync0sync.h:
  Apply the following InnoDB snapshots:
  innodb-5.1-ss1318
  innodb-5.1-ss1330
  innodb-5.1-ss1332
  innodb-5.1-ss1340
  
  Revision r1242:
  Merge r1239 from
  branches/zip: Make mutex_own() work with UNIV_DEBUG, without UNIV_SYNC_DEBUG.
  
  
  Revision r1247:
  Rename mutex_enter_nowait to mutex_enter_nowait_func and add macro
  mutex_enter_nowait that supplies the default __FILE__ and __LINE__
  arguments. Adjust callers.
storage/innobase/include/sync0sync.ic:
  Apply the following InnoDB snapshots:
  innodb-5.1-ss1318
  innodb-5.1-ss1330
  innodb-5.1-ss1332
  innodb-5.1-ss1340
  
  Revision r1294:
  Fixed inline asm code, it didn't work with GCC > ver 3.x.
  
  
  Revision r1244:
  Add ut_ad() debug assertions.
  
  UT_LIST_ADD_FIRST(), UT_LIST_ADD_LAST(), UT_LIST_INSERT_AFTER():
  Assert against some trivial cases of cyclic lists.
  
  mutex_enter_func(): Assert that the current thread is not holding the mutex.
  
  
  Revision r1242:
  Merge r1239 from
  branches/zip: Make mutex_own() work with UNIV_DEBUG, without UNIV_SYNC_DEBUG.
storage/innobase/include/trx0sys.ic:
  Apply the following InnoDB snapshots:
  innodb-5.1-ss1318
  innodb-5.1-ss1330
  innodb-5.1-ss1332
  innodb-5.1-ss1340
  
  Revision r1242:
  Merge r1239 from
  branches/zip: Make mutex_own() work with UNIV_DEBUG, without UNIV_SYNC_DEBUG.
storage/innobase/include/univ.i:
  Apply the following InnoDB snapshots:
  innodb-5.1-ss1318
  innodb-5.1-ss1330
  innodb-5.1-ss1332
  innodb-5.1-ss1340
  
  Revision r1285:
  Merge a change from MySQL AB:
  
  ChangeSet
    2006/10/26 15:41:47-04:00 iggy@amd64. 
    Post Merge Cleanup
  
  storage/innobase/include/univ.i
    2006/10/26 15:38:50-04:00 iggy@amd64. +9 -0
    Post Merge Cleanup
storage/innobase/include/ut0lst.h:
  Apply the following InnoDB snapshots:
  innodb-5.1-ss1318
  innodb-5.1-ss1330
  innodb-5.1-ss1332
  innodb-5.1-ss1340
  
  Revision r1244:
  Add ut_ad() debug assertions.
  
  UT_LIST_ADD_FIRST(), UT_LIST_ADD_LAST(), UT_LIST_INSERT_AFTER():
  Assert against some trivial cases of cyclic lists.
  
  mutex_enter_func(): Assert that the current thread is not holding the mutex.
storage/innobase/lock/lock0lock.c:
  Apply the following InnoDB snapshots:
  innodb-5.1-ss1318
  innodb-5.1-ss1330
  innodb-5.1-ss1332
  innodb-5.1-ss1340
  
  Revision r1242:
  Merge r1239 from
  branches/zip: Make mutex_own() work with UNIV_DEBUG, without UNIV_SYNC_DEBUG.
  
  
  Revision r1330:
  lock_deadlock_recursive(): When the search depth or length is exceeded,
  rewind lock_latest_err_file and display the two transactions at the
  point of aborting the search.  (Bug #25494)
  
  
  Revision r1332:
  lock_deadlock_recursive(): When aborting the search, display a note
  regardless of start->undo_no.  Otherwise, aborted searches may show
  up as genuine deadlocks.  This mistake was made in r1330.
storage/innobase/log/log0log.c:
  Apply the following InnoDB snapshots:
  innodb-5.1-ss1318
  innodb-5.1-ss1330
  innodb-5.1-ss1332
  innodb-5.1-ss1340
  
  Revision r1242:
  Merge r1239 from
  branches/zip: Make mutex_own() work with UNIV_DEBUG, without UNIV_SYNC_DEBUG.
  
  
  Revision r1247:
  Rename mutex_enter_nowait to mutex_enter_nowait_func and add macro
  mutex_enter_nowait that supplies the default __FILE__ and __LINE__
  arguments. Adjust callers.
storage/innobase/log/log0recv.c:
  Apply the following InnoDB snapshots:
  innodb-5.1-ss1318
  innodb-5.1-ss1330
  innodb-5.1-ss1332
  innodb-5.1-ss1340
  
  Revision r1242:
  Merge r1239 from
  branches/zip: Make mutex_own() work with UNIV_DEBUG, without UNIV_SYNC_DEBUG.
storage/innobase/mem/mem0pool.c:
  Apply the following InnoDB snapshots:
  innodb-5.1-ss1318
  innodb-5.1-ss1330
  innodb-5.1-ss1332
  innodb-5.1-ss1340
  
  Revision r1242:
  Merge r1239 from
  branches/zip: Make mutex_own() work with UNIV_DEBUG, without UNIV_SYNC_DEBUG.
storage/innobase/pars/pars0pars.c:
  Apply the following InnoDB snapshots:
  innodb-5.1-ss1318
  innodb-5.1-ss1330
  innodb-5.1-ss1332
  innodb-5.1-ss1340
  
  Revision r1242:
  Merge r1239 from
  branches/zip: Make mutex_own() work with UNIV_DEBUG, without UNIV_SYNC_DEBUG.
storage/innobase/que/que0que.c:
  Apply the following InnoDB snapshots:
  innodb-5.1-ss1318
  innodb-5.1-ss1330
  innodb-5.1-ss1332
  innodb-5.1-ss1340
  
  Revision r1242:
  Merge r1239 from
  branches/zip: Make mutex_own() work with UNIV_DEBUG, without UNIV_SYNC_DEBUG.
storage/innobase/read/read0read.c:
  Apply the following InnoDB snapshots:
  innodb-5.1-ss1318
  innodb-5.1-ss1330
  innodb-5.1-ss1332
  innodb-5.1-ss1340
  
  Revision r1242:
  Merge r1239 from
  branches/zip: Make mutex_own() work with UNIV_DEBUG, without UNIV_SYNC_DEBUG.
storage/innobase/row/row0mysql.c:
  Apply the following InnoDB snapshots:
  innodb-5.1-ss1318
  innodb-5.1-ss1330
  innodb-5.1-ss1332
  innodb-5.1-ss1340
  
  Revision r1242:
  Merge r1239 from
  branches/zip: Make mutex_own() work with UNIV_DEBUG, without UNIV_SYNC_DEBUG.
  
  
  Revision r1201:
  Apply patch from MySQL:
  
   ChangeSet@1.2353, 2006-12-19 16:57:51-07:00, tsmith@siva.hindu.god +13 -0
     Added innodb_rollback_on_timeout option to restore the 4.1 
     InnoDB timeout behavior (Bug 24200)
  
  Revision r1324:
  Merge changes from MySQL AB:
  
  ChangeSet@1.2452, 2007-02-23 13:13:55+02:00, monty@mysql.com +177 -0
    Fixed compiler warnings
    ...
    Fixed compiler warnings detected on windows64
storage/innobase/row/row0vers.c:
  Apply the following InnoDB snapshots:
  innodb-5.1-ss1318
  innodb-5.1-ss1330
  innodb-5.1-ss1332
  innodb-5.1-ss1340
  
  Revision r1242:
  Merge r1239 from
  branches/zip: Make mutex_own() work with UNIV_DEBUG, without UNIV_SYNC_DEBUG.
storage/innobase/srv/srv0que.c:
  Apply the following InnoDB snapshots:
  innodb-5.1-ss1318
  innodb-5.1-ss1330
  innodb-5.1-ss1332
  innodb-5.1-ss1340
  
  Revision r1242:
  Merge r1239 from
  branches/zip: Make mutex_own() work with UNIV_DEBUG, without UNIV_SYNC_DEBUG.
storage/innobase/srv/srv0srv.c:
  Apply the following InnoDB snapshots:
  innodb-5.1-ss1318
  innodb-5.1-ss1330
  innodb-5.1-ss1332
  innodb-5.1-ss1340
  
  Revision r1262:
  Fix for Bug# 23666. On Windows ut_usectime returns secs 
  and usecs relative to the UNIX epoch (which is Jan, 1 1970).
  
  
  Revision r1242:
  Merge r1239 from
  branches/zip: Make mutex_own() work with UNIV_DEBUG, without UNIV_SYNC_DEBUG.
storage/innobase/sync/sync0rw.c:
  Apply the following InnoDB snapshots:
  innodb-5.1-ss1318
  innodb-5.1-ss1330
  innodb-5.1-ss1332
  innodb-5.1-ss1340
  
  Revision r1242:
  Merge r1239 from
  branches/zip: Make mutex_own() work with UNIV_DEBUG, without UNIV_SYNC_DEBUG.
  
  
  Revision r1247:
  Rename mutex_enter_nowait to mutex_enter_nowait_func and add macro
  mutex_enter_nowait that supplies the default __FILE__ and __LINE__
  arguments. Adjust callers.
  
  Revision r1324:
  Merge changes from MySQL AB:
  
  ChangeSet@1.2452, 2007-02-23 13:13:55+02:00, monty@mysql.com +177 -0
    Fixed compiler warnings
    ...
    Fixed compiler warnings detected on windows64
storage/innobase/sync/sync0sync.c:
  Apply the following InnoDB snapshots:
  innodb-5.1-ss1318
  innodb-5.1-ss1330
  innodb-5.1-ss1332
  innodb-5.1-ss1340
  
  Revision r1242:
  Merge r1239 from
  branches/zip: Make mutex_own() work with UNIV_DEBUG, without UNIV_SYNC_DEBUG.
  
  
  Revision r1247:
  Rename mutex_enter_nowait to mutex_enter_nowait_func and add macro
  mutex_enter_nowait that supplies the default __FILE__ and __LINE__
  arguments. Adjust callers.
storage/innobase/thr/thr0loc.c:
  Apply the following InnoDB snapshots:
  innodb-5.1-ss1318
  innodb-5.1-ss1330
  innodb-5.1-ss1332
  innodb-5.1-ss1340
  
  Revision r1242:
  Merge r1239 from
  branches/zip: Make mutex_own() work with UNIV_DEBUG, without UNIV_SYNC_DEBUG.
storage/innobase/trx/trx0purge.c:
  Apply the following InnoDB snapshots:
  innodb-5.1-ss1318
  innodb-5.1-ss1330
  innodb-5.1-ss1332
  innodb-5.1-ss1340
  
  Revision r1242:
  Merge r1239 from
  branches/zip: Make mutex_own() work with UNIV_DEBUG, without UNIV_SYNC_DEBUG.
storage/innobase/trx/trx0roll.c:
  Apply the following InnoDB snapshots:
  innodb-5.1-ss1318
  innodb-5.1-ss1330
  innodb-5.1-ss1332
  innodb-5.1-ss1340
  
  Revision r1242:
  Merge r1239 from
  branches/zip: Make mutex_own() work with UNIV_DEBUG, without UNIV_SYNC_DEBUG.
storage/innobase/trx/trx0rseg.c:
  Apply the following InnoDB snapshots:
  innodb-5.1-ss1318
  innodb-5.1-ss1330
  innodb-5.1-ss1332
  innodb-5.1-ss1340
  
  Revision r1242:
  Merge r1239 from
  branches/zip: Make mutex_own() work with UNIV_DEBUG, without UNIV_SYNC_DEBUG.
storage/innobase/trx/trx0sys.c:
  Apply the following InnoDB snapshots:
  innodb-5.1-ss1318
  innodb-5.1-ss1330
  innodb-5.1-ss1332
  innodb-5.1-ss1340
  
  Revision r1242:
  Merge r1239 from
  branches/zip: Make mutex_own() work with UNIV_DEBUG, without UNIV_SYNC_DEBUG.
storage/innobase/trx/trx0trx.c:
  Apply the following InnoDB snapshots:
  innodb-5.1-ss1318
  innodb-5.1-ss1330
  innodb-5.1-ss1332
  innodb-5.1-ss1340
  
  Revision r1242:
  Merge r1239 from
  branches/zip: Make mutex_own() work with UNIV_DEBUG, without UNIV_SYNC_DEBUG.
  
  
  Revision r1324:
  Merge changes from MySQL AB:
  
  ChangeSet@1.2452, 2007-02-23 13:13:55+02:00, monty@mysql.com +177 -0
    Fixed compiler warnings
    ...
    Fixed compiler warnings detected on windows64
storage/innobase/trx/trx0undo.c:
  Apply the following InnoDB snapshots:
  innodb-5.1-ss1318
  innodb-5.1-ss1330
  innodb-5.1-ss1332
  innodb-5.1-ss1340
  
  Revision r1242:
  Merge r1239 from
  branches/zip: Make mutex_own() work with UNIV_DEBUG, without UNIV_SYNC_DEBUG.
storage/innobase/usr/usr0sess.c:
  Apply the following InnoDB snapshots:
  innodb-5.1-ss1318
  innodb-5.1-ss1330
  innodb-5.1-ss1332
  innodb-5.1-ss1340
  
  Revision r1242:
  Merge r1239 from
  branches/zip: Make mutex_own() work with UNIV_DEBUG, without UNIV_SYNC_DEBUG.
storage/innobase/ut/ut0ut.c:
  Apply the following InnoDB snapshots:
  innodb-5.1-ss1318
  innodb-5.1-ss1330
  innodb-5.1-ss1332
  innodb-5.1-ss1340
  
  Revision r1262:
  Fix for Bug# 23666. On Windows ut_usectime returns secs 
  and usecs relative to the UNIX epoch (which is Jan, 1 1970).
2007-03-22 15:59:35 -06:00
unknown
3602e293a2 Bug #26598: Create variable to allow turning off of statistic gathering on metadata commands
Add innodb_stats_on_metadata option, which enables gathering
index statistics when processing metadata commands such as
SHOW TABLE STATUS.  Default behavior of the server does not
change (this option is enabled by default).


sql/mysqld.cc:
  Add innodb_stats_on_metadata option, which enables gathering
  index statistics when processing metadata commands such as
  SHOW TABLE STATUS.  Default behavior of the server does not
  change (this option is enabled by default).
sql/set_var.cc:
  Add innodb_stats_on_metadata option, which enables gathering
  index statistics when processing metadata commands such as
  SHOW TABLE STATUS.  Default behavior of the server does not
  change (this option is enabled by default).
storage/innobase/handler/ha_innodb.cc:
  Add innodb_stats_on_metadata option, which enables gathering
  index statistics when processing metadata commands such as
  SHOW TABLE STATUS.  Default behavior of the server does not
  change (this option is enabled by default).
storage/innobase/handler/ha_innodb.h:
  Add innodb_stats_on_metadata option, which enables gathering
  index statistics when processing metadata commands such as
  SHOW TABLE STATUS.  Default behavior of the server does not
  change (this option is enabled by default).
storage/innobase/include/srv0srv.h:
  Add innodb_stats_on_metadata option, which enables gathering
  index statistics when processing metadata commands such as
  SHOW TABLE STATUS.  Default behavior of the server does not
  change (this option is enabled by default).
storage/innobase/srv/srv0srv.c:
  Add innodb_stats_on_metadata option, which enables gathering
  index statistics when processing metadata commands such as
  SHOW TABLE STATUS.  Default behavior of the server does not
  change (this option is enabled by default).
2007-03-06 10:36:15 -07:00
unknown
1fc7f2117b WL#2936
"Server Variables for Plugins"
  Implement support for plugins to declare server variables.
  Demonstrate functionality by removing InnoDB specific code from sql/*
  New feature for HASH - HASH_UNIQUE flag
  New feature for DYNAMIC_ARRAY - initializer accepts preallocated ptr.
  Completed support for plugin reference counting.


include/hash.h:
  New flag for HASH
    HASH_UNIQUE
include/my_getopt.h:
  New data types for options: ENUM and SET.
  Use typelib to enumerate possible values.
  New flag variable:
    my_getopt_skip_unknown
include/my_sys.h:
  change to DYNAMIC_ARRAY init functions to support pre-allocated buffers
include/mysql.h:
  relocate inclusion of typelib due to longlong requirement
include/mysql/plugin.h:
  wl2936
    New declarations for plugin server variable support.
    New functions for use by plugins
include/mysys_err.h:
  new my_getopt return value: EXIT_ARGUMENT_INVALID
include/typelib.h:
  new typelib function: find_typeset(), returns an int which is a SET of
  the elements in the typelib
mysql-test/r/im_utils.result:
  change to more specific command line settings
  --skip-innodb => --skip-plugin-innodb
  etc.
mysql-test/r/log_tables.result:
  set default storage engine to MEMORY so that test will succeed even
  when some of the other named storage engines are not present
mysql-test/r/ndb_dd_basic.result:
  change in error message
mysql-test/r/partition_innodb.result:
  change in results
mysql-test/r/ps_1general.result:
  bdb doesn't exist, use myisam for a non-transactional engine
mysql-test/r/variables.result:
  information schema doesn't sort row results for server variables.
mysql-test/t/log_tables.test:
  set default storage engine to MEMORY so that test will succeed even
  when some of the other named storage engines are not present
mysql-test/t/ndb_dd_basic.test:
  ALTER LOGFILE GROUP no longer silently fail here
mysql-test/t/partition_innodb.test:
  ALTER TABLE no longer silently fails for unknown storage engine
mysql-test/t/ps_1general.test:
  remove unneccessary parts
  use myisam as it is an always present non-transactional engine
mysql-test/t/variables.test:
  information schema doesn't sort row results for server variables.
mysql-test/t/warnings_engine_disabled-master.opt:
  use the new style command line option
mysys/array.c:
  change to DYNAMIC_ARRAY init functions to support pre-allocated buffers
mysys/hash.c:
  New flag for HASH
    HASH_UNIQUE
  Implement HASH_UNIQUE functionality by performing a hash_search
mysys/my_getopt.c:
  New data types for options: ENUM and SET.
  Use typelib to enumerate possible values.
  New flag variable:
    my_getopt_skip_unknown
mysys/typelib.c:
  new typelib function: find_typeset(), returns an int which is a SET of
  the elements in the typelib
sql/ha_ndbcluster.cc:
  use ha_statistic_increment() method instead of
  statistic_increment() function
  ha_ndbcluster variable has gone away.
sql/ha_partition.cc:
  fix for reference counting
sql/ha_partition.h:
  fix for reference counting
sql/handler.cc:
  fixes for reference counting
sql/handler.h:
  fixes for reference counting
  some new methods to aid storage engine writers
sql/item_func.cc:
  find_sys_var() function now requires thd
sql/item_sum.cc:
  fixes for ref counting
sql/mysql_priv.h:
  remove unneccessary globals.
  new lock: LOCK_system_variables_hash
sql/mysqld.cc:
  Remove InnoBase specific code.
  Support plugin command line processing.
sql/set_var.cc:
  Remove InnoBase specific declarations
  Remove redundant declarations
  changes to permit new variables at run time
  changes for ref counting
sql/set_var.h:
  changes to permit new variables at run time
  changes for ref counting
sql/sql_base.cc:
  changes for ref counting
sql/sql_cache.cc:
  mark code as needing work in the future
sql/sql_class.cc:
  new functions to aid plugin authors
  initialize variables for dynamic plugin variables
sql/sql_class.h:
  remove InnoBase specific declarations
  New declarations for plugin variables.
sql/sql_connect.cc:
  initialization and cleanup of plugin variables
sql/sql_delete.cc:
  change for ref counting
sql/sql_insert.cc:
  change for ref counting
sql/sql_lex.cc:
  changes for ref counting and plugin variables
sql/sql_lex.h:
  add properties for plugin ref counting,
  add to distructor to clean up
sql/sql_partition.cc:
  changes for ref counting
sql/sql_plugin.cc:
  WL2936
    Plugin Variables
    New methods and code to support server variables for plugins.
    New code to complete plugin reference counting
    Debug code adds further indirection so that malloc debugging can be
    used to aid finding plugin ref count leaks
sql/sql_plugin.h:
  WL2936
    Plugin Variables
    New methods and code to support server variables for plugins.
    New code to complete plugin reference counting
    Debug code adds further indirection so that malloc debugging can be
    used to aid finding plugin ref count leaks
sql/sql_repl.cc:
  replication system variables moved here from set_var.cc
sql/sql_repl.h:
  new function to initialise replication server variables
sql/sql_select.cc:
  changes for ref counting
sql/sql_show.cc:
  changes for ref counting
sql/sql_table.cc:
  changes for ref counting
sql/sql_tablespace.cc:
  use supplied functions instead of digging into data structures manually
sql/sql_yacc.yy:
  changes for ref counting
  find_sys_var() now requires thd parameter
  changes on reporting errors to keep user-visible behaviour the same.
sql/structs.h:
  changes for ref counting
sql/table.cc:
  changes for ref counting
sql/table.h:
  changes for ref counting
storage/federated/ha_federated.cc:
  use ha_statistic_increment() method instead of statistic_increment()
  function
storage/heap/ha_heap.cc:
  use ha_statistic_increment() method instead of statistic_increment()
  function
storage/innobase/handler/ha_innodb.cc:
  use ha_statistic_increment() method instead of statistic_increment()
  function
  WL2936
    Move InnoBase specific code out of mysqld.cc and into here
    Declare all required server variables for InnoBase
storage/innobase/include/trx0trx.h:
  store a bit more state so that InnoBase does not have to dig into
  mysqld internal data structures.
storage/myisam/ha_myisam.cc:
  use ha_statistic_increment() method instead of statistic_increment()
  function
storage/myisammrg/ha_myisammrg.cc:
  use ha_statistic_increment() method instead of statistic_increment()
  function
2007-03-02 08:43:45 -08:00
unknown
9e6784924a Fixed compiler warnings
Fixed compile-pentium64 scripts
Fixed wrong estimate of update_with_key_prefix in sql-bench
Merge bk-internal.mysql.com:/home/bk/mysql-5.1 into mysql.com:/home/my/mysql-5.1
Fixed unsafe define of uint4korr()
Fixed that --extern works with mysql-test-run.pl
Small trivial cleanups
This also fixes a bug in counting number of rows that are updated when we have many simultanous queries
Move all connection handling and command exectuion main loop from sql_parse.cc to sql_connection.cc
Split handle_one_connection() into reusable sub functions.
Split create_new_thread() into reusable sub functions.
Added thread_scheduler; Preliminary interface code for future thread_handling code.

Use 'my_thread_id' for internal thread id's
Make thr_alarm_kill() to depend on thread_id instead of thread
Make thr_abort_locks_for_thread() depend on thread_id instead of thread
In store_globals(), set my_thread_var->id to be thd->thread_id.
Use my_thread_var->id as basis for my_thread_name()
The above changes makes the connection we have between THD and threads more soft.

Added a lot of DBUG_PRINT() and DBUG_ASSERT() functions
Fixed compiler warnings
Fixed core dumps when running with --debug
Removed setting of signal masks (was never used)
Made event code call pthread_exit() (portability fix)
Fixed that event code doesn't call DBUG_xxx functions before my_thread_init() is called.
Made handling of thread_id and thd->variables.pseudo_thread_id uniform.
Removed one common 'not freed memory' warning from mysqltest
Fixed a couple of usage of not initialized warnings (unlikely cases)
Suppress compiler warnings from bdb and (for the moment) warnings from ndb


BitKeeper/deleted/.del-SETUP.sh.rej:
  Rename: BUILD/SETUP.sh.rej -> BitKeeper/deleted/.del-SETUP.sh.rej
BitKeeper/deleted/.del-configure.in.rej:
  Rename: configure.in.rej -> BitKeeper/deleted/.del-configure.in.rej
BitKeeper/deleted/.del-my_global.h.rej:
  Rename: include/my_global.h.rej -> BitKeeper/deleted/.del-my_global.h.rej
BitKeeper/deleted/.del-my_pthread.h.rej:
  Rename: include/my_pthread.h.rej -> BitKeeper/deleted/.del-my_pthread.h.rej
BitKeeper/deleted/.del-mysql_client_test.c.rej:
  Rename: tests/mysql_client_test.c.rej -> BitKeeper/deleted/.del-mysql_client_test.c.rej
BitKeeper/deleted/.del-mysqld.cc.rej~35c1c438e11ebd89:
  Rename: sql/mysqld.cc.rej -> BitKeeper/deleted/.del-mysqld.cc.rej~35c1c438e11ebd89
BitKeeper/deleted/.del-sql_parse.cc.rej:
  Rename: sql/sql_parse.cc.rej -> BitKeeper/deleted/.del-sql_parse.cc.rej
BitKeeper/deleted/.del-table.cc.rej:
  Rename: sql/table.cc.rej -> BitKeeper/deleted/.del-table.cc.rej
BitKeeper/deleted/.del-thr_alarm.c.rej:
  Rename: mysys/thr_alarm.c.rej -> BitKeeper/deleted/.del-thr_alarm.c.rej
BUILD/compile-pentium64:
  Update this to be in line with compile-pentium
BUILD/compile-pentium:
  Send command line options to SETUP.sh
BUILD/compile-solaris-sparc-debug:
  Update scripts
BUILD/compile-solaris-sparc-forte:
  Update scripts
BUILD/compile-solaris-sparc-purify:
  Update scripts
BUILD/compile-solaris-sparc:
  Update scripts
BitKeeper/deleted/.del-DbtupSystemRestart.cpp~15b54d7e4e75d2d:
  Removed compiler warning
BitKeeper/deleted/.del-ha_berkeley.cc:
  Moved get_auto_primary_key() here as int5store() gives (wrong) compiler warnings in win64
configure.in:
  Added detection of port_create and port.h (for future)as 
  ---
  manual merge
BitKeeper/deleted/.del-ha_berkeley.h:
  Moved get_auto_primary_key() to ha_berkeley.cc
BitKeeper/deleted/.del-mysqlmanager.c~e97636d71145a0b:
  Fixed compiler warnings
BitKeeper/etc/ignore:
  added storage/ndb/src/ndbapi/ndberror_check
client/mysqlbinlog.cc:
  Removed not needed 'static' (caused compiler warning)
client/mysqldump.c:
  Fixed compiler warnings from 'max' build
client/mysqltest.c:
  Free warning and query memory no abort.
  (Removes strange warnings on screen if mysql-test-run fails)
  Removed compiler warnings
  Portability fix for windows (windows doesn't have mode_t)
client/sql_string.h:
  Removed compiler warning
cmd-line-utils/readline/xmalloc.c:
  Fixed compiler warnings from 'max' build
extra/charset2html.c:
  Fixed compiler warnings
extra/comp_err.c:
  Fixed compiler warnings from 'max' build
extra/yassl/include/lock.hpp:
  Fix for windows64
extra/yassl/include/openssl/ssl.h:
  Changed prototype for SSL_set_fd() to fix compiler warnings (and possible errors) on windows 64 bit
extra/yassl/include/socket_wrapper.hpp:
  Moved socket_t to ssl.h, to be able to removed compiler warnings on windows 64 bit
extra/yassl/include/yassl.hpp:
  Fix for windows64
extra/yassl/src/ssl.cpp:
  Removed compiler warning
  Detect wrong parameter (Happens when running test suite on solaris)
  Changed prototype for SSL_set_fd() to fix compiler warnings (and possible errors) on windows 64 bit
extra/yassl/taocrypt/src/integer.cpp:
  Fixed compiler warnings
extra/yassl/testsuite/testsuite.cpp:
  Removed compiler warning
include/config-win.h:
  Added HAVE_WINSOCK2 (for future)
include/my_dbug.h:
  Fixed DBUG_PROCESS() so that we don't get compiler warnings for it
include/my_global.h:
  Fixed unsafe define of uint4korr()
  manual merge (ignore changes from 5.0)
  Fixed warnings on win64 when using int5store and int6store
include/my_pthread.h:
  Added my_thread_id typedef
  Renamed 'my_thread_id() function to my_thead_dbug_id()
include/thr_alarm.h:
  Make thr_alarm_kill() to depend on thread_id instead of thread
include/thr_lock.h:
  Make thr_abort_locks_for_thread() depend on thread_id instead of thread
libmysql/libmysql.def:
  Fixed compiler warnings on win64
libmysqld/CMakeLists.txt:
  Added missing files
libmysqld/Makefile.am:
  Added new files
libmysqld/lib_sql.cc:
  Remove not needed code (store_globals() now takes care of things)
mysql-test/lib/mtr_report.pl:
  Removed wrong messages when using --extern
mysql-test/mysql-test-run.pl:
  Fixed that --extern works
  Print help on stdout instead of stderr (make it easier to pipe it to less)
  Fixed typo that caused mysql-test-run.pl to fail on Solaris
mysql-test/r/keywords.result:
  manual merge
mysql-test/r/ndb_lock.result:
  After merge fixes
mysql-test/r/ps.result:
  Portability fix
mysql-test/t/disabled.def:
  Disabled ndb_alter_table as this very often fails for me (and have done it for a long time)
mysql-test/t/keywords.test:
  manual merge
mysql-test/t/ndb_lock.test:
  Added other possible error code
mysql-test/t/ps.test:
  Portability fix (when compiling without DLOPEN)
mysql-test/t/wait_timeout.test:
  Don't run this if we are not using a thread per connection (as other thread_handling code may not support timeouts)
mysys/base64.c:
  Fixed compiler warnings on win64
mysys/mf_keycache.c:
  Fixed compiler warnings
mysys/my_getopt.c:
  Fixed compiler warning
mysys/my_init.c:
  Fixed compiler warning
  Re-indented long comment
mysys/my_thr_init.c:
  Always use mysys_var->id to generate thread name (makes things uniform accross thread implementations and thread usage)
  Always generate my_thread_name() when using DBUG
  Ensure mysys_var->pthread_self is set
  Fixed compiler warnings
mysys/ptr_cmp.c:
  Fixed compiler warnings from 'max' build
mysys/thr_alarm.c:
  Change thr_alarm_kill() to use mysys_var->id instead of thread id
  Fixed compiler warning on windows
mysys/thr_lock.c:
  Change thr_abort_locks_for_thread() to use mysys_var->id instead of thread id
  Add purecov statements around not tested code
  Fixed compiler warnings
mysys/thr_mutex.c:
  my_thread_id() -> my_thread_dbug_id()
server-tools/instance-manager/guardian.cc:
  Fixed compiler warning
server-tools/instance-manager/instance.cc:
  Fixed compiler warning
server-tools/instance-manager/mysql_connection.cc:
  Fixed compiler warnings
server-tools/instance-manager/mysqlmanager.cc:
  Fixed compiler warnings
sql/CMakeLists.txt:
  Added missing files
sql/Makefile.am:
  Added new files
sql/event_scheduler.cc:
  Added pthread_exit() calls
  Ensure DBUG_xxx calls are not made before my_thread_init()
  Use common functions to set up thread handling
sql/field.h:
  manual merge
sql/ha_ndbcluster.cc:
  Removed some trivial 'current_thd' calls
sql/handler.cc:
  Avoid warnings on KILL_CONNECTION
  Don't print out null pointer with printf()  (Causes crashes on Solaris)
sql/item.cc:
  Fixed compiler warnings from 'max' build
sql/item_cmpfunc.cc:
  After merge fixes
sql/item_func.cc:
  Merge embedded and normal code usage
  (GET_LOCK, RELEASE_LOCK now works on my_thread_id instead of pthread_t)
  Fixed compiler warning
sql/item_strfunc.cc:
  Fixed compiler warning
sql/item_timefunc.cc:
  Fixed compiler warnings
sql/lock.cc:
  Use (new) parameter to thr_abort_locks_for_thread()
sql/log.cc:
  Fixed compiler warning
sql/log_event.cc:
  Fixed compiler warnings about not used variable
sql/mysql_priv.h:
  Remove TEST_NO_THREADS (not needed with new scheduler interface)
  Added functions from sql_connect.cc and new functions from sql_parse.cc
sql/mysqld.cc:
  Use thread_scheduler structure to dispatch calls (make code more dynamic)
  Change --one-thread option to use thread_scheduler interface
  Made ONE_THREAD option independent of DBUG_BUILD
  --one-thread is now depricated. One should instead use '--thread-handling=no-threads'
  Remove not used uname() function.
  Split create_new_thread() into reusable sub functions.
  Preliminary interface code for future thread_handling code.
  Fixed compiler warnings
sql/parse_file.cc:
  Don't send zero pointer to fn_format() (Causes crashes when using --debug)
sql/repl_failsafe.cc:
  Setup pseudo_thread_id same way as other code
sql/set_var.cc:
  Added variables 'thread_handling'
  Prepare for future variable 'thread_pool_size'
  Fixed compiler warnings
sql/set_var.h:
  Fixed compiler warning
sql/slave.cc:
  Setup pseudo_thread_id same way as other code
  Removed not used signal mask
sql/sql_acl.cc:
  Fixed compiler warnings from 'max' build
sql/sql_base.cc:
  Fixed long comments
  Normalized variable setup
  Don't destroy value of thd->variables.pseduo_thread_id
  More DBUG_PRINT()'s
  More DBUG_ASSERT()'s
  Fixed compiler warnings from 'max' build
sql/sql_class.cc:
  Remove thd->real_id and thd->dbug_thread_id
  Added DBUG_ASSERT()
  Use thread_scheduler to signal threads to be killed.
  In THD::store_globals(), set my_thread_var->id to be thd->thread_id.
  Fixed compiler warnings
sql/sql_class.h:
  Use 'my_thread_id' for internal thread id's
  Remove not needed THD elements: block_signals and dbug_thread_id
  Added 'thread_scheduler' scheduling extension element to THD
sql/sql_insert.cc:
  After merge fixes
  (This actually fixes a bug in old code when many connections are in use)
  Setup pseudo_thread_id same way as other code
  Removed not used signal mask
  Initialize variable that may be used unitialized on error conditions (not fatal)
sql/sql_parse.cc:
  Move connection related code to sql_connect.cc
  Remove setting of signal mask (not needed)
  Ensure TABLE_LIST->alias is set for generated TABLE_LIST elements (fixed core dumps when running with --debug)
  Added previous 'optional' element to reset_mgh()
  Removed not needed DBUG_PRINT call
sql/sql_partition.cc:
  Fixed compiler warnings
sql/sql_prepare.cc:
  Removed not needed casts
  Fixed compiler warnings from 'max' build
sql/sql_select.cc:
  Fixed compiler warnings
sql-bench/bench-init.pl.sh:
  Added --one-missing-tests
sql-bench/example:
  Better example
sql-bench/run-all-tests.sh:
  Added --only-missing-tests
sql-bench/test-insert.sh:
  Fixed wrong estimate of update_with_key_prefix
sql/sql_show.cc:
  Don't send pthread_kill() to threads to detect if they exists.
  (Not that useful and causes problems with future thread_handling code)
  Fixed compiler warnings
sql/sql_table.cc:
  Simplify code
  Fixed compiler warnings
sql/sql_test.cc:
  Remove dbug_thread_id from test output
sql/sql_view.cc:
  Don't send zero pointer to fn_format()
sql/tztime.cc:
  Fixed compiler warning
sql/udf_example.def:
  Fixed compiler warnings on win64
sql/unireg.cc:
  Initialize variable that may be used unitialized on error conditions
storage/archive/archive_test.c:
  Fixed compiler warnings
storage/archive/azio.c:
  Fixed compiler warnings
storage/innobase/dict/dict0crea.c:
  Fixed compiler warnings detected on windows64
storage/innobase/dict/dict0dict.c:
  Fixed compiler warnings detected on windows64
storage/innobase/dict/dict0load.c:
  Fixed compiler warnings detected on windows64
storage/innobase/dict/dict0mem.c:
  Fixed compiler warnings detected on windows64
storage/innobase/eval/eval0proc.c:
  Fixed compiler warnings detected on windows64
storage/innobase/handler/ha_innodb.cc:
  Fixed compiler warnings detected on windows64
storage/innobase/include/ut0byte.ic:
  Fixed compiler warnings on win64
storage/innobase/include/ut0ut.ic:
  Fixed compiler warnings on win64
storage/innobase/mtr/mtr0log.c:
  Fixed compiler warnings detected on windows64
storage/innobase/pars/pars0lex.l:
  Fixed warnings on win64
storage/innobase/rem/rem0cmp.c:
  Fixed compiler warnings detected on windows64
storage/innobase/row/row0mysql.c:
  Fixed compiler warnings detected on windows64
storage/innobase/row/row0sel.c:
  Fixed compiler warnings detected on windows64
storage/innobase/sync/sync0rw.c:
  Fixed compiler warnings detected on windows64
storage/innobase/trx/trx0trx.c:
  Fixed compiler warnings detected on windows64
storage/myisam/mi_log.c:
  my_thread_id() -> my_thread_debug_id()
storage/myisam/mi_packrec.c:
  Fixed compiler warnings detected on windows64
storage/myisam/myisamchk.c:
  Fixed compiler warnings from 'max' build
storage/ndb/src/common/debugger/EventLogger.cpp:
  Fixed compiler warnings
storage/ndb/src/common/util/ConfigValues.cpp:
  Removed compiler warnings
storage/ndb/src/common/util/NdbSqlUtil.cpp:
  Removed compiler warnings
storage/ndb/src/cw/cpcd/CPCD.hpp:
  Fixed compiler warnings
storage/ndb/src/kernel/blocks/backup/Backup.cpp:
  Fixed compiler warnings detected on windows64
storage/ndb/src/kernel/blocks/dbacc/Dbacc.hpp:
  Fixed compiler warnings detected on windows64
storage/ndb/src/kernel/blocks/dbacc/DbaccMain.cpp:
  Fixed compiler warnings detected on windows64
storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp:
  Fixed compiler warnings
storage/ndb/src/kernel/blocks/dbdict/Dbdict.hpp:
  Fixed compiler warnings
storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp:
  Fixed compiler warnings
storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp:
  Fixed compiler warnings
storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp:
  Fixed compiler warnings
storage/ndb/src/kernel/blocks/dbtup/Dbtup.hpp:
  Fixed compiler warnings
storage/ndb/src/kernel/blocks/dbtup/DbtupDiskAlloc.cpp:
  Fixed compiler warnings
storage/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp:
  Fixed compiler warnings
storage/ndb/src/kernel/blocks/dbtup/DbtupFixAlloc.cpp:
  Fixed compiler warnings
storage/ndb/src/kernel/blocks/dbtup/DbtupMeta.cpp:
  Fixed compiler warnings
storage/ndb/src/kernel/blocks/dbtup/DbtupRoutines.cpp:
  Fixed compiler warnings
storage/ndb/src/kernel/blocks/dbtup/DbtupScan.cpp:
  Fixed compiler warnings
storage/ndb/src/kernel/blocks/dbtup/DbtupVarAlloc.cpp:
  Fixed compiler warnings
storage/ndb/src/kernel/blocks/dbtup/tuppage.cpp:
  Fixed compiler warnings
storage/ndb/src/kernel/blocks/dbtup/tuppage.hpp:
  Fixed compiler warnings
storage/ndb/src/kernel/blocks/dbtux/DbtuxStat.cpp:
  Fixed compiler warnings
storage/ndb/src/kernel/blocks/diskpage.hpp:
  Fixed compiler warnings
storage/ndb/src/kernel/vm/ndbd_malloc.cpp:
  Fixed compiler warnings
storage/ndb/src/kernel/vm/ndbd_malloc_impl.cpp:
  Fixed compiler warnings
storage/ndb/src/mgmclient/main.cpp:
  Fixed compiler warnings
storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp:
  Fixed compiler warnings
storage/ndb/src/ndbapi/NdbOperationExec.cpp:
  Fixed compiler warnings
storage/ndb/src/ndbapi/SignalSender.cpp:
  Fixed compiler warnings
storage/ndb/tools/restore/consumer_restore.cpp:
  Fixed compiler warnings
strings/ctype-ucs2.c:
  Fixed compiler warnings
strings/ctype-utf8.c:
  Fixed compiler warnings
strings/decimal.c:
  Fixed compiler warnings
strings/my_strchr.c:
  Fixed conflict between function and prototype
support-files/compiler_warnings.supp:
  Ignore warnings from sql_yacc.cc that are hard to remove
  Ignore some not important warnings from windows 64 bit build
  Suppress warnings from bdb and (for the moment) warnings from ndb
  Suppress all warnings for all pushbuild platforms (should make all trees green)
vio/viosslfactories.c:
  Added DBUG_PRINT
BUILD/compile-pentium64-max:
  New BitKeeper file ``BUILD/compile-pentium64-max''
libmysqld/scheduler.cc:
  New BitKeeper file ``libmysqld/scheduler.cc''
libmysqld/sql_connect.cc:
  New BitKeeper file ``libmysqld/sql_connect.cc''
mysql-test/include/one_thread_per_connection.inc:
  New BitKeeper file ``mysql-test/include/one_thread_per_connection.inc''
mysql-test/r/no-threads.result:
  New BitKeeper file ``mysql-test/r/no-threads.result''
mysql-test/r/one_thread_per_connection.require:
  New BitKeeper file ``mysql-test/r/one_thread_per_connection.require''
mysql-test/t/no-threads-master.opt:
  New BitKeeper file ``mysql-test/t/no-threads-master.opt''
mysql-test/t/no-threads.test:
  New BitKeeper file ``mysql-test/t/no-threads.test''
sql/scheduler.cc:
  New BitKeeper file ``sql/scheduler.cc''
sql/scheduler.h:
  New BitKeeper file ``sql/scheduler.h''
sql/sql_connect.cc:
  New BitKeeper file ``sql/sql_connect.cc''
2007-02-23 13:13:55 +02:00