Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
ef672974
Commit
ef672974
authored
Nov 03, 2003
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
compatibility fixes
parent
5d00bf6d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
17 deletions
+17
-17
mysys/my_bitmap.c
mysys/my_bitmap.c
+17
-17
No files found.
mysys/my_bitmap.c
View file @
ef672974
...
...
@@ -170,7 +170,7 @@ my_bool bitmap_is_prefix(const MY_BITMAP *map, uint prefix_size)
DBUG_ASSERT
(
map
->
bitmap
&&
prefix_size
<=
map
->
bitmap_size
*
8
);
bitmap_lock
(
map
);
bitmap_lock
(
(
MY_BITMAP
*
)
map
);
while
(
m
<
end_prefix
)
if
(
*
m
++
!=
0xff
)
goto
ret
;
...
...
@@ -184,7 +184,7 @@ my_bool bitmap_is_prefix(const MY_BITMAP *map, uint prefix_size)
res
=
1
;
ret:
bitmap_unlock
(
map
);
bitmap_unlock
(
(
MY_BITMAP
*
)
map
);
return
res
;
}
...
...
@@ -211,8 +211,8 @@ my_bool bitmap_is_subset(const MY_BITMAP *map1, const MY_BITMAP *map2)
DBUG_ASSERT
(
map1
->
bitmap
&&
map2
->
bitmap
&&
map1
->
bitmap_size
==
map2
->
bitmap_size
);
bitmap_lock
(
map1
);
bitmap_lock
(
map2
);
bitmap_lock
(
(
MY_BITMAP
*
)
map1
);
bitmap_lock
(
(
MY_BITMAP
*
)
map2
);
end
=
m1
+
map1
->
bitmap_size
;
...
...
@@ -222,8 +222,8 @@ my_bool bitmap_is_subset(const MY_BITMAP *map1, const MY_BITMAP *map2)
res
=
1
;
ret:
bitmap_unlock
(
map2
);
bitmap_unlock
(
map1
);
bitmap_unlock
(
(
MY_BITMAP
*
)
map2
);
bitmap_unlock
(
(
MY_BITMAP
*
)
map1
);
return
res
;
}
...
...
@@ -233,24 +233,24 @@ my_bool bitmap_cmp(const MY_BITMAP *map1, const MY_BITMAP *map2)
DBUG_ASSERT
(
map1
->
bitmap
&&
map2
->
bitmap
&&
map1
->
bitmap_size
==
map2
->
bitmap_size
);
bitmap_lock
(
map1
);
bitmap_lock
(
map2
);
bitmap_lock
(
(
MY_BITMAP
*
)
map1
);
bitmap_lock
(
(
MY_BITMAP
*
)
map2
);
res
=
memcmp
(
map1
->
bitmap
,
map2
->
bitmap
,
map1
->
bitmap_size
)
==
0
;
bitmap_unlock
(
map2
);
bitmap_unlock
(
map1
);
bitmap_unlock
(
(
MY_BITMAP
*
)
map2
);
bitmap_unlock
(
(
MY_BITMAP
*
)
map1
);
return
res
;
}
void
bitmap_intersect
(
MY_BITMAP
*
map
,
const
MY_BITMAP
*
map2
)
{
uchar
*
to
=
map
->
bitmap
,
*
from
=
map2
->
bitmap
,
*
end
;
uint
len
=
map
->
bitmap_size
,
len2
=
map2
->
bitmap
;
uint
len
=
map
->
bitmap_size
,
len2
=
map2
->
bitmap
_size
;
DBUG_ASSERT
(
map
->
bitmap
&&
map2
->
bitmap
);
bitmap_lock
(
map
);
bitmap_lock
(
map2
);
bitmap_lock
(
(
MY_BITMAP
*
)
map2
);
end
=
to
+
min
(
len
,
len2
);
...
...
@@ -264,7 +264,7 @@ void bitmap_intersect(MY_BITMAP *map, const MY_BITMAP *map2)
*
to
++=
0
;
}
bitmap_unlock
(
map2
);
bitmap_unlock
(
(
MY_BITMAP
*
)
map2
);
bitmap_unlock
(
map
);
}
...
...
@@ -275,14 +275,14 @@ void bitmap_subtract(MY_BITMAP *map, const MY_BITMAP *map2)
DBUG_ASSERT
(
map
->
bitmap
&&
map2
->
bitmap
&&
map
->
bitmap_size
==
map2
->
bitmap_size
);
bitmap_lock
(
map
);
bitmap_lock
(
map2
);
bitmap_lock
(
(
MY_BITMAP
*
)
map2
);
end
=
to
+
map
->
bitmap_size
;
while
(
to
<
end
)
*
to
++
&=
~
(
*
from
++
);
bitmap_unlock
(
map2
);
bitmap_unlock
(
(
MY_BITMAP
*
)
map2
);
bitmap_unlock
(
map
);
}
...
...
@@ -293,14 +293,14 @@ void bitmap_union(MY_BITMAP *map, const MY_BITMAP *map2)
DBUG_ASSERT
(
map
->
bitmap
&&
map2
->
bitmap
&&
map
->
bitmap_size
==
map2
->
bitmap_size
);
bitmap_lock
(
map
);
bitmap_lock
(
map2
);
bitmap_lock
(
(
MY_BITMAP
*
)
map2
);
end
=
to
+
map
->
bitmap_size
;
while
(
to
<
end
)
*
to
++
|=
*
from
++
;
bitmap_unlock
(
map2
);
bitmap_unlock
(
(
MY_BITMAP
*
)
map2
);
bitmap_unlock
(
map
);
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment