summaryrefslogtreecommitdiff
path: root/storage/maria/ma_check.c
diff options
context:
space:
mode:
authorunknown <guilhem@gbichot4.local>2008-02-19 00:00:58 +0100
committerunknown <guilhem@gbichot4.local>2008-02-19 00:00:58 +0100
commit0ab7c2f3a834ea3fd6e0f1b1b2da511c4e0e97f2 (patch)
treea1a8c21e5474b1f95b6b21530ade595853f81767 /storage/maria/ma_check.c
parent34fff04d033e042ee89f7ffcd326285e59495c6a (diff)
downloadmariadb-git-0ab7c2f3a834ea3fd6e0f1b1b2da511c4e0e97f2.tar.gz
Merge from 5.1-build of the "my_bool for C" changeset.
Removing "#define bool BOOL" as it's dangerous. include/config-win.h: This #define was confusing: a) it changes the semantics of bool but only on Windows (C++ standard says that casting int to bool to int yields 0 or 1, but if using BOOL (which is int) this breaks, see old BUG 11567 "Variable 'foreign_key_checks', and other variables, differs binlog tests") b) it is not needed in C++ which has a bool type c) it is not needed in C where we must use my_bool as bool either does not exist or changes size between C and C++. storage/maria/ma_check.c: my_bool for C storage/maria/ma_dynrec.c: my_bool for C storage/maria/ma_search.c: my_bool for C storage/maria/ma_write.c: my_bool for C storage/maria/maria_def.h: my_bool for C storage/maria/maria_pack.c: my_bool for C
Diffstat (limited to 'storage/maria/ma_check.c')
-rw-r--r--storage/maria/ma_check.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/storage/maria/ma_check.c b/storage/maria/ma_check.c
index 7921af857be..a64e26ef781 100644
--- a/storage/maria/ma_check.c
+++ b/storage/maria/ma_check.c
@@ -1362,7 +1362,7 @@ static int check_compressed_record(HA_CHECK *param, MARIA_HA *info, int extend,
MARIA_SHARE *share= info->s;
my_off_t start_recpos, pos;
char llbuff[22];
- bool got_error= 0;
+ my_bool got_error= 0;
DBUG_ENTER("check_compressed_record");
pos= share->pack.header_length; /* Skip header */
@@ -4500,7 +4500,7 @@ static int sort_get_next_record(MARIA_SORT_PARAM *sort_param)
}
if (b_type & BLOCK_DELETED)
{
- bool error=0;
+ my_bool error=0;
if (block_info.block_len+ (uint) (block_info.filepos-pos) <
share->base.min_block_length)
{