summaryrefslogtreecommitdiff
path: root/innobase/include
diff options
context:
space:
mode:
authorTimothy Smith <timothy.smith@sun.com>2009-03-02 17:57:09 -0700
committerTimothy Smith <timothy.smith@sun.com>2009-03-02 17:57:09 -0700
commitc3fec5d22ff38388f68718bf77cca183778978a1 (patch)
tree23315715cd61cc2cc069aad05d01788c6fa4fb47 /innobase/include
parent901b29860d24388b100dba9cb847f74313f7865c (diff)
downloadmariadb-git-c3fec5d22ff38388f68718bf77cca183778978a1.tar.gz
Applying InnoDB snashot 5.0-ss4007, part 2. Fixes
Bug #18828: If InnoDB runs out of undo slots, it returns misleading 'table is full' This is a backport of code already in 5.1+. The error message change referred to in the detailed revision comments is still pending. Detailed revision comments: r3937 | calvin | 2009-01-15 03:11:56 +0200 (Thu, 15 Jan 2009) | 17 lines branches/5.0: Backport the fix for Bug#18828. Return DB_TOO_MANY_CONCURRENT_TRXS when we run out of UNDO slots in the rollback segment. The backport is requested by MySQL under bug#41529 - Safe handling of InnoDB running out of undo log slots. 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 behavior, not the "fixed" and intended behavior. Approved by: Heikki (on IM)
Diffstat (limited to 'innobase/include')
-rw-r--r--innobase/include/db0err.h5
-rw-r--r--innobase/include/trx0undo.h13
2 files changed, 13 insertions, 5 deletions
diff --git a/innobase/include/db0err.h b/innobase/include/db0err.h
index 247c5de67db..68bdcdc8b7f 100644
--- a/innobase/include/db0err.h
+++ b/innobase/include/db0err.h
@@ -70,6 +70,11 @@ Created 5/24/1996 Heikki Tuuri
work with e.g., FT indexes created by
a later version of the engine. */
+#define DB_TOO_MANY_CONCURRENT_TRXS 47 /* when InnoDB runs out of the
+ preconfigured undo slots, this can
+ only happen when there are too many
+ concurrent transactions */
+
/* The following are partial failure codes */
#define DB_FAIL 1000
#define DB_OVERFLOW 1001
diff --git a/innobase/include/trx0undo.h b/innobase/include/trx0undo.h
index 4f1847aa88c..152a09c0f76 100644
--- a/innobase/include/trx0undo.h
+++ b/innobase/include/trx0undo.h
@@ -222,13 +222,16 @@ trx_undo_lists_init(
Assigns an undo log for a transaction. A new undo log is created or a cached
undo log reused. */
-trx_undo_t*
+ulint
trx_undo_assign_undo(
/*=================*/
- /* out: the undo log, NULL if did not succeed: out of
- space */
- trx_t* trx, /* in: transaction */
- ulint type); /* in: TRX_UNDO_INSERT or TRX_UNDO_UPDATE */
+ /* out: DB_SUCCESS if undo log assign
+ * successful, possible error codes are:
+ * ER_TOO_MANY_CONCURRENT_TRXS
+ * DB_OUT_OF_FILE_SPAC
+ * DB_OUT_OF_MEMORY */
+ trx_t* trx, /* in: transaction */
+ ulint type); /* in: TRX_UNDO_INSERT or TRX_UNDO_UPDATE */
/**********************************************************************
Sets the state of the undo log segment at a transaction finish. */