summaryrefslogtreecommitdiff
path: root/storage/innobase/lock/lock0lock.c
diff options
context:
space:
mode:
authorunknown <aivanov@mysql.com>2005-12-13 16:49:24 +0300
committerunknown <aivanov@mysql.com>2005-12-13 16:49:24 +0300
commitad4d8773506e1c13d39f7b89a4ce4dce63b9ad49 (patch)
tree2b49f5bf8c4bd1ae14a7c9930b7364deb447f530 /storage/innobase/lock/lock0lock.c
parent2309be62e54ac54877645e0c264797646a379b32 (diff)
downloadmariadb-git-ad4d8773506e1c13d39f7b89a4ce4dce63b9ad49.tar.gz
Changes from the innodb-5.1-ss28 snapshot.
Removed include/Makefile.am and the reference to it. Deleted db/db0err.h and db directory. Check index column sizes in a better way (bug 13315). Fixed comments for memory allocation functions and added some extra checks. Adapted callers. BitKeeper/deleted/.del-Makefile.am~ab5c84d46412dc2e: Delete: storage/innobase/include/Makefile.am BitKeeper/deleted/.del-db0err.h~bfeec2efe86ac48b: Delete: storage/innobase/db/db0err.h mysql-test/r/innodb.result: Changes from the innodb-5.1-ss28 snapshot. mysql-test/t/innodb.test: Changes from the innodb-5.1-ss28 snapshot. sql/ha_innodb.cc: Changes from the innodb-5.1-ss28 snapshot. sql/ha_innodb.h: Changes from the innodb-5.1-ss28 snapshot. storage/innobase/Makefile.am: Changes from the innodb-5.1-ss28 snapshot. storage/innobase/configure.in: Changes from the innodb-5.1-ss28 snapshot. storage/innobase/ha/ha0ha.c: Changes from the innodb-5.1-ss28 snapshot. storage/innobase/include/ha0ha.h: Changes from the innodb-5.1-ss28 snapshot. storage/innobase/include/ha0ha.ic: Changes from the innodb-5.1-ss28 snapshot. storage/innobase/include/mem0mem.h: Changes from the innodb-5.1-ss28 snapshot. storage/innobase/include/mem0mem.ic: Changes from the innodb-5.1-ss28 snapshot. storage/innobase/lock/lock0lock.c: Changes from the innodb-5.1-ss28 snapshot. storage/innobase/mem/mem0mem.c: Changes from the innodb-5.1-ss28 snapshot.
Diffstat (limited to 'storage/innobase/lock/lock0lock.c')
-rw-r--r--storage/innobase/lock/lock0lock.c18
1 files changed, 3 insertions, 15 deletions
diff --git a/storage/innobase/lock/lock0lock.c b/storage/innobase/lock/lock0lock.c
index 7844991613f..ae42dc31f82 100644
--- a/storage/innobase/lock/lock0lock.c
+++ b/storage/innobase/lock/lock0lock.c
@@ -1705,7 +1705,7 @@ static
lock_t*
lock_rec_create(
/*============*/
- /* out: created lock, NULL if out of memory */
+ /* out: created lock */
ulint type_mode,/* in: lock mode and wait flag, type is
ignored and replaced by LOCK_REC */
rec_t* rec, /* in: record on page */
@@ -1746,11 +1746,6 @@ lock_rec_create(
n_bytes = 1 + n_bits / 8;
lock = mem_heap_alloc(trx->lock_heap, sizeof(lock_t) + n_bytes);
-
- if (UNIV_UNLIKELY(lock == NULL)) {
-
- return(NULL);
- }
UT_LIST_ADD_LAST(trx_locks, trx->trx_locks, lock);
@@ -1886,8 +1881,7 @@ static
lock_t*
lock_rec_add_to_queue(
/*==================*/
- /* out: lock where the bit was set, NULL if out
- of memory */
+ /* out: lock where the bit was set */
ulint type_mode,/* in: lock mode, wait, gap etc. flags;
type is ignored and replaced by LOCK_REC */
rec_t* rec, /* in: record on page */
@@ -3405,8 +3399,7 @@ UNIV_INLINE
lock_t*
lock_table_create(
/*==============*/
- /* out, own: new lock object, or NULL if
- out of memory */
+ /* out, own: new lock object */
dict_table_t* table, /* in: database table in dictionary cache */
ulint type_mode,/* in: lock mode possibly ORed with
LOCK_WAIT */
@@ -3432,11 +3425,6 @@ lock_table_create(
lock = mem_heap_alloc(trx->lock_heap, sizeof(lock_t));
}
- if (lock == NULL) {
-
- return(NULL);
- }
-
UT_LIST_ADD_LAST(trx_locks, trx->trx_locks, lock);
lock->type_mode = type_mode | LOCK_TABLE;