summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorholyfoot/hf@mysql.com/hfmain.(none) <>2007-08-24 21:36:51 +0500
committerholyfoot/hf@mysql.com/hfmain.(none) <>2007-08-24 21:36:51 +0500
commiteb6651b017b711316d1dd47a0175560bb0841cbf (patch)
tree8edf5ea1d76ef0d8980a73a1bde14cc3665ab33f
parent7f429ecc7fee1dc411182290c32d6777d34fa37f (diff)
downloadmariadb-git-eb6651b017b711316d1dd47a0175560bb0841cbf.tar.gz
ha_partition.cc, ha_partition.h:
bug fixed partition_pruning.result: test fixed
-rw-r--r--mysql-test/r/partition_pruning.result4
-rw-r--r--sql/ha_partition.cc15
-rw-r--r--sql/ha_partition.h1
3 files changed, 17 insertions, 3 deletions
diff --git a/mysql-test/r/partition_pruning.result b/mysql-test/r/partition_pruning.result
index 9595676016c..776e6f3a15a 100644
--- a/mysql-test/r/partition_pruning.result
+++ b/mysql-test/r/partition_pruning.result
@@ -631,7 +631,7 @@ flush status;
delete from t2 where b > 5;
show status like 'Handler_read_rnd_next';
Variable_name Value
-Handler_read_rnd_next 1215
+Handler_read_rnd_next 1115
show status like 'Handler_read_key';
Variable_name Value
Handler_read_key 0
@@ -645,7 +645,7 @@ flush status;
delete from t2 where b < 5 or b > 3;
show status like 'Handler_read_rnd_next';
Variable_name Value
-Handler_read_rnd_next 1215
+Handler_read_rnd_next 1115
show status like 'Handler_read_key';
Variable_name Value
Handler_read_key 0
diff --git a/sql/ha_partition.cc b/sql/ha_partition.cc
index 6521be1cb9a..326b8b2d43b 100644
--- a/sql/ha_partition.cc
+++ b/sql/ha_partition.cc
@@ -3216,9 +3216,14 @@ end_dont_reset_start_part:
void ha_partition::position(const uchar *record)
{
- handler *file= m_file[m_last_part];
+ handler *file;
DBUG_ENTER("ha_partition::position");
+ if (unlikely(get_part_for_delete(record, m_rec0, m_part_info, &m_last_part)))
+ m_last_part= 0;
+
+ file= m_file[m_last_part];
+
file->position(record);
int2store(ref, m_last_part);
memcpy((ref + PARTITION_BYTES_IN_POS), file->ref,
@@ -3233,6 +3238,14 @@ void ha_partition::position(const uchar *record)
DBUG_VOID_RETURN;
}
+
+void ha_partition::column_bitmaps_signal()
+{
+ handler::column_bitmaps_signal();
+ bitmap_union(table->read_set, &m_part_info->full_part_field_set);
+}
+
+
/*
Read row using position
diff --git a/sql/ha_partition.h b/sql/ha_partition.h
index 555f7a72740..434d90a4487 100644
--- a/sql/ha_partition.h
+++ b/sql/ha_partition.h
@@ -449,6 +449,7 @@ private:
int handle_ordered_next(uchar * buf, bool next_same);
int handle_ordered_prev(uchar * buf);
void return_top_record(uchar * buf);
+ void column_bitmaps_signal();
public:
/*
-------------------------------------------------------------------------