Commit 87aa4ae2 authored by unknown's avatar unknown

just comment changes and line formatting changes.


storage/maria/checkpoint.c:
  comments
storage/maria/least_recently_dirtied.c:
  comments
storage/maria/ma_check.c:
  line formatting changes neglected from my last merge
storage/maria/ma_ft_parser.c:
  it reduces the diff of MyISAM vs Maria :)
storage/maria/recovery.c:
  comments
parent e8524352
......@@ -46,7 +46,8 @@ CHECKPOINT_LEVEL synchronous_checkpoint_in_progress= NONE;
/*
Used by MySQL client threads requesting a checkpoint (like "ALTER MARIA
ENGINE DO CHECKPOINT"), and probably by maria_panic().
ENGINE DO CHECKPOINT"), and probably by maria_panic(), and at the end of the
UNDO recovery phase.
*/
my_bool execute_synchronous_checkpoint(CHECKPOINT_LEVEL level)
{
......@@ -342,8 +343,6 @@ log_write_record(...)
(requestor does not wait for completion, and does not even later check the
result).
In real life it will be called by log_write_record().
which explicitely wants to do checkpoint (ALTER ENGINE CHECKPOINT
checkpoint_level).
*/
void request_asynchronous_checkpoint(CHECKPOINT_LEVEL level);
{
......@@ -359,7 +358,8 @@ void request_asynchronous_checkpoint(CHECKPOINT_LEVEL level);
MAX_LOG_BYTES_WRITTEN_BETWEEN_CHECKPOINTS is passed), so it may not be a
good idea for each of them to broadcast a cond to wake up the background
checkpoint thread. We just don't broacast a cond, the checkpoint thread
will notice our request in max a few seconds.
(see least_recently_dirtied.c) will notice our request in max a few
seconds.
*/
checkpoint_request= level; /* post request */
}
......
......@@ -181,7 +181,15 @@ flush_one_group_from_LRD()
*/
}
/* flushes all page from LRD up to approximately rec_lsn>=max_lsn */
/*
Flushes all page from LRD up to approximately rec_lsn>=max_lsn.
This is approximate because we flush groups, and because the LRD list may
not be exactly sorted by rec_lsn (because for a big row, all pages of the
row are inserted into the LRD with rec_lsn being the LSN of the REDO for the
first page, so if there are concurrent insertions, the last page of the big
row may have a smaller rec_lsn than the previous pages inserted by
concurrent inserters).
*/
int flush_all_LRD_to_lsn(LSN max_lsn)
{
lock(global_LRD_mutex);
......@@ -191,7 +199,9 @@ int flush_all_LRD_to_lsn(LSN max_lsn)
{
if (flush_one_group_from_LRD()) /* will unlock LRD mutex */
return 1;
/* scheduler may preempt us here so that we don't take full CPU */
/*
The scheduler may preempt us here as we released the mutex; this is good.
*/
lock(global_LRD_mutex);
}
unlock(global_LRD_mutex);
......
......@@ -460,8 +460,8 @@ int maria_chk_key(HA_CHECK *param, register MARIA_HA *info)
auto_increment= ma_retrieve_auto_increment(info, info->rec_buff);
if (auto_increment > info->s->state.auto_increment)
{
_ma_check_print_warning(param,
"Auto-increment value: %s is smaller than max used value: %s",
_ma_check_print_warning(param, "Auto-increment value: %s is smaller "
"than max used value: %s",
llstr(info->s->state.auto_increment,buff2),
llstr(auto_increment, buff));
}
......@@ -481,8 +481,8 @@ int maria_chk_key(HA_CHECK *param, register MARIA_HA *info)
{
/* Don't count this as a real warning, as mariachk can't correct it */
uint save=param->warning_printed;
_ma_check_print_warning(param,
"Found row where the auto_increment column has the value 0");
_ma_check_print_warning(param, "Found row where the auto_increment "
"column has the value 0");
param->warning_printed=save;
}
maria_extra(info,HA_EXTRA_NO_KEYREAD,0);
......@@ -1165,7 +1165,8 @@ int maria_chk_data_link(HA_CHECK *param, MARIA_HA *info,int extend)
SEARCH_SAME, info->s->state.key_root[key]);
if (search_result)
{
_ma_check_print_error(param,"Record at: %10s Can't find key for index: %2d",
_ma_check_print_error(param,"Record at: %10s "
"Can't find key for index: %2d",
llstr(start_recpos,llbuff),key+1);
if (error++ > MAXERR || !(param->testflag & T_VERBOSE))
goto err2;
......
......@@ -204,8 +204,8 @@ byte maria_ft_simple_get_word(CHARSET_INFO *cs, byte **start, const byte *end,
FT_WORD *word, my_bool skip_stopwords)
{
byte *doc= *start;
int ctype;
uint mwc, length, mbl;
int ctype;
DBUG_ENTER("maria_ft_simple_get_word");
do
......
......@@ -221,10 +221,6 @@ int recovery()
/*
mark that checkpoint requests are now allowed.
*/
/*
when all rollback threads have terminated, somebody should print "rollback
finished" to the error log.
*/
}
pthread_handler_decl rollback_background_thread()
......@@ -248,13 +244,7 @@ pthread_handler_decl rollback_background_thread()
{
/*
All rollback threads are done. Print "rollback finished" to the error
log. The UNDO phase has the reputation of being a slow operation
(slower than the REDO phase), so taking a checkpoint at the end of it is
intelligent, but as this UNDO phase generates REDOs and CLR_ENDs, if it
did a lot of work then the "automatic checkpoint when much has been
written to the log" will do it; and if the UNDO phase didn't do a lot of
work, no need for a checkpoint. If we change our mind and want to force
a checkpoint at the end of the UNDO phase, simply call it here.
log and take a full checkpoint.
*/
}
unlock_mutex(rollback_threads);
......
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