summaryrefslogtreecommitdiff
path: root/sql/ha_partition.cc
diff options
context:
space:
mode:
authorJoerg Bruehe <joerg@mysql.com>2008-12-10 21:14:50 +0100
committerJoerg Bruehe <joerg@mysql.com>2008-12-10 21:14:50 +0100
commit2181c959183262b6b7f64c67b12f2715d8528572 (patch)
tree0808625d28751a07f6894b2bffcf47fcf1e71fbf /sql/ha_partition.cc
parent96e0bf50d942258722b25e9d17d209d40eaacd28 (diff)
parentba816c14a9bc8012759da9d58f858f1e73bec708 (diff)
downloadmariadb-git-2181c959183262b6b7f64c67b12f2715d8528572.tar.gz
Merge main 5.1 into 5.1-build
Diffstat (limited to 'sql/ha_partition.cc')
-rw-r--r--sql/ha_partition.cc36
1 files changed, 35 insertions, 1 deletions
diff --git a/sql/ha_partition.cc b/sql/ha_partition.cc
index d5e7828c57e..8752cd9a34c 100644
--- a/sql/ha_partition.cc
+++ b/sql/ha_partition.cc
@@ -2813,8 +2813,42 @@ uint ha_partition::lock_count() const
void ha_partition::unlock_row()
{
+ DBUG_ENTER("ha_partition::unlock_row");
m_file[m_last_part]->unlock_row();
- return;
+ DBUG_VOID_RETURN;
+}
+
+
+/**
+ Use semi consistent read if possible
+
+ SYNOPSIS
+ try_semi_consistent_read()
+ yes Turn on semi consistent read
+
+ RETURN VALUE
+ NONE
+
+ DESCRIPTION
+ See handler.h:
+ Tell the engine whether it should avoid unnecessary lock waits.
+ If yes, in an UPDATE or DELETE, if the row under the cursor was locked
+ by another transaction, the engine may try an optimistic read of
+ the last committed row value under the cursor.
+ Note: prune_partitions are already called before this call, so using
+ pruning is OK.
+*/
+void ha_partition::try_semi_consistent_read(bool yes)
+{
+ handler **file;
+ DBUG_ENTER("ha_partition::try_semi_consistent_read");
+
+ for (file= m_file; *file; file++)
+ {
+ if (bitmap_is_set(&(m_part_info->used_partitions), (file - m_file)))
+ (*file)->try_semi_consistent_read(yes);
+ }
+ DBUG_VOID_RETURN;
}