1. 29 Dec, 2017 1 commit
  2. 25 Dec, 2017 2 commits
  3. 23 Dec, 2017 1 commit
  4. 22 Dec, 2017 7 commits
    • Monty's avatar
      Initialize MYSQL_LOCK->flags variable · 52c40b40
      Monty authored
      This could crash in mysql_unlock_tables in servers compiled with DBUG
      52c40b40
    • Monty's avatar
      Fixed compiler warnings in guess_malloc_library · 1d9fd4fa
      Monty authored
      1d9fd4fa
    • Monty's avatar
      Fixed failures in innodb tests caused by not flushed restart · d9e90292
      Monty authored
      - Fixed innodb.recovery_shutdown.test
      - Fixed innodb.instant_alter_rollback
      d9e90292
    • Monty's avatar
      MDEV 13679 Enabled sequences to be used in DEFAULT · 9cc7789e
      Monty authored
      Other changes done to get this to work:
      - Added 'internal_tables' to TABLE object to list which sequence tables
        is needed to use the table.
      - Mark any expression using DEFAULT() with LEX->default_used.
        This is needed when deciding if we should open internal sequence
        tables when a table is opened (we don't need to open sequence tables
        if the main table is only used with SELECT).
      - Create_and_open_temporary_table() can now also open all internal
        sequence tables.
      - Added option MYSQL_LOCK_USE_MALLOC to mysql_lock_tables()
        to force memory allocation to be used with malloc instead of
        memroot.
      - Added flag to MYSQL_LOCK to remember if allocation was done with
        malloc or memroot (makes code simpler and safer).
      - init_one_table_for_prelocking() now takes argument for what lock to
        use instead of it's a routine or something else.
      - Renamed prelocking placeholders to make them more understandable as
        they are now used in more code.
      - Changed test in check_lock_and_start_stmt() if found table has correct
        locks. The old test didn't work for tables that has lock
        TL_WRITE_ALLOW_WRITE, which is what sequence tables are using.
      - Added VCOL_NOT_VIRTUAL option to ensure that sequence functions can't
        be used with virtual columns
      - More sequence tests
      9cc7789e
    • Monty's avatar
      Added CHECK_FIELD_EXPRESSION · 5b4c8469
      Monty authored
      This is needed for MDEV 13679 Enabled sequences to be used in DEFAULT
      
      Added new option for count_cuted_fields: CHECK_FIELD_EXPRESSION
      which is used to check if a DEFAULT expression is correct before
      ALTER TABLE starts
      
      Changed also all test:
        if (thd->count_cuted_fields)
        to
        if (thd->count_cuted_fields > CHECK_FIELD_EXPRESSION)
      5b4c8469
    • Monty's avatar
      Re-enable 'S' for --debug (sf_sanity checking for each call) · 139e8afc
      Monty authored
      - Fixed also a wrong comment and a wrong argument to printf
      139e8afc
    • Sergey Vojtovich's avatar
      MDEV-14477 InnoDB update_time is wrongly updated after partial rollback or internal COMMIT · 1464f480
      Sergey Vojtovich authored
      This is partial revert of original patch.
      
      Read-only transactions that modified temporary tables are added to
      trx_sys_t::rw_trx_ids and trx_sys_t::rw_trx_set. However with patch for
      MDEV-14477 they were not removed.
      
      Restore old behaviour in this regard.
      1464f480
  5. 21 Dec, 2017 3 commits
  6. 20 Dec, 2017 5 commits
    • Marko Mäkelä's avatar
      Merge bb-10.2-ext into 10.3 · 1ec8d45c
      Marko Mäkelä authored
      1ec8d45c
    • Marko Mäkelä's avatar
      69e88de0
    • Marko Mäkelä's avatar
      MDEV-14585 Automatically remove #sql- tables in InnoDB dictionary during recovery · b4165985
      Marko Mäkelä authored
      Now that MDEV-14717 made RENAME TABLE crash-safe within InnoDB,
      it should be safe to drop the #sql- tables within InnoDB during
      crash recovery. These tables can be one of two things:
      
      (1) #sql-ib related to deferred DROP TABLE (follow-up to MDEV-13407)
      or to table-rebuilding ALTER TABLE...ALGORITHM=INPLACE
      (since MDEV-14378, only related to the intermediate copy of a table),
      
      (2) #sql- related to the intermediate copy of a table during
      ALTER TABLE...ALGORITHM=COPY
      
      We will not drop tables whose name starts with #sql2, because
      the server can be killed during an ALGORITHM=COPY operation at
      a point where the original table was renamed to #sql2 but the
      finished intermediate copy was not yet renamed from #sql-
      to the original table name.
      b4165985
    • Marko Mäkelä's avatar
      Merge bb-10.2-ext into 10.3 · 2534b5cb
      Marko Mäkelä authored
      2534b5cb
    • Marko Mäkelä's avatar
      MDEV-14717 RENAME TABLE in InnoDB is not crash-safe · 0bc36758
      Marko Mäkelä authored
      InnoDB in MariaDB 10.2 appears to only write MLOG_FILE_RENAME2
      redo log records during table-rebuilding ALGORITHM=INPLACE operations.
      We must write the records for any .ibd file renames, so that the
      operations are crash-safe.
      
      If InnoDB is killed during a RENAME TABLE operation, it can happen that
      the transaction for updating the data dictionary will be rolled back.
      But, nothing will roll back the renaming of the .ibd file
      (the MLOG_FILE_RENAME2 only guarantees roll-forward), or for that matter,
      the renaming of the dict_table_t::name in the dict_sys cache. We introduce
      the undo log record TRX_UNDO_RENAME_TABLE to fix this.
      
      fil_space_for_table_exists_in_mem(): Remove the parameters
      adjust_space, table_id and some code that was trying to work around
      these deficiencies.
      
      fil_name_write_rename(): Write a MLOG_FILE_RENAME2 record.
      
      dict_table_rename_in_cache(): Invoke fil_name_write_rename().
      
      trx_undo_rec_copy(): Set the first 2 bytes to the length of the
      copied undo log record.
      
      trx_undo_page_report_rename(), trx_undo_report_rename():
      Write a TRX_UNDO_RENAME_TABLE record with the old table name.
      
      row_rename_table_for_mysql(): Invoke trx_undo_report_rename()
      before modifying any data dictionary tables.
      
      row_undo_ins_parse_undo_rec(): Roll back TRX_UNDO_RENAME_TABLE
      by invoking dict_table_rename_in_cache(), which will take care
      of both renaming the table and the file.
      0bc36758
  7. 19 Dec, 2017 14 commits
  8. 18 Dec, 2017 7 commits
    • Andrei Elkin's avatar
      MDEV-13073. rpl.perf_buildin_semisync_issue40 is corrected to expect the... · ca9ed393
      Andrei Elkin authored
      MDEV-13073. rpl.perf_buildin_semisync_issue40 is corrected to expect the Rpl_semi_sync_master_clients value of 1 (ll.307..). Explicit sleeps are converted to wait_xyz.
      ca9ed393
    • Marko Mäkelä's avatar
      Merge 10.0 into 10.1 · 09c5bbf4
      Marko Mäkelä authored
      09c5bbf4
    • Marko Mäkelä's avatar
      MDEV-13407 innodb.drop_table_background failed in buildbot with "Tablespace for table exists" · 40088bfc
      Marko Mäkelä authored
      The InnoDB background DROP TABLE queue is something that we should
      really remove, but are unable to until we remove dict_operation_lock
      so that DDL and DML operations can be combined in a single transaction.
      
      Because the queue is not persistent, it is not crash-safe. In stable
      versions of MariaDB, we can only try harder to drop all enqueued
      tables before server shutdown.
      
      row_mysql_drop_t::table_id: Replaces table_name.
      
      row_drop_tables_for_mysql_in_background():
      Do not remove the entry from the list as long as the table exists.
      In this way, the table should eventually be dropped.
      40088bfc
    • Nirbhay Choubey's avatar
      MDEV-10442: "Address already in use" on restart · 682c3bfd
      Nirbhay Choubey authored
      SST processes should inherit mysqld's process group.
      682c3bfd
    • sjaakola's avatar
      MW-416 · 91daf881
      sjaakola authored
      Moved TOI replication to happen after ACL checking for commands:
      SQLCOM_CREATE_EVENT
      SQLCOM_ALTER_EVENT
      SQLCOM_DROP_EVENT
      SQLCOM_CREATE_VIEW
      SQLCOM_CREATE_TRIGGER
      SQLCOM_DROP_TRIGGER
      SQLCOM_INSTALL_PLUGIN
      SQLCOM_UNINSTALL_PLUGIN
      91daf881
    • Sergei Golubchik's avatar
      MDEV-13969 sst mysqldump and xtrabackup-v2 handle WSREP_SST_OPT_CONF incorrectly · beabe6b2
      Sergei Golubchik authored
      $WSREP_SST_OPT_CONF already includes --defaults-extra-file= prefix.
      beabe6b2
    • Martynas Bendorius's avatar
      MDEV-13969 sst mysqldump and xtrabackup-v2 handle WSREP_SST_OPT_CONF incorrectly · 1c2f59f7
      Martynas Bendorius authored
      wrep_sst_common: Setting "-c ''" for my_print_defaults just takes no values from config at all. $MY_PRINT_DEFAULTS is already set at the top of the script to have --defaults-file and --defaults-extra-file. If WSREP_SST_OPT_CONF if set to "--defaults-file=/etc/my.cnf --defaults-extra-file=/etc/my.extra.cnf", then "my_print_defaults -c "" --defaults-file=/etc/my.cnf" succeeds, but if WSREP_SST_OPT_CONF is empty - no default values are taken at all.
      wsrep_sst_xtrabackup-v2: innobackupex does not support --defaults-extra-file, so ${WSREP_SST_OPT_CONF} cannot be used as an argument, it has been changed to ${WSREP_SST_OPT_DEFAULT}. Removed --defaults-file= from INNOMOVE line, because WSREP_SST_OPT_CONF already includes it (INNOBACKUP was fine, INNOMOVE - not).
      1c2f59f7