post-merge fixes
This commit is contained in:
parent
d054ce1c5d
commit
e9f308f0b9
@ -131,9 +131,9 @@ select * from t2 having MATCH inhalt AGAINST ('foobar');
|
|||||||
# check of fulltext errors
|
# check of fulltext errors
|
||||||
#
|
#
|
||||||
|
|
||||||
--error 1280
|
--error 1281
|
||||||
CREATE TABLE t3 (t int(11),i text,fulltext tix (t,i));
|
CREATE TABLE t3 (t int(11),i text,fulltext tix (t,i));
|
||||||
--error 1280
|
--error 1281
|
||||||
CREATE TABLE t3 (t int(11),i text,
|
CREATE TABLE t3 (t int(11),i text,
|
||||||
j varchar(200) CHARACTER SET latin2,
|
j varchar(200) CHARACTER SET latin2,
|
||||||
fulltext tix (i,j));
|
fulltext tix (i,j));
|
||||||
|
@ -26,6 +26,8 @@
|
|||||||
must be within bitmap size
|
must be within bitmap size
|
||||||
* bitmap_set_prefix() is an exception - one can use ~0 to set all bits
|
* bitmap_set_prefix() is an exception - one can use ~0 to set all bits
|
||||||
* when both arguments are bitmaps, they must be of the same size
|
* when both arguments are bitmaps, they must be of the same size
|
||||||
|
* bitmap_intersect() is an exception :)
|
||||||
|
(for for Bitmap::intersect(ulonglong map2buff))
|
||||||
|
|
||||||
TODO:
|
TODO:
|
||||||
Make assembler THREAD safe versions of these using test-and-set instructions
|
Make assembler THREAD safe versions of these using test-and-set instructions
|
||||||
@ -244,17 +246,24 @@ my_bool bitmap_cmp(const MY_BITMAP *map1, const MY_BITMAP *map2)
|
|||||||
void bitmap_intersect(MY_BITMAP *map, const MY_BITMAP *map2)
|
void bitmap_intersect(MY_BITMAP *map, const MY_BITMAP *map2)
|
||||||
{
|
{
|
||||||
uchar *to=map->bitmap, *from=map2->bitmap, *end;
|
uchar *to=map->bitmap, *from=map2->bitmap, *end;
|
||||||
|
uint len=map->bitmap_size, len2=map2->bitmap;
|
||||||
|
|
||||||
DBUG_ASSERT(map->bitmap && map2->bitmap &&
|
DBUG_ASSERT(map->bitmap && map2->bitmap);
|
||||||
map->bitmap_size==map2->bitmap_size);
|
|
||||||
bitmap_lock(map);
|
bitmap_lock(map);
|
||||||
bitmap_lock(map2);
|
bitmap_lock(map2);
|
||||||
|
|
||||||
end= to+map->bitmap_size;
|
end= to+min(len,len2);
|
||||||
|
|
||||||
while (to < end)
|
while (to < end)
|
||||||
*to++ &= *from++;
|
*to++ &= *from++;
|
||||||
|
|
||||||
|
if (len2 < len)
|
||||||
|
{
|
||||||
|
end+=len-len2;
|
||||||
|
while (to < end)
|
||||||
|
*to++=0;
|
||||||
|
}
|
||||||
|
|
||||||
bitmap_unlock(map2);
|
bitmap_unlock(map2);
|
||||||
bitmap_unlock(map);
|
bitmap_unlock(map);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user