Commit 546825b9 authored by Guilhem Bichot's avatar Guilhem Bichot

merge with latest 5.1-maria

parents ceb9e92f fdff49ec
...@@ -240,7 +240,7 @@ select hex(s1) from t1; ...@@ -240,7 +240,7 @@ select hex(s1) from t1;
hex(s1) hex(s1)
41 41
drop table t1; drop table t1;
create table t1 (a text character set utf8, primary key(a(360))); create table t1 (a text character set utf8, primary key(a(371)));
ERROR 42000: Specified key was too long; max key length is 1000 bytes ERROR 42000: Specified key was too long; max key length is 1000 bytes
CREATE TABLE t1 ( a varchar(10) ) CHARACTER SET utf8; CREATE TABLE t1 ( a varchar(10) ) CHARACTER SET utf8;
INSERT INTO t1 VALUES ( 'test' ); INSERT INTO t1 VALUES ( 'test' );
......
...@@ -164,7 +164,7 @@ drop table t1; ...@@ -164,7 +164,7 @@ drop table t1;
# UTF8 breaks primary keys for cols > 333 characters # UTF8 breaks primary keys for cols > 333 characters
# #
--error 1071 --error 1071
create table t1 (a text character set utf8, primary key(a(360))); create table t1 (a text character set utf8, primary key(a(371)));
# #
......
...@@ -433,7 +433,7 @@ int maria_rtree_get_first(MARIA_HA *info, uint keynr, uint key_length) ...@@ -433,7 +433,7 @@ int maria_rtree_get_first(MARIA_HA *info, uint keynr, uint key_length)
info->maria_rtree_recursion_depth= -1; info->maria_rtree_recursion_depth= -1;
info->keyread_buff_used= 1; info->keyread_buff_used= 1;
return maria_rtree_get_req(info, &keyinfo[keynr], key_length, root, 0); return maria_rtree_get_req(info, keyinfo, key_length, root, 0);
} }
......
...@@ -378,6 +378,7 @@ static int rtree_get_req(MI_INFO *info, MI_KEYDEF *keyinfo, uint key_length, ...@@ -378,6 +378,7 @@ static int rtree_get_req(MI_INFO *info, MI_KEYDEF *keyinfo, uint key_length,
int rtree_get_first(MI_INFO *info, uint keynr, uint key_length) int rtree_get_first(MI_INFO *info, uint keynr, uint key_length)
{ {
my_off_t root; my_off_t root;
MI_KEYDEF *keyinfo = info->s->keyinfo + keynr;
if ((root = info->s->state.key_root[keynr]) == HA_OFFSET_ERROR) if ((root = info->s->state.key_root[keynr]) == HA_OFFSET_ERROR)
{ {
...@@ -388,7 +389,7 @@ int rtree_get_first(MI_INFO *info, uint keynr, uint key_length) ...@@ -388,7 +389,7 @@ int rtree_get_first(MI_INFO *info, uint keynr, uint key_length)
info->rtree_recursion_depth = -1; info->rtree_recursion_depth = -1;
info->buff_used = 1; info->buff_used = 1;
return rtree_get_req(info, info->s->keyinfo, key_length, root, 0); return rtree_get_req(info, keyinfo, key_length, root, 0);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment