summaryrefslogtreecommitdiff
path: root/mysys/my_handler.c
diff options
context:
space:
mode:
authorunknown <guilhem@gbichot3.local>2006-08-09 15:27:38 +0200
committerunknown <guilhem@gbichot3.local>2006-08-09 15:27:38 +0200
commit381fdf1a67a67a7e9037bbbf385cb67cbaef126e (patch)
tree31c3b9a054da191751085442fae03a12739e3b4c /mysys/my_handler.c
parentb6897efbb8b7119e4abd28bed93a3579c2bf914e (diff)
parente6efa27c0b720702f3841a4d28e795c49432bfc5 (diff)
downloadmariadb-git-381fdf1a67a67a7e9037bbbf385cb67cbaef126e.tar.gz
Merge gbichot3.local:/home/mysql_src/mysql-5.1-2
into gbichot3.local:/home/mysql_src/mysql-maria; I'll fix manually. BitKeeper/etc/ignore: auto-union configure.in: Auto merged include/Makefile.am: Auto merged include/my_base.h: Auto merged include/myisam.h: Auto merged libmysqld/Makefile.am: Auto merged mysql-test/mysql-test-run.pl: Auto merged sql/Makefile.am: Auto merged sql/ha_myisam.cc: Auto merged sql/ha_myisam.h: Auto merged sql/ha_myisammrg.h: Auto merged sql/handler.h: Auto merged sql/item_func.h: Auto merged sql/mysqld.cc: Auto merged sql/set_var.h: Auto merged sql/sql_class.h: Auto merged storage/myisam/ft_boolean_search.c: Auto merged storage/myisam/ft_nlq_search.c: Auto merged storage/myisam/ft_parser.c: Auto merged storage/myisam/ft_static.c: Auto merged storage/myisam/ft_update.c: Auto merged storage/myisam/mi_check.c: Auto merged storage/myisam/mi_create.c: Auto merged storage/myisam/mi_dynrec.c: Auto merged storage/myisam/mi_key.c: Auto merged storage/myisam/mi_search.c: Auto merged storage/myisam/mi_test2.c: Auto merged storage/myisam/mi_update.c: Auto merged storage/myisam/mi_write.c: Auto merged storage/myisam/myisampack.c: Auto merged storage/myisam/rt_index.c: Auto merged storage/myisam/sort.c: Auto merged include/my_handler.h: these ones I'll remove right away mysys/my_handler.c: merge sql/mysql_priv.h: merge sql/set_var.cc: merge storage/csv/ha_tina.cc: merge storage/myisam/myisamdef.h: merge
Diffstat (limited to 'mysys/my_handler.c')
-rw-r--r--mysys/my_handler.c24
1 files changed, 15 insertions, 9 deletions
diff --git a/mysys/my_handler.c b/mysys/my_handler.c
index 46144c0dff2..256f67f6125 100644
--- a/mysys/my_handler.c
+++ b/mysys/my_handler.c
@@ -16,9 +16,11 @@
MA 02111-1307, USA */
#include <my_global.h>
-#include "my_handler.h"
+#include <m_ctype.h>
+#include <my_base.h>
+#include <my_handler.h>
-int mi_compare_text(CHARSET_INFO *charset_info, uchar *a, uint a_length,
+int ha_compare_text(CHARSET_INFO *charset_info, uchar *a, uint a_length,
uchar *b, uint b_length, my_bool part_key,
my_bool skip_end_space)
{
@@ -174,7 +176,7 @@ int ha_key_cmp(register HA_KEYSEG *keyseg, register uchar *a,
next_key_length=key_length-b_length-pack_length;
if (piks &&
- (flag=mi_compare_text(keyseg->charset,a,a_length,b,b_length,
+ (flag=ha_compare_text(keyseg->charset,a,a_length,b,b_length,
(my_bool) ((nextflag & SEARCH_PREFIX) &&
next_key_length <= 0),
(my_bool)!(nextflag & SEARCH_PREFIX))))
@@ -187,7 +189,7 @@ int ha_key_cmp(register HA_KEYSEG *keyseg, register uchar *a,
{
uint length=(uint) (end-a), a_length=length, b_length=length;
if (piks &&
- (flag= mi_compare_text(keyseg->charset, a, a_length, b, b_length,
+ (flag= ha_compare_text(keyseg->charset, a, a_length, b, b_length,
(my_bool) ((nextflag & SEARCH_PREFIX) &&
next_key_length <= 0),
(my_bool)!(nextflag & SEARCH_PREFIX))))
@@ -235,7 +237,7 @@ int ha_key_cmp(register HA_KEYSEG *keyseg, register uchar *a,
next_key_length=key_length-b_length-pack_length;
if (piks &&
- (flag= mi_compare_text(keyseg->charset,a,a_length,b,b_length,
+ (flag= ha_compare_text(keyseg->charset,a,a_length,b,b_length,
(my_bool) ((nextflag & SEARCH_PREFIX) &&
next_key_length <= 0),
(my_bool) ((nextflag & (SEARCH_FIND |
@@ -482,12 +484,15 @@ end:
DESCRIPTION
Find the first NULL value in index-suffix values tuple.
- TODO Consider optimizing this fuction or its use so we don't search for
- NULL values in completely NOT NULL index suffixes.
+
+ TODO
+ Consider optimizing this function or its use so we don't search for
+ NULL values in completely NOT NULL index suffixes.
RETURN
- First key part that has NULL as value in values tuple, or the last key part
- (with keyseg->type==HA_TYPE_END) if values tuple doesn't contain NULLs.
+ First key part that has NULL as value in values tuple, or the last key
+ part (with keyseg->type==HA_TYPE_END) if values tuple doesn't contain
+ NULLs.
*/
HA_KEYSEG *ha_find_null(HA_KEYSEG *keyseg, uchar *a)
@@ -519,6 +524,7 @@ HA_KEYSEG *ha_find_null(HA_KEYSEG *keyseg, uchar *a)
case HA_KEYTYPE_VARTEXT1:
case HA_KEYTYPE_VARTEXT2:
case HA_KEYTYPE_VARBINARY1:
+ case HA_KEYTYPE_VARTEXT2:
case HA_KEYTYPE_VARBINARY2:
{
int a_length;