Commit graph

316 commits

Author SHA1 Message Date
marko
38657b251e branches/zip: trx_general_rollback_for_mysql(): Remove the redundant
parameter partial. If savept==NULL, partial==FALSE.
2009-08-11 10:42:37 +00:00
marko
3d5e2e868d branches/zip: Replace <number> with NUMBER in some comments,
to avoid problems with Doxygen XML output.
2009-08-05 10:06:55 +00:00
marko
67743761f1 branches/zip: row_build_row_ref_from_row(): Unused, remove. 2009-06-30 10:28:11 +00:00
marko
9e8ba2765d branches/zip: row_sel_store_mysql_rec(): Add missing pointer cast.
Do not do arithmetics on void pointers.
2009-06-29 10:06:29 +00:00
marko
090cdcff6a branches/zip: row_merge_read_rec(): Fix a UNIV_DEBUG bug (Bug #45426) 2009-06-17 12:03:45 +00:00
marko
9226817201 branches/zip: Merge revisions 5233:5341 from branches/5.1:
------------------------------------------------------------------------
  r5233 | marko | 2009-06-03 15:12:44 +0300 (Wed, 03 Jun 2009) | 11 lines

  branches/5.1: Merge the test case from r5232 from branches/5.0:
    ------------------------------------------------------------------------
    r5232 | marko | 2009-06-03 14:31:04 +0300 (Wed, 03 Jun 2009) | 21 lines

    branches/5.0: Merge r3590 from branches/5.1 in order to fix Bug #40565
    (Update Query Results in "1 Row Affected" But Should Be "Zero Rows").

    Also, add a test case for Bug #40565.

    rb://128 approved by Heikki Tuuri
    ------------------------------------------------------------------------
  ------------------------------------------------------------------------
  r5243 | sunny | 2009-06-04 03:17:14 +0300 (Thu, 04 Jun 2009) | 14 lines

  branches/5.1: When the InnoDB and MySQL data dictionaries go out of sync, before
  the bug fix we would assert on missing autoinc columns. With this fix we allow
  MySQL to open the table but set the next autoinc value for the column to the
  MAX value. This effectively disables the next value generation. INSERTs will
  fail with a generic AUTOINC failure. However, the user should be able to
  read/dump the table, set the column values explicitly, use ALTER TABLE to
  set the next autoinc value and/or sync the two data dictionaries to resume
  normal operations.

  Fix Bug#44030 Error: (1500) Couldn't read the MAX(ID) autoinc value from the
  index (PRIMARY)

  rb://118
  ------------------------------------------------------------------------
  r5252 | sunny | 2009-06-04 10:16:24 +0300 (Thu, 04 Jun 2009) | 2 lines

  branches/5.1: The version of the result file checked in was broken in r5243.
  ------------------------------------------------------------------------
  r5259 | vasil | 2009-06-05 10:29:16 +0300 (Fri, 05 Jun 2009) | 7 lines

  branches/5.1:

  Remove the word "Error" from the printout because the mysqltest suite
  interprets it as an error and thus the innodb-autoinc test fails.

  Approved by:	Sunny (via IM)
  ------------------------------------------------------------------------
  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.

  (null merge; this had already been committed in branches/zip)
  ------------------------------------------------------------------------
  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.
  ------------------------------------------------------------------------
2009-06-17 09:15:32 +00:00
marko
68a1ee9960 branches/zip: Add some Doxygen comments for many structs, typedefs,
#defines and global variables.  Many are still missing.
2009-05-26 12:28:49 +00:00
marko
5929cea0fe branches/zip: Add some Doxygen comments, mainly to structs, typedefs,
macros and global variables.  Many more to go.
2009-05-25 12:09:24 +00:00
marko
11ff89d994 branches/zip: Add @file comments, and convert decorative
/*********************************
comments to Doxygen /** style like this:
/*****************************//**

This conversion was performed by the following command:

perl -i -e 'while(<ARGV>){if (m|^/\*{30}\**$|) {
s|\*{4}$|//**| if ++$com>1; $_ .= "\@file $ARGV\n" if $com==2}
print; if(eof){$.=0;undef $com}}' */*[ch] include/univ.i
2009-05-25 09:52:29 +00:00
marko
aff9b3854f branches/zip: Introduce the macro TEMP_INDEX_PREFIX_STR.
This is to avoid triggering an error in Doxygen.
2009-05-25 08:42:47 +00:00
marko
d075e80c49 branches/zip: Split some long lines that were introduced in r5091. 2009-05-25 08:09:45 +00:00
marko
e49dee377b branches/zip: Convert the function comments to Doxygen format.
This patch was created by running the following commands:

for i in */*[ch]; do doxygenify.pl $i; done
perl -i -pe 's#\*{3} \*/$#****/#' */*[ch]

where doxygenify.pl is
https://svn.innodb.com/svn/misc/trunk/tools/doxygenify.pl r510

Verified the consistency as follows:

(0) not too many /* in: */ or /* out: */ comments left in the code:
grep -l '/\*\s*\(in\|out\)[,:/]' */*[ch]

(1) no difference when ignoring blank lines, after stripping all
C90-style /* comments */, including multi-line ones, before and after
applying this patch:

perl -i -e 'undef $/;while(<ARGV>){s#/\*(.*?)\*/##gs;print}' */*[ch]
diff -I'^\s*$' --exclude .svn -ru TREE1 TREE2

(2) after stripping @return comments and !<, generated a diff and omitted
the hunks where /* out: */ function return comments were removed:

perl -i -e'undef $/;while(<ARGV>){s#!<##g;s#\n\@return\t.*?\*/# \*/#gs;print}'\
 */*[ch]
svn diff|
perl -e 'undef $/;$_=<>;s#\n-\s*/\* out[:,]([^\n]*?)(\n-[^\n]*?)*\*/##gs;print'

Some unintended changes were left.  These will be removed in a
subsequent patch.
2009-05-25 05:30:14 +00:00
marko
cea9a03ab6 branches/zip: Fix some function comments. 2009-05-20 08:19:40 +00:00
marko
b04cffec7d branches/zip: Add missing function comments. 2009-05-20 04:42:12 +00:00
marko
1c0cf56c45 branches/zip: row_update_prebuilt_trx(): Correct bogus comment. 2009-05-19 08:41:32 +00:00
marko
efcbc63a2f branches/zip: row_scan_and_check_index(): Add some comments on
prebuilt->index_usable, as suggested by Michael.
2009-04-27 09:40:20 +00:00
marko
82910214a6 branches/zip: row_scan_and_check_index(): Check
row_merge_is_index_usable() earlier, to make the logic clearer.
2009-04-23 06:40:34 +00:00
marko
db0e3d7bbb branches/zip: row_scan_and_check_index(): Improve the diagnostics, by reporting
errors from row_search_for_mysql() in the error log.
The errors will still be ignored by CHECK TABLE.
This is somewhat related to Issue #211.
2009-04-23 06:37:40 +00:00
marko
e9a3aa18c8 branches/zip: Introduce the logical type names trx_id_t, roll_ptr_t,
and undo_no_t. Each type is still defined as dulint.

This is an initial step towards replacing dulint with a 64-bit data type.
Because modern compilers have no trouble supporting 64-bit arithmetics
even on 32-bit targets, the dulint struct is a relic that should go.

The last remaining major use of dulint is dictionary IDs
(table, index, and row ids).

rb://114 approved by Sunny Bains
2009-04-23 05:32:36 +00:00
marko
4718ddd52b branches/zip: Cosmetic fixes.
row_unlock_for_mysql(): Add a const qualifier to read-only rec_t*.
Use dict_index_is_clust().

CMakeLists.txt: svn propset svn:eol-style native.
2009-04-20 12:11:38 +00:00
marko
a0714b182c branches/zip: univ.i: Define REFMAN as the base URL of the
MySQL Reference Manual and use it in every string.
This fixes Issue #221.
2009-04-16 12:02:27 +00:00
marko
d04b7669d6 branches/zip: row_scan_and_check_index(): Initialize prebuilt->index_usable.
This should have been done in r4631.  Spotted by Michael.
2009-04-16 06:32:09 +00:00
marko
e5cd059f4b branches/zip: Adjust r4673 as in the merge to branches/6.0 -r4676. 2009-04-07 12:19:31 +00:00
marko
ab341009d7 branches/zip: Allow in-place updates of UTF-8 CHAR columns
from or to NULL in ROW_FORMAT=REDUNDANT. (Bug #44032)

rb://107 approved by Heikki Tuuri.
2009-04-07 11:45:28 +00:00
marko
ab67f4eb4a branches/zip: Refuse to use newly created indexes that may lack
history.  This addresses Mantis issue #116.

dict_index_t: Enable the storage of trx_id.

row_prebuilt_t: Make many fields bit-fields to reduce the memory
footprint. Add index_usable.

ha_innobase::change_active_index(): Check if the index is usable and
set prebuilt->index_usable accordingly. Unfortunately, the return
status of this function is ignored by MySQL, and the actual refusal to
use the index must be made in row_search_for_mysql().

row_search_for_mysql(): Return DB_MISSING_HISTORY if
!prebuilt->index_usable.

convert_error_code_to_mysql(): Map DB_MISSING_HISTORY to
HA_ERR_TABLE_DEF_CHANGED.

innodb-index.test: Add a test case where access to a newly created
secondary index must be blocked for old transactions.

rb://100 approved by Heikki Tuuri
2009-04-02 12:23:12 +00:00
marko
349090707c branches/zip: Remove references to UNIV_HOTBACKUP from files that are
not used when building InnoDB Hot Backup.  Declare
innobase_invalidate_query_cache() in ha_prototypes.h.
2009-03-24 12:02:29 +00:00
marko
d90bea085a branches/zip: Remove unneeded definitions and dependencies
from UNIV_HOTBACKUP builds.
2009-03-23 14:21:34 +00:00
marko
113101682f branches/zip: Merge revisions 4400:4481 from branches/5.1:
------------------------------------------------------------------------
  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
  ------------------------------------------------------------------------
2009-03-19 13:23:32 +00:00
marko
48070b5332 branches/zip: Merge revisions 4359:4400 from branches/5.1:
------------------------------------------------------------------------
  r4399 | marko | 2009-03-12 09:38:05 +0200 (Thu, 12 Mar 2009) | 2 lines

  branches/5.1: row_sel_get_clust_rec_for_mysql(): Store the cursor position
  also for unlock_row().  (Bug #39320)
  ------------------------------------------------------------------------
  r4400 | marko | 2009-03-12 10:06:44 +0200 (Thu, 12 Mar 2009) | 5 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.
  ------------------------------------------------------------------------

These were submitted as rb://94 and rb://96 and approved by Heikki Tuuri.
2009-03-12 08:26:40 +00:00
vasil
98b586daf2 branches/zip:
* Remove old Innobase copyright lines from C source files
* Add a reference to the GPLv2 license as recommended by the lawyers
at Oracle Legal

[Step 26/28]
2009-02-17 10:09:16 +00:00
vasil
4ec7ccb227 branches/zip:
* Remove old Innobase copyright lines from C source files
* Add a reference to the GPLv2 license as recommended by the lawyers
at Oracle Legal

[Step 25/28]
2009-02-17 10:05:45 +00:00
vasil
c6232c06fa branches/zip:
To the files touched by the Google patch from c4144 (excluding
include/os0sync.ic because later we removed Google code from that file):

* Remove the Google license
* Remove old Innobase copyright lines
* Add a reference to the Google license and to the GPLv2 license at the top,
as recommended by the lawyers at Oracle Legal.
2009-02-17 07:56:33 +00:00
inaam
a1bb700fd2 branches/zip rb://30
This patch changes the innodb mutexes and rw_locks implementation.
On supported platforms it uses GCC builtin atomics. These changes
are based on the patch sent by Mark Callaghan of Google under BSD
license. More technical discussion can be found at rb://30

Approved by: Heikki
2009-02-09 23:36:25 +00:00
marko
fe6e7f8656 branches/zip: row_merge_create_temporary_table(): On error,
row_create_table_for_mysql() already frees new_table.
Do not attempt to free it again.
2009-01-13 09:54:01 +00:00
marko
9415843cba branches/zip: row_merge_drop_temp_indexes(): Do not lock the rows of
SYS_INDEXES when looking for partially created indexes.  Use the
transaction isolation level READ UNCOMMITTED to avoid interfering with
locks held by incomplete transactions that will be rolled back in a
subsequent step in the recovery.  (Issue #152)

Approved by Heikki Tuuri
2009-01-07 14:42:42 +00:00
marko
7a30af3eb0 branches/zip: row_merge_tuple_cmp(): Do not report a duplicate key value
if any of the fields are NULL.  While the tuples are equal in the
sorting order, SQL NULL is defined to be logically inequal to
anything else. (Bug #41904)

rb://70 approved by Heikki Tuuri
2009-01-07 14:17:47 +00:00
marko
6c9b61690a branches/zip: Merge revisions 3598:3601 from branches/5.1:
------------------------------------------------------------------------
  r3601 | marko | 2008-12-22 16:05:19 +0200 (Mon, 22 Dec 2008) | 9 lines

  branches/5.1: Make
  SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED
  a true replacement of SET GLOBAL INNODB_LOCKS_UNSAFE_FOR_BINLOG=1.
  This fixes an error that was introduced in r370, causing
  semi-consistent read not to not unlock rows in READ COMMITTED mode.
  (Bug #41671, Issue #146)

  rb://67 approved by Heikki Tuuri
  ------------------------------------------------------------------------
2009-01-05 10:54:53 +00:00
marko
d1b5613fa0 branches/zip: Merge revisions 3479:3598 from branches/5.1:
------------------------------------------------------------------------
  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
  ------------------------------------------------------------------------
  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
  ------------------------------------------------------------------------
  r3598 | marko | 2008-12-22 15:28:03 +0200 (Mon, 22 Dec 2008) | 6 lines

  branches/5.1: ibuf_delete_rec(): When the record cannot be found and
  the tablespace has been dropped, commit the mini-transaction, so that
  InnoDB will not hold the insert buffer tree latch in exclusive mode,
  causing a potential deadlock.  This bug was introduced in the fix of
  Bug #27276 in r2924.
  ------------------------------------------------------------------------
2008-12-22 13:41:47 +00:00
marko
5697b755e6 branches/zip: Pass the caller's file name and line number to
row_mysql_lock_data_dictionary(), row_mysql_freeze_data_dictionary(),
to better track down locking issues that involve dict_operation_lock.
2008-12-22 10:27:16 +00:00
marko
37187e09f1 branches/zip: row_sel_try_search_shortcut(), row_sel(): Adjust two
debug assertions that should have been adjusted in r3575.
2008-12-17 20:40:38 +00:00
marko
4856b4ba61 branches/zip: Remove update-in-place-in-select from the internal SQL
interpreter.  It was only used for updating the InnoDB internal data
dictionary when renaming or dropping tables.  It could have caused
deadlocks after acquiring latches on insert buffer bitmap pages.
This and r3544 should fix Issue #135.

Furthermore, the update-in-place-in-select does not account for
compression failure.  That was not a problem yet, since the InnoDB SQL
interpreter has so far assumed ROW_FORMAT=REDUNDANT.

rb://63 approved by Heikki Tuuri
2008-12-17 12:40:59 +00:00
vasil
7ed448ce95 branches/zip:
Merge 2929:3458 from branches/5.1 (resolving conflict in c3257,
note also that r3363 reverted r2933 so there are not changes in
mysql-test/innodb-autoinc.result with the current merge):

  ------------------------------------------------------------------------
  r2933 | calvin | 2008-10-30 02:57:31 +0200 (Thu, 30 Oct 2008) | 10 lines
  Changed paths:
     M /branches/5.1/mysql-test/innodb-autoinc.result
  
  branches/5.1: correct the result file innodb-autoinc.result
  
  Change the followings:
    auto_increment_increment
    auto_increment_offset
  
  to
    auto-increment-increment
    auto-increment-offset
  
  ------------------------------------------------------------------------
  r2981 | marko | 2008-11-07 14:54:10 +0200 (Fri, 07 Nov 2008) | 5 lines
  Changed paths:
     M /branches/5.1/row/row0mysql.c
  
  branches/5.0: row_mysql_store_col_in_innobase_format(): Correct a misleading
  comment. In the UTF-8 encoding, ASCII takes 1 byte per character, while
  the "latin1" character set (normally ISO-8859-1, but in MySQL it actually
  refers to the Windows Code Page 1252 a.k.a. CP1252, WinLatin1)
  takes 1 to 3 bytes (1 to 2 bytes for the ISO-8859-1 subset).
  ------------------------------------------------------------------------
  r3114 | calvin | 2008-11-14 20:31:48 +0200 (Fri, 14 Nov 2008) | 8 lines
  Changed paths:
     M /branches/5.1/handler/ha_innodb.cc
  
  branches/5.1: fix bug#40386: Not flushing query cache after truncate
  
  ha_statistics.records can not be 0 unless the table is empty, set to
  1 instead. The original problem of bug#29507 is fixed in the server.
  
  Additional test was done with the fix of bug#29507 in the server.
  
  Approved by: Heikki (on IM)
  ------------------------------------------------------------------------
  r3257 | inaam | 2008-11-24 22:06:50 +0200 (Mon, 24 Nov 2008) | 13 lines
  Changed paths:
     M /branches/5.1/handler/ha_innodb.cc
     M /branches/5.1/srv/srv0srv.c
     M /branches/5.1/trx/trx0trx.c
  
  branches/5.1 bug#40760
  
  The config param innodb_thread_concurrency is dynamically set and is
  read when a thread enters/exits innodb. If the value is changed between
  the enter and exit time the behaviour becomes erratic.
  The fix is not to use srv_thread_concurrency when exiting, instead use
  the flag trx->declared_to_be_inside_innodb.
  
  rb://57
  
  Approved by: Marko
  
  
  ------------------------------------------------------------------------
  r3363 | calvin | 2008-12-04 19:00:20 +0200 (Thu, 04 Dec 2008) | 13 lines
  Changed paths:
     M /branches/5.1/mysql-test/innodb-autoinc.result
  
  branches/5.1: revert the changes in r2933
  
  The changes in r2933 causes test failure on Linux.
  More investigation is needed for Windows.
  
  Change the followings in innodb-autoinc.result:
    auto-increment-increment
    auto-increment-offset
  
  back to:
    auto_increment_increment
    auto_increment_offset
  
  ------------------------------------------------------------------------
  r3412 | vasil | 2008-12-05 10:46:18 +0200 (Fri, 05 Dec 2008) | 7 lines
  Changed paths:
     M /branches/5.1/trx/trx0undo.c
  
  branches/5.1:
  
  Add the traditional 2 spaces after the timestamp so the message does
  not look like:
  
  070223 13:26:01InnoDB: Warning: canno....
  
  ------------------------------------------------------------------------
  r3458 | vasil | 2008-12-09 11:21:08 +0200 (Tue, 09 Dec 2008) | 51 lines
  Changed paths:
     M /branches/5.1/mysql-test/innodb_bug34300.test
  
  branches/5.1:
  
  Merge a change from MySQL to fix the failing innodb_bug34300 mysql-test:
  
    main.innodb_bug34300           [ fail ]
    
    mysqltest: At line 11: query 'SET @@max_allowed_packet=16777216' failed: 1621: SESSION variable 'max_allowed_packet' is read-only. Use SET GLOBAL to assign the value
    
    Aborting: main.innodb_bug34300 failed in default mode. 
  
  The changeset is this:
  
    ------------------------------------------------------------
    revno: 2709.1.10
    committer: Staale Smedseng <staale.smedseng@sun.com>
    branch nick: b22891-51-bugteam
    timestamp: Thu 2008-11-20 08:51:48 +0100
    message:
      A fix for Bug#22891 "session level max_allowed_packet can be
      set but is ignored".
    
      This patch makes @@session.max_allowed_packed and
      @@session.net_buffer_length read-only as suggested in the bug
      report. The user will have to use SET GLOBAL (and reconnect)
      to alter the session values of these variables.
    
      The error string ER_VARIABLE_IS_READONLY is introduced.
    
      Tests are modified accordingly.
    modified:
      mysql-test/r/func_compress.result
      mysql-test/r/max_allowed_packet_basic.result
      mysql-test/r/max_allowed_packet_func.result
      mysql-test/r/net_buffer_length_basic.result
      mysql-test/r/packet.result
      mysql-test/r/union.result
      mysql-test/r/variables.result
      mysql-test/t/func_compress.test
      mysql-test/t/innodb_bug34300.test
      mysql-test/t/max_allowed_packet_basic.test
      mysql-test/t/max_allowed_packet_func.test
      mysql-test/t/net_buffer_length_basic.test
      mysql-test/t/packet.test
      mysql-test/t/union.test
      mysql-test/t/variables.test
      sql/set_var.cc
      sql/set_var.h
      sql/share/errmsg.txt
    ------------------------------------------------------------
  
  
  ------------------------------------------------------------------------
2008-12-09 09:49:03 +00:00
marko
0b04505e8a branches/zip: row_purge_remove_sec_if_poss_low(): Allocate mtr_vers
from the stack, not with mem_alloc().
2008-12-09 08:31:26 +00:00
marko
7c16a58d4b branches/zip: row_undo_mod_del_mark_or_remove_sec_low(): Do not
complain if the record is not found.  Explain that this is possible
when a deadlock occurs during an update.  Heikki investigated this
in Issue #134.
2008-12-05 08:02:54 +00:00
marko
e6acdb3c82 branches/zip: row_undo_mod_del_mark_or_remove_sec_low(): Complain if
the secondary index entry cannot be found, and this is not an incomplete
transaction that is being rolled back in crash recovery.  The source code
comments were suggested by Heikki.
2008-11-28 14:18:43 +00:00
marko
afe9ee1f86 branches/zip: row_merge_drop_temp_indexes(): Replace the WHILE 1 with
WHILE 1=1 in the SQL procedure, so that the loop will actually be
entered and temporary indexes be dropped during crash recovery.
Thanks to Sunny Bains for pointing this out.

Tested as follows:

Set a breakpoint in row_merge_rename_indexes.

CREATE TABLE t(a INT)ENGINE=InnoDB;
CREATE INDEX a ON t(a);

-- The breakpoint will be reached.  Kill and restart mysqld.
SHOW CREATE TABLE t;
-- This shows the MySQL .frm file, without and index.
CREATE TABLE innodb_table_monitor(a INT)ENGINE=InnoDB;
-- This will dump the InnoDB dictionary to the error log, without the index.
2008-11-26 08:00:28 +00:00
marko
106d894efd branches/zip: Note that it is legitimate for a secondary index record not
to be found during purge.  This tries to address Issue #129.  The comments
were supplied by Heikki.
2008-11-24 16:01:42 +00:00
marko
69a89b02b4 branches/zip: row_vers_impl_x_locked_off_kernel(): Remove compilation
warnings about prev_trx_id and vers_del being possibly uninitialized,
by handling the case prev_version == NULL in a single if block.

rb://45 approved by Inaam Rana.
2008-11-12 11:52:57 +00:00
sunny
7fed1c703e branches/zip:
1. We add a vector of locks to trx_t. This array contains the autoinc
  locks granted to a transaction. There is one per table.

  2. We enforce releasing of these locks in the reverse order from the
  one in which they are acquired. The assumption is that since the
  AUTOINC locks are statement level locks. Nested statements introduced
  by triggers are stacked it should hold.

There was some cleanup done to the vector code too by adding const and
some new functions. Rename dict_table_t::auto_inc_lock to autoinc_lock.

Fix Bug#26316 Triggers create duplicate entries on auto-increment columns
rb://22
2008-10-31 07:40:29 +00:00
sunny
f9c42d81e7 branches/zip:
Merge revisions 2837:2852 from branches/5.1:

  ------------------------------------------------------------------------
  r2849 | sunny | 2008-10-22 12:01:18 +0300 (Wed, 22 Oct 2008) | 8 lines
  Changed paths:
     M /branches/5.1/handler/ha_innodb.cc
     M /branches/5.1/include/row0mysql.h
     M /branches/5.1/row/row0mysql.c
  
  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
  
  Bug#40224 New AUTOINC changes mask reporting of deadlock/timeout errors
  
  ------------------------------------------------------------------------
  r2852 | sunny | 2008-10-23 01:42:24 +0300 (Thu, 23 Oct 2008) | 9 lines
  Changed paths:
     M /branches/5.1/handler/ha_innodb.cc
     M /branches/5.1/handler/ha_innodb.h
  
  branches/5.1: Backport r2724 from branches/zip
  
  Check column value against the col max value before updating the table's
  global autoinc counter value. This is part of simplifying the AUTOINC
  sub-system. We extract the type info from MySQL data structures at runtime.
  
  This fixes Bug#37788 InnoDB Plugin: AUTO_INCREMENT wrong for compressed tables
  
  
  ------------------------------------------------------------------------
2008-10-23 05:29:46 +00:00