1. 14 Feb, 2017 15 commits
    • Sergei Golubchik's avatar
      cleanup: mtr startup warning · 41f42dff
      Sergei Golubchik authored
      options --log-slow-admin-statements, --log-queries-not-using-indexes and --log-slow-slave-statements have no effect if --log_slow_queries is not set
      
      1. s/--log_slow_queries/--log-slow-queries/
      2. disable log-slow-admin-statement/etc in mytr when doing mysqld --help
      41f42dff
    • Sergei Golubchik's avatar
      MDEV-11439 No data type JSON, but CAST(something AS JSON) pretends to work · 6f6d0531
      Sergei Golubchik authored
      Use JSON_COMPACT(X) instead of CAST(X AS JSON).
      Bonus - X is validated to be a valid JSON.
      Fix a typo in the error message.
      6f6d0531
    • Sergei Golubchik's avatar
      bugfix: uninitialized variable · e0fa2ce4
      Sergei Golubchik authored
      fixes crashes on win32-debug
      e0fa2ce4
    • Vladislav Vaintroub's avatar
      MDEV-12056 mysql_config outputs non-existing mysqlclient · 8877f1c3
      Vladislav Vaintroub authored
      Change output of mysql_config --libs to have -lmariadb instead of
      -lmysqlclient
      
      Static linking is not yet supported, because static library has different
      base name ( libmariadbclient.a static vs libmariadb.so shared)
      8877f1c3
    • Alexey Botchkov's avatar
      MDEV-11439 No data type JSON, but CAST(something AS JSON) pretends to · f76d5fef
      Alexey Botchkov authored
      work.
      
              json_detailed() fixed
      f76d5fef
    • Marko Mäkelä's avatar
      Post-push fix for MDEV-12057. · 2bf07556
      Marko Mäkelä authored
      Fix a test result for the narrower type of innodb_fast_shutdown.
      2bf07556
    • Marko Mäkelä's avatar
      MDEV-12057 Embedded server shutdown hangs in InnoDB · 1b4b4f68
      Marko Mäkelä authored
      Ever since MDEV-5800 enabled indexed virtual columns for InnoDB,
      the InnoDB shutdown relied on close_connections() that would set
      thd->killed for the InnoDB purge threads. Alas, the embedded server
      shutdown is not invoking close_connections(), and thus InnoDB purge
      threads fail to initiate shutdown, causing a hang.
      
      innodb_inited: Remove. Use srv_was_started instead.
      
      innobase_fast_shutdown: Remove. Use srv_fast_shutdown instead.
      
      srv_running: Renamed from thd_destructor_myvar, and made global.
      The value NULL means that shutdown was requested or the purge threads
      should not be running because of innodb_read_only_mode=1.
      
      innobase_init(): Set srv_was_started after ensuring that srv_running
      was initialized. (In innodb_read_only mode, the purge threads are not
      started and we do not care if srv_running==NULL.)
      
      innobase_start_or_create_for_mysql(): Do not set srv_was_started.
      Let it be set by the only caller innobase_init().
      
      srv_purge_should_exit(): Check also srv_was_started and srv_running
      when evaluating thd->killed.
      1b4b4f68
    • Vicențiu Ciorbaru's avatar
      MDEV-11170: MariaDB 10.2 cannot start on MySQL 5.7 datadir · d731ce21
      Vicențiu Ciorbaru authored
      PART 2 of the fix adds the logic of not using password column, unless it
      exists. If password column is missing we attempt to use plugin &&
      authentication_string columns.
      d731ce21
    • Vicențiu Ciorbaru's avatar
      MDEV-11170: MariaDB 10.2 cannot start on MySQL 5.7 datadir · 5ab93737
      Vicențiu Ciorbaru authored
      PART 1 of the fix requires a bit of refactoring to not use hard-coded
      field indices any more. Create classes that express the grant tables structure,
      without exposing the underlying field indices.
      
      Most of the code is converted to use these classes, except parts which
      are not directly affected by the MDEV-11170. These however are TODO
      items for subsequent refactoring.
      5ab93737
    • Vicențiu Ciorbaru's avatar
      Define a helper class to allow for saving sql_mode using RAII · dc90e249
      Vicențiu Ciorbaru authored
      On construction the Sql_mode_save class stores the current THD's
      sql_mode. On destruction, the THD's mode is restored.
      dc90e249
    • Vicențiu Ciorbaru's avatar
    • Vicențiu Ciorbaru's avatar
      MDEV-11746: Wrong result upon using FIRST_VALUE with a window frame · 5bf33843
      Vicențiu Ciorbaru authored
      The same approach is needed for LAST_VALUE, otherwise the LAST_VALUE sum
      functions are not cleared correctly. Now LAST_VALUE behaves as NTH_VALUE
      with 0 offset, only that the frame that it is examining is the bottom bound,
      not the top bound.
      5bf33843
    • Vicențiu Ciorbaru's avatar
      MDEV-11746: Wrong result upon using FIRST_VALUE with a window frame · 57341852
      Vicențiu Ciorbaru authored
      Reimplement FIRST_VALUE to act as NTH_VALUE with 0 offset. The previous
      implementation was flawed when the window frame would remove values.
      57341852
    • Vicențiu Ciorbaru's avatar
      MDEV-10122: MariaDB does not support group functions in some contexts where MySQL does · f675eab7
      Vicențiu Ciorbaru authored
      The problematic queries involve unions. For unions we have an
      optimization where we skip the ORDER BY clause in a query from one side
      of the union if it will be performed later due to UNION.
      EX:
      (SELECT a from t1 ORDER BY a) ORDER BY b;
      The first ordering by a is not necessary and it gets removed.
      
      The problem is that we still need to resolve the Items before removing the
      ORDER BY list from the
      SELECT_LEX structure. During this final resolve step however, we forgot to
      allow SET functions within the ORDER BY clause. This caused us to return
      an "Invalid use of group function" error during the checking performed
      by fix_fields in Item_sum::init_sum_func_check.
      f675eab7
    • Vicențiu Ciorbaru's avatar
      MDEV-11170: MariaDB 10.2 cannot start on MySQL 5.7 datadir: · fdfdea40
      Vicențiu Ciorbaru authored
      Fatal error: mysql.user table is damaged or in unsupported 3.20 format
      
      The problem stems from MySQL 5.7.6. According to MySQL documentation:
      In MySQL 5.7.6, the Password column was removed and all credentials are
      stored in the authentication_string column.
      
      If opening a MySQL 5.7.6 (and up) datadir with MariaDB 10.2, the user table
      appears corrupted. In order to fix this, the server must be started with
      --skip-grant-tables and then a subsequent mysql_upgrade command must be
      issued.
      
      This patch updates the mysql_upgrade command to also add the removed
      Password column. The password column is necessary, otherwise
      the mysql_upgrade script fails due to the Event_scheduler not being able
      to start, as it can't find Event_priv in the table where it ought to be.
      MySQL's version has column position 28 (0 index) vs our datadir version
      expects position 29.
      fdfdea40
  2. 13 Feb, 2017 25 commits