1. 19 Feb, 2018 3 commits
  2. 18 Feb, 2018 2 commits
  3. 17 Feb, 2018 3 commits
    • Alexander Barkov's avatar
    • Marko Mäkelä's avatar
      Merge 10.1 into 10.2 · 970ce270
      Marko Mäkelä authored
      Disable the test encryption.innodb_encryption-page-compression
      because the wait_condition would seem to time out deterministically.
      MDEV-14814 has to be addressed in 10.2 separately.
      
      Datafile::validate_first_page(): Do not invoke
      page_size_t::page_size_t(flags) before validating the tablespace flags.
      This avoids a crash in MDEV-15333 innodb.restart test case.
      FIXME: Reduce the number of error messages. The first one is enough.
      970ce270
    • Marko Mäkelä's avatar
      MDEV-15333 MariaDB (still) slow start · 9a46d971
      Marko Mäkelä authored
      This performance regression was introduced in the MariaDB 10.1
      file format incompatibility bug fix MDEV-11623 (MariaDB 10.1.21
      and MariaDB 10.2.4) and partially fixed in MariaDB 10.1.25 in
      MDEV-12610 without adding a regression test case.
      
      On a normal startup (without crash recovery), InnoDB should not read
      every .ibd data file, because this is slow. Like in MySQL, for now,
      InnoDB will still open every data file (without reading), and it
      will read every .ibd file for which an .isl file exists, or the
      DATA DIRECTORY attribute has been specified for the table.
      
      The test case shuts down InnoDB, moves data files, replaces them
      with garbage, and then restarts InnoDB, expecting no messages to
      be issued for the garbage files. (Some messages will for now be
      issued for the table that uses the DATA DIRECTORY attribute.)
      Finally, the test shuts down the server, restores the old data files,
      and restarts again to drop the tables.
      
      fil_open_single_table_tablespace(): Remove the condition on flags,
      and only call fsp_flags_try_adjust() if validate==true
      (reading the first page has been requested). The only caller with
      validate==false is at server startup when we are processing all
      records from SYS_TABLES. The flags passed to this function are
      actually derived from SYS_TABLES.TYPE and SYS_TABLES.N_COLS,
      and there never was any problem with SYS_TABLES in MariaDB 10.1.
      The problem that MDEV-11623 was that incorrect tablespace flags
      were computed and written to FSP_SPACE_FLAGS.
      9a46d971
  4. 16 Feb, 2018 6 commits
  5. 15 Feb, 2018 19 commits
    • Monty's avatar
      Don't run sql_sequence.grant for embeddes server · 14461603
      Monty authored
      14461603
    • Vladislav Vaintroub's avatar
    • Vladislav Vaintroub's avatar
      MDEV-14997 mariabackup crashes with invalid --innodb-flush-method · a08121c9
      Vladislav Vaintroub authored
      Avoid NULL pointer dereference when shutting down after invalid parameters
      were parsed.
      a08121c9
    • Elena Stepanova's avatar
    • Marko Mäkelä's avatar
      MDEV-15323 Follow-up to MDEV-14905: Skip FTS processing if innodb_read_only · 2bb19230
      Marko Mäkelä authored
      fts_cmp_set_sync_doc_id(), fts_load_stopword(): Start the transaction
      in read-only mode if innodb_read_only is set.
      
      fts_update_sync_doc_id(), fts_commit_table(), fts_sync(),
      fts_optimize_table(): Return DB_READ_ONLY if innodb_read_only is set.
      
      fts_doc_fetch_by_doc_id(), fts_table_fetch_doc_ids():
      Remove the code to start an internal transaction or to roll back,
      because this is a read-only operation.
      2bb19230
    • Marko Mäkelä's avatar
      Dead code removal: sess_t · 03400d97
      Marko Mäkelä authored
      The session object is not really needed for anything.
      We can directly create and free the dummy purge_sys->query->trx.
      03400d97
    • Marko Mäkelä's avatar
      MDEV-14905 Fulltext index modification committed during shutdown · 37af958d
      Marko Mäkelä authored
      If CREATE TABLE...FULLTEXT INDEX was initiated right before shutdown,
      then the function fts_load_stopword() could commit modifications
      after shutdown was initiated, causing an assertion failure in
      the function trx_purge_add_update_undo_to_history().
      
      Mark as internal all the read/write transactions that
      modify fulltext indexes, so that they will be ignored by
      the assertion that guards against transaction commits
      after shutdown has been initiated.
      
      fts_optimize_free(): Invoke trx_commit_for_mysql() just in case,
      because in fts_optimize_create() we started the transaction as
      internal, and fts_free_for_backgruond() would assert that the
      flag is clear. Transaction commit would clear the flag.
      37af958d
    • Marko Mäkelä's avatar
      MDEV-14648 Restore fix for MySQL BUG#39053 - UNINSTALL PLUGIN does not allow... · 6f314eda
      Marko Mäkelä authored
      MDEV-14648 Restore fix for MySQL BUG#39053 - UNINSTALL PLUGIN does not allow the storage engine to cleanup open connections
      
      Also, allow the MariaDB 10.2 server to link InnoDB dynamically
      against ha_innodb.so (which is what mysql-test-run.pl expects
      to exist, instead of the default name ha_innobase.so).
      
      wsrep_load_data_split(): Instead of referring to innodb_hton_ptr,
      check the handlerton::db_type. This was recently broken by me in
      MDEV-11415.
      
      innodb_lock_schedule_algorithm: Define as a weak global symbol,
      so that WITH_WSREP will not depend on InnoDB being linked statically.
      I tested this manually. Notably, running a test that only does
      	SET GLOBAL wsrep_on=1;
      with a static or dynamic InnoDB and
      	./mtr --mysqld=--loose-innodb-lock-schedule-algorithm=fcfs
      will crash with SIGSEGV at shutdown. With the default VATS
      combination the wsrep_on is properly refused for both the
      static and dynamic InnoDB.
      
      ha_close_connection(): Do invoke the method also for plugins
      for which UNINSTALL PLUGIN was deferred due to open connections.
      Thanks to @svoj for pointing this out.
      
      thd_to_trx(): Return a pointer, not a reference to a pointer.
      
      check_trx_exists(): Invoke thd_set_ha_data() for assigning a transaction.
      
      log_write_checkpoint_info(): Remove an unused DEBUG_SYNC point
      that would cause an assertion failure on shutdown after deferred
      UNINSTALL PLUGIN.
      
      This was tested as follows:
      
      cmake -DWITH_WSREP=1 -DPLUGIN_INNOBASE:STRING=DYNAMIC \
      -DWITH_MARIABACKUP:BOOL=OFF ...
      make
      cd mysql-test
      ./mtr innodb.innodb_uninstall
      6f314eda
    • Sauron's avatar
      Prevent building WSREP without INNODB · 54e66eef
      Sauron authored
      54e66eef
    • Vladislav Vaintroub's avatar
      743b073c
    • Marko Mäkelä's avatar
      Merge 10.2 into bb-10.2-ext · 4074c745
      Marko Mäkelä authored
      4074c745
    • Marko Mäkelä's avatar
      MDEV-15323 Follow-up to MDEV-14905: Skip FTS processing if innodb_read_only · 5ab46028
      Marko Mäkelä authored
      fts_cmp_set_sync_doc_id(), fts_load_stopword(): Start the transaction
      in read-only mode if innodb_read_only is set.
      
      fts_update_sync_doc_id(), fts_commit_table(), fts_sync(),
      fts_optimize_table(): Return DB_READ_ONLY if innodb_read_only is set.
      
      fts_doc_fetch_by_doc_id(), fts_table_fetch_doc_ids():
      Remove the code to start an internal transaction or to roll back,
      because this is a read-only operation.
      5ab46028
    • Vladislav Vaintroub's avatar
      f082c755
    • Marko Mäkelä's avatar
      Merge 10.2 into bb-10.2-ext · 22770a9f
      Marko Mäkelä authored
      22770a9f
    • Monty's avatar
      Crash when giving error message for ALTER SEQUENCE · 7bd81c72
      Monty authored
      Fixes MDEV-14761 "Assertion `!mysql_parse_status || thd->is_error() ||
      thd->get_internal_handler()' failed in parse_sql"
      7bd81c72
    • Marko Mäkelä's avatar
      Dead code removal: sess_t · 27ea2963
      Marko Mäkelä authored
      The session object is not really needed for anything.
      We can directly create and free the dummy purge_sys->query->trx.
      27ea2963
    • Marko Mäkelä's avatar
      MDEV-14905 Fulltext index modification committed during shutdown · 7baea2ef
      Marko Mäkelä authored
      If CREATE TABLE...FULLTEXT INDEX was initiated right before shutdown,
      then the function fts_load_stopword() could commit modifications
      after shutdown was initiated, causing an assertion failure in
      the function trx_purge_add_update_undo_to_history().
      
      Mark as internal all the read/write transactions that
      modify fulltext indexes, so that they will be ignored by
      the assertion that guards against transaction commits
      after shutdown has been initiated.
      
      fts_optimize_free(): Invoke trx_commit_for_mysql() just in case,
      because in fts_optimize_create() we started the transaction as
      internal, and fts_free_for_backgruond() would assert that the
      flag is clear. Transaction commit would clear the flag.
      7baea2ef
    • Marko Mäkelä's avatar
      MDEV-14648 Restore fix for MySQL BUG#39053 - UNINSTALL PLUGIN does not allow... · 5fe9b4a7
      Marko Mäkelä authored
      MDEV-14648 Restore fix for MySQL BUG#39053 - UNINSTALL PLUGIN does not allow the storage engine to cleanup open connections
      
      Also, allow the MariaDB 10.2 server to link InnoDB dynamically
      against ha_innodb.so (which is what mysql-test-run.pl expects
      to exist, instead of the default name ha_innobase.so).
      
      wsrep_load_data_split(): Instead of referring to innodb_hton_ptr,
      check the handlerton::db_type. This was recently broken by me in
      MDEV-11415.
      
      innodb_lock_schedule_algorithm: Define as a weak global symbol,
      so that WITH_WSREP will not depend on InnoDB being linked statically.
      I tested this manually. Notably, running a test that only does
      	SET GLOBAL wsrep_on=1;
      with a static or dynamic InnoDB and
      	./mtr --mysqld=--loose-innodb-lock-schedule-algorithm=fcfs
      will crash with SIGSEGV at shutdown. With the default VATS
      combination the wsrep_on is properly refused for both the
      static and dynamic InnoDB.
      
      ha_close_connection(): Do invoke the method also for plugins
      for which UNINSTALL PLUGIN was deferred due to open connections.
      Thanks to @svoj for pointing this out.
      
      thd_to_trx(): Return a pointer, not a reference to a pointer.
      
      check_trx_exists(): Invoke thd_set_ha_data() for assigning a transaction.
      
      log_write_checkpoint_info(): Remove an unused DEBUG_SYNC point
      that would cause an assertion failure on shutdown after deferred
      UNINSTALL PLUGIN.
      
      This was tested as follows:
      
      cmake -DWITH_WSREP=1 -DPLUGIN_INNOBASE:STRING=DYNAMIC \
      -DWITH_MARIABACKUP:BOOL=OFF ...
      make
      cd mysql-test
      ./mtr innodb.innodb_uninstall
      5fe9b4a7
    • Sauron's avatar
      Prevent building WSREP without INNODB · 8db54f1a
      Sauron authored
      8db54f1a
  6. 14 Feb, 2018 7 commits
    • Vladislav Vaintroub's avatar
      Windows,tests : fix pcre_test_bat test from pcre library. · d49f8e9f
      Vladislav Vaintroub authored
      Tests that are not available in certain configurations, are marked as
      Test command : NOT_AVAILABLE in ctest output.
      
      pcre_test_bat does not work without ctest's -C option (--build-config
      that was used earlier was wrong).
      d49f8e9f
    • Vladislav Vaintroub's avatar
      Update C/C · 8a923a6d
      Vladislav Vaintroub authored
      8a923a6d
    • Vladislav Vaintroub's avatar
      24462cec
    • Alexander Barkov's avatar
      MDEV-15310 Range optimizer does not work well for "WHERE temporal_column NOT IN (const_list)" · c17a06ab
      Alexander Barkov authored
      There were two problems related to the bug report:
      1. Item_datetime::get_date() was not implemented.
         So execution went through val_int() followed
         by int-to-datetime or int-to-time conversion.
         This was the reason why the optimizer did not
         work well on data with fractional seconds.
      2. Item_datetime::set() did not have a TIME specific code
         to mix months and days to hours after unpack_time().
         This is why the optimizer did not work well with negative
         TIME values, as well as huge time values.
      
      Changes:
      
      1. Overriding Item_datetime::get_date(), to return ltime.
         This fixes the problem N1.
      2. Cleanup: Moving pack_time() and unpack_time() from
         sql-common/my_time.c and include/my_time.h to
         sql/sql_time.cc and sql/sql_time.h, as they are not needed
         on the client side.
      3. Adding a new "enum_mysql_timestamp_type ts_type" parameter
         to unpack_time() and moving the TIME specific code to mix
         months and days with hours inside unpack_time().
         Adding a new "ts_type" parameter to Item_datetime::set(),
         to pass it from the caller down to unpack_time().
         So now the TIME specific code is automatically called
         from Item_datetime::set(). This fixes the problem N2.
         This change also helped to get rid of duplicate TIME specific code
         from other three places, where mixing month/days to hours
         was done immediately after unpack_time().
         Moving the DATE specific code to zero hhmmssff
         from Item_func_min_max::get_date_native to inside unpack_time(),
         for symmetry.
      4. Removing the virtual method in_vector::result_type(),
         adding in_vector::type_handler() instead.
         This helps to get result_type(), field_type(),
         mysql_timestamp_type() of an in_vector easier.
         Passing type_handler()->mysql_timestamp_type() as
         a new parameter to Item_datetime::set() inside
         in_temporal::value_to_item().
      5. Cleaup: Removing separate implementations of in_datetime::get_value()
         and in_time::get_value(). Adding a single implementation
         in_temporal::get_value() instead.
         Passing type_handler()->field_type() to get_value_internal().
      c17a06ab
    • Vladislav Vaintroub's avatar
    • Vladislav Vaintroub's avatar
    • Vladislav Vaintroub's avatar
      Windows, compiling - disable pkg_config · 2dd8a732
      Vladislav Vaintroub authored
      pkg_config usually comes with Strawberry perl, and tends to find packages
      that might work in mingw compilation, but not with MSVC.
      
      Thus disable PKG_CONFIG, otherwise any FIND_PACKAGE() that is using PkgConfig
      can find something (like LibXml2 from connect), can potentially find something
      that is not going to compile.
      2dd8a732