summaryrefslogtreecommitdiff
path: root/heap/hp_create.c
diff options
context:
space:
mode:
authormonty@mysql.com <>2004-12-18 05:19:21 +0200
committermonty@mysql.com <>2004-12-18 05:19:21 +0200
commit3fb088a075ebd3e4fe78d122911103618bd1cbe4 (patch)
treeeb62c04f31efc6c7cb435cef36a43e2e361eed1c /heap/hp_create.c
parentb4dc75c877b45e2eb97e5fc15fda4292e0f6f705 (diff)
downloadmariadb-git-3fb088a075ebd3e4fe78d122911103618bd1cbe4.tar.gz
Add 0x before pointers (to help with debugging)
Add support for VARCHAR with 1 or 2 length bytes Enable VARCHAR packing in MyISAM files (previous patch didn't pack data properly) Give error if we got problems in temporary tables during a SELECT Don't use new table generated by ALTER TABLE if index generation fails Fixed wrong call by range_end() (Could cause an ASSERT in debug mode)
Diffstat (limited to 'heap/hp_create.c')
-rw-r--r--heap/hp_create.c23
1 files changed, 20 insertions, 3 deletions
diff --git a/heap/hp_create.c b/heap/hp_create.c
index d296c9db28b..0580c178498 100644
--- a/heap/hp_create.c
+++ b/heap/hp_create.c
@@ -77,14 +77,31 @@ int heap_create(const char *name, uint keys, HP_KEYDEF *keydef,
case HA_KEYTYPE_INT8:
keyinfo->seg[j].flag|= HA_SWAP_KEY;
break;
- case HA_KEYTYPE_VARBINARY:
+ case HA_KEYTYPE_VARBINARY1:
/* Case-insensitiveness is handled in coll->hash_sort */
- keyinfo->seg[j].type= HA_KEYTYPE_VARTEXT;
+ keyinfo->seg[j].type= HA_KEYTYPE_VARTEXT1;
/* fall_through */
- case HA_KEYTYPE_VARTEXT:
+ case HA_KEYTYPE_VARTEXT1:
if (!my_binary_compare(keyinfo->seg[j].charset))
keyinfo->flag|= HA_END_SPACE_KEY;
keyinfo->flag|= HA_VAR_LENGTH_KEY;
+ /* Save number of bytes used to store length */
+ keyinfo->seg[j].bit_start= 1;
+ break;
+ case HA_KEYTYPE_VARBINARY2:
+ /* Case-insensitiveness is handled in coll->hash_sort */
+ /* fall_through */
+ case HA_KEYTYPE_VARTEXT2:
+ if (!my_binary_compare(keyinfo->seg[j].charset))
+ keyinfo->flag|= HA_END_SPACE_KEY;
+ keyinfo->flag|= HA_VAR_LENGTH_KEY;
+ /* Save number of bytes used to store length */
+ keyinfo->seg[j].bit_start= 2;
+ /*
+ Make future comparison simpler by only having to check for
+ one type
+ */
+ keyinfo->seg[j].type= HA_KEYTYPE_VARTEXT1;
break;
default:
break;