summaryrefslogtreecommitdiff
path: root/sql/table.h
diff options
context:
space:
mode:
authorGeorgi Kodinov <kgeorge@mysql.com>2008-12-09 19:58:50 +0200
committerGeorgi Kodinov <kgeorge@mysql.com>2008-12-09 19:58:50 +0200
commit5705e3abda5e354a39d531a72c3ddf98d7812b30 (patch)
tree6d8549d8e695be5327d1ac7d12f166170c386f95 /sql/table.h
parent1da82b612ab555a3e082c8dd52f4c2eaecda1a87 (diff)
parentbd8657786a185fee54cfbc35b7ef5142e8508073 (diff)
downloadmariadb-git-5705e3abda5e354a39d531a72c3ddf98d7812b30.tar.gz
merged 37936 to 5.1-bugteam
Diffstat (limited to 'sql/table.h')
-rw-r--r--sql/table.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/sql/table.h b/sql/table.h
index 77bd7bb9e77..8d6473661ac 100644
--- a/sql/table.h
+++ b/sql/table.h
@@ -1691,5 +1691,35 @@ static inline void dbug_tmp_restore_column_map(MY_BITMAP *bitmap,
#endif
}
+
+/*
+ Variant of the above : handle both read and write sets.
+ Provide for the possiblity of the read set being the same as the write set
+*/
+static inline void dbug_tmp_use_all_columns(TABLE *table,
+ my_bitmap_map **save,
+ MY_BITMAP *read_set,
+ MY_BITMAP *write_set)
+{
+#ifndef DBUG_OFF
+ save[0]= read_set->bitmap;
+ save[1]= write_set->bitmap;
+ (void) tmp_use_all_columns(table, read_set);
+ (void) tmp_use_all_columns(table, write_set);
+#endif
+}
+
+
+static inline void dbug_tmp_restore_column_maps(MY_BITMAP *read_set,
+ MY_BITMAP *write_set,
+ my_bitmap_map **old)
+{
+#ifndef DBUG_OFF
+ tmp_restore_column_map(read_set, old[0]);
+ tmp_restore_column_map(write_set, old[1]);
+#endif
+}
+
+
size_t max_row_length(TABLE *table, const uchar *data);