1. 27 Oct, 2020 4 commits
    • Sergei Golubchik's avatar
      cleanup: have_static_innodb.inc · a7d5e85c
      Sergei Golubchik authored
      and remove unused files
      a7d5e85c
    • Karthik Kamath's avatar
      BUG#31650096: MYSQL SERVER HEAP-USE-AFTER-FREE IN TRANS_SAVEPOINT · 1269fd42
      Karthik Kamath authored
      ANALYSIS:
      =========
      During Bootstrap, while executing the statements from sql
      file passed to the init-file server option, transaction
      mem_root was being freed for every statement. This creates
      an issue with multi statement transactions especially when a
      statement in the transaction has to access the memory used
      by the previous statement in the transaction.
      
      FIX:
      ====
      Transaction mem_root is freed whenever a transaction is
      committed or rolled-back. Hence explicitly freeing it is not
      necessary in the bootstrap implementation.
      
      Change-Id: I40f71d49781bf7ad32d474bb176bd6060c9377dc
      1269fd42
    • Sergei Golubchik's avatar
      Bug#31304432 "INSUFFICIENT PRIVILEGE CHECK BY LOCK TABLES" · 0c3723e1
      Sergei Golubchik authored
      `LOCK TABLES view_name` should require
      * invoker to have SELECT and LOCK TABLES privileges on the view
      * either invoker or definer (only if sql security definer) to
        have SELECT and LOCK TABLES privileges on the used tables/views.
      0c3723e1
    • Sergei Golubchik's avatar
      cleanup: PRIV_LOCK_TABLES (10.5 style) · 320a73f6
      Sergei Golubchik authored
      320a73f6
  2. 26 Oct, 2020 1 commit
  3. 24 Oct, 2020 3 commits
  4. 23 Oct, 2020 1 commit
  5. 22 Oct, 2020 2 commits
    • Sergei Golubchik's avatar
      MDEV-23358 main.upgrade_MDEV-19650 fails with result difference · 897ea21e
      Sergei Golubchik authored
      When including a generated file, always use <...>.
      We need the compiler to find it in the BINDIR, not in the SRCDIR.
      But when including as "..." SRCDIR is always searched first.
      
      The bug can only happen in out-of-source builds, if there was an
      in-source build before.
      897ea21e
    • Sujatha's avatar
      MDEV-10149: sys_vars.rpl_init_slave_func fails sporadically in buildbot · 43ec9370
      Sujatha authored
      problem:
      ========
      mysqltest: In included file "./include/assert.inc":
      included from mysql-test/suite/sys_vars/t/rpl_init_slave_func.test at line 69:
      Assertion text: '@@global.max_connections = @start_max_connections'
      Assertion result: '0'
      
      
      mysqltest: In included file "./include/assert.inc":
      included from mysql-test/suite/sys_vars/t/rpl_init_slave_func.test at line 86:
      Assertion text: '@@global.max_connections = @start_max_connections + 1'
      Assertion result: '0'
      
      Analysis:
      =========
      A slave SQL thread sets its Running state to Yes very early in its
      initialisation, before the majority of initialisation actions, including
      executing the init_slave command, are done. Thus the testcase has a race
      condition where the initial replication setup might finish executing later
      than the testcase SET GLOBAL init_slave, making the testcase see its effect
      where it checks for its absence.
      
      Fix:
      ===
      Include 'sync_slave_sql_with_master.inc' at the beginning of the test to
      ensure that slave applier has completed the execution of 'init_slave' command
      and proceeded to event application. Replace the apparently needless RESET
      MASTER / RESET SLAVE etc.
      
      Patch is based on:
      https://github.com/percona/percona-server/pull/1464/commits/b91e2e6f90611aa299c302929fb8b068e8ac0dee
      Author: laurynas-biveinis
      43ec9370
  6. 21 Oct, 2020 3 commits
    • Daniel Black's avatar
      MDEV-23887: check_linker_flags correct for old cmake compatibility · b4c225ac
      Daniel Black authored
      It was only from CMake-3.14.0 that CMAKE_REQUIRED_LINK_OPTIONS
      was used in CHECK_CXX_SOURCE_COMPILES. Without this, it could be
      the case (as was on OSX) that a flag was never checked in
      CHECK_CXX_SOURCE_COMPILES, the CHECK successfully passed, but
      failed at link time.
      
      As such we use CMAKE_REQUIRED_LIBRARIES to include the flags to check
      as its compatible enough with the cmake versions for non-Windows
      compilers/linkers.
      
      Tested on x86_64 with:
      * 3.11.4
      * 3.17.4
      
      Corrects: 7473e184
      
      In the future:
      * cmake >=3.14.0 can use CMAKE_REQUIRED_LINK_OPTIONS
      * cmake >=3.18.0 can use CHECK_LINKER_FLAG (with policy CMP0057 NEW)
      (e.g: commit c7ac2deff9a2c965887dcc67cbf2a3a7c3e0123d)
      
      CMAKE_REQUIRED_LIBRARIES suggested by serg@mariadb.com
      
      Reviewed-by: anel@mariadb.org
      b4c225ac
    • Marko Mäkelä's avatar
      InnoDB 5.6.50 · 65b7f72b
      Marko Mäkelä authored
      The only applicable InnoDB change to MariaDB that was made
      between MySQL 5.6.49 and MySQL 5.6.50 is MDEV-23999.
      65b7f72b
    • Marko Mäkelä's avatar
      MDEV-23999 Potential stack overflow in InnoDB fulltext search · c7552969
      Marko Mäkelä authored
      fts_query_t::nested_sub_exp: Keep track of nested
      fts_ast_visit_sub_exp() calls.
      
      fts_ast_visit_sub_exp(): Return DB_OUT_OF_MEMORY if the
      maximum recursion depth is exceeded.
      
      This is motivated by a change in MySQL 5.6.50:
      mysql/mysql-server@e2a46b4834a0030e5380d45789772cb6beab6e92
      Bug #29929684 USING MANY NESTED ARGUMENTS WITH BOOLEAN FTS CAN LEAD
      TO TERMINATE SERVER
      c7552969
  7. 20 Oct, 2020 3 commits
    • Anel Husakovic's avatar
      Updated mtr help · 0627c4ae
      Anel Husakovic authored
      - Updated combination example to use `innodb_plugin`
      ```
      $ ./mysql-test/mtr rpl.rpl_invoked_features # no rpl.rpl_invoked_features,mix,xtradb_plugin
      
      worker[1] Using MTR_BUILD_THREAD 300, with reserved ports 16000..16019
      rpl.rpl_invoked_features 'innodb_plugin,mix' [ pass ]    904
      rpl.rpl_invoked_features 'mix,xtradb'    [ pass ]   1707
      rpl.rpl_invoked_features 'innodb_plugin,row' [ pass ]    927
      rpl.rpl_invoked_features 'row,xtradb'    [ pass ]    828
      rpl.rpl_invoked_features 'innodb_plugin,stmt' [ pass ]    855
      rpl.rpl_invoked_features 'stmt,xtradb'   [ pass ]    952
      --------------------------------------------------------------------------
      ```
      - `gdb` option can take optional gdb arguments (good documentation in
      KB)
      0627c4ae
    • Rucha Deodhar's avatar
      MDEV-5628: Assertion `! is_set()' or `!is_set() || (m_status == DA_OK_BULK && · 9fca6645
      Rucha Deodhar authored
      is_bulk_op())' fails on UPDATE on a partitioned table with subquery
      (MySQL:71630)
      
      Analysis and fix: Error is not checked. So correct error state is not returned.
      Fix: Check for error and return the error state.
      9fca6645
    • Rucha Deodhar's avatar
      MDEV-17729: Assertion `! is_set() || m_can_overwrite_status' failed in · d36cd5f0
      Rucha Deodhar authored
      Diagnostics_area::set_error_status
      
      Analysis: When strict mode is enabled, all warnings are converted to errors
      including those which do not occur because of bad data.
      Fix: Query should not be aborted when we have warning because limit to
      examine rows was reached because it doesn't happen due to bad data.
      So thd->abort_on_warning should be false.
      d36cd5f0
  8. 15 Oct, 2020 1 commit
  9. 14 Oct, 2020 1 commit
  10. 08 Oct, 2020 1 commit
  11. 07 Oct, 2020 5 commits
    • Daniel Black's avatar
      MDEV-4851: (tests) log tables modifiable on log_output!=TABLE · 874942a0
      Daniel Black authored
      Test we can ALTER log tables directly when not being written
      to.
      
      This removes the contraint in the rpl_mysql_upgrade.test such
      that we can run mysql_upgrade --write-binlog all the way
      through to a replica. We test this in the replication scenario
      where the mysql.{slow,general}_log tables aren't being
      written to.
      
      Reviewers: Vicențiu Ciorbaru, Anel Husakovic
      874942a0
    • Nisha Gopalakrishnan's avatar
      MDEV-4851: BUG#11763447: 'YOU CANNOT 'ALTER' A LOG TABLE IF LOGGING IS ENABLED' · 00c44fb1
      Nisha Gopalakrishnan authored
                     EVEN IF I LOG TO FILE.
      
      Analysis:
      ----------
      
      MYSQL_UPGRADE of the master breaks the replication when
      the query logging is enabled with FILE/NONE 'log-output'
      option on the slave.
      
      mysql_upgrade modifies the 'general_log' and 'slow_log'
      tables after the logging is disabled as below:
      
      SET @old_log_state = @@global.general_log;
      SET GLOBAL general_log = 'OFF';
      ALTER TABLE general_log
      MODIFY event_time TIMESTAMP NOT NULL,
      ( .... );
      SET GLOBAL general_log = @old_log_state;
      
      and
      
      SET @old_log_state = @@global.slow_query_log;
      SET GLOBAL slow_query_log = 'OFF';
      ALTER TABLE slow_log
      MODIFY start_time TIMESTAMP NOT NULL,
      ( .... );
      SET GLOBAL slow_query_log = @old_log_state;
      
      In the binary log, only the ALTER statements are logged
      but not the SET statements which turns ON/OFF the logging.
      So when the slave replays the binary log,the ALTER of LOG
      tables throws an error since the logging is enabled. Also
      the 'log-output' option is not checked to determine
      whether to allow/disallow the ALTER operation.
      
      Fix:
      ----
      The 'log-output' option is included in the check while
      determining whether the query logging happens using the
      log tables.
      
      Picked from mysql respository at 0daaf8aecd8f84ff1fb400029139222ea1f0d812
      00c44fb1
    • Sergei Golubchik's avatar
      Merge tag 'mariadb-10.1.47' into 10.1 · 83bd8ebf
      Sergei Golubchik authored
      83bd8ebf
    • Daniel Bartholomew's avatar
      bump the VERSION · 1a850225
      Daniel Bartholomew authored
      1a850225
    • Andrei Elkin's avatar
      MDEV-23832 Crash at startup in Log_event::read_log_event · 65c632cb
      Andrei Elkin authored
      The crash was caused by improper raising of an error or replication checksum
      verification at time of the server initialization. As there is no THD object
      associated with the main initializing thread yet the error text should be
      assigned with calling a respective macro that is aware of that possibility.
      
      Fixed accordingly.
      
      [At merging to 10.4 the new test result file needs
       +# restart: --master_verify_checksum=ON --debug_dbug=+d,corrupt_read_log_event_char
      that mtr run will hint on.]
      65c632cb
  12. 05 Oct, 2020 2 commits
  13. 02 Oct, 2020 1 commit
  14. 01 Oct, 2020 1 commit
  15. 30 Sep, 2020 1 commit
  16. 29 Sep, 2020 1 commit
  17. 28 Sep, 2020 2 commits
    • Thirunarayanan Balathandayuthapani's avatar
      MDEV-22277 LeakSanitizer: detected memory leaks in mem_heap_create_block_func... · fdb3c64e
      Thirunarayanan Balathandayuthapani authored
      MDEV-22277 LeakSanitizer: detected memory leaks in mem_heap_create_block_func after attempt to create foreign key
      
      - During online DDL, prepare phase error handler fails to remove
      the memory allocated for newly created foreign keys.
      fdb3c64e
    • Sujatha's avatar
      MDEV-22330: mysqlbinlog stops with an error Don't know how to handle column... · 15cd9195
      Sujatha authored
      MDEV-22330: mysqlbinlog stops with an error Don't know how to handle column type: 255 meta: 4 (0004)
      
      Analysis:
      ========
      "mysqlbinlog -v" option will reconstruct row events and display them as
      commented SQL statements. If this option is given twice, the output includes
      comments to indicate column data types and some metadata.
      `log_event_print_value` is the function reponsible for printing values and
      their types. This function doesn't handle GEOMETRY type. Hence the above error
      gets printed.
      
      Fix:
      ===
      Add support for GEOMETRY datatype.
      15cd9195
  18. 25 Sep, 2020 1 commit
  19. 24 Sep, 2020 1 commit
  20. 23 Sep, 2020 3 commits
  21. 22 Sep, 2020 1 commit
  22. 20 Sep, 2020 1 commit