summaryrefslogtreecommitdiff
path: root/innobase/row
diff options
context:
space:
mode:
authorunknown <tomas@poseidon.ndb.mysql.com>2004-11-26 13:44:49 +0000
committerunknown <tomas@poseidon.ndb.mysql.com>2004-11-26 13:44:49 +0000
commitf4a0c4262cb542bbf56de4ec99604878ca8b68ea (patch)
treec7ac4c11ee0cfec1ed32d3fecc46d396019403e3 /innobase/row
parent5d4a4101a82f1a5319bd4f766fbce166ab923a7e (diff)
parentb8defc72c7ac08b89169797ba7bacab1dc4cae55 (diff)
downloadmariadb-git-f4a0c4262cb542bbf56de4ec99604878ca8b68ea.tar.gz
Merge tulin@bk-internal.mysql.com:/home/bk/mysql-4.1
into poseidon.ndb.mysql.com:/home/tomas/mysql-5.0 BitKeeper/etc/logging_ok: auto-union innobase/buf/buf0buf.c: Auto merged innobase/buf/buf0lru.c: Auto merged innobase/row/row0mysql.c: Auto merged innobase/row/row0sel.c: Auto merged ndb/src/mgmsrv/main.cpp: Auto merged sql/ha_innodb.cc: Auto merged sql/repl_failsafe.cc: Auto merged sql/slave.cc: Auto merged sql/slave.h: Auto merged sql/sql_repl.cc: Auto merged
Diffstat (limited to 'innobase/row')
-rw-r--r--innobase/row/row0mysql.c3
-rw-r--r--innobase/row/row0sel.c11
2 files changed, 13 insertions, 1 deletions
diff --git a/innobase/row/row0mysql.c b/innobase/row/row0mysql.c
index 6ac8c943dc6..0de4b189493 100644
--- a/innobase/row/row0mysql.c
+++ b/innobase/row/row0mysql.c
@@ -308,7 +308,8 @@ handle_new_error:
return(TRUE);
- } else if (err == DB_DEADLOCK || err == DB_LOCK_WAIT_TIMEOUT) {
+ } else if (err == DB_DEADLOCK || err == DB_LOCK_WAIT_TIMEOUT
+ || err == DB_LOCK_TABLE_FULL) {
/* Roll back the whole transaction; this resolution was added
to version 3.23.43 */
diff --git a/innobase/row/row0sel.c b/innobase/row/row0sel.c
index 26d26ca323c..27470df81c5 100644
--- a/innobase/row/row0sel.c
+++ b/innobase/row/row0sel.c
@@ -730,8 +730,18 @@ sel_set_rec_lock(
ulint type, /* in: LOCK_ORDINARY, LOCK_GAP, or LOC_REC_NOT_GAP */
que_thr_t* thr) /* in: query thread */
{
+ trx_t* trx;
ulint err;
+ trx = thr_get_trx(thr);
+
+ if (UT_LIST_GET_LEN(trx->trx_locks) > 10000) {
+ if (buf_LRU_buf_pool_running_out()) {
+
+ return(DB_LOCK_TABLE_FULL);
+ }
+ }
+
if (index->type & DICT_CLUSTERED) {
err = lock_clust_rec_read_check_and_lock(0, rec, index, mode,
type, thr);
@@ -2790,6 +2800,7 @@ row_search_for_mysql(
/* out: DB_SUCCESS,
DB_RECORD_NOT_FOUND,
DB_END_OF_INDEX, DB_DEADLOCK,
+ DB_LOCK_TABLE_FULL,
or DB_TOO_BIG_RECORD */
byte* buf, /* in/out: buffer for the fetched
row in the MySQL format */