summaryrefslogtreecommitdiff
path: root/sql/field.h
diff options
context:
space:
mode:
authorunknown <mats@romeo.(none)>2006-09-19 13:47:15 +0200
committerunknown <mats@romeo.(none)>2006-09-19 13:47:15 +0200
commit21263710affc1c7acb5371625a8d066cb9bf9c26 (patch)
tree4f26f8910eb8aa64708e803a81f81e937cc9171b /sql/field.h
parentc323a2cbe2cee7a43afcb5d2ea34c39eedaf7f08 (diff)
parent3936ce19d20e085cb5317d2fc024ee6818e4bbf4 (diff)
downloadmariadb-git-21263710affc1c7acb5371625a8d066cb9bf9c26.tar.gz
Merge romeo.(none):/home/bkroot/mysql-5.1-new-rpl
into romeo.(none):/home/bk/w3259-mysql-5.1-new-rpl mysql-test/r/rpl_row_tabledefs_2myisam.result: Auto merged sql/field.cc: Auto merged sql/field.h: Auto merged mysql-test/t/disabled.def: SCCS merged
Diffstat (limited to 'sql/field.h')
-rw-r--r--sql/field.h31
1 files changed, 28 insertions, 3 deletions
diff --git a/sql/field.h b/sql/field.h
index 5172c4f3b2a..8a6bda500d3 100644
--- a/sql/field.h
+++ b/sql/field.h
@@ -218,10 +218,24 @@ public:
inline bool maybe_null(void) { return null_ptr != 0 || table->maybe_null; }
inline bool real_maybe_null(void) { return null_ptr != 0; }
+ enum {
+ LAST_NULL_BYTE_UNDEF= 0
+ };
+
/*
- Return a pointer to the last byte of the null bytes where the
- field conceptually is placed. In the case that the field does not
- use any bits of the null bytes, a null pointer is returned.
+ Find the position of the last null byte for the field.
+
+ SYNOPSIS
+ last_null_byte()
+
+ DESCRIPTION
+ Return a pointer to the last byte of the null bytes where the
+ field conceptually is placed.
+
+ RETURN VALUE
+ The position of the last null byte relative to the beginning of
+ the record. If the field does not use any bits of the null
+ bytes, the value 0 (LAST_NULL_BYTE_UNDEF) is returned.
*/
my_size_t last_null_byte() const {
my_size_t bytes= do_last_null_byte();
@@ -392,6 +406,17 @@ public:
friend class Item_func_group_concat;
private:
+ /*
+ Primitive for implementing last_null_byte().
+
+ SYNOPSIS
+ do_last_null_byte()
+
+ DESCRIPTION
+ Primitive for the implementation of the last_null_byte()
+ function. This represents the inheritance interface and can be
+ overridden by subclasses.
+ */
virtual my_size_t do_last_null_byte() const;
};