1. 15 Mar, 2017 5 commits
  2. 14 Mar, 2017 2 commits
  3. 13 Mar, 2017 4 commits
  4. 12 Mar, 2017 5 commits
  5. 11 Mar, 2017 4 commits
  6. 10 Mar, 2017 7 commits
  7. 09 Mar, 2017 8 commits
    • Vladislav Vaintroub's avatar
      Add SRV_ALL_O_DIRECT_FSYNC to switch(srv_flush_method) in log0log.c. · 9928dbe5
      Vladislav Vaintroub authored
      Also in log_checkpoint(), where fil_flush_file_spaces() was
      not done on Windows, it is not done.
      9928dbe5
    • Vladislav Vaintroub's avatar
      MDEV-12201 innodb_flush_method are not available on Windows · a98009ab
      Vladislav Vaintroub authored
       Remove srv_win_file_flush_method
      
      - Rename srv_unix_file_flush_method to srv_file_flush_method, and
        rename constants to remove UNIX from them, i.e SRV_UNIX_FSYNC=>SRV_FSYNC
      
      - Add SRV_ALL_O_DIRECT_FSYNC corresponding to current Windows default
      (no buffering for either log or data, flush on both log and data)
      
      - change os_file_open on Windows to behave identically to Unix wrt
      O_DIRECT and O_DSYNC settings. map O_DIRECT to FILE_FLAG_NO_BUFFERING and
      O_DSYNC to FILE_FLAG_WRITE_THROUGH
      
      - remove various #ifdef _WIN32
      a98009ab
    • Oleksandr Byelkin's avatar
      MDEV-11363: Assertion `!derived->first_sel ect()->first_inner_unit() ||... · 8e05953d
      Oleksandr Byelkin authored
      MDEV-11363: Assertion `!derived->first_sel ect()->first_inner_unit() || derived->first_select()->first_inner_unit()->first_select()-> exclude_from_table_unique_test' failed in TABLE_LIST::set_check_materialized()
      
      Do not try to materialize derived table which already merged (irreversebly).
      8e05953d
    • Marko Mäkelä's avatar
      70a0500d
    • Marko Mäkelä's avatar
      Simplify InnoDB startup. · 7a30d86e
      Marko Mäkelä authored
      InnoDB needs to collect transactions from the persistent data files
      in trx_rseg_array_init() before trx_lists_init_at_db_start() is
      executed. But there is no need to create purge_sys->purge_queue
      separately from purge_sys.
      
      trx_sys_init_at_db_start(): Change the return type to void.
      Remove the direct call to trx_rseg_array_init(). It will be called
      by trx_lists_init_at_db_start(), which we are calling.
      Initialize the purge system read view.
      
      trx_lists_init_at_db_start(): Call trx_purge_sys_create(), which will
      invoke trx_rseg_array_init() to read the undo log segments.
      
      trx_purge_sys_create(): Remove the parameters. Do not initialize
      the purge system read view, because trx_sys->rw_trx_list has not
      been recovered yet. The purge_sys->view will be initialized at
      the end of trx_sys_init_at_db_start().
      
      trx_rseg_array_init(): Remove the parameter. Use purge_sys->purge_queue
      directly.
      
      innobase_start_or_create_for_mysql(): Remove the local variable
      purge_queue. Do not call trx_purge_sys_create(), because it will be
      called by trx_sys_init_at_db_start().
      7a30d86e
    • Marko Mäkelä's avatar
      Remove trx_sys_t::pending_purge_rseg_array. · 15bdfeeb
      Marko Mäkelä authored
      In MySQL 5.7, there is some redundant code for supposedly handling
      an upgrade from an earlier version of InnoDB.
      
      An upgrade of InnoDB between major versions should include a
      slow shutdown (innodb_fast_shutdown=0) of the previous version.
      
      A comment in trx_lists_init_at_db_start() confused clean shutdown
      and slow shutdown. A clean shutdown does not necessarily guarantee
      that there are no active transactions. A slow shutdown guarantees
      that.
      
      Because there was no code to handle rollback of recovered transactions
      that happened to use the rollback segment slots that MySQL 5.7.2
      repurposed for temporary undo logs, the upgrade is not working in all
      cases, and we may as well remove the code to handle purging.
      
      trx_sys_t::pending_purge_rseg_array: Remove.
      
      trx_undo_get_undo_rec_low(): Define as static. Remove the parameter
      is_redo_rseg.
      
      trx_undo_get_undo_rec(), trx_rseg_get_on_id(): Remove the parameter
      is_redo_rseg.
      
      trx_rseg_mem_free(): Remove the second parameter.
      
      trx_sys_get_nth_rseg(): Replace with trx_rseg_get_on_id().
      
      trx_rseg_schedule_pending_purge(): Remove.
      15bdfeeb
    • Oleksandr Byelkin's avatar
      MDEV-11966: Impossible to execute prepared ANALYZE SELECT · 24cbc8da
      Oleksandr Byelkin authored
      Prepare os ANALYZE now respond as EXPLAIN.
      24cbc8da
    • Marko Mäkelä's avatar
      enum btr_latch_mode: Incorporate some flags. · 5ff6694d
      Marko Mäkelä authored
      This fixes some GCC 6.3.0 warnings and makes the code a little
      more debugging-friendly.
      5ff6694d
  8. 08 Mar, 2017 5 commits
    • Vladislav Vaintroub's avatar
    • Marko Mäkelä's avatar
      MDEV-11688 follow-up: More robust shutdown after aborted startup. · 29a980cf
      Marko Mäkelä authored
      After starting MariaDB 10.2 with an invalid value of
      --innodb-flush-method= (the empty string), shutdown would
      attempt to dereference some NULL pointers. This was probably broken
      in commit 81b7fe9d which implemented
      shutdown after aborted startup.
      
      logs_empty_and_mark_files_at_shutdown(): Allow shutdown even if
      lock_sys, log_sys, or fil_system is NULL.
      
      os_aio_free(): Tolerate os_aio_segment_wait_events==NULL.
      
      innobase_start_or_create_for_mysql(): Do not invoke
      srv_init_abort() before initializing all mutexes for the temporary files.
      
      innodb_shutdown(): Tolerate buf_pool_ptr==NULL.
      29a980cf
    • Marko Mäkelä's avatar
      MDEV-11027 InnoDB log recovery is too noisy · 5da6bd7b
      Marko Mäkelä authored
      Provide more useful progress reporting of crash recovery.
      
      recv_sys_t::progress_time: The time of the last report.
      
      recv_sys_t::report(ib_time_t): Determine whether progress should
      be reported.
      
      recv_scan_print_counter: Remove.
      
      log_group_read_log_seg(): After after each I/O request, invoke
      recv_sys_t::report() and report progress if needed.
      
      recv_apply_hashed_log_recs(): Change the return type back to void
      (DB_SUCCESS was always returned), and rename the parameter to last_batch.
      At the start of each batch, if there are pages to be recovered,
      issue a message.
      5da6bd7b
    • Oleksandr Byelkin's avatar
      MDEV-10704: Assertion `field->field->table == table_arg' failed in... · 0b1abc2f
      Oleksandr Byelkin authored
      MDEV-10704: Assertion `field->field->table == table_arg' failed in fill_record(THD*, TABLE*, List<Item>&, List<Item>&, bool, bool)
      
      the bug test suite
      0b1abc2f
    • Daniel Black's avatar
      Whitespace correction to avoid compile warning · 8c3b98fe
      Daniel Black authored
      Introduced 2f63e2e2
      
      Compiler error was:
      
      sql/log_event.cc: In function ‘size_t log_event_print_value(IO_CACHE*, const uchar*, uint, uint, char*, size_t)’:
      sql/log_event.cc:2897:7: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
             if (!ptr)
             ^~
      sql/log_event.cc:2900:9: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the ‘if’
               int32 i32= uint2korr(ptr);
               ^~~~~
      
      Added in 950abd52
      
      Error was:
      
      sql/item_sum.cc:3478:5: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
           if ((!args[i]->fixed &&
           ^~
      /sql/item_sum.cc:3482:7: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the ‘if’
             with_subselect|= args[i]->with_subselect;
             ^~~~~~~~~~~~~~
      Signed-off-by: default avatarDaniel Black <daniel.black@au.ibm.com>
      8c3b98fe