1. 26 Apr, 2017 20 commits
    • Debarun Banerjee's avatar
      BUG#25032066 PREPARED TRANSACTION SHOULD NOT BE ROLLED BACK BY HIGH PRIORITY TRANSACTION · bf5be323
      Debarun Banerjee authored
      Problem :
      ---------
      1. delete_all_rows() and rnd_init() are not returning error
      after async rollback in 5.7. This results in assert in
      innodb in next call.
      
      2. High priority transaction is rolling back prepared transaction.
      This is because TRX_FORCE_ROLLBACK_DISABLE is getting set only for
      first entry [TrxInInnoDB].
      
      Solution :
      ----------
      1. return DB_FORCED_ABORT error after rollback.
      2. check and disable rollback in TrxInInnodb::enter always.
      Reviewed-by: default avatarSunny Bains <sunny.bains@oracle.com>
      
      RB: 13777
      bf5be323
    • Knut Anders Hatlen's avatar
      Bug#25048573: STD::MAP INSTANTIATIONS CAUSE STATIC ASSERT FAILURES ON FREEBSD 11 · 9df04261
      Knut Anders Hatlen authored
      Problem: Some instantiations of std::map have discrepancies between
      the value_type of the map and the value_type of the map's allocator.
      On FreeBSD 11 this is detected by Clang, and an error is raised at
      compilation time.
      
      Fix: Specify the correct value_type for the allocators.
      
      Also fix an unused variable warning in storage/innobase/os/os0file.cc.
      9df04261
    • Vasil Dimov's avatar
      Fix Bug#24707869 GCC 5 AND 6 MISCOMPILE MACH_PARSE_COMPRESSED · 8923f6b7
      Vasil Dimov authored
      Prevent GCC from moving a mach_read_from_4() before we have checked that
      we have 4 bytes to read. The pointer may only point to a 1, 2 or 3
      bytes in which case the code should not read 4 bytes. This is a
      workaround to a GCC bug:
      https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77673
      
      Patch submitted by: Laurynas Biveinis <laurynas.biveinis@gmail.com>
      RB: 14135
      Reviewed by: Pawel Olchawa <pawel.olchawa@oracle.com>
      8923f6b7
    • Daniel Blanchard's avatar
      Bug #24711351 64 BIT WINDOWS MYSQLD BUILD REPORTS INNODB: OPERATING SYSTEM ERROR NUMBER 995 · 32f99b28
      Daniel Blanchard authored
      Description
      ===========
      Under heavy load, the aysnchronous Windows file IO API can return a
      failure code that is handled in MySQL Server by retrying the file IO operation.
      
      A cast necessary for the correct operation of the retry path in a 64 bit
      build is missing, leading to the file IO retry result being misinterpreted
      and ultimately the report of the OS error number 995
      (ERROR_OPERATION_ABORTED) in the MySQL error log.
      
      Fix
      ===
      Supply the missing cast.
      Reviewed-by: default avatarSunny Bains <sunny.bains@oracle.com>
      RB: 14109
      32f99b28
    • Vasil Dimov's avatar
      Fix Bug#24605956 SERVER MAY CRASH DUE TO A GLIBC BUG IN HANDLING SHORT-LIVED DETACHED THREADS · 6c76e5a0
      Vasil Dimov authored
      Avoid detaching and exiting from threads that may finish before the
      caller has returned from pthread_create(). Only exit from such threads,
      without detach and join with them later.
      
      Patch submitted by: Laurynas Biveinis <laurynas.biveinis@gmail.com>
      RB: 13983
      Reviewed by: Sunny Bains <sunny.bains@oracle.com>
      6c76e5a0
    • Marko Mäkelä's avatar
      Minor cleanup · da76c1bd
      Marko Mäkelä authored
      da76c1bd
    • Marko Mäkelä's avatar
      Adapt the innodb_undo tests from MySQL 5.7 · ce3ffefc
      Marko Mäkelä authored
      Simplify the tests that are present in MySQL 5.7. Make the table
      smaller while generating enough undo log. Do not unnecessarily
      drop tables.
      
      trx_purge_initiate_truncate(): Remove two crash injection points
      (before and after normal redo log checkpoint), because they are
      not adding any value. Clarify some messages.
      
      trx_sys_create_rsegs(): Display the number of active undo tablespaces.
      
      srv_undo_tablespaces_init(): When initializing the data files, do not
      leave srv_undo_tablespaces_active at 0.
      Do not display that number; let trx_sys_create_rsegs() display it once
      the final number is known.
      
      innodb_params_adjust(): Adjust parameters after startup.
      
      innobase_init(): Do not allow innodb_max_undo_size to be less
      than SRV_UNDO_TABLESPACE_SIZE_IN_PAGES. This avoids unnecessary
      repeated truncation of undo tablespaces when using
      innodb_page_size=32k or innodb_page_size=64k.
      ce3ffefc
    • Thirunarayanan Balathandayuthapani's avatar
      Bug #24488141 ACTIVE UNDO TABLESPACE NOT UPDATED WHEN INNODB_UNDO_LOGS IS INCREASED · d1bcc1f4
      Thirunarayanan Balathandayuthapani authored
      Problem:
      ========
       If we increase innodb_undo_logs value during startup. New rollback
      segment might get allocated during trx_sys_create_rseg(). Essentially, it
      would make these tablesapces active with transaction undo data and purge.
      But it doesn't come in active undo tablespaces. so these tablespace would
      never get truncated.
      
      Fix:
      ===
       Increase the number of active undo tablespace when we are assigning the
      undo tablespace to the newly assigned rollback segment.
      Reviewed-by: default avatarKevin Lewis <kevin.lewis@oracle.com>
      Reviewed-by: default avatarDebarun Banerjee <debarun.banerjee@oracle.com>
      RB: 13746
      d1bcc1f4
    • Marko Mäkelä's avatar
      Remove redundant initialization of some InnoDB startup parameters · bdfa49f6
      Marko Mäkelä authored
      The InnoDB startup parameters will be initialized via pointers
      in innobase_system_variables[]. Remove some redundant link-time
      initialization.
      bdfa49f6
    • Marko Mäkelä's avatar
      Follow-up to MDEV-12289: Support innodb_undo_tablespaces=127 · 206ecb79
      Marko Mäkelä authored
      MySQL 5.7 reduced the maximum number of innodb_undo_tablespaces
      from 126 to 95 when it reserved 32 persistent rollback segments
      for the temporary undo logs. Since MDEV-12289 restored all 128
      persistent rollback segments for persistent undo logs, the
      reasonable maximum value of innodb_undo_tablespaces is 127
      (not 126 or 95). This is because out of the 128 rollback segments,
      the first one will always be created in the system tablespace
      and the remaining ones can be created in dedicated undo tablespaces.
      206ecb79
    • Marko Mäkelä's avatar
      Remove TRX_SYS_OLD_N_RSEGS · 23ea4360
      Marko Mäkelä authored
      23ea4360
    • Marko Mäkelä's avatar
      Follow-up to Bug#24346574 PAGE CLEANER THREAD, ASSERT BLOCK->N_POINTERS == 0 · 472b5f0d
      Marko Mäkelä authored
      Silence the Valgrind warnings on instrumented builds (-DWITH_VALGRIND).
      
      assert_block_ahi_empty_on_init(): A variant of
      assert_block_ahi_empty() that declares n_pointers initialized and then
      asserts that n_pointers==0.
      
      In Valgrind-instrumented builds, InnoDB declares allocated memory
      uninitialized.
      472b5f0d
    • Marko Mäkelä's avatar
      Bug#24346574 PAGE CLEANER THREAD, ASSERT BLOCK->N_POINTERS == 0 · e63ead68
      Marko Mäkelä authored
      btr_search_drop_page_hash_index(): Do not return before ensuring
      that block->index=NULL, even if !btr_search_enabled. We would
      typically still skip acquiring the AHI latch when the AHI is
      disabled, because block->index would already be NULL. Only if the AHI
      is in the process of being disabled, we would wait for the AHI latch
      and then notice that block->index=NULL and return.
      
      The above bug was a regression caused in MySQL 5.7.9 by the fix of
      Bug#21407023: DISABLING AHI SHOULD AVOID TAKING AHI LATCH
      
      The rest of this patch improves diagnostics by adding assertions.
      
      assert_block_ahi_valid(): A debug predicate for checking that
      block->n_pointers!=0 implies block->index!=NULL.
      
      assert_block_ahi_empty(): A debug predicate for checking that
      block->n_pointers==0.
      
      buf_block_init(): Instead of assigning block->n_pointers=0,
      assert_block_ahi_empty(block).
      
      buf_pool_clear_hash_index(): Clarify comments, and assign
      block->n_pointers=0 before assigning block->index=NULL.
      The wrong ordering could make block->n_pointers appear incorrect in
      debug assertions. This bug was introduced in MySQL 5.1.52 by
      Bug#13006367 62487: INNODB TAKES 3 MINUTES TO CLEAN UP THE
      ADAPTIVE HASH INDEX AT SHUTDOWN
      
      i_s_innodb_buffer_page_get_info(): Add a comment that
      the IS_HASHED column in the INFORMATION_SCHEMA views
      INNODB_BUFFER_POOL_PAGE and INNODB_BUFFER_PAGE_LRU may
      show false positives (there may be no pointers after all.)
      
      ha_insert_for_fold_func(), ha_delete_hash_node(),
      ha_search_and_update_if_found_func(): Use atomics for
      updating buf_block_t::n_pointers. While buf_block_t::index is
      always protected by btr_search_x_lock(index), in
      ha_insert_for_fold_func() the n_pointers-- may belong to
      another dict_index_t whose btr_search_latches[] we are not holding.
      
      RB: 13879
      Reviewed-by: default avatarJimmy Yang <jimmy.yang@oracle.com>
      e63ead68
    • Thirunarayanan Balathandayuthapani's avatar
      Bug #23533396 ASSERTION !M_PREBUILT->TRX->CHECK_FOREIGNS · a6adf567
      Thirunarayanan Balathandayuthapani authored
      Analysis:
      ========
      A foreign key constraint cannot reference a secondary index defined
      on a generated virtual column. While adding new index/drop existing
      column, server internally drops the internal foreign key index and
      it leads to choose the virtual secondary index as foreign key index.
      But innodb doesn't allow foreign key constraint reference to
      secondary virtual index.
      
      Fix:
      ===
      Allow foreign key constraint refer to secondary index defined on
      a generated virutal column.
      
      Reviewed-by: Jimmy Yang<jimmy.yang@oracle.com>
      RB: 13586
      a6adf567
    • Marko Mäkelä's avatar
      Bug#24444831 MY_ERROR(ER_INNODB_ONLINE_LOG_TOO_BIG) CALLED WITH INVALID INDEX NAME · 93078c9c
      Marko Mäkelä authored
      This bug was introduced in MySQL 5.6.8 with WL#6255.
      When an error occurs while rebuilding a table that only has a
      hidden GEN_CLUST_INDEX inside InnoDB, ha_alter_info->key_info_buffer
      would be invalid and should not be dereferenced.
      
      get_error_key_name(): Get the name of an erroneous key.
      Avoid dereferencing ha_alter_info->key_info_buffer when no keys
      exist in the SQL layer.
      
      ha_innobase::inplace_alter_table(),
      ha_innobase::commit_try_rebuild(): Invoke get_error_key_name()
      for reporting ER_INNODB_ONLINE_LOG_TOO_BIG or ER_INDEX_CORRUPT.
      
      RB: 13834
      Reviewed-by: default avatarJimmy Yang <jimmy.yang@oracle.com>
      93078c9c
    • Marko Mäkelä's avatar
      Fix the -DWITH_INNODB_AHI=OFF build · 9a848ee1
      Marko Mäkelä authored
      9a848ee1
    • Marko Mäkelä's avatar
      Adjust a test for WL9513 Bug#23333990 · 8080d79f
      Marko Mäkelä authored
      8080d79f
    • Igor Babaev's avatar
      Fixed the bug mdev-12556. · c7a15345
      Igor Babaev authored
      When the rows produced on the current iteration are sent to the
      temporary table T of the UNION type created for CTE the rows
      that were not there simultaneously are sent to the temporary
      table D that contains rows for the next iteration. The test
      whether a row was in T checks the return code of writing into T.
      If just a HEAP table is used for T then the return code is
      HA_ERR_FOUND_DUPP_KEY, but if an ARIA table is used for T then
      the return code is HA_ERR_FOUND_DUPP_UNIQUE.
      The implementation of select_union_recursive::send_data()
      erroneously checked only for the first return code. So if an Aria
      table was used for T then all rows produced by the current iteration
      went to D and and in most cases D grew with each iteration.
      Whether T has reached stabilization is detected by
      checking whether D is empty. So as a result, the iterations were
      never stopped unless a limit for them was set.
      
      Fixed by checking for both HA_ERR_FOUND_DUPP_KEY and
      HA_ERR_FOUND_DUPP_UNIQUE as return codes returned by
      the function writing a row into the temporary table T.
      c7a15345
    • Sachin Setiya's avatar
      MDEV-12017 Unclear error with flashback: Variable 'binlog_format' can't ... · e180c356
      Sachin Setiya authored
      When WSREP(thd) is not true we will use my_error(...) to print error. This
      will set thd->is_error() to true and we wont be getting generic error.
      Signed-off-by: default avatarSachin Setiya <sachin.setiya@mariadb.com>
      e180c356
    • Igor Babaev's avatar
      Fixed the bug mdev-12558. · a287bfa0
      Igor Babaev authored
      In the current code temporary tables we identified and opened before
      other tables. CTE tables are identified in the same procedure as
      regular tables. When a temporary table and a CTE table have the same
      name T any reference to T that is in the scope of the CTE declaration
      must be associated with this CTE. Yet it was not done properly.
      When a reference to T was found in the scope of the declaration
      of CTE T a pointer to this CTE was set in the reference. No check
      that the reference had been already associated with a temporary table
      was done. As a result, if the temporary table T  had been created then
      the reference to T was considered simultaneously as reference to the CTE
      named T and as a reference to the temporary table named T. This
      confused the code that were executed later and caused a crash of
      the server.
      Now when a table reference is associated with a CTE any previous
      association with a temporary table is dropped.
      
      This problem could be easily avoided if the temporary tables were
      not identified prematurely.
      as reference to CTE named T and
      a287bfa0
  2. 25 Apr, 2017 3 commits
  3. 24 Apr, 2017 13 commits
    • Igor Babaev's avatar
      Fixed the bug mdev-12564. · 0906dc49
      Igor Babaev authored
      Here's  what started happening after the patch that fixed
      the bug mdev-10454 with query reported for the bug
      SELECT * FROM t t1 right JOIN t t2 ON (t2.pk = t1.pk)
        WHERE (t2.i, t2.pk) NOT IN ( SELECT t3.i, t3.i FROM t t3, t t4 )
              AND t1.c = 'foo';
      The patch added an implementation of propagate_equal_fields() for
      the class Item_row and thus opened the possibility of equal fields
      substitutions.
      At the prepare stage after setup_conds() called for WHERE condition
      had completed the flag of maybe_null of the Item_row object created
      for  (t2.i, t2.pk) was set to false, because the maybe_null flags of
      both elements were set to false. However the flag of maybe_null for
      t1.pk from the ON condition were set to true, because t1 was an inner
      table of an outer join.
      At the optimization stage the outer join was converted to inner join,
      but the maybe_null flags were not corrected and remained the same.
      So after the substitution t2.pk/t1.pk. the maybe_null flag for the
      row remained false while the maybe_flag for the second element of
      the row was true. As a result, when the in-to_exists transformation
      was performed for the NOT IN predicate the guards variables were
      not created for the elements of the row, but a guard object for
      the second element was created. The object were not valid because
      it referred to NULL as a guard variable. This ultimately caused
      a crash when the expression with the guard was evaluated at the
      execution stage.
      
      The patch made sure that the guard objects are not created without
      guard variables.
      
      Yet it does not resolve the problem of inconsistent maybe_null flags.
      and it might be that the problem will pop op in other pieces of code.
      The resolution of this problem is not easy, but the problem should
      be resolved in future versions.
      0906dc49
    • Aditya A's avatar
      WL9513 Bug#23333990 PERSISTENT INDEX STATISTICS UPDATE BEFORE TRANSACTION IS COMMITTED · 44b1fb36
      Aditya A authored
      PROBLEM
      
      By design stats estimation always reading uncommitted data. In this scenario
      an uncommitted transaction has deleted all rows in the table. In Innodb
      uncommitted delete records are marked as delete but not actually removed
      from Btree until the transaction has committed or a read view for the rows
      is present.While calculating persistent stats we were ignoring the delete
      marked records,since all the records are delete marked we were estimating
      the number of rows present in the table as zero which leads to bad plans
      in other transaction operating on the table.
      
      Fix
      
      Introduced a system variable called innodb_stats_include_delete_marked
      which when enabled includes delete marked records for stat
      calculations .
      44b1fb36
    • Marko Mäkelä's avatar
      Bug#22018745 CORRUPTION IN ONLINE TABLE REBUILD (ROW_FORMAT=REDUNDANT, INDEXED VIRTUAL COLUMN) · 6f5f7208
      Marko Mäkelä authored
      Apparently, WL#8149 QA did not cover the code changes made to
      online table rebuild (which was introduced in MySQL 5.6.8 by WL#6255)
      for ROW_FORMAT=REDUNDANT tables.
      
      row_log_table_low_redundant(): Log the new values of indexed virtual
      columns (ventry) only once.
      
      row_log_table_low(): Assert that if o_ventry is specified, the
      logged operation must not be ROW_T_INSERT, and ventry must be specified
      as well.
      
      row_log_table_low(): When computing the size of old_pk, pass v_entry=NULL to
      rec_get_converted_size_temp(), to be consistent with the subsequent call
      to rec_convert_dtuple_to_temp() for logging old_pk. Assert that
      old_pk never contains information on virtual columns, thus proving that this
      change is a no-op.
      
      RB: 13822
      Reviewed-by: default avatarJimmy Yang <jimmy.yang@oracle.com>
      6f5f7208
    • Thirunarayanan Balathandayuthapani's avatar
      Bug #20989615 INNODB AUTO_INCREMENT PRODUCES SAME VALUE TWICE · 223eb5fb
      Thirunarayanan Balathandayuthapani authored
      Problem:
      =======
      Autoincrement value gives duplicate values because of the following reasons.
      
      (1) In InnoDB handler function, current autoincrement value is not changed
      based on newly set auto_increment_increment or auto_increment_offset variable.
      
      (2) Handler function does the rounding logic and changes the current
      autoincrement value and InnoDB doesn't aware of the change in current
      autoincrement value.
      
      Solution:
      ========
      Fix the problem(1), InnoDB always respect the auto_increment_increment
      and auto_increment_offset value in case of current autoincrement value.
      By fixing the problem (2), handler layer won't change any current
      autoincrement value.
      Reviewed-by: default avatarJimmy Yang <jimmy.yang@oracle.com>
      RB: 13748
      223eb5fb
    • Marko Mäkelä's avatar
      Bug#24397406 INNODB: ALGORITHM=INPLACE FAILS TO PROMOTE UNIQUE KEY TO CLUSTERED INDEX · 01389ee8
      Marko Mäkelä authored
      When a table has no PRIMARY KEY, but there is a UNIQUE INDEX
      defined on NOT NULL columns that are not column prefixes,
      that unique index must be treated as the primary key.
      
      This property was being violated by InnoDB when a column was changed
      to NOT NULL, such that a UNIQUE INDEX on that column became eligible
      to being treated as a primary key.
      
      innobase_create_key_defs(): Instead of checking each ADD [UNIQUE] INDEX
      request, check if a GEN_CLUST_INDEX can be replaced with any unique index
      in the altered_table definition. So, we can have new_primary even
      if n_add==0.
      
      prepare_inplace_alter_table_dict(): When the table is not being rebuilt,
      assert that TABLE_SHARE::primary_key is not changing.
      
      RB: 13595
      Reviewed-by: default avatarKevin Lewis <kevin.lewis@oracle.com>
      01389ee8
    • Shaohua Wang's avatar
      BUG#24331265 MEMORY LEAK IN SOME INNODB FTS TESTS · 92f7f81b
      Shaohua Wang authored
      We don't free some memory used by fts optimize thread in release build.
      
      Patch approved by Allen.Lai over IM.
      92f7f81b
    • Thirunarayanan Balathandayuthapani's avatar
      Bug #24347476 HIGH PRIORITY TRX FAILED TO KILL LOW PRIORITY TRX WHEN FOREIGN KEYS ARE INVOLVED · f5759bd8
      Thirunarayanan Balathandayuthapani authored
      Problem:
      =======
      High priority transaction can't able to kill the blocking transaction
      when foreign keys are involved. trx_kill_blocking() missing while checking
      the foreign key constraint.
      
      Fix:
      ===
      Add trx_kill_blocking() while checking for the foreign key constraint.
      Reviewed-by: default avatarDebarun Banerjee <debarun.banerjee@oracle.com>
      RB: 13579
      f5759bd8
    • Shaohua Wang's avatar
      BUG#23760086 INNODB: ASSERTION FAILURE: MACH0DATA.IC:56:(N | 0XFFFFUL) <= 0XFFFFUL · a930c0aa
      Shaohua Wang authored
      Analysis: In row_log_table_delete(), extern size could be greater
      than 2 bytes int if there are enough index on blob columns.
      
      Solution: Use 4 bytes int other than 2 bytes for extern size.
      Reviewed-by: default avatarMarko Mäkelä <marko.makela@oracle.com>
      RB: 13573
      a930c0aa
    • Shaohua Wang's avatar
      BUG#23477773 OPTION TO TURN OFF/ON DEADLOCK CHECKER · d3a2f60e
      Shaohua Wang authored
      Backport WL#9383 INNODB: ADD AN OPTION TO TURN OFF/ON DEADLOCK CHECKER
      (rb#12873) to 5.7.
      d3a2f60e
    • Shaohua Wang's avatar
      Followup: BUG#23479595 SEGMENTATION FAULT WHEN SELECT FTS INDEX TABLES IN INFORMATION SCHEMA · 1a5ca702
      Shaohua Wang authored
      BUG#23742339 FAILING ASSERTION: SYM_NODE->TABLE != NULL
      
      Analysis: When we access fts aux tables in information schema,the
      fts aux tables are dropped by DROP DATABASE in another session.
      
      Solution: Drop parent table if it's a fts aux table, and drop
      table will drop fts aux tables together.
      Reviewed-by: default avatarJimmy Yang <jimmy.yang@oracle.com>
      RB: 13264
      1a5ca702
    • Shaohua Wang's avatar
      BUG#24315031 FAILING ASSERTION: !TABLE->CAN_BE_EVICTED · b862c797
      Shaohua Wang authored
      Analysis:
      the old table is dropped, just after it's added into drop list,
      and new table with the same name is created, then we try to drop
      the new table in background.
      
      Solution:
      Don't drop a table in background if table->to_be_dropped is false.
      Reviewed-by: default avatarJimmy Yang <jimmy.yang@oracle.com>
      RB: 13414
      b862c797
    • Shaohua Wang's avatar
      BUG#24009272 SEGFAULT WITH CREATE+SELECT FROM IS+DROP FTS TABLE CONCURRENTLY · 9ce1ea6f
      Shaohua Wang authored
      Analysis:
      When we access fts_internal_tbl_name in i_s_fts_config_fill (),
      it can be set to NULL by another session.
      
      Solution:
      Define fts_internal_tbl_name2 for global variable innodb_ft_aux_table,
      if it's NULL, set fts_internal_tbl_name to "default".
      Reviewed-by: default avatarJimmy Yang <jimmy.yang@oracle.com>
      RB: 13401
      9ce1ea6f
    • Thirunarayanan Balathandayuthapani's avatar
      Bug #23475211 COMBINING ALTER OPERATIONS TRIGGERS TABLE REBUILD · 4b5a9d8e
      Thirunarayanan Balathandayuthapani authored
      Problem:
      =======
      Inplace alter algorithm determines the table to be rebuild if the table
      undergoes row format change, key block size if handler flag contains only
      change table create option. If alter with inplace ignore flag operations and change table create options then it leads to table rebuild operation.
      
      Solution:
      ========
      During the check for rebuild, ignore the inplace ignore flag and check for
      table create options.
      Reviewed-by: default avatarJimmy Yang <jimmy.yang@oracle.com>
      Reviewed-by: default avatarMarko Makela <marko.makela@oracle.com>
      RB: 13172
      4b5a9d8e
  4. 23 Apr, 2017 1 commit
  5. 21 Apr, 2017 3 commits
    • Igor Babaev's avatar
      Fixed the bug mdev-12519. · 54a995cd
      Igor Babaev authored
      This patch fixed some problems that occurred with subqueries that
      contained directly or indirectly recursive references to recursive CTEs.
      
      1. A [NOT] IN predicate with a constant left operand and a non-correlated
      subquery as the right operand used in the specification of a recursive CTE
      was considered as a constant predicate and was evaluated only once.
      Now such a predicate is re-evaluated after every iteration of the process
      that produces the records of the recursive CTE.
      2. The Exists-To-IN transformation could be applied to [NOT] IN predicates
      with recursive references. This opened a possibility of materialization
      for the subqueries used as right operands. Yet, materialization
      is prohibited for the subqueries if they contain a recursive reference.
      Now the Exists-To-IN transformation cannot be applied for subquery
      predicates with recursive references.
      
      The function st_select_lex::check_subqueries_with_recursive_references()
      is called now only for the first execution of the SELECT.
      54a995cd
    • Marko Mäkelä's avatar
      Fix a crash when page_compression fails during IMPORT TABLESPACE · 14d12488
      Marko Mäkelä authored
      fil_compress_page(): Check for space==NULL.
      14d12488
    • Marko Mäkelä's avatar
      11f772fa