Commit 2286b96c authored by unknown's avatar unknown

propagation to maria_repair_by_sort() and maria_repair_parallel()

of bugfix made to maria_repair() yesterday.
Fail "bk delta" (and thus "bk citool") if an added or modified line
of a C/C++ file has white space at end of line


BitKeeper/triggers/pre-delta:
  detection gave false alarm on added newline
storage/maria/ma_check.c:
  propagation to maria_repair_by_sort() and maria_repair_parallel()
  of bugfix made to maria_repair() yesterday. No effect now as
  those two repair variants are never used with BLOCK_RECORD.
parent 08ade1ea
...@@ -20,3 +20,18 @@ then ...@@ -20,3 +20,18 @@ then
exit 1 exit 1
fi fi
# detect if C/C++ files have new trailing white space
trailingblank=`echo $BK_FILE | egrep '\.(c|.h)'`
if [ -n "$trailingblank" ]
then
trailingblank=`bk diffs $BK_FILE | grep '^> .*[[:space:]]$'`
if [ -n "$trailingblank" ]
then
echo "bk diffs $BK_FILE | grep '^> .*[[:space:]]$'"
echo "reported white space at end of some added/modified lines"
echo ""
echo "Checkin FAILED!"
echo "Fix the problem and retry."
exit 1
fi
fi
...@@ -2752,6 +2752,10 @@ int maria_repair_by_sort(HA_CHECK *param, register MARIA_HA *info, ...@@ -2752,6 +2752,10 @@ int maria_repair_by_sort(HA_CHECK *param, register MARIA_HA *info,
if (info->s->options & (HA_OPTION_CHECKSUM | HA_OPTION_COMPRESS_RECORD)) if (info->s->options & (HA_OPTION_CHECKSUM | HA_OPTION_COMPRESS_RECORD))
param->testflag|=T_CALC_CHECKSUM; param->testflag|=T_CALC_CHECKSUM;
if (_ma_flush_table_files(info, MARIA_FLUSH_DATA, FLUSH_FORCE_WRITE,
FLUSH_KEEP))
goto err;
if (!(sort_info.key_block= if (!(sort_info.key_block=
alloc_key_blocks(param, alloc_key_blocks(param,
(uint) param->sort_key_blocks, (uint) param->sort_key_blocks,
...@@ -3173,6 +3177,10 @@ int maria_repair_parallel(HA_CHECK *param, register MARIA_HA *info, ...@@ -3173,6 +3177,10 @@ int maria_repair_parallel(HA_CHECK *param, register MARIA_HA *info,
if (info->s->options & (HA_OPTION_CHECKSUM | HA_OPTION_COMPRESS_RECORD)) if (info->s->options & (HA_OPTION_CHECKSUM | HA_OPTION_COMPRESS_RECORD))
param->testflag|=T_CALC_CHECKSUM; param->testflag|=T_CALC_CHECKSUM;
if (_ma_flush_table_files(info, MARIA_FLUSH_DATA, FLUSH_FORCE_WRITE,
FLUSH_KEEP))
goto err;
/* /*
Quick repair (not touching data file, rebuilding indexes): Quick repair (not touching data file, rebuilding indexes):
{ {
......
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