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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
bda251c3
Commit
bda251c3
authored
Nov 03, 2003
by
serg@serg.mylan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
compatibility fixes
parent
414478f3
Changes
1
Show 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 @
bda251c3
...
@@ -170,7 +170,7 @@ my_bool bitmap_is_prefix(const MY_BITMAP *map, uint prefix_size)
...
@@ -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
);
DBUG_ASSERT
(
map
->
bitmap
&&
prefix_size
<=
map
->
bitmap_size
*
8
);
bitmap_lock
(
map
);
bitmap_lock
(
(
MY_BITMAP
*
)
map
);
while
(
m
<
end_prefix
)
while
(
m
<
end_prefix
)
if
(
*
m
++
!=
0xff
)
if
(
*
m
++
!=
0xff
)
goto
ret
;
goto
ret
;
...
@@ -184,7 +184,7 @@ my_bool bitmap_is_prefix(const MY_BITMAP *map, uint prefix_size)
...
@@ -184,7 +184,7 @@ my_bool bitmap_is_prefix(const MY_BITMAP *map, uint prefix_size)
res
=
1
;
res
=
1
;
ret:
ret:
bitmap_unlock
(
map
);
bitmap_unlock
(
(
MY_BITMAP
*
)
map
);
return
res
;
return
res
;
}
}
...
@@ -211,8 +211,8 @@ my_bool bitmap_is_subset(const MY_BITMAP *map1, const MY_BITMAP *map2)
...
@@ -211,8 +211,8 @@ my_bool bitmap_is_subset(const MY_BITMAP *map1, const MY_BITMAP *map2)
DBUG_ASSERT
(
map1
->
bitmap
&&
map2
->
bitmap
&&
DBUG_ASSERT
(
map1
->
bitmap
&&
map2
->
bitmap
&&
map1
->
bitmap_size
==
map2
->
bitmap_size
);
map1
->
bitmap_size
==
map2
->
bitmap_size
);
bitmap_lock
(
map1
);
bitmap_lock
(
(
MY_BITMAP
*
)
map1
);
bitmap_lock
(
map2
);
bitmap_lock
(
(
MY_BITMAP
*
)
map2
);
end
=
m1
+
map1
->
bitmap_size
;
end
=
m1
+
map1
->
bitmap_size
;
...
@@ -222,8 +222,8 @@ my_bool bitmap_is_subset(const MY_BITMAP *map1, const MY_BITMAP *map2)
...
@@ -222,8 +222,8 @@ my_bool bitmap_is_subset(const MY_BITMAP *map1, const MY_BITMAP *map2)
res
=
1
;
res
=
1
;
ret:
ret:
bitmap_unlock
(
map2
);
bitmap_unlock
(
(
MY_BITMAP
*
)
map2
);
bitmap_unlock
(
map1
);
bitmap_unlock
(
(
MY_BITMAP
*
)
map1
);
return
res
;
return
res
;
}
}
...
@@ -233,24 +233,24 @@ my_bool bitmap_cmp(const MY_BITMAP *map1, const MY_BITMAP *map2)
...
@@ -233,24 +233,24 @@ my_bool bitmap_cmp(const MY_BITMAP *map1, const MY_BITMAP *map2)
DBUG_ASSERT
(
map1
->
bitmap
&&
map2
->
bitmap
&&
DBUG_ASSERT
(
map1
->
bitmap
&&
map2
->
bitmap
&&
map1
->
bitmap_size
==
map2
->
bitmap_size
);
map1
->
bitmap_size
==
map2
->
bitmap_size
);
bitmap_lock
(
map1
);
bitmap_lock
(
(
MY_BITMAP
*
)
map1
);
bitmap_lock
(
map2
);
bitmap_lock
(
(
MY_BITMAP
*
)
map2
);
res
=
memcmp
(
map1
->
bitmap
,
map2
->
bitmap
,
map1
->
bitmap_size
)
==
0
;
res
=
memcmp
(
map1
->
bitmap
,
map2
->
bitmap
,
map1
->
bitmap_size
)
==
0
;
bitmap_unlock
(
map2
);
bitmap_unlock
(
(
MY_BITMAP
*
)
map2
);
bitmap_unlock
(
map1
);
bitmap_unlock
(
(
MY_BITMAP
*
)
map1
);
return
res
;
return
res
;
}
}
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
;
uint
len
=
map
->
bitmap_size
,
len2
=
map2
->
bitmap
_size
;
DBUG_ASSERT
(
map
->
bitmap
&&
map2
->
bitmap
);
DBUG_ASSERT
(
map
->
bitmap
&&
map2
->
bitmap
);
bitmap_lock
(
map
);
bitmap_lock
(
map
);
bitmap_lock
(
map2
);
bitmap_lock
(
(
MY_BITMAP
*
)
map2
);
end
=
to
+
min
(
len
,
len2
);
end
=
to
+
min
(
len
,
len2
);
...
@@ -264,7 +264,7 @@ void bitmap_intersect(MY_BITMAP *map, const MY_BITMAP *map2)
...
@@ -264,7 +264,7 @@ void bitmap_intersect(MY_BITMAP *map, const MY_BITMAP *map2)
*
to
++=
0
;
*
to
++=
0
;
}
}
bitmap_unlock
(
map2
);
bitmap_unlock
(
(
MY_BITMAP
*
)
map2
);
bitmap_unlock
(
map
);
bitmap_unlock
(
map
);
}
}
...
@@ -275,14 +275,14 @@ void bitmap_subtract(MY_BITMAP *map, const MY_BITMAP *map2)
...
@@ -275,14 +275,14 @@ void bitmap_subtract(MY_BITMAP *map, const MY_BITMAP *map2)
DBUG_ASSERT
(
map
->
bitmap
&&
map2
->
bitmap
&&
DBUG_ASSERT
(
map
->
bitmap
&&
map2
->
bitmap
&&
map
->
bitmap_size
==
map2
->
bitmap_size
);
map
->
bitmap_size
==
map2
->
bitmap_size
);
bitmap_lock
(
map
);
bitmap_lock
(
map
);
bitmap_lock
(
map2
);
bitmap_lock
(
(
MY_BITMAP
*
)
map2
);
end
=
to
+
map
->
bitmap_size
;
end
=
to
+
map
->
bitmap_size
;
while
(
to
<
end
)
while
(
to
<
end
)
*
to
++
&=
~
(
*
from
++
);
*
to
++
&=
~
(
*
from
++
);
bitmap_unlock
(
map2
);
bitmap_unlock
(
(
MY_BITMAP
*
)
map2
);
bitmap_unlock
(
map
);
bitmap_unlock
(
map
);
}
}
...
@@ -293,14 +293,14 @@ void bitmap_union(MY_BITMAP *map, const MY_BITMAP *map2)
...
@@ -293,14 +293,14 @@ void bitmap_union(MY_BITMAP *map, const MY_BITMAP *map2)
DBUG_ASSERT
(
map
->
bitmap
&&
map2
->
bitmap
&&
DBUG_ASSERT
(
map
->
bitmap
&&
map2
->
bitmap
&&
map
->
bitmap_size
==
map2
->
bitmap_size
);
map
->
bitmap_size
==
map2
->
bitmap_size
);
bitmap_lock
(
map
);
bitmap_lock
(
map
);
bitmap_lock
(
map2
);
bitmap_lock
(
(
MY_BITMAP
*
)
map2
);
end
=
to
+
map
->
bitmap_size
;
end
=
to
+
map
->
bitmap_size
;
while
(
to
<
end
)
while
(
to
<
end
)
*
to
++
|=
*
from
++
;
*
to
++
|=
*
from
++
;
bitmap_unlock
(
map2
);
bitmap_unlock
(
(
MY_BITMAP
*
)
map2
);
bitmap_unlock
(
map
);
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