summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorunknown <heikki@hundin.mysql.fi>2003-02-18 19:57:05 +0200
committerunknown <heikki@hundin.mysql.fi>2003-02-18 19:57:05 +0200
commit12310f638188a671df558e4427cb183b615a5ee6 (patch)
tree54c67c33ab809c3d4db1860ff9cce4eef8fd0368 /include
parentb3fa1d867f29137240c46a6a0396bb9a1c7019fa (diff)
downloadmariadb-git-12310f638188a671df558e4427cb183b615a5ee6.tar.gz
my_base.h:
Add comment about what kind of key value prefixes HA_READ_KEY_PREFIX_LAST etc. allow as a search key include/my_base.h: Add comment about what kind of key value prefixes HA_READ_KEY_PREFIX_LAST etc. allow as a search key
Diffstat (limited to 'include')
-rw-r--r--include/my_base.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/include/my_base.h b/include/my_base.h
index e1761eac8f9..f91b45ee469 100644
--- a/include/my_base.h
+++ b/include/my_base.h
@@ -49,6 +49,21 @@
/* The following is parameter to ha_rkey() how to use key */
+/* We define a complete-field prefix of a key value as a prefix where the
+last included field in the prefix contains the full field, not just some bytes
+from the start of the field. A partial-field prefix is allowed to
+contain only a few first bytes from the last included field.
+
+Below HA_READ_KEY_EXACT, ..., HA_READ_BEFORE_KEY can take a
+complete-field prefix of a key value as the search key. HA_READ_PREFIX
+and HA_READ_PREFIX_LAST could also take a partial-field prefix, but
+currently (4.0.10) they are only used with complete-field prefixes. MySQL uses
+a padding trick to implement LIKE 'abc%' queries.
+
+NOTE that in InnoDB HA_READ_PREFIX_LAST will NOT work with a partial-field
+prefix because InnoDB currently strips spaces from the end of varchar
+fields! */
+
enum ha_rkey_function {
HA_READ_KEY_EXACT, /* Find first record else error */
HA_READ_KEY_OR_NEXT, /* Record or next record */