1. 21 Mar, 2019 1 commit
  2. 11 Mar, 2019 1 commit
    • Sergey Vojtovich's avatar
      MDEV-17595 - ALTER TABLE ADD FOREIGN KEY crash · 149b7547
      Sergey Vojtovich authored
      ALTER TABLE ... ADD FOREIGN KEY may trigger assertion failure when
      it has LOCK=EXCLUSIVE clause or concurrent FLUSH TABLES is being
      executed.
      
      In both cases being altered table is marked as flushed, which forces
      subsequent attempt to open parent table to re-open. Which in turn is
      not allowed while transaction is running.
      
      Rather than opening parent table, just take appropriate MDL lock.
      
      Also removed table_already_fk_prelocked() check: MDL itself has much
      better methods to handle duplicate locks. E.g. the former won't acquire
      MDL_SHARED_NO_WRITE if it already has MDL_SHARED_READ.
      149b7547
  3. 07 Mar, 2019 2 commits
    • Marko Mäkelä's avatar
      Merge 5.5 into 10.0 · 0a0eed80
      Marko Mäkelä authored
      0a0eed80
    • Marko Mäkelä's avatar
      MDEV-18272 InnoDB fails to rollback after exceeding FOREIGN KEY recursion depth · 8024f8c6
      Marko Mäkelä authored
      row_mysql_handle_errors(): Correct the wrong error handling for
      the code DB_FOREIGN_EXCEED_MAX_CASCADE that was introduced in
      
      https://github.com/mysql/mysql-server/commit/c0923d396aef46799883390e9dcf7bbf173e4a03
      
          commit 35f5429e
          Author: Jimmy Yang <jimmy.yang@oracle.com>
          Date:   Wed Oct 6 06:55:34 2010 -0700
      
              Manual port Bug #Bug #54582 "stack overflow when opening many tables
              linked with foreign keys at once" from mysql-5.1-security to
              mysql-5.5-security again.
      
              rb://391 approved by Heikki
      
      No known test case exists for repeating the bug before MariaDB 10.2.
      The scenario should be that DB_FOREIGN_EXCEED_MAX_CASCADE is returned,
      then InnoDB wrongly skips the rollback to the start of the current
      row operation, and finally the SQL layer commits the transaction.
      Normally the SQL layer would roll back either the entire transaction or
      to the start of the statement. In the faulty scenario, InnoDB would
      leave the transaction in an inconsistent state, and the SQL layer could
      commit the transaction.
      8024f8c6
  4. 28 Feb, 2019 4 commits
  5. 07 Feb, 2019 1 commit
  6. 31 Jan, 2019 1 commit
  7. 30 Jan, 2019 2 commits
  8. 29 Jan, 2019 7 commits
  9. 28 Jan, 2019 9 commits
  10. 27 Jan, 2019 2 commits
    • Sergei Golubchik's avatar
      Crude "auto-load-data-local-infile" mode · 2175bfce
      Sergei Golubchik authored
      Disable LOAD DATA LOCAL INFILE suport by default and
      auto-enable it for the duration of one query, if the query
      string starts with the word "load". In all other cases the application
      should enable LOAD DATA LOCAL INFILE support explicitly.
      2175bfce
    • Vicențiu Ciorbaru's avatar
      MDEV-18360 Prevent set_max_open_files from allocating too many files · 21f90371
      Vicențiu Ciorbaru authored
      If the rlimit.rlim_cur value returned by getrlimit is not the
      RLIM_INFINITY magic constant, but a *very* large number, we can allocate
      too many open files. Restrict set_max_open_files to only return at most
      max_file_limit, as passed via its parameter.
      21f90371
  11. 25 Jan, 2019 3 commits
    • Olivier Bertrand's avatar
      Squashed commit of connect/10.0: · e6fcd723
      Olivier Bertrand authored
      commit 6a6a1f37798
      Author: Olivier Bertrand <bertrandop@gmail.com>
      Date:   Fri Jan 4 12:31:52 2019 +0100
      
          - Fix a few bug mainly concerning discovery and call from OEM
            (and prepare new table types)
      
            modified:   storage/connect/tabjson.cpp
            modified:   storage/connect/tabjson.h
            modified:   storage/connect/tabxml.cpp
            modified:   storage/connect/tabxml.h
      
          - Fix wrong line estimate
            modified:   storage/connect/mysql-test/connect/r/part_table.result
            modified:   storage/connect/mysql-test/connect/t/part_table.test
      
      commit bd7d2e912d9
      Author: Olivier Bertrand <bertrandop@gmail.com>
      Date:   Tue Dec 4 23:35:09 2018 +0100
      
          Fix wrong version number
      
      commit 4933680e7ab
      Author: Olivier Bertrand <bertrandop@gmail.com>
      Date:   Sun Dec 2 00:25:05 2018 +0100
      
          - Make PlugSubAlloc to be exportable
            Suppress unused parameter from PlugSubSet
            modified:   storage/connect/global.h
            modified:   storage/connect/plugutil.cpp
            modified:   storage/connect/jsonudf.cpp
            modified:   storage/connect/tabjson.cpp
            modified:   storage/connect/user_connect.cc
      
          - Fix a bug making column catalog XML tables fail
            modified:   storage/connect/tabxml.cpp
      
          - Comment out wrong message
            modified:   storage/connect/ha_connect.cc
      
          - Update error message when sorting an ODBC table fails
            modified:   storage/connect/tabodbc.cpp
      
          - Add error message when gettting an address
            from an OEM fails.
            modified:   storage/connect/reldef.cpp
      
          - Make some modifications useful for OEM module writting
            Export discovery functions for CSV, JDBC and XML
            Remove unuseful include from tabjson.h
            Move TDBXML::data_charset function from header file to source
            modified:   storage/connect/tabfmt.h
            modified:   storage/connect/tabjson.h
            modified:   storage/connect/tabxml.cpp
            modified:   storage/connect/tabxml.h
      
          - Update test result
            modified:   storage/connect/mysql-test/connect/r/jdbc_oracle.result
      e6fcd723
    • Sergei Golubchik's avatar
      cleanup: fill_alter_inplace_info · 38ad46e0
      Sergei Golubchik authored
      remove attempts to track "candidate keys", use what was already
      decided in create_table_impl().
      38ad46e0
    • Sergei Golubchik's avatar
      compiler warning · 013186eb
      Sergei Golubchik authored
      013186eb
  12. 24 Jan, 2019 6 commits
  13. 23 Jan, 2019 1 commit
    • Eugene Kosov's avatar
      MDEV-16658 Memory leak in mysqltest on connect failure · ad220b96
      Eugene Kosov authored
      Close connection handler on connection failure. This fixes 14 failing tests in
      main suite under clang+ASAN build.
      
      ASAN report for main.connect looks like this:
      =================================================================
      ==25495==ERROR: LeakSanitizer: detected memory leaks
      
      Direct leak of 146280 byte(s) in 115 object(s) allocated from:
          #0 0x4fba47 in calloc /fun/cpp_projects/llvm_toolchain/llvm/projects/compiler-rt/lib/asan/asan_malloc_linux.cc:138
          #1 0x5a7a02 in mysql_init /work/mariadb/libmariadb/libmariadb/mariadb_lib.c:977:26
          #2 0x570a7a in do_connect(st_command*) /work/mariadb/client/mysqltest.cc:6096:26
          #3 0x584c39 in main /work/mariadb/client/mysqltest.cc:9321:9
          #4 0x7fd15514db96 in __libc_start_main /build/glibc-OTsEL5/glibc-2.27/csu/../csu/libc-start.c:310
      
      Indirect leak of 7065600 byte(s) in 115 object(s) allocated from:
          #0 0x4fb80f in __interceptor_malloc /fun/cpp_projects/llvm_toolchain/llvm/projects/compiler-rt/lib/asan/asan_malloc_linux.cc:129
          #1 0x637a83 in my_context_init /work/mariadb/libmariadb/libmariadb/ma_context.c:367:23
          #2 0x59fd16 in mysql_optionsv /work/mariadb/libmariadb/libmariadb/mariadb_lib.c:2738:9
          #3 0x5bc1d4 in mysql_options /work/mariadb/libmariadb/libmariadb/mariadb_lib.c:3242:10
          #4 0x570b94 in do_connect(st_command*) /work/mariadb/client/mysqltest.cc:6103:7
          #5 0x584c39 in main /work/mariadb/client/mysqltest.cc:9321:9
          #6 0x7fd15514db96 in __libc_start_main /build/glibc-OTsEL5/glibc-2.27/csu/../csu/libc-start.c:310
      
      Indirect leak of 940240 byte(s) in 115 object(s) allocated from:
          #0 0x4fb80f in __interceptor_malloc /fun/cpp_projects/llvm_toolchain/llvm/projects/compiler-rt/lib/asan/asan_malloc_linux.cc:129
          #1 0x64386e in ma_init_dynamic_array /work/mariadb/libmariadb/libmariadb/ma_array.c:49:31
          #2 0x649ead in _hash_init /work/mariadb/libmariadb/libmariadb/ma_hash.c:52:7
          #3 0x5a3080 in mysql_optionsv /work/mariadb/libmariadb/libmariadb/mariadb_lib.c:2938:13
          #4 0x5bc20c in mysql_options4 /work/mariadb/libmariadb/libmariadb/mariadb_lib.c:3248:10
          #5 0x56f63b in connect_n_handle_errors(st_command*, st_mysql*, char const*, char const*, char const*, char const*, int, char const*) /work/mariadb/client/mysqltest.cc:5874:3
          #6 0x57146b in do_connect(st_command*) /work/mariadb/client/mysqltest.cc:6193:7
          #7 0x584c39 in main /work/mariadb/client/mysqltest.cc:9321:9
          #8 0x7fd15514db96 in __libc_start_main /build/glibc-OTsEL5/glibc-2.27/csu/../csu/libc-start.c:310
      ...
      
      Closes #809
      ad220b96