1. 11 May, 2018 16 commits
    • Aakanksha Verma's avatar
      Bug #27141613 ASSERTION: TRX0REC.CC:319:COL->IS_VIRTUAL() / CRASH IN TRX_UNDO_READ_V_COLS · 279f992b
      Aakanksha Verma authored
      PROBLEM
      =======
      When add of virtual index fails with DB_TOO_BIG_RECORD , the virtual
      index being freed isn't removed from the list of indexes a virtual
      column(which is part of the index). This while the undo log is read
      could fetch a wrong value during rollback and cause the assertion
      reported in the bug particularly.
      
      FIX
      ===
      Added a function that is called when the virtual index being freed would
      allow the index be removed from the index list of virtual column which
      was a field of that index.
      
      Reviwed By: Jimmy Yang<Jimmy.Yang@oracle.com>
      RB: 18528
      279f992b
    • Marko Mäkelä's avatar
      Adjust the test case for MariaDB · c88ac735
      Marko Mäkelä authored
      c88ac735
    • Aditya A's avatar
      Bug #27304661 MYSQL CRASH DOING SYNC INDEX ] [FATAL] INNODB: SEMAPHORE WAIT HAS LASTED > 600 · 280879eb
      Aditya A authored
      PROBLEM
      -------
      
      Whenever an fts table is created it registers itself in a queue which
      is operated by a background thread whose job is to optimize the
      fts tables in background. Additionally we place these fts tables in
      non-LRU list so that they cannot be evicted from cache. But in the
      scenario when a node is brought up which is already having fts
      tables ,we first try to load the fts tables in dictionary ,but we skip
      the part where it is added in background queue and in non-LRU list because
      the background thread is not yet created,so these tables are loaded
      but they can be evicted from the cache. Now coming to the deadlock scenario
      
      1. A Server background thread is trying to evict a table from the cache
          because the cache is full,so it scans the LRU list for the tables it can
          evict.It finds the fts table (because of the reason explained above)
          can be evicted and it takes the dict_sys->mutex (this is a system wide mutex)
          submits a request to  the background thread to remove this table from queue
          and waits it to be completed.
      
      2.  In the mean time fts_optimize_thread() is processing another job
          in the queue and needs dict_sys->mutex for a small amount of time,
          but it cannot get it because it is blocked by the first background thread.
      
      So Thread 1 is waiting for its job to be completed by Thread 2,whereas Thread 2
      is waiting for dict_sys->mutex held by thread 1 ,causing the deadlock.
      
      FIX
      280879eb
    • Sachin Agarwal's avatar
      Bug #26805833 INNODB COMPLAINS OF SYNTAX ERROR, BUT DOES NOT SAY WHICH OPTION · b7e333f9
      Sachin Agarwal authored
      Problem:
      
      when incorrect value is assigned to innodb_data_file_path or
      innodb_temp_data_file_path parameter, Innodb returns error and logs error
      message in mysqlds.err file but there is no information in error message about
      the parameter which causes Innodb initialization is failed.
      
      Fix:
      
      Added error message with parameter name and value, which causes Innodb
      initialization is failed.
      
      Reviewed by: Jimmy <Jimmy.Yang@oracle.com>
      RB: 18206
      b7e333f9
    • Marko Mäkelä's avatar
      Adjust the test case for MariaDB · 671a37f6
      Marko Mäkelä authored
      Note: it does not appear to cover the bug fix! The test
      will pass even if the Oracle Bug #26731689 fix is reverted.
      671a37f6
    • Sachin Agarwal's avatar
      Bug #26731689 FK ON TABLE WITH GENERATED COLS: ASSERTION POS < N_DEF · 3d10966b
      Sachin Agarwal authored
      Problem:
      
      During ALTER, when filling stored column info, wrong column number is used.
      This is because we ignored virtual column when iterating over columns in
      table and lead to debug assertion.
      
      Fix:
      
      In InnoDB table cache object, vcols are on stored on one list, stored and
      normal columns are stored in another list.
      When looking for stored column, ignore the virtual columns to get the right
      column number of stored column.
      
      Reviewed by: Thiru <thirunarayanan.balathandayuth@oracle.com>,
                   Satya <satya.bodapati@oracle.com>
      RB: 17939
      3d10966b
    • Marko Mäkelä's avatar
    • Marko Mäkelä's avatar
      Merge 10.1 into 10.2 · 82f0dc35
      Marko Mäkelä authored
      82f0dc35
    • Marko Mäkelä's avatar
      MDEV-16145 Crash in ALTER TABLE…AUTO_INCREMENT=1 after DISCARD TABLESPACE · c407ee09
      Marko Mäkelä authored
      This is the MariaDB equivalent of fixing the MySQL 5.7 regression
      Bug #26935001 ALTER TABLE AUTO_INCREMENT TRIES TO READ
      INDEX FROM DISCARDED TABLESPACE
      
      Oracle did not publish a test case, but it is easy to guess
      based on the commit message. The MariaDB code is different
      due to MDEV-6076 implementing persistent AUTO_INCREMENT.
      
      commit_set_autoinc(): Report ER_TABLESPACE_DISCARDED if the
      tablespace is missing.
      
      prepare_inplace_alter_table_dict(): Avoid accessing a discarded
      tablespace. (This avoids generating warnings in fil_space_acquire().)
      c407ee09
    • Marko Mäkelä's avatar
      64f4576b
    • Marko Mäkelä's avatar
      Merge 10.0 into 10.1 · 3b99a274
      Marko Mäkelä authored
      3b99a274
    • Sachin Agarwal's avatar
      Bug #26334149 - MYSQL CRASHES WHEN FULL TEXT INDEXES IBD FILES ARE ORPHANED DUE TO RENAME TABLE · 197bf0fe
      Sachin Agarwal authored
      Problem:
      When FTS index is added into a table which doesn't have 'FTS_DOC_ID'
      column, Innodb rebuilds table to add column 'FTS_DOC_ID'. when this FTS
      index is dropped from this table. Innodb doesn't not rebuild table to
      remove 'FTS_DOC_ID' column and deletes FTS index auxiliary tables.
      But it doesn't delete FTS common auxiliary tables.
      Later when the database having this table is renamed, FTS auxiliary
      tables are not renamed because table's flags2 (dict_table_t.flags2)
      has been resetted for DICT_TF2_FTS flag during FTS index drop operation.
      Now when we drop old database, it leads to an assert.
      
      Fix:
      During renaming of FTS auxiliary tables, ORed a condition to check if
      table has DICT_TF2_FTS_HAS_DOC_ID flag set.
      
      RB: 18769
      Reviewed by : Jimmy.Yang@oracle.com
      197bf0fe
    • Thirunarayanan Balathandayuthapani's avatar
      Bug #27041445 SERVER ABORTS IF FTS_DOC_ID EXCEEDS FTS_DOC_ID_MAX_STEP · 9c03ba8f
      Thirunarayanan Balathandayuthapani authored
      Problem:
      =======
      Multiple insert statement in table contains FULLTEXT KEY and a
      FTS_DOC_ID column aborts the server if the FTS_DOC_ID exceeds
      FTS_DOC_ID_MAX_STEP.
      
      Solution:
      ========
      Remove the exception for first committed insert statement.
      
      Reviewed-by: Jimmy Yang<jimmy.yang@oracle.com>
      RB: 18023
      9c03ba8f
    • Marko Mäkelä's avatar
      Merge 5.5 into 10.0 (no changes) · c70fc6b1
      Marko Mäkelä authored
      c70fc6b1
    • Marko Mäkelä's avatar
      Remove a redundant condition added by the 5.6.40 merge · 580a8061
      Marko Mäkelä authored
      When Oracle fixed MDEV-13899 in their own way, they moved the
      condition to the only caller of PageConverter::update_records().
      Thus, the merge of 5.6.40 into MariaDB added a redundant condition.
      
      PageConverter::update_records(): Move the page_is_leaf() condition
      to the only caller, PageConverter::update_index_page().
      580a8061
    • Sergei Petrunia's avatar
      MDEV-12427: rocksdb.write_sync fails · c6864832
      Sergei Petrunia authored
      Enable the test as the cause of the failure has been fixed
      c6864832
  2. 10 May, 2018 13 commits
  3. 09 May, 2018 9 commits
    • Vladislav Vaintroub's avatar
      Fix warning VS2017 15.7 update. · 8ba0eea6
      Vladislav Vaintroub authored
      This previously unreported warning comes from casting size_t to ulong
      in sql_hset.h in Hash_Set::at().
      
      Change my_hash_element to accept size_t index parameter.
      8ba0eea6
    • Daniel Bartholomew's avatar
      bump the VERSION · 7d521bcc
      Daniel Bartholomew authored
      7d521bcc
    • Jacob Mathew's avatar
      MDEV-15697: Remote user used by Spider needs SUPER privilege · df420cbb
      Jacob Mathew authored
      The remote users need the SUPER privilege because by default Spider sends a
      'SET SQL_LOG_OFF' statement to the data nodes.  This is controlled by the
      spider_internal_sql_log_off configuration setting on the Spider node, which
      can only be set to 0 or 1, with a default value of 1.
      
      I have fixed the problem by changing this configuration setting so that if it
      is NOT SET, which is the most likely case, the Spider node DOES NOT SEND the
      'SET SQL_LOG_OFF' statement to the data nodes.  However if the
      spider_internal_sql_log_off setting IS EXPLICITLY SET to either 0 or 1, then
      the Spider node DOES SEND the 'SET SQL_LOG_OFF' statement, requiring a remote
      user with the SUPER privilege.  The Spider documentation will be updated to
      reflect this change.
      
      Author:
        Jacob Mathew.
      
      Reviewer:
        Kentoku Shiba.
      
      Cherry-Picked:
        Commit 72f0efac on branch bb-10.3-MDEV-15697
      df420cbb
    • Sergei Golubchik's avatar
      install disks plugin on debian · ff579bc8
      Sergei Golubchik authored
      ff579bc8
    • Thirunarayanan Balathandayuthapani's avatar
      MDEV-16125 Shutdown crash when innodb_force_recovery >= 2 · fe95cb2e
      Thirunarayanan Balathandayuthapani authored
      Problem:
      =======
      InnoDB master thread encounters the shutdown state as SRV_SHUTDOWN_FLUSH_PHASE
      when innodb_force_recovery >=2 and slow scheduling of master thread during
      shutdown.
      
      Fix:
      ====
      There is no need for master thread itself if innodb_force_recovery >=2.
      Don't create the master thread if innodb_force_recovery >= 2
      fe95cb2e
    • Marko Mäkelä's avatar
      Merge 10.0 into 10.1 · d06ca5bb
      Marko Mäkelä authored
      d06ca5bb
    • Marko Mäkelä's avatar
      MDEV-16119 InnoDB lock->index refers to a freed object after failed ADD INDEX · 4f42f0d1
      Marko Mäkelä authored
      The problem is hard to repeat, and I failed to create a deterministic
      test case. Online index creation creates stubs for to-be-created indexes.
      If index creation fails, we could remove these stubs while locks exist
      in the indexes. (This would require that the index creation was completed,
      and a concurrent DML operation acquired a lock on a record in the
      uncommitted index. If a duplicate key error occurs in an uncommitted
      index, the error will be reported for the CREATE UNIQUE INDEX, not for
      the DML operation that tried to insert the duplicate.)
      
      dict_table_try_drop_aborted(), row_merge_drop_indexes(): If transactional
      locks exist on the table, keep the table->indexes intact.
      4f42f0d1
    • Marko Mäkelä's avatar
      MDEV-15916 Change buffer crash during TRUNCATE or DROP TABLE · 0ea625b3
      Marko Mäkelä authored
      ibuf_restore_pos(): Do not issue any messages if the tablespace
      is being dropped or truncated. In MariaDB 10.2, TRUNCATE TABLE
      would not change the tablespace ID, and therefore the tablespace
      would be found, even though TRUNCATE is in progress.
      
      Furthermore, do not commit suicide if restoring the change buffer
      cursor fails. The worst that could happen is that a secondary index
      becomes corrupted due to incomplete change buffer merge.
      0ea625b3
    • Jan Lindström's avatar
      MDEV-15351: wsrep_sst_xtrabackup is broken in 10.1.31 · b2fc197b
      Jan Lindström authored
      Remove the setup_ports function call. This is related to
      https://github.com/MariaDB/server/pull/717
      
      Thanks to Daniel Black and Bart S.
      b2fc197b
  4. 08 May, 2018 2 commits
    • Vladislav Vaintroub's avatar
      MDEV-16105: Mariabackup does not support SSL · f98496da
      Vladislav Vaintroub authored
      The reason is the missing HAVE_OPENSSL define for mariabackup.
      f98496da
    • Vicențiu Ciorbaru's avatar
      Mroonga cmake failure - LZ4_LIBS = NOTFOUND · b62224e2
      Vicențiu Ciorbaru authored
      The following variables are used in this project, but they are set to NOTFOUND.
      LZ4_LIBS
      
      The reason for the failure is that pkg_check_modules will not guarantee
      <prefix>_LIBRARY_DIRS variable to be set, according to documentation.
      When it's not set, we would force find_library to look in an empty path
      and thus fail to correctly find LZ4_LIBS, although pck_check_modules
      did previously discover that the library is installed.
      
      To fix the problem and still keep the logic of first following
      LIBLZ4_LIBRARY_DIRS and *then* look at other paths, we call find_library
      twice. This is the recommended approach, according to CMake 3.11
      documentation.
      b62224e2