summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorunknown <monty@mysql.com>2004-12-06 19:18:35 +0200
committerunknown <monty@mysql.com>2004-12-06 19:18:35 +0200
commit8379b61efb053da778846416baf23812a26e8f86 (patch)
tree44698f6f68c51daacf7552356ae071b8e8fdb035 /include
parent19a95482195a158425c66ac629d07da53e4fc1b6 (diff)
parenta8ea31fae6737c453d2dd9719a75f905c06048b3 (diff)
downloadmariadb-git-8379b61efb053da778846416baf23812a26e8f86.tar.gz
Merge with new VARCHAR code
configure.in: Auto merged BitKeeper/deleted/.del-acinclude.m4~f4ab416bac5003: Auto merged BitKeeper/deleted/.del-ha_isam.cc~4dce65904db2675e: Auto merged BitKeeper/deleted/.del-ha_isammrg.cc~dc682e4755d77a2e: Auto merged client/mysqldump.c: Auto merged client/mysqltest.c: Auto merged heap/hp_create.c: Auto merged heap/hp_delete.c: Auto merged heap/hp_hash.c: Auto merged heap/hp_write.c: Auto merged include/decimal.h: Auto merged include/m_ctype.h: Auto merged libmysql/libmysql.c: Auto merged libmysqld/Makefile.am: Auto merged myisam/mi_check.c: Auto merged myisam/mi_create.c: Auto merged myisam/mi_write.c: Auto merged mysql-test/r/ctype_tis620.result: Auto merged mysql-test/r/ctype_ucs.result: Auto merged mysql-test/r/myisam.result: Auto merged mysql-test/r/mysqldump.result: Auto merged mysql-test/r/order_by.result: Auto merged mysql-test/r/ps.result: Auto merged mysql-test/r/ps_1general.result: Auto merged mysql-test/r/ps_2myisam.result: Auto merged mysql-test/r/ps_3innodb.result: Auto merged mysql-test/r/ps_4heap.result: Auto merged mysql-test/r/ps_5merge.result: Auto merged mysql-test/r/ps_6bdb.result: Auto merged mysql-test/r/select.result: Auto merged mysql-test/r/strict.result: Auto merged mysql-test/r/subselect.result: Auto merged mysql-test/r/type_blob.result: Auto merged mysql-test/t/ctype_ucs.test: Auto merged mysql-test/t/endspace.test: Auto merged mysql-test/t/myisam.test: Auto merged mysql-test/t/ps_1general.test: Auto merged mysql-test/t/strict.test: Auto merged mysql-test/t/type_blob.test: Auto merged ndb/src/common/util/NdbSqlUtil.cpp: Auto merged scripts/mysql_fix_privilege_tables.sh: Auto merged sql/field.h: Auto merged sql/field_conv.cc: Auto merged sql/ha_heap.cc: Auto merged sql/ha_innodb.cc: Auto merged sql/ha_innodb.h: Auto merged sql/ha_myisam.cc: Auto merged sql/ha_ndbcluster.cc: Auto merged sql/handler.h: Auto merged sql/item_cmpfunc.cc: Auto merged sql/item_sum.cc: Auto merged sql/opt_range.cc: Auto merged sql/opt_sum.cc: Auto merged sql/protocol.cc: Auto merged sql/sql_base.cc: Auto merged sql/sql_help.cc: Auto merged sql/sql_select.cc: Auto merged sql/sql_yacc.yy: Auto merged sql/structs.h: Auto merged sql/table.cc: Auto merged strings/ctype-czech.c: Auto merged strings/ctype-uca.c: Auto merged strings/ctype-utf8.c: Auto merged strings/ctype-win1250ch.c: Auto merged strings/decimal.c: Auto merged tests/client_test.c: Auto merged mysql-test/r/bdb.result: Merge with VARCHAR code mysql-test/r/heap.result: Merge with VARCHAR code mysql-test/r/innodb.result: Merge with VARCHAR code mysql-test/r/select.result.es: Merge with VARCHAR code mysql-test/t/bdb.test: Merge with VARCHAR code mysql-test/t/heap.test: Merge with VARCHAR code mysql-test/t/innodb.test: Merge with VARCHAR code sql/field.cc: Merge with VARCHAR code sql/item.cc: Merge with VARCHAR code sql/sql_acl.cc: Merge with VARCHAR code sql/sql_parse.cc: Merge with VARCHAR code sql/sql_table.cc: Merge with VARCHAR code sql/sql_update.cc: Merge with VARCHAR code sql/table.h: Merge with VARCHAR code strings/ctype-mb.c: Don't pad my_like_range with max_str for simple LIKE expression strings/ctype-tis620.c: Merge with VARCHAR code strings/ctype-ucs2.c: Added new argument to my_strnncollsp_ucs2() Simply code
Diffstat (limited to 'include')
-rw-r--r--include/decimal.h2
-rw-r--r--include/m_ctype.h6
-rw-r--r--include/my_base.h10
-rw-r--r--include/my_handler.h7
-rw-r--r--include/mysql_com.h2
5 files changed, 20 insertions, 7 deletions
diff --git a/include/decimal.h b/include/decimal.h
index fddae1f54a6..4d1fbfddc01 100644
--- a/include/decimal.h
+++ b/include/decimal.h
@@ -17,8 +17,6 @@
#ifndef _decimal_h
#define _decimal_h
-#include <my_global.h>
-
typedef enum {TRUNCATE=0, HALF_EVEN, HALF_UP, CEILING, FLOOR} decimal_round_mode;
typedef int32 decimal_digit;
diff --git a/include/m_ctype.h b/include/m_ctype.h
index 26e285b9683..d7a4af08b0f 100644
--- a/include/m_ctype.h
+++ b/include/m_ctype.h
@@ -106,7 +106,8 @@ typedef struct my_collation_handler_st
int (*strnncoll)(struct charset_info_st *,
const uchar *, uint, const uchar *, uint, my_bool);
int (*strnncollsp)(struct charset_info_st *,
- const uchar *, uint, const uchar *, uint);
+ const uchar *, uint, const uchar *, uint,
+ my_bool diff_if_only_endspace_difference);
int (*strnxfrm)(struct charset_info_st *,
uchar *, uint, const uchar *, uint);
my_bool (*like_range)(struct charset_info_st *,
@@ -259,7 +260,8 @@ extern int my_strnncoll_simple(CHARSET_INFO *, const uchar *, uint,
const uchar *, uint, my_bool);
extern int my_strnncollsp_simple(CHARSET_INFO *, const uchar *, uint,
- const uchar *, uint);
+ const uchar *, uint,
+ my_bool diff_if_only_endspace_difference);
extern void my_hash_sort_simple(CHARSET_INFO *cs,
const uchar *key, uint len,
diff --git a/include/my_base.h b/include/my_base.h
index 815a1c76c0e..88d3ec0b270 100644
--- a/include/my_base.h
+++ b/include/my_base.h
@@ -213,7 +213,7 @@ enum ha_base_keytype {
/*
Key has a part that can have end space. If this is an unique key
we have to handle it differently from other unique keys as we can find
- many matching rows for one key (becaue end space are not compared)
+ many matching rows for one key (because end space are not compared)
*/
#define HA_END_SPACE_KEY 4096
@@ -221,12 +221,17 @@ enum ha_base_keytype {
#define HA_SPACE_PACK 1 /* Pack space in key-seg */
#define HA_PART_KEY_SEG 4 /* Used by MySQL for part-key-cols */
-#define HA_VAR_LENGTH 8
+#define HA_VAR_LENGTH_PART 8
#define HA_NULL_PART 16
#define HA_BLOB_PART 32
#define HA_SWAP_KEY 64
#define HA_REVERSE_SORT 128 /* Sort key in reverse order */
#define HA_NO_SORT 256 /* do not bother sorting on this keyseg */
+/*
+ End space in unique/varchar are considered equal. (Like 'a' and 'a ')
+ Only needed for internal temporary tables.
+*/
+#define HA_END_SPACE_ARE_EQUAL 512
/* optionbits for database */
#define HA_OPTION_PACK_RECORD 1
@@ -345,6 +350,7 @@ enum ha_base_keytype {
#define HA_STATE_BUFF_SAVED 512 /* If current keybuff is info->buff */
#define HA_STATE_ROW_CHANGED 1024 /* To invalide ROW cache */
#define HA_STATE_EXTEND_BLOCK 2048
+#define HA_STATE_RNEXT_SAME 4096 /* rnext_same was called */
enum en_fieldtype {
FIELD_LAST=-1,FIELD_NORMAL,FIELD_SKIP_ENDSPACE,FIELD_SKIP_PRESPACE,
diff --git a/include/my_handler.h b/include/my_handler.h
index 18a6234d3f6..d81c4590f8e 100644
--- a/include/my_handler.h
+++ b/include/my_handler.h
@@ -57,6 +57,13 @@ typedef struct st_HA_KEYSEG /* Key-portion */
{ length=mi_uint2korr((key)+1); (key)+=3; length_pack=3; } \
}
+#define store_key_length_inc(key,length) \
+{ if ((length) < 255) \
+ { *(key)++=(length); } \
+ else \
+ { *(key)=255; mi_int2store((key)+1,(length)); (key)+=3; } \
+}
+
extern int mi_compare_text(CHARSET_INFO *, uchar *, uint, uchar *, uint ,
my_bool, my_bool);
extern int ha_key_cmp(register HA_KEYSEG *keyseg, register uchar *a,
diff --git a/include/mysql_com.h b/include/mysql_com.h
index 92a67ac0279..6a03fe90eb5 100644
--- a/include/mysql_com.h
+++ b/include/mysql_com.h
@@ -209,7 +209,7 @@ enum enum_field_types { MYSQL_TYPE_DECIMAL, MYSQL_TYPE_TINY,
MYSQL_TYPE_LONGLONG,MYSQL_TYPE_INT24,
MYSQL_TYPE_DATE, MYSQL_TYPE_TIME,
MYSQL_TYPE_DATETIME, MYSQL_TYPE_YEAR,
- MYSQL_TYPE_NEWDATE,
+ MYSQL_TYPE_NEWDATE, MYSQL_TYPE_VARCHAR,
MYSQL_TYPE_ENUM=247,
MYSQL_TYPE_SET=248,
MYSQL_TYPE_TINY_BLOB=249,