diff options
author | Nirbhay Choubey <nirbhay@mariadb.com> | 2015-01-26 22:54:27 -0500 |
---|---|---|
committer | Nirbhay Choubey <nirbhay@mariadb.com> | 2015-01-26 22:54:27 -0500 |
commit | 7cda4bee0ef7c8a3ec85e94bc1443ceaba3a64e8 (patch) | |
tree | f8c1f556f36f026038015e7215ae88b0cb7b1ce5 /storage/xtradb/lock | |
parent | ea229eb6bb29ee7b11a7d28a7d4c80a593cb1d3b (diff) | |
parent | fb71449b10100e9a0f887b1585000fbfab294f3c (diff) | |
download | mariadb-git-7cda4bee0ef7c8a3ec85e94bc1443ceaba3a64e8.tar.gz |
maria-10.0.16 merge
bzr merge -r4588 maria/10.0
Diffstat (limited to 'storage/xtradb/lock')
-rw-r--r-- | storage/xtradb/lock/lock0lock.cc | 33 |
1 files changed, 26 insertions, 7 deletions
diff --git a/storage/xtradb/lock/lock0lock.cc b/storage/xtradb/lock/lock0lock.cc index f0c7305768c..dd572130016 100644 --- a/storage/xtradb/lock/lock0lock.cc +++ b/storage/xtradb/lock/lock0lock.cc @@ -5957,6 +5957,7 @@ loop: ulint space = lock->un_member.rec_lock.space; ulint zip_size= fil_space_get_zip_size(space); ulint page_no = lock->un_member.rec_lock.page_no; + ibool tablespace_being_deleted = FALSE; if (UNIV_UNLIKELY(zip_size == ULINT_UNDEFINED)) { @@ -5977,14 +5978,31 @@ loop: if (srv_show_verbose_locks) { - mtr_start(&mtr); + DEBUG_SYNC_C("innodb_monitor_before_lock_page_read"); - buf_page_get_gen(space, zip_size, page_no, - RW_NO_LATCH, NULL, - BUF_GET_POSSIBLY_FREED, - __FILE__, __LINE__, &mtr); + /* Check if the space is exists or not. only + when the space is valid, try to get the page. */ + tablespace_being_deleted + = fil_inc_pending_ops(space, false); - mtr_commit(&mtr); + if (!tablespace_being_deleted) { + mtr_start(&mtr); + + buf_page_get_gen(space, zip_size, + page_no, RW_NO_LATCH, + NULL, + BUF_GET_POSSIBLY_FREED, + __FILE__, __LINE__, + &mtr); + + mtr_commit(&mtr); + + fil_decr_pending_ops(space); + } else { + fprintf(file, "RECORD LOCKS on" + " non-existing space %lu\n", + (ulong) space); + } } load_page_first = FALSE; @@ -6412,7 +6430,7 @@ lock_rec_block_validate( /* Make sure that the tablespace is not deleted while we are trying to access the page. */ - if (!fil_inc_pending_ops(space)) { + if (!fil_inc_pending_ops(space, true)) { mtr_start(&mtr); block = buf_page_get_gen( space, fil_space_get_zip_size(space), @@ -6515,6 +6533,7 @@ lock_rec_insert_check_and_lock( ut_ad(!dict_index_is_online_ddl(index) || dict_index_is_clust(index) || (flags & BTR_CREATE_FLAG)); + ut_ad((flags & BTR_NO_LOCKING_FLAG) || thr); if (flags & BTR_NO_LOCKING_FLAG) { |