1. 18 Jan, 2017 4 commits
    • Marko Mäkelä's avatar
      MDEV-11816 Disallow CREATE TEMPORARY TABLE…ROW_FORMAT=COMPRESSED · 7cf97ed4
      Marko Mäkelä authored
      MySQL 5.7 allows temporary tables to be created in ROW_FORMAT=COMPRESSED.
      The usefulness of this is questionable. WL#7899 in MySQL 8.0.0
      prevents the creation of such compressed tables, so that all InnoDB
      temporary tables will be located inside the predefined
      InnoDB temporary tablespace.
      
      Pick up and adjust some tests from MySQL 5.7 and 8.0.
      
      dict_tf_to_fsp_flags(): Remove the parameter is_temp.
      fsp_flags_init(): Remove the parameter is_temporary.
      
      row_mysql_drop_temp_tables(): Remove. There cannot be any temporary
      tables in InnoDB. (This never removed #sql* tables in the datadir
      which were created by DDL.)
      
      dict_table_t::dir_path_of_temp_table: Remove.
      
      create_table_info_t::m_temp_path: Remove.
      
      create_table_info_t::create_options_are_invalid(): Do not allow
      ROW_FORMAT=COMPRESSED or KEY_BLOCK_SIZE for temporary tables.
      
      create_table_info_t::innobase_table_flags(): Do not unnecessarily
      prevent CREATE TEMPORARY TABLE with SPATIAL INDEX.
      (MySQL 5.7 does allow this.)
      
      fil_space_belongs_in_lru(): The only FIL_TYPE_TEMPORARY tablespace
      is never subjected to closing least-recently-used files.
      7cf97ed4
    • Marko Mäkelä's avatar
      Remove MYSQL_TABLESPACES. · 494e4b99
      Marko Mäkelä authored
      MySQL 5.7 introduced partial support for user-created shared tablespaces
      (for example, import and export are not supported).
      
      MariaDB Server does not support tablespaces at this point of time.
      Let us remove most InnoDB code and data structures that is related
      to shared tablespaces.
      494e4b99
    • Marko Mäkelä's avatar
      Remove MYSQL_COMPRESSION. · 1eabad5d
      Marko Mäkelä authored
      The MariaDB 10.1 page_compression is incompatible with the Oracle
      implementation that was introduced in MySQL 5.7 later.
      
      Remove the Oracle implementation. Also remove the remaining traces of
      MYSQL_ENCRYPTION.
      
      This will also remove traces of PUNCH_HOLE until it is implemented
      better. The only effective call to os_file_punch_hole() was in
      fil_node_create_low() to test if the operation is supported for the file.
      
      In other words, it looks like page_compression is not working in
      MariaDB 10.2, because no code equivalent to the 10.1 os_file_trim()
      is enabled.
      1eabad5d
    • Marko Mäkelä's avatar
      Remove MYSQL_ENCRYPTION. · 70c11485
      Marko Mäkelä authored
      MariaDB will likely never support MySQL-style encryption for
      InnoDB, because we cannot link with the Oracle encryption plugin.
      This is preparation for merging MDEV-11623.
      70c11485
  2. 17 Jan, 2017 4 commits
  3. 12 Jan, 2017 3 commits
    • Marko Mäkelä's avatar
      1ba7234b
    • Marko Mäkelä's avatar
      Merge 10.1 into bb-10.2-mdev-11782 · 7c81f15e
      Marko Mäkelä authored
      7c81f15e
    • Marko Mäkelä's avatar
      Improve an MDEV-9011 test of innodb_encrypt_log. · 2dc5d8bb
      Marko Mäkelä authored
      Test crash recovery from an encrypted redo log with innodb_encrypt_log=0.
      Previously, we did a clean shutdown, so only the log checkpoint
      information would have been read from the redo log. With this change,
      we will be reading and applying encrypted redo log records.
      
      include/start_mysqld.inc: Observe $restart_parameters.
      
      encryption.innodb-log-encrypt: Remove some unnecessary statements,
      and instead of restarting the server and concurrently accessing
      the files while the server is running, kill the server, check the
      files, and finally start up the server.
      
      innodb.log_data_file_size: Use start_mysqld.inc with $restart_parameters.
      2dc5d8bb
  4. 11 Jan, 2017 23 commits
    • Marko Mäkelä's avatar
      Merge 10.1 into 10.2 · fd0479ce
      Marko Mäkelä authored
      fd0479ce
    • Marko Mäkelä's avatar
      Remove an excessive copyright message. · 4507f1e5
      Marko Mäkelä authored
      4507f1e5
    • Marko Mäkelä's avatar
      Merge 10.0 into 10.1 · 5b5bce81
      Marko Mäkelä authored
      5b5bce81
    • Marko Mäkelä's avatar
      InnoDB: Enable UNIV_DEBUG_VALGRIND for cmake -DWITH_VALGRIND · 833fda8f
      Marko Mäkelä authored
      The symbol HAVE_VALGRIND_MEMCHECK_H was never defined.
      Instead, the symbol HAVE_VALGRIND should have been used.
      833fda8f
    • Monty's avatar
      MDEV-11597 Assertion when doing select from virtual column with impossible value · 5f0c31f9
      Monty authored
      - Changed error handlers interface so that they can change error level in
        the handler
      - Give warnings and errors when calculating virtual columns
      - On insert/update error is fatal in strict mode.
      - SELECT and DELETE will only give a warning if a virtual field generates an error
      - Added VCOL_UPDATE_FOR_DELETE and VCOL_UPDATE_INDEX_FOR_REPLACE to be able to
        easily detect in update_virtual_fields() if we should use an error
        handler to mask errors or not.
      5f0c31f9
    • Monty's avatar
      MDEV-11606 Server crashes in mi_make_key / sort_key_read · 177c191f
      Monty authored
      Problem was that one internal record buffer in MYISAM was not big enough to handle virtual fields.
      Fixed by extending buffer.
      
      Fixed test case to 79 characters
      177c191f
    • Monty's avatar
      MDEV-11737 Failing assertion: block->magic_n == MEM_BLOCK_MAGIC_N · c9b3e453
      Monty authored
      Issue was that the m_prebuilt array was reused without resetting a counter,
      which caused a memory overrun.
      
      Adjusted test case to 79 characters
      c9b3e453
    • Monty's avatar
      6c5c9831
    • Monty's avatar
      MDEV-11598 Assertion `!table || (!table->read_set ||... · 135e1444
      Monty authored
      MDEV-11598 Assertion `!table || (!table->read_set || bitmap_is_set(table->read_set, field_index))' failed
      
      Found and fixed 2 problems:
      
      - Filesort addon fields didn't mark virtual columns properly
      - multi-range-read calculated vcol bitmap but was not using it.
        This caused wrong vcol field to be calculated on read, which caused the assert.
      135e1444
    • Monty's avatar
      Fixes for failures in test scripts and removal of some compiler warnings · de22cd3f
      Monty authored
      - rpl_gtid_stop_start:  Random failure
      - sysvars_innodb,32bit: Fixes for 32 bit
      de22cd3f
    • Monty's avatar
      Cleanups · bf95970e
      Monty authored
      * Ensure that BUILD scripts cleans up things properly before new BUILD
      * MySQL -> MariaDB
      * Ignore wrong valgrind memleak
      bf95970e
    • Sergei Golubchik's avatar
      mtr uses dgcov for --gcov option · 53ae72e2
      Sergei Golubchik authored
      53ae72e2
    • Sergei Golubchik's avatar
      00f462cf
    • Monty's avatar
      Fixes for using ssl with BUILD scripts. · 7567cf5a
      Monty authored
      Needed as GNUTLS can't be used by MariaDB on many systems,
      like OpenSuse 13.2
      7567cf5a
    • Monty's avatar
      New simpler bugfix for UPDATE and virtual BLOBs · ea1b2504
      Monty authored
      When updating a table with virtual BLOB columns, the following might
      happen:
      - an old record is read from the table, it has no virtual blob values
      - update_virtual_fields() is run, vcol blob gets its value into the
        record. But only a pointer to the value is in the table->record[0],
        the value is in Field_blob::value String (but it doesn't have to be!
        it can be in the record, if the column is just a copy of another
        columns: ... b VARCHAR, c BLOB AS (b) ...)
      - store_record(table,record[1]), old record now is in record[1]
      - fill_record() prepares new values in record[0], vcol blob is updated,
        new value replaces the old one in the Field_blob::value
      - now both record[1] and record[0] have a pointer that points to the
        *new* vcol blob value. Or record[1] has a pointer to nowhere if
         Field_blob::value had to realloc.
      
      To fix this I have introduced a new String object 'read_value' in
      Field_blob.  When updating virtual columns when a row has been read,
      the allocated value is stored in 'read_value' instead of 'value'.  The
      allocated blobs for the new row is stored in 'value' as before.
      
      I also made, as a safety precaution, the insert delayed handling of
      blobs more general by using value to store strings instead of the
      record.  This ensures that virtual functions on delayed insert should
      work in as in the case of normal insert.
      
      Triggers are now properly updating the read, write and vcol maps for used
      fields. This means that we don't need VCOL_UPDATE_FOR_READ_WRITE anymore
      and there is no need for any other special handling of triggers in
      update_virtual_fields().
      
      To be able to test how many times virtual fields are invoked, I also
      relaxed rules that one can use local (@) variables in DEFAULT and non
      persistent virtual field expressions.
      ea1b2504
    • Monty's avatar
      Revert "bugfix: UPDATE and virtual BLOBs" · 7454087d
      Monty authored
      This reverts commit f73bdb68.
      7454087d
    • Monty's avatar
      Fixed issues found by buildbot · 1628a2ae
      Monty authored
      - MDEV-11621 rpl.rpl_gtid_stop_start fails sporadically in buildbot
      - MDEV-11620 rpl.rpl_upgrade_master_info fails sporadically in buildbot
      
      The issue above was probably that the build machine was overworked and the
      shutdown took longer than 30 resp 10 seconds, which caused MyISAM tables
      to be marked as crashed.
      Fixed by flushing myisam tables before doing a forced shutdown/kill.
      I also increased timeout for forced shutdown from 10 seconds to 60 seconds
      to fix other possible issues on slow machines.
      
      Fixed also some compiler warnings
      1628a2ae
    • Monty's avatar
      Fixed bugs found by mysql-test-run: · 1afb1704
      Monty authored
      - privilege_table_io.test didn't properly reset roles_mapping
      - Fixed memory allocation problem with CHECK CONSTRAINT, found when
        running --valgrind main.check_constraint
      1afb1704
    • Sergei Golubchik's avatar
      Make atomic writes general · ed008a74
      Sergei Golubchik authored
      - Atomic writes are enabled by default
      - Automatically detect if device supports atomic write and use it if
        atomic writes are enabled
      - Remove ATOMIC WRITE options from CREATE TABLE
        - Atomic write is a device option, not a table options as the table may
          crash if the media changes
      - Add support for SHANNON SSD cards
      ed008a74
    • Monty's avatar
      Removed usage of my_hash_search() with uninitialized HASH. · ed0bc17b
      Monty authored
      - Not documented on intened usage
      - Extra checking takes time for all HASH usage
      ed0bc17b
    • Monty's avatar
      Improve mysys/hash by caching hash_nr · e80ad58d
      Monty authored
      This is done without using any additional memory
      Added internal test case
      
      This is similar to MDEV-7716
      e80ad58d
    • Monty's avatar
      Fixes for running with gcov · 67034b6d
      Monty authored
      67034b6d
    • Elena Stepanova's avatar
      f516db35
  5. 10 Jan, 2017 3 commits
    • Marko Mäkelä's avatar
      Merge 10.1 into 10.2 · f27ca6f6
      Marko Mäkelä authored
      f27ca6f6
    • Marko Mäkelä's avatar
      Merge 10.0 into 10.1 · 5044dae2
      Marko Mäkelä authored
      5044dae2
    • Marko Mäkelä's avatar
      Fix an innodb_plugin leak noted in MDEV-11686 · 78e6fafc
      Marko Mäkelä authored
      buf_flush_init_flush_rbt() was called too early in MariaDB server 10.0,
      10.1, MySQL 5.5 and MySQL 5.6. The memory leak has been fixed in
      the XtraDB storage engine and in MySQL 5.7.
      
      As a result, when the server is started to initialize new data files,
      the buf_pool->flush_rbt will be created unnecessarily and then leaked.
      This memory leak was noticed in MariaDB server 10.1 when running the
      test encryption.innodb_first_page.
      78e6fafc
  6. 09 Jan, 2017 3 commits