• unknown's avatar
    2 small fixes for binlog (sorry for grouping them - I won't do it again): · 888f2fce
    unknown authored
    WL#2335 (wait if binlog or binlog index file hits disk full or quota exceeded),
    fix for BUG#7236 ("--expire_logs_days does not apply if all statements
    happen in transactions"), and a behaviour change: abort if mysqld can't start
    binlog at startup (if running with --log-bin of course).
    
    
    sql/log.cc:
      2 small fixes for binlog:
      1) We create binlog and binlog index file with flag MY_WAIT_IF_FULL, so that they have the same
      behaviour as MyISAM tables when disk is full or quota exceeded (wait, try to finish write
      every minute, warn in error log every 10 minutes). That's WL#2335.
      2) Honour expire-log-days when we write a transaction to binlog (we honoured it already when writing
      an autocommit statement). This fixes BUG#7236.
    sql/mysqld.cc:
      If we fail to create binlog or binlog index file or write to them at mysqld's startup, mysqld
      will exit. The former behaviour was to print error and continue, which led to stupid things like
      if you mispell a directory name in --log-bin, you don't immediately notice your mistake and
      you corrupt your recovery/replication. New behaviour is consistent with if you mispelt innodb_data_file_path.
    888f2fce
log.cc 65.1 KB