1. 20 Apr, 2016 5 commits
    • Sergey Vojtovich's avatar
      MDEV-9943 - TokuDB fails to compile with gcc 5.2.1 · 0c0a865f
      Sergey Vojtovich authored
      For some reason check_cxx_compiler_flag() passes result variable name down to
      compiler:
      https://github.com/Kitware/CMake/blob/master/Modules/CheckCXXSourceCompiles.cmake#L57
      
      But compiler doesn't permit dashes in macro name, like in
      -DHAVE_CXX_-fimplicit-templates.
      
      Workarounded by renaming HAVE_CXX_-fimplicit-templates to
      HAVE_CXX_IMPLICIT_TEMPLAES.
      0c0a865f
    • Elena Stepanova's avatar
      MDEV-9953 Debian packages install broken 'maria' test suite which cannot be run · 62122ba5
      Elena Stepanova authored
      Debian packages create empty maria/t and maria/r directories,
      and MTR cannot run maria.* tests
      62122ba5
    • Alexander Barkov's avatar
      MDEV-9413 "datetime >= coalesce(c1(NULL))" doesn't return expected NULL · e90f8b7a
      Alexander Barkov authored
      The patch for MDEV-9521 earlier fixed the problem reported in MDEV-9413.
      Only adding tests.
      e90f8b7a
    • Alexander Barkov's avatar
      MDEV-9662 Assertion `precision || !scale' failed in... · 2564650f
      Alexander Barkov authored
      MDEV-9662 Assertion `precision || !scale' failed in my_decimal_precision_to_length_no_truncation(uint, uint8, bool)
      
      The patch for MDEV-9745 earlier fixed the problem reported in MDEV-9662 as well.
      Only adding tests.
      2564650f
    • Alexander Barkov's avatar
      MDEV-9745 Crash with CASE WHEN TRUE THEN COALESCE(CAST(NULL AS UNSIGNED)) ELSE 4 END · 9a987142
      Alexander Barkov authored
      This is a backport of the patch for MDEV-9653 (fixed earlier in 10.1.13).
      
      The code in Item_func_case::fix_length_and_dec() did not
      calculate max_length and decimals properly.
      
      In case of any numeric result (DECIMAL, REAL, INT) a generic method
      Item_func_case::agg_num_lengths() was called, which could erroneously result
      into a DECIMAL item with max_length==0 and decimals==0, so the constructor of
      Field_new_decimals tried to create a field of DECIMAL(0,0) type,
      which caused a crash.
      
      Unlike Item_func_case, the code responsible for merging attributes in
      Item_func_coalesce::fix_length_and_dec() works fine: it has specific execution
      branches for all distinct numeric types and correctly creates a DECIMAL(1,0)
      column instead of DECIMAL(0,0) for the same set of arguments.
      
      The fix does the following:
      - Moves the attribute merging code from Item_func_coalesce::fix_length_and_dec()
        to a new method Item_func_hybrid_result_type::fix_attributes()
      - Removes the wrong code from Item_func_case::fix_length_and_dec()
        and reuses fix_attributes() in both Item_func_coalesce::fix_length_and_dec()
        and Item_func_case::fix_length_and_dec()
      - Fixes count_real_length() and count_decimal_length() to get an array
        of Items as an argument, instead of using Item::args directly.
        This is needed for Item_func_case::fix_length_and_dec().
      - Moves methods Item_func::count_xxx_length() from "public" to "protected".
      - Removes Item_func_case::agg_num_length(), as it's not used any more.
      - Additionally removes Item_func_case::agg_str_length(),
        as it also was not used (dead code).
      9a987142
  2. 19 Apr, 2016 2 commits
  3. 18 Apr, 2016 1 commit
  4. 01 Apr, 2016 1 commit
  5. 18 Mar, 2016 1 commit
  6. 17 Mar, 2016 2 commits
  7. 26 Feb, 2016 1 commit
    • Elena Stepanova's avatar
      MDEV-4070 sys_vars.secure_file_priv fails sporadically if it's executed with --mem · c29e450e
      Elena Stepanova authored
      The test created a file in location relative to the datadir
      (a few levels above datadir).
      The file was created by MariaDB server (via INTO OUTFILE), and
      later removed by mysqltest (via remove_file). The problem is that
      when the vardir is a symlink, MariaDB server and mysqltest can
      resolve such paths differently. MariaDB server would return back
      to where the symlink is located, while mysqltest would go above
      the real directory. For example, if the test is run with --mem,
      and /bld/5.5/mysql-test/var points at /dev/shm/var_auto_X, then
      SELECT INTO OUTFILE created a file in /bld/5.5/mysql-test , but
      remove_file would look for it in /dev/shm/.
      
      The test is re-written so that all paths are resolved in perl,
      the logic itself hasn't changed.
      c29e450e
  8. 17 Feb, 2016 1 commit
  9. 15 Feb, 2016 6 commits
    • Vladislav Vaintroub's avatar
      fix buffer overrun · e1385f20
      Vladislav Vaintroub authored
      e1385f20
    • Sergei Golubchik's avatar
      more strict ipv6_ok check in mtr · 3889b19f
      Sergei Golubchik authored
      don't use ipv6 is the check fails for any reason. for example, an
      ancient solaris perl didn't have sockaddr_in6() in Socket at all.
      3889b19f
    • Sergei Golubchik's avatar
      fix my_gethwaddr() for solaris · 8f5030ea
      Sergei Golubchik authored
      it caused feedback plugin tests to fail
      8f5030ea
    • Sergei Golubchik's avatar
      dtrace in cmake · 95740bc5
      Sergei Golubchik authored
      1. ignore generated dtrace files
      2. don't rewrite probes_mysql_nodtrace.h in-place
      95740bc5
    • Sergei Golubchik's avatar
      better inline check · a5d9597e
      Sergei Golubchik authored
      1. check that unused inline functions are removed
      2. only allow compilation if they are or if the check if overridden
      3. with CMAKE_GENERATOR=Makefiles, use all flags when testing
         (e.g. both CMAKE_C_FLAGS and CMAKE_C_FLAGS_DEBUG if
         CMAKE_BUILD_TYPE=Debug). This is because
       - on Solaris with the SunPro compiler, default CMAKE_C_FLAGS_xxx
         values contain -xO2 (for Release and RelWithDebInfo)
         and -g (for RelWithDebInfo and Debug)
       - proper inlining only works at -xO4 without -g
       - so if CMAKE_C_FLAGS has -xO4, inlining would work in
         configure.cmake (before this fix) and fail during actual compilation
      
      also remove the outdated check for inline from myu_global.h
      a5d9597e
    • Sergei Golubchik's avatar
      compilation errors on sparc sun studio 10 · 5f078cc8
      Sergei Golubchik authored
      1. unused static inline functions are only removed at -xO4,
         otherwise test binaries will depend on various mysys
         symbols that they don't use. Link test with libmysys.
      
      2. Sphinx - don't instantiate (explicitly) templates before
         they're defined. Or, rather, don't instantiate them explicitly at
         all.
      
      3. GIS - don't use anonymous unions and structs.
      5f078cc8
  10. 14 Feb, 2016 2 commits
  11. 12 Feb, 2016 1 commit
  12. 10 Feb, 2016 2 commits
  13. 09 Feb, 2016 10 commits
  14. 08 Feb, 2016 3 commits
    • Sergei Petrunia's avatar
      MDEV-6859: scalar subqueries in a comparison produced unexpected result · b17a4350
      Sergei Petrunia authored
      When one evaluates row-based comparison like (X, Y) = (A,B), one should
      first call bring_value() for the Item that returns row value. If you
      don't do that and just attempt to read values of X and Y, you get stale
      values.
      Semi-join/Materialization can take a row-based comparison apart and
      make ref access from it. In that case, we need to call bring_value()
      to get the index lookup components.
      b17a4350
    • Sergei Golubchik's avatar
      5.5.47-37.7 · 3cfd36bb
      Sergei Golubchik authored
      3cfd36bb
    • Sergei Petrunia's avatar
      MDEV-7823: Server crashes in next_depth_first_tab on nested IN clauses with SQ inside · d443d70d
      Sergei Petrunia authored
      Consider a query with subquery in form t.key=(select ...). Suppose, the
      parent query uses this equality for ref access.
      It will attempt to evaluate the subquery in get_best_combination(),
      right before the join->join_tab[...] array is filled.  The problem was
      that subquery optimization will attempt to look at parent's join->join_tab
      to check how many times subquery will be executed (and crash).
      
      Fixed by not doing that when the subquery is constant (non-constant
      subqueries are only be evaluated during join execution, so they are not
      affected)
      d443d70d
  15. 06 Feb, 2016 2 commits
    • Sergei Golubchik's avatar
      MDEV-9024 Build fails with VS2015 · c4cb2400
      Sergei Golubchik authored
      cherry-pick f1daf9ce from 10.0 branch
      -------------------------------------
      
      Fix build failures caused by new C runtime library
      - isnan, snprintf, struct timespec are now defined, attempt to
      redefine them leads
      - P_tmpdir, tzname are no more defined
      -  lfind() and lsearch() in lf_hash.c had to be renamed,  declaration
      conflicts with some C runtime functions with the same name declared in
      a header included by stdlib.h
      
       Also fix couple of annoying warnings :
      - remove #define NOMINMAX from config.h to avoid "redefined" compiler
      warnings(NOMINMAX is already in compile flags)
      
      - disable incremental linker in Debug as well (feature not used much
      and compiler crashes often)
      
      Also simplify package building with Wix, require Wix 3.9 or later
      (VS2015 is not compatible with old Wix 3.5/3.6)
      c4cb2400
    • Sergei Golubchik's avatar
      MDEV-4664 mysql_upgrade crashes if root's password contains an apostrophe/single quotation mark · 1e361f28
      Sergei Golubchik authored
      fix dynstr_append_os_quoted() to escape single quotes correctly
      for a POSIX shell
      1e361f28