commit 73b6cff33896a3cd0f0d02d6c30fdaed8b562cf3
Author: Bjorn Munch <bjorn.munch@oracle.com>
Date:   Thu Jan 18 16:32:40 2018 +0100

    Incorporate latest approved LICENSE file
    
    Updated README according to new condensed template.
    
    Also updated copy for DEB packaging.

commit 876a72f83457403c5165623fd7a31699563d08ef
Author: Bjorn Munch <bjorn.munch@oracle.com>
Date:   Thu Jan 4 14:12:56 2018 +0100

    Added FOSS exception to all implementation files used by client lib
    
    Again, did not update copyright year

commit 11c31c04840c35d5463453a0a1268ebbcdfdee5b
Author: Satya Bodapati <satya.bodapati@oracle.com>
Date:   Wed Jan 3 07:29:25 2018 +0100

    Bug#27331936 - RECOVERY FAILING WITH TABLESPACE ID: 1 = ['MYSQL.IBD', 'SYS/SYS_CONFIG.IBD'] ERR
    
    Problem:
    --------
    Recovery cannot determine space_id properly and aborts
    
    This is because we read tablespace flags from wrong offsets and
    inturn we calculate wrong page size. With wrong page_size, all
    bets are off.
    
    Fix:
    ----
    Read space flags from correct offset
    
    Revewied-By: debarun.banerjee@oracle.com
    Approved on IM

commit 97275ae3019c0e3ecf508fe13532faaa47eb08b2
Author: Sunny Bains <Sunny.Bains@oracle.com>
Date:   Wed Dec 13 10:16:20 2017 +1100

    BUG#27253116 - ASSERT FAILURE AT SERVER STARTUP WHEN KEYRING FILE EXTENSION IS .IBD
    
    A tablespace can never have a space ID of 0. Ignore tablespaces with
    tablespace ID 0.
    
    Approved by Jimmy over IM.

commit 561c81313fdf7baefcc2cd853fdc399adf525755
Author: Sunny Bains <Sunny.Bains@oracle.com>
Date:   Fri Dec 15 22:42:25 2017 +1100

    Bug#27263206 - ASSERTION FAILURE: FIL0FIL.CC:4133:(*FILE)->IN_USE == 0
    
    The assertion will not hold after WL#8619. A thread that is preparing to
    do IO will increment file.in_use. This will ensure that the file is not closed
    by some other thread. After that it will try and acquire the Fil_shard::mutex.
    
    Some additional code clean up too.
    
    RB#18260 Approved by: Bin Su

commit 8dd98ddf79d2a91c207cf8aa2308e8c885f4509e
Author: Sunny Bains <Sunny.Bains@oracle.com>
Date:   Mon Dec 18 18:29:42 2017 +1100

    Bug 27265473 - FIL_N_FILE_OPENED > 0 ASSERTION HIT WHEN SHUTTING DOWN MYSQLD
    
    WL#8619 follow up fix.
    
    fil_n_file_opened is only a view on Fil_shard::s_n_open. Read the value
    of Fil_shard::s_n_open for monitoring purposes.
    
    Change message to info(), the difference is expected because after
    WL#8619 there is no global mutex protecting the IO state of individual
    files.

commit 5bfb7afd85a52bcf482620b45ec22ed2da6d3886
Author: Sunny Bains <Sunny.Bains@oracle.com>
Date:   Fri Dec 15 18:10:33 2017 +1100

    Bug#27265874 - TABLESPACE ID DISCOVERY ON STARTUP IS BROKEN
    
    The compare with the previous value is broken. The fix is to read the
    the value into an array and then do a compare separately. If there is
    any mismatch then we fallback to the slower tablespace ID lookup.
    
    RB#18258 Approved by Bin Su.

commit f6d7b55d4d87b38f881847e379fc35c96f6e4fd7
Author: Lars Tangvald <lars.tangvald@oracle.com>
Date:   Mon Dec 11 10:01:21 2017 +0100

    Bug#24008883        NO DEBUG SYMBOLS INCLUDED FOR DEB PACKAGES
    
    Postpush fix:
    The test-dbgsym package had a dependency on test-core, which does not exist.

commit 4bc3fb5b7922f92f7f2bc79cd88e53c0df91beaf
Author: Thayumanavar S <thayumanavar.x.sachithanantha@oracle.com>
Date:   Tue Dec 12 09:08:14 2017 +0100

    BUG#27245918 - RESTART COMMAND DOESN'T WORK WITH UBUNTU
    	       PACKAGE
    
    The patch adds RestartForceExitStatus key to systemd service files
    in deb packaging. Also it fixes some typo issues in the service
    files.
    Patch reviewed and approved by Lars and Terje via e-mail.

commit 8e696cf0c35216d1dece95f0f854ad808f690c15
Author: Satya Bodapati <satya.bodapati@oracle.com>
Date:   Thu Dec 14 09:46:44 2017 +0100

    Bug#27261822 - EMPTY GENERAL TABLESPACE CRASHES UPGRADE
    
    Problem:
    -------
    Upgrade with empty general tablespace (no CREATE TABLE using
    general tablespace), crashes the upgrade to 8.0
    
    This is because we assumed the initial number of pages of an
    5.7 IBD file to be 6. This is true for file_per_table tablespaces.
    Size of freshly created tablespace is 4 and we expect minimum
    6 pages. Hence the assert.
    
    Fix:
    ----
    Use the right mininum size of IBD file as 4 pages.
    
    Reviewed-By: Sunny Bains <sunny.bains@oracle.com>
    Approved on IM

commit 72906ecbd152fadabb26cb78b92e556b9668807d
Author: Lukasz Kotula <lukasz.kotula@oracle.com>
Date:   Thu Dec 14 10:20:14 2017 +0100

    BUG#27257722 - PASSWORD CACHE IS NOT FILLED FOR USERS WITH EMPTY PASSWORD
    
    Description
    ===========
    X Plugin is able to authenticate an account without a password using
    PLAIN method. SHA256_MEMORY method doesn't work.
    
    Fix
    ===
    X Plugin implements verificators for server account types. Each of
    those verificators was inserting entry into the cache when password
    was not empty. The patch changes the order of verification, making
    sure that the entry is inserted to X Plugins cache.
    
    RB:18250
    Reviewed-by: Grzegorz Szwarc <grzegorz.szwarc@oracle.com>
    Reviewed-by: Tomasz Stepniak <tomasz.s.stepniak@oracle.com>

commit b39fc29f9b48a18556383fa2abcfaac7f96cfa87
Author: Bjorn Munch <bjorn.munch@oracle.com>
Date:   Fri Dec 22 12:27:42 2017 +0100

    BUG #27204869 ADD LICENSE BOOK TO ALL PACKAGES
    
      Follow-up update: COPYING is to be removed
      Removed all reference to top level COPYING

commit 645b856ed038beb8340ef4fa4f00c8cd67df5d30
Author: Bjorn Munch <bjorn.munch@oracle.com>
Date:   Thu Dec 14 22:06:08 2017 +0100

    BUG #27204869 ADD LICENSE BOOK TO ALL PACKAGES
    
      File LICENCE is added to all packages (like README is now)
      COPYING is in addition only for gpl
      Text of README and LICENCE not final, need to be refreshed later.
      This will not affect any of the packaging code.
    
      Note that README and LICENCE are replaced for commercial build
      (outside the scope of this)
    
      cmake macros DEB_NDB_RULES_* are dead code so removed rather than update.

commit 1faaeba4b0cdc2d5076baf618b050c760270da6d
Author: Bjorn Munch <bjorn.munch@oracle.com>
Date:   Wed Jan 3 10:19:55 2018 +0100

    Adding extra clause to all GPL headers
    
    Did not update copyright year

commit 268fdc4f391816c1709c154ebe8e73f6c572b121
Author: Bjorn Munch <bjorn.munch@oracle.com>
Date:   Mon Dec 11 15:09:36 2017 +0100

    Update user visible copyrights to 2018
    
    (cherry picked from commit 0f7886bac81fe7be820c27005a8be6e98e403951)

commit 0c81c8d5548f43b83b6dd35afc3cc77574bdc11c
Author: Sunny Bains <Sunny.Bains@oracle.com>
Date:   Mon Dec 11 15:00:42 2017 +1100

    WL#8619 - Follow up test fix
    
    Generalise the regexp in the message suppression.

commit e6224ed2defd44add5e324295ffc3586c26ba5c2
Author: Sunny Bains <Sunny.Bains@oracle.com>
Date:   Mon Dec 11 14:47:38 2017 +1100

    WL#8619 - Follow up fix
    
    Fix a Valgrind error. Revert a change to the encryption code.

commit 566c1496717ab1c75655909f2c88615c3d3aedab
Author: Ramil Kalimullin <ramil.kalimullin@oracle.com>
Date:   Sat Dec 9 23:42:29 2017 +0400

    Bug#25094892: ADD SUPPORT FOR OPENSSL 1.1

commit 999d06aa7f2c9ab78c1f547073edd7279a631803
Author: Lukasz Kotula <lukasz.kotula@oracle.com>
Date:   Sat Dec 9 10:06:38 2017 +0100

    WL#10992 - xplugin: sha256 challenge response against in-memory sha256-storage
    
    Follow-up patch for audit_log_mysqlx

commit c2dd12c418c5f93d09a0f2d919a0a3d9862607cc
Author: Narayanan Venkateswaran <v.narayanan@oracle.com>
Date:   Sat Dec 9 08:07:35 2017 +0100

    WL#11070: Change the tracker file format to JSON
    
    Follow-up patch to fix meb.tracker_file_invalid

commit bf1992988c215d9ffb47aba08ffd0f89cdecba77
Author: Praveenkumar Hulakund <praveenkumar.hulakund@oracle.com>
Date:   Sat Dec 9 04:19:51 2017 +0100

    WL#9344 - Logging services: error messages
    
    Follow-up patch: Error codes of the client and server
    are separated by this patch. Error codes of the server
    error logs starts from 10000.
    
    Change-Id: Idf80c88281e78dcc3de7833297ee3f1b8cb639ed

commit 4d07c10733376d1d4bdcaa77bc90a8cb8a1724c2
Author: Tomasz Stepniak <tomasz.s.stepniak@oracle.com>
Date:   Tue Dec 5 17:51:11 2017 +0100

    WL#10992 - xplugin: sha256 challenge response against in-memory sha256-storage
    
    Allow client to authenticate using SASL method which uses SHA256 for challenge
    and caching. Caching is going to reduce costful operations.
    
    Reviewed by: Grzegorz Szwarc <grzegorz.szwarc@oracle.com>
    Reviewed by: Lukasz Kotula <lukasz.kotula@oracle.com>
    
    Approved by: Prabeen Kumar Pradhan <prabeen.pradhan@oracle.com>

commit 347c5fa91340b96ed1ed7bc3836ef36dcc172d82
Author: Praveenkumar Hulakund <praveenkumar.hulakund@oracle.com>
Date:   Sat Dec 9 01:38:15 2017 +0100

    WL#9344 - Logging services: error messages
    
    Follow-up patch to fix compilation issue found xplugin unit test.

commit cf9570c859d97a10aa4c84a189744476c22d694f
Author: Lukasz Kotula <lukasz.kotula@oracle.com>
Date:   Sat Dec 9 00:54:59 2017 +0100

    Fix for build failure after delivery:
    
    1) WL#9344 - Logging services: error messages
    2) Undefined variable

commit 88470fe39bccd6d6eeeec0b22b2ba5d60d1b829d
Author: Lukasz Kotula <lukasz.kotula@oracle.com>
Date:   Sat Dec 9 00:43:20 2017 +0100

    Fix for build failure after delivery:
    
    WL#9344 - Logging services: error messages

commit 4eac7bc40882320e3d4d961c49f665021573b6b1
Author: Praveenkumar Hulakund <praveenkumar.hulakund@oracle.com>
Date:   Fri Dec 8 22:23:30 2017 +0100

    WL#9344 - Logging services: error messages
    
    Follow-up patch to replace sql_print_* and my_plugin_log_message
    with the new APIs LogErr().
    
    As part of this patch, sql_print_* and my_plugin_log_message
    are replaced in the plugin and components code.
    
    Patch even introduces error codes for these error messages.

commit 44457819a4ff568f44583f5d1db6f172fd1227f5
Author: Sivert Sorumgard <sivert.sorumgaard@oracle.com>
Date:   Mon Aug 28 15:19:00 2017 +0200

    WL#9553: Upgrading the transactional data dictionary tables.
    
    This patch implements support for changing the DD table
    definitions.
    
    Overview.
    ---------
    The main changes are the following:
    
    - SE private data previously hard coded in InnoDB is now
      used only during first time server start. The meta data
      is stored in a DD table. On restart, the meta data is
      fetched from the DD table instead of InnoDB. Thus, we
      may have SE private data that can change.
    
    - During upgrade, we create the required target tables in
      a temporary schema, and migrate the meta data from the
      actual DD tables to the new target tables.
    
    - At the end of upgrade, we modify the persistently stored
      SE private data mentioned in 1) to that of the new target
      tables. We also adjust the schema ID of the target tables
      to simulate altering the schema of the tables. This way,
      we are able to switch from the old to the new DD version
      atomically. The temporary schemas are removed on next
      restart.
    
    In more detail, the patch implements the following:
    
    Performance schema.
    -------------------
    - Change in a performance schema test: Select only the PS_VERSION
      from 'mysql.dd_properties' to avoid reflecting irrelevant meta
      data in the result file, and thus to avoid unnecessary re-recordings
      of the result file.
    
    - Minor changes in the way Plugin_table_impl is used; replaced by
      Object_table_impl for more uniform code.
    
    - Approved by Marc Alff.
    
    Handler and handlerton API and InnoDB.
    --------------------------------------
    - The handler function 'get_se_private_data()' will now be
      called only during '--initialize'. During ordinary restart,
      it will be called once to get the SE private data for the
      'mysql.dd_properties' table, which can never change. This
      is the table that stores the SE private data for the other
      DD tables.
    
    - Modify 'get_se_private_data()' to be in line with what
      'dd_write_table()' does when storing SE private data:
    
      * Store se_private_data for columns. This is now done
        for DD tables in the same way as it is done for
        user tables.
      * Extend se_private_data for indexes to also store
        table_id and space_id. Again, this is done to get
        the same set of meta data for DD tables and user
        tables.
    
      Could dd_write_table() be used to ensure consistency in the
      meta data that is stored?
    
    - At the end of upgrade, we start over DD initialization to
      do the same as for a restart. Thus, we had to provide a new
      parameter to 'get_se_private_data()' to reset the counters
      for this to work with two phases of function calls in the
      case of upgrade.
    
    - We maintain a set in InnoDB of SE private ids of the DD tables.
      This set is used this instead of the hard coded id range used
      previously.
    
    - Replace hard coded ids of tables used in the processing
      of I_S queries by name based lookup.
    
    - Change the order of the DD and DDSE tables in the System_tables
      registry to make sure the table 'innodb_dynamic_metadata' is
      created on a low table id and index id. The motivation is that
      for now, this table must stay at fixed ids because it may be
      opened by InnoDB before the DD is available.
    
    - Approved by Jimmy.
    
    Extensions of 'mysql.dd_properties' and data structures.
    --------------------------------------------------------
    - Valid key/value pairs are explicitly defined:
    
        DD_VERSION                Actual DD version.
        IS_VERSION                Actual I_S version.
        PS_VERSION                Actual P_S version.
        SDI_VERSION               Actual SDI version.
        LCTN                      L_C_T_N setting used during
                                  --initialize.
        MYSQLD_VERSION_LO         Lowest server version which has
                                  been using the data directory.
        MYSQLD_VERSION_HI         Highest server version which has
                                  been using the data directory.
        MYSQLD_VERSION            Current server version.
        MINOR_DOWNGRADE_THRESHOLD The current DD can be used by
                                  previous MRUs, unless their
                                  target DD version is less than
                                  the downgrade threshold.
        SYSTEM_TABLES             List of system tabels with
                                  definitions.
        UPGRADE_TARGET_SCHEMA     Temporary schema used during
                                  upgrade.
        UPGRADE_ACTUAL_SCHEMA     Temporary schema used during
                                  upgrade.
    
    - Simplify Object_table, Object_table_definition,
      Plugin_table_definition, their subclasses and clients.
      Remove unnecessary functions, and rename according to
      usual naming rules. Merge Object_table* and Plugin_table*
      into one class.
    
    - Version number handling does not need to be part of these
      classes, this will be handled elsewhere, so it is removed.
    
    - Object table definitions now may hold definitions of both
      the target and actual tables.
    
    - Introduce explicit enumerations for options, indexes and
      foreign keys for the DD table definitions.
    
    - Explicitly define indexes needed by foreign keys.
    
    - Use the index enumerations when creating instances of
      object keys.
    
    - A new 'DD_bootstrap_ctx' class is introduced as an aid in the
      upgrade process, but also for normal DD bootstrapping. The
      handling of the bootstrap stages is moved into this class.
    
    Changes to the current DD initialization.
    -----------------------------------------
    - Extend the bootstrapper to create target or actual tables
      depending on context.
    
    - Change the way DD objects are flushed (during --initialize) and
      synced (during restart) to avoid problems with overlapping
      ID sequences for the scaffolding and the persisted object IDs.
      This is needed since the DD tables will no more be fixed on low
      IDs.
    
    - Add a new stage before creating tables where the inert table
      'dd_properties' is opened and the version numbers etc. is read.
      Here, the actual DD table definitions are read in case of
      upgrade or minor downgrade.
    
    New handling of upgrade.
    ------------------------
    - Create two temporary schemas with unused schema names, store
      in 'dd_properties'.
    
    - Upon restart, the temporary schemas are dropped.
    
    - First initialize the meta data for the actual DD tables, and
      use this to open the actual tables.
    
    - Then create the target tables, and migrate the meta data from
      the old to the new tables.
    
    - Adjust object ids to simulate altering schema of the new
      and old DD tables at the end of DD upgrade.
    
    - Update properties for all tables, make sure removed
      tables are not reflected in the persisted properties.
    
    Add 'options' columns.
    ----------------------
    - Add a general purpose column to all DD tables that store
      DD entities (i.e.:
    
            catalogs,
            character_sets,
            collations,
            column_statistics,
            events,
            resource_groups,
            routines,
            schemata,
            st_spatial_reference_systems,
           *tables,
           *tablespaces
    
    - Plus a selection of important non-entity tables:
    
           *columns,
           *indexes,
            foreign_keys,
            triggers,
           *parameters
    
    - Tables prefixed by '*' above already have a column named
      'options' which can be used for this purpose.
    
    Miscellaneous.
    --------------
    - Set created/last altered when creating schema.
    
    - Add command line option for disabling automatic DD upgrade.
    
    - Change test for is_dd_table_name() to check for table types in the
      System_tables registry.
    
    - Change dictionary object type names for better conformity.
    
    - Remove *_type classes for the DD object classes.
    
    - Refactor object table usage
    
    Test changes.
    -------------
    - Extend dd_schema_definition_debug_c{i,s} to also record the
      CREATE TABLE statements for the DD tables.
    
    - Record new test results.
    
    - Mask out the DD version number from the SDI which is extracted
      from tablespace files in some tests.

commit 65e91e69a5cb161dc5c799ab2e62a61b4f792573
Author: Tatiana Azundris Nuernberg <tatjana.nuernberg@oracle.com>
Date:   Fri Dec 8 15:03:14 2017 +0000

    WL9651 - post push fix

commit eeb0591b0badd5335e0fde103c418751d42c649f
Author: Narayanan Venkateswaran <v.narayanan@oracle.com>
Date:   Fri Dec 8 16:37:16 2017 +0530

    WL#11070: Change the tracker file format to JSON
    
    The tracker file (tablespace_tracker), used to track information about
    the remote or external tablespaces during a backup, is currently in a
    rigid text format. This must be changed to the json format for
    enhanced readability and alternation by the users of backup.
    
    RB#17337

commit 092146082ea77060e7cd7f0df443042a3d79c061
Author: Tomasz Stepniak <tomasz.s.stepniak@oracle.com>
Date:   Fri Dec 8 09:53:04 2017 +0100

    WL#9267 - Mysqlx connection timeout
    
    X plugin is monitoring I/O operations for authenticated users so it
    could drop idle connections.
    
    RB: 17006
    Reviewed by: Grzegorz Szwarc <grzegorz.szwarc@oracle.com>
    Reviewed by: Lukasz Kotula <lukasz.kotula@oracle.com>
    
    Approved by: Prabeen Kumar Pradhan <prabeen.pradhan@oracle.com>

commit f52d083387fbdfd35c46b62390060af1722f7db1
Author: Sunny Bains <Sunny.Bains@Oracle.Com>
Date:   Fri Dec 8 14:03:53 2017 +0100

    WL#8619 - Disable (debug) server version checks in the tablespace.

commit f7f4de19644fc4a44b947dafab66b20e4c07052f
Author: Sunny Bains <Sunny.Bains@oracle.com>
Date:   Fri Dec 8 20:13:48 2017 +1100

    WL#8619 - Follow up, add tests that went walkies.

commit 6b764cd71ab6eaa81ed7b5e7e377056d85424507
Author: Sunny Bains <Sunny.Bains@oracle.com>
Date:   Fri Dec 8 18:12:28 2017 +1100

    WL#8619 - Add tests that went walkies.

commit 1ee3e82c46556fa97c70444fb7635dd9f1b85630
Author: Sunny Bains <Sunny.Bains@oracle.com>
Date:   Fri Dec 8 17:04:18 2017 +1100

    WL#8619 - Follow up fix for Solaris x64.

commit a7da7faee2dc5432570987e16e7f4c8348292392
Author: Sunny Bains <Sunny.Bains@oracle.com>
Date:   Fri Dec 8 12:10:42 2017 +1100

    WL#8619 - InnoDB: Provide offline database portability without ISL files
    
    Summary of changes.
    
    1. Introduce --innodb-directories := "dir1;...;dirN". This is renamed
       from --innodb-scan-directories which was introduced in WL#9499.
       Currently this is not dynamic.
    2. Revert to 5.6 behaviour where we scan directories and find .ibd files.
       If you move tablespaces to a new location, add the path to
       innodb-data-directories so that InnoDB can "discover" the files on
       startup.
    3. Tablespaces can only be created under known directories. This
       eliminates the need for .isl files.
    4. Upgrade redo log format, not backward compatible
    5. Change redo log type IDs
    6. Code cleanup
    7. Shard the fil system data structures for performance
    8. Remove WL#9499 files that were used to track open tablespaces.
    
    RB#16842 Approved by: Jimmy and Kevin.

commit 92ba844b58069ab817a3e6ec7b59a0ff60bae1b3
Author: Norvald H. Ryeng <norvald.ryeng@oracle.com>
Date:   Fri Dec 8 13:01:22 2017 +0100

    WL#9059: [8/8] Add MTR tests for CREATE/DROP SRS
    
    Add new MTR tests that cover the CREATE and DROP statements.
    
    Change-Id: I5e167d868ae65f413c3fd01ee10a10d18a2d8d1c

commit d0764b98f0f076c6b8b09e377938024633d5ef20
Author: Norvald H. Ryeng <norvald.ryeng@oracle.com>
Date:   Fri Dec 8 13:01:22 2017 +0100

    WL#9059: [7/8] Hide dictionary table and rewrite tests
    
    Hide the mysql.st_spatial_reference_systems table so that it's no longer
    possible to do SELECT/INSERT/UPDATE/DELETE operations on it. All
    modification of the table has to be done through CREATE/DROP SPATIAL
    REFERENCE SYSTEM statements.
    
    Hiding the table means that all tests that create spatial reference
    systems using INSERT statements must be rewritten to use CREATE and DROP
    statements.
    
    Some test cases are removed since they now fail in CREATE SPATIAL
    REFERENCE SYSTEM instead of in each function.
    
    Change-Id: Icf906cb92bb8c57f7b3c946379e06c2810ca4995

commit 2964fc5088b07bbc3bf67a8f14ef124fbee1ae67
Author: Norvald H. Ryeng <norvald.ryeng@oracle.com>
Date:   Fri Dec 8 13:01:22 2017 +0100

    WL#9059: [6/8] DROP SPATIAL REFERENCE SYSTEM
    
    Add SQL command DROP SPATIAL REFERENCE SYSTEM. This includes:
    
     - New grammar for DROP statements
     - Class Sql_cmd_drop_srs to implement the command
     - One new error message
    
    Change-Id: I3433465992e324ca05bf748983837e392404a4ec

commit 1cf570bc275b41eee8ed3b49f771eafa6cfc6497
Author: Aleksander Wasaznik <aleksander.wasaznik@oracle.com>
Date:   Fri Dec 8 13:01:22 2017 +0100

    WL#9059: [5/8] CREATE SPATIAL REFERENCE SYSTEM
    
    Add SQL command CREATE [OR REPLACE] SPATIAL REFERENCE SYSTEM. This
    includes:
    
     - New keywords (none of them are reserved words)
     - New grammar for CREATE statements
     - Modification of some existing grammar to avoid conflicts
     - Class Sql_cmd_create_srs to implement the actual SRS creation
     - A number of new error messages for situations that may occur during
       SRS creation
    
    Change-Id: Ifdaf83a52923556b068be7c3d76c905d12c14260

commit 840380c6ee83eff90ca918a09019532c96959885
Author: Norvald H. Ryeng <norvald.ryeng@oracle.com>
Date:   Fri Dec 8 13:01:22 2017 +0100

    WL#9059: [4/8] Allow storing SRSs with given ID in DD
    
    Spatial reference systems have user-defined IDs, while other DD objects
    are given an auto-generated ID at storage time. Modify the assertion
    that assumes that all new dictionary objects are auto-numbered to make
    an exception for spatial reference systems.
    
    Change-Id: If9febd94ddc3d645a21c47d205f88bce9640428a

commit a50bb31584892b72e8f8dbe3e8f0a791bb802c46
Author: Norvald H. Ryeng <norvald.ryeng@oracle.com>
Date:   Fri Dec 8 13:01:22 2017 +0100

    WL#9059: [3/8] Srs_fetcher for modification
    
    Add function Srs_fetcher::acquire_for_modification that takes an
    exclusive lock and acquires the SRS for modification.
    
    Change-Id: I410553d9962d99db87c2adcf2aab86ce14d25c0d

commit bff7cc4a4ed3d385dec5a2c629d49a7499840f90
Author: Norvald H. Ryeng <norvald.ryeng@oracle.com>
Date:   Fri Dec 8 13:01:22 2017 +0100

    WL#9059: [2/8] Allow NULL values in DD SRS objects
    
    Allow organization, organization_coordsys_id and description to be NULL
    in the DD table, and represent that as Mysql::Nullable<> in SRS objects.
    
    Change-Id: I6e2a96ae1b36159a27678ad9e0989a38e0309c03

commit b77775f65547565e6ef04625033885a8836b6e35
Author: Norvald H. Ryeng <norvald.ryeng@oracle.com>
Date:   Fri Dec 8 13:01:22 2017 +0100

    WL#9059: [1/8] Dictionary table modifications
    
    Create the data dictionary entry for SRID 0 when the data dictionary is
    initialized instead of using an INSERT statement. This means that when
    the dictionary table is hidden and INSERT is replaced by CREATE SPATIAL
    REFERENCE SYSTEM, we don't have to support creating SRID 0.
    
    Rename the UNIQUE index on name to SRS_NAME to get a better ER_DUP_ENTRY
    error message when trying to create two SRSs with the same name.
    
    Set the collation on organization to a case insensitive collation and
    add a UNIQUE index on organization and organization_coordsys_id to
    enforce a requirement in SQL/MM 2015, Part 3, Sect. 20.3. Remove
    organization and organization_coordsys_id specifications from SRSs
    created in tests to avoid duplicates.
    
    Change-Id: I2642f0fa88f5e457c929649f0378a4891e6645ab

commit c1bd0e25d8a1c453c53845c5e7189221524eb91e
Author: Harin Vadodaria <harin.vadodaria@oracle.com>
Date:   Fri Dec 8 13:01:19 2017 +0100

    Bug#27197483: RW LOCK REFACTORING IN CHECK_GRANT
    
    Description: At present RW lock on ACL caches is taken
                 at the beginning of the function. However,
                 lock is required only if table permission
                 are to be checked.
    
    Solution: Process all tables and make a list of tables
              for which table permission are to be checked.
              Acquire RW lock on ACL caches only if there
              are one or more such tables.

commit 70d517158b379cfd0bb49de2771b57d44ab99823
Author: Harin Vadodaria <harin.vadodaria@oracle.com>
Date:   Fri Dec 8 11:13:58 2017 +0100

    WL#11057: Make caching_sha2_password default authentication mechanism
    
    Post push fix
    - Recording updated results for replication tests

commit 201d314611204c6dc752eb3031fd28ee99c5d048
Author: Srikanth B R <srikanth.b.r@oracle.com>
Date:   Fri Dec 8 08:36:21 2017 +0530

    WL#11009: Logging services: log writers: add error ID to traditional error log
    
    Follow-up patch to add a prefix 'MY-' to error numbers in traditional error log.
    
    Reviewed-by: Tatjana Nuernberg <tatjana.nuernberg@oracle.com>
    RB: 18154

commit ef5c89405cd14412c4465cfb78cf18101aa8dbc4
Author: Thayumanavar S <thayumanavar.x.sachithanantha@oracle.com>
Date:   Fri Dec 8 08:47:07 2017 +0100

    WL#9809 - RESTART
    
    The patch implements the RESTART SQL which meets the following
    specifications:
    1. RESTART is supported on *nix OS which support systemd.
    2. For other *nix OS not supporting systemd, RESTART will
       be supported through mysqld_safe.
    3. Windows support RESTART both as windows service  and standalone.
    4. RESTART logs system level note to the error log indicating the
       user who executed RESTART.
    5. To execute RESTART, the user should have SHUTDOWN privilege.
    6. RESTART shall fail with ER_RESTRT_FAILED when mysqld is not managed
       by supervisor (systemd or mysqld_safe etc.)
    7. RESTART sql initiates a restart of the server for the client. It
       shutdowns the system with a special exit value (16) and the monitor
       or supervisor process. The OK status is sent to client as restart is
       initiated and it is up to client to determine any failure in the
       subsequent process.

commit 27abe0e7d5e9c98bfdf9012b55b5342795ba2b20
Merge: a5050fb 67f90af
Author: Srikanth B R <srikanth.b.r@oracle.com>
Date:   Fri Dec 8 08:28:55 2017 +0530

    Merge branch 'mysql-5.7' into mysql-8.0

commit 67f90af40f8dbaaab702076c1529b0d9d0675b06
Author: Srikanth B R <srikanth.b.r@oracle.com>
Date:   Fri Dec 8 08:27:15 2017 +0530

    Bug#26709230 MTR UNABLE TO DETECT ERRORS IN ERROR LOG GENERATED BY TEST SCRIPT
    
    Issue:
    -----
    MTR scans error logs of all servers it spawns one by one on test
    completion to check if their error logs contain un-suppressed
    warnings or errors using using the check_warnings setup. The flag
    set when there is a check_warnings failure is being overwritten
    if subsequent iterations of check_warnings on other servers are
    successful. This masks few failures as MTR reports the test run
    passed.
    
    Fix:
    ---
    - MTR altered to report a check_warnings() failure as soon as it
      finds one i.e., it does not proceed to scan the error log of
      the next server.
    - Some rpl tests are fixed with updated/added suppressions
    
    Reviewed-by: Pavan Naik   <pavan.naik@oracle.com>
    Reviewed-by: Parveez Baig <parveez.baig@oracle.com>
    RB: 18033

commit a5050fbeb50b47a434be4304aa6dc4e325fa3803
Merge: b8cd23f 3871000
Author: Srikanth B R <srikanth.b.r@oracle.com>
Date:   Fri Dec 8 08:16:49 2017 +0530

    Null merge from 'mysql-5.7'

commit 387100048c3de7ef67efb298e28bf8cdc0ad6890
Author: Srikanth B R <srikanth.b.r@oracle.com>
Date:   Fri Dec 8 08:04:26 2017 +0530

    Bug#18702857 RPL.RPL_GRANT FAILS WITH WARNINGS/ERRORS IN SERVER LOG FILE
    
    Added missing error log suppressions.
    
    Reviewed-by: Deepthi E S <deepthi.e.s@oracle.com>
    RB: 18129

commit b8cd23f2f43a04b6302527579352afb916b85ce1
Author: Praveenkumar Hulakund <praveenkumar.hulakund@oracle.com>
Date:   Fri Dec 8 02:22:09 2017 +0100

    Bug#25887335 - test case innodb_mysql_sync crash on pb2 run
    
    Issue here is, socket of the killed connection (using KILL
    statement) is not closed. Because of this assert condition
    to check if socket buffer is empty, failed.
    
    When thread is in the kill immune mode, kill is not executed
    immediately. kill state is saved and it is applied while exiting
    from the kill immune mode. If the operation is KILL_CONNECTION
    then thread socket connection should be closed but while exiting
    kill immune mode socket was not getting closed. Hence write to
    socket after this step as causing client side assertion.
    
    To fix this issue, code is modified to close socket connection
    for KILL_CONNECTION operation even while exiting from the
    kill immune mode.
    
    Change-Id: I96a9543c9173fd5840ce25e7e6c45e060a680802

commit 9eff79e08f8dcba6741b0942a41feceaef9a8ac6
Author: Tiago Jorge <tiago.jorge@oracle.com>
Date:   Thu Dec 7 13:56:16 2017 +0000

    BUG#26886646 - SEGMENTATION FAULT AT TASK_DELETE() IN LIBMYSQLGCS/SRC/BINDINGS/XCOM/XCOM/TASK.C
    
    Problem
    ----------------------------
    
    A Segmentation fault was encountered on a daily-trunk pushbuild
    run for the test 'group_replication.gr_ssl_mode_verify_identity_error'
    when starting group replication with the below symptoms -
    
    group_replication.gr_ssl_mode_verify_identity_error w5 [ fail ]
            Test ended at 2017-09-27 17:37:18
    
    CURRENT_TEST: group_replication.gr_ssl_mode_verify_identity_error
    mysqltest: At line 58: query 'START GROUP_REPLICATION' failed with wrong
    errno 2013: 'Lost connection to MySQL server during query', instead of
    3092
    
    Analysis
    -----------------------------
    
    The test that fails sporadically is Step #2 of gr_ssl_mode_verify_identity_error.
    That step causes a global SSL comunication failure, in which not even the
    local connections can be established, thus causing the join operation to fail.
    
    When that happens, GCS will request the XCom thread termination. Since it does
    not have socket access, it will contact it directly calling xcom_fsm(exit),
    but this is a well-known non-thread safe operation, hence causing this crash.
    
    Fix
    -----------------------------
    
    Create a new callback for GCS called should_exit, which is tested within
    task_loop, in order to check if we should exit the XCom thread.

commit 811e3e131c647989e58a6179a1855692c0e7facd
Author: Andre Negrao <andre.negrao@oracle.com>
Date:   Thu Dec 7 20:01:15 2017 +0000

    Bug#26695357 SOME SELECTS STILL PRESENT IN XCOM CODE
    
    Description:
    -----------
    After fixing parent issue BUG#25892493, one noticed that selects are still
    present in XCom client code, which is used to connect from GR/GCS to the XCom
    running thread.
    
    Fix:
    ---
    This patch removes the two 'select()' calls that were still present in XCom:
    - In timed_connect(), the select is replaced by a poll function;
    - All code enclosed by '#ifdef USE_SELECT' has been removed, including a
    select() call contained inside one function implemented within one such
    conditional block.

commit c6545f62703a0c88a6cc17f9b14afcbac73fe0d4
Author: Dyre Tjeldvoll <Dyre.Tjeldvoll@oracle.com>
Date:   Thu Dec 7 16:47:29 2017 +0100

    Bug#24734971: PERFORMANCE REGRESSION IN DICTIONARY OPERATIONS DUE TO METADATA LOCKING
    
    Problem: Search in, and traversal of lists of MDL_tickets maintaned by
    MDL_context becomes time consuming when the number of tickets is
    large.
    
    Fix: 1) Add a hash index for the lists to get O(1) lookup based on MDL_key.
         2) Keep track of the subset of the tickets for which
            MDL_context::materialize_fast_path_locks already have been
            called, and only iterate over tickets added since the last
            call.
    
    Change-Id: Ie4275d02ee310112ba36614a9c331da869d71d18
    (cherry picked from commit e531c8a23f8edeb4b845be98b5cfa29d46bc7af1)

commit 0fd2478e8b1a766075b255d4f0bd3677458e7669
Author: Torje Digernes <torje.digernes@oracle.com>
Date:   Thu Jun 22 10:19:16 2017 +0200

    WL#10927: gis::Unary_functor based Ellipsoidal ST_ISVALID
    
    Changes in this commit
     - Create Unary_functor based gis::Is_valid for boost::geometry::is_valid
     - Create gis::is_valid interface for calling gis::Is_valid
     - Unittest for gis::is_valid
     - Rewrite Item_func_isvalid::val_int in style of
       Item_func_spatial_relation::val_int, using gis::is_valid.
     - MTR tests.
    
    Change-Id: Id525fa8c7561518f7d260febc6e5d335d2b357fc

commit 9244071ee04278c1e0f7c0c1ad29b0a3185d3e32
Author: Yashwanth Thummala <yashwanth.thummala@oracle.com>
Date:   Thu Dec 7 20:22:03 2017 +0530

    WL#10218 - Support for TLSv1.2 Protocol
    
    Description:
    
    This WL is to track MEB support for Mysql-8.0 WL# 8196 : Support for TLSv1.2
    Protocol
    
    Though this is introduced in 5.7.10. MEB uses libmysqlclient to connect to the
    server, the support for TLSv1.2 needs to verified.
    
    The option --tls-version will be added to the command-line interface
    of MEB.  The --tls-version defines the SSL/TLS protocol versions that
    MEB accepts when it established an SSL connection to the server.

commit 9e61860880d843ced23c985dc79d2722d61e841c
Author: Sai Tharun Ambati <sai.tharun.ambati@oracle.com>
Date:   Thu Dec 7 20:06:01 2017 +0530

    WL#10213 - Add tests for MEB w/ require secure transport option
    
    Description:
        This WL is to ensure MEB support for Mysql-8.0 WL#7709: Add server-side
        option to require secure transport.
    
        MTR tests are added to the meb suite to check the functionality of MEB
        with the server side require_secure_transport option.

commit 5fdbedce06202497b50c5d95a1f55973d108757f
Author: Lars Tangvald <lars.tangvald@oracle.com>
Date:   Thu Dec 7 13:05:07 2017 +0100

    WL#6667 Reimplement the password validation plugin API and plugin as a component
    
    Postpush fix:
     The new component was added to the test packages on Linux, instead of server

commit ab2791904f7604104f144107dc0600e7e95b6233
Author: Harin Vadodaria <harin.vadodaria@oracle.com>
Date:   Thu Dec 7 13:24:52 2017 +0100

    WL#11057: Make caching_sha2_password default authentication mechanism
    
    Post push fix
    - Recording updated results for xplugin connection test

commit 77f53e883655bfbc2c479e08d2f84a14a26cb72b
Merge: 6404c46 a8d111b
Author: Georgi Kodinov <georgi.kodinov@oracle.com>
Date:   Thu Dec 7 13:19:26 2017 +0100

    Null-merge from 5.7.

commit a8d111bc9137a387ebaf060e66135e87f6a6c7bc
Author: Georgi Kodinov <georgi.kodinov@oracle.com>
Date:   Thu Dec 7 11:15:06 2017 +0100

    Addendum for backport of bug #26946491
    
    This is for the 5.7 backport of the bug.
    Added a mising mutex release.

commit 6404c46c3f85e5643cc886e399e237f36f6f5ff2
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Tue Dec 5 10:39:44 2017 +0100

    Bug#27134148 UBSAN: DATE_ADD_INTERVAL - SIGNED INTEGER OVERFLOW
    
    Post-push fix: add stricter checks for overflow when adding
    intervals of type year, quarter, ..., second, microsecond.
    
    Change-Id: I05237f8535392ecb0e3f86512c2e67eb171995e4
    (cherry picked from commit 07a88b3c6a9a104502ac359ff2bf7567f2f0fd6f)

commit ec39aa0d3d72f784b02123f616762b4f2ade9425
Merge: 95e2c7d d904ae6
Author: Terje Rosten <terje.rosten@oracle.com>
Date:   Thu Dec 7 12:53:20 2017 +0100

    Merge branch 'mysql-5.7' into mysql-8.0

commit 95e2c7d411078fb2c1b6f93ffd2f453fbca0a2d5
Author: Lars Tangvald <lars.tangvald@oracle.com>
Date:   Thu Nov 30 13:01:38 2017 +0100

    Bug#24008883	NO DEBUG SYMBOLS INCLUDED FOR DEB PACKAGES
    
    Fixed: Incorrect variable syntax caused cmake warnings
    
    Deb packaging automatically strips out debug symbols from the binaries.
    Debian 9 automatically generates separate dbgsym packages with the symbols,
    so we want to do the same for the other apt platforms.

commit d904ae6de4b47e4206925031deb6c465ec35b56f
Author: Terje Rosten <terje.rosten@oracle.com>
Date:   Thu Dec 7 11:56:47 2017 +0100

    Bug#27232163 RPM-OEL.SPEC.IN INCORRECTLY MARKS OPENLDAP-DEVEL AS COMMERCIAL-ONLY DEPENDENCY
    
    OpenLDAP development package is required to build community plugin
    authentication_ldap_sasl_client.

commit be6c211f4979c2e4640bcd26206ac66c53d09bde
Author: Dhruthi K V <dhruthi.k.v@oracle.com>
Date:   Thu Dec 7 15:28:11 2017 +0530

    WL#11046 Improve test coverage for online alter index and multiple triggers on a single table in RPL & GR
    
    Replication and GR use distributed environment and its essential we ensure this
    works. Currently we have no coverage for on-line alter index and limited for
    multiple triggers (part of 5.7) with replication and GR.

commit e4628a0ae32d7dc047ad6e429be2e59842d32484
Author: Sai Tharun Ambati <sai.tharun.ambati@oracle.com>
Date:   Thu Dec 7 15:16:04 2017 +0530

    WL#10268 - Add/Improve test coverage of MEB with MySQL firewall
    
    Description:
        This WL is to ensure MEB works with Mysql-8.0 WL#7725 - MySQL firewall.
    
        MTR test is added to the meb suite to check the functionality of the
        MEB with firewall plugin.

commit 2ce0e2b39c6b7d3787a4e774e72ef58cf96369b8
Author: Harin Vadodaria <harin.vadodaria@oracle.com>
Date:   Thu Dec 7 09:46:35 2017 +0100

    WL#11057: Make caching_sha2_password default authentication mechanism
    
    Post push fix
    - Updated validate_password component test after
      change in default authentication plugin

commit c16a601bfa66b8433154a951072abeada2c410fb
Author: Harin Vadodaria <harin.vadodaria@oracle.com>
Date:   Thu Dec 7 09:16:18 2017 +0100

    WL#11057: Make caching_sha2_password default authentication mechanism
    
    Post push fix
    - Fixed xplugin test failures

commit 636c19844aef056249cefa296e81afd9ae94255c
Author: V S Murthy Sidagam <venkata.sidagam@oracle.com>
Date:   Thu Dec 7 11:11:42 2017 +0530

    WL#6667 Reimplement the password validation plugin API and plugin
            as a component
          Post push fix.
          Fixed result files.

commit f3ee8e0539ad5a9be361a0b777b796680d822669
Author: Daogang Qu <bill.qu@oracle.com>
Date:   Thu Dec 7 13:29:40 2017 +0800

    Bug #27082922   --LOG-BIN BY DEFAULT CAUSES LOTS OF SPAM IN ERROR LOG BY DEFAULT -- post fix2
    
    Post fix a failed test. The test includes show_binlog_events.inc,
    which requires that binlog is endabled. So we just run it when
    binlog is enabled.

commit fcf4963fe476e3d0de301b1d52d5f82ccd6a272b
Author: Bharathy Satish <bharathy.x.satish@oracle.com>
Date:   Thu Dec 7 06:03:24 2017 +0100

    Bug #22980871: UNCLEAR ERROR MESSAGE WHILE USING ENCRYPTION IF
                   THERE IS A PERMISSION ISSUE
    Post push fix.
    Fixed result files.

commit d3d32292bae119b4be2d6b4a4e2a474a2a807d4f
Author: Harin Vadodaria <harin.vadodaria@oracle.com>
Date:   Thu Dec 7 05:40:35 2017 +0100

    WL#11057: Make caching_sha2_password default authentication mechanism
    
    Description: This worklog makes caching_sha2_password
                 default authentication plugin for MySQL
                 server and libmysqlclient.
    
                 Worklog introduces 2 new options for
                 CHANGE MASTER:
                 1. master_public_key_path=<path> : Path
                 to Master's RSA public key file
                 2. get_master_public_key=1|0 : Preference
                 to fetch RSA public key from master
    
                 Further, group replication now supports
                 two new options:
                 1. group_replication_recovery_public_key_path=<path>
                 Path to donor's RSA public key file
                 2. group_replication_recovery_get_public_key=ON|OFF
                 Preference to fetch RSA public key from donor
    
    Reviewed-By: Kristofer Älvring <kristofer.pettersson@oracle.com>
    Reviewed-By: João Gramacho <joao.gramacho@oracle.com>
    Reviewed-By: Nuno Carvalho <nuno.carvalho@oracle.com>

commit 6ada7b0c8d6e3340432baed3ce7886176bcec270
Author: Grzegorz Szwarc <grzegorz.szwarc@oracle.com>
Date:   Wed Nov 15 15:46:37 2017 +0100

    WL#11434: X Protocol Crud.Insert with upsert, behavior redefined
    
    Redefine the functional requirements in a way that upsert
    triggered by secondary key causes error when primary keys of
    both documents doesn't match.
    
    Approved-by: Vinay Fisrekar <vinay.fisrekar@oracle.com>

commit f9c6ec2b960a85f811a495e3da9b53395c08ed0d
Author: Erik Froseth <erik.froseth@oracle.com>
Date:   Wed Dec 6 14:18:05 2017 +0100

    Bug#27220467 SERVER HANGS WHILE CREATING A NEW SRS WHICH IS USED IN ANOTHER CLIENT
    
    When adding/modifying a column with the SRID property, the server will take
    an MDL lock on the SRID in order to check if the spatial reference system
    actually exists or not. In case of any error while adding/modifying the column,
    the lock would not be released. This patch explicitly releases any locks taken
    during adding/modification of columns.
    
    Change-Id: I381b787f5912c9d1d7c55f5bad4178dca4936f23
    (cherry picked from commit ccc04109b0f68c8e8eeec58d488e08262b8f6b4d)

commit fa65cff20cbc177a175398c0edfe71e00b3e3962
Author: Bjorn Munch <bjorn.munch@oracle.com>
Date:   Wed Dec 6 19:07:09 2017 +0100

    Bug #26115002 UDF_EXAMPLE BINARY NOT PACKAGED
    
      Bothed followup: did not work for Windows

commit b9f6f2e2a3fe390e6933335de5388ec3c5d33d6b
Author: V S Murthy Sidagam <venkata.sidagam@oracle.com>
Date:   Wed Dec 6 22:07:10 2017 +0530

    WL#6667 Reimplement the password validation plugin API and plugin
            as a component
    
       * The validate password plugin is converted to component.
       * For mysql-8.0 we will have both component and plugin(But
         plugin will be installed/uninstalled with below deprecate
         warning)
         "validate password plugin' is deprecated and will be
          removed in a future release. Please use validate_password
          component instead"
       * In the next major release we remove the plugin .so file.
       * With the component enabled, we see the system/status
         variables preceded with "validate_password." instead of
         "validate_password_"(for example, if we take 'length'
         system variable we see it as "validate_password.length"
         instead of "validate_password_length")
       * The packaging script should be installing the component
         by default for new installs
    
       The way it currently works with deprecations and removals
       is the following:
       1. We add a deprecation warning to using the old way and
          we switch the server to use the new way by default for
          new installations.
       2. We expect that people will upgrade their existing
          installations too to avoid the warning.
       3. In the next major release we remove the old way and
          hope that people did #2.

commit d792dd66e7507d152e42ef9ff16f9f92f5ae2c88
Author: Marc Alff <marc.alff@oracle.com>
Date:   Wed Dec 6 16:53:17 2017 +0100

    Bug#24688694 SEVERAL UNSTABLE TESTS IN SUITE PERFSCHEMA
    
    Removed duplicated test cases from test
      perfschema.idx_compare_ees_by_thread_by_error,
    which failed due to timeout.

commit 0d2a72760253ff0818f7fe75684b176eaa559bf3
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Wed Dec 6 16:29:06 2017 +0100

    Bug #25832856: CREATE_RSA_KEY_PAIR CALLS UMASK() WITH WRONG VALUE
    
    Post-push fix: broken Werror build
    sql/auth/sql_authentication.cc:3619:10: error: comparison between
    signed and unsigned integer expression
    
    Change-Id: I69d419626ef71cd589a204f3ec2a32a222080517

commit 3db5616bd86835aaca90dbf3242e728fe1a2c983
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Wed Dec 6 16:06:50 2017 +0100

    Bug#27134148 UBSAN: DATE_ADD_INTERVAL - SIGNED INTEGER OVERFLOW:
    
    Post-push fix: a regexp query is now rejected.
    
    Change-Id: I7d25dc62a8761d9d9c274c84dd76535e55a40c6a

commit 6850f49501ec34c26e162d94d9068976431dced5
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Wed Dec 6 12:40:39 2017 +0100

    Bug #27224961 CHECK_STACK_OVERRUN MAY RUN OUT OF STACK SPACE TRYING TO REPORT OUT-OF-MEMORY
    
    Change-Id: I5dc989a93453ae4dfe4ab837639ed69b500c52d9
    Fix: increase STACK_MIN_SIZE for UBSAN builds on 32bit platforms.

commit 98275494a6b55292ac22751f09325cc228be7e70
Author: Ivan Švaljek <ivan.svaljek@oracle.com>
Date:   Wed Dec 6 16:12:25 2017 +0100

    Bug #25832856: CREATE_RSA_KEY_PAIR CALLS UMASK() WITH WRONG VALUE
    
    File_IO altered to use my_open/my_create... file access functions.

commit ef581a26d9bae42069e117c2c6785a63b0ee3056
Author: Yashwanth Thummala <yashwanth.thummala@oracle.com>
Date:   Wed Dec 6 19:50:12 2017 +0530

    WL#10221 - MEB support for Remove --ssl, --ssl-verify-server-cert
               client-side options
    
    Description:
    
    This WL is to track MEB support for Mysql-8.0 WL#:9091 Remove --ssl, --ssl-
    verify-server-cert client-side options
    
    MEB uses libmysqlclient built by the server to connect to the server. If this
    functionality is deprecated, this should also be automatically deprecated from
    MEB.
    
    As mysql has removed the --ssl, --ssl-verify-server-cert client side options,
    these options also have to be removed in the mysqlbackup and treat them as any
    other unknown options.
    
    RB# http://rb.no.oracle.com/rb/r/17876

commit 09b70908c7700d5e53b6f599479fb2468ff91b85
Author: Pedro Figueiredo <pedro.figueiredo@oracle.com>
Date:   Wed Dec 6 13:38:23 2017 +0000

    Bug#26434966 FAILURE OF RPL_NDB_ROW_BASIC TEST
    
    Description
    -----------
    The 'rpl_ndb.rpl_ndb_row_basic' test is failing due to some
    inconsistency in the return value of 'SELECT COUNT(*)' after
    removing records on the slave. The statement returns more
    rows than what is expected in the test result file.
    
    Analysis
    --------
    - In 'Rows_log_event::next_record_scan()', the invocation of
      'table->file->ha_index_read_map()' and, in turn, the invokation
      of 'ha_ndbcluster::index_read()', returns 'HA_ERR_END_OF_FILE',
      when using engine NDB.
    - In this case, what is expected is the error value of
      'HA_ERR_RECORD_DELETED'.
    - In turn, 'Rows_log_event::next_record_scan()' tests for this
      specific value and returns the error value of 'HA_ERR_KEY_NOT_FOUND'.
    - This allows the processing of the binlog events to keep going
      instead of stopping.
    - When this occurs, when it stops, the hash table at
      'Rows_log_event::m_hash' enters in a uncertain state,
      not being cleaned and holding more records than it should for
      the next processing iteration.
    - Both InnoDB and MyISAM return the expected value,
      'HA_ERR_RECORD_DELETED', and tests run correctly for both, on regards
      to this use-case.
    - For testing purposes, commenting the line
    
            if (error == HA_ERR_RECORD_DELETED)
    
    in 'Rows_log_event::next_record_scan(bool first_read)', in
    'sql/log_event.cc' does make tests run correctly for NDB.
    
    Fix
    ---
    - Either:
      1) For NDB, 'table->file->ha_index_read_map()' (meaning,
         'ha_ndbcluster::index_read()') should return 'HA_ERR_RECORD_DELETED'
         for this use-case, as the other engines do.
      2) The test for 'HA_ERR_RECORD_DELETED' is removed and
         'HA_ERR_KEY_NOT_FOUND' is always returned
    - Implemented the second option, since the signature for
      'handler::ha_index_read_map' doesn't mention 'HA_ERR_RECORD_DELETED'
      and this error code must be an internal artifact for engines. Hence,
      aliasing every error result to 'HA_ERR_KEY_NOT_FOUND'.

commit 89d1011600d6634cbeca01b65747fada5ea02808
Merge: d467721 d01403d
Author: Georgi Kodinov <georgi.kodinov@oracle.com>
Date:   Wed Dec 6 14:09:06 2017 +0100

    Merge branch 'mysql-5.7' into mysql-8.0

commit d01403d7035eff1c9be31631ebe8f9964e005b0f
Author: Georgi Kodinov <georgi.kodinov@oracle.com>
Date:   Wed Dec 6 13:55:12 2017 +0100

    Bug #22980871: UNCLEAR ERROR MESSAGE WHILE USING ENCRYPTION IF
     THERE IS A PERMISSION ISSUE
    
    Added a better wording for the error message.
    Test results updated to match the new message.

commit d46772170a5ec567033a7137abbd75e79a6a8799
Author: Jaideep Karande <jaideep.karande@oracle.com>
Date:   Wed Dec 6 13:24:40 2017 +0100

    Bug#27128868: CRASH FOR SHOW BINLOG EVENTS CMD IN BINARY_LOG::VIEW_CHANGE_EVENT::READ_DATA_MAP
    
    Issue: "SHOW BINLOG EVENTS FROM 490;" sometimes causes crash
    
    Reason: Code assumes position 490 is a valid event and reads header.
    If bytes in binlog file converts to an event and right length, it simply read
    data and converts to event.
    So invalid position, by chance, has good values(i.e. convertible to an event)
    in the header, at a position of event_type and event_length tricks the code.
    Later causing core dump during conversion to an event.
    
    Test case: main.ctype_cp932_binlog_stm
    
    Issue is duplicate of Bug#20286642(open) and WL#9562(open)
    
    Resolution:
    Removed statement "SHOW BINLOG EVENTS FROM 490;" from test-case for
    successfull run.

commit c6ed81ec0005e842017044761a565f34155b04b8
Author: Guilhem Bichot <guilhem.bichot@oracle.com>
Date:   Wed Dec 6 08:43:55 2017 +0100

    Bug#27152428 JSON_TABLE + PREPARED STATEMENT + VIEW HAS PROBLEM IN DURING RESOLUTION
    
    Assume a prepared statement:
    - SELECT FROM (SELECT FROM (SELECT ...) AS DT) AS DT1, JSON_TABLE(DT1.col);
    - DT1 is resolved, which materializes DT
    - JSON_TABLE is resolved
    - DT1 is merged
    Now we execute the statement:
    - in the first loop in the function,
          DT1 is not resolved again, as it was merged,
          and DT is not reached
    - we must thus defer resolution of JSON_TABLE
    - until DT is reached and resolved by the special branch 'if
      (!first_execution)' for formerly-nested derived tables
    - and then we can resolve TF.
    
    As we didn't defer JSON_TABLE, its argument DT1.col was resolved against
    the not-yet-resolved DT, leading to assertion failure:
    sql_base.cc:8414: Field* find_field_in_table_ref():
      Assertion `table_list->table' failed.
    (which means: "DT isn't ready!").
    
    Fix: we run the code in this function twice: a first time for all non-TF
    tables, a second time for TF.
    This is a low-effort fix as in 9.0 it can be eliminated by WL#6570.

commit 239caec52c3e3ff40abd1290ef78c4a1d0f366d0
Author: Karthik Kamath <karthik.kamath@oracle.com>
Date:   Wed Dec 6 17:40:12 2017 +0530

    BUG#26881798: SERVER EXITS WHEN PRIMARY KEY IN MYSQL.PROC
                  IS DROPPED
    
    Post-push fix: Resolved a test failure in ASAN.

commit 30400ca216612f8263616cc8ebfb2a8673a541fd
Author: Erik Froseth <erik.froseth@oracle.com>
Date:   Thu Nov 30 10:33:37 2017 +0100

    Bug#27197709 TABLE ROWS ESTIMATE DURING HISTOGRAM CREATION MAY BE WAY OFF
    
    When creating histogram statistics, the server needs an estimate of how may
    rows there are in the table it is building a histogram for. This estimate
    will help the server decide on whether to use sampling or not. However, the
    estimate is for instance not updated by insert or delete statements, so
    after inserting/deleting a lot of rows the estimate may be way off. This in
    turn may cause the server not to use sampling when building histograms when
    in fact it should.
    
    This patch makes the histogram creation process ask for the number of
    rows in the table so that it can make a better guess on whether to use
    sampling or not.
    
    Change-Id: I20b6e55660f2fa36a932c86e6e781ac8bcd4b20f

commit 445fd5c7e260be8889d5ab53d3f9b36234cbc328
Author: Marc Alff <marc.alff@oracle.com>
Date:   Mon Dec 4 10:35:58 2017 +0100

    Bug#24970428 AUDIT LOG EVENTS FOR PERFORMANCE_SCHEMA.GLOBAL_VARIABLES
    
    1) Fixed the test main.audit_plugin_2.
    
    Removed references to SHOW_COMPATIBILITY_56 from test main.audit_plugin_2
    
    2) Improved logging of audit events in performance_schema.global_variables
    
    Moved the call to
      mysql_audit_notify(MYSQL_AUDIT_GLOBAL_VARIABLE_GET)
    done in the performance schema to method
      table_global_variables::make_row()
    so that audit events are raised only for rows returned to the SQL layer,
    instead of generating events for all materialized rows as before.
    
    This makes the following query:
      SELECT * FROM performance_schema.global_variables
         WHERE VARIABLE_NAME = 'foo';
    generate only one audit log event,
    thanks to the index by variable name on table global_variables.

commit 4b18d0577f674112bd8d0849932b6e5a1b380915
Author: Marc Alff <marc.alff@oracle.com>
Date:   Thu Nov 30 16:23:10 2017 +0100

    Bug#27121500 PERFORMANCE_SCHEMA INDEX ON OBJECT_TYPE BROKEN
    
    Queries in performance schema using indexes on OBJECT_TYPE
    columns do not return the correct results.
    
    The root cause is the evaluation of whether a given record
    matches or not a given key value,
    implemented in PFS_key_object_type::match().
    This code does not implement NULL checks properly.
    
    In the performance schema, a record that has a NULL
    OBJECT_TYPE is represented with an object_type == NO_OBJECT_TYPE,
    and there are no boolean flags to mark the field as NULL.
    This works because NO_OBJECT_TYPE is not a possible value.
    
    In a key provided by a WHERE clause,
    the object type comes from the query, and can have any value,
    especially for VARCHAR columns.
    
    When a key is NULL, PFS_key_object_type::m_is_null is true,
    and the value of PFS_key_object_type::m_object_type is irrelevant.
    
    When a key is not null, but when the OBJECT_TYPE provided
    (as in WHERE OBJECT_TYPE = 'impossible')
    does not match the expected object types,
    the code converts the string to NO_OBJECT_TYPE,
    exposing the bug.
    
    The bug is that this comparison:
      m_object_type == object_type
    does not work when a key is not null but impossible,
    as it matches records that are not supposed to match.
    
    The fix is to implement PFS_key_object_type::do_match(),
    with proper checks for NULL keys and or NULL records
    before comparing the key value with the record value.
    
    Likewise for PFS_key_object_type_enum.

commit 175527d683dc4ba1184a80cdc574a76b92918307
Author: Thayumanavar S <thayumanavar.x.sachithanantha@oracle.com>
Date:   Wed Dec 6 08:18:41 2017 +0100

    BUG#26996065 - CONTRIBUTION: FIX MINOR TYPO IN COMMENT.
    
    The patch fixes some minor typo in comments. This patch is based on
    a contribution made by BOOKING.COM BV.

commit 1aecb264b90fa819f8a172147dcce41e8a0842bf
Author: Bharathy Satish <bharathy.x.satish@oracle.com>
Date:   Wed Dec 6 06:13:50 2017 +0100

    Bug #26100122: SERVER CRASHES WHEN SET PERSIST CALLS WITH A LONG STATEMENT
    
    Problem: During execution of set persist statement variable name and its
    value are copied to a local buffer before writing to mysqld-auto.cnf. The
    assumption is that the variable value can no longer be more than 1024 bytes,
    however in this case since the value is more than 1024 bytes, there is a heap
    corruption, causing server to crash.
    
    Fix: Fix is to allocate the needed memory on heap and copy the needed value
    into respective buffers and release the memory.

commit 1dbfb0451b0e3589bfa89d1379509a97edff71b3
Author: Deepthi ES <deepthi.e.s@oracle.com>
Date:   Wed Dec 6 09:28:05 2017 +0530

    Revert "WL#10475 : Defaults: Enable Parallel Replication Applier"
    
    This reverts commit 573e51cf5c66277695caabebdb38c1c9ada35349
    44fc07918777db863feffa052253357b2b176d59 and
    c01636c07f4f34a1bd7f8f7ab1b5ddf60d2fb2af

commit 03391c4148dc79a25e24e1e8f6cfb8e61ef1049b
Author: Bharathy Satish <bharathy.x.satish@oracle.com>
Date:   Wed Dec 6 03:55:37 2017 +0100

    Bug #27193853: ASSERT `(0)' AT SYS_VARS.H:2416 FOR SET PERSIST_ONLY
                   GTID_OWNED/EXECUTED
    
    Problem: Read only variables gtid_owned and gtid_executed when persisted
    using PERSIST_ONLY will assert. These variables are derived from Sys_var_charptr_func
    whose member functions like do_check, check_update_type, session_update, global_update
    are set to ASSERT. This indicates that these variables are not allowed to be set
    (even at command line).
    
    Fix: Since these variables cannot be set at command line, they cannot be persisted.
    Thus as a fix we set the flag NON_PERSIST to all those variables derived from
    Sys_var_charptr_func.

commit d08b204466ab0ed2b5cea74cabcd8f8c413327be
Author: Satya Bodapati <satya.bodapati@oracle.com>
Date:   Tue Dec 5 17:06:44 2017 +0100

    Bug#27219729 - HANG IN INNODB.CREATE_TABLESPACE_DEBUG
    
    After fix for BUG#27116565, the file is opened on create.
    The debug point, simulates an error and deletes the file just
    created.
    
    On *nix systems, it is OK to delete a file which is opened but windows
    doesn't like this.
    
    Fix:
    ----
    In the DBUG_EXECUTE_IF() code, just return error, and dont delete the file.
    The file deletion is taken care by DDL Log replay on trx rollback.

commit 4687cb3499bb706f4dc390abdca87f338a743ea9
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Fri Dec 1 19:07:31 2017 +0100

    Bug#22833138: MYSQL CLIENT MEMORY LEAK AFTER THE SERVER HAS SHUT DOWN
    
    Revert the disabling of dlclose(), as several tests depend on plugin reset.
    See also
    Bug#27151550 PLUGINS/COMPONENTS SHOULD NOT RELY ON DLCLOSE() TO RUN DESTRUCTORS
    
    Change-Id: I2bd1d99d4b18e650b68ef0b6bd7ac4f71c6f5040
    (cherry picked from commit 2c00dcb815fe9ea9dc934fd00602420590f26a8c)

commit a86a6bd3e3a2fab7866dc5c3ee368348563da4cd
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Tue Dec 5 15:50:48 2017 +0100

    Revert "Bug#24008883	NO DEBUG SYMBOLS INCLUDED FOR DEB PACKAGES"
    
    This reverts commit 99f761d6600c025e7ab6b98451b3c4a3f77d7b88.
    
    Lots of warnings:
    
    CMake Warning (dev) at packaging/deb-in/CMakeLists.txt:152 (SET):
      Policy CMP0053 is not set: Simplify variable reference and escape sequence
      evaluation.  Run "cmake --help-policy CMP0053" for policy details.  Use the
      cmake_policy command to set the policy and suppress this warning.
    
      For input:
    
        '
        Package: libmysqlclient21-dbgsym
        Architecture: any
        Section: debug
        Depends: libmysqlclient21 (=\${binary:Version}), \${misc:Depends}
        Description: Debugging symbols for client library

commit 462536de6f966236f32ed512122caad2a605374d
Author: Nuno Carvalho <nuno.carvalho@oracle.com>
Date:   Mon Dec 4 19:55:11 2017 +0100

    BUG#27212924: GROUP_REPLICATION.GR_START_WITH_PERSISTED_VARIABLES TEST FAILS
    
    When a member joins a group, all members, including the joiner, do
    log a View_change_log_event transaction, than on the joiner the
    generated locally is skipped by the GTID auto skip behaviour.
    The joiner will apply the View_change_log_event transaction that is
    delivered through recovery stage and the skip the local one.
    If the server is stopped in the middle of these events, the local
    generated View_change_log_event transaction will remain on the relay
    log to be skipped later.
    Though, on MTR clean between tests everything is clean except the
    group_replication_applier channel, which due to the extra
    transactions from a previous group was making the START
    GROUP_REPLICATION to fail.
    
    To avoid that situation, now we also clean group_replication_applier
    channel between tests.

commit ef18ca6c639454509032ae5f60432ed182f31a29
Merge: 394fa5a 2b463ea
Author: Karthik Kamath <karthik.kamath@oracle.com>
Date:   Tue Dec 5 19:53:06 2017 +0530

    Merge branch 'mysql-5.7' into mysql-8.0

commit 2b463ea575491a9092c027b4e76be6df78cf25d2
Merge: 52258c1 f277b85b
Author: Karthik Kamath <karthik.kamath@oracle.com>
Date:   Tue Dec 5 19:52:08 2017 +0530

    Merge branch 'mysql-5.6' into mysql-5.7

commit f277b85bbc5be7efdf7cf2a00d1867254864400b
Merge: 9e327ae d5b252d
Author: Karthik Kamath <karthik.kamath@oracle.com>
Date:   Tue Dec 5 19:51:06 2017 +0530

    Merge branch 'mysql-5.5' into mysql-5.6

commit d5b252d1e3e1d71eddd70f01604fc5964773ac52
Author: Karthik Kamath <karthik.kamath@oracle.com>
Date:   Tue Dec 5 19:49:59 2017 +0530

    BUG#26881798: SERVER EXITS WHEN PRIMARY KEY IN MYSQL.PROC
                  IS DROPPED
    
    ANALYSIS:
    =========
    It is advised not to tamper with the system tables.
    When primary key is dropped from a system table, certain
    operations on the table which tries to access the table key
    information may lead to server exit.
    
    FIX:
    ====
    An appropriate error is now reported in such a case.

commit 394fa5aa3010d4ad1e93fceaf3c920158fd48d48
Author: Satya Bodapati <satya.bodapati@oracle.com>
Date:   Tue Dec 5 14:50:13 2017 +0100

    Bug#27219729 - Disable innodb.create_tablespace_debug on windows

commit ff60e51ae790d0a0f53eb45dd6898ecc4ec73b42
Merge: 99f761d 52258c1
Author: Sachin Agarwal <sachin.z.agarwal@oracle.com>
Date:   Tue Dec 5 19:17:59 2017 +0530

    Merge branch 'mysql-5.7' into mysql-8.0

commit 52258c15d985c16af9627112ae4904403baafdc3
Author: Sachin Agarwal <sachin.z.agarwal@oracle.com>
Date:   Tue Dec 5 19:13:12 2017 +0530

    Bug #26731689   FK ON TABLE WITH GENERATED COLS: ASSERTION POS < N_DEF
    
    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

commit 99f761d6600c025e7ab6b98451b3c4a3f77d7b88
Author: Lars Tangvald <lars.tangvald@oracle.com>
Date:   Thu Nov 30 13:01:38 2017 +0100

    Bug#24008883	NO DEBUG SYMBOLS INCLUDED FOR DEB PACKAGES
    
    Deb packaging automatically strips out debug symbols from the binaries.
    Debian 9 automatically generates separate dbgsym packages with the symbols,
    so we want to do the same for the other apt platforms.

commit 0f20829956e66b36ff32a730f47604285f31aca2
Author: Bernt M. Johnsen <bernt.johnsen@oracle.com>
Date:   Thu Nov 30 10:01:34 2017 +0100

    WL#8987: Ignore extra/icu when running dcov

commit 4da74c2b8c6ca061c7938b46c3e3d1ce1a0833a2
Author: Chaithra Gopalareddy <chaithra.gopalareddy@oracle.com>
Date:   Tue Dec 5 17:46:50 2017 +0530

    Bug#27062031: WINDOW FUNC: CRASH IN COUNT_FIELD_TYPES() / ASSERTION FAILED:
                  N < M_SIZE
    
    Problem:
    Unused window definition's partition by and order by elements are not included
    when estimating the memory required in ref_item_array. This results in
    server exit when find_order_in_list() tried to use the unallocated memory.
    
    Analysis:
    For an unused window definition, there is no context set when contextualizing.
    Because of which the partition_by and order by items are not accounted for
    in select_n_having_items. As a result, we allocate less memory while
    setting up base ref_item_array. But find_order_in_list expects the memory
    to be allocated which results in accessing unallocated memory
    
    Solution:
    Assign parsing context (CTX_SELECT_LIST) when PT_window gets contextualized.
    Window clause is resolved under CTX_SELECT_LIST and not under CTX_WINDOW.
    Reasons being:
    1. Window functions are part of select list and the resolution
       of window definition happens along with window functions.
    2. It is tricky to resolve window definition under CTX_WINDOW
       and window functions under CTX_SELECT_LIST.
    3. Unnamed window definitions are anyways naturally placed in
       select list.
    4. Named window definition are not placed in select list of the query. But
       if this window definition is used by any window functions, then we
       resolve under CTX_SELECT_LIST.
    5. Because of all of the above, unused window definitions are resolved
       under CTX_SELECT_LIST.
    
    While at it, removed unused window definitions after they are checked for syntax
    and semantic errors.

commit 5b09b72519267babcc645ad5b8dec0282f271cd4
Author: Bjorn Munch <bjorn.munch@oracle.com>
Date:   Tue Dec 5 12:13:05 2017 +0100

    Bug #26115002 UDF_EXAMPLE BINARY NOT PACKAGED
    
      Followup fix to some tests which had hard-coded the .so file name

commit 35e4d6502392c5832e61f94e67266ce6cc41dd4d
Author: Yashwanth Thummala <yashwanth.thummala@oracle.com>
Date:   Tue Dec 5 15:36:23 2017 +0530

    Bug #25978803 - ADD EXECUTED GTID INFORMATION TO THE BACKUP LOG
    
    Description:
    
    The backup log includes the binary log file and position in like:
    
    170501 09:24:35 MAIN    INFO: MySQL binlog position: filename binlog.000006,
    position 194
    
    However there is no similar information about the executed GTID for MySQL
    instances with GTID enabled. Having that information makes it easier to
    quickly identify all of the relevant binary log information for the backup.
    
    To get the GTID information currently --trace=2 is required.
    
    Fix:
    
    Print the GTID information in log as MEB_INFO which is available in
    'backup_vars_txt_params', along with MySQL binary log file position.
    
    RB# http://rb.no.oracle.com/rb/r/18040/

commit dffefd0edcb5219d2a5a70b756206bdd8da4998d
Author: Knut Anders Hatlen <knut.hatlen@oracle.com>
Date:   Fri Dec 1 18:37:26 2017 +0100

    Bug#27205252: VALGRIND: UNINITIALIZED VALUE IN COPY_FIELD::GET_COPY_FUNC
    
    When running the json_conversions test under Valgrind with release
    binaries, a "Conditional jump or move depends on uninitialised
    value(s)" warning is raised by Valgrind for the following statement:
    
    create table t_geo select DISTINCT(_geo) FROM at;
    
    This is a false positive caused by an optimization in GCC. Valgrind is
    correct that uninitialized memory is read, but it is only done because
    the compiler is reordering statements after it has been able to prove
    that reading possibly uninitialized memory won't affect the result.
    The Valgrind documentation says that such false positives can happen
    with high optimization levels.
    
    It is an optimization in Nullable<gis::srid_t>::operator==() that
    triggers the warning. The code checks that both the Nullable objects
    contain a value before it tries to compare their values, but the
    compiler seems to lay out code that compares the values before the
    code that checks if they contain a value.
    
    This patch silences the Valgrind warning by using value-initialization
    instead of default-initialization of Nullable::m_value when no value
    has been provided.
    
    Change-Id: Ibb039cfc45020ece4b295193d9d8c46c4da9103d

commit b3b741ce81ec475ac2ceb0138a74a90bbc966a56
Author: Pavan Naik <pavan.naik@oracle.com>
Date:   Tue Dec 5 12:13:33 2017 +0530

    BUG#14688240: MTR DOESN'T PRINT THE NECESSARY INFORMATION WHEN
                  --VERBOSE IS USED ONLY ONCE
    
    Description:
    ------------
    The proper usage of verbose utility in MTR is actually when 'verbose'
    option is specified twice on the command line which is cumbersome.
    
    Fix:
    ----
    - Modified 'verbose' option to be a boolean option.
    
    - Modified MTR to print all the necessary verbose output when 'verbose'
      option is used on the command line.
    
    Change-Id: I2144b7875f9b2e67afec5304b49fe15bcb805359

commit bdc83ceb6cf1e8af08c4ba2da8d7c8920640098f
Author: Jimmy Yang <jimmy.yang@oracle.com>
Date:   Tue Dec 5 01:41:33 2017 +0100

    Follow fix for Bug 27073280 - INNODB: ASSERTION FAILURE:
    HA_INNODB.CC:3258:M_PREBUILT->MAGIC_N == 78540783
    Disallow the test run on 4k pagesize, since the 4k pagesize has index
    limit of 768. And we will need > 768 index size to repro the issue.
    Also adjust result wl6501_scale_1.result, the warning are eliminated.

commit a68c737a5c4ccdba2bcf2e0326027ca78ff02717
Author: Christopher Powers <chris.powers@oracle.com>
Date:   Mon Dec 4 15:40:19 2017 -0600

    Bug#25768813 CRASH IN PERSISTED_VARIABLES_CACHE::FLUSH_TO_FILE
    
    Crash caused by race condition in Persisted_variables_cache::flush_to_file().
    
    Added lock on the persisted variables mutex to block updates to the variable
    cache while it is being written to the file.

commit aff2ea7f39c5b4c630848be3cfb83e06358f06e4
Author: Praveenkumar Hulakund <praveenkumar.hulakund@oracle.com>
Date:   Mon Dec 4 19:51:33 2017 +0100

    WL#9344 - Logging services: error messages
    
    Follow-up patch to replace sql_print_* with the new APIs(LogErr()
    & log_errlog()).
    
    Patch even introduces error codes for these error messages.
    
    As part of this patch, sql_print_* are replaced in the server code
    only. sql_print* in the plugin and components code are *not* replaced.

commit 71b7fcae2a8387e893edcc74f3947244e15a2b6a
Author: Yashwanth Thummala <yashwanth.thummala@oracle.com>
Date:   Mon Dec 4 21:35:20 2017 +0530

    Bug #26977679 - MEB FAILS TO USE SSL CONNECTION WITH --PROTOCOL=SOCKET
    
    Description:
    
    MEB fails to establish an SSL connection when --protocol=SOCKET is specified,
    even when ssl-mode=REQUIRED is specified with an SSL enabled server.
    
    However, with --protocol=TCP the connection is established as expected.
    
    Also, mysqlbackup is not printing correct info about the type of connection
    that it is trying to establish.
    
    Fix:
    
    Whenever --ssl-mode=REQUIRED is specified when using socket protocol, use the
    library call 'mysql_options' to set the ssl-mode as required.
    
    Also add a message, when ssl mode is requested with socket describing that
    the connection can't be anymore secure.
    
    RB# http://rb.no.oracle.com/rb/r/17780/

commit f6123c39e963ebd3601e4999c366efbf64852638
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Mon Dec 4 17:19:21 2017 +0100

    Bug #27135084: WINDOW FUNC: CRASH IN ITEM_FUNC_INT_DIV::VAL_INT
    
    Different error handling in window functions, due to backport of fixes
    for misc. date/time functions.
    
    Change-Id: I5eb68c5be3812687ea25393493c3dcca0ed82e09

commit daeaffe2ec5b3eca1cf215c8bd5bcf2fbb4d02ed
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Mon Dec 4 16:03:39 2017 +0100

    BUG #25750609: PASSWORD RELATED COMMANDS WRITTEN IN MYSQL_HISTORY BY MYSQL CLIENT
    
    Post-push fix, broken build on misc platforms.
    Also: don't use DBUG_ENTER without matching DBUG_RETURN (stack corruption)
    
    (cherry picked from commit 9a96ea0a00d4a8ae77ce476c0429964749fa84c3)

commit 104994afa3027995b99b5d9d9c832d09a75c74e5
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Mon Dec 4 16:51:38 2017 +0100

    BUG #25750609: PASSWORD RELATED COMMANDS WRITTEN IN MYSQL_HISTORY BY MYSQL CLIENT
    
    Post-push fix, broken build on Solaris.
    
    Change-Id: I76c2602a0d2f5a0da775555d0b357e578297d110

commit b719374aced1fddd6cbb5a8a15d124538f6c8208
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Thu Nov 23 15:31:23 2017 +0100

    Bug#27134168 UBSAN: MY_DOUBLE_ROUND - NEGATION OF BLAH
    
    If number of decimals is <= -309, then simply skip further calculation,
    and return 0.0 from my_double_round.
    
    (cherry picked from commit d8d517f49ffde23cf6d86a6d0c4bbec14f0baebe)

commit 2cdca5d93e5916bf6ce79af78299c671df297535
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Thu Nov 23 15:15:40 2017 +0100

    Bug#27134148 UBSAN: DATE_ADD_INTERVAL - SIGNED INTEGER OVERFLOW:
    
    Guard against arithmetic overflow when calculating misc. intervals.
    
    (cherry picked from commit 3d98f9e46a386d4b176df00cf7d0f0cca645b9ba)

commit d3b85e4c01ab3db08696bf059da8972244454083
Author: Steinar H. Gunderson <steinar.gunderson@oracle.com>
Date:   Wed Oct 25 14:27:47 2017 +0200

    Bug #27004806: UBSAN: ITEM_DATE_ADD_INTERVAL - NEGATION OF XYZ AND SIGNED INTEGER OVERFLOW
    
    Fix a possible integer overflow when adding dates, potentially resulting in
    bogus results instead of a proper overflow error.
    
    Change-Id: I1858cad37956aa0efc3018a75e28137697e6a22c
    (cherry picked from commit 9655d994cfe3e1319d2e712cf21f6bf0665a2f37)

commit 6d27b2fc6e0cb58682912119970bb3a73b93bc67
Author: Steinar H. Gunderson <steinar.gunderson@oracle.com>
Date:   Wed Oct 25 16:07:34 2017 +0200

    Bug #27004729: UBSAN: ITEM_FUNC_MAKEDATE::GET_DATE - SIGNED INTEGER OVERFLOW
    
    Fix an overflow (integer wraparound) if a huge value is given to the days
    parameter of makedate().
    
    Change-Id: Ife6f8095795cdafe00420768b37d785940d40d73
    (cherry picked from commit c1dfb54ef75c79b8a497b77b786b36b09350d72a)

commit 406e4f0f8ffdd8a341938434a598fe4d3fb92f28
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Wed Nov 1 17:29:24 2017 +0100

    Bug #27004699: UBSAN: ITEM_FUNC_PERIOD_ADD::VAL_INT - SIGNED INTEGER OVERFLOW:
    
    Wrong result recorded.
    
    Change-Id: I188f2e6df0b39f19173d666e811c5e27ede39d9d
    (cherry picked from commit f4583ea2b17ef29671d8585a096f839869f56421)

commit 0865f5cc4d5d802c03dc36450e78657ed8943fff
Author: Steinar H. Gunderson <steinar.gunderson@oracle.com>
Date:   Wed Oct 25 16:25:53 2017 +0200

    Bug #27004699: UBSAN: ITEM_FUNC_PERIOD_ADD::VAL_INT - SIGNED INTEGER OVERFLOW:
    
    Fix an integer overflow by rejecting invalid periods in PERIOD_ADD()
    and PERIOD_DIFF(). Note in particular that negative periods are no
    longer allowed, nor the 0th month. These will now return an error.
    
    Change-Id: I47d11416e7ffce73e9ebe5637488bdf8fe776fa0
    (cherry picked from commit d45a2b224503ee83b2df155f759fce3ab3d00dcb)

commit 97447b6294efeb27e6f43d19e5d9dc244d79d478
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Thu Nov 30 16:33:33 2017 +0100

    Bug#27199465 REMOVE -WDECLARATION-AFTER-STATEMENT FROM WARNING FLAGS
    
    Remove -Wdeclaration-after-statement from -Werror list.
    All compilers in use support it, and it gives spurious warnings when building
    third-party code.
    
    Change-Id: I078893aa07058dd13eba32b97802bad2fd93efa6
    (cherry picked from commit 547061961a9975b4cba8d05d07d314cdc9a012fb)

commit d99a0a147470308cb9f0cb37e884061841e52aba
Merge: c875231 94ff35f
Author: Norvald H. Ryeng <norvald.ryeng@oracle.com>
Date:   Mon Dec 4 15:37:20 2017 +0100

    Merge branch 'mysql-8.0-wl10999' into mysql-8.0

commit 94ff35f2ac0b7513ce347ed2054f8b14af267e49
Author: Aleksander Wasaznik <aleksander.wasaznik@oracle.com>
Date:   Thu Aug 10 16:14:58 2017 +0200

    WL#10999: gis::Functor based ST_Distance_Sphere
    
    Change-Id: I53b9dd81c7d53aa8064aab57dcd4243f502d4cec

commit fa16ab7c641ea30fcf95866ae5124e2bbd7a1f37
Author: Aleksander Wasaznik <aleksander.wasaznik@oracle.com>
Date:   Fri Aug 11 11:54:19 2017 +0200

    WL#10999: gis::{long,lat}itude_out_of_range_exception
    
    Change-Id: I5f44b3452ec6575ab2c255c45f13b3b9bb943429

commit c875231a6b0611718d4525bce74eeecad1f7a334
Author: Martin Hansson <martin.hansson@oracle.com>
Date:   Tue Nov 28 11:16:48 2017 +0100

    Bug #27183583	REGEXP OPERATIONS CANT BE KILLED
    
    Long-running regular expression matches could not be killed.
    Fixed by adding a match callback that checks if the query was killed.
    
    Change-Id: Ic1193478461f647053d5409037617a979e96f449

commit db652dfa996762887b21fa230a164163df73ed3f
Author: Neha Kumari <neha.n.kumari@oracle.com>
Date:   Mon Dec 4 15:40:59 2017 +0530

    WL#9237: Add a new variable binlog_expire_logs_seconds
    
    This is a post-push fix for the above WL, below is the description.
    
    Problem:
    All the server variables should have a test in the test suite sys_vars,
    these tests are added to do the basic check of that variable like accepted
    values, limits and other things. When binlog_expire_logs_seconds was
    introduced as part of WL#9237 the tests for binlog_expire_logs_seconds
    were added in the existing test expire_logs_days_basic.test which was
    not correct as every variable should have its own independent test
    inside sys_vars.
    
    Fix:
    Move the binlog_expire_logs_seconds test code from
    expire_logs_days_basic.test to a new test file binlog_expire_logs_seconds.test.

commit 07c99d3a29ae8ed2ed9e1ebf8727ab0c0908bb30
Merge: 924ffeb 938c11a
Author: Norvald H. Ryeng <norvald.ryeng@oracle.com>
Date:   Mon Dec 4 13:42:18 2017 +0100

    Merge branch 'mysql-8.0-wl10927' into mysql-8.0

commit 938c11aaa943e8bb54d9bcc110076ec10bd7cadc
Author: Aleksander Wasaznik <aleksander.wasaznik@oracle.com>
Date:   Thu Jul 27 18:45:45 2017 +0200

    WL#10927: gis::Unary_functor based ST_IsSimple
    
    Changes in this commit:
     - Create Unary_functor based gis::Is_simple for boost::geometry::is_simple
     - Create gis::is_simple interface for calling gis::Is_simple
     - Unittest gis::is_simple
     - Rewrite Item_func_issimple::val_int in style of
       Item_func_spatial_relation::val_int, using gis::is_simple.
     - Remove unused Item_func_issimple::issimple.
     - Rename Item_func_issimple to Item_func_st_issimple.
     - Correct MTR tests of buggy behaviour.
     - Add MTR tests for code coverage.
    
    Change-Id: I38aa61acc3c09cdd72ccd07cce003e6718f36b4

commit f5845451a6d470f5a839d0dfd4a9359a000ea355
Author: Aleksander Wasaznik <aleksander.wasaznik@oracle.com>
Date:   Fri Nov 17 20:18:18 2017 +0100

    gis::Unary_functor

commit bc1b3a91e433aae120b8a173c82d48b3007cdbbf
Author: Aleksander Wasaznik <aleksander.wasaznik@oracle.com>
Date:   Fri Aug 11 10:26:44 2017 +0200

    New gis::not_implemented_exception
    
    gis::not_implemented_exception now indicates the SRS type as well as the
    geometry types in question. This is now used in handle_gis_exception to
    select an appropriate error message. gis::not_implemented_exception now
    facilitates both unary and binary functors.
    
    To supplement ER_NOT_IMPLEMENTED_FOR_GEOGRAPHIC_SRS,
    ER_NOT_IMPLEMENTED_FOR_CARTESIAN_SRS, and
    ER_NOT_IMPLEMENTED_FOR_PROJECTED_SRS where added.
    
    Change-Id: Ia02c52de899f6ea5c892b76070b92a26de05d512

commit 7a588bc32c65c4369741f3a03a0e35c7284d274a
Author: Aleksander Wasaznik <aleksander.wasaznik@oracle.com>
Date:   Fri Jun 23 16:43:41 2017 +0200

    Shareable files for gis unittests
    
    Change-Id: I78c0111efee3dc733bee560d4f8d4d05d095a3aa

commit 7f89bb638ce0605a072aceb8afeb84c3dc88f9f1
Author: Martin Hansson <martin.hansson@oracle.com>
Date:   Thu Aug 24 15:32:54 2017 +0200

    Bug#26377159: IMPLEMENT DOWN_CAST CORRECTLY
    
    The function template down_cast in its current form only
    works for pointers, but the template as written will match
    any type. In order for it to work for references (lvalue or
    rvalue), a different implementation is needed.
    
    Fixed by limiting the current down_cast to pointers and
    adding an overload for references. This also has the added
    benefit of not matching for non-pointer non-reference types.

commit 924ffeba0c62dc8d65671de5b01795a57e588f5b
Author: Bharathy Satish <bharathy.x.satish@oracle.com>
Date:   Mon Dec 4 12:59:37 2017 +0100

    Disabled group_replication.gr_start_with_persisted_variables test as the
    test fails.

commit af4cdfbd1c60c414f25e694a2c0d2b15b05381c1
Author: Ivan Švaljek <ivan.svaljek@oracle.com>
Date:   Mon Dec 4 12:50:38 2017 +0100

    BUG #25750609: PASSWORD RELATED COMMANDS WRITTEN IN MYSQL_HISTORY BY MYSQL CLIENT
    
    Correct wildcards were applied for history filtering. Pattern matching
    functionality has been extracted to a class to facilitate unit testing.

commit e130906294652daaf531cfa95b682e8eb9ff7d7f
Author: Anibal Pinto <anibal.pinto@oracle.com>
Date:   Mon Dec 4 12:17:36 2017 +0100

    BUG#27115183: LOTS OF SPAM FROM REPLICATION DURING --INITALIZE
    
    There are various unwanted messages in error log from replication when
    running:
            bin/mysqld --initialize
    
    When executing initialize:
            - Do not initialize global.executed_gtids from mysql.gtid_executed
              table, since global.executed_gtids is not used.
            - send a note with UUID created instead of warning

commit b2c6e705294e7b06f804e7e998ca5b455958d047
Author: Praveenkumar Hulakund <praveenkumar.hulakund@oracle.com>
Date:   Mon Dec 4 12:03:11 2017 +0100

    Bug#24619634 - mtr's check of main.mysqldump fails.
    
    Post-push patch to fix valgrind reported issue.

commit 136aa4176599f7734551522e5c37d5d8d74a5670
Author: Dyre Tjeldvoll <Dyre.Tjeldvoll@oracle.com>
Date:   Mon Dec 4 09:29:00 2017 +0100

    Bug#27197889: RPL_NOGTID.RPL_NO_GTID_SPLIT_STATEMENTS_DEBUG FAILING AFTER CHANGE IN THE ERROR
    
    Result file had not been re-recored as part of the fix for Bug#26043994.
    
    Re-record result file.
    
    Change-Id: I92bba3d7d594bba51a4302c2181c58fec46d2d09
    (cherry picked from commit 39a1b48aa3ad46fa2a19fc4f0166d724db8c3168)

commit bfb39ad2f237d1a52317451c1e8fde9cd4586cc0
Author: Annamalai Gurusami <annamalai.gurusami@oracle.com>
Date:   Mon Dec 4 14:57:40 2017 +0530

    Bug#27202974 - Disable lob::ref_t::is_big().

commit aed0c4af50bb6308928aa5612f9b03c324da9f57
Author: Daogang Qu <bill.qu@oracle.com>
Date:   Mon Dec 4 17:12:21 2017 +0800

    Bug #27082922   --LOG-BIN BY DEFAULT CAUSES LOTS OF SPAM IN ERROR LOG BY DEFAULT -- post fix
    
    Post fix a failed test.

commit 4046ba372b4dbe70d87c321889092ea0b0bd9581
Author: Praveenkumar Hulakund <praveenkumar.hulakund@oracle.com>
Date:   Mon Dec 4 05:45:59 2017 +0100

    Bug#24619634 - mtr's check of main.mysqldump fails.
    
    Post-push fix: DDL operation on TABLE, VIEW or stored function
          	       updates metadata of view referencing it. Before
                   patch for this bug even view query is updated. As
                   part of this patch, adding a code to update a view
                   query.

commit cf7554b6bc373524184ef62cc1118b044a3a0fb0
Author: Chaithra Gopalareddy <chaithra.gopalareddy@oracle.com>
Date:   Mon Dec 4 10:05:28 2017 +0530

    Bug#27149369: ASSERTION FAILURE IN BOOL
                  READ_FRAME_BUFFER_ROW(INT64, WINDOW*, BOOL)
    
    Problem:
    When handling range frames, if the first row for a range frame is found,
    currently we do not store the position - REA_FIRST_IN_FRAME(as a hint).
    This affects how we retrieve the row from frame buffer and fails the assert.
    
    Analysis:
    For these set of values - 392, 1027,1027,1034,1039 and window having
    RANGE BETWEEN 7 PRECEDING and 1 PRECEDING,
    For the fourth row, when calculating the rows that are in range, 1027 from
    row 3 will be marked as first in frame and 1027 from row 4 will be
    marked as last in frame. As a result when we get back to calculating
    "last_value" for row 5 (value 1039)- Since we have first_row < last_row
    in the frame for the previous range frame, we try and retrieve
    FIRST_ROW_IN_FRAME from the frame buffer. But we fail to find the row using
    the hints present in buffer_positions.
    
    Solution:
    Store the hint REA_FIRST_IN_FRAME when we find the first row in the range
    frame as this will be used for the next range frame calculation.

commit 0c81b687c70e603b38b23499faabd3da440c4ee6
Author: Anitha Gopi <anitha.gopi@oracle.com>
Date:   Mon Dec 4 04:50:43 2017 +0100

    Removed some tests with closed bugs from defaul.experimantal.

commit a63b2b7d15cdeea4544895e6368e39331e8d3c92
Author: Daogang Qu <bill.qu@oracle.com>
Date:   Mon Dec 4 09:31:06 2017 +0800

    Bug #26666259   LOG-SLAVE-UPDATES SHOULD BE OFF TOO LIKE LOG-BIN DURING MYSQLD INITIALIZATION
    
    Problem
    =======
    The --log-slave-updates warning and the --slave-preserve-commit-order
    error are printed if --skip-log-bin is configured when starting the
    server. And the --log-slave-updates warning is printed during server
    initialization.
    
    Analysis
    ========
    In general, conflicting implicit options should not cause a
    warning/error, conflicting explicit options should cause a
    warning/error. For example, there should be a warning when
    user specifies --skip-log-bin and --log-slave-updates (both
    options set explicitly on command line or configuration
    file) and there should not be a warning when users
    specifies --skip-log-bin without --log-slave-updates.
    
    Fix
    ===
    If user specifies --skip-log-bin without --log-slave-updates,
    --skip-log-bin turns off --log-slave-updates, then the
    --log-slave-updates warning is gone away.
    
    If user specifies --skip-log-bin and --log-slave-updates (both
    options set explicitly on command line or configuration file),
    then the --log-slave-updates warning is printed as before.
    
    If user specifies --skip-log-bin without --slave-preserve-commit-order,
    --skip-log-bin turns off --slave-preserve-commit-order, then the
    --slave-preserve-commit-order error is gone away.
    
    If user specifies --skip-log-bin and --slave-preserve-commit-order
    (both options set explicitly on command line or configuration file),
    then the --slave-preserve-commit-order error is printed as before.

commit f5e5d492c0e3cb737195b8fae693df898d8a83a7
Author: Gopal Shankar <gopal.shankar@oracle.com>
Date:   Thu Nov 23 18:57:21 2017 +0100

    Bug#27041323 INNODB: ASSERTION FAILURE: REM0REC.CC:372:LEN <= COL->LEN || ((COL->MTYPE)==5...
    
    The problem is that the SHOW TABLE STATUS command asserts in
    InnoDB when we set "SET big_tables=1" and "SET
    character_set_connection=ucs2".  This seem to be a sporadic
    problem.
    
    The root cause of the problem is a effect of fix for
    Bug#25793429. The bug was fixed by enabling following UDFs
          GET_DD_CREATE_OPTIONS,
          INTERNAL_GET_COMMENT_OR_ERROR,
          GET_DD_COLUMN_PRIVILEGES
    to use connection collation, avoiding them to be treated as
    binary string by optimizer. However, we see that MySQL 5.7
    uses system charset for I_S.TABLES columns that show create
    options, comment and privileges.
    
    The fix is to make 8.0 behave the same as 5.7 by using
    system charset for the above mentioned UDFs and few others
    UDFs used by I_S system views.
    
    A test case is added in main.information_schema.
    
    Change-Id: Ib99e20218f94d2724e325060bfb08aa5d4ee1c5f

commit 874a10576d878ec9423c074662b8dd697ca90c87
Author: Knut Anders Hatlen <knut.hatlen@oracle.com>
Date:   Sat Dec 2 17:20:51 2017 +0100

    Fix doxygen warning.

commit 1b59f46f92be95b00fa7ad0e5340437a4d11bfee
Author: Rahul Sisondia <rahul.sisondia@oracle.com>
Date:   Sat Dec 2 12:34:05 2017 +0100

    Bug#25122897 SET DEFAULT ROLE NOT TRANSACTIONAL
    
    Fixed doxygen errors which were introduced through the commit#
    58dcbcd5d7ec9a1f3feb33e34fcf4848af05dfba while fixing the bug.

commit da4e70f605b7f8e6e7e8f676ba49ae8d04724c40
Merge: 3e91a4a d40f05c
Author: Shishir Jaiswal <shishir.j.jaiswal@oracle.com>
Date:   Sat Dec 2 15:28:18 2017 +0530

    Merge branch 'mysql-5.7' into mysql-8.0

commit d40f05c68f23f593b784e93d64adc979112dc438
Merge: 84d4c82 9e327ae
Author: Shishir Jaiswal <shishir.j.jaiswal@oracle.com>
Date:   Sat Dec 2 15:19:12 2017 +0530

    Merge branch 'mysql-5.6' into mysql-5.7

commit 9e327aebf3aa6775ddf65abfeaf43eb0d326a67c
Merge: b9e85dc 5f85fee
Author: Shishir Jaiswal <shishir.j.jaiswal@oracle.com>
Date:   Sat Dec 2 15:15:44 2017 +0530

    Merge branch 'mysql-5.5' into mysql-5.6

commit 5f85feee577dd5fb4f80d8add876bf1ea87fae64
Author: Shishir Jaiswal <shishir.j.jaiswal@oracle.com>
Date:   Sat Dec 2 15:12:32 2017 +0530

    Bug#26585560 - MYSQL DAEMON SHOULD CREATE ITS PID FILE AS
                   ROOT
    
    DESCRIPTION
    ===========
    If the .pid file is created at a world-writable location,
    it can be compromised by replacing the server's pid with
    another running server's (or some other non-mysql process)
    PID causing abnormal behaviour.
    
    ANALYSIS
    ========
    In such a case, user should be warned that .pid file is
    being created at a world-writable location.
    
    FIX
    ===
    A new function is_file_or_dir_world_writable() is defined
    and it is called in create_pid_file() before .pid file
    creation. If the location is world-writable, a relevant
    warning is thrown.
    
    NOTE
    ====
    1. PID file is always created with permission bit 0664, so
    for outside world its read-only.
    2. Ignoring the case when permission is denied to get the
    dir stats since the .pid file creation would fail anyway in
    such a case.

commit 3e91a4aa81fe235e18d2541a3e7d09552288efbf
Author: Jimmy Yang <jimmy.yang@oracle.com>
Date:   Fri Dec 1 21:13:04 2017 +0100

    Follow up fix for Bug #27073280 INNODB: ASSERTION FAILUREa
    : HA_INNODB.CC:3258:  M_PREBUILT->MAGIC_N == 78540783.
    For partitioned table, the index for saved flag could overflow

commit 557a33d6d5dd0904872cd5676d7cc4dca417e713
Author: Tatiana Azundris Nuernberg <tatjana.nuernberg@oracle.com>
Date:   Fri Dec 1 09:44:36 2017 +0000

    WL#9651: Logging services: log filter (configuration engine)
    
    Provide a configuration language for
    WL#9342, "logging services: log filter (filtering engine)".
    This language should expose all features of the filtering
    engine and allow the user to leverage its full power using
    a simple "if <condition> then <action>" syntax.
    
    - filter language parser/compiler/decompiler
    - diagnostics to filter rule-set setting
    - tests, and ever more tests
    - update the packages

commit 7a74060b406c45db29b94b6c641e6b791e0c4ff2
Author: Georgi Kodinov <georgi.kodinov@oracle.com>
Date:   Fri Dec 1 12:21:48 2017 +0200

    Addendum to the fix for bug #26474964:
    
    Removed the wrongly merged have_embedded from the test.
    Removed the windows check as the test runs on windows too.

commit 61b9b49937a5a5c151dd269e320418533157f580
Author: Bjorn Munch <bjorn.munch@oracle.com>
Date:   Fri Dec 1 10:48:03 2017 +0100

    Bug #26115002 UDF_EXAMPLE BINARY NOT PACKAGED
    
      Package it in test package
      RPM and DEB packaging updated to reflect that
      Failing tests enabled

commit 58dcbcd5d7ec9a1f3feb33e34fcf4848af05dfba
Author: Rahul Sisondia <rahul.sisondia@oracle.com>
Date:   Fri Dec 1 09:58:40 2017 +0100

    Bug#25122897 SET DEFAULT ROLE NOT TRANSACTIONAL
    
    Description
    -----------
    When SET DEFAULT ROLE statement is executed,
    Sql_cmd_alter_user_default_role::execute() method is called.
    This method performs a few sanity checks and then alters the default roles for
    every user one by one. It means we acquire the table lock and ACL lock for every
    user, make the changes and commit them for the user. Instead, we must acquire
    the locks once, do the alter roles for all users and then commit in the end.
    
    Fix:
    ------
    - Introduced a new method named mysql_alter_or_clear_roles() which is called
      from the Sql_cmd_alter_user_default_role::execute(). The new method acquires
      the locks, alters the roles for all users according to the specified role_type
      and then commits the acl ddl changes.
    
    - Since we now need to pass the role_type in the method argument therefore, we
      had to do the forward declaration of the same in the auth_common.h . Only enum
      class can be forward declared therefore, changed the "enum role_enum" to
      "enum class role_enum" and updated the cascade effects of the same.
    
    - Removed the following 3 wrapper methods
       -  mysql_clear_default_roles
       -  mysql_alter_user_set_default_roles_all
       -  mysql_alter_user_set_default_roles
    
    Testing :
    
    Introduced a new test file 'atomic_alter_roles' that verifies the following the three scenarios
    a. SET DEFAULT ROLE 'role 1' , 'role 2' to user1 , user 2
    b. SET DEFAULT ROLE ALL to user 1, user 2
    c. SET DEFAUL ROLE NONE to user1 , user 2
    Added a new test in the existing file 'atomic_create_user' that verified the following scenario
    a. CREATE USER user 1, user 2 DEFAULT ROLE 'qa';
    
    Ctest results -
    
    100% tests passed, 0 tests failed out of 46
    Total Test time (real) =  55.21 sec
    
    > -----Original Message-----
    > From: MYSQL-PREPUSH-TESTING_WW_GRP@oracle.com [mailto:MYSQL-
    > PREPUSH-TESTING_WW_GRP@oracle.com]
    > Sent: Fri, December 1, 2017 11:08 AM
    > To: rahul.sisondia@oracle.com
    > Subject: Pre-push testing result on linux platform : mysql-trunk [ Fail ]
    >
    > Build#3844 - Changeset:
    > + 1bd963041228d62ef050722338b7d7b926b5cdc4 Bug#25122897 SET
    > DEFAULT ROLE
    > + NOT TRANSACTIONAL
    >
    > MTR    : All tests are successful
    > CHTEST : Unsuccessful
    
    Note - CHTEST failure seems uprelated to this bug fix.
    
    Review : RB#18034

commit 7153324c4c05137d7097628b1a4027faac4ee09f
Author: Bharathy Satish <bharathy.x.satish@oracle.com>
Date:   Fri Dec 1 07:40:39 2017 +0100

    Bug#27191128: ERROR NUMBER MISMATCH BETWEEN 5.7 AND 8.0 AFTER PUSH
                  OF WL9769
    Moved error codes introduced in mysql-5.7 from 8.0 list to 5.7 list
    in errmsg-utf8.txt file.

commit 73119a432e3babb438d29c6411a36b34ffd81193
Author: Satya Bodapati <satya.bodapati@oracle.com>
Date:   Fri Nov 17 17:55:05 2017 +0100

    Bug#27116565 - REGRESSION IN CREATE TABLE THROUGHPUT AND INCREASED DISK USAGE
    
    Problem:
    -------
    A simple CREATE TABLE(a INT); needs minimum of 7 pages on disk. See the
    output from innochecksum
    ::       0             |               File Space Header |-
    ::       1             |               Insert Buffer Bitmap |-
    ::       2             |               Inode page |-
    ::       3             |               SDI Index page |-
    ::       4             |               Index page |-
    ::       5             |               Freshly allocated page |-
    ::       6             |               Freshly allocated page|-
    
    In commit id 5a8af7 the initial number of expected pages is reduced
    from 6 to 5 (because the number of SDI indexes are only 1). In reality,
    we have always 2 extra 'freshly allocated pages'.
    
    During file creation, we punch the entire file. So after the commit,
    we punched one page less. This lead to actual disk usage reported by du
    as higher. Note ls would still print the entire size allocated (not
    used).
    
    Fix:
    ----
    1. Use the correct number of initial expected pages including the
       freshly allocated pages. We now punch hole both freshly allocated
       pages. So on OS with sparse file report, we should see even lesser
       size occupied on disk.
    
    2. Tolerate 5.7 IBD files with different initial number pages. This is
       required when opening 5.7 IBD files for IMPORT or during recovery.
    
    3. Read page 0 completely. With the previous fix, we only read
       UNIV_ZIP_MIN_SIZE bytes. This is OK but better to read the entire
       page 0 as requested.
    
    Reviewed-By: Bin Su <bin.x.su@oracle.com>
    RB: 18002

commit abaab3af90cfb1475b38dd4e6a0dd4da32eb5844
Merge: d2e2c6f 84d4c82
Author: Debarun Banerjee <debarun.banerjee@oracle.com>
Date:   Fri Dec 1 10:47:05 2017 +0530

    Merge branch 'mysql-5.7' into mysql-8.0
    
    Conflicts:
    	storage/innobase/lock/lock0lock.cc

commit 84d4c823bfda0d52cfc1c7b246b2a86416a46562
Author: Debarun Banerjee <debarun.banerjee@oracle.com>
Date:   Fri Dec 1 10:44:29 2017 +0530

    BUG#27189701 INNODB: EARLY RELEASE GAP LOCKS FOR RC ISOLATION
    
    Problem :
    ---------
    1. XA prepared transactions are replayed in slave before they are
    committed in the order they are prepared.
    
    2. Two concurrent transactions run successfully to "XA Prepare"
    stage in master without conflict.
    
    3. The same transactions conflicts in slave when run serially till
    "XA Prepare". Innodb doesn't provide such no-conflict guarantee. It
    happens because GAP locks are not exact i.e. the locking range could be
    different when the same statement is run again.
    
    Solution :
    ----------
    1. Release GAP locks at transaction Prepare for READ COMMITTED isolation.
      - It doesn't break 2PL.
      - It can be extended to release all read locks
      - It can even be enabled for higher level of isolation in future
        as it doesn't break serializability.
    
    2. Don't inherit GAP locks after transaction has reached "Prepared" state.
    
    Reviewed-by: Sunny Bains <sunny.bains@oracle.com>
    
    RB: 16492

commit d2e2c6f68a50ae79cab0b4bca24fa81a66817c64
Author: Bharathy Satish <bharathy.x.satish@oracle.com>
Date:   Fri Dec 1 05:29:11 2017 +0100

    Bug #26495619: PERSISTED PLUGIN VARIABLES ARE NOT CONSIDERED DURING
                   SERVER RESTART
    Problem: System variables can be set either from command line or through
    sql using SET statement. Variables set as part of command line does not
    go through runtime validation, whereas variables set using SET statement
    are validated using check() function. Thus read only variables are set as
    part of command line and dynamic variables are set using SET statement.
    
    Variables persisted using SET PERSIST or PERSIST_ONLY syntax will ensure
    that variables are validated using check() when server is restarted, except
    with an exception for read only variables because they are appended to command
    line during server startup.
    
    There are certain group replication(GR) specific variables which are defined
    to be DYNAMIC variables, but cannot be changed once GR is up and ONLINE. This
    kind of behaviour confuses the existing SET statement execution logic. Thus
    when GR variables are persisted, and later when server is started persisted
    GR variables could not be set early before GR plugin is loaded. This will not
    make GR to come ONLINE on boot process.
    
    ex:
    SET PERSIST group_replication_group_name="aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa",
                group_replication_group_seeds="localhost:13011,localhost:13123",
                group_replication_local_address="localhost:13123",
    	        group_replication_bootstrap_group= ON,
                group_replication_start_on_boot=ON;
    
    With above variables persisted, GR should start on boot when server is
    restarted. This does not happen because SET statement logic expects these
    variables to be readonly so that these can be set early before plugin is
    loaded. To obtain this semantics variables needs to be decleared as READ
    ONLY, and for certain reasons these variables cannot be changed to readonly.
    
    Fix: A new flag named PLUGIN_VAR_PERSIST_AS_READ_ONLY is introduced which
    needs to be set in variable declaration to indicate that these are variables
    which can be changed before plugin is loaded but not after that. This flag
    will be checked in SET statement logic and will treat them as a read only
    variables. Thus when server is restarted these variables can be appended to
    command line, making GR to start on boot.

commit 4ce2e318145d5c6a6e47fd6615ecd35af3981f01
Author: Daogang Qu <bill.qu@oracle.com>
Date:   Fri Dec 1 08:39:03 2017 +0800

    Bug #27082922   --LOG-BIN BY DEFAULT CAUSES LOTS OF SPAM IN ERROR LOG BY DEFAULT
    
    Problem
    =======
    The warning "No argument was provided to --log-bin, and
    --log-bin-index was not used; so replication may break
    when this MySQL server acts as a master and has his
    hostname changed!! Please use '--log-bin=atum30-bin'
    to avoid this problem." is reported when starting
    server if --log-bin option is not used or --log-bin
    option is used without argument.
    
    Analysis
    ========
    The problem appears in the following four cases. Let's see if we can
    fix them without causing upgrade issue. See below.
    
     1. If --log-bin option is not supplied, make the name prefix of
        binary log files default to "binlog". This is safe because
        in 5.7 this configuration did not have a binary log. With
        this configuration during upgrade, there will not be any
        pre-existing binary log files using hostname as name
        prefix of binary log files.
    
     2. If --log-bin option is not supplied, make the name prefix
        of relay log files default to "relaylog". This would break
        upgrades because in 5.7 this configuration generates relay
        logs with hostname as the name prefix.
    
     3. If --log-bin option is supplied without argument, make the name
        prefix of binary log files default to "binlog". This would break
        upgrades because in 5.7 this configuration generates binary
        logs with hostname as the name prefix.
    
     4. If --log-bin option is supplied without argument, make the name
        prefix of relay log files default to "relaylog". This would
        break upgrades because in 5.7 this configuration generates
        relay logs with hostname as the name prefix.
    
    So we just can fix 1 without causing upgrade issue in the bug.
    
    Fix
    ===
    To avoid breaking upgrades and reporting the warning, we fix 1,
    and change the Warning to a Note if --log-bin option is supplied
    without argument, since it is a corner case.
    
    Problem 2
    =========
    The warning "You have not provided a mandatory server-id. Servers
    in a replication topology must have unique server-ids. Please
    refer to the proper server start-up parameters documentation."
    is reported when starting server with default install.
    
    Analysis 2
    ==========
    The server ID is a dynamic global variable, defaults to 1, used in
    replication to give each master and slave a unique identity. If a
    mandatory server-id is not provided for slave server and
    replicate_same_server_id is not in use, the slave I/O thread stops
    with the following error:
    "The slave I/O thread stops because master and slave have equal
    MySQL server ids; these ids must be different for replication to
    work (or the --replicate-same-server-id option must be used on
    slave but this does not always make sense; please check the manual
    before using it)."
    So when starting server even if a mandatory server-id is not
    provided, it is not necessary to report the following warning:
    "You have not provided a mandatory server-id. Servers
    in a replication topology must have unique server-ids. Please
    refer to the proper server start-up parameters documentation."
    
    Fix 2
    =====
    Change the Warning to s Note when starting server if a mandatory
    server-id is not provided.

commit 4112f6671df40b0a5313a21769550f4f1eceb07c
Author: Marek Szymczak <marek.szymczak@oracle.com>
Date:   Fri Dec 1 01:11:57 2017 +0100

    Bug#26362452 ASSERTION FAILURE:'OWNED_GTIDS.IS_OWNED_BY(THD->OWNED_GTID, THD->THREAD_ID())'
    
    Post-push fix: Missing include after merge.

commit ed39c55c5a68bccb431852e6ac6aefedab45045f
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Thu Nov 30 16:45:30 2017 +0100

    WL#9769: Keyring migration tool and new commercial keyring_encrypted_file plugin.
    
    Post-push fix: -Wmissing-field-initializers
    
    Change-Id: I354164980b75eb58e2a39d6c386ff6e4e410280c

commit 3b957298c88146f2033ed810f54ce3b06c449fd6
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Thu Nov 30 15:37:43 2017 +0100

    WL#8960 - InnoDB: Partial Update of Large Objects (BLOBs)
    
    Post-push fix: remove warnings
    
    variable 'new_block' is used
          uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
    warning: unused variable
          'SMALL_THRESHOLD_PAGE_COUNT' [-Wunused-const-variable]
    
    Change-Id: Ic7930d0036353ac08c68e8d9c6087e9b2ab9b86e

commit 2d65fbd8e5f51fe0b15b9c7394887b1bb7e0e9f8
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Tue Nov 28 15:51:54 2017 +0100

    Bug#27169809 FIX BUG 17583 FOR ALPINE LINUX
    
    This is an extra addition to the bugfix described below.
    To ensure consistent behaviour also on Alpine, open an extra file descriptor.
    
    Also: when reporting errors in batch mode, flush stdout before flushing stderr.
    This makes the output consistent for commands like
    -- exec mysql test>&1 < "<path to input file>"
    
    Similarly for mysqldump: flush the result file before dumping any error
    reports, to make output deterministic.
    
    Bug#17583: mysql drops connection when stdout is not writable
    
    When the client program had its stdout file descriptor closed by the calling
    shell, after some amount of work (enough to fill a socket buffer) the server
    would complain about a packet error and then disconnect the client.
    
    This is a serious problem.  If stdout is closed before the mysql is
    exec()d, then the first socket() call allocates file number 1 to communicate
    with the server.  Subsequent write()s to that file number (as when printing
    results that come back from the database) go back to the server instead in
    the command channel.  So, one should be able to craft data which, upon being
    selected back from the server to the client, and injected into the command
    stream become valid MySQL protocol to do something nasty when sent /back/ to
    the server.
    
    The solution is to close explicitly the file descriptor that we *printf() to,
    so that the libc layer and the OS layer both agree that the file is closed.
    
    Change-Id: Ic74a2cb752d1a66ff6d7e8e9b8fb98fb85636051

commit d10f84b5afd42a48fa3a462dbd8fc689f6f95f89
Merge: bcc309f fe94f52
Author: Marek Szymczak <marek.szymczak@oracle.com>
Date:   Thu Nov 30 16:51:10 2017 +0100

    Merge branch 'mysql-5.7' into mysql-8.0

commit fe94f52c47ac3fb617611847511f998502b41a47
Author: Marek Szymczak <marek.szymczak@oracle.com>
Date:   Thu Nov 30 16:47:49 2017 +0100

    Bug#24437533 AUDIT PLUGIN RECURSIVELY LOCKS MUTEX LOCK_FILTER IF ERROR OCCURS
    
    Post-push fix: audit_log_filter_readonly test fix. Audit Log filter tables updated
                   from MyISAM to InnoDB.

commit bcc309feaea34dcb94dc1aa12fcabfc1b65ba8dc
Author: Marc Alff <marc.alff@oracle.com>
Date:   Thu Nov 30 16:16:29 2017 +0100

    Test cleanup:
    - adjust windows test results
    - remove test col_metadata_locks, unstable on win platforms.

commit 7ce192f2c57d5f04e32bfd69591b181cae0e1d3d
Merge: 6ec3309 4496a47
Author: Georgi Kodinov <georgi.kodinov@oracle.com>
Date:   Thu Nov 30 15:33:30 2017 +0200

    Merge branch 'mysql-5.7' into mysql-8.0

commit 4496a4724768ff7299056ea4f4e9ac1a75b77422
Author: Georgi Kodinov <georgi.kodinov@oracle.com>
Date:   Thu Nov 23 12:33:06 2017 +0200

    Bug #26946491: INSTALL COMMAND FOR CLONE PLUGIN HANGS WHEN HEAVY DMLS ARE IN PROGRESS
    
    Backport to 5.7
    
    * Fixed plugin_add so it does not re-acquire the LOCK_plugin mutex after
      reporting an error
    * Fixed the callers of the plugin_add() to expect the above behavior and
      react accordingly (not release LOCK_plugin when reacting to the eror or
      re-aqcuire it when ignoring the error).
    * Fixed plugin_load and plugin_load_list to take the same locks into the same
      order as mysql_install_plugin does.
    * Added doxygen comments for some key functons and locks.
    * Fixed plugin_dl_add to not be keeping the lock while calling report_error().

commit 6ec33093153a98399703a7d54b92fab9ede24344
Author: Ivo Roylev <ivo.roylev@oracle.com>
Date:   Thu Nov 30 14:07:45 2017 +0200

    Bug#22833138: MYSQL CLIENT MEMORY LEAK AFTER THE SERVER HAS SHUT DOWN
    
    Workaround:
    
    Since the memory leaks reported in Bug#22833138 are coming from the (external to the MySQL server) KEYRING_OKV SDK, they will not be fixed.
    Adding all of the leak locations to Valgrind ignore list.
    
    But the plugin system automatically unloads the shared libraries so the valgrind cannot correctly report the leaks.
    Disabling the shared library unload if ran through valgrind. The side effect is the memory used by the shared object is not released. This is not a big problem anyway, and valgrind itself is very memory intensive. But further reloading of the same shared object succeeds, so all the tests run fine.

commit 5482856632b68d8dc9feb5af152477a6677e0ae7
Merge: d0aa0cd ba828c1
Author: Marek Szymczak <marek.szymczak@oracle.com>
Date:   Thu Nov 30 13:23:09 2017 +0100

    Merge branch 'mysql-5.7' into mysql-8.0

commit ba828c1f8a2761971718778cb796145d80f9c1e2
Author: Marek Szymczak <marek.szymczak@oracle.com>
Date:   Thu Nov 30 00:41:51 2017 +0100

    Bug#26362452 ASSERTION FAILURE:'OWNED_GTIDS.IS_OWNED_BY(THD->OWNED_GTID, THD->THREAD_ID())'
    
    Problem:
    ========
    Audit Log plugin stores JSON filtering information in audit_log_user and
    audit_log_filter_remove_filter tables. Before updating the tables, Audit Log
    creates own THD object to separate session THD from Audit Log internal THD.
    Internally created THD is used by server internals, which often operates on
    THD->thread_id(), which in Audit Log case was 0.
    
    Analysis:
    =========
    Newly created THD must have assigned thread_id value.
    
    Fix:
    ====
    THD generates thread_id() using the set_new_thread_id() method. THD is also
    registered to the Global_THD_manager::get_instance()->add_thd method.
    
    This patch also fixes Bug#24437533 AUDIT PLUGIN RECURSIVELY LOCKS MUTEX
                                       LOCK_FILTER IF ERROR OCCURS
    Reviewed-by:
    ============
    Georgi Kodinov <georgi.kodinov@oracle.com>
    Harin Vadodaria <harin.vadodaria@oracle.com>

commit d0aa0cd2629a298359cb58ffb6d50e6586ab1435
Merge: 701206a 8902424
Author: Georgi Kodinov <georgi.kodinov@oracle.com>
Date:   Thu Nov 30 14:05:48 2017 +0200

    Merge branch 'mysql-5.7' into mysql-8.0

commit 8902424112235e4aba1500be200af292bba24ae4
Author: Georgi Kodinov <georgi.kodinov@oracle.com>
Date:   Tue Nov 28 18:25:13 2017 +0200

    Bug #26474964: LDAP AUTH PLUGIN, CRASH WHEN SETTING VARIABLES TO NULL
    
    Fixed the code to properly check for NULL values for all variables.
    Test case added.
    Fixed some residual Windows line endings.

commit 701206ab05f6c1735686e04af9d933561db56516
Author: Nisha Gopalakrishnan <nisha.gopalakrishnan@oracle.com>
Date:   Thu Nov 30 16:45:44 2017 +0530

    BUG#27041502: ASSERTION `TYPE() != MYSQL_TYPE_TIMESTAMP' FAILED.
    
    Analysis:
    =========
    Inserting a NULL value in a table having TIMESTAMP field
    as primary key and a trigger(INSERT/UPDATE) defined on the
    table caused an assert in debug build. On the release build,
    appropriate error is reported.
    
    With WL9687, the 'explicit_defaults_for_timestamp'
    was enabled by default. Hence TIMESTAMP columns are NULL
    by default and no auto promotion happens.
    
    As part of WL#6030:
    When there are triggers installed on a table, the WL6030
    temporarily sets the Field as nullable during BEFORE-triggers
    are processed by setting Field->set_tmp_nullable(). So the
    fill_record() call do not report ER_BAD_NULL_ERROR. And WL6030
    introduces a new function Field::check_constraints() which does
    the checks after triggers are processed, which was not updated
    based on WL9687's expectation and had assert on TIMESTAMP field
    as explained in current commit message. In absence of triggers,
    fill_record()reports an error ER_BAD_NULL_ERROR, as
    Field->set_tmp_nullable() is not set.
    
    Hence the assert during the constraint check was fired based on
    the previous behavior i.e TIMESTAMP columns cannot be NULL(due to
    auto promotion).
    
    Fix:
    ===
    Removed the assert since TIMESTAMP columns can be NULL
    and constraints on the column should be evaluated.

commit be4b2251601b228a0c950bdc3d5bcb44be651d43
Merge: 7b4800d 0147646
Author: Harin Vadodaria <harin.vadodaria@oracle.com>
Date:   Thu Nov 30 12:21:17 2017 +0100

    Merge branch 'mysql-5.7' into mysql-8.0

commit 0147646416c97d883ec7c22ef9173f0e166922fa
Merge: 70f9efc b9e85dc
Author: Harin Vadodaria <harin.vadodaria@oracle.com>
Date:   Thu Nov 30 12:20:54 2017 +0100

    Merge branch 'mysql-5.6' into mysql-5.7

commit b9e85dc240a1fce3e57c3d9a3be25eab7f9be606
Author: Harin Vadodaria <harin.vadodaria@oracle.com>
Date:   Thu Nov 30 12:18:46 2017 +0100

    Bug#27194270: LIMIT PASSWORD HASH ROUNDS IN SHA256-CRYPT ALGORITHM
    
    Description: Authentication string for sha256_password
                 can contain an optional part specifying
                 number of hash rounds to be performed.
                 Though default is 5000, an
                 authentication_string directly inserted
                 in mysql.user table can contain different
                 value. This may cause extra computations
                 and may introduce unnecessary delay.
    
    Solution: Fixed the maximum number of rounds allowed.

commit 7b4800df4c41ec29318258058161e9f4c3da7f6e
Author: Marc Alff <marc.alff@oracle.com>
Date:   Thu Nov 30 11:27:59 2017 +0100

    Bug#27124506 NEW MDL OBJECT TYPES NOT INSTRUMENTED IN PERFSCHEMA
    
    Adjusted test cases.

commit 4aa0e4b1c03c487a6d94d789eb1d1130a35b5bb6
Merge: 5d66697 70f9efc
Author: Balasubramanian Kandasamy <balasubramanian.kandasamy@oracle.com>
Date:   Thu Nov 30 15:50:10 2017 +0530

    Merge branch 'mysql-5.7' into mysql-8.0

commit 70f9efc1b7a291fbf693dbc4827acba4961ddc62
Author: Balasubramanian Kandasamy <balasubramanian.kandasamy@oracle.com>
Date:   Thu Nov 30 15:45:38 2017 +0530

    	Post-fix: Bug#26742748 - 8.0 DOCKER IMAGE RPM GENERATES 5.7 DOC URL IN /ETC/MY.CNF
    	- Fix the cmake for docker rpm builds

commit 5d66697827276cde343194a8959edbbb07763c83
Merge: bd4f584 c35fe8a
Author: Harin Vadodaria <harin.vadodaria@oracle.com>
Date:   Thu Nov 30 09:19:49 2017 +0100

    Merge branch 'mysql-5.7' into mysql-8.0

commit c35fe8ae5a3c9beb369ccd09202706930776028b
Author: Harin Vadodaria <harin.vadodaria@oracle.com>
Date:   Thu Nov 30 09:17:35 2017 +0100

    Bug#25483593: HANDLE THE CASE WHEN --SSL-CIPHER IS LARGER THAN 4096 BYTES
    
    Description: Appending an exceptionally larges --ssl-cipher
                 value without validating destination buffer's
                 size causes client to exit.
    
    Solution: Append cipher value according to destination buffer's
              size.

commit bd4f58483affb5fa0a1c51461af65d265da4636b
Author: Lars Tangvald <lars.tangvald@oracle.com>
Date:   Tue Nov 28 07:37:38 2017 +0100

    Bug#27182912	WL 8987: WERROR=DANGLING-ELSE ON GCC 7.2
    
    Postpush fix
    
    The WL commit changed the line after a brace-less if from a statement to a macro.
    The macro contains an else, causing gcc 7.2 to give an ambiguity warning (Ubuntu 17.10+)
    Braces added around the if

commit 8d5d775fc1c96b23038fb99729b8209ce447d42a
Merge: 38cf47d 0306e9f
Author: Lars Tangvald <lars.tangvald@oracle.com>
Date:   Thu Nov 30 07:57:11 2017 +0100

    Merge branch 'mysql-5.7' into mysql-8.0

commit 0306e9f4736bc1c4c1545d96b230c17149419e52
Merge: 46e91ea 188366d
Author: Lars Tangvald <lars.tangvald@oracle.com>
Date:   Thu Nov 30 07:56:57 2017 +0100

    Merge branch 'mysql-5.6' into mysql-5.7

commit 188366dd4671979ece4f7139ad8507a33ad8e9c6
Author: Lars Tangvald <lars.tangvald@oracle.com>
Date:   Thu Nov 16 08:21:07 2017 +0100

    Deb packaging: Added support for Debian Unstable and Ubuntu 18.04

commit 38cf47def0a20bd509bb64a8765d6325cf8c3b1f
Merge: 54b7ee0 46e91ea
Author: Bharathy Satish <bharathy.x.satish@oracle.com>
Date:   Thu Nov 30 07:18:29 2017 +0100

    Merge branch 'mysql-5.7' into mysql-8.0

commit 46e91ea8a292f0fcbb9f193514f29375c5335205
Author: Bharathy Satish <bharathy.x.satish@oracle.com>
Date:   Thu Nov 30 07:13:05 2017 +0100

    Bug #27175716: KEYRING MIGRATION TOOL GENERATING THE KEYS WHICH CAN'T
                   BE READ BY SERVER
    
    Problem: Keyring migration tool creates backed file for destination
    plugin if the file is not present. This file is created with OS user
    as owner for this file. After migration when server is started with
    destination keyring plugin, plugin will reject this file from reading.
    
    Fix: Moved the migration specific code after calls to setgid and setuid
    so that backend files for destination plugin is created with correct user.

commit 54b7ee07d859a222fb2845fdcee772c27ad44bd3
Author: Jimmy Yang <jimmy.yang@oracle.com>
Date:   Thu Nov 30 01:38:52 2017 +0100

    Bug #27073280 INNODB: ASSERTION FAILURE: HA_INNODB.CC:3258:
    M_PREBUILT->MAGIC_N == 78540783
    
    Reviewed-by: Bin Su<bin.su@oracle.com>

commit d2aae8737a556fa0f45c01a666dd538de0641352
Author: Marc Alff <marc.alff@oracle.com>
Date:   Tue Nov 21 16:02:57 2017 +0100

    Bug#27124506 NEW MDL OBJECT TYPES NOT INSTRUMENTED IN PERFSCHEMA
    
    Before this fix,
    
    Metadata Lock name spaces introduced recently by new features
    were not instrumented properly with the performance schema.
    
    In particular, the following MDL keys were not instrumented:
    - SRID
    - COLUMN_STATISTICS
    
    The root cause is the incomplete switch statement
    in PFS_object_row::make_row() which does not
    print new types of keys correctly.
    
    With this fix:
    
    1)
    
    MDL_key::SRID is supported in table metadata_locks.
    
    2)
    
    MDL_key::COLUMN_STATISTICS is supported in table metadata_locks.
    
    3)
    
    To print correctly MDL for COLUMN_STATISTICS,
    a new column COLUMN_NAME is added in table metadata_locks.
    
    The existing index on OBJECT_TYPE, OBJECT_SCHEMA, OBJECT_NAME
    has been extended to include the new COLUMN_NAME.
    
    4)
    
    MDL keys for columns are represented as:
    - SCHEMA + NAME + COLUMN for most cases,
    - or SCHEMA + NAME in some degraded cases,
    so they are more observable.
    
    Before this fix, the MDL key was:
      SHA1(SCHEMA + NAME + COLUMN),
    which was obfuscated,
    as a work around for size constraints.

commit 53c5f16cc77a6de0a08fedffdef9187819746149
Merge: 7c066db f18e12c
Author: Ingo Struewing <Ingo.Struewing@oracle.com>
Date:   Wed Nov 29 17:27:54 2017 +0100

    Merge remote-tracking branch 'mysql-8.0-bug27001934-1/mysql-8.0' into mysql-8.0

commit 7c066dbb86926f823e22c00320353efb5293fbc7
Merge: 525688b 03961e9
Author: Ajo Robert <ajo.robert@oracle.com>
Date:   Wed Nov 29 20:33:15 2017 +0530

    Merge branch 'mysql-5.7' into mysql-8.0

commit 03961e99d0e9d2cc1a062eff56feaee1ee2bf4ef
Author: Ajo Robert <ajo.robert@oracle.com>
Date:   Wed Nov 29 20:33:05 2017 +0530

    Bug#24423143 - WRONG RESULTS FOR AGGREGATE QUERY
    
    Fixing ASAN issue.
    
    Change-Id: Idde55f2c1e49d98564abcfe2513b1f53729bddcc

commit 525688b2d1b1862a28b800796c9749d140641815
Author: Filipe Campos <filipe.campos@oracle.com>
Date:   Wed Nov 29 12:38:45 2017 +0100

    WL#9856 - MySQL GCS: Instrument locking structures
    
    Postfix: Improved instruments' names and their usage in some MTR tests.

commit 29c26b636b945a6b7e34709e0d405daa5fdbb1ca
Author: Krzysztof Kapuścik <krzysztof.kapuscik@oracle.com>
Date:   Thu Nov 16 16:37:55 2017 +0100

    Bug #27101184: TEMPTABLE::TABLE::INDEXES_DESTROY CRASH DURING SHUTDOWN
    
    During forced connection shutdown the temptables are not destroyed
    before connection thread is finished. That starts the auto cleanup
    of thread_local storage including tables collection in temptables.
    
    The destructor calls a method to remove indexes which uses the
    mysql_index. Value of that variable is a pointer stored from the
    TABLE passed to temptable creation which is no longer present,
    and the memory is no longer present at the moment of auto cleanup.
    
    The fix removes usage of mysql_index and stores the required
    index object allocation size in Table object.
    
    Reviewed-By: Marcin Babij <marcin.babij@oracle.com>
    Reviewed-By: Pawel Olchawa <pawel.olchawa@oracle.com>
    RB: 17953

commit babaf3f5b5ee4823b0665817bfbef7880cbb2fcc
Author: Erlend Dahl <erlend.dahl@oracle.com>
Date:   Wed Nov 29 11:00:27 2017 +0100

    Bug#27190109 SHUTDOWN_SERVER TIME IS TOO SHORT FOR VALGRIND IN SOME TESTS
    
    Make the tests use the default timeout (60 sec) instead of 10 sec.
    
    Approved by Shipra Jain <shipra.x.jain@oracle.com>.

commit ce280a74d54158453f6dfb2bf95533284403a469
Author: Satya Bodapati <satya.bodapati@oracle.com>
Date:   Wed Nov 29 11:22:06 2017 +0100

    Bug#27151163 - INNODB: ASSERTION FAILURE: DICT0SDI.CC:.*
    
    Problem:
    --------
    IBD file of general tablespace is removed and server tried to
    drop database on which the table belonged to general tablespace.
    An assertion is raised for DROP DATABASE but a DROP TABLE is
    tolerated.
    
    Fix:
    ----
    Tolerate tablespace missing case and do not report errors from
    SDI operations.
    
    Reviewed-By: Bin Su <bin.x.su@oracle.com>
    RB: 18078

commit f18e12c9e938064a495d3928261600a01e977ed2
Author: Ingo Struewing <Ingo.Struewing@oracle.com>
Date:   Wed Nov 29 11:45:30 2017 +0100

    Bug#27001934 - DEMERGE CODE SNIPPETS FROM SQL_TABLE, WHICH ARE NEEDED BY MEB
    
    Server code, needed by MEB was cut out of server files
    by #ifndef UNIV_HOTBACKUP.
    
    This patch reduces the amount of InnoDB code, compiled with
    MEB, so that the functions, which need server code, are not
    included. The changes in server code are reverted.
    
    Unrelated changes:
    
    Fix Windows build: Define strcasecmp and strncasecmp as
    inline functions instead of preprocessor macros.
    
    Change-Id: Iaabf9800f9e5c72282c312f76ad8da2765663c3f

commit dfdee6573a96933a6eef9c79d1a9961b52712eca
Author: Erlend Dahl <erlend.dahl@oracle.com>
Date:   Wed Nov 29 07:02:48 2017 +0100

    WL#8987 Add the ICU library to handle RLIKE/REGEXP.
    
    Update result for funcs_1.is_triggers

commit 583e824fc4f23efa1996af2d60935c42e55bd46a
Merge: 3b82ecf 343024b
Author: Mohit Joshi <mohit.joshi@oracle.com>
Date:   Wed Nov 29 11:07:45 2017 +0530

    Null-merge from 5.7

commit 343024b5cc99d05768a52b2ba5dfb0508e75dad6
Author: Mohit Joshi <mohit.joshi@oracle.com>
Date:   Wed Nov 29 11:04:28 2017 +0530

    Disabled keysecure tests on mysql-5.7 until Bug#26996342 is fixed.

commit 3b82ecf51c916b3a0ca4efcc393dac0ca41b8c31
Author: Havard Dybvik <havard.dybvik@oracle.com>
Date:   Mon Nov 27 08:56:25 2017 +0100

    Bug#27121663: SIG 11 IN FILL_DD_VIEW_TABLES | SQL/DD/DD_VIEW.CC
    
    The name of a derived table was not saved before the table was
    materialized and assigned the name of the temporary table. When the
    table name was later to be restored to its original value, an invalid
    reference (nullptr) was set. This caused the server to crash because
    'strlen' was called with nullptr as argument.
    
    As a fix, add a call to save_name_temporary() before materialization
    such that the existing call to reset_name_temporary() after
    materialization resets the name correctly.
    
    Also do some cleanup related to internal table names. Previously, "*"
    was used as an internal table name for derived tables, but it was later
    decided to just use the empty string "". Some unnecessary code was still
    leftover after this change. The internal_table_name buffer is therefore
    removed, and length of table names for views and derived tables should
    be 0 instead of 1.

commit b50664cfc0dc8af9eae3dfce308a42214097794c
Author: Marc Alff <marc.alff@oracle.com>
Date:   Tue Nov 28 16:00:54 2017 +0100

    Bug#24688694 SEVERAL UNSTABLE TESTS IN SUITE PERFSCHEMA
    
    Improved stability of test perfschema.idx_compare*
    Removed tests involving OR clauses,
    as these do not use indexes anyway.

commit da1505b7dd79afa878ece3f029dbe0fa683caa16
Author: Erlend Dahl <erlend.dahl@oracle.com>
Date:   Tue Nov 28 13:19:46 2017 +0100

    WL#8987 Add the ICU library to handle RLIKE/REGEXP.
    
    Follow-up patch to avoid timeout for regexp searches in MTR's check-warnings.
    
    Approved by Pavan Naik <pavan.naik@oracle.com>.

commit 183c959cdfed2a148485f7c26dfa700418a872fb
Author: Steinar H. Gunderson <steinar.gunderson@oracle.com>
Date:   Thu Nov 23 16:59:15 2017 +0100

    Bug #26399073: MYSQL DOES NOT COMPILE WITH CLANG ON WINDOWS [noclose]
    
    Make stored procedures lock their tables in sorted order;
    fixes binlog_nogtid.binlog_unsafe on Clang on Windows.
    
    This also obsoletes the requirement for some replication tests
    to have separate Windows versions.
    
    Backport to 8.0.
    
    Change-Id: Ie6e733092ea9819957be29e9bc9f828679507dec

commit 5f58efc9ee45e2531116368ccf0cb7a94b4c8014
Author: Georgi Kodinov <georgi.kodinov@oracle.com>
Date:   Thu Nov 23 12:33:06 2017 +0200

    Bug #26946491: INSTALL COMMAND FOR CLONE PLUGIN HANGS WHEN HEAVY DMLS ARE IN PROGRESS
    
    * Fixed plugin_add so it does not re-acquire the LOCK_plugin mutex after
      reporting an error
    * Fixed the callers of the plugin_add() to expect the above behavior and
      react accordingly (not release LOCK_plugin when reacting to the eror or
      re-aqcuire it when ignoring the error).
    * Fixed plugin_load and plugin_load_list to take the same locks into the same
      order as mysql_install_plugin does.
    * Added doxygen comments for some key functons and locks.
    * Fixed plugin_dl_add to not be keeping the lock while calling report_error().

commit dd592ce86891b614a6322568e6933281cfbf822b
Merge: a1e41ec e21d046
Author: Shivashankar Nagaraj <shiva.y.shankar@oracle.com>
Date:   Tue Nov 28 17:17:53 2017 +0530

    Merge branch 'mysql-5.7' into mysql-8.0

commit e21d046d1d8b936c1b68046251060719b065cc1a
Merge: fafc7e8 4ae4f07
Author: Shivashankar Nagaraj <shiva.y.shankar@oracle.com>
Date:   Tue Nov 28 17:16:33 2017 +0530

    Merge branch 'mysql-5.6' into mysql-5.7

commit 4ae4f07534e175fe1b7b2005e43f4f71af535573
Author: Shivashankar Nagaraj <shiva.y.shankar@oracle.com>
Date:   Tue Nov 28 17:15:06 2017 +0530

    Bug#11761520: MYSQLSLAP FAILS SPORADICALLY STARTING FROM DAHLIA
    
    Fix:
    ----
    non-reproducible, Hence remove the test from default.experimental file
    
    Reviewed-by: Umesh Shastry <umesh.shastry@oracle.com>

commit a1e41ecd3ffb8b806d6be03a00f5a5ec61514834
Author: Ivan Švaljek <ivan.svaljek@oracle.com>
Date:   Tue Nov 28 12:10:06 2017 +0100

    Bug #26171967: MYSQLDUMP IN 5.5 SEGFAULTS FOR --WHERE CLAUSES LARGER THAN 2K
    
    Required buffer size is calculated and, if neccessary, static buffer is
    replaced with a dynamically allocated buffer of appropriate size.

commit 129ffc784330b754452a36e6399b201e34d88f3b
Merge: 3b8dcd7 fafc7e8
Author: Arun Kuruvila <arun.kuruvila@oracle.com>
Date:   Tue Nov 28 15:44:28 2017 +0530

    Merge branch 'mysql-5.7' into mysql-8.0

commit fafc7e8c7e460ecb5205efb3c43b8c16621353a5
Author: Arun Kuruvila <arun.kuruvila@oracle.com>
Date:   Tue Nov 28 15:42:31 2017 +0530

    Bug#26906601: FIREWALL PLUGIN INSTALL SCRIPTS SPECIFY THE
                  MYISAM STORAGE ENGINE
    
    Description:- Firewall plugin installation script uses
    MYISAM as the storage engine for creating firewall plugin
    tables, firewall_whitelist and firewall_users.
    
    Fix:- Backport the storage engine change made in firewall
    installation script from 8.0 to 5.7. Storage engine is
    changed from MyISAM to InnoDB for the firewall plugin
    tables while installation. It is also guaranteed that
    the firewall plugin will use InnoDB tables in 8.0 after
    mysql upgrade. This is backport of Bug#24431547 fix to 5.7.
    Following are some background information regarding the
    backport:-
    As part of Bug#24431547 fix, the patch was first pushed to
    trunk, then backported to 5.7. But since the server PT and
    support where not in an agreement to change the SE of plugin
    tables in 5.7, SE change in 5.7 was reverted. Now support
    explicitly asked for the SE change in 5.7, and this patch
    takes care of SE change which was reverted from 5.7 before.

commit 3b8dcd739392f1483aebc13a339e0f958e0cdd6a
Merge: e2f17a8 c0e2b7f
Author: Arun Kuruvila <arun.kuruvila@oracle.com>
Date:   Tue Nov 28 15:32:42 2017 +0530

    Merge branch 'mysql-5.7' into mysql-8.0

commit c0e2b7f6ca0d72c6de5817d895cf916ee728c9f2
Author: Arun Kuruvila <arun.kuruvila@oracle.com>
Date:   Tue Nov 28 15:29:42 2017 +0530

    Bug#26323351: AUDIT PLUGIN INSTALL SCRIPTS SPECIFY THE
                  MYISAM STORAGE ENGINE
    
    Description:- Audit log plugin installation script uses
    MYISAM as the storage engine for creating audit log plugin
    tables, audit_log_filter and audit_log_user.
    
    Fix:- Backport the storage engine change made in audit log
    installation script from 8.0 to 5.7. Storage engine is
    changed from MyISAM to InnoDB for the audit log plugin
    tables while installation. It is also guaranteed that
    the audit log plugin will use InnoDB tables in 8.0 after
    mysql upgrade. This is backport of Bug#24431547 fix to 5.7.
    Following are some background information regarding the
    back port:-
    As part of Bug#24431547 fix, the patch was first pushed to
    trunk, then back ported to 5.7. But since the server PT and
    support where not in an agreement to change the SE of plugin
    tables in 5.7, SE change in 5.7 was reverted. Now support
    explicitly asked for the SE change in 5.7, and this patch
    takes care of SE change which was reverted from 5.7 before.

commit e2f17a8db04f476c515470504ae058fa24b7ad3b
Merge: 2b8646c 86f97d5
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Tue Nov 28 09:33:37 2017 +0100

    NULL Merge branch 'mysql-5.7' into mysql-8.0

commit 2b8646cfebf1dda7f3b8e34f01ad3c077f15f553
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Tue Nov 28 09:11:45 2017 +0100

    WL#8987: The rest.
    
    Post-push fix: unbreak building of standalone unit tests.
    
    Change-Id: I710a5e5825f3d1413b473e2b3c15b19a7f0b1537

commit 0ff451439c4a0d17df63ca5836ea06713d3a96af
Author: Erlend Dahl <erlend.dahl@oracle.com>
Date:   Tue Nov 28 08:28:27 2017 +0100

    Bug#27182016 MAIN.OUTFILE_LOADDATA FAILS SPORADICALLY
    
    Make main.mysqldump clean up files in /tmp

commit 86f97d554d7939bd66765fc551dc2bbfe280e068
Author: Steinar H. Gunderson <steinar.gunderson@oracle.com>
Date:   Tue Aug 22 14:28:03 2017 +0200

    Bug #26666594: SYSCALL WARNINGS IN MACOS
    
    Backport to 5.7
    
    Make macOS use pthread_threadid_np() instead of calling the SYS_thread_selfid
    syscall directly.
    
    Change-Id: Ic795195cf6dabd55fe6245b8bf947f35258e61c4
    (cherry picked from commit a0d9941b6cd17a275bab23f5e95ffa16b698efd6)

commit 26a97c19bc791d38788b140372ebb9ecf31f39ea
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Thu Nov 23 08:40:28 2017 +0100

    Bug#26612465 BUILDING WITH CMAKE 3.9.0 OR NEWER GIVES DEPRECATION WARNINGS
    
    Backport to 5.7
    
    Remove cmake policies no longer in use:
    CMP0007 was introduced in 2.6.0 and can go away.
    CMP0011 was introduced in 2.6.3 and can go away.

commit 8804ae131296b77bdea131464ecf2e00d926291f
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Thu Nov 23 08:18:58 2017 +0100

    Bug#26612465 BUILDING WITH CMAKE 3.9.0 OR NEWER GIVES DEPRECATION WARNINGS [noclose]
    
    Remove some spurious cmake output/comments from earlier backport.

commit 23b381c84d4ad842df0efb5ed13a648caf02e779
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Thu Sep 7 11:00:49 2017 +0200

    Bug#26612465 BUILDING WITH CMAKE 3.9.0 OR NEWER GIVES DEPRECATION WARNINGS [noclose]
    
    Use generator expression rather than LOCATION to find .pdb file.
    
    Backport to 5.7
    
    (cherry picked from commit b8ac7656f2157089396800c4c56475f5697aa091)
    (cherry picked from commit 3e8cfdee941c5247fca5c5dd69eb67047c323890)

commit 052bc30cf0a2407f97603182d42c1717a8e23b50
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Fri Nov 17 15:30:30 2017 +0100

    Bug#26612465 BUILDING WITH CMAKE 3.9.0 OR NEWER GIVES DEPRECATION WARNINGS [noclose]
    
    Remove trailing whitespace, to cherry-pick from 8.0

commit 13c880302544b4c194dde3c8855e6f0c555586a1
Author: Bharathy Satish <bharathy.x.satish@oracle.com>
Date:   Tue Nov 28 05:43:10 2017 +0100

    WL#9769: Keyring migration tool and new commercial keyring_encrypted_file plugin.
    
    New Keyring plugin called keyring_encrypted_file plugin is introduced which will
    store keyring data in file local to server host which is encrypted using a password.
    This plugin when installed must be provided with a password which will be used to
    decrypt the file to read the contents of file. Similarly this password will be used
    to encrypt the data which needs to be stored in the data file.
    
    This WL also introduces keyring migration tool which is used to migrate keys from
    one keyring plugin to another. This tool is embedded in mysql server, this when
    mysqld is invoked with migration specific options, mysql server will ast like a
    migration tool.

commit 04e9d8f4858cb7b6af8fee45be0604a4e983a287
Author: Tatiana Azundris Nuernberg <tatjana.nuernberg@oracle.com>
Date:   Tue Nov 28 03:26:42 2017 +0000

    Bug#26576922: SERVER DOESN'T ALWAYS FALL BACK TO DEFAULT ERROR MESSAGES
    
    Server was changed so it would start even if lc-messages-dir
    contained an invalid path; it would then fall back on the
    built-in error messages. The intention was primarily to have
    the server come up even in the absence of lc-messages-dir
    (i.e. to require as few start-up arguments as possible, ideally
    just the data-dir); that the server would throw an error, but
    no longer abort on invalid values was just a welcome side effect.
    
    The same was not true for lc-messages (the actual language),
    as that had a sensible default value (and therefore satisfied
    the above requirement, "server works with argument omitted").
    Paul noted that users might find it confusing that providing
    an invalid value throws a non-fatal error for one case
    (lc-messages-dir), and a fatal one for the other (lc-messages).
    
    Therefore, we now throw an error but continue for all three of
    lc-messages-dir, lc-messages, and lc-time-names.

commit 3d3fc19380652bda4932fa6df40cc73a277a3bd5
Author: Sreeharsha Ramanavarapu <sreeharsha.ramanavarapu@oracle.com>
Date:   Tue Nov 28 08:44:45 2017 +0530

    Bug #27058931: INCORRECT BEHAVIOR WITH SP, VIEWS AND XA TRANSACTIONS
    
    Issue:
    ------
    Step 1)
    CREATE PROCEDURE p3
    <Queries that access VIEWs>
    
    Step 2)
    XA START 'xid1';
    XA END 'xid1';
    
    Step 3)
    # fails with XAER_RMFAIL.
    CALL p3();
    
    Step 4)
    XA ROLLBACK 'xid1';
    
    Step 5)
    CALL p3();
    
    Step 6)
    CALL p3();
    
    
    In Step 3, sp_lex_instr::reset_lex_and_exec_core()
    eventually calls XID_STATE::check_xa_idle_or_prepared()
    while trying to open tables. And this raises the
    XAER_RMFAIL error.
    
    In sp_lex_instr::reset_lex_and_exec_core(), it is assumed
    that any failure to open tables will trigger the REPREPARE
    error. Such cases were handled as part of the fix for
    Bug#25053286.
    
    But since this is an XA related error, only XAER_RMFAIL
    (resource manager failure) is raised. So the query arena's
    state is changed from Query_arena::STMT_INITIALIZED_FOR_SP
    to Query_arena::STMT_EXECUTED.
    
    In Step 5, the view fields are resolved/fixed using the
    execution mem_root (because state is STMT_EXECUTED). It
    creates a new Item_view_ref object, and this is destroyed
    at the end of the execution.
    
    Step 6, finds a null in the item tree.
    
    Why is this problem not seen in 5.7?
    ------------------------------------
    In 5.7:  XAER_RMFAIL error is raised when db_find_routine
    eventually calls XID_STATE::check_xa_idle_or_prepared()
    (through open_nontrans_system_tables_for_read). So it never
    reaches reset_lex_and_exec_core() and the state is never
    switched from Query_arena::STMT_INITIALIZED_FOR_SP to
    Query_arena::STMT_EXECUTED.
    
    In trunk: db_find_routine was changed by
    "WL#7897: Use DD API to work with stored routines" for DD.
    So it proceeds to sp_lex_instr::reset_lex_and_exec_core().
    
    
    Solution:
    ---------
    This problem was addressed by Praveen's fix for
    Bug#25586773. We are now able to distinguish between the
    setup/prepare phase (open tables, fix fields etc.) of an SP
    and the execution phase. Since the XAER_RMFAIL error is
    raised during the open tables phase (failure before the
    execution phase began), there is no state change for the
    query arena.
    
    Now in Step 5, query arena's state is still
    Query_arena::STMT_INITIALIZED_FOR_SP. The view fields are
    created on the prepared statement's mem_root.

commit 5a45b20b159cb995ea40f38be8021ec175805f13
Author: Dyre Tjeldvoll <Dyre.Tjeldvoll@oracle.com>
Date:   Fri Nov 24 13:48:13 2017 +0100

    Bug#27082313: note about basedir still printed even with log_error_verbosity to 2
    Basedir was printed with sql_print_information before
    log-error-verbosity had been read and given its default. As a result the
    initialization value of 3 for the global variable was still in effect.
    
    Fixed by moving the print line after all options have been processed.
    Note that if the basedir option is used, this is the value which will be
    printed and not the value which was deduced by the server.
    
    Change-Id: I01d482b8888038fef30f2fe4e47a9c6144fd77be
    (cherry picked from commit 0b3f101843258d4dfc6a5174576ad3bf088a303e)

commit 809dc368cfb6ddab650f866c56de4f696a097bb6
Author: Gopal Shankar <gopal.shankar@oracle.com>
Date:   Mon Nov 27 15:32:56 2017 +0100

    Bug#27041526 assertion `mon > 0 && mon < 13' failed.
    
    The problem is that, when the value of a timestamp field is
    used as argument to IF() condition in SQL, its
    datatype/value changes based on the setting of variable
    collation_connection.  More details of this issue is
    reported in Bug#27143384. This bug will be fixed independent
    of fix for this bug. The root cause of core dump is that the
    value of mysql.table_stats.cached_time is treated as a
    string value, when collation_connection is set to
    utf32_general_ci.  Converting this string version of
    timestamp into a integer value gives us a invalid longlong
    timestamp value. When we use this wrong timestamp value to
    get MYSQL_TIME, we end-up getting invalid date values and
    assert.
    
    The expression which hits the issue in Bug#27143384 is,
    "IF(ISNULL(timestamp_field), 0, timestamp_field)". This
    patch uses COALESCE() which suite better. Part of problem
    was the optimizer by default converts the timestamp fields
    into strings.  And the IF() resulted in automatic conversion
    to integer only in certain charset (as discussed in
    bug27143384). In order to avoid depending on implicit
    conversions, this patch uses CAST() to explicitly request
    the timestamp value as a unsigned value. This code change
    can be a permanent change, and need not really be reverted
    back after Bug#27143384 is fixed.
    
    The patch also sets null_on_null property for UDF's as
    false. The UDF return's NULL as soon as it sees one of it's
    argument is NULL. This change is not really required for
    the fix in hand. However, this change was expected to be done
    for UDF's implemented in I_S as per optimizer's suggestions
    in past. The test case contains a SELECT with TABLE_ROWS
    column in WHERE condition, which demonstrates the problem.
    
    The patch also sets the few other internal I_S functions
    with Functype as DD_INTERNAL_FUNC. This was a omission
    when I_S.FILES system view was implemented.
    
    A new test case is added to main.information_schema.
    
    Change-Id: I6904103094c288958af46b6c203a726c31b3093d

commit fadcd64d3f041308c12f8fb9c7186086900c80ca
Author: Gopal Shankar <gopal.shankar@oracle.com>
Date:   Mon Nov 27 15:32:45 2017 +0100

    Bug#26770836 SLAVE HANGS - WAITING FOR TABLE METADATA LOCKS
    
    A DDL on table would trigger change in view metadata update.
    We acquire MDL locks on view and the dependent tables during
    this process. We release these acquired locks just after
    finishing the view metadata update, and we do not hold the
    MDL lock until the statement is committed.
    
    An expectation from binary log subsystem is that it assumes
    all MDL acquired by the statement are held till commit
    phase, so two statements acquiring conflicting sets of locks
    can't be committed at the same time. This assumption is
    broken by release-before-commit optimization done during
    view metadata update.
    
    This patch enables MDL locks acquired during view metadata
    update to be held until commit. A test case is added to make
    sure we acquire lock after view metadata is updated. The test
    case for Bug#25685371 is removed as we no more release locks
    at the end of view metadata update, and the problem reported
    there cannot occur.
    
    Change-Id: I3757428fc01788b9314a961b5fd2f83830811485

commit 96fd9307455be8e0e5381d80a72daf87f1266884
Author: Gopal Shankar <gopal.shankar@oracle.com>
Date:   Mon Nov 27 15:32:35 2017 +0100

    Bug#27041452 assertion `ticket->m_lock->m_obtrusive_locks_granted_waiting_count != 0' failed.
    
    Problem:
    A query using I_S.FILES tries to retrieve tablespace
    statistics from SE. The query asserts when trying to acquire
    MDL lock on tablespace. This happens only under LOCK TABLE
    mode.
    
    Analysis:
    The LOCK TABLE t1 WRITE acquires per-object MDL of type X on
    table and acquires scoped MDL of type IX on tablespace, which looks
    fine.  Later the same thread executes I_S.FILES query under
    LOCK TABLE, which tries to fetch tablespace statistics from
    SE.  It acquire a per-object lock type SH on a scoped MDL
    lock type tablespace, which is wrong.  i.e., Acquiring a
    scoped lock type IX on a scoped object TABLESPACE, and then
    later acquire a object lock type (SH) on a scoped object is
    wrong. IX lock type applies only for scoped lock strategy and the
    lock type SH only applies to per-object lock strategy.
    
    The fix is to make use of scoped lock type while I_S.FILES
    fetches tablespace statistics from SE. We now use MDL_SHARED
    lock, instead of MDL_SHARED_HIGH_PRIO for tablespace.
    
    A test case is added in main.information_schema.
    
    Change-Id: I8e3208ae431a331bad7eb2a16dc7b75eb62e63cf

commit 51e1f26135c3a8a67697ee0a938ce28816c0d59c
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Mon Nov 27 16:36:25 2017 +0100

    WL#8987: Follow-up. Silence a warning from clang on OsX
    
    Change-Id: Ia8d2d80e945fb3bdfe08e559a8e0b5f3d03894e7

commit ae63b06d7c2951eb01f9ccd9a03f017b0eae016b
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Mon Nov 27 12:36:44 2017 +0100

    Bug #26091340, #26147775, #25989788:  Post fix windows
    
    uthentication_ldap/auth_ldap.cc:21:12: warning: unused variable
          'FILTER_USER' [-Wunused-const-variable]
    
    Remove defined(_WIN64), _WIN32 is true also for 64 bit builds
    Remove _MSC_VER < 1900, never true.
    
    Change-Id: Ic0b2ac4c20413979e5184cae60b205ce50b23c98

commit b1db64be01bd851f5ad5684500e13e17e73b9e63
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Fri Nov 24 11:18:00 2017 +0100

    Bug#27151550 PLUGINS/COMPONENTS SHOULD NOT RELY ON DLCLOSE() TO RUN DESTRUCTORS
    
    Partial revert of 46dd5907bd64299843cd39458e699dde040256ee
    
    Global variables bound to SYSTEM VARIABLES may be set by command line
    options before the plugin init function is called, so do not reset them
    to their default value.
    
    Change-Id: Ib3ebfd95700a9cb1c6ff4cbbd81098b3e9526b96

commit 98fc549fbef0ff715367063c7b58a308c54cab26
Author: Kristofer Älvring <kristofer.pettersson@oracle.com>
Date:   Mon Nov 27 13:58:38 2017 +0100

    Bug#27136346 SYSBENCH CONNECT TEST SHOWS -95% REGRESSION FOR NON-ROOT VS ROOT USER
    
    None root users experienced a 95% drop in CPU utilization due to a cache
    which is suppose to store database privileges based on user name and host
    for fast acccess. The cache is protected be a rw lock that needs to be
    checked for success. The check was inveresed so it reported failure
    on success and vice versa which ultimately caused the performance issues
    as a write lock was taken 10 times for every connection attempt by
    internal system processes.

commit 54dce319662ba659dc8b6dc99c6d270da0f7b0fd
Merge: 2d4b8a7 e916ff8
Author: Karthik Kamath <karthik.kamath@oracle.com>
Date:   Mon Nov 27 20:04:27 2017 +0530

    Null merge branch 'mysql-5.7' into mysql-8.0

commit e916ff856d8b4c143aa1a6858c6ceb7d491b7ba1
Merge: aacc7f4 9b7db34
Author: Karthik Kamath <karthik.kamath@oracle.com>
Date:   Mon Nov 27 20:03:16 2017 +0530

    Merge branch 'mysql-5.6' into mysql-5.7

commit 9b7db34fe5360a3df50397fe96804afc4c1a2c0d
Merge: 54ef4ce 25666e3
Author: Karthik Kamath <karthik.kamath@oracle.com>
Date:   Mon Nov 27 20:00:33 2017 +0530

    Merge branch 'mysql-5.5' into mysql-5.6

commit 25666e38ce3341558b0a3fd7350cbd4c8886d6e1
Author: Karthik Kamath <karthik.kamath@oracle.com>
Date:   Mon Nov 27 19:59:29 2017 +0530

    BUG#26502135: MYSQLD SEGFAULTS IN
                  MDL_CONTEXT::TRY_ACQUIRE_LOCK_IMPL
    
    ANALYSIS:
    =========
    Server sometimes exited when multiple threads tried to
    acquire and release metadata locks simultaneously (for
    example, necessary to access a table). The same problem
    could have occurred when new objects were registered/
    deregistered in Performance Schema.
    
    The problem was caused by a bug in LF_HASH - our lock free
    hash implementation which is used by metadata locking
    subsystem in 5.7 branch. In 5.5 and 5.6 we only use LF_HASH
    in Performance Schema Instrumentation implementation. So
    for these versions, the problem was limited to P_S.
    
    The problem was in my_lfind() function, which searches for
    the specific hash element by going through the elements
    list. During this search it loads information about element
    checked such as key pointer and hash value into local
    variables. Then it confirms that they are not corrupted by
    concurrent delete operation (which will set pointer to 0)
    by checking if element is still in the list. The latter
    check did not take into account that compiler (and
    processor) can reorder reads in such a way that load of key
    pointer will happen after it, making result of the check
    invalid.
    
    FIX:
    ====
    This patch fixes the problem by ensuring that no such
    reordering can take place. This is achieved by using
    my_atomic_loadptr() which contains compiler and processor
    memory barriers for the check mentioned above and other
    similar places.
    
    The default (for non-Windows systems) implementation of
    my_atomic*() relies on old __sync intrisics and implements
    my_atomic_loadptr() as read-modify operation. To avoid
    scalability/performance penalty associated with addition of
    my_atomic_loadptr()'s we change the my_atomic*() to use
    newer __atomic intrisics when available. This new default
    implementation doesn't have such a drawback.

commit 2d4b8a726daa1ed2fc9dd2c9a461c9aa2052056e
Merge: 87a5984 aacc7f4
Author: Balasubramanian Kandasamy <balasubramanian.kandasamy@oracle.com>
Date:   Mon Nov 27 19:46:47 2017 +0530

    Null merge from mysql-5.7

commit aacc7f43ce98353e3c2f89273b43ebf1424ee758
Author: Balasubramanian Kandasamy <balasubramanian.kandasamy@oracle.com>
Date:   Mon Nov 27 19:31:45 2017 +0530

         Postfix : WL#9769: Keyring migration tool and new commercial keyring_encrypted_file plugin.
         - Fix typo in the changelog for el/sles rpm builds
         - Added keyring_encrypted_file to docker rpm

commit 87a5984dd722c55e3913a78d6febdd5943e655ed
Author: Knut Anders Hatlen <knut.hatlen@oracle.com>
Date:   Sat Nov 25 20:36:38 2017 +0100

    Bug#27171283: FREQUENT BUFFER REALLOCATIONS WHEN SERIALIZING JSON
    
    When serializing a JSON value to its binary representation,
    String::reserve(size_t) is sometimes called to make sure the
    destination buffer has enough room to hold an integer or double value
    of a given size. Unfortunately, if the String needs to allocate more
    memory, this variant of reserve() only reserves the minimum amount of
    memory needed, so it is very likely that a new reallocation is needed
    shortly after. This hurts performance, especially when serializing
    arrays with many numeric values.
    
    This patch makes the serialization use the two-argument variant of
    String::reserve() so that reallocations will increase the buffer size
    exponentially and amortize the cost of the reallocations.
    
    Microbenchmarks (64-bit, Intel Core 2 Quad 2.83GHz, GCC 7.2):
    
    BM_JsonBinarySerializeIntArray      17492816 -> 352638 ns/iter [ +4861%]
    BM_JsonBinarySerializeDoubleArray   80549060 -> 321707 ns/iter [+24938%]
    BM_JsonBinarySerializeStringArray     744725 -> 728882 ns/iter [  +2.2%]
    
    Change-Id: Icdb6316c80021043ada5467f4798028b8d44c7e4

commit d4eb4d02b8bc7191be278a44cdb396397fb3d9c5
Author: Srikanth B R <srikanth.b.r@oracle.com>
Date:   Mon Nov 27 17:31:00 2017 +0530

    The test sys_vars.all_vars reports that a test for the system
    variable 'windowing_use_high_precision' is missing.
    The test sys_vars.windowing_use_high_precision is renamed to
    sys_vars.windowing_use_high_precision_basic so that it is
    detected by sys_vars.all_vars.
    
    Approved by: Anitha Gopi <anitha.gopi@oracle.com> over IM

commit ddeb14277254a1e0ccf1d42d50dfb53b077bce4a
Author: Georgi Kodinov <georgi.kodinov@oracle.com>
Date:   Mon Nov 27 13:13:57 2017 +0200

    Addendum to the fix for bug #27041374
    
    Removed the table close code that was added to the persistent dynamic loader.
    Since it's a global state we'll have to rely on the SQL command doing it.

commit feae40836516430c6e3185b14d70069014975e82
Merge: 9e23515 b7430c0
Author: Harin Vadodaria <harin.vadodaria@oracle.com>
Date:   Mon Nov 27 11:50:53 2017 +0100

    Merge branch 'mysql-5.7' into mysql-8.0

commit b7430c02d2e07ae5322c6e5caecc32db76170c2e
Author: Harin Vadodaria <harin.vadodaria@oracle.com>
Date:   Mon Nov 27 11:49:43 2017 +0100

    Bug#27099029: UNLIMITED LENGTH OF THE PASSWORD
    
    Post push fix: Handled missing cases of GRANT.

commit 9e235151256d17d69f6551dc133e5575c7f49417
Merge: e6a2c51 0c3b94b
Author: Balasubramanian Kandasamy <balasubramanian.kandasamy@oracle.com>
Date:   Mon Nov 27 15:42:12 2017 +0530

    Empty version change upmerge

commit 0c3b94b2fe211807984e2fa523a29bfbe5b9acf5
Merge: c3e29a1 54ef4ce
Author: Balasubramanian Kandasamy <balasubramanian.kandasamy@oracle.com>
Date:   Mon Nov 27 15:40:03 2017 +0530

    Raise version number after cloning 5.7.21

commit 54ef4ce4a2a1b664957511e6a1141b805f78fb12
Merge: 2ae1421 544fbf3
Author: Balasubramanian Kandasamy <balasubramanian.kandasamy@oracle.com>
Date:   Mon Nov 27 15:36:25 2017 +0530

    Raise version number after cloning 5.6.39

commit 544fbf386cf623a96b61822ef488f6da7c03a5ac
Author: Balasubramanian Kandasamy <balasubramanian.kandasamy@oracle.com>
Date:   Mon Nov 27 15:33:02 2017 +0530

    Raise version number after cloning 5.5.59

commit e6a2c51423e3cc9177826ea7a9230f5299f23499
Merge: 7c92c27 c3e29a1
Author: Balasubramanian Kandasamy <balasubramanian.kandasamy@oracle.com>
Date:   Mon Nov 27 15:03:20 2017 +0530

    Null-merge from 5.7

commit c3e29a1b8726bf3d0fb126b058851e3697ec8c26
Merge: 6e8cbdd 2ae1421
Author: Balasubramanian Kandasamy <balasubramanian.kandasamy@oracle.com>
Date:   Mon Nov 27 15:00:53 2017 +0530

    Updated copyright year in user visible text

commit 2ae14214d0dcddafa18eba6ab624db142c12b7d2
Merge: e00838e 1aa1f40
Author: Balasubramanian Kandasamy <balasubramanian.kandasamy@oracle.com>
Date:   Mon Nov 27 14:56:15 2017 +0530

    Updated copyright year in user visible text

commit 1aa1f40fb471ad84b82f41e406ea72d764db09ce
Author: Balasubramanian Kandasamy <balasubramanian.kandasamy@oracle.com>
Date:   Mon Nov 27 14:51:04 2017 +0530

    Updated copyright year in user visible text

commit 7c92c278b3c5f8d378c0c61926fa817be3da0db0
Author: Martin Hansson <martin.hansson@oracle.com>
Date:   Fri Nov 24 14:33:40 2017 +0100

    WL#8987: Follow-up. Removes unused code, fixes warnings and test case timeouts.

commit 98be92ca8612812d38986e1ae861b5750d6d7dd0
Merge: b6323c5 8c8a8e1
Author: Mohit Joshi <mohit.joshi@oracle.com>
Date:   Mon Nov 27 12:53:18 2017 +0530

    Merge branch 'mysql-5.7' into mysql-8.0

commit 8c8a8e10760a2c066e43b67963469936eadd4731
Author: Mohit Joshi <mohit.joshi@oracle.com>
Date:   Mon Nov 27 12:25:09 2017 +0530

    Bug#26996342 - Disabled keysecure tests to run on daily Hudson jobs until
    the bug is fixed.

commit b6323c5e43d4a4eafd3e2f7718fae49d79d68c7f
Author: Annamalai Gurusami <annamalai.gurusami@oracle.com>
Date:   Mon Nov 27 11:17:00 2017 +0530

    WL#8960 - Post push fix.  Fixing pb2 failures.

commit 945446c280b276011b3d7912e558fb6f1962be02
Merge: c55f927 6e8cbdd
Author: Bharathy Satish <bharathy.x.satish@oracle.com>
Date:   Mon Nov 27 04:40:24 2017 +0100

    Null-merge from 5.7.

commit 6e8cbdd13f171e27dc7fa3dc2c11b2445d455909
Author: Bharathy Satish <bharathy.x.satish@oracle.com>
Date:   Mon Nov 27 04:36:54 2017 +0100

    WL#9769: Keyring migration tool and new commercial keyring_encrypted_file plugin.
    
    Post push fix.
    OKV plugin test does not run on all platforms, so moved some test from aws suite
    to okv suite. Also set --secure-file-priv to empty string as it had different
    values on different platforms.

commit c55f92799bc431bb94a60083da8f8132eafd9176
Author: Filipe Campos <filipe.campos@oracle.com>
Date:   Fri Sep 1 20:52:57 2017 +0100

    WL#9856 - MySQL GCS: Instrument locking structures
    
    This worklog instruments the GCS mutex and condition synchronization objects,
    exposing them automatically in P_S tables metrics.
    Platform-specific code for mutexes and conds was removed from Xplatform.
    New PSI keys to identify the newly instrumented code elements were introduced.
    Created a new MTR test, gr_gcs_psi_mutex_cond, that ensures that the newly
    instrumented mutexes and conds show up in the setup_instruments table,
    and the corresponding instances are in the mutex_instances
    and cond_instances tables, while GR is running.

commit e9d0b0a3a67ba56e19ddd6da2f2a9c89155bf44f
Merge: 152db93 bbdc9ee
Author: Bharathy Satish <bharathy.x.satish@oracle.com>
Date:   Sun Nov 26 07:49:16 2017 +0100

    Null-merge from 5.7.

commit bbdc9eec717dda877ce7ae128d053a4785f3a22d
Author: Bharathy Satish <bharathy.x.satish@oracle.com>
Date:   Sat Nov 25 05:40:00 2017 +0100

    WL#9769: Keyring migration tool and new commercial keyring_encrypted_file plugin.
    
    Post push fix. Fixed testcases.

commit 152db93bb6a8f4f56f37dda7d452950adefea44f
Merge: 2289204 417b2f6
Author: Yashwant Sahu <yashwant.sahu@oracle.com>
Date:   Sat Nov 25 21:50:35 2017 +0530

    Null-merge from 5.7.

commit 417b2f662ae07e433a4526e80d66a81c03fdbc99
Author: Yashwant Sahu <yashwant.sahu@oracle.com>
Date:   Sat Nov 25 21:44:38 2017 +0530

    Bug #26091340, #26147775, #25989788:  Post fix windows 5.7.

commit 2289204bdb01cf740be8efebb2025f50c9e55f00
Merge: bcc0e4c 84ed74b
Author: Yashwant Sahu <yashwant.sahu@oracle.com>
Date:   Sat Nov 25 01:00:01 2017 +0530

    Merge branch 'mysql-5.7' into mysql-8.0

commit 84ed74b6683253df4aed120ddb68170fc7c8e534
Author: Yashwant Sahu <yashwant.sahu@oracle.com>
Date:   Sat Nov 25 00:50:13 2017 +0530

    Bug #26091340, #26147775, #25989788: post fix for windows.

commit bcc0e4c175b3868abd3890de248ab9418fff909a
Merge: 95b0548 1e13050
Author: Yashwant Sahu <yashwant.sahu@oracle.com>
Date:   Fri Nov 24 18:37:31 2017 +0100

    Merge branch 'mysql-5.7' into mysql-8.0

commit 1e130501905c5e237d64a896dd63e075fd605a78
Author: Yashwant Sahu <yashwant.sahu@oracle.com>
Date:   Fri Nov 24 17:29:57 2017 +0100

    Bug #26091340, #26147775, #25989788:  LDAP bug fixes.
    
    Added group filter search attribute, Added user DN postfix, LDAP pool resize.

commit 95b0548e1019e9d54d52a3c79ed12fa9566d25bf
Author: Erlend Dahl <erlend.dahl@oracle.com>
Date:   Fri Nov 24 13:37:00 2017 +0100

    Revert "Merge branch 'mysql-5.7' into mysql-8.0"
    
    This reverts commit d871349d0336d4ee3a30d86694c5bbf8d80e793a, reversing
    changes made to d70a68bf13a1ad050b54dee144dbd7b59f05a170.

commit 81ec51cce1e1473443c8790268695c52c2ce3865
Author: Erlend Dahl <erlend.dahl@oracle.com>
Date:   Fri Nov 24 14:10:48 2017 +0100

    WL#8987 ICU
    
    Unbreak the 8.0 build.

commit 2b2effa8a69abeae85722fa70fe8470097b079b1
Merge: 2e5f64a 3aa579f
Author: Martin Hansson <martin.hansson@oracle.com>
Date:   Fri Nov 24 13:21:01 2017 +0100

    Merge branch 'mysql-8.0-wl8987' into mysql-8.0

commit 3aa579f6021df9c92c6f13c98729fb68839ca118
Author: Martin Hansson <martin.hansson@oracle.com>
Date:   Tue Oct 10 17:17:31 2017 +0200

    WL#8987: The rest.
    
    Change-Id: If16c0f781978e5571650e75082bad204cd1390b9

commit 45bf2ab8e048e98212d2eef2fc643555c3d74790
Author: Martin Hansson <martin.hansson@oracle.com>
Date:   Tue Oct 10 17:07:11 2017 +0200

    WL#8987: Removed ICU files that are not needed.
    
    Change-Id: I1260455c3e211a470eba3ed7602a098b8abcc96c

commit b15c2de41d107036264f05a69a824714841042e8
Author: Martin Hansson <martin.hansson@oracle.com>
Date:   Mon Aug 21 14:27:45 2017 +0200

    WL#8987: ICU 59.1 source added almost without altering.
    
    Change-Id: Ifb24c1402db76704072460258fd2e5759d44595a

commit 2e5f64aded7ef1aa740b19ec5d23952d4c2bafeb
Author: Georgi Kodinov <georgi.kodinov@oracle.com>
Date:   Thu Nov 23 18:35:09 2017 +0200

    Bug #27041374: ASSERTION `NEXT_INSERT_ID == 0' FAILED.
    
    The error handling was not resetting the explicit auto-increment
    range used. And thus the checks in close_tables() were failing.
    
    Fixed by properly resetting the auto-increment even in case of error
    Test case added.
    Also added the missing close_tables() call at the end of the persisted dyloader
    service APIs.
    This was not a problem so far since the only place these APIs are called
    was inside the SQL command to install/uninstall plugins and this does close
    the tables too.

commit d9e4c8f70ad474c967868e3f40c09cadbcecc7e6
Author: Catalin Besleaga <catalin.besleaga@oracle.com>
Date:   Thu Nov 23 13:08:19 2017 +0100

    Bug#26704312 REEXECUTE PREPARED STATEMENT CRASH IN JSON_ARRAY::INSERT_ALIAS
    
    A temporary buffer is returned from val_str, which gets deallocated
    before json_array gets it.
    Solution: use the buffer provided to the val_str function instead.
    
    Change-Id: I1b112d2ca7973c1dd8fb0cf768f26697e26067db

commit 3c7e2287b4f275d2ba6e29a2cb8d0f13f9dcb392
Author: Annamalai Gurusami <annamalai.gurusami@oracle.com>
Date:   Fri Nov 24 16:17:09 2017 +0530

    WL#8960 - InnoDB: Partial Update of Large Objects (BLOBs)
    
    This worklog provides the feature - partial update of large objects (BLOBs).
    When a BLOB is inserted in InnoDB, an LOB index is created to keep track of
    different portions of the large object. Using this LOB index, a small portion
    of the BLOB can be modified.
    
    Previously, any update on BLOBs will result in the new insertion of the full
    BLOB. This worklog makes it possible to partially update a BLOB.

commit 453a7691625e28725492345029f42a6f6e94a6fa
Merge: 16dfc30 b7fbd93
Author: Harin Vadodaria <harin.vadodaria@oracle.com>
Date:   Fri Nov 24 11:32:15 2017 +0100

    Merge branch 'mysql-5.7' into mysql-8.0

commit b7fbd93409727fbf8fb56cb6ebd03ff859a78c62
Merge: bf98313 e00838e
Author: Harin Vadodaria <harin.vadodaria@oracle.com>
Date:   Fri Nov 24 11:31:08 2017 +0100

    Merge branch 'mysql-5.6' into mysql-5.7

commit e00838e41d150275816f0fce354087143116d43d
Author: Harin Vadodaria <harin.vadodaria@oracle.com>
Date:   Fri Nov 24 11:29:30 2017 +0100

    Bug#27099029: UNLIMITED LENGTH OF THE PASSWORD
    
    Description: my_crypt_genhash depends on the length of
                 plaintext password. Longer the password,
                 more is the time required to produce the
                 transformation. An unusually large password
                 may consume considerable amount of time.
    
    Fix: Fixed length of plaintext password to 256 bytes for
         SHA256_PASSWORD authentication plugin. Restricted
         PASSWORD() to accept at max 256 bytes if old_passwords
         is set to 2.

commit 16dfc30f56269282b2041e1e98eafdeea81f4eb5
Author: Neha Kumari <neha.n.kumari@oracle.com>
Date:   Fri Nov 24 15:23:39 2017 +0530

    Bug#27149075: RENAME FUNCTION SET_UNKNOW_ERROR TO CORRECT SET_UNKNOWN_ERROR
    
    The name of the function set_unknow_error need to be corrected to
    set_unknown_error.

commit d871349d0336d4ee3a30d86694c5bbf8d80e793a
Merge: d70a68b bf98313
Author: Bharathy Satish <bharathy.x.satish@oracle.com>
Date:   Fri Nov 24 10:43:18 2017 +0100

    Merge branch 'mysql-5.7' into mysql-8.0

commit bf98313f1ab078ec9bc645898c88a80acbe07e7f
Author: Bharathy Satish <bharathy.x.satish@oracle.com>
Date:   Fri Nov 24 10:42:08 2017 +0100

    WL#9769: Keyring migration tool and new commercial keyring_encrypted_file plugin.
    
    New Keyring plugin called keyring_encrypted_file plugin is introduced which will
    store keyring data in file local to server host which is encrypted using a password.
    This plugin when installed must be provided with a password which will be used to
    decrypt the file to read the contents of file. Similarly this password will be used
    to encrypt the data which needs to be stored in the data file.
    
    This WL also introduces keyring migration tool which is used to migrate keys from
    one keyring plugin to another. This tool is embedded in mysql server, this when
    mysqld is invoked with migration specific options, mysql server will ast like a
    migration tool.

commit d70a68bf13a1ad050b54dee144dbd7b59f05a170
Merge: f0935a5 cefd57e
Author: Praveenkumar Hulakund <praveenkumar.hulakund@oracle.com>
Date:   Fri Nov 24 10:33:18 2017 +0100

    Merge branch 'mysql-5.7' into mysql-8.0

commit cefd57ea67ed9b6e447986bbbcb0904e59553079
Merge: 269cdb6 cfb9ce7
Author: Praveenkumar Hulakund <praveenkumar.hulakund@oracle.com>
Date:   Fri Nov 24 10:27:12 2017 +0100

    Merge branch 'mysql-5.6' into mysql-5.7

commit cfb9ce71683718e9af79783e219d9be486ec4609
Author: Praveenkumar Hulakund <praveenkumar.hulakund@oracle.com>
Date:   Fri Nov 24 10:20:34 2017 +0100

    Bug#25586773 - INCORRECT BEHAVIOR FOR CREATE TABLE SELECT IN A LOOP IN SP
    
    For the SQL statements in the stored routine, while resolving the
    statement (on first execution or on re-parse trigger) memory is
    allocated on the permanent mem-root. After executing the statement
    for the first time a state of the statement query arena
    is changed to STMT_EXECUTED. Subsequent execution uses execution
    mem-root which is freed at the end of the execution.
    
    But for CREATE TABLE ... SELECT(CTS), state of the statement query
    arena is never changed to the STMT_EXECUTED. Allocation in the
    subsequent execution goes to the permanent mem-root. Hence the
    memory growth or leak is observed.
    
    Why query arena state is not switched for CTS?
    ==============================================
    For the CTS, existence of the table being created is checked
    while executing the statement. If table already exists then error
    (or warning with IF TABLE EXISTS clause) is reported.
    In the subsequent execution allocation(when table does not exists)
    for items being created goes to permanent mem-root(as statement
    query arena state is set STMT_INITIALIZED_FOR_SP always). So the
    next execution will have valid pointers to refer.
    
    If state of query arena is set to the STMT_EXECUTED after first
    execution then state is changed even when table exists error or
    warning is reported. In this case subsequent execution uses
    execution mem-root to allocate items. This memory is freed at
    the end of the execution. So the next execution of routine refers
    to invalid pointers.
    
    To avoid any issues related to invalid pointer reference(e.g.
    bug19897405) the state of the statement query arena is set to
    STMT_INITIALIZED_FOR_SP always for CTS by patch for bug25053286.
    
    Fix:
    ==============================================
    For the CTS in the stored routine, special handling is required
    for the case of table exists error or warning.
    
    In case of table exists error or warning, the statement arena
    is set to STMT_INITIALIZED_FOR_SP. With this change, next
    execution uses permanent mem-root while resolving the statement
    (this change fixes invalid pointer reference issues
     e.g. bug19897405).
    If the execution is successful then statement query arena is
    changed to the STMT_EXECUTED. So on the subsequent execution of
    the CTS, memory is allocated in the execution mem-root (this
    change fixes memory growth or leak issue).
    
    Additional changes for  mysql-8.0 and mysql-trunk:
    --------------------------------------------------
    As part of this patch, code is modified to check the SP statement
    execution state instead of error codes or flags while setting
    the statement query arena state.
    
    Modification is made so that, SP statement query arena state
    is not changed when error occurs in the statement parsing,
    table opening and preparation phase. Query arena state is
    changed to STMT_EXECUTED when error occurs in the execution
    phase (or when execution succeeds). If "table exists" error
    during execution phase of CTS then the state of the
    statement query arena is set to STMT_INITIALIZED_FOR_SP,
    as if statement must be reprepared.

commit f0935a5ff767249ab5b954fb2e52f1ece87d78e2
Author: Ashish Padiyar <ashish.padiyar@oracle.com>
Date:   Fri Nov 24 14:32:38 2017 +0530

    Bug#26568667: TEST INNODB.UNDO_ENCRYPT_BOOTSTRAP IS UNSTABLE
    
    Issue:
    ------
    innodb.undo_encrypt_bootstrap fails sporadically with a warning that keyring_file
    plugin is busy and will be uninstalled on shutdown.
    
    Fix:
    -----
    The test restarts the server at the end, ensuring that the plugin is uninstalled
    and proper clean up is done. The warning is supressed since we know for sure that
    the plugin will be uninstalled upon complete execution of the test.

commit 18a13fa8e4d3bf0fe79bf9d9d75a480cceae6d68
Merge: 5ad6d5d 269cdb6
Author: Ajo Robert <ajo.robert@oracle.com>
Date:   Fri Nov 24 12:36:01 2017 +0530

    Merge branch 'mysql-5.7' into mysql-8.0

commit 269cdb69d9343abcc39ae9d2aefe5e0164b2e2e5
Author: Ajo Robert <ajo.robert@oracle.com>
Date:   Fri Nov 24 12:35:41 2017 +0530

    Bug #24423143 - WRONG RESULTS FOR AGGREGATE QUERY
    
    Test case fix.
    
    Change-Id: I8a3b1e2b6312e927e182b955e5d5850e83e7319f

commit 5ad6d5deb038a711770576aefd0c9a787efd5c5d
Merge: 132fb40 ade0f02
Author: Jaideep Karande <jaideep.karande@oracle.com>
Date:   Fri Nov 24 07:31:01 2017 +0100

    Merge branch 'mysql-5.7' into mysql-8.0

commit ade0f02f185d9a7f7af5b05198420a62638deefe
Author: Jaideep Karande <jaideep.karande@oracle.com>
Date:   Fri Nov 24 07:16:30 2017 +0100

    Bug#27150732: DOUBLE FREE AT SQL_SERVICE_COMMAND_INTERFACE CLASS
    
    Problem: During SQL Thread error (before thread set running variable), spawned
    SQL thread may block waiting for run while launcher thread will do the cleanup
    because of error.
    
    --------------------------------------------------------------------------------
    
    Launcher thread has this condition:
      while (m_session_thread_running.to_run() && !m_session_thread_error)
    
    POINT 1: m_session_thread_error, during error it will not block.
    
    --------------------------------------------------------------------------------
    
    Session_plugin_thread::terminate_session_thread is critical.
    ..  while (m_session_thread_running)
    
    POINT 2:
    Session_plugin_thread::terminate_session_thread is critical, since its makes
    sure spawned thread is terminated.
    But terminate_session_thread got tricked because running variable was never set
    to TRUE.
    Spawned thread never got mutex to set running=true.
    
    --------------------------------------------------------------------------------
    
    Resolution:
    There is missing *_starting(e.g. recovery has recovery_starting) variable in
    SQL Service Thread. This variables makes sure spawned thread is terminated
    even if it never ran.

commit 132fb4026ab9b0bc37c41ce5604669a13e68aa0d
Merge: e488d6d 7985ba0
Author: Nisha Gopalakrishnan <nisha.gopalakrishnan@oracle.com>
Date:   Fri Nov 24 08:47:37 2017 +0530

    Merge branch 'mysql-5.7' into mysql-8.0

commit 7985ba09e932d40f3bf2211c928fced56f655f93
Author: Nisha Gopalakrishnan <nisha.gopalakrishnan@oracle.com>
Date:   Fri Nov 17 10:35:15 2017 +0530

    BUG#25846957: MYSQL STARTUP BLOCKED FOR 20 MINUTES
                  ON PARTITION-ENGINE-CHECK.
    
    Analysis:
    =========
    From MySQL-5.7.17, during the server start up,
    a check is performed to list the tables which
    uses non native paritioning. This helps users
    to prepare for upgrade to 8.0 where the support
    for non native partitioning is removed. For large
    databases with many such tables, this check
    consumed a lot of time since a SELECT on I_S is
    performed to fetch the information. By default,
    the variable 'disable-partition-engine-check' is
    disabled, which triggers the check for tables
    using non-native partitioning at startup.
    
    Fix:
    ====
    The variable 'disable-partition-engine-check' is enabled
    by default. Hence the check for non native partitioned
    tables is skipped during the start up unless it is
    explicitly disabled.

commit e488d6da37252d43df8e7db4683c644b45930cdb
Merge: d9eb7de 9ffc030
Author: Neha Kumari <neha.n.kumari@oracle.com>
Date:   Fri Nov 24 08:02:24 2017 +0530

    Merge branch 'mysql-5.7' into mysql-8.0

commit 9ffc0308961a48d0b6a53b39b041509e80f26172
Author: Neha Kumari <neha.n.kumari@oracle.com>
Date:   Fri Nov 24 07:58:42 2017 +0530

    Bug#27067082:RPL.RPL_MTS_LOGICAL_CLOCK_APPLIER_ERROR_CONCURRENT_STOP_SLAVE - PB2 FAILURE
    
    Problem:
    A call to an include that issues "STOP SLAVE" may happen when the slave thread
    are already stopped by errors in slow machines (or testing with valgrind).
    In such cases, the test case will produce an extra content not recorded
    into its result:
    
    +Warnings:
    +Note   3084    Replication thread(s) for channel '' are already stopped.
    
    Fix:
    The test case is not 100% deterministic, so to avoid the above warning we
    can wrap the include that issues "STOP SLAVE" with
    disable_warnings/enable_warnings.

commit d9eb7dec3d61a771ec82f9cfb15827803eded290
Author: Neha Kumari <neha.n.kumari@oracle.com>
Date:   Fri Nov 24 07:53:32 2017 +0530

    Bug#26274274:ERROR/WARNING WHEN EXPIRE_LOGS_DAYS & BINLOG_EXPIRE_LOGS_SECONDS IS SET TOGETHER
    
    Problem:
    Having both binlog_expire_logs_seconds and expire_logs_days playing together
    might make configuration confusing and difficult to handle.
    
    Fix:
    When expire_logs_days is set along with binlog_expire_logs_seconds
     - Warning on server start up.
     - Error when trying to do so dynamically.

commit b73cdc0ef690f1fac110cc9d5c31487859fd7ce7
Author: Dmitry Lenev <dmitry.lenev@oracle.com>
Date:   Tue Nov 21 17:10:32 2017 +0300

    Fix for bug #27041477 "ASSERTION `HAS_PRELOCKING_LIST || THD->MDL_CONTEXT.OWNS_EQUAL_OR_STRONGER_LOCK".
    
    Under LOCK TABLES attempt to execute DML statement on a table with
    foreign keys led to assertion failure if this statement was
    incompatible with the mode in which tables were locked.
    
    The problem was that assertion in part of prelocking algorithm
    responsible for handling tables involved in foreign keys under
    LOCK TABLES did not take into account several scenarios in which
    these tables might have been not locked properly.
    
    This patch solves the problem by replacing problematic assertion
    with check if appropriate metadata locks are acquired. If necessary
    locks are missing we now fail with an error instead failing on assert.

commit 46dd5907bd64299843cd39458e699dde040256ee
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Thu Nov 23 10:00:08 2017 +0100

    Bug#27151550 PLUGINS/COMPONENTS SHOULD NOT RELY ON DLCLOSE() TO RUN DESTRUCTORS
    
    A couple of global counters must be reset at semisync master plugin startup.
    This makes rpl_semi_sync_master_assert_at_enabling.test pass with --repeat=4
    
    The patch also resets global variables which are bound to SYSTEM VARIABLES
    to their default values at plugin startup.
    
    Change-Id: I153226ff2c91d261683e9342866e67e5985f71fd

commit 7e68e029046e7373c598d1084ccf65f54018c05d
Author: Norvald H. Ryeng <norvald.ryeng@oracle.com>
Date:   Thu Nov 23 14:38:47 2017 +0100

    Bug #27116974 REFORMAT SQL/GIS/*
    
    Reformat files under sql/gis/ with clang-format -style=Google. This
    includes sql/gis/srs/*, which has not been on Google format before.
    
    Modify include guards to use a single underscore as directory separator.
    
    Use double slash comments consistently in copyright boilerplate.
    
    Replace some magic constants with range based loop in srs.h.
    
    Change-Id: I6e848d53d545487f4ee266bb79a60dcc0124f09b

commit 932d7fb8eaae7609a778f4f51c9dd3376f51258d
Author: Marc Alff <marc.alff@oracle.com>
Date:   Thu Nov 23 11:42:41 2017 +0100

    Bug#24688694 SEVERAL UNSTABLE TESTS IN SUITE PERFSCHEMA
    
    Improved stability of test perfschema.idx_*

commit d3b8cd3fbece5a4199de394d104dc15ddd3302ba
Author: Jens Even Berg Blomsoy <jens.even.blomsoy@oracle.com>
Date:   Thu Nov 23 13:03:26 2017 +0100

        WL#10416 Ellipsoidal ST_Length
    
        This WL extends ST_Length to detect that its parameter is in a
        geographic (ellipsoidal) SRS and computes the length on the ellipsoid.
    
        Change-Id: I54e212338fc4c1c2b9804ad6dff990ffd66fb0b4

commit ff6c524a2761cd3c878557121b07954d89c97d35
Author: Terje Rosten <terje.rosten@oracle.com>
Date:   Thu Nov 23 10:17:34 2017 +0100

    WL#9703 : Defaults change table_open_cache=4000
     - post-push fix: set new default value when @@open_files_limit < 5000

commit 8f8d6fb0c5f03e37bf99a8d42189bc835b83bd88
Author: Erlend Dahl <erlend.dahl@oracle.com>
Date:   Thu Nov 23 07:23:56 2017 +0100

    Bug#26576219 REMOVE THE BUILD/ DIRECTORY
    
    Unbreak the Debian build.

commit 400c546ae1e1f1dd4523ba1636d76d5de7661db6
Merge: ac5f973 78f961e
Author: Shivashankar Nagaraj <shiva.y.shankar@oracle.com>
Date:   Thu Nov 23 14:30:36 2017 +0530

    Merge branch 'mysql-5.7' into mysql-8.0

commit 78f961ec6942958e8fd1c53544522f97fc0f2abd
Author: Shivashankar Nagaraj <shiva.y.shankar@oracle.com>
Date:   Thu Nov 23 14:20:53 2017 +0530

    Bug#14286343: MAIN.STATUS TEST FAILS SPORADICALLY WITH RESULT CONTENT MISMATCH ON PB2
    
    Issue:
    ------
    The test case "Ensure that SHOW STATUS only changes global status variables"
    expectation itself is wrong. Executing any query, including SHOW STATUS,
    WILL change the statistics of the server, and this WILL change the result
    of some status variables, global or per session. Expecting this behavior is
    un realistic, and trying to observe it in a test case is bound to fail.
    
    Fix:
    ----
    Remove the test case "Ensure that SHOW STATUS only changes global status variables"
    
    Reviewed-by: Marc Alff <marc.alff@oracle.com>
    Reviewed-by: amit Bhattacharya <amit.bhattacharya@oracle.com>
    RB: 17930

commit ac5f973a7f02de05a33e4dd804772d74c597b459
Author: Lukasz Kotula <lukasz.kotula@oracle.com>
Date:   Tue Nov 21 19:53:20 2017 +0100

    BUG#27143268 - MYSQLXTEST.EXE : CRASHES MYSQLXTEST.EXE!PROCESS_CLIENT_INPUT(STD::BASIC_ISTREAM
    
    Description
    ===========
    Mysqlxtest crashes because of the large buffer allocated on stack.
    
    Fix
    ===
    Change static buffer, to dynamic allocated buffer (using std::string).
    
    RB: 17993

commit f65b1c160feb2e6317e58331aaf54798581dda63
Merge: 6b2a577 2c3328e
Author: Arnab Ray <arnab.r.ray@oracle.com>
Date:   Thu Nov 23 11:46:26 2017 +0530

    Periodic up-merge of Cluster branch

commit 6b2a5779acc76e15d03ba0aea8b5e51b6849fd5a
Author: Sreeharsha Ramanavarapu <sreeharsha.ramanavarapu@oracle.com>
Date:   Thu Nov 23 10:06:54 2017 +0530

    Bug #27128524: ASSERTION `!TABLE || (!TABLE->READ_SET
                   .. FIELD_INDEX))' AT FIELD.CC:5438
    
    Issue:
    ------
    1) This problem occurs when a table's column is present in
       the read set of a trigger.
    2) skip-log-bin option is used.
    3) LOAD statement is used to execute the trigger.
    
    As part of the fix for Bug #27041382,
    Table_trigger_dispatcher::mark_fields() was removed from
    prepare_triggers_for_insert_stmt(). This was handled for
    INSERT statement by adding it to the prepare_inner.
    
    The problem for LOAD was masked because when binlog is open
    all the columns are marked as being part of the read_set.
    So when the skip-log-bin option is used, all the columns
    aren't marked as being part of the read_set. It hits an
    assert during val_str for a column that isn't part of the
    read_set.
    
    Solution:
    ---------
    Add the call to Table_trigger_dispatcher::mark_fields() for
    LOAD.

commit 1f66a86f2017c55a841a61ea2394efff74850d32
Merge: 2e9fd47 b2ef597
Author: Ajo Robert <ajo.robert@oracle.com>
Date:   Thu Nov 23 09:14:14 2017 +0530

    Merge branch 'mysql-5.7' into mysql-8.0
    
    Change-Id: Ie219af228725b149d566953cac6eea314a92dc20

commit b2ef5978b54210fb91faf571c8d871f4d646fe71
Author: Ajo Robert <ajo.robert@oracle.com>
Date:   Thu Nov 23 08:26:21 2017 +0530

    Bug #24423143 - WRONG RESULTS FOR AGGREGATE QUERY
    
    Doxygen fix.
    
    Change-Id: I7402fb1a1088e6cb8f4030b7814718f2d5f415da

commit 2e9fd470622639999f5a2e195e7d77cf5a95f503
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Wed Nov 22 16:56:43 2017 +0100

    Bug#27151550 PLUGINS/COMPONENTS SHOULD NOT RELY ON DLCLOSE() TO RUN DESTRUCTORS
    
    There is no guarantee that unloading (destructors are invoked) happens on
    dlclose. On musl (as opposed to glibc), constructors only run the first time
    a library is run, and destructors only run on exit. For portable code,
    dlclose cannot be assumed to unload the symbols immediately.
    
    The fix is to always clean internal data structures at plugin startup.
    
    In the test_status_var_service, plugin initialization simply consists
    of setting a pointer to null;
    
    Also: disable asynch IO by default on Alpine, it was broken by this patch:
    
    Author: Satya Bodapati <satya.bodapati@oracle.com>
    Date:   Mon Jul 3 14:21:59 2017 +0200
    
        WL#9538 - InnoDB_New_DD: Integrating InnoDB SDI with new DD
    
    (cherry picked from commit 47384bb52f78b3475c85810c60b169614a34e276)

commit f4b4afc07027deda9859d36e132e730135bdb908
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Wed Nov 22 13:21:04 2017 +0100

    Bug#27116827 SEMISYNC MASTER CRASH AT SERVER EXIT
    
    Post-push fix: Put ReplSemiSyncSlave on the heap as well, similar
    the original patch which handled all master object instances.
    
    (cherry picked from commit c050c138035526b166927f9c4112778903ee283d)

commit 00b5e51c03ed168bf20e48334042a33baa06982f
Merge: c8e1019 fce1c96
Author: Hemant Dangi <hemant.dangi@oracle.com>
Date:   Wed Nov 22 22:27:52 2017 +0530

    Merge branch 'mysql-5.7' into mysql-8.0

commit fce1c96b65005c78b3016e855a3e4790bd5c6449
Author: Hemant Dangi <hemant.dangi@oracle.com>
Date:   Wed Nov 22 21:58:13 2017 +0530

    BUG#26985561: BACKPORT BUG#26277771 TO 5.7
    
    This is backport of
    Bug#26277771: BAD WRITE SET TRACKING WITH UNIQUE KEY ON A
    DELETE FOLLOWED BY AN INSERT.
    
    Issue:
    ======
    The Writesets generated for keys were not using collation into consideration,
    and because of that wrong last_committed and sequence_number were
    getting added to binary log and thus trnsactions were getting applied
    in wrong order by parallel applier on slave.
    
    Solution:
    =========
    The fix uses make_sort_key to transform keys, with different charset and
    collation, into its binary image, suitable for sorting using binary
    comparison.

commit c8e1019d79343da412574ec236ba5e570c14b912
Merge: 06cb0e8 8116cbe
Author: Sachin Agarwal <sachin.z.agarwal@oracle.com>
Date:   Wed Nov 22 20:04:47 2017 +0530

    Merge branch 'mysql-5.7' into mysql-8.0

commit 8116cbefedf69eec47ab40f223abf129117f5168
Author: Sachin Agarwal <sachin.z.agarwal@oracle.com>
Date:   Wed Nov 22 19:46:06 2017 +0530

    Bug #23590280   NO WARNING WHEN REDUCING INNODB_BUFFER_POOL_SIZE INSIZE
    		THE FIRST CHUNK
    
    PROBLEM
    
    It is a post-push problem. innodb_buffer_pool_size_validate() function was
    supposed to return updated buffer pool value to the caller function,
    but due to a check introduced by my fix, it returned before updating
    the buffer pool value.
    
    FIX
    
    Ensured that the proper updated value of buffer pool size returns
    to the caller function.
    
    Reviewed by: Aditya
    RB: 17812

commit 06cb0e8c1f5279df2139d4d012f58c1083a0c3e9
Author: Oystein Grovlen <oystein.grovlen@oracle.com>
Date:   Wed Nov 22 12:42:22 2017 +0100

    Bug#27153338: CTE_MAX_RECURSION_DEPTH SHOULD BE "HINTABLE"
    
    Make it possible to set cte_max_recursion_depth in SET_VAR hints.
    
    sql/sys_vars.cc
       Add HINT_UPDATEABLE flag to variable definition
    
    mysql-test/t/opt_hints_set_var.test
    mysql-test/r/opt_hints_set_var.result
       Test that shows that SET_VAR has effect
    
    Change-Id: I719468c58fe5d9dfe4b22d38067a3b1c041caf78

commit 7191341d297246bd456a9d87060633d5166d0b66
Author: Erlend Dahl <erlend.dahl@oracle.com>
Date:   Wed Nov 22 12:04:15 2017 +0100

    Bug#26576219 REMOVE THE BUILD/ DIRECTORY
    
    Remove outdated build scripts. Move the build readme file to Docs/.
    
    Approved by Tor Didriksen <tor.didriksen@oracle.com>

commit 40b7ef5bd84c5e744a006082c04fed0d8c9601a1
Author: Bharathy Satish <bharathy.x.satish@oracle.com>
Date:   Wed Nov 22 12:09:07 2017 +0100

    Bug #26191109: GRANT GRANT OPTION ON *.* APPLIES TO A USER'S STATIC PRIVS
    BUT NOT DYNAMIC ONES
    
    Problem: GRANT GRANT OPTION does not set the flag WITH_GRANT_OPTION in
    mysql.global_grants table, thus reporting wrong output for SHOW GRANTS
    statements.
    
    Fix: Introduced 2 new functions grant_grant_option_for_all_dynamic_privileges,
    revoke_grant_option_for_all_dynamic_privileges to update GRANT OPTION privilege
    for only existing dynamic privilege in mysql.global_grants table.

commit b5c44f39b7993118f409a5e09117189f77eaa8c0
Merge: dde0ff2 9d03bbb
Author: Ajo Robert <ajo.robert@oracle.com>
Date:   Wed Nov 22 16:06:34 2017 +0530

    Merge branch 'mysql-5.7' into mysql-8.0
    
    Change-Id: I6882e69492068df9f9c76bc4e80ddc6b76a24372

commit 9d03bbbfeb5d2809c0bebf8655a20e5497b26c73
Author: Ajo Robert <ajo.robert@oracle.com>
Date:   Wed Nov 22 16:03:36 2017 +0530

    Bug#24423143 - WRONG RESULTS FOR AGGREGATE QUERY
    
    Post push build fix.
    
    Change-Id: I282a874f87b7c37502e90dc1b32df8655b726726

commit dde0ff2328937e6d1323490d3a495cd1c39df3de
Author: Pavan Naik <pavan.naik@oracle.com>
Date:   Mon Nov 20 14:00:38 2017 +0530

    BUG#27136445: MTR: EXPORT AND USE # OF AVAILABLE CPUS IN TESTS
    
    Description:
    ------------
    Some tests have code to find number of CPUs. But MTR have already
    found that number, but has not exported it for use in tests or in
    include files. Export an environment variable to hold number of
    CPUs and use it in tests.
    
    Fix:
    ----
    - Introduced a new enironment variable $NUMBER_OF_CPUS containing
      the number of CPUs value.
    
    - Rewritten mysql-test/include/resource_group_init.inc file to use
      the new environment variable $NUMBER_OF_CPUS.
    
    Change-Id: Ife84d89227ffefd452f3baa5882fc9fa958ef05f

commit 2c3328e3f5409f4a53cabe51048d321e9018dd44
Merge: d6ab62b 4ecc87e
Author: Arnab Ray <arnab.r.ray@oracle.com>
Date:   Wed Nov 22 15:20:43 2017 +0530

    Merge commit '4ecc87ef87de4c0be8580f997378fb50139e6cae' into mysql-8.0-cluster-8.0

commit 628168970cc3289c143b8f69b7c50ea3655bcabd
Author: Dyre Tjeldvoll <Dyre.Tjeldvoll@oracle.com>
Date:   Mon Nov 20 20:12:41 2017 +0100

    Bug#26762973: STORING SDI COSTS TOO MUCH TIME FOR A BIG PARTITIONED TABLE
    
    Problem: When creating a partitioned table using implicit
    tablespace, the effect is to place each partition in its own tablespace,
    with no particular tablespace for the table as a whole. Since SDIs were
    stored in all tablespaces used by a table, the cost of storing SDIs in a
    table with many tablespaces became prohibitive.
    
    Solution: Only include the tablespace for the first partition in the
    set of tablespaces used to store the SDI.
    
    (cherry picked from commit 7bc0de17f06b76c74cc0b1c278da16e313ee93e0)

commit 3d7a5e25bd2cb9d2ff6c1439e46d23130a6a06fb
Author: Knut Anders Hatlen <knut.hatlen@oracle.com>
Date:   Wed Nov 22 08:54:52 2017 +0100

    Bug#27028889: MYSQL NORMALIZES DECIMAL NUMBERS WITH ZERO FRACTIONAL PART
                  TO INTEGERS
    
    Post-push fix: Re-record results for the rpl_row_jsondiff_datatypes
    test, which only runs when the --non-parallel-test flag is given to
    mtr.

commit ee7bdf6ddded38fb0085e1f0269d46fdcf010bce
Author: Magnus Blåudd <magnus.blaudd@oracle.com>
Date:   Fri Oct 13 08:02:34 2017 +0200

    BUG#14785681 RPL_DDL.TEST NEVER RUN
    
     - follow up patch to previous test which removed rpl_ddl.test
     - also remove the corresponding rpl_ndb_ddl.test which sources the
       same include file as the now removed test.
     - also remove the common test include file extra/rpl_tests/rpl_ddl.test
     - also remove disabling of rpl_ndb_ddl.test referencing bug
     - also remove mention of things which "should be merged to
       rpl_ddl.test" from rpl_innodb.test
    
    (cherry picked from commit 18e4bf4ba7de29c228c7784b2a61bd47bdc61f75)

commit 9721e4a34b3f20f4a522be74351e5e8dc2e38470
Author: Dmitry Shulga <dmitry.shulga@oracle.com>
Date:   Wed Nov 22 14:34:08 2017 +0700

    BUG#26962434 -- XA INCONSISTENCIES AFTER XA COMMIT ERROR
    
    This is a temporary workaround for the bug#26962434 to make the test
    binlog.binlog_xa_commit_failure pass ok.
    
    General idea underlying this workaround is to add server restart at the end of
    the test case, rolls back prepared XA transaction if it exists after restart
    and suppress possible warnings about presence of prepared XA transaction
    in server's log.

commit 8ec68967359e30b8fcf50f3997f443bd2db747d6
Merge: 6152415 3d2370a
Author: Ajo Robert <ajo.robert@oracle.com>
Date:   Wed Nov 22 12:47:45 2017 +0530

    Merge branch 'mysql-5.7' into mysql-8.0
    
    Change-Id: Ic1e160f282fa84e0a3c4264afde0b30dc9a765ec

commit 3d2370ac8353528dc4944dee61d4d93df0dd6cb7
Author: Ajo Robert <ajo.robert@oracle.com>
Date:   Wed Nov 22 12:03:12 2017 +0530

    Bug#24423143 - WRONG RESULTS FOR AGGREGATE QUERY
    
    Optimizer chooses loose index scan (QUICK_GROUP_MIN_MAX_SELECT)
    for a group by even when there exists a predicate with disjunction.
    This is due to that either of the below two cases are encountered
    and not handled properly.
    
    1. A range tree created for index merge scan is not taken
    into account while checking for the presence of disjuncted
    conditions in get_best_group_min_max().
    
    2. A disjunction condition could lead to null tree if an index
    merge scan is not possible. A NULL tree will cause
    get_best_group_min_max() to skip many relevent checks
    like WA2.
    
    There are two scenarios here,
      (a) The WHERE clause is a disjunction of conditions on
         MIN/MAX column only.
        => We can use min_max optimization considering all
        other criteria (eg:SA2) are met.
    
     (b) MIN/MAX column is participating in a disjunctive WHERE
         clause along with other columns.
         => min_max optimization is not applicable in this scenario.
    
    Fix:
    Skip loose index scan in below scenarios involving disjoint conditions
    in WHERE clause.
    
    1. When the condition in WHERE clause results in more than
    one disjoint range trees (when index merge scan is possible).
    
    2. The range tree is null and MIN/MAX column participates
    in the WHERE clause along with other columns.
    [There is no range tree if WHERE condition can't be represented
    in a single range tree and index merge is not possible]
    
    Change-Id: I2ec8ef815d9dfa64e0bf60e97d3b6129c070e24b

commit 61524150df82c6d6f0b522c3688a735ac4ccacda
Author: Chaithra Gopalareddy <chaithra.gopalareddy@oracle.com>
Date:   Wed Nov 22 11:29:58 2017 +0530

    Bug#27135084: WINDOW FUNC: CRASH IN ITEM_FUNC_INT_DIV::VAL_INT
    Bug#27136492: WINDOW FUNC: MAKETIME: CRASH IN MY_DECIMAL2LLDIV_T
    
    Problem:
    While checking for errors in ::compute(), an error is detected which
    is generated earlier. On return from ::compute(), ::val_decimal()
    returns "nullptr". But as null_value is not set, calling functions
    continue to evaluate resulting in server exit.
    
    Solution:
    Return nullptr only when null_value is set. otherwise set the decimal buffer
    to 0 and return the decimal buffer. Similar to what we do when wf_common_init()
    fails.

commit d6ab62bc8379b67bba4e533f61a382a8a615e28e
Author: Lakshmi Narayanan Sreethar <lakshmi.narayanan.sreethar@oracle.com>
Date:   Fri Nov 17 16:18:30 2017 +0530

    Bug #27132538 : Update CharsetMap to adapt to newer charset number lookup function
    
    CharsetMap's getCharsetNumber is a wrapper over charset function
    get_charset_number(charset_name, my_cs_flag). Currently it uses the
    flag MY_CS_AVAILABLE to lookup the charset number of the charset passed
    to it. With the older implementation of get_charset_number, such a call
    with MY_CS_AVAILABLE would loop all the charsets and return the number
    of the first collation with the charset name and flag MY_CS_AVAILABLE
    enabled.
    
    But after a recent update to the get_charset_number code, as a part of
    commit 58fdaba1f893 (patch for Bug#25680866), now the function only
    looks up collations with flags MY_CS_PRIMARY or MY_CS_BINSORT enabled.
    (i.e.) the function can lookup for a primary collation or the binary
    sort order collation for the given Charset name. Any other CS flags
    are not allowed. Since our implementation uses MY_CS_AVAILABLE for
    lookup, it crashes.
    
    The fix is to use MY_CS_PRIMARY for lookup. This might return a
    different collation for few charsets. Different from what
    MY_CS_AVAILABLE would have returned. But this would be fine since
    CharsetMap is mainly concerned about encoding rather than the sort order.

commit aaaaf88337aabbc8b7855d909688f604238718c3
Merge: 8bb2eaf d7c50b1
Author: Marek Szymczak <marek.szymczak@oracle.com>
Date:   Tue Nov 21 15:40:05 2017 +0100

    Merge branch 'mysql-5.7' into mysql-8.0

commit d7c50b1dad49f6c836df586b70c7ea9c5b4992e1
Author: Marek Szymczak <marek.szymczak@oracle.com>
Date:   Tue Nov 21 15:20:55 2017 +0100

    Bug#27010045 AUDIT PLUGIN FILTER DOES NOT PROCESS EVENT FIELD DEFINED AS JSON ARRAY
    
    Wrong loop condition responsible for processing JSON array defined under the 'event' field.
    
    Revieved by:
    Ivan Svaljek <ivan.svaljek@oracle.com>
    Georgi 'Joro' Kodinov <georgi.kodinov@oracle.com>

commit 8bb2eaf51f074936bfa3618940a71dac0051fb53
Author: Knut Anders Hatlen <knut.hatlen@oracle.com>
Date:   Fri Nov 3 14:58:17 2017 +0100

    Bug#27028889: MYSQL NORMALIZES DECIMAL NUMBERS WITH ZERO FRACTIONAL PART
                  TO INTEGERS
    
    When a JSON document is converted to string representation,
    floating-point values that have no fractional part may be represented
    in a format indistinguishable from integers. If the string
    representation of such a JSON document is passed through the JSON
    parser again, the information that the numeric value was originally
    specified as a floating-point value, is lost.
    
    The reason is that the conversion from JSON to string uses my_gcvt()
    to format floating-point values, and my_gcvt() does not add a decimal
    point if the value has no fractional part.
    
    This patch adds a fractional part to the string representation of
    floating-point values in JSON documents if the value has no fractional
    part and it is not represented in scientific format. This makes
    floating-point values distinguishable from integers in the string
    representation, so that they will stay as floating-point numbers if
    the string is parsed again.
    
    The patch also makes ST_GeomFromGeoJSON use the same JSON parser as
    the other JSON functions. It has used its own custom parser since
    bug#19504183 because ST_AsGeoJSON would drop the fractional part of
    negative zero (-0 instead of -0.0), and the JSON parser would
    interpret -0 as the integer 0 and lose the distinction between
    positive and negative zero. Since ST_AsGeoJSON now presents negative
    zero as -0.0, no special logic is needed in ST_GeomFromGeoJSON to
    preserve negative zeros when parsing the output from ST_AsGeoJSON.
    
    Change-Id: I20508741c981cc2ca2af004757f95ef78558f582

commit f5879add4ce26d3ff356afa042071440f8e1b3a9
Merge: e06b4e5 f9f8fc8
Author: Maitrayi Sabaratnam <maitrayi.sabaratnam@oracle.com>
Date:   Tue Nov 21 13:51:46 2017 +0100

    Merge branch 'mysql-5.7-cluster-7.6' into mysql-8.0-cluster-8.0

commit f9f8fc8eeb52638a16b5170fdf500a5f0838d866
Author: Maitrayi Sabaratnam <maitrayi.sabaratnam@oracle.com>
Date:   Tue Nov 21 13:46:14 2017 +0100

    Fixing some sporadic 'table full' test failures.

commit d30e7b3dc35f3052b6fc498103ad562b3b08c94f
Author: Dyre Tjeldvoll <Dyre.Tjeldvoll@oracle.com>
Date:   Mon Nov 20 15:15:23 2017 +0100

    Bug#26989949: make main.basedir work with renamed binary
    
    Problem: main.basedir did not work with renamed binaries (mysqld-debug)
    Solution: Fix perl-regexps so that they do not hard code the name of the
    binary.
    
    Change-Id: I7c03864e207b70fed313a432ef5f4718200b8522
    (cherry picked from commit 4f4e618e7bc0f64f2f168d59a3e19e758ed34168)

commit 70fa235864d18921e99ef3748e451581dc0fb5fe
Merge: d659817 aec4a40
Author: Horst Hunger <horst.hunger@oracle.com>
Date:   Tue Nov 21 13:33:59 2017 +0100

    Merge branch 'mysql-5.7' into mysql-8.0

commit aec4a402c8a235404dc6f596bd3ac31306616700
Author: Horst Hunger <horst.hunger@oracle.com>
Date:   Tue Nov 21 13:32:51 2017 +0100

    Bug 26996342: Enables keyring tests to test a patch.

commit d65981770f5edbf352d9185e86d4be8fc4e18e58
Author: Satya Bodapati <satya.bodapati@oracle.com>
Date:   Tue Nov 21 17:56:55 2017 +0530

    Followup testcase fix for Bug#26997500

commit f69472836cea35494c5eaaea028842774b1e6227
Author: Satya Bodapati <satya.bodapati@oracle.com>
Date:   Mon Nov 20 18:12:07 2017 +0100

    Bug#25508568 	I_INNODB.INNODB_BUG14150372 SPORADICALLY FAILS
    
    Problem:
    --------
    Test fails randomnly because the sync point is acivated for DD API
    calls.
    
    Fix:
    ----
    1. Acivate sync only on user table
    2. store n_rows to local variable (as n_rows is changed concurrently)

commit 84e3ba7f45d6295e5c357e3a040fe6b3d7448138
Author: Joao Gramacho <joao.gramacho@oracle.com>
Date:   Thu Oct 26 12:57:04 2017 +0100

    BUG#27030339 BACKUP_LOCK IS ALLOWING REMOVAL OF BINARY AND RELAY LOG
                 FILES
    
    Problem
    -------
    
    According to BACKUP_LOCK specification, when the it is taken, no files
    must be created, renamed, or removed.
    
    One exception is that new binary log files can be created, but there are
    no exceptions with respect to removal of binary log files.
    
    The current implemented behavior is allowing:
    - Expired binary log files to be automatically removed after binary log
      rotation;
    - Unused relay log files to be automatically removed;
    
    Analysis
    --------
    
    Any exception to binary log files should also be extended to relay log
    files. Relay log files can be created fine, so nothing to be fixed in
    this respect.
    
    Any automatic purge or binary and relay log files should be avoided
    while the server instance is locked for backup, but related functions
    are not taking the backup lock in consideration when evaluating if files
    will be automatically purged.
    
    Fix
    ---
    
    - Created a new Moved MDL_lock_visitor class to check if a MDL lock
      is owned by any thread;
    - Created is_instance_locked_for_backup() function;
    - Added a check to is_instance_locked_for_backup() on automatic
      binary log file purge routine and also on automatic relay log file
      purge routine.

commit 17f6a951b95d382a98207439267cb26fd4b10307
Author: Dmitry Lenev <dmitry.lenev@oracle.com>
Date:   Tue Nov 21 11:43:27 2017 +0300

    Follow-up to fix for bug#27041516 "ASSERTION `TRN_CTX->IS_ACTIVE(TRANSACTION_CTX::SESSION)' FAILED."
    
    Moved test case for this bug to newly added binlog_nogtid_stm_blackhole
    test in binlog_nogtid suite. CREATE TABLE SELECT is not safe in GTID mode.

commit 343766215ecfc55415765b5752556d92e3b3173c
Author: Parveez Baig <parveez.baig@oracle.com>
Date:   Tue Nov 21 14:27:55 2017 +0530

    Bug#26898143: RPL_ROW_JSONDIFF_ERROR FAILS SPORADICALLY ON WEEKLY-8.0 AND WEEKLY-TRUNK
    
     Test is failing because there is an unsupressed
    ERROR logged in the error log of slave server. The
    test has supression for ERRORS 4550 and 4551 which
    are supposed to be caused due to the scenarios in
    test. Recent change in the server by some commit
    has changed the ERROR numbers for different errors.
    So the error which was causing ERROR no 4550, 4551
    now is causing ERROR no. 4549 and 4550 respectively.
    
    Fix: Included the supression for Error no 4549.
         Removed the supression for Error no 4551.

commit 021bce523c6c46186d0736161ca699f3f458fd14
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Mon Nov 20 18:43:14 2017 +0100

    Bug#23581389: SEMI-SYNC CAN'T RUN NORMALLY WHEN MANY CONNECTIONS
    
    Post-push fix: Check for _WIN32 instead of WINDOWS. WINDOWS is only set
    if including <zconf.h> (which this file happened to do indirectly
    through a long #include chain), and if that link is broken, semisync
    replication tests start breaking mysteriously on Windows.
    
    Change-Id: Ie90db85ae67c718862f1d0139ff6b922f102c519

commit 886f617849f4bc56b260edc27a984954e4c8fd34
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Mon Nov 20 16:47:44 2017 +0100

    Bug#27116827 SEMISYNC MASTER CRASH AT SERVER EXIT
    
    After upgrade to macos 10.13 a few replication tests have started to fail.
    The problem is destruction of global static objects.
    
    Put the ReplSemiSyncMaster and Ack_receiver objects on the heap,
    allocate when plugin is started,
    delete them when plugin is about to be unloaded.
    
    Also fix a few uninitialized struct members, to make Valgrind happy.
    (these were previously static objects, zero-initialized by the linker)
    
    (cherry picked from commit ce69985d639b1303e28ced523860a66998cd80b2)

commit 4c559b666eb1f12ef6899b10c170c798a3f47f9f
Author: Yashwanth Thummala <yashwanth.thummala@oracle.com>
Date:   Tue Nov 21 11:22:21 2017 +0530

    BUG#23195786 - MEB SHOULD PRINT ITS LATEST GIT COMMIT ID WHEN
                   -VERBOSE IS SPECIFIED
    
    Description:
    
    The Push build Id and Push revision values has to be printed along with the
    copyright information when mysqlbackup is run.
    
    Fix:
    
    The push build ID was defined in the "version.cmake" file inside the src
    directory, which was fetched in the "ver_config.h.cmake" file. cmake then
    generates a ver_config.h file when executed.
    
    This file (ver_config.h) is included in the "meb_util.cpp", which prints
    these MEB_PB2_PUSH_ID, MEB_PB2_PUSH_REVISION values after the copyright
    information inside function named print_version()
    
    Note -  The Push ID and revision information will not be printed if these
            values are not available.
    
    RB# http://rb.no.oracle.com/rb/r/17369/

commit e06b4e5786cee8b01ea60b215123c9d6bb978595
Author: John David Duncan <john.duncan@oracle.com>
Date:   Mon Nov 20 10:32:47 2017 -0800

    bug#26435040 Failure of ndb_bug19390895 test
    
    Change two "char(255)" columns to "char(255) charset latin1" and reenable test.

commit 4ecc87ef87de4c0be8580f997378fb50139e6cae
Author: Dmitry Lenev <dmitry.lenev@oracle.com>
Date:   Fri Nov 17 15:29:57 2017 +0300

    Fix for Bug#27041516 "ASSERTION `TRN_CTX->IS_ACTIVE(TRANSACTION_CTX::SESSION)' FAILED."
    
    CREATE TABLE SELECT which tried to create table in Blackhole SE led
    to assertion failure in statement logging mode.
    
    Starting from 8.0 binlogging code assumes that CREATE TABLE statements
    (including CREATE TABLE SELECT) which are marked as to be written to
    binlog transaction cache are supposed to be atomic DDL. OTOH common
    code which writes both CREATE TABLE SELECT and INSERT SELECT statements
    in statement logging mode to binlog only takes into account whether
    target table SE supports transactions or not when choosing between
    statement or transaction cache. So the assumption was broken for Blackhole
    tables as this SE supports transaction but not atomic DDL.
    
    This fix changes CREATE TABLE SELECT implementation to write statement
    to binlog transaction cache in statement mode iff target table SE supports
    atomic DDL.

commit bc2c09110a6e4f128875e5ca22451fbe11b99b07
Merge: 9800135 0352bd7
Author: Anibal Pinto <anibal.pinto@oracle.com>
Date:   Mon Nov 20 09:31:59 2017 +0100

    Merge branch 'mysql-5.7' into mysql-8.0

commit 0352bd7ef480bca55cd27e967060fc3bbc087b54
Author: Anibal Pinto <anibal.pinto@oracle.com>
Date:   Mon Nov 20 09:21:03 2017 +0100

    BUG#27091389: RACE IN GR_CONCURRENT_UNINSTALL_START TEST CASE
    
    There is a concurrency issue between uninstalling the group replication
    plugin and starting it.
    
    The test case do not expect that UNINSTALL can be executed after START, if that
    happens the UNINSTALL will return an error.
    
    Modified test to expect success or error.

commit 980013510ff8eb0e85885b1f658e24c30f48ea8e
Merge: d1c8df8 6209f15
Author: Sachin Agarwal <sachin.z.agarwal@oracle.com>
Date:   Mon Nov 20 11:58:08 2017 +0530

    Merge branch 'mysql-5.7' into mysql-8.0

commit 6209f1513c9b3f18ca9c8da77ba74abbcda9c851
Author: Sachin Agarwal <sachin.z.agarwal@oracle.com>
Date:   Mon Nov 20 11:54:48 2017 +0530

    Bug #23590280   NO WARNING WHEN REDUCING INNODB_BUFFER_POOL_SIZE INSIZE
    		THE FIRST CHUNK
    
    PROBLEM
    
    If we are scaling down innodb_buffer_pool_size inside the first chunk,
    no resize operation is performed which is the correct behaviour . But
    no warning is given to the client and no warning is included in the
    error log . So to the user it looks as though the incorrect value has
    been used to resize the buffer pool.
    
    FIX
    
    The above resize operation returns a warning to user.
    
    Reviewed by: Jimmy and satya
    RB: 17812

commit d1c8df865bf1a5538ab1a81ecbf60b5f5ebe85a1
Author: Srikanth B R <srikanth.b.r@oracle.com>
Date:   Fri Nov 17 14:49:22 2017 +0530

    - Add missing mysql-8.0-stage collection files
    - Remove duplicate X plugin run from mysql-trunk-stage
    
    Approved by Erlend Dahl <erlend.dahl@oracle.com>

commit aff34432c1cd4436dea1f64e8657dea38e7bd3f5
Author: Bin Su <bin.x.su@oracle.com>
Date:   Mon Nov 20 10:12:28 2017 +0800

    BUG#27041487 - FIL0FIL.CC:8619:RECV_RECOVERY_IS_ON() || LOG_DDL::IS_IN_RECOVERY() ASSERT
    
    The assertion says this function should be called during recovery,
    however, it's now also called during normal post DDL phase.
    
    So the solution is to check if this is recovery or not. If it's
    not in recovery phase, there is no need to load tablespace
    again from the information of tablespace files.
    
    Reviewed-by: Allen Lai <zheng.lai@oracle.com>

commit 79dcabfb9bf1f1bd8b4d6010aca6906cb4869d37
Merge: 8f54218 03d54f3
Author: Jaideep Karande <jaideep.karande@oracle.com>
Date:   Sat Nov 18 08:24:27 2017 +0100

    Merge branch 'mysql-5.7' into mysql-8.0

commit 03d54f3a5d610cd6c9867938345e7259d213bcc3
Author: Jaideep Karande <jaideep.karande@oracle.com>
Date:   Sat Nov 18 08:14:04 2017 +0100

    Bug#27091493: GR_INJECT_PIPELINE_ERROR_LOCAL_GTID IS FAILING SPORADICALLY IN PB
    
    Problem: Missing error supression when GR is unable to kill transaction.
    
    The group replication plugin is stopping due to an error.
    Sees that there is one waiting transactions but when it
    tries to kill it, it fails, causing error being written to logs.
    Thread is already killed or not in Wait_ticket map.
    
    Resolution:
    There is already suppressed error message in logs "Due to a plugin error, *".
    Adding post intermittent message to suppression logs.

commit 895925dbab253f2f7c9ed2272765ddee8dff6bae
Merge: 09709d2 bd1b986
Author: Mauritz Sundell <mauritz.sundell@oracle.com>
Date:   Fri Nov 17 18:15:16 2017 +0100

    Merge branch 'mysql-5.7-cluster-7.6' into mysql-8.0-cluster-8.0

commit bd1b986b44719b0ee2b3ec858df74d7d2b3a2bc8
Merge: 59232a8 1259330
Author: Mauritz Sundell <mauritz.sundell@oracle.com>
Date:   Fri Nov 17 18:14:05 2017 +0100

    Merge branch 'mysql-5.7-cluster-7.5' into mysql-5.7-cluster-7.6

commit 1259330f29e50f0293c2171e85d9bf84c54a0469
Merge: d1038e7 f266a2a
Author: Mauritz Sundell <mauritz.sundell@oracle.com>
Date:   Fri Nov 17 18:13:43 2017 +0100

    Merge branch 'mysql-5.6-cluster-7.4' into mysql-5.7-cluster-7.5

commit f266a2a6b5d2e59c28f30c7487a3b3b32c3957f9
Merge: 3be78e7 5b197ca
Author: Mauritz Sundell <mauritz.sundell@oracle.com>
Date:   Fri Nov 17 18:13:08 2017 +0100

    Merge branch 'mysql-5.6-cluster-7.3' into mysql-5.6-cluster-7.4

commit 5b197caea34721529574cd9537d182c315875cc5
Merge: 4831438 d1e2fbf
Author: Mauritz Sundell <mauritz.sundell@oracle.com>
Date:   Fri Nov 17 18:12:44 2017 +0100

    Merge branch 'mysql-5.5-cluster-7.2' into mysql-5.6-cluster-7.3

commit d1e2fbf4e5da7fa34253492f20aa82662d76f919
Author: Mauritz Sundell <mauritz.sundell@oracle.com>
Date:   Wed Nov 15 22:56:56 2017 +0100

    Bug#27125787 CPCD PROCESS MONITOR DOES NOT HANDLE TRANSITION FROM STOPPING TO STOPPED
    
    Better handling of process statuses when stopping a process:
     * After stopping, only processes no longer executing are marked as stopped
     * Processes that didn't immediately stop will keep status STOPPING and handled
       by monitoring
    
    Make cpcd process monitor (repeatably) kill process with SIGKILL if nice
    shutdown (SIGTERM) takes longer than 5 seconds.
    
    Made cpcd always remove process definition when undefine process have been
    issued for process and process has stopped.
    
    undefine process no longer returns failure when process is still running
    at the time, only if process is not defined or undefine is already in progress.
    
    Change contributed and reviewed jointly with Tiago Alves.

commit 8f54218350f004bac56a1074f1bb59440a0df624
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Thu Nov 16 15:08:14 2017 +0100

    Bug#27128815 ADDRESSSANITIZER: STACK-USE-AFTER-SCOPE IN MEB CODE
    
    Lots of ASAN warnings when running mysqlbackup.
    The stack corruption is caused by a mix of DBUG_ENTER/DBUG_RETURN
    and throwing of exceptions. A thrown exception will not clean up
    the ENTER/RETURN debug stack.
    
    This patch removes all DBUG_ENTER/DBUG_RETURN code from the MEB codebase.
    
    Change-Id: Icdb4e35022ed920118d9cb41247cd9c89e65be28

commit ae008fd986eaca565cd1a696843ca096cf642c76
Merge: 86ebc64 227bac4
Author: Tiago Jorge <tiago.jorge@oracle.com>
Date:   Fri Nov 17 15:54:58 2017 +0000

    Null-merge from 5.7.

commit 09709d24927325b5bc14c02d669efd28295a1881
Author: Magnus Blåudd <magnus.blaudd@oracle.com>
Date:   Fri Nov 17 16:05:39 2017 +0100

    Bug#27137201 REMOVE UNUSED CODE FROM NDBCLUSTER [noclose]
    
     - remove unused ha_ndbcluster::print_result()
    
    Change-Id: Id09432b6e46dc5be095dbbba7b979fbf85343eef

commit 227bac4e752cdbefdbf4dc7854ff7e787e828b9d
Author: Tiago Jorge <tiago.jorge@oracle.com>
Date:   Fri Jul 7 16:45:13 2017 +0100

    WL#11298 - MySQL GCS: Support name resolution in whitelist in MySQL 5.7
    
    EXECUTIVE SUMMARY
    ======================
    This worklog implements support for hostnames in the
    GCS/XCom connection whitelisting feature. Therefore,
    users will be able to configure whitelisting not only
    with IPs but also with hostmames
    
    DESCRIPTION
    ======================
    
    In Cloud Environments, the following scenarios are quite common:
    - Machines popping on and off of a group;
    - IP Address are obtained from a pool that is dedicated to some machines;
    
    In this case, it is quite hard to maintain a proper whitelist, since values are in
    constant mutation.
    
    For that, it was requested that, since we already support names in peer addresses
    and in local addresses, one should also support names in the whitelist parameters,
    e.g: www.randomname.com/16, as an example.
    
    User Story:
    - As a DBA, i want to be able to configure whitelist parameter using hostnames
    instead of IP Addresses so that I am able to allow connections from outside
    hosts that do not have a fixed address
    
    - As a DBA, i want to be able to configure whitelist parameter using a mix of
    hostnames and IP Addresses with netmasks I am able to allow connections from
    outside
    hosts that do not have a fixed address and still allow fixed IPs to connect to
    the group

commit 7355234fd1fe46d4963fa2a13507cd20e09a80e6
Author: Magnus Blåudd <magnus.blaudd@oracle.com>
Date:   Fri Nov 17 15:56:05 2017 +0100

    Bug#27137135 CHOOSING DYNAMIC COLUMN FORMAT
    
     - enum value was silently converted to bool
     - fix by explicitly checking which value should set "dynamic" to true
     - also remove initial assignment of "dynamic", always changed by
       subsequent code
    
    Change-Id: I45859ed19919a2ef8f33153c06dfdf39f90655c4

commit 86ebc64288112ebaabde657cce15766f9c34de51
Author: Norvald H. Ryeng <norvald.ryeng@oracle.com>
Date:   Fri Nov 17 13:08:32 2017 +0100

    WL#11096: [17/17] Reject undefined SRIDs
    
    Raise ER_SRS_NOT_FOUND in ST_DIMENSION, ST_ENDPOINT, ST_EXTERIORRING,
    ST_GEOMETRYN, ST_GEOMETRYTYPE,  ST_INTERIORRINGN, ST_ISEMPTY,
    ST_NUMGEOMETRIES, ST_NUMINTERIORRING, ST_NUMINTERIORRINGS, ST_NUMPOINTS,
    ST_POINTN, ST_STARTPOINT, ST_SWAPXY, ST_X, and ST_Y.
    
    Add tests for ER_SRS_NOT_FOUND in spatial relation functions,
    ST_POINTFROMGEOHASH, and the two parameter version of ST_SRID (setting
    the SRID).
    
    Add tests for ER_WARN_SRS_NOT_FOUND_AXIS_ORDER in ST_ASBINARY,
    ST_ASTEXT, ST_ASWKB, and ST_ASWKT.
    
    Change-Id: I64c5cfe0588ef45dcf40122414e5ef5a1d84849a

commit c31d002d7cc4a6386925de078acbf2491fcb6943
Author: Norvald H. Ryeng <norvald.ryeng@oracle.com>
Date:   Fri Nov 17 13:08:31 2017 +0100

    WL#11096: [16/17] Reject unsupported SRSs in ST_VALIDATE
    
    Raise ER_NOT_IMPLEMENTED_FOR_GEOGRAPHIC_SRS and ER_SRS_NOT FOUND in
    ST_VALIDATE.
    
    Change-Id: I9007e35c5606e596d5b2d35bb03db418d2b30c9d

commit bc110bbfe4858908cee3ad622b14e0ffed623d94
Author: Norvald H. Ryeng <norvald.ryeng@oracle.com>
Date:   Fri Nov 17 13:08:29 2017 +0100

    WL#11096: [15/17] Reject unsupported SRSs in ST_SIMPLIFY
    
    Raise ER_NOT_IMPLEMENTED_FOR_GEOGRAPHIC_SRS and ER_SRS_NOT FOUND in
    ST_SIMPLIFY.
    
    Change-Id: I98606869ddaa0180eb491ff44bddfe06e9c33243

commit 8dfbbedc56fca56861bfc02692960b3438b5d4de
Author: Norvald H. Ryeng <norvald.ryeng@oracle.com>
Date:   Fri Nov 17 13:08:27 2017 +0100

    WL#11096: [14/17] Reject unsupported SRSs in ST_MAKEENVELOPE
    
    Raise ER_NOT_IMPLEMENTED_FOR_GEOGRAPHIC_SRS and ER_SRS_NOT FOUND in
    ST_MAKEENVELOPE.
    
    Change-Id: Iee34b06f38628bee8ceb15d1962a9dcc70757f57

commit 4339d2bb92de85f0f2e9966efab0f7c1ef819152
Author: Norvald H. Ryeng <norvald.ryeng@oracle.com>
Date:   Fri Nov 17 13:08:26 2017 +0100

    WL#11096: [13/17] Reject unsupported SRSs in ST_LENGTH
    
    Raise ER_NOT_IMPLEMENTED_FOR_GEOGRAPHIC_SRS and ER_SRS_NOT FOUND in
    ST_LENGTH.
    
    Change-Id: I8672b60dc4ae811161637ebb145a0955d826848a

commit dad85150f580c820fe036108edcb5873755064aa
Author: Norvald H. Ryeng <norvald.ryeng@oracle.com>
Date:   Fri Nov 17 13:08:24 2017 +0100

    WL#11096: [12/17] Reject unsupported SRSs in ST_ISVALID
    
    Raise ER_NOT_IMPLEMENTED_FOR_GEOGRAPHIC_SRS and ER_SRS_NOT FOUND in
    ST_ISVALID.
    
    Change-Id: I95c35e54707e5f9e40b6ea56cd6b48003443cc7b

commit 7df8f2b9c398aec519e1d999ce96258bb1d1ca02
Author: Norvald H. Ryeng <norvald.ryeng@oracle.com>
Date:   Fri Nov 17 13:08:23 2017 +0100

    WL#11096: [11/17] Reject unsupported SRSs in ST_ISSIMPLE
    
    Raise ER_NOT_IMPLEMENTED_FOR_GEOGRAPHIC_SRS and ER_SRS_NOT FOUND in
    ST_ISSIMPLE.
    
    Modify test gis.srs to use ST_DISTANCE to test SRS definitions since
    ST_ISSIMPLE now rejects geographic arguments.
    
    Change-Id: I920a3d70a861362b0a34121f29f9d7ac4f0414a8

commit 9d2fa60a1c3eb6ab1c4f87a51af83addccd772d8
Author: Norvald H. Ryeng <norvald.ryeng@oracle.com>
Date:   Fri Nov 17 13:08:21 2017 +0100

    WL#11096: [10/17] Reject unsupported SRSs in ST_ISCLOSED
    
    Raise ER_NOT_IMPLEMENTED_FOR_GEOGRAPHIC_SRS and ER_SRS_NOT FOUND in
    ST_ISCLOSED.
    
    Change-Id: I918499430b3f8da2b4b61c3507be50565b2503e8

commit b4ee6e9990b4c21f2a8b5531334a1b0e56ef222b
Author: Norvald H. Ryeng <norvald.ryeng@oracle.com>
Date:   Fri Nov 17 13:08:19 2017 +0100

    WL#11096: [09/17] Reject unsupported SRSs in ST_GEOHASH(point, length)
    
    Raise ER_ONLY_IMPLEMENTED_FOR_SRID_0_AND_4326 and ER_SRS_NOT_FOUND in
    ST_GEOHASH.
    
    Change-Id: Ie6a3f00d06349552dc8eda8b02d82ecfd0c6ac5e

commit 4fb05763861854d4a3827b67e12b9c31fb269cf7
Author: Norvald H. Ryeng <norvald.ryeng@oracle.com>
Date:   Fri Nov 17 13:08:17 2017 +0100

    WL#11096: [08/17] Reject unsupported SRSs in ST_ENVELOPE
    
    Raise ER_NOT_IMPLEMENTED_FOR_GEOGRAPHIC_SRS and ER_SRS_NOT FOUND in
    ST_ENVELOPE.
    
    Change-Id: Ida98af138b671fb318fd76ecf7c5a197e78aa793

commit 2d9bc9b54902fc869245965af12de24312dd55af
Author: Norvald H. Ryeng <norvald.ryeng@oracle.com>
Date:   Fri Nov 17 13:08:15 2017 +0100

    WL#11096: [07/17] Reject unsupported SRSs in ST_DISTANCE_SPHERE
    
    Raise ER_NOT_IMPLEMENTED_FOR_GEOGRAPHIC_SRS and ER_SRS_NOT FOUND in
    ST_DISTANCE_SPHERE.
    
    Change-Id: I212a3f8c14747de57b1795fa7fa2d7395f856ef4

commit 700a641757e875fc19a01a143eb2ea1f6f057d8f
Author: Norvald H. Ryeng <norvald.ryeng@oracle.com>
Date:   Fri Nov 17 13:08:13 2017 +0100

    WL#11096: [06/17] Reject unsupported SRSs in set operations
    
    Raise ER_NOT_IMPLEMENTED_FOR_GEOGRAPHIC_SRS and ER_SRS_NOT FOUND in set
    operations (ST_DIFFERENCE, ST_INTERSECTION, ST_SYMDIFFERENCE, and
    ST_UNION).
    
    Change-Id: I68adfad384f5fa0a3a5e451f5437f8e49e1998cd

commit 7f7a06a29ab2ed62e7e480c9ea156282f7004a1b
Author: Norvald H. Ryeng <norvald.ryeng@oracle.com>
Date:   Fri Nov 17 13:08:11 2017 +0100

    WL#11096: [05/17] Reject unsupported SRSs in ST_CONVEXHULL
    
    Raise ER_NOT_IMPLEMENTED_FOR_GEOGRAPHIC_SRS and ER_SRS_NOT FOUND in
    ST_CONVEXHULL.
    
    Change-Id: I9cda23c14b59de8eadf9f315a41f70d41eba8561

commit 6742abda4e58a3db31bc9c2a2ce06951c65da7f0
Author: Norvald H. Ryeng <norvald.ryeng@oracle.com>
Date:   Fri Nov 17 13:08:10 2017 +0100

    WL#11096: [04/17] Reject unsupported SRSs in ST_CENTROID
    
    Raise ER_NOT_IMPLEMENTED_FOR_GEOGRAPHIC_SRS and ER_SRS_NOT FOUND in
    ST_CENTROID.
    
    Change-Id: I083181e3885a9bb7603eb29ea97b8bbf6eaabf9b

commit 6605ceb803ddd70832fc62fa3b4e45d309306e03
Author: Norvald H. Ryeng <norvald.ryeng@oracle.com>
Date:   Fri Nov 17 13:08:08 2017 +0100

    WL#11096: [03/17] Reject unsupported SRSs in ST_BUFFER
    
    Raise ER_NOT_IMPLEMENTED_FOR_GEOGRAPHIC_SRS and ER_SRS_NOT FOUND in
    ST_BUFFER.
    
    Change-Id: Ice58afb5069aaa876a8539f31a67175f7662d18e

commit 2b702d4db634329704321417a80b2de3e09ac840
Author: Norvald H. Ryeng <norvald.ryeng@oracle.com>
Date:   Fri Nov 17 13:08:06 2017 +0100

    WL#11096: [02/17] Reject unsupported SRSs in ST_AREA
    
    Raise ER_NOT_IMPLEMENTED_FOR_GEOGRAPHIC_SRS and ER_SRS_NOT FOUND in
    ST_AREA.
    
    Change-Id: I12ca6dc0fba1a5095b7d077e8ac9fcf41f97d2c4

commit 0d02fd2752cdb81ec1a48710a5e6dd7b1f09acd3
Author: Norvald H. Ryeng <norvald.ryeng@oracle.com>
Date:   Fri Nov 17 13:08:01 2017 +0100

    WL#11096: [01/17] N-ary ER_NOT_IMPLEMENTED_FOR_GEOGRAPHIC_SRS
    
    Modify ER_NOT_IMPLEMENTED_FOR_GEOGRAPHIC_SRS error to handle errors for
    functions with an arbitrary number of parameters.
    
    Change-Id: Id3d299ef5dd0c68c2935bbed323fcca9fa166f33

commit 4e12797964eec094ace84dbab5c79646087f79c6
Author: Magnus Blåudd <magnus.blaudd@oracle.com>
Date:   Fri Nov 17 14:42:33 2017 +0100

    Bug#27134892 REMOVE MY_BOOL FROM NDBCLUSTER [noclose]
    
     - change TRUE -> true and FALSE -> false
    
    Change-Id: Iff0b9f7b0a110c6fb37e3c332cadd67c1e3fc147

commit 11a9054ebeeba6bf24735b27fd19bb3f1f380791
Author: Erik Froseth <erik.froseth@oracle.com>
Date:   Fri Nov 17 08:38:25 2017 +0100

    Bug#27015964 USELESS SPATIAL INDEX CAN BE CREATED WITHOUT WARNING
    
    Post-push fix: Fix various keyring tests that were failing
    
    Change-Id: I45e5c3ff6de51c16e87e76fedf9cd1c932601663

commit de8f6cce2a17ea484e46d50a724f5a182cdf5591
Merge: b46e333 9d5dac3
Author: Nuno Carvalho <nuno.carvalho@oracle.com>
Date:   Fri Nov 17 14:51:17 2017 +0100

    Merge branch 'mysql-5.7' into mysql-8.0

commit 9d5dac39992177d1439ef59a571f048e200003a7
Author: Nuno Carvalho <nuno.carvalho@oracle.com>
Date:   Fri Nov 17 13:30:11 2017 +0100

    BUG#27105803: NO CHECK FOR DUPLICATE @@SERVER_UUID WHEN JOINING GROUP
    
    Post-fix: clean temporary states when a server tries to join a
    group with a server_uuid already in use by another server.

commit b46e33314ae746e1ff745725e9b608a28437e09b
Merge: da1c629 53b4856
Author: Balasubramanian Kandasamy <balasubramanian.kandasamy@oracle.com>
Date:   Fri Nov 17 18:42:15 2017 +0530

    Merge branch 'mysql-5.7' into mysql-8.0

commit 53b48563b3f5e89e5398051db605cdab3e3d76c3
Author: Balasubramanian Kandasamy <balasubramanian.kandasamy@oracle.com>
Date:   Fri Nov 17 17:05:00 2017 +0530

     Post-fix Bug#27079017 - FC27 PKGS FAILURES WHEN MYSQL-CONNECTOR-ODBC INSTALLED ALREADY FROM NATIVE REPO
     - Updated the version for libs-compat packages

commit da1c629bf163fe870e5e40a05c3983bc0addcf17
Merge: fdb20d4 237185f
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Fri Nov 17 12:25:33 2017 +0100

    NULL Merge branch 'mysql-5.7' into mysql-8.0

commit fdb20d43a9d98f07c48688e729698f82dd916ba7
Author: Dyre Tjeldvoll <Dyre.Tjeldvoll@oracle.com>
Date:   Thu Nov 16 12:47:03 2017 +0100

    Bug#26043994: Post-push fix.
    Re-record result file for debug-only, statement-based replication only test running in
    daily valgrind and weekly.
    
    Change-Id: Ibe394ba92d180227dd343751aee99f1d03aff37b
    (cherry picked from commit cb502b882e45e6d307285e6c83f1f7312e46517c)

commit 99dc5d9a6292fe0f03332cf0c27f9ad6ea223cc7
Author: Dyre Tjeldvoll <Dyre.Tjeldvoll@oracle.com>
Date:   Wed Nov 15 10:24:37 2017 +0100

    Bug#26043994: CREATE DATABASE/DIRECTORY INCONSISTENCY
    
    Problem: Creating a directory inside datadir and using the name of the
    directory caused schema creation to be rejected with a misleading
    error message. Similarly, when the schema directory was manually
    removed, a misleading error message would result when trying to drop
    the schema.
    
    Root cause was that the existence of the schema was still determined by
    checking the file system, rather than the DD.
    
    Solution: Always determine the existence/absence of a schema based on
    what is in the DD. Create new error message for the situations when
    the content of the DD does not match what is in the file system.
    
    CREATE SCHEMA always fails if the schema directory is present, and
    even with IF NOT EXISTS no attempt is made at utilizing the the existing
    directory, and the user must remove it manually.
    
    DROP SCHEMA fails if the schema directory is missing, but DROP SCHEMA
    IF EXISTS succeeds with a warning.
    
    DROP SCHEMA always fails if the schema directory exists for a schema
    not found in the data dictionary.
    
    Change-Id: Ifbc09078efb07f13d6aadacd3093682c25c167f8
    (cherry picked from commit 4b539c1cfac0f1ac29990469f0aea9bf9bb15b14)

commit 237185fe773f3c22b77143c6d890b07ed761a1f5
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Tue Oct 10 16:58:52 2017 +0200

    Bug#26612465 BUILDING WITH CMAKE 3.9.0 OR NEWER GIVES DEPRECATION WARNINGS [noclose]
    
    Backport of 7ee64d795b6adc0493c1aae68858ccc1142b7a8e
    
    - Collect all "convenience" libraries in
      ${CMAKE_BINARY_DIR}/archive_output_directory
    
    - Extend the ADD_CONVENIENCE_LIBRARY macro with a POST_BUILD target
      which will save library location for later merge with other static libraries.
    
    - Rewrite all the merge targets, with separate rules for
      MSVC / APPLE / LINUX / UNIX
    
    Additional functionality:
    
    - Retry linking on windows if CMAKE_LINKER fails. This handles possible
      change of toolchain from 32bit to 64bit when running cmake, and then
      building with devenv.
    
    Additional for 5.7 only, because of embedded server:
    
    - Add STATIC plugins to known convenience libraries, they may be
      merged into the embedded server library.
    
    - Add ndbclient_static as convenience library, it is needed for embedded.

commit 77e2be62e915aa161f75b6a61a33db5a6f715763
Author: Magnus Blåudd <magnus.blaudd@oracle.com>
Date:   Fri Nov 17 09:39:39 2017 +0100

    WL#8500 Adapt MySQL Cluster to 8.0
    
     - Remove unused ha_ndbcluster::mrr_need_range_assoc, just use local
       variable in the only place where it's calculated and used

commit 18ca4b3628eab9e4032e16a5610aa1723dbfa51e
Author: Magnus Blåudd <magnus.blaudd@oracle.com>
Date:   Thu Nov 16 13:30:54 2017 +0100

    WL#9185 MySQL Cluster support for new DD
    
     - remove reduntant Auto_releaser's, the Ndb_dd_client has one builtin
    
    Change-Id: I8bd7698b6a2d22e1266acbe49668ae43027e467b

commit ffb441604f08e1509347d45db59ae14f3a840b41
Author: Magnus Blåudd <magnus.blaudd@oracle.com>
Date:   Thu Nov 16 09:22:56 2017 +0100

    WL#9185 MySQL Cluster support for new DD
    
     - change Ndb_dd_client to only acquire explicit MDL locks, remember
       acquired locks and released them by ticket. Earlier impl used
       transaction scoped locks and thus release all locks acquired for'
       transaction
    
    Change-Id: I2666128f817f888dbb2ab90f3a2acca15c7f3286

commit deef4e4a7f7e82ca1933c57ff8cd2f9571347e15
Author: Magnus Blåudd <magnus.blaudd@oracle.com>
Date:   Wed Nov 15 20:05:17 2017 +0100

    WL#8648 NDB_SHARE lifecycle improvements
    
     - remove hardcodings and allocate all bitmaps dynamically
       in  constructor
     - cleanup Ndb_event_data interface
     - add destroy function
     - improve comments
    
    Change-Id: Ibccade74353f9a59aa22d312499a43ee1e5fd5c5

commit 348828bf82faa97a1ac1b68c28dddb125866f160
Author: Magnus Blåudd <magnus.blaudd@oracle.com>
Date:   Wed Nov 15 09:26:42 2017 +0100

    WL#9185 MySQL Cluster support for new DD
    
     - remove setup_binlogging() loops and instead check if binlog
       need to be setup as part of synchronising the table.
    
    Change-Id: I24a410ca7472ec6702995aa43bf006dd3e4d9925

commit ddbd721863025574e1487784ef6a1a67bfd3c7f3
Author: Magnus Blåudd <magnus.blaudd@oracle.com>
Date:   Mon Nov 13 15:48:39 2017 +0100

    WL#8648 NDB_SHARE lifecycle improvements
    
     - add testcase which checks that event has
       been created (or not) in NDB for tables
       which should have event
    
    Change-Id: I6eb7620299289d51097b3078248fa577d552d99e

commit 6381ab66d9713e5cdaa623108d1e9d6b0726b6b7
Author: Magnus Blåudd <magnus.blaudd@oracle.com>
Date:   Wed Oct 18 09:59:10 2017 +0200

    WL#8648 NDB_SHARE lifecycle improvements
    
     - refactor NDB_SHARE, improve encapsulation, programatically enforce
       that references are acquired and released properly
     - separate the code working with NDB_SHARE from code that setup
       the NDB_SHARE for event subscriptions used by "binlog"
       and "schema dist"
    
    Change-Id: Ib2a3d3c1385d5c4837a209719afce8c0477e4b56

commit 91b4446302fcb3eee4319aff9ac54ed09128ac12
Merge: ef0f0bd 69cf8a8
Author: Aditya A <aditya.a@oracle.com>
Date:   Fri Nov 17 14:51:34 2017 +0530

    Merge branch 'mysql-5.7' into mysql-8.0

commit 69cf8a801db84b4d90c14561eb23b4cc822da9d3
Merge: 33d8f51 65524f6
Author: Aditya A <aditya.a@oracle.com>
Date:   Fri Nov 17 14:50:14 2017 +0530

    Merge branch 'mysql-5.6' into mysql-5.7

commit 65524f6869af770e928bad5f0da01091c416a5f4
Merge: 1c7ed31 e6233de
Author: Aditya A <aditya.a@oracle.com>
Date:   Fri Nov 17 14:48:21 2017 +0530

    Merge branch 'mysql-5.5' into mysql-5.6

commit e6233de7d648e967a252ba7fe1fd82b4f7598d21
Author: Aditya A <aditya.a@oracle.com>
Date:   Fri Nov 17 14:46:09 2017 +0530

    Bug #24296076   INNODB REPORTS WARNING WHILE INNODB_UNDO_LOG_TRUNCATE IS ENABLED
    
    PROBLEM
    -------
    
    This warning message is printed when trx_sys->rseg_history_len is greater than some
    arbitrary magic number (2000000). By seeing the reproducing scenario where we keep
    a read view open and do a lot of transactions on table which increases the hitsory
    length it is entirely possible that trx_sys->rseg_history_len can exceed 2000000.
    So this is not a bug due to corruption of history length.The warning message was
    just added to test some scenario and not removed.
    
    FIX
    ---
    
    1.Print this warning message only for debug versions.
    2.Modified the warning message with more detailed information.
    3.Don't crash even in debug versions.
    
    [#rb 17929 Reviewed by jimmy and satya]

commit ef0f0bd4c0d1e4aef297fd205941bbd028def27b
Author: Satya Bodapati <satya.bodapati@oracle.com>
Date:   Fri Nov 17 08:13:59 2017 +0100

    Followup testcase fix for Bug#27014308

commit 3db7e917f446977b4c698b4f762b86cb33937a88
Author: Abhishek Ranjan <abhishek.ar.ranjan@oracle.com>
Date:   Thu Nov 16 03:28:50 2017 +0530

    Bug#26727481 : SEGMENTATION FAULT DURING MYSQL_UPGRADE IN 8.0.3
    
    Problem:
    ---------
    A table using pre mysql-5.0 decimal type triggers a segmentation
    fault during in-place upgrade to mysql-8.0. The segmentation fault
    is caused during the attempt to access the TABLE object before
    opening the table in ' Field_decimal::reset().'.
    
    Analysis:
    ----------
    Pre 5.0 decimal type is not supported from mysql-5.0. Tables
    containing such un supported decimal type should be fixed by
    recreating the table using dump/restore method.
    
    CHECK TABLE command does not detect and give warnings for pre
    mysql-5.0 decimal types.
    
    Fix:
    -----
    In mysql-5.7, the fix adds warning for pre mysql-5.0 decimal types.
    User will get the following message when executing CHECK TABLE command
    
    "Table upgrade required for `db_name`.`table_name`.
    Please dump/reload table to  fix it!"
    
    mysql-8.0 will not allow in-place upgrade to 8.0 if pre mysql-5.0
    decimal type is found in the data directory.
    
    Note: mysql_upgrade will report the above error for tables with old
    decimal. mysql_upgrade will not fix old decimal types in mysql-5.7.
    'REPAIR TABLE' OR 'ALTER TABLE ... FORCE' will not fix the old decimal
    types in mysql-5.7. Tables containing such un supported decimal type
    should be fixed by recreating the table using dump/restore method.

commit df50ab5da391b452587a10fb3a39dd1edb856dd5
Merge: 8d53c28 33d8f51
Author: Abhishek Ranjan <abhishek.ar.ranjan@oracle.com>
Date:   Fri Nov 17 12:39:59 2017 +0530

    Null-merge from 5.7.

commit 33d8f519d3a899fd1d2690993442efb598946e80
Author: Abhishek Ranjan <abhishek.ar.ranjan@oracle.com>
Date:   Thu Nov 16 03:04:57 2017 +0530

    Bug#26727481 : SEGMENTATION FAULT DURING MYSQL_UPGRADE IN 8.0.3
    
    Problem:
    ---------
    A table using pre mysql-5.0 decimal type triggers a segmentation
    fault during in-place upgrade to mysql-8.0. The segmentation fault
    is caused during the attempt to access the TABLE object before
    opening the table in ' Field_decimal::reset().'.
    
    Analysis:
    ----------
    Pre 5.0 decimal type is not supported from mysql-5.0. Tables
    containing such un supported decimal type should be fixed by
    recreating the table using dump/restore method.
    
    CHECK TABLE command does not detect and give warnings for pre
    mysql-5.0 decimal types.
    
    Fix:
    -----
    In mysql-5.7, the fix adds warning for pre mysql-5.0 decimal types.
    User will get the following message when executing CHECK TABLE command
    
    "Table upgrade required for `db_name`.`table_name`.
    Please dump/reload table to  fix it!"
    
    mysql-8.0 will not allow in-place upgrade to 8.0 if pre mysql-5.0
    decimal type is found in the data directory.
    
    Note: mysql_upgrade will report the above error for tables with old
    decimal. mysql_upgrade will not fix old decimal types in mysql-5.7.
    'REPAIR TABLE' OR 'ALTER TABLE ... FORCE' will not fix the old decimal
    types in mysql-5.7. Tables containing such un supported decimal type
    should be fixed by recreating the table using dump/restore method.

commit 8d53c2889984601ca4139b84831f4cb960e54190
Author: Abhishek Ranjan <abhishek.ar.ranjan@oracle.com>
Date:   Fri Nov 17 11:47:23 2017 +0530

    WL#9703 : Defaults change table_open_cache=4000
    
    Change the default value for table_open_cache.
     Old default value: 2000
     New default value: 4000
    
    Fix the test cases to reflect the new default value.

commit 4e5ec2f412ebd03950b7e8d2ceca3470f4e0de83
Author: Praveenkumar Hulakund <praveenkumar.hulakund@oracle.com>
Date:   Fri Nov 17 06:05:26 2017 +0100

    Bug#24619634 - mtr's check of main.mysqldump fails.
    
    Check for mysqldump test failed because of a difference in the
    identifier names used in sys schema views before and after executing
    the test. As part of the mysqldump test, sys schema is dumped to
    a file then sys schema is dropped and recreated from the dump
    file. While recreating the sys schema for few views, identifier
    names used in view definition is stored differently. Hence check
    of main.mysqldump test failed.
    
    While preparing a view definition string, schema name is not
    prefixed to the identifiers(using table alias name) for operation
    as the SHOW CREATE VIEW(SQLCOM_SHOW_CREATE) and CREATE VIEW
    (SQLCOM_CREATE_VIEW). While recreating a view, metadata of a
    view(s) referencing the view being created/altered is updated.
    LEX::sql_command in the scope of referencing view(s) metadata
    update is set to SQLCOM_SHOW_FIELDS. Hence while preparing view
    definition of referencing view(s) the schema name is prefixed
    for identifier (using table alias name). So the difference in the
    view definition is observed.
    
    Currently mysql_register_view() is called with ALTER_VIEW mode
    to update the referencing view's metadata. This method prepares
    view TABLE_LIST object to create/alter a view. But while
    updating referencing view's metadata, TABLE_LIST object
    is prepared from the data-dictionary table. Hence re-preparing
    TABLE_LIST object for the view in mysql_register_view() is not
    necessary here. So to fix this issue, dd::update_view() is called
    directly instead of mysql_register_view() to update referencing
    view's metadata.
    
    DDL operations on  TABLE or VIEW or Stored function might change
    the referencing views "updatable" status. Hence even referencing
    view's updatable state is checked and updated.
    
    Change-Id: I8e03c7e5117a2c637ab14f761814ae8480114d08

commit e3c333ec05cbdbd31e44e2abd84e43e04630cec5
Merge: a876d96 59232a8
Author: Frazer Clement <frazer.clement@oracle.com>
Date:   Thu Nov 16 22:32:58 2017 +0000

    Merge ../mysql-5.7-cluster-7.6 into mysql-8.0-cluster-8.0

commit 59232a8a395cce05bd5e387652d36f430e7978c5
Merge: 7fd4725 d1038e7
Author: Frazer Clement <frazer.clement@oracle.com>
Date:   Thu Nov 16 22:27:22 2017 +0000

    Merge ../mysql-5.7-cluster-7.5 into mysql-5.7-cluster-7.6

commit d1038e73c6e59582cfdf605353ff19529b5271d7
Merge: 7470ff5 3be78e7
Author: Frazer Clement <frazer.clement@oracle.com>
Date:   Thu Nov 16 22:26:58 2017 +0000

    Merge ../mysql-5.6-cluster-7.4 into mysql-5.7-cluster-7.5

commit 3be78e71a001e93f38ecbe61d0e202a3ebab582b
Author: Frazer Clement <frazer.clement@oracle.com>
Date:   Thu Nov 16 22:23:59 2017 +0000

    Bug#25965370 NDB : LQH CAN EXCEED 4 CONCURRENTLY
      OPENED FILES PER PART DURING RESTARTS
    
    During restart, the LQH component in the data node loads redo
    log part metadata for each redo log part it manages, from one
    or more redo log files.
    
    Metadata is stored per megabyte, and each file has a limited
    metadata capacity, so the number of files which must be consulted
    depends on the size of the redo log part.
    
      (NoOfFragmentLogFiles * FragmentLogFileSize)
    
    Files are opened, read and closed sequentially, but the close
    of one file occurs concurrently with the open of the next.
    
    In cases where file close is slow, this can result in more
    than 4 open files per redo log part.
    
    As the files are opened with the OM_WRITE_BUFFER option set,
    this can result in more than 4 chunks of write buffer being
    allocated per part.
    
    As the write buffer pool is finite, if all redo log parts
    are in a similar state, it may be exhausted, causing node
    shutdown.
    
    The solution chosen is to avoid using the OM_WRITE_BUFFER
    option during metadata reload, so that transiently opening
    more than 4 redo log files per part does not cause node
    failure.
    
    A new ERROR_INSERT is added to slow file closure for metadata
    reload, allowing manual testing of the fix.  No automated
    testcase is added as there is a requirement for large redo
    logs.

commit 6e15df706898e9bb776caf546a1323f483243e36
Author: Tatiana Azundris Nuernberg <tatjana.nuernberg@oracle.com>
Date:   Thu Nov 16 21:37:40 2017 +0000

    After merge fix for 26286871: LOG_SINK_JSON SERVICE DOESN'T WORK WITH
    
    The above fix was backported and includes a new error message; this
    commit moves that message to the end of the error message file so
    it won't get inserted in the middle of the list and cause renumbering
    of messages in 8.x. Heed 26696147.

commit c85bcf9427070f490b63fd50952c0fd4309d2f38
Author: Tatiana Azundris Nuernberg <tatjana.nuernberg@oracle.com>
Date:   Thu Aug 31 06:52:48 2017 +0100

    Bug#26286871: LOG_SINK_JSON SERVICE DOESN'T WORK WITH RPM DEFAULT INSTALLATION
    
    Throw diagnostics when configured log-services exist, but cannot
    be opened/initialized (e.g. because they cannot open their files):
    
    - at run-time, send diagnostics to the client
    
    - at start-up, try to fall back to default services,
      print diagnostics there, then abort
    
    - at start-up, if default services fail, print diagnostics
      directly to the error stream, then abort

commit 7eb5e80e04a548a5f0908b580815fd20b7a15ffd
Author: Tatiana Azundris Nuernberg <tatjana.nuernberg@oracle.com>
Date:   Mon Oct 16 06:08:06 2017 +0100

    Bug#26188656: FAILURE IN MY_LOCALE_ERRMSGS::LOOKUP DUE TO INCORRECT OPTION
    
    LogErr() is called after the error messages have been released.
    get_server_errmsgs() actually tries to detect this, but is_loaded()
    gives wrong information, as it relies on errmsgs being nullptr.
    This is the case before load, but not after unload; an old issue
    revealed by new code. Patch fixes this by resetting the pointer on
    unload.

commit 2dd3c6afd857e37ba6e6e454aa8a646f9aeafc46
Author: Dmitry Lenev <dmitry.lenev@oracle.com>
Date:   Thu Nov 16 16:11:58 2017 +0300

    Fix for bug #26999526 "[ERROR] INNODB: ASSERTION FAILURE: ROW0MYSQL.CC:4430:0".
    
    TRUNCATE TABLE on InnoDB table under LOCK TABLES led to assertion failure
    if there was more than one table instance locked.
    
    Assertion has failed because new (in 8.0) handler::truncate() implementation
    in InnoDB assumed that there is only one open TABLE/handler instance at the
    point of handler::truncate() call. This was not the case in the above
    scenario.
    
    This fix adjusts TRUNCATE TABLE implementation to satisfy this assumption
    and close extra TABLE/handler instaces before calling handler::truncate().

commit 55573531d74868321402ef077a3efb96109c5800
Author: Pedro Figueiredo <pedro.figueiredo@oracle.com>
Date:   Thu Nov 16 15:20:18 2017 +0000

    Bug#22994725 RPL.RPL_SEMI_SYNC_FUTURE_LOGPOS FAILSWITH "SEMI-SYNC MASTER FAILED ON NET_FLUSH"
    
    Description
    -----------
    rpl.rpl_semi_sync_future_logpos 'stmt'   w3 [ fail ]  Found warnings/errors
    in server log file!
            Test ended at 2016-03-23 19:35:29
    line
    2016-03-23T18:35:14.607549Z 10 [ERROR] Semi-sync master failed on net_flush()
    before waiting for slave reply
    ^ Found warnings in /dev/shm/mtr-23122/var-normal/3/log/mysqld.1.err
    ok
    
    Analysis
    --------
    - It is expected for the semi-sync to fail with this error (see also https://bugs.mysql.com/bug.php?id=57764)
    
    Fix
    ---
    - Add message suppression in 'rpl.rpl_semi_sync_future_logpos'

commit a876d9601305f9b3f270269c6412b3776d9058f2
Author: Magnus Blåudd <magnus.blaudd@oracle.com>
Date:   Thu Nov 16 15:42:32 2017 +0100

    WL#8500 Adapt MySQL CLuster to 8.0
    
     - remove unused function

commit 26af6ebe53c51c72934c33b2556206d203808394
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Tue Nov 14 15:31:57 2017 +0100

    Bug#27116899 ADDRESSSANITIZER: STACK-USE-AFTER-SCOPE IN NDBCLUSTER.PARTITION_BASIC
    
    Building with clang, and -fsanitize=address -fsanitize-address-use-after-scope
    we get warnings about stack use after scope.
    
    We have source code like this:
        sets[num_sets].value= &auto_value;
    which means 'auto_value' must have longer lifetime than the 'sets' array.
    
    Change-Id: I56b7a2e568320aa963afad708de3eeeb9806d4e5
    Fix: move three auto variables up in scope, before
    NdbOperation::SetValueSpec sets[3];

commit 22b430bb54d97b5ca587eaeb3fffaa9fe40b8ed1
Author: Norvald H. Ryeng <norvald.ryeng@oracle.com>
Date:   Thu Nov 16 13:04:42 2017 +0100

    Bug #22688065 ALTER TABLE EXECUTES COUNT(*) TO SEE IF ANY ROWS EXIST
    
    Problem: ALTER TABLE does a call to handler::ha_records() in order to
    find out if a table is empty or if it has rows. This call may cause a
    table scan in InnoDB and is unnecessarily expensive.
    
    Fix: Instead of retrieving the number of rows, try to read one row from
    the table.
    
    Change-Id: Ibdce319e1e408e165919ad1cc83be408f963a7f0

commit b10f40446a7dfc44fa7d877121141d2e9e1901ae
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Tue Nov 14 17:10:46 2017 +0100

    Bug#27095089 ENABLE -FSANITIZE-ADDRESS-USE-AFTER-SCOPE BY DEFAULT FOR ASAN BUILDS
    
    Post-push fix:
    enable  -fsanitize-address-use-after-scope by default for ASAN builds.
    
    Change-Id: I28610a20784530b7b427ba2da109e53561c3c7a7

commit 38a9ef0772c91de6bea62265f90e2e28a529518d
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Tue Nov 14 15:31:57 2017 +0100

    Bug#27116899 ADDRESSSANITIZER: STACK-USE-AFTER-SCOPE IN NDBCLUSTER.PARTITION_BASIC
    
    Building with clang, and -fsanitize=address -fsanitize-address-use-after-scope
    we get warnings about stack use after scope.
    
    We have source code like this:
        sets[num_sets].value= &auto_value;
    which means 'auto_value' must have longer lifetime than the 'sets' array.
    
    Change-Id: I56b7a2e568320aa963afad708de3eeeb9806d4e5
    Fix: move three auto variables up in scope, before
    NdbOperation::SetValueSpec sets[3];

commit 3b6af85f9ed6954a681b92bc37a3de7012f591a0
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Tue Nov 14 17:05:24 2017 +0100

    Bug#27116985 REMOVE BZERO MACRO
    
    $clang --version
    Apple LLVM version 9.0.0 (clang-900.0.37)
    Target: x86_64-apple-darwin17.0.0
    
    *lots* of warnings like
    8.0-review/include/m_string.h:38:9: warning: 'bzero' macro redefined
    [-Wmacro-redefined]
            ^
    /usr/include/secure/_strings.h:52:9: note: previous definition is here
    
    Remove the bzero macro (and others)
    
    Change-Id: I4a14a53180c5059e1b45b5dee015c01bca855a0a

commit dc8d29070439b102b10c293dc82cc64ff0550704
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Wed Nov 15 10:32:10 2017 +0100

    Bug#27121713 CLANG-3.9/ASAN STACK-USE-AFTER-SCOPE IN GIS::PARSE_GEOMETRY/MY_ERROR
    
    Address 0x7f2a0a9b3d80 is located in stack of thread T32 at offset 128 in frame #0 0x3bc856f in my_error obj/mysys/../../mysqlcom-pro-8.0.4-rc/mysys/my_error.cc:211
    
    This frame has 2 object(s): [32, 56)
    'args' [96, 608)
    'ebuff' <== Memory access at offset 128 is inside this variable
    
    The fix is to move 'va_list args' into the scope where it is used.
    
    Change-Id: I8d390297138e916888874c98b0c483299c4d733f

commit 46470efef275ae17f9369c4c4c95a5372ecafd11
Author: Satya Bodapati <satya.bodapati@oracle.com>
Date:   Thu Nov 16 12:59:10 2017 +0100

    Followup fix to WL#11063
    
    Since this WL is pushed, enable the assert that was waiting for WL#11063

commit b2c33e48c35aae252e33114809e0aac292c61e6b
Author: Nuno Carvalho <nuno.carvalho@oracle.com>
Date:   Thu Nov 16 12:33:04 2017 +0100

    BUG#25553294: GR_MAJORITY_LOSS_RESTART IS UNSTABLE ON PB2
    
    This failure is not happening and we are not able to reproduce it,
    so removing the test from the experimental tests list.

commit c3945d166e2170d1d35e4f1aff35332e65335d74
Merge: 0c67d8a 3ebc58b
Author: Nuno Carvalho <nuno.carvalho@oracle.com>
Date:   Thu Nov 16 12:27:23 2017 +0100

    Merge branch 'mysql-5.7' into mysql-8.0

commit 3ebc58b0d6d0310dee4a2cc1a5563d114e04a30f
Author: Nuno Carvalho <nuno.carvalho@oracle.com>
Date:   Mon Nov 13 20:39:15 2017 +0100

    BUG#27105803: NO CHECK FOR DUPLICATE @@SERVER_UUID WHEN JOINING GROUP
    
    On Group Replication, like on asynchronous replication directly
    connected server, all servers that do belong a group must have
    unique server_uuid.
    
    The above condition was required but not enforced, this patch closes
    that gap. If a server tries to join a group with a server_uuid
    already in use by another server, the join does fail.

commit 0c67d8a26b8d748039487a1c7f282ac165aa4fe1
Merge: d5a5bca 1b62572
Author: Venkatesh Venugopal <venkatesh.venugopal@oracle.com>
Date:   Thu Nov 16 16:51:05 2017 +0530

    Null Merge branch 'mysql-5.7' into mysql-8.0

commit 1b625720b8a114e70bf0c893b38939ba441d5422
Merge: 96f672d 1c7ed31
Author: Venkatesh Venugopal <venkatesh.venugopal@oracle.com>
Date:   Thu Nov 16 16:49:15 2017 +0530

    Merge branch 'mysql-5.6' into mysql-5.7

commit 1c7ed3110cbb75cc016e93135919004422e32190
Author: Venkatesh Venugopal <venkatesh.venugopal@oracle.com>
Date:   Thu Nov 16 16:48:47 2017 +0530

    Bug#26952994 A DOUBLE-FREE ISSUE
    
    Problem:
    --------
    There is a typo error in the code which causes double free
    of a pointer.
    
    Fix:
    ----
    Fixed the typo error and handled the null pointer.

commit d5a5bcaf85c493bfde2b38cdca6ecbac08ecf9ee
Author: Elżbieta Babij <elzbieta.babij@oracle.com>
Date:   Thu Nov 16 12:09:28 2017 +0100

    Post-push fix for Bug #26518925 - ASSERTION FAILURE IN INNODB IN-MEMORY TMP TABLE CODE (WL8117)

commit 53225f200032377f82d1695fdc496a9345d34991
Author: Satya Bodapati <satya.bodapati@oracle.com>
Date:   Tue Nov 14 13:08:52 2017 +0530

    Problem:
    --------
    After upgrade, InnoDB crashes on accessing FTS AUX Index tables.
    This is because in 5.7, FTS AUX Index table created the field "word"
    as either nullable or 'non-nullable' depending on the FTS index first field
    nullability.
    
    Example:
    
    5.7 AUX Index created with "word" field as "NULLABLE"
    -----------------------------------------------------
    
    CREATE TABLE t1 (a VARCHAR(200), b TEXT, FULLTEXT (a,b))
    ENGINE = InnoDB charset utf8mb4;
    
    Since the fts index first field is 'a' and it is nullable, FTS AUX index
    tables are created with "word" field as nullable.
    
    5.7 AUX Index created with "word" field as "NON NULLABLE"
    -----------------------------------------------------
    
    create table t1 (a varchar(200) not null, fulltext (a)) engine = innodb;
    
    Since the fts index first field is 'a' and it is NON-nullable, FTS AUX index
    tables are created with "word" field as NON-nullable.
    
    In 8.0, the AUX Index tables are always 'NON-nullable'. So reading 5.7 FTS AUX
    tables which are nullable, lead to crash.
    
    Fix:
    ---
    Similar to 5.7, create AUX Index tables based on nullablity of first field of
    FTS index. This info is stored in column se_private_data.
    
    Reviewed-By: Jimmy Yang <jimmy.yang@oracle.com>
    RB: 17726

commit d4d162987ddbf7324a2b53e28f8997135e936426
Author: Erik Froseth <erik.froseth@oracle.com>
Date:   Thu Nov 16 11:32:26 2017 +0100

    Bug#27015964 USELESS SPATIAL INDEX CAN BE CREATED WITHOUT WARNING
    
    Post-push fix: Remove an error message that was added by accident
    when backporting the bugfix from trunk to 8.0
    
    Change-Id: I866fde2dd80c5ff1d67487ec6d42bd6dfba7402b

commit 4b1a6a0c36b683b23b41c6da7b0eb366f2753a9b
Merge: 7f17381 96f672d
Author: Venkatesh Venugopal <venkatesh.venugopal@oracle.com>
Date:   Thu Nov 16 16:17:05 2017 +0530

    Merge branch 'mysql-5.7' into mysql-8.0

commit 96f672d94e479591abca193e00515c468360765d
Author: Venkatesh Venugopal <venkatesh.venugopal@oracle.com>
Date:   Thu Nov 16 16:11:10 2017 +0530

    Bug#25695434: MEMORY LEAK IN MULTI-SOURCE REPLICATION WHEN
    BINLOG_ROWS_QUERY_LOG_EVENTS=1
    
    Problem:
    --------
    
    1. In multi source replication, Slave SQL thread leaks
    memory when replicating using two channels from
    master-master pair when binlog_rows_query_log_events is
    enabled.
    
    2. There is also a valgrind issue of invalid memory access
    assosciated with this bug. i.e, show processlist on slave
    accesses 'm_rows_query' even after it is deleted.
    
    Analysis:
    ---------
    
    For memory leak,
    Though it may seem that it requires three
    servers to reproduce the bug, but two servers are enough to
    reproduce it.
    
    1) When binlog_rows_query_log_event is enabled on master,
      Rows_query_log_event is created and written into binary
      log prior to Rows_log_event.
    
    2) On slave, when reading from the relay log and applying
      it, the event itself is stored in
      Relay_log_info::rows_query_ev.
    
    3) Usually Relay_log_info::rows_query_ev is deleted after
      execution of Rows_log_event by the function
      rows_event_stmt_cleanup() which is called in the end.
    
    4) But whenever the statement must be skipped (because
      slave has already applied the event from another channel)
      it does not delete the rows_query_ev instance and leads to
      memory leak.
    
    For valgrind issue,
    After deleting the rows_query_ev and before resetting the
    query, if someone gives 'SHOW PROCESSLIST', instead of
    printing NULL, the original query is printed.
    
    Fix:
    ----
    For memory leak,
    Replace 'DBUG_RETURN(0)' with a 'goto end' so that
    rows_event_stmt_cleanup() function is called in the end
    and the memory allocated for that instance is freed.
    
    For valgrind issue,
    The query is reset first and then the rows_query_ev is
    freed.

commit 7f173812906a084764b617b610b0ad26ad34afbb
Author: Bjorn Munch <bjorn.munch@oracle.com>
Date:   Thu Nov 16 11:14:42 2017 +0100

    Bug #27115882 RPM BUILD SHOULD NOT PASS ON WITH_SSL TO COMPATLIB BUILD OF 5.6
    
      For el7, use bundled for community and system for commercial
      For fedora, just use bundled as commercial is not supported

commit d9c4f8852dd9bff2e86da8831ac1ce096c1adf3c
Author: Magnus Blåudd <magnus.blaudd@oracle.com>
Date:   Thu Nov 16 10:47:51 2017 +0100

    Bug#27128846 NDB_MGM_API MEMORY LEAK AFTER NDB_MGM_CALL
    
     - delete memory returned by mgm_call()

commit 0d9cabe3716211321af0d2e38a31dd968c0208e0
Merge: 891a57b ba08721
Author: Anibal Pinto <anibal.pinto@oracle.com>
Date:   Thu Nov 16 09:20:41 2017 +0100

    Merge branch 'mysql-5.7' into mysql-8.0

commit ba08721a0142c9c5d7d7663e5b6c0b1fe323c233
Author: Anibal Pinto <anibal.pinto@oracle.com>
Date:   Thu Nov 16 09:15:53 2017 +0100

    BUG#27091520: ERROR MSGS ARE NOT SUPPRESSED IN GR_RECOVERY_PURGED_DONOR_FAILOVER
    
    Missing supression to possible messages on recovery failure.

commit 891a57b3446477069a3e61b965e7ca71206a52f6
Author: Dmitry Shulga <dmitry.shulga@oracle.com>
Date:   Thu Nov 16 15:01:24 2017 +0700

    Bug#27021672 -- FUNCS_1.IS_BASICS_MIXED, MAIN.OUTFILE, MAIN.PS_SYS_UPGRADE FAILING ON PB2
    
    The tests funcs_1.is_basics_mixedm main.outfile and main.ps_sys_upgrade
    fails if they are run with the option --ps-protocol after a patch for the bug#25185947
    (ISSUES WITH RENAMING ROOT USER) pushed into the trees mysql-8.0 and mysql-trunk.
    
    This patch fixes failure in the test main.outfile and removes referencing to
    the bug#27021672 as the reason for disabling the tests funcs_1.is_basics_mixed
    and main.ps_sys_upgrade. The patch depends on a fix of the bug#27094955
    (INCORRECT CHECKING FOR FILE PRIVILEGE IN CASE QUERY IS RUN AGAINST A VIEW)
    that was pushed recently.

commit 1f705f8fba108b3be9428657523abb094722f9d2
Author: Rahul Sisondia <rahul.sisondia@oracle.com>
Date:   Thu Nov 16 12:04:38 2017 +0530

    Fixed the typo error in the comments section
    that caused doxugen builds to fail.

commit 2517051d94e35e28d07bcc5fca42091b6189068e
Author: Rahul Sisondia <rahul.sisondia@oracle.com>
Date:   Thu Nov 16 09:59:13 2017 +0530

    Bug#26328274 SKIP_NAME_RESOLVE RESULTS IN REMOTE IP GETTING MATCHED WITH LOCALHOST
    Bug#26202411 - ASSIGNING A USER AS A ROLE WILL CHANGE THE USER REACH 
    
    Description
    -----------
    
    The root cause of the both issue is same.  The problem has been identified after the changes for WL#988 is pushed.
    In case the server is started with --skip-name-resolve option and client tries to connect the server through IP address then obviously host name is not resolved so it remains empty. When server tries to match the host from the connecting user to the ACL users one by one. The ACL user with localhost comes first in the ACL users list.  At this point ACL user with localhost matches with the empty host name when wild_case_compare() method is called. That must not happen.
    
    At the moment above method assumes that if the host name is empty then it always matches  irrespective of the value of the string to be matched with.
    
    Note - the second bug was reported with the docker image.  As pointed in the bug image Docker image also adds the --skip-name-resolve option. I could reproduce the problem with the latter option  on usual server.
    
    Fix:
    ----
    	- Added a check such that empty string matches only with the wild many (%) string to be matched with. In other cases of empty string, this method returns not matching (i.e. true) value.
    
    	- Current code assumed that host can be NULL or empty string but host can never be NULL. It can be empty string. Made necessary changes in the code and created Bug#27121559  to refactor the
    	set_host_ptr() /set_user_ptr() methods.
    
    	- Adjusted a few comments in the method within the periphery of 80 columns.
    
    Testing :
    ---------
    
    	- Verified the scenarios reported in both bugs manually before and after fix.
    
    	- Extended existing unit tests for the method wild_case_compare() in the file wild_case_compare-t.cc
    
    	- Pre push testing result
    
        ----------------------------------------
    Build#3728 - Changeset:
    + 967ca0a484ba95dd61b2a501f17a969c3e7371ee Bug#26328274
    
    MTR : There are some test failures
    
    ## The status of MTR run no.1 is:- ##
    COMMAND : perl mysql-test-run.pl --mem --parallel=36 --force --max-test-fail=0 --retry=1 --retry-failure=1 --experimental=./collections/default.experimental --comment=MATS    --xml-report=mtr-report0.xml
    OVERALL STATUS:  tests="7146" failures="1" disabled="34" skipped="1694" errors="0" time="25098.223" name="AllTests"
    FAILED TEST(S) ARE:
    rpl_gtid.rpl_gtid_split_statements_debug
    ## The status of MTR run no.2 is:- ##
    COMMAND : perl mysql-test-run.pl --mem --parallel=36 --force --max-test-fail=0 --retry=1 --retry-failure=1 --experimental=./collections/default.experimental --comment=RAPID_PLUGINS --suite=x,group_replication    --xml-report=mtr-report1.xml
    OVERALL STATUS:  tests="520" failures="0" disabled="1" skipped="182" errors="0" time="6598.817" name="AllTests"
     ----------------------------------------------------------------
    
     Note- rpl_gtid_split_statements_debug test is failing without this patch also.

commit c871321e03398ecfa25d9432c63ced1e7d32d123
Merge: 5eb8077 24bf26c
Author: Sreeharsha Ramanavarapu <sreeharsha.ramanavarapu@oracle.com>
Date:   Thu Nov 16 09:35:40 2017 +0530

    Merge branch 'mysql-5.7' into mysql-8.0

commit 24bf26c92f7ce07bfa990d3a7459e98c72b3a530
Merge: 4eb0ec6 c680548
Author: Sreeharsha Ramanavarapu <sreeharsha.ramanavarapu@oracle.com>
Date:   Thu Nov 16 09:34:09 2017 +0530

    Merge branch 'mysql-5.6' into mysql-5.7

commit c68054842be2a2d066a4781a976297dd7ae241f8
Merge: 71263cc 82abf07
Author: Sreeharsha Ramanavarapu <sreeharsha.ramanavarapu@oracle.com>
Date:   Thu Nov 16 09:32:38 2017 +0530

    Merge branch 'mysql-5.5' into mysql-5.6

commit 82abf07685517ea860c47bd4ec75ee5327c217dc
Author: Sreeharsha Ramanavarapu <sreeharsha.ramanavarapu@oracle.com>
Date:   Thu Nov 16 09:31:12 2017 +0530

    Bug #26881946: INCORRECT BEHAVIOR WITH "VALUES"
    
    Issue:
    ------
    VALUES doesn't have a type() function and is considered a
    Item_field.
    
    Solution for 5.7:
    -----------------
    Add a new type() function for Item_values_insert.
    
    On 8.0 and trunk it was fixed by Mithun's Bug#19601973.
    
    Solution for 5.6:
    -----------------
    Additionally Bug#17458914 is backported.
    
    This will address the problem of using VALUES() in
    INSERT ... ON DUPLICATE KEY UPDATE. Create a field object
    only if it is in the UPDATE clause, else return a NULL
    item.
    
    This will also address the problems mentioned in
    Bug#14789787 and Bug#16756402.
    
    Solution for 5.5:
    -----------------
    As mentioned above Bug#17458914 is backported.
    
    Additionally Bug#14786324 is also backported.
    
    When VALUES() is detected outside its meaningful place,
    it should be treated as NULL and is thus replaced with a
    Field_null object, with the same name as the original
    field.
    
    Fields with type NULL are generally not handled well inside
    the server (e.g Innodb will not accept them and it is
    impossible to create them in regular tables). So create a
    new const NULL item instead.

commit 5eb8077119bc2311eb09f291f1bd289e50178f2f
Author: Thayumanavar S <thayumanavar.x.sachithanantha@oracle.com>
Date:   Thu Nov 16 03:54:51 2017 +0100

    BUG#27041552 - M_THD->GET_TRANSACTION()->IS_EMPTY(TRANSACTION_CTX::STMT)
                   ETC. ASSERTION
    
    An event whose schedule happens with global autocommit OFF on expiry
    results in an assert. The assert happens because on expiry the event is
    dropped and as part of drop, the autocommit gurad constructor is called.
    This guard asserts if there is an open pending transaction.
    The drop of the event happens on expiry once the event schedule is executed.
    This drop should happen in it's own transaction so the fix is to commit any
    open transaction if any pending at time of drop.

commit 72d2ba846514f41368cb4010f5b71d7d0ebcb225
Author: Bin Su <bin.x.su@oracle.com>
Date:   Thu Nov 16 09:20:12 2017 +0800

    BUG#27075816 - ASSERTION FAILURE: OS0FILE.CC:5127:!EXISTS
    
    This is mainly due to table name was not parsed properly.
    Table name stored in memory is in space name charset,
    so there is a conversion from file name charset to space name
    charset. The parser used to parse 't2#tmp' into 't2?tmp',
    and this leads to the failure reported.
    
    Solution is to fix this parser to always get correct 't2#tmp'.
    So the trailing '#tmp' for non-partitioned table should be
    considered in dd_parse_tbl_name().
    
    Furthermore, two warnings/errors are suppressed for
    ddl_crash_alter_partition, which can be ignored.
    
    RB: 17907
    Reviewed-by: Allen Lai <allen.lai@oracle.com>

commit 1c97421c323b96baf5efbe0bcf180e8b4ea3499c
Author: Satya Bodapati <satya.bodapati@oracle.com>
Date:   Tue Nov 14 20:04:23 2017 +0530

    Bug#27014308 - UPGRADING TO 8.0.3 FAILS IF FOREIGN KEYS OF EXACTLY 64 CHARACTERS ARE PRESENT
    
    Problem:
    --------
    Tables with FK identifier of length == 64 characters are rejected during
    upgrade.
    
    In 5.7, FK identifier check happened at two places.
    
    1) If user gives identifier, it is checked by server
    2) If user doesn't give identifier, it is checked by InnoDB. InnoDB only
       allowed only 63 chars including the schema name and generated fk name
    
    During upgrade, InnoDB checks the FK identifier length and rejects the
    FKs with 64 chars or more.
    
    Fix:
    ----
    It is legal to create FK constraint of 64 character, so during upgrade,
    we tolerate FK identifier upto 64 characters (including 64th
    character)
    
    Reviewed-By: Jimmy Yang <jimmy.yang@oracle.com>
    RB: 17925

commit ff689e67d611ca128cc42c25da0ed725fad1fa44
Merge: 6d03181 7fd4725
Author: Tiago Alves <tiago.alves@oracle.com>
Date:   Wed Nov 15 16:09:01 2017 +0000

    Merge branch 'mysql-5.7-cluster-7.6' into mysql-8.0-cluster-8.0

commit 7fd47251e4d97c0a97a425541e7cbfc1427f7cea
Merge: 032d2fa 7470ff5
Author: Tiago Alves <tiago.alves@oracle.com>
Date:   Wed Nov 15 16:04:50 2017 +0000

    Merge branch 'mysql-5.7-cluster-7.5' into mysql-5.7-cluster-7.6

commit 7470ff59e85833dac7ced4e749f9f84012bc706c
Merge: 0017e3f 86d92c2
Author: Tiago Alves <tiago.alves@oracle.com>
Date:   Wed Nov 15 16:03:45 2017 +0000

    Merge branch 'mysql-5.6-cluster-7.4' into mysql-5.7-cluster-7.5

commit 86d92c2b5acb714251146f7698fb2fae1f98e214
Merge: 1a17670 4831438
Author: Tiago Alves <tiago.alves@oracle.com>
Date:   Wed Nov 15 15:59:18 2017 +0000

    Merge branch 'mysql-5.6-cluster-7.3' into mysql-5.6-cluster-7.4

commit 48314387302cb5b813c83b0eacc81c8040b43ed6
Merge: 3259228 f1cad74
Author: Tiago Alves <tiago.alves@oracle.com>
Date:   Wed Nov 15 15:57:12 2017 +0000

    Merge branch 'mysql-5.5-cluster-7.2' into mysql-5.6-cluster-7.3

commit f1cad74a8f417a9c0422d4dc47f0206ff620da13
Author: Tiago Alves <tiago.alves@oracle.com>
Date:   Wed Nov 15 15:29:12 2017 +0000

    WL#11408 Exclude mysqld data folder when gathering atrt test results

commit 6d03181ab0caebaef501fba0ed814fef32c3662c
Author: Magnus Blåudd <magnus.blaudd@oracle.com>
Date:   Wed Nov 15 15:12:03 2017 +0100

    Bug#27123374 NDB_SELECTALL MEMORY LEAK
    
     - the NDBT_ResultRow was nevere deleted
     - fix by using unique_ptr
     - remove some NdbScanFilter cruft inside "if(0)"

commit d7cafe58e37d7671ad6c0d6003baabe76c3db851
Author: Erik Froseth <erik.froseth@oracle.com>
Date:   Tue Oct 31 08:33:57 2017 +0100

    Bug#27015964 USELESS SPATIAL INDEX CAN BE CREATED WITHOUT WARNING
    
    Post-push fix: Fix some failing tests by adding the SRID column
    attribute to the column definition.
    
    Change-Id: I0daa92b7e4ae42eafcea72e5da2a8b236c865c40
    (cherry picked from commit 40a9f938fbaadc8117a805d3c7bba5e8d22a7cb9)

commit 8973d0717c4621ba56344698e74cfd7de4228845
Author: Erik Froseth <erik.froseth@oracle.com>
Date:   Mon Nov 13 09:06:25 2017 +0100

    Bug#27015964 USELESS SPATIAL INDEX CAN BE CREATED WITHOUT WARNING
    
    Post-push fix: Re-record a failing test
    
    Change-Id: I10cca30ba4280fbc010bef4440443c93ce392808
    (cherry picked from commit d200141fbd1e65fa3a81b571486131c30d5723bd)

commit 03ac5c5a0bfdb3f6d427ab944ca1d0b69ddd7c1b
Author: Erik Froseth <erik.froseth@oracle.com>
Date:   Wed Oct 25 08:57:59 2017 +0200

    Bug#27015964 USELESS SPATIAL INDEX CAN BE CREATED WITHOUT WARNING
    
    After the SRID column attribute was introduced (WL#8592), the query
    optimizer refuses to consider spatial indexes over columns without the SRID
    attribute. Thus, we should raise a warning when a user creates a spatial
    index over a SRID-less column. This patch adds this warning, and adjusts
    a good amount of MTR tests to include the SRID attribute in order to
    avoid having a lot of warnings in the test files.
    
    Change-Id: Idd1b5560328191f66078c6d861921df067fc37fb
    (cherry picked from commit 8c11442ccb3330abb53e97c48bd56b63f5a99e2d)

commit d57f48d98c6ed05bfbd71127e5e9a08e702bef61
Merge: 92effb4 032d2fa
Author: Mikael Ronström <mikael.ronstrom@oracle.com>
Date:   Wed Nov 15 13:37:12 2017 +0100

    Merge ../push76 into mysql-8.0-cluster-8.0

commit 032d2fa59d982d4761131a1607a8bc0a6196fe37
Author: Mikael Ronström <mikael.ronstrom@oracle.com>
Date:   Wed Nov 15 13:37:00 2017 +0100

    WL#8069: Post-push fix: Fix test case testSystemRestart -n SR4 T6

commit 11d18a7c72747168d56fb8da8c6bc21ec39e882c
Author: Thayumanavar S <thayumanavar.x.sachithanantha@oracle.com>
Date:   Wed Nov 15 12:41:06 2017 +0100

    BUG#27082862 - NOTE ABOUT THREAD PRIORITY STILL PRINTED EVEN
                   LOG_ERROR_VERBOSITY = 2
    
    Information note need to be printed only when log_verbosity value is
    3 and above. The patch fixes prints the information note about thread
    priority tuning unavailable during post initialization phase
    of resource groups. This ensures the filter component of logging
    framework is initialized so that log_error_verbosity is honored.

commit ba7af20e6a498ec10b20994799d496333d4eb106
Author: Mayank Prasad <mayank.prasad@oracle.com>
Date:   Wed Nov 15 15:57:00 2017 +0530

    Bug #26588537 : INNODB.INNODB_BUFFER_POOL_RESIZE_DEBUG FAILS WITH SIG 6
    
    Background:
    Buffer pool resize is done in a separate thread. It is done in parallel with
    other thread in which DMLs might be running on server. During resizing a buffer
    pool following sequence happens:
    - Disable AHI (if enabled)
    - Resize buffer pool
    - Enable AHI (if disabled earlier)
    
    Analysis:
    While disabling AHI, for all blocks in buffer pool, we try to reset index and
    n_pointers=0 before we clear the AHI hash table.
    
    BUT, during above processing, it is assumed that, all blocks in buffer pool
    would be in BUF_BLOCK_FILE_PAGE state. Which is not true i.e. it is possible
    that a block could be moved to a state BUF_BLOCK_REMOVE_HASH by some other
    thread, while disabling AHI is in progress.
    
    Fix:
    During resizing of buffer pool, expect BUF_BLOCK_REMOVE_HASH state as well (with
    BUF_BLOCK_FILE_PAGE) while disabling AHI.
    
    RB: 17864
    Reviewed by : satya.bodapati@oracle.com

commit ea0559bc418d4b584eda36353d751c900cf08fea
Author: Abhishek Ranjan <abhishek.ar.ranjan@oracle.com>
Date:   Wed Nov 15 16:22:42 2017 +0530

    WL#11063 : Update server version information in InnoDB tablespaces
    
    WL#5989 adds sever version and space version to InnoDB tablespaces
    at byte 8 and byte 12 on page zero for each tablespace. The number
    is added to tablespaces while creating the tablespaces. WL#5989 is
    implemented in mysql-8.0 and above.
    
    This worklog adds the same information to the tablespaces created in
    mysql-5.7 for importing tablespace and in-place upgrade.
    
    New handlerton interface
    
      typedef bool (*upgrade_space_version_t)(dd::Tablespace *tablespace)
    
    is added to be called by server to update version data in tablespaces.

commit b631b749d1d4442679025cd87b3fb4715741bfe7
Author: Martin Hansson <martin.hansson@oracle.com>
Date:   Tue Jun 20 17:12:09 2017 +0200

    WL#9637: SQL Function to return DIGEST of given SQL.

commit e9d062a84d1ac79168093b8c95ccef8e96dacc6a
Author: Marc Alff <marc.alff@oracle.com>
Date:   Tue Nov 14 11:54:31 2017 +0100

    BUG#24688694 SEVERAL UNSTABLE TESTS IN SUITE PERFSCHEMA
    
    Test script changes only.
    
    Fixed spurious failures in tests perfschema.idx_compare_*
    
    In particular, changed how the actual result
    is compared to the expected result.
    
    Before this change,
    procedure index_test() was given the rows_expected
    parameter, to assess if a result set is expected or not.
    
    In case of non deterministic results,
    for example with a WHERE clause like
      thread_id > @target_thread_id
    this does not work.
    
    A better approach is to compare
    - the result without indexes
    - the result with indexes
    for a given case,
    even if the given result set is unpredictable,
    as the point if to enforce that it does not change
    when using indexes.
    
    Fixed some tests results with incorrect .result files,
    where an error was actually recorded,
    further proof that the test logic is not robust
    (as these tests actually passed).
    
    Fixing the test logic to be more robust also exposed
    an existing bug,
    added to mysql-test/suite/perfschema/t/disabled.def

commit e786563adcc70fea4e4f96017c14525a94233536
Author: Anibal Pinto <anibal.pinto@oracle.com>
Date:   Wed Nov 15 10:39:56 2017 +0100

    BUG#26496874: GR_FORCE_PEER_ADDRESSES_OPTION IS FAILING SPORADICALLY IN PB2
    
    When executed a kill or restart of a server the applier module can be killed
    from two differences methods, by the STOP GROUP REPLICATION or on the killing of
    threads.
    
    It was missing one exception causing some non deterministic behavior.

commit c4b23030691c2fa20c351392b8db4dd2637d74ca
Author: Malika Agarwal <malika.agarwal@oracle.com>
Date:   Wed Nov 15 14:55:56 2017 +0530

    BUG#26765648: MTR TEST FOR TESTING UNDO LOG TRUNCATION WITH 2 UNDO
                  TABLESPACES
    
    Post push fix, enhanced the undo tablespace truncation comparison.

commit 5bf6fda09a0841a0894cf7688cede0fc8d002e61
Author: Bin Su <bin.x.su@oracle.com>
Date:   Wed Nov 15 15:47:12 2017 +0800

    Bug#26960345 - MISLEADING ERROR MESSAGE WHEN CREATING INNODB TABLE ON FULL DISK
    
    Follow-up patch for this bug. To rename the ER_DISK_FULL to
    ER_DISK_FULL_NOWAIT, in this way, it won't conflict with
    existing OBSOLETE_ER_DISK_FULL(and ER_DISK_FULL in 5.7)
    
    Reviewed-by: Satya Bodapati <satya.bodapati@oracle.com>

commit 92effb4f3b4ea3622ae1381e7e038c9d58a12735
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Wed Nov 1 12:27:58 2017 +0100

    Bug#26933472 NDB DOES NOT COMPILE WITH GCC 7
    
    GCC has new warnings that stop the compilation in maintainer mode
    
    Extend the list of warnings in storage/ndb/CMakeLists.txt
    
    Fix some warnings of the form:
    storage/ndb/test/ndbapi/testDict.cpp:5059:1: error:
    %d directive writing between 1 and 11 bytes into a region
    of size between 0 and 227 [-Werror=format-overflow=]
    
    thr_send_threads object should be cache line aligned (NDB_CL).
    But operator new is used which do not support alignment.
    
    This patch overallocate memory and then constructs the thr_send_threads
    object within at aligned address using placement new, in the same way as
    for g_thr_repository.
    
    This patch is for mysql-8.0
    
    Change-Id: I3f21d4714b992257691c2b07ef7415407b95f180
    (cherry picked from commit 32557141d01f31af712d960743b36260dda12a93)

commit af8b72915e4bb04465b1bfbfac88b8796551d49a
Author: John David Duncan <john.duncan@oracle.com>
Date:   Tue Nov 14 14:02:57 2017 -0800

    Bug#26930148 -- various build fixes for MySQL 8.0

commit 4bac0489971a47b93f4f4c502dfa6b1f0220552a
Author: John David Duncan <john.duncan@oracle.com>
Date:   Sun Oct 8 20:03:25 2017 -0700

    Bug#26930148 (noclose) Revision
    Enforce singleton pattern in Ndb_opts, but provide an Ndb_opts::release()
    method for use in ndbd.

commit 1e5efd9d76250797b2ee32dd64cd970f1933aeb1
Author: John David Duncan <john.duncan@oracle.com>
Date:   Thu Oct 5 18:14:21 2017 -0700

    Bug#26930148 (noclose) Patch 4 of 4
    Adapt programs in storage/ndb/test to use new Ndb_opts API.

commit 46f52b28496987ca689f6fa240f1479d01672c02
Author: John David Duncan <john.duncan@oracle.com>
Date:   Thu Oct 5 18:11:41 2017 -0700

    Bug#26930148 (noclose) Patch 3 of 4
    Adapt programs in storage/ndb/tools to use new Ndb_opts API.

commit a945df0b889dc10a05e3d27e40ccdaf65fa762aa
Author: John David Duncan <john.duncan@oracle.com>
Date:   Thu Oct 5 18:08:20 2017 -0700

    Bug#26930148 (noclose) Patch 2 of 4
    Adapt programs in storage/ndb/src to use new Ndb_opts:
    ndbd, ndb_mgm, ndb_mgmd.

commit 792e274c2debd2aace9fbb97ce8b7359fa45dae7
Author: John David Duncan <john.duncan@oracle.com>
Date:   Thu Oct 5 17:56:02 2017 -0700

    Bug#26930148 (noclose) Patch 1 of 4
    Remove the (generally misuesd) ndb_load_defaults() and ndb_free_defaults() APIs from ndb_opts.h.
    Replace them with a new class Ndb_opts.
    This also includes a change to the usage API, and allows us to generally simplify the boilerplate code in main() of all NDB command-line utility programs.

commit d751f56ae8b7d63490a8fa2e8b3fdda6c94fbc9d
Author: Narendra Chauhan <narendra.chauhan@oracle.com>
Date:   Tue Nov 14 23:47:28 2017 +0530

    Bug#27084922: ENABLE TESTCASES TO RUN DAILY ON PB2 WHICH ARE SKIPPING DUE TO NOT_LOG_BIN.INC
    
    Many testcases are skipped when binary logging is ON. These were disabled as
    part of WL#8794 (Qualify suites other than rpl and binlog with different
    binlog modes and add to weekly PushBuild run), and few other instances.
    
    With WL10470, the binary logging got enabled by default, and we changed
    collection files to run the testcases with binary logging OFF weekly once.
    
    Since, the actual issue of testcase failures in many cases was due to
    different binlog_formats, we now plan to enable those testcases to run fine
    with both log-bin and skip-log-bin. For code issues which are specific to
    log-bin, the testcases will be enabled to run on daily pb2 by having skip-log-bin
    in .opt files.
    
    Reviewed by: sven.sandberg@oracle.com
    Reviewed by: oystein.grovlen@oracle.com
    Reviewed by: srikanth.b.r@oracle.com
    
    RB: 17861

commit 5043f0a59701bdbeb800edc1dfa7a8d52f0fd41d
Author: Dmitry Shulga <dmitry.shulga@oracle.com>
Date:   Tue Nov 14 23:32:22 2017 +0700

    BUG#27094955 -- INCORRECT CHECKING FOR FILE PRIVILEGE IN CASE QUERY IS RUN AGAINST A VIEW
    
    In case a user runs the prepared statement SELECT INTO OUTFILE against a view and
    the view definition specifies a definer who doesn't have a privilege FILE then
    the statement fails.
    
    The reason for the bug is that the FILE privilege must be checked for a user
    who runs the query instead of a user who specified as a definer in the view
    definition.
    
    To fix the bug the method Sql_cmd_select::precheck was modified to add
    checking for required permissions for a user who runs a query before checking
    for table permissions.

commit fcb297eb357bfc1af089d4d049af759b52a7b7e8
Author: Tiago Vale <tiago.vale@oracle.com>
Date:   Fri Nov 10 12:14:56 2017 +0000

    Bug#26961059 M_CONSUMER LOGGING THREAD IS CREATING 1000'S OF ENTRIES IN EVENT_WAITS TABLES
    
    PROBLEM
    Gcs_async_buffer maintains a circular buffer that stores events on behalf of
    application threads. The buffer is consumed by a dedicated thread.
    Even when there are no events to consume, this thread is constantly waking up
    every 500ms.
    
    ANALYSIS
    The Gcs_async_buffer::m_consumer thread wakes up every 500ms because it's using
    timed_wait in Gcs_async_buffer::sleep_consumer(). In the current state, it's
    incorrect to change timed_wait to wait because it can lead to a deadlock when
    the consumer sees the buffer empty and the producer fills it before the
    consumer blocks.
    
    Example interleaving:
    Consumer thread                        Producer thread
    | gcs_logging_system.cc#L240-L243      |
    |                                      | gcs_logging_system.cc#L166-L186
    | gcs_logging_system.cc#L245-L248      |
    
    The core issue in the design that prevents replacing timed_wait with wait is
    that, in the consumer thread, checking if the buffer is empty and sleeping is
    not atomic.
    
    FIX
    Make the check-buffer-and-sleep action of the consumer thread atomic using the
    existing mutex (m_free_buffer_mutex).
    This renders the other mutex (m_wait_for_events_mutex) unnecessary.
    
    Reviewed-by: Alfranio Correia <alfranio.correia@oracle.com>
    Reviewed-by: Andre Negrao <andre.negrao@oracle.com>
    RB: 17905

commit dd56d51ffd53d1f10839ad528e1fc37af1a34d3e
Merge: 64261fd f800a5c
Author: Tiago Alves <tiago.alves@oracle.com>
Date:   Tue Nov 14 14:41:01 2017 +0000

    Merge branch 'mysql-5.7-cluster-7.6' into mysql-8.0-cluster-8.0

commit f800a5cd84478834d1af5c9557f67ac79c927e51
Merge: 676a6c1 0017e3f
Author: Tiago Alves <tiago.alves@oracle.com>
Date:   Tue Nov 14 14:32:16 2017 +0000

    Merge branch 'mysql-5.7-cluster-7.5' into mysql-5.7-cluster-7.6

commit 0017e3f9e560b319bd46e9144d7c0d1cd0c9989e
Merge: d2bec28 1a17670
Author: Tiago Alves <tiago.alves@oracle.com>
Date:   Tue Nov 14 14:30:00 2017 +0000

    Merge branch 'mysql-5.6-cluster-7.4' into mysql-5.7-cluster-7.5

commit 1a17670f242dcdf9943fd0d0f5c25fa5ff896215
Merge: 81b23e6 3259228
Author: Tiago Alves <tiago.alves@oracle.com>
Date:   Tue Nov 14 14:25:16 2017 +0000

    Merge branch 'mysql-5.6-cluster-7.3' into mysql-5.6-cluster-7.4

commit 3259228a9a57987bc6cc06d9a0ceeaa9c762ff9b
Merge: e6f3335 cb7eb06
Author: Tiago Alves <tiago.alves@oracle.com>
Date:   Tue Nov 14 14:24:19 2017 +0000

    Merge branch 'mysql-5.5-cluster-7.2' into mysql-5.6-cluster-7.3

commit cb7eb06035d3b211fe1628c117d9d57700c9fffd
Author: Tiago Alves <tiago.alves@oracle.com>
Date:   Mon Nov 13 19:32:33 2017 +0000

    WL#11179 Refactoring to remove exceptions usage and fix build break

commit 160ec2114223cf55ab7be690fa4fd246fce52c43
Author: Lars Tangvald <lars.tangvald@oracle.com>
Date:   Wed Nov 8 08:31:57 2017 +0100

    Bug#27068183	ERROR WHEN UPGRADING FROM NATIVE LIBMYSQLD-DEV PKG TO COMMUNITY SERVER PACKAGES
    
    The file libmysqlservices.a is in native libmysqld-dev and upstream libmysqlclient-dev, causing
    a file conflict when installing the latter.
    Add breaks/replaces for libmysqlclient-dev to libmysqld-dev to ensure the conflicting file is
    removed before installing upstream package.

commit 982bbcbbd1dfd44f6d477283c1458801a0506991
Author: Malika Agarwal <malika.agarwal@oracle.com>
Date:   Tue Nov 14 18:18:02 2017 +0530

    BUG#26765648: MTR TEST FOR TESTING UNDO LOG TRUNCATION WITH 2 UNDO
                  TABLESPACES
    
    Description:
    ------------
    The current innodb_undo.truncate test causes size increase of only one
    undo tablespace. The truncation of the undo tablespaces was being checked
    by comparing strings that stored the sizes of the tablespaces before and
    after server shutdown.
    
    Fix:
    ---
    Two transactions with sufficient DML are being used which causes size of
    both tablespaces to increase. The truncation of the
    tablespaces is being checked by using expressions that store and compare
    the sizes of tablespaces before and after server shutdown.
    
    Reviewed-by: Anitha Gopi <anitha.gopi@oracle.com>
    Reviewed-by: Satya Bodapati <satya.bodapati@oracle.com>
    Reviewed-by: Viswanatham Gudipati <viswanatham.gudipati@oracle.com>
    RB:17607

commit 10e380a12b6ee0a9b888ed40313dc48ceb86efc0
Author: Norvald H. Ryeng <norvald.ryeng@oracle.com>
Date:   Tue Nov 14 12:46:30 2017 +0100

    Bug #24947868 BOOST::GEOMETRY::BUFFER RETURNS INVALID MULTIPOLYGON
    Bug #25662426 BG::BUFFER(LS, MPY) THROWS
    BG::INCONSISTENT_TURNS_EXCEPTION
    Bug #26735293 GCC7/ASAN: STACK-USE-AFTER-SCOPE IN BG
    
    Problem: ST_Buffer would return an invalid result or raise an error for
    some inputs that should have resulted in a valid output geometry.
    
    ASAN also reported errors in Boost.Geometry code.
    
    Fix: Backport a set of bug fixes from Boost.
    
    Change-Id: I5b35332f1e7d86abb68fd91067e9c5386fdc9a76

commit 6e89c472c739927a27988fc7627bea2b2f3a8fd9
Author: Satya Bodapati <satya.bodapati@oracle.com>
Date:   Tue Nov 14 17:39:58 2017 +0530

    Followup fix for Bug#27014083
    
    Fixes innodb.import_export_4k failure with valgrind

commit 265e5200d55a599334fd319715a8dbfe24e42dad
Author: Jaideep Karande <jaideep.karande@oracle.com>
Date:   Tue Nov 14 12:56:14 2017 +0100

    BUG#25900013: GR_RECOVERY_DONOR_RETRY FAILS SPORADICALLY IN PB2
    
    Issue has not happened since 25th September.
    Recent issues are on stage which may be due to bad changes.
    
    Removing test from experimental tests list.

commit 64261fdb81723579e7e0c6489f06a65fa124c7d9
Merge: af1c186 676a6c1
Author: Ole John <ole.john.aske@oracle.com>
Date:   Tue Nov 14 12:47:41 2017 +0100

    Merge branch 'mysql-5.7-cluster-7.6' into mysql-8.0-cluster-8.0

commit 676a6c1c00cf49e6cf45f037a3f2e5f4259a5456
Merge: a7e3698 d2bec28
Author: Ole John <ole.john.aske@oracle.com>
Date:   Tue Nov 14 12:47:10 2017 +0100

    Merge branch 'mysql-5.7-cluster-7.5' into mysql-5.7-cluster-7.6

commit d2bec2831371b5e35f32782e793cf00b99de32bc
Merge: 6d84ab2 81b23e6
Author: Ole John <ole.john.aske@oracle.com>
Date:   Tue Nov 14 12:40:36 2017 +0100

    Merge branch 'mysql-5.6-cluster-7.4' into mysql-5.7-cluster-7.5

commit af1c186d48af4713010e25fbe9176b5c2b684a9e
Merge: e9193a0 a7e3698
Author: Mikael Ronström <mikael.ronstrom@oracle.com>
Date:   Tue Nov 14 12:19:33 2017 +0100

    Merge ../push76 into mysql-8.0-cluster-8.0

commit a7e3698b89e6cac6f6a9600d3d5c9a62879c1222
Author: Mikael Ronström <mikael.ronstrom@oracle.com>
Date:   Tue Nov 14 12:15:42 2017 +0100

    WL#8069: Post-push fix: Fix ndb_backup_rate testcase, ensure that deprecated config variables can still be set with same min and max values as before

commit 81b23e6ff9a2fb1214188588d3b47c5a881ff65f
Author: Ole John <ole.john.aske@oracle.com>
Date:   Tue Nov 14 11:30:35 2017 +0100

    Bug#27115551 	CLEANUP OF 'CLASS NDBWAITER' IMPLEMENTATION AND ITS USAGE
    
    Cleanup of bad coding in class NdbWaiter, no functional changes
    
    Main issue was that NdbImpl destructor assigned 'theWaiter = NULL' without
    theWaiter being declared as a pointer at all.
    
    That compiled by accident as the NdbWaiter c'tor took a trp_client*.
    This the NdbImp d'tor effectively constructed a new NdbWaiter object and
    assigned that to theWaiter.
    
    Patch also removes some unused or unneded methods.

commit e9193a0b4f5dec4674a7c736d3ce0c4b3a4c2828
Merge: 2b43482 a2e6cea
Author: Mikael Ronström <mikael.ronstrom@oracle.com>
Date:   Tue Nov 14 11:28:09 2017 +0100

    Merge ../push76 into mysql-8.0-cluster-8.0

commit a2e6ceac00c8bc9c39b136a92706966f1731f3c2
Author: Mikael Ronström <mikael.ronstrom@oracle.com>
Date:   Tue Nov 14 11:27:54 2017 +0100

    WL#8069: Post-push fix, fix compiler warning

commit d87c833f7e28a118c97cd0144a9073ebc0b74208
Author: Nisha Gopalakrishnan <nisha.gopalakrishnan@oracle.com>
Date:   Mon Nov 13 15:15:32 2017 +0530

    BUG#26743291: VIEW WITH EXPLICIT COLUMN NAME > 64 IS MARKED
                  INVALID WHEN UPGRADED TO 8.0
    
    Analysis:
    ========
    A view with explicit column name greater than 64 chars is
    marked as invalid upon upgrade from 5.7 to 8.0.
    
    In 5.7, a view can be created with explicit column name
    greater than 64 chars. In 8.0, creating views with explicit
    column name greater than 64 chars will result in an error.
    But during in-place upgrade to 8.0, the column name in
    DD::COLUMNS is restricted to 64 characters(maximum column
    name length). Hence an attempt to store a view column name
    which exceeds 64 chars in DD fails and the views are marked
    as invalid subsequently.
    
    Fix:
    ===
    In 8.0, we restrict explicit view columns names to 64 chars.
    Hence attempting to upgrade a view with column name exceeding
    64 chars will cause the upgrade process to exit with error
    being reported to error log.

commit 2b43482ee5ad8cc396fa1cf7faf6e4ff49d2c2a9
Merge: 960def7 670d3a2
Author: Ole John <ole.john.aske@oracle.com>
Date:   Tue Nov 14 10:47:39 2017 +0100

    Merge branch 'mysql-5.7-cluster-7.6' into mysql-8.0-cluster-8.0

commit 670d3a2d62413bf260eb23a2ff2d97cfb829fd2d
Merge: aab8bc4 6d84ab2
Author: Ole John <ole.john.aske@oracle.com>
Date:   Tue Nov 14 10:47:08 2017 +0100

    Merge branch 'mysql-5.7-cluster-7.5' into mysql-5.7-cluster-7.6

commit 6d84ab2b7abc667aa39cae923d91dcd81ae33513
Merge: 1651543 9ae35a0
Author: Ole John <ole.john.aske@oracle.com>
Date:   Tue Nov 14 10:46:46 2017 +0100

    Merge branch 'mysql-5.6-cluster-7.4' into mysql-5.7-cluster-7.5

commit 9ae35a096f087fdd0de4f266353cbe07895b3b34
Author: Ole John <ole.john.aske@oracle.com>
Date:   Tue Nov 14 10:45:22 2017 +0100

    Bug#27090300 TEMPLATIZE TRANSPORTERREGISTRY::PREPARESEND() AND ITS 'PACKER' UTILITY METHODS
    
    Patch rewrite the methods TransporterRegistry::prepareSend,
    Packer::getMessageLength() and Packer::pack() as templates.
    
    That saves us from having 3 almost identical variants of these 3 methods,
    just taking different 'section' arguments.
    
    The patch is a plain refactoring - no functional changes.

commit dbb98a0e068dab4137f1c3c00e29a74e75daebaf
Author: Anibal Pinto <anibal.pinto@oracle.com>
Date:   Tue Nov 14 10:35:21 2017 +0100

    BUG#26576078: GR_PARALLEL_LOCAL_AND_REMOTE_TRANSACTIONS.INC CAN'T HANDLE SQL SYNC ERRORS
    
    gr_parallel_local_and_remote_transactions.inc allow to test local transaction's
    behavior (conflict/success) against a transaction that is ordered first on a
    remote server and broadcast to local server.
    
    The local_server_connection1 will execute a --send blocking the use of it.
    
    A rpl_sync is execute on this process and if it fails will connect using a
    server_* connection name returning error due not being able to execute a query
    between a --send and a --reap.
    
    To solve this issue we change the gr_parallel_local_and_remote_transactions.inc
    to don't allow the use of server_* connection name on local_server_connection1.

commit 769a1c8f684dad087f09803030e542309bfa2b23
Merge: d087a51 4eb0ec6
Author: Shishir Jaiswal <shishir.j.jaiswal@oracle.com>
Date:   Tue Nov 14 12:28:08 2017 +0530

    Merge branch 'mysql-5.7' into mysql-8.0

commit 4eb0ec65555bd263045ce683e2a6209851787053
Author: Shishir Jaiswal <shishir.j.jaiswal@oracle.com>
Date:   Tue Nov 14 12:25:43 2017 +0530

    Bug#26199978 - WRONG ERROR MESSAGE FOR PARTIAL BACKUPS WITH
                   GTID_MODE = ON
    
    POST-PUSH FIX
    =============
    .test file is not supposed to run for embedded. Including
    the same in header section.

commit d087a512fa397475fed27e845bdf9822ed7030cd
Merge: 2188b8b 0289e79
Author: Venkatesh Duggirala <venkatesh.duggirala@oracle.com>
Date:   Tue Nov 14 11:02:40 2017 +0530

    [Null Merge] Merge branch 'mysql-5.7' into mysql-8.0

commit 0289e79bbda0b64ae7a06f3afb2b3c2532f5c8af
Author: Venkatesh Duggirala <venkatesh.duggirala@oracle.com>
Date:   Mon Nov 13 09:23:39 2017 +0530

    Bug#27103194	SEMISYNC TESTS ARE NOT RUNNING WHEN GTID IS ENABLED
    
    Remove not_gtid_enabled.inc from install_semisync_slave.inc
    to make semisync tests run when gtid is enabled in the run.

commit 960def78eb25e7d11f675dc5ebfcc2945af53e1b
Author: Tiago Alves <tiago.alves@oracle.com>
Date:   Mon Nov 13 19:59:53 2017 +0000

    WL#11179 Build break fix due to bad merge

commit 2188b8ba2af275aa163e4199e39251b0237caa58
Author: Praveenkumar Hulakund <praveenkumar.hulakund@oracle.com>
Date:   Mon Nov 13 17:00:45 2017 +0100

    WL#10942 - Logging services: force-print certain non-error messages to error log
    
    Follow-up patch to force-print non-error messages with the label
    "System".
    
    As part of this patch following changes are introduced,
    
       1 Non-error(force-print) messages are logged with
         label [System] instead of uppercased [Error],
         [Warning] or [Note].
    
       2 These messages are printed regardless of verbosity
         set using system var log_error_verbosity.
    
       3 These messages will be mapped to [Note] in
         Syslog and Windows Event log (as we do for [Note] messages
         today).
    
    Change-Id: I995bed573a8258a2ffe28dfca3908ad6134e45d2

commit 83d94444de631f09e04de9bab199bb9a094fc98e
Merge: 446b569 aab8bc4
Author: Tiago Alves <tiago.alves@oracle.com>
Date:   Mon Nov 13 15:33:47 2017 +0000

    Merge branch 'mysql-5.7-cluster-7.6' into mysql-8.0-cluster-8.0

commit 3c2ccb496bcd222582fe9331700e846304397400
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Mon Nov 13 13:11:09 2017 +0100

    Bug#27108794 CLANG/ASAN: STACK-USE-AFTER-SCOPE TABLE_UPGRADE_GUARD::~TABLE_UPGRADE_GUARD
    
    To repeat: cmake -DWITH_ASAN=1 -DWITH_ASAN_SCOPE=1
    ./mtr --mem --sanitize main.dd_upgrade_error
    
    A few dd tests fail with:
    ==26861==ERROR: AddressSanitizer: stack-use-after-scope on address 0x7000063bf5e8 at pc 0x00010d4dbe8b bp 0x7000063bda40 sp 0x7000063bda38
    READ of size 8 at 0x7000063bf5e8 thread T2
        #0 0x10d4dbe8a in Prealloced_array<st_plugin_int**, 16ul>::empty() const prealloced_array.h:186
        #1 0x10d406a8b in lex_end(LEX*) sql_lex.cc:560
        #2 0x10dae4b6d in dd::upgrade::Table_upgrade_guard::~Table_upgrade_guard() (mysqld:x86_64+0x100f87b6d)
        #3 0x10dadc557 in dd::upgrade::migrate_table_to_dd(THD*, std::__1::basic_string<char, std::__1::char_traits<char>, Stateless_allocator<char, dd::String_type_alloc, My_free_functor> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, Stateless_allocator<char, dd::String_type_alloc, My_free_functor> > const&, bool) (mysqld:x86_64+0x100f7f557)
        #4 0x10dad7e85 in dd::upgrade::migrate_plugin_table_to_dd(THD*) (mysqld:x86_64+0x100f7ae85)
        #5 0x10daec6a1 in dd::upgrade::do_pre_checks_and_initialize_dd(THD*) upgrade.cc:1216
        #6 0x10cd0a5c0 in bootstrap::handle_bootstrap(void*) bootstrap.cc:336
    
    Change-Id: I265ec6dd97ee8076aaf03763840c0cdf9e20325b
    Fix: increase lifetime of 'LEX lex;' which is used by 'table_guard'

commit aab8bc4ae6c52c643d1a9032ff3b3e5ad5b2ce7b
Merge: add2385 1651543
Author: Tiago Alves <tiago.alves@oracle.com>
Date:   Mon Nov 13 15:23:28 2017 +0000

    Merge branch 'mysql-5.7-cluster-7.5' into mysql-5.7-cluster-7.6

commit 1651543d253004908e2c0cd3f3f9e82ec2621686
Merge: c5eff03 f3500dd
Author: Tiago Alves <tiago.alves@oracle.com>
Date:   Mon Nov 13 15:22:38 2017 +0000

    Merge branch 'mysql-5.6-cluster-7.4' into mysql-5.7-cluster-7.5

commit f3500dd325e7f8c57d8761956da495f8229762b5
Merge: f1f4a49 e6f3335
Author: Tiago Alves <tiago.alves@oracle.com>
Date:   Mon Nov 13 15:18:24 2017 +0000

    Merge branch 'mysql-5.6-cluster-7.3' into mysql-5.6-cluster-7.4

commit bca022fa87570c028378c6138512ef4d97f29fd8
Author: Dmitry Lenev <dmitry.lenev@oracle.com>
Date:   Mon Nov 13 17:50:35 2017 +0300

    Follow-up to fix for bug#26647340 "LIFT LIMITATION ON ALTER TABLE RENAME + TABLES WITH FOREIGN KEYS + LOCK TABLES".
    
    Adjusted main.alter_table-big test to work correctly with --ps-protocol
    option.

commit e6f3335ccb3b0122668fd4566a058d1ae9a3f4a8
Merge: e70da4a bb3b928
Author: Tiago Alves <tiago.alves@oracle.com>
Date:   Mon Nov 13 15:14:35 2017 +0000

    Merge branch 'mysql-5.5-cluster-7.2' into mysql-5.6-cluster-7.3

commit 446b569d3ced8dae4e669801e625fa8d3eb4cd04
Merge: de54c02 add2385
Author: Mikael Ronström <mikael.ronstrom@oracle.com>
Date:   Mon Nov 13 16:14:06 2017 +0100

    Merge ../76_13nov into mysql-8.0-cluster-8.0

commit add2385f9b6885b100aacc34e260a18202c19727
Merge: 8470647 fefe045
Author: Mikael Ronström <mikael.ronstrom@oracle.com>
Date:   Mon Nov 13 16:09:14 2017 +0100

    Merge remote-tracking branch 'origin/mysql-5.7-cluster-7.6-wl8069' into mysql-5.7-cluster-7.6

commit 280b4031fdb799cedcfae8767823ad95276b21fd
Merge: bd38f77 e2ac68d
Author: Balasubramanian Kandasamy <balasubramanian.kandasamy@oracle.com>
Date:   Mon Nov 13 20:23:04 2017 +0530

    Merge branch 'mysql-5.7' into mysql-8.0

commit e2ac68d793bd482b3f22f8869cb7fd29f63c871b
Merge: 249ce42 71263cc
Author: Balasubramanian Kandasamy <balasubramanian.kandasamy@oracle.com>
Date:   Mon Nov 13 20:22:13 2017 +0530

    Merge branch 'mysql-5.6' into mysql-5.7

commit bb3b928692c20e5f23e41af4ae661bd728d4e1cb
Author: Tiago Alves <tiago.alves@oracle.com>
Date:   Thu Nov 9 23:15:13 2017 +0000

    WL#11179: Apply Google coding style using clang-format

commit 4270351f3cd13bb3cd9df49e2b3863c668ebcc54
Author: Tiago Alves <tiago.alves@oracle.com>
Date:   Wed Oct 18 15:33:51 2017 +0100

    WL#11179: Add atrt support to set processes' cpu affinity
    
    This feature introduces a new my.cnf configuration group called
    'cluster_deployment' and a new option called 'cpubind'.
    This configuration group is read only by atrt and group hierarquies are
    supported.
    The 'cpubind' option can receive a list of cpus (format "CPU0,CPU1,...") and
    will make the process locked to the specified cpus. If no option is set, the
    default behavior applies, and processes are free to run in any available cpu.
    Although this feature was developed mainly to lock mysqld processes to
    specific cpus, it works for locking cpu for tests or any ndb process.
    
    Examples of configuration are:
    
      # Applying cpubind to all processes in all clusters
      [cluster_deployment]
      cpubind = 0
    
      # Applying cpubind to all mysqld processes in '.2node' cluster
      [cluster_deployment.mysqld.2node]
      cpubind = 0
    
      # Applying cpubind to ndb_mgmd's processes in '.2node' cluster
      [cluster_deployment.ndb_mgmd.1.2node]
      cpubind = 0
    
      [cluster_deployment.ndb_mgmd.2.2node]
      cpubind = 3
    
    NOTE: This feature supports Linux only.

commit 32b755f96a637b3aa86ceee8ac051287c6b2424d
Author: Tiago Alves <tiago.alves@oracle.com>
Date:   Thu Nov 9 11:58:01 2017 +0000

    WL#11179: Add support in CPCD for setting cpu affinity
    
    Add support for optionally setting the cpu affinity set of a process via the
    'cpuset' argument when defining a process.
    
    'cpuset' accepts a list of CPUs in the format CPU0,CPU1,... and the process
    will be locked to those cpus. This feature is supported in Linux only and
    setting cpu affinity in other OS will result in a failure to start the process.
    If cpuset is not set, the default behavior of allowing the process to run
    freely on any cpu applies.
    No validation is done for invalid CPU values or format (e.g. -1, a number
    higher than the total available CPUs, or any formatting issue).
    
    Additionally fixed the datatype of the 'env' and 'args' command's argument
    to make coherent with the types specified in the API.

commit 18a40268b728dc912458f70a11cb1b30023ff6cd
Author: Tiago Alves <tiago.alves@oracle.com>
Date:   Thu Nov 9 12:30:27 2017 +0000

    WL#11179: Add protocol version handling when connecting to CPCD
    
    Support for different CPCD versions is added to be able to allow older clients
    connect to CPCD while enabling future functionalities to be added.
    
    Newer versions of CPCD client, will start the connection and set the client's
    protocol version. If that protocol is supported, CPCD will enable any feature
    supported in that version. If protocol is not supported (client newer than)
    CPDC, connection will fail.
    Older CPCD clients will not attempt to set protocol and hence CPCD will default
    to the oldest possible protocol, hence ensure full compatibility with those
    clients.
    
    Change contributed by Mauritz Sundell

commit fefe0452fc7ff852ef2d2661625c2f72692909a7
Author: Mikael Ronström <mikael.ronstrom@oracle.com>
Date:   Mon Nov 13 15:35:09 2017 +0100

    WL#8069: Add a number of test cases specifically testing WL#8069 functionality

commit 71263cc0e232c2d2e093d84c5bd57fa7ade882ab
Merge: c81db04 0498f9f
Author: Balasubramanian Kandasamy <balasubramanian.kandasamy@oracle.com>
Date:   Mon Nov 13 19:59:52 2017 +0530

    Merge branch 'mysql-5.5' into mysql-5.6

commit 0498f9f7badf8c094f23fd2ef128b54034d70c9f
Author: Balasubramanian Kandasamy <balasubramanian.kandasamy@oracle.com>
Date:   Mon Nov 13 19:45:57 2017 +0530

    	Bug#27072155 - DEFAULT PLUGIN_DIR SHOULD BE DIFFERENT FOR DEBUG BUILD
    	- Update the default plugin directory for debug builds

commit 01c22482cfe7a28543ac93b88f16f4ccd01ef12d
Author: Mikael Ronström <mikael.ronstrom@oracle.com>
Date:   Mon Nov 13 13:31:56 2017 +0100

    WL#8069: Disabled all special debug options in preparation for push

commit dd6a70c62443f121768a7b92b82e1febb47394d3
Author: Mikael Ronström <mikael.ronstrom@oracle.com>
Date:   Mon Nov 13 13:03:49 2017 +0100

    WL#8069
    Made BackupDataBufferSize, BackupWriteSize, BackupMaxWriteSize hardcoded
    Ensured EnablePartialLcp = false uses only 1 LCP file for highest level of
    compatibility with old behaviour

commit d521a50ef8cfef3bc2b1230cc52d5dfbde98386c
Author: Mikael Ronström <mikael.ronstrom@oracle.com>
Date:   Fri Nov 10 06:28:16 2017 +0100

    WL#8069: And yet some more debugging of scans to find why the stop progressing

commit b23ea83e50abdd31cb3ac30f648612ce5d55b6dd
Author: Mikael Ronström <mikael.ronstrom@oracle.com>
Date:   Thu Nov 9 22:18:13 2017 +0100

    WL#8069: A bit more debugging options to find bugs

commit 93e3293b07fdafa90099bdfdb9b85db7a9dedc1b
Author: Mikael Ronström <mikael.ronstrom@oracle.com>
Date:   Tue Nov 7 07:59:24 2017 +0100

    WL#8069: Fixed SR4 test case

commit 5d6fb50eb6c78574791528e329080c591fcf7d7a
Author: Mikael Ronström <mikael.ronstrom@oracle.com>
Date:   Mon Nov 6 09:27:20 2017 +0100

    WL#8069: Removed T17 and T18 for now, added more index checks in LGMAN

commit acb24e11610920bd84a3f7de616a4881cf5ac5c4
Author: Mikael Ronström <mikael.ronstrom@oracle.com>
Date:   Sat Nov 4 10:52:27 2017 +0100

    WL#8069: Hugo framework cannot handle super large attributes, split large column in T18

commit 07530696745ff40fd5d90ef7418477a8a57778a7
Author: Mikael Ronström <mikael.ronstrom@oracle.com>
Date:   Sat Nov 4 10:24:59 2017 +0100

    WL#8069: Changed to send SYNC_PAGE_WAIT_REP as direct signal to avoid overhead of sending at A-level and sending at B-level from extra PGMAN worker

commit 2c605ef9fe30f386ec462ca3b26c1a0aeb759bff
Author: Mikael Ronström <mikael.ronstrom@oracle.com>
Date:   Sat Nov 4 00:00:26 2017 +0100

    WL#8069: SYNC_PAGE_CACHE_CONF was sent on A-level, so is necessary to send also SYNC_PAGE_WAIT_REP on A-level to avoid SYNC_PAGE_CACHE_CONF coming before the SYNC_PAGE_WAIT_REP signal

commit 6227a09cc20ae890efd7ac3c736bd222dc3eca4d
Author: Mikael Ronström <mikael.ronstrom@oracle.com>
Date:   Fri Nov 3 23:20:09 2017 +0100

    WL#8069: New large test table needed to use Longvarbinary since more than 255 bytes long

commit 56c0573940ac81d537858296cb1b7fde4a396d3f
Author: Mikael Ronström <mikael.ronstrom@oracle.com>
Date:   Fri Nov 3 20:40:59 2017 +0100

    WL#8069: Fixed such that also final SYNC_EXTENT_PAGES_REQ is protected from LCP watchdog, changed to different syntax for atrt-gather-result.sh that for some peculiar reason seem to work better

commit 767bd800d7a48aa818ff2181bb47ac64ad9134dc
Author: Mikael Ronström <mikael.ronstrom@oracle.com>
Date:   Fri Nov 3 13:29:25 2017 +0100

    WL#8069: Ensured that LCP watchdog now also watches over sync of disk data pages and extents and over all data files in close process

commit ac8c1fbafd7c46dac6422606a5d7cb0f496a28da
Author: Mikael Ronström <mikael.ronstrom@oracle.com>
Date:   Mon Oct 30 10:18:31 2017 +0100

    WL#8069
    START_NODE_LCP_REQ was sent while we were executing local LCP.
    This meant that we had two conflicting updaters of c_keep_gci_for_lcp
    and c_max_keep_gci_in_lcp. Previous fix to remove change of
    maxCompletedGci based on those values fixed one issue and got another.
    So simply abstaining from sending START_NODE_LCP_REQ unless we participate
    in the distributed LCP should solve the issue.

commit 5e7bfd20afe752b4e71afb7d2a57ee362c47791c
Author: Mikael Ronström <mikael.ronstrom@oracle.com>
Date:   Thu Oct 26 01:47:58 2017 +0200

    WL#8069
    More work on ndb_print_backup_file
    More paths coverage tested
    Various debug flags reset
    
    We relied on that the GCI received in START_NODE_LCP_REQ could
    be used as maxGciCompleted. This wasn't true since we could be
    in the final phase of a local LCP as part of the restart at this
    point in time. Given that this was merely an optimisation, the
    code to check this variable was simply removed to ensure that
    even if slightly more GCIs have to be executed during restarts,
    the restarts will be much safer.

commit 32bffd95d9820504b735ecf343a0e7c7614404ce
Author: Mikael Ronström <mikael.ronstrom@oracle.com>
Date:   Wed Oct 25 19:00:24 2017 +0200

    WL#8069
    1) Ensured that ndb_print_backup_file checks for entries already existing
       and prints a bit more in verbose level
    2) Ensure that LQHKEYCONF and LQHKEYREF to RESTORE block executes as
       EXECUTE_DIRECT to ensure that we can check error codes immediately
       and to speed up restore process.
    3) Fix a few spelling errors
    4) Fixed a bug in handle_lcp_drop_change_page where I had an ndbrequire
       on header size that compared with 20, this was thought to be in bytes,
       but in reality header size is in words, so changed to 5, also added
       room for not using a checksum word, so changed to 4.
    5) Added a bit more debug statements in RESTORE block
    6) Introduced a new method in restore execution called
       handle_return_execute_operation
       This method checks if INSERT or WRITE hit error code 630.
       This could happen due to that restore not only insert rows, it
       also insert keys in hash index. So when inserting a row one could
       have the key already inserted. This key is going to be removed
       later, but since we are executing in rowid order we can hit a
       temporary state where we have a key defined that is to be deleted
       later. The same happens in node recovery and is handled by
       nr_copy_delete_row.

commit 58a46b8652f45e57fbfb45338d2427dbabd0ccd9
Author: Mikael Ronström <mikael.ronstrom@oracle.com>
Date:   Tue Oct 24 02:40:17 2017 +0200

    WL#8069
    1) Fixed a bug where we updated after calling a function.
    However the function only returned after calling a lot
    of other functions. So the lists had to be updated before
    calling the function. This is due to scans using up to
    5 recursive calls in the stack.
    2) Added a few more debug statements
    3) Disabled a bit of the debug stuff

commit 074d0128865d0fd9ae43ff24fb74ce41139ed64a
Author: Mikael Ronström <mikael.ronstrom@oracle.com>
Date:   Mon Oct 23 23:08:00 2017 +0200

    WL#8069
    1) Added a number of ndbassert(false) to check for code coverage of
    complex parts of the partial LCP implementation.
    2) Implemented 5 new test cases on table T17 PLCP_1 through PLCP_5
    to ensure that those code paths were executed and correctly executed
    by executing a restart afterwards.
    3) Added a bit more debugging around bugs found by those test cases.

commit f39d1ff4c5cec79dace11e788b022d2e725b75eb
Author: Mikael Ronström <mikael.ronstrom@oracle.com>
Date:   Mon Oct 23 13:40:08 2017 +0200

    WL#8069 Temporary

commit 1d113b50a37e12c86512cc3f5c774a58a4784c45
Author: Mikael Ronström <mikael.ronstrom@oracle.com>
Date:   Fri Oct 20 23:18:42 2017 +0200

    WL#8069
     Solved a set of serious bugs around handle_lcp_dropped_change_page
     1) The variable all_part wasn't properly initialised.
     2) The check for is_rowid_in_remaining_lcp_set used a check to
        is_page_to_skip_lcp() to deduce that the row wasn't in remaining
        lcp set. While this is true, it won't be true any more when the
        page is being released.
     3) In the method handle_lcp_dropped_change_page we could theoretically
        (very hard to create a test case that does this) have a case where
        the LCP scan was somewhere in the middle of the page. We could
        potentially even have reset some LCP_SKIP bits on the page
        before arriving to this point. In this case we would issue DELETE BY
        ROWID when we should not since the row should be in the LCP.
    
        Also added more comments around this code.

commit 0343142d8916bca9898489428527a60556fffba7
Author: Mikael Ronström <mikael.ronstrom@oracle.com>
Date:   Fri Oct 20 23:03:10 2017 +0200

    WL#8069: Added some comments on TR_RowGCI

commit 96c121275f7b9addf8b02cf4f7bd20f7f31dc107
Author: Mikael Ronström <mikael.ronstrom@oracle.com>
Date:   Fri Oct 20 12:38:46 2017 +0200

    WL#8069: More debug work around handling of keep list when dropping pages in change part

commit b33c680cd739cbede91062e51e2be8f6e671e077
Author: Mikael Ronström <mikael.ronstrom@oracle.com>
Date:   Thu Oct 19 16:56:58 2017 +0200

    WL#8069: One more stepup of debugging deletes for LCPs

commit 8418dbe40c2fcf9e355d5bfb7238a618920262a5
Author: Mikael Ronström <mikael.ronstrom@oracle.com>
Date:   Thu Oct 19 14:43:16 2017 +0200

    WL#8069: More work on ndb_print_backup_file and on targetted debug stuff to find delete related LCP bug

commit 02ca220fa9d6cbd5b49991b49065a2c321a0e2c3
Author: Mikael Ronström <mikael.ronstrom@oracle.com>
Date:   Thu Oct 19 12:34:51 2017 +0200

    WL#8069
    Introduced a last seen in scans in DBLQH. Used this to track
    LCP scans, NR scans and Backup scans. If they stall for more
    than 10 seconds a printout in the node log will be done,
    indicating the time of the stall and what line it stalled on.
    
    Can later be used to crash nodes that are in this hang state
    for too long.

commit acc69cc88dca0e01d887aa091a7de1aad66e87b5
Author: Mikael Ronström <mikael.ronstrom@oracle.com>
Date:   Thu Oct 19 10:34:05 2017 +0200

    WL#8069:
    Added code to ndb_print_backup_file that can analyse a LCP with multiple files and see which rows that will
    be left after restoring and seeing what happens when executing the restore.
    
    Fixed some weird path that sends SCAN_FRAGREF from COPY_FRAGREQ when failing ACC_SCANREQ

commit aecc20f530734f6ffa267aead7f47311a31c8e08
Author: Mikael Ronström <mikael.ronstrom@oracle.com>
Date:   Wed Oct 18 14:56:23 2017 +0200

    WL#8069: More fixes to ndb_print_backup_file to improve writing of LCP data files

commit 4d7cb2b60967fb7018764f08ee60f2c788653c7a
Author: Mikael Ronström <mikael.ronstrom@oracle.com>
Date:   Wed Oct 18 14:32:38 2017 +0200

    WL#8069: Ensured that RowCount is printed in ndb_print_backup_file

commit a22ea650fb651c379dad009f7c0d36fcaa36d787
Author: Mikael Ronström <mikael.ronstrom@oracle.com>
Date:   Wed Oct 18 14:23:14 2017 +0200

    WL#8069: Turned ndbrequire's into progError for improved error reporting, added new debug variables

commit d2f1f4b7972d626d8b72688f4fa64c5030dd4a57
Author: Mikael Ronström <mikael.ronstrom@oracle.com>
Date:   Mon Oct 16 11:36:26 2017 +0200

    WL#8069: A bit more detail to last seen in Tup scan
    Set lcpId in START_LCP_CONF
    Added assert that master starts with noOfStartedChkpt and
    noOfQueuedChkpt at 0 when taking over as master

commit b87e9c898606d2d55b5ef939b5f63648ef3db0e9
Author: Mikael Ronström <mikael.ronstrom@oracle.com>
Date:   Mon Oct 16 09:11:31 2017 +0200

    WL#8069: Activate some debugging options again

commit 182cf07752e80cc7f192fd803ca83a45f0059926
Author: Mikael Ronström <mikael.ronstrom@oracle.com>
Date:   Mon Oct 16 08:43:01 2017 +0200

    WL#8069: Clear m_participatingLQH and m_participatingDIH when handling master takeover in early LCP phases to avoid crashing on next START_LCP_REQ after master takeover

commit f092c36da3aa9df8ccdca7ecbfa33b12dffe97bd
Author: Mauritz Sundell <mauritz.sundell@oracle.com>
Date:   Mon Oct 16 15:16:55 2017 +0200

    Bug#26968613 Move pseudo columns ROW_COUNT and COMMIT_COUNT to Dbtup.
    
    In Dbtup there is a working counter of committed rows.
    
    Also in some ndbinfo tables count of committed rows per fragment and
    committed operations per fragment was reported and are now taken from
    Dbtup instead of Dbacc.
    
    The one used in was updated for each operation committed for a row, and
    since the commit signals can arrive out of order transient counter values
    could be negative.
    
    For example if an transaction had several interleaved insert and delete
    on same row, the commit signals for delete operations could arrive first
    to Dbacc and commit signals for insert operations later.
    
    Reviewed by Mikael Ronstrom 2017-10-17.

commit ba4fc85e78f4ff579a0de53c2673b0b1f73d2422
Author: Mikael Ronström <mikael.ronstrom@oracle.com>
Date:   Mon Oct 16 07:59:54 2017 +0200

    WL#8069: Removed a number of debug things, added more on copy fragment phase

commit 630df9229ba31ec49419e80acc7742580dbed416
Author: Mikael Ronström <mikael.ronstrom@oracle.com>
Date:   Wed Oct 11 12:40:16 2017 +0200

    WL#8069: Added more debugging output for LCP watchdog

commit 6239d0c2f3e76885d6a096f3c3bd388ced2ef547
Author: Mikael Ronström <mikael.ronstrom@oracle.com>
Date:   Mon Oct 9 11:10:36 2017 +0200

    WL#8069 More debugging temporarily

commit 90be36ce192ff9f3eb5c76e6c494a25f69ada16a
Author: Mikael Ronström <mikael.ronstrom@oracle.com>
Date:   Mon Oct 9 10:42:32 2017 +0200

    WL#8069: Consistency check should be ignored when table is dropped, in this case the numbers are not consistent since 0 rows are returned or possibly it is even stopped in the middle of an LCP scan.

commit 23c4db972a4ebf1e5aa3f84d5a978de679ed840f
Author: Mikael Ronström <mikael.ronstrom@oracle.com>
Date:   Fri Oct 6 21:19:38 2017 +0200

    WL#8069: One more modification of consistency check condition for LCPs

commit be0f8d4956fa0a0ecd26a243390da286222e1713
Author: Mikael Ronström <mikael.ronstrom@oracle.com>
Date:   Fri Oct 6 14:14:23 2017 +0200

    WL#8069: Fixed the ndbrequire used to discover inconsistencies in row count early on when producing an LCP

commit b6c66411437333d821fe69e6ddbe9f1527bb05b4
Author: Mikael Ronström <mikael.ronstrom@oracle.com>
Date:   Fri Oct 6 12:43:54 2017 +0200

    WL#8069: One more step to ensuring that LCP_SKIP and LCP_DELETE buts are not transported from copy row to main row

commit 3f29c9320fa1581f2580c426779d5713917686ae
Author: Mikael Ronström <mikael.ronstrom@oracle.com>
Date:   Thu Oct 5 23:41:28 2017 +0200

    WL#8069: Removed some debugging, added more printout of header bits in other scenarios
    Changed variable name of th to tuple_header_ptr for increased readability to support in
    debugging the Scan loop.

commit 4378489e6f401c0d37a442ec2df3d2a6befa2ed7
Author: Mikael Ronström <mikael.ronstrom@oracle.com>
Date:   Thu Oct 5 20:26:42 2017 +0200

    WL#8069: Fix ndb_print_backup_file such that it prints data file generated in 7.6.4 and later correctly

commit b252a52800ccbc305bd7d3295547b0ec8d9bae7c
Author: Mikael Ronström <mikael.ronstrom@oracle.com>
Date:   Thu Oct 5 20:20:05 2017 +0200

    WL#8069: Dropped LCP_SKIP and LCP_DELETE bit when committing an update or insert, important that these bits are only reset by the LCP scanning code.

commit 9894bc9f6f3369d0016ceae686937850ea917bd3
Author: Mikael Ronström <mikael.ronstrom@oracle.com>
Date:   Wed Oct 4 14:36:38 2017 +0200

    WL#8069: Enabled DELETE debugging for LCP

commit 2d0779416aa34ba84365a90224e4b5b7a63267b3
Author: Mikael Ronström <mikael.ronstrom@oracle.com>
Date:   Wed Oct 4 14:26:34 2017 +0200

    WL#8069: Fix merge conflicts

commit 3ac259227c94d78f3b494de37c0f9e7a72aa22c2
Author: Mikael Ronström <mikael.ronstrom@oracle.com>
Date:   Mon Oct 2 16:48:03 2017 +0200

    WL#8069: Fixed scanReadRecords in hugoTransactions that started checking for 0 rows, this was previously used to indicate no checking, now added an extra force_check_flag to indicate that checks are to be made also when 0 rows are checked

commit 348e357698ff054748d13faed81b1dc1aeb527e4
Author: Mikael Ronström <mikael.ronstrom@oracle.com>
Date:   Mon Oct 2 16:09:03 2017 +0200

    BUG#26908347: Fix for cleared timer in time tracking in complex scan frag case

commit a70fd949258950823cf6f1a245e2d4ed421cf053
Author: Mikael Ronström <mikael.ronstrom@oracle.com>
Date:   Mon Oct 2 15:05:02 2017 +0200

    WL#8069: Set back to original default_ndbd.cnf

commit 9e6f2adfea5cefde78f50f699708cc042a15f5a7
Author: Mikael Ronström <mikael.ronstrom@oracle.com>
Date:   Mon Oct 2 14:56:22 2017 +0200

    WL#8069: Ensure that DELETE BY ROWID is marked with a proper GCI value in cases where it comes with a 0 that simply means that the value isn't known, set it as high as possible in this case which is equal to Maximum GCI completed for the fragment LCP.

commit 7c7294c9f4f4b189dae4d84727007b9d8ecfd5b4
Author: Mikael Ronström <mikael.ronstrom@oracle.com>
Date:   Mon Oct 2 14:36:42 2017 +0200

    Added checks that change pages don't have scanGCI == 0, scanGCI should always result in all rows being read since the old LCP have not yet been done

commit ff1a86beac76a911e5ed6ec1ce4c569a6087b0ca
Author: Mikael Ronström <mikael.ronstrom@oracle.com>
Date:   Wed Sep 27 09:36:13 2017 +0200

    WL#8069: Missed initialisation of m_rows_in_lcp to 0, gave crash when no LCP control file found

commit 943a102771e9051471c368f459c010e51cd5cf12
Author: Mikael Ronström <mikael.ronstrom@oracle.com>
Date:   Wed Sep 20 18:59:11 2017 +0200

    WL#8069: Avoid trying to delete non-existing rows when restoring a DELETE_BY_PAGEID

commit 4555edef8bd31fb5624da7af35444602a9db44ae
Author: Mikael Ronström <mikael.ronstrom@oracle.com>
Date:   Tue Sep 19 01:36:22 2017 +0200

    WL#8069: Fixed a bug in that LCP keep list reported DELETE_BY_ROWID also for INSERT/WRITEs, fixed up change_current_page_temp in backup to properly set and reset data file and change flag, ensured that the proper page id is sent into this function for INSERT/WRITEs in LCP keep lists

commit f3bc3a2bd06506ad2001b6ab0891f8ac15415805
Author: Mikael Ronström <mikael.ronstrom@oracle.com>
Date:   Mon Sep 18 12:03:46 2017 +0200

    WL#8069: Introduced RowCount in LCP control file to verify that restore and LCPs are in synch,
             added more details to SR4-based test cases

commit 27ea0bef0de9682d8b7eafef027d38376b41f1e7
Author: Mikael Ronström <mikael.ronstrom@oracle.com>
Date:   Thu Sep 7 14:30:14 2017 +0200

    WL#8069: Some more work on debugging, added new configuration parameter RecoveryWork and fixed the algorithm for calculating number of parts to include in LCP

commit 9f79dfd62238f8577ece3cd9737de31a3ea7b8ac
Author: Mikael Ronström <mikael.ronstrom@oracle.com>
Date:   Wed Sep 6 23:40:10 2017 +0200

    WL#8069
    Improved statistics reporting in debug mode for partial LCP part

commit ecf54682c3136a75c4603775c2296784922160ec
Author: Mikael Ronström <mikael.ronstrom@oracle.com>
Date:   Wed Sep 6 15:49:41 2017 +0200

    WL#8069: Fixed reporting of statistics in cluster log of number of records and bytes in LCP. Now counts the records and bytes when records are written into a file, also delete row and delete page records are counted in the total

commit f5062d6ec48d9330ac656d3023668b56445d7d7b
Author: Mikael Ronström <mikael.ronstrom@oracle.com>
Date:   Wed Sep 6 13:01:25 2017 +0200

    WL#8069: Deactivate debug printouts

commit 8ed0de9480ce27aa53135a775b085c4bb5e8980e
Author: Mikael Ronström <mikael.ronstrom@oracle.com>
Date:   Wed Sep 6 12:22:28 2017 +0200

    WL#8069: Added more test cases to discover potential inconsistency problems

commit e5706b3cae46599186c70fc03a865ff54d135979
Author: Mikael Ronström <mikael.ronstrom@oracle.com>
Date:   Wed Sep 6 11:04:10 2017 +0200

    WL#8069: Ensured that things will work also with more than 1329 parts in an LCP, made it possible to write either 4096 or 8192 bytes LCP control files

commit 8454cc1ffac5a3e41f0adf42195fecf235c3feb9
Author: Mikael Ronström <mikael.ronstrom@oracle.com>
Date:   Thu Jul 27 12:09:31 2017 +0200

    WL#8069: LCP watchdog fired due to long LCP that was closing LCP control files for idle LCP every time it checked, fixed by adding table and frag id for this state as well

commit 036258b899ce3764e42035895f9a7f4c1bbd7e96
Author: Mikael Ronström <mikael.ronstrom@oracle.com>
Date:   Thu Jul 27 11:34:04 2017 +0200

    WL#8069: Activated a few more debug flags around LCP_DELETE flag

commit 5f6f49f9e01cc5a76518d1d380f30f2fb3ba26e7
Author: Mikael Ronström <mikael.ronstrom@oracle.com>
Date:   Wed Jul 26 15:28:32 2017 +0200

    WL#8069: Fix problem when distributed sysfile is more recent than local sysfile

commit e0ca5528784938a2ae68269fcbf3bf3374fdc7d1
Author: Mikael Ronström <mikael.ronstrom@oracle.com>
Date:   Wed Jul 26 11:10:39 2017 +0200

    WL#8069: Removed erroneus ndbrequire, decreased debug level

commit 97c4a27b6c43bee29b3408cd0affa7892a1d70aa
Author: Mikael Ronström <mikael.ronstrom@oracle.com>
Date:   Tue Jul 25 14:55:19 2017 +0200

    WL#8069: DIH debug stuff

commit a26d2cb583d7821755a76bcf2c315c24731f6e53
Author: Mikael Ronström <mikael.ronstrom@oracle.com>
Date:   Mon Jul 24 12:45:15 2017 +0200

    WL#8069: Debug stuff to find DIH crash

commit e6c186b78f92e5e25c7f9e0fd8779c1cf9ec8dfc
Author: Mikael Ronström <mikael.ronstrom@oracle.com>
Date:   Fri Jul 14 18:15:14 2017 +0200

    WL#8069: Now got first complex test running also with multiple LCP files per fragment LCP

commit 3042dd991d49dac9ae5e8cb01e7e48a90b79fb0e
Author: Mikael Ronström <mikael.ronstrom@oracle.com>
Date:   Thu Jul 13 14:59:45 2017 +0200

    WL#8069: Finalised development to support running LCPs with multiple data files

commit 4ec5288c9967faf111d36e08a1631c4eb1ad5e93
Author: Mikael Ronström <mikael.ronstrom@oracle.com>
Date:   Mon Jul 10 16:43:06 2017 +0200

    WL#8069
    Standardised debug printouts in DbtupPageMap.cpp.
    Introduction of Partial LCP means that releaseFragPage can be called
    during restore process. This will leave page map with next reference
    having FREE_PAGE_BIT set instead of next containing simply RNIL.

commit 674d3a745e4e036e3c76d422139b062cd6894385
Author: Mikael Ronström <mikael.ronstrom@oracle.com>
Date:   Fri Jul 7 16:43:19 2017 +0200

    WL#8069: More work on debugging, fixed scanGCI in DbtupScan.cpp where local variable wasn't synchronized with stored variable

commit 5ac124cdd656f1be46506c0b932f54636db7fdb9
Author: Mikael Ronström <mikael.ronstrom@oracle.com>
Date:   Fri Jul 7 13:54:51 2017 +0200

    WL#8069: Needed to update GCI during restore, had to override table flag TR_ROwGCI since it is temporarily disabled during restore, this happens in the routing nr_update_gci that is called during node restart and restore

commit d4416616b1b29f498398e62b805498b91ebd11d6
Author: Mikael Ronström <mikael.ronstrom@oracle.com>
Date:   Thu Jul 6 23:13:55 2017 +0200

    WL#8069: Even more fixes of infrastructure around DELETE BY PAGEID and DELETE BY ROWID and WRITE

commit bfebb9a8040bf86152c53cb161c5e25ca59706f5
Author: Mikael Ronström <mikael.ronstrom@oracle.com>
Date:   Thu Jul 6 12:18:40 2017 +0200

    WL#8069
    Lots of improvements of debugging infrastructure.
    Found problem with recording DELETE BY PAGE ID
    We record pages as deleted in LCPs when page state is A,
    we had reversed the check to do it when state is D instead.
    We used an incorrect page number when discovering a page
    to DELETE BY PAGE ID, fixed in parameter to record_delete_by_pageid.

commit f01c53af317b7fe70085ee517d1d104032571092
Author: Mikael Ronström <mikael.ronstrom@oracle.com>
Date:   Wed Jul 5 15:00:52 2017 +0200

    WL#8069: More work to handle RESTORE with DELETE by page and row and WRITE operations

commit 44f07785d806cb7ca15b31b0e3d8fa989b0df789
Author: Mikael Ronström <mikael.ronstrom@oracle.com>
Date:   Tue Jul 4 20:46:21 2017 +0200

    WL#8069:
    Rewrote code to restore records to handle WRITE_TYPE by using DELETE
    followed by INSERT instead of using WRITE that would complicate TUP design too much.
    Added a number of ndbassert's to weird errors.

commit f05e3c7712f18b9dd1ff426660c1efaa4df75447
Author: Mikael Ronström <mikael.ronstrom@oracle.com>
Date:   Tue Jul 4 11:41:17 2017 +0200

    WL#8069
    Added new signal to DIH to set latest LCP id.
    The latest LCP id can be one to small in the master in SR
    even when the master uses the most recent GCI.
    Send this in CNTR_START_REQ signal.
    check_if_in_page_range fixes of check if ALL page or not
    Added temporary ndbassert at sending of COPY_FRAGREF
    Added report of latest LCP id in DIH_RESTARTCONF
    Added extra check for when to not use a LCP control file,
    it was possible to use a LCP file with too new completed
    GCI.
    Restore used wrong part id states, fixed.
    Fixed loop counter in SR4 test, added more printouts in test.

commit 6d8aa310b7598f7ceef7025d444041edffe9731e
Author: Mikael Ronström <mikael.ronstrom@oracle.com>
Date:   Mon Jul 3 10:16:52 2017 +0200

    WL#8069: No need to remove disk attributes for file not being first in fragment, fixed compiler warning

commit 1bc582c67389678f6d9d324f0116631f1740518a
Author: Mikael Ronström <mikael.ronstrom@oracle.com>
Date:   Wed Jun 28 12:52:34 2017 +0200

    WL#8069
    Fixed failed calculation of first file to delete when remaining_files > 0
    Fixed testNodeRestart to handle nodes without node group
    Fixed calculation of number of free backup file records and free pages in
    Backup block
    Removed some debug stuff no longer needed in Backup.cpp
    Added a few more comments about SYNC extents
    Made use of get_file_add in all places where it was possible
    Introduced similar function get_file_sub and made use of it in above bug fix
    Updated debug comment with bug fix
    Fix yet one more variant of erroneus check of max_gci_restorable
    Standardised debug comment to use (instance)DEBUG_TEXT

commit cd717f7374ffdb31a2f2ee8120a9b379cc3ac33e
Author: Mikael Ronström <mikael.ronstrom@oracle.com>
Date:   Wed Jun 28 02:20:04 2017 +0200

    WL#8069
    Fix a problem that we didn't move forward to next page after finding a page
    to delete by page id.
    Added a bit more debug statement around deletes in LCPs.
    Fix such that we properly initialised a number of variables related to
    current page index, current file index, current page position and
    releasing and seizing pages for restore process. Failure to handle this
    led to memory overruns.
    Fixed a division by zero bug when nodes without node group participated in
    test case testNodeRestart -n DeleteRestart.

commit 5f1ac116cf6c68d2803763759fa52865f9d565e1
Author: Mikael Ronström <mikael.ronstrom@oracle.com>
Date:   Tue Jun 27 17:48:49 2017 +0200

    WL#8069 and WL#10302: Fix problem in activeTakeOver part in WL#10302 handling, fix issue around initial node restart and local sysfile (WL#10302), fix various things around executing partial LCPs (WL#8069)

commit 7ae01aab296728ac1074b571df63e7ab550a72e5
Author: Mikael Ronström <mikael.ronstrom@oracle.com>
Date:   Tue Jun 20 17:06:24 2017 +0200

    WL#8069: Fixed ranges for which parts that the data files in an LCP cover when keeping old data files that are no longer fully used

commit 8ce405d7f813ebfd3d381776b46b2c6569a7be81
Author: Mikael Ronström <mikael.ronstrom@oracle.com>
Date:   Tue Jun 20 11:55:33 2017 +0200

    WL#8069: Activated debug flags for development

commit 59413c6255af76dc6c381f3d56c585e3024d3da0
Author: Mikael Ronström <mikael.ronstrom@oracle.com>
Date:   Fri Jun 9 14:33:55 2017 +0200

    WL#8069: First step in doing partial LCPs

commit 8fd81b74c11cbaa3973b7c8bd5f6b596f4cd294a
Author: Mikael Ronström <mikael.ronstrom@oracle.com>
Date:   Fri Jun 9 14:26:08 2017 +0200

    WL#10302
    Ensure that file system is always cleaned in initial node restart case
    Careful read and write of local sysfile in initial restart situations.
    First write in initial restart is also equal to first read.
    Place tablespace files by default under TS directory and logfile
    group files by default under LG directory. This ensures that tablespace
    and logfile group files are cleaned away also when using default
    configuration setting.
    Fix that all log parts are removed (previously only 4 were removed
    in clean of the file system.

commit bd38f775dc33180d6533d709448c214728e698b2
Merge: a1fd6ac 249ce42
Author: Shishir Jaiswal <shishir.j.jaiswal@oracle.com>
Date:   Mon Nov 13 17:11:16 2017 +0530

    Merge branch 'mysql-5.7' into mysql-8.0

commit 249ce42eb01212e99583b2b641a898483db862f2
Author: Shishir Jaiswal <shishir.j.jaiswal@oracle.com>
Date:   Mon Nov 13 17:08:13 2017 +0530

    Bug#26199978 - WRONG ERROR MESSAGE FOR PARTIAL BACKUPS WITH
                   GTID_MODE = ON
    
    POST-PUSH FIX
    =============
    There is a leak in mysqlpump (Bug#23102944) which can be
    seen after the tests were pushed in patch to this bug. This
    known issue will be worked upon later. Meanwhile to make
    the "LeakSanitizer" silent till this leak is fixed, we're
    moving the pushed tests from "main.mysqlpump_extended.test"
    to a new file "mysqlpump_partial_bkp.test" and making its
    entry in "mysql-test/collections/disabled-asan.list"
    (applicable only in 8.0 and trunk). We've also included
    "not_valgrind.inc" in the header of this new test file for
    the same reason.

commit f031f8fb6fe88482bbf20e79aa714e0e69c4aea5
Author: Tiago Alves <tiago.alves@oracle.com>
Date:   Thu Nov 9 12:10:05 2017 +0000

    WL#11179: Add support in Parser to ignore extra arguments.
    
    To be used for reply for CPCC show version.
    Change contributed by Mauritz Sundell.

commit be65b63bce55bb0e5aa9bea2a74e3a623a095bf1
Author: Tiago Alves <tiago.alves@oracle.com>
Date:   Mon Oct 2 14:15:57 2017 +0100

    BUG#27108314: Remove xterm hardcoded foreground color setting
    
    Prevent hardcoded setting to overwrite system defaults causing the screen to
    be blank in some systems.

commit a1fd6ac72007ef169684b8bcefc923b534725f9c
Author: Xing Zhang <xing.z.zhang@oracle.com>
Date:   Mon Nov 13 18:20:44 2017 +0800

    Bug #27041543: ASSERTION `MAX_LENGTH >= LENGTH' FAILED.
    
    In Item_func_set_user_var::resolve_type(), collation is changed but
    max_length is not accordingly. Fix by changing max_length if collation is
    changed.
    
    Change-Id: Iffe50a6b100a2bf5fe4bdd07651b3e11232db0de

commit 577260af0618913ff0e784386926c8f55d91132c
Merge: afa7108 1e330e1
Author: Anibal Pinto <anibal.pinto@oracle.com>
Date:   Mon Nov 13 09:58:07 2017 +0100

    Merge branch 'mysql-5.7' into mysql-8.0

commit 1e330e1514f4ab2c9211fa6d135845b123dd15a0
Author: Anibal Pinto <anibal.pinto@oracle.com>
Date:   Mon Nov 13 09:55:22 2017 +0100

    BUG#27091468: CONCURRENCY ISSUE IN GR_FORCE_MEMBER_EXPEL MAKES IT FAIL SPORADICALLY
    
    When there is an error in a server, it is moved to an error state and then
    set to read only mode.
    
    The test case expects that a transaction will reach the server after it
    has been moved to read only mode. However, it reaches the server before
    it is moved to read only mode sometimes thus generating unexpected messages
    in the error log and making the test fail.
    
    The test was change to confirm that super_read_only is set before execute
    transaction.

commit afa710801f89803a196cf87602746d5e78b28bb2
Author: Roy Lyseng <roy.lyseng@oracle.com>
Date:   Thu Nov 2 10:17:07 2017 +0100

    WL#11345: Increase default value of optimizer_trace_max_mem_size
    
    The value of this variable is increased from 16kB to 1MB.

commit de54c02c83975520f7e74873849551af61989ee8
Author: Sivert Sorumgard <sivert.sorumgaard@oracle.com>
Date:   Fri Nov 3 15:51:27 2017 +0100

    Bug#27066335 HA_CREATE_TABLE_FROM_ENGINE AND TABLE_DEF NULL
    
    Clone the acquired table definition to be able to submit
    a non-const dd::Table object to ha_create() when called from
    ha_create_table_from_engine().
    
    (cherry picked from commit aee6402af50693fa5bba056bdb4091ec8bd02adc)

commit d5c71b1a548efe2c469d974bd82b10e78f1aea72
Merge: 79df9c1 f829805
Author: Venkatesh Duggirala <venkatesh.duggirala@oracle.com>
Date:   Mon Nov 13 09:10:10 2017 +0530

    [Null Merge] Merge branch 'mysql-5.7' into mysql-8.0

commit f8298054d8aadde08231f1cba4aa2cfa089aa3cd
Author: Venkatesh Duggirala <venkatesh.duggirala@oracle.com>
Date:   Mon Nov 13 09:06:20 2017 +0530

    Bug#26748533	SEMISYNC MASTER CRASH AFTER RESET MASTER
    
    Post push:
    Disable test script on gtid_enabled server due to
    the bug #27041759 RESET MASTER WHILE A TRX IN BGC(AFTER FLUSH)
    LEAVING SERVER IN BAD GTID STATE

commit 79df9c1ef195b1590071271c3562e04ddcd54681
Author: Sreeharsha Ramanavarapu <sreeharsha.ramanavarapu@oracle.com>
Date:   Mon Nov 13 06:23:01 2017 +0530

    Bug #27041382: ASSERTION `!TABLE->IN_USE->IS_ERROR()'
                   FAILED.
    
    Issue:
    ------
    When a trigger contains incorrect syntax and the
    subsequent INSERT doesn't have any column-list specified,
    inserting a new row shouldn't be attempted. But this
    happens and it hits an assert.
    
    Solution:
    ---------
    check_for_broken_triggers() raises this problem but the
    return code is ignored by
    prepare_triggers_for_insert_stmt(), since this function
    only returns a void.
    
    Fix will be to move Table_trigger_dispatcher::mark_fields()
     (which eventually calls check_for_broken_triggers()) into
    the Sql_cmd_insert_base::prepare_inner() similar to the way
    it is done in UPDATE. This way, we won't be executing for a
    long time with an unhandled exception.

commit aee6402af50693fa5bba056bdb4091ec8bd02adc
Author: Sivert Sorumgard <sivert.sorumgaard@oracle.com>
Date:   Fri Nov 3 15:51:27 2017 +0100

    Bug#27066335 HA_CREATE_TABLE_FROM_ENGINE AND TABLE_DEF NULL
    
    Clone the acquired table definition to be able to submit
    a non-const dd::Table object to ha_create() when called from
    ha_create_table_from_engine().

commit aaaddd927c01a70ca719febe71ff79f4b94b4c5d
Merge: 2a9360a 8470647
Author: Mikael Ronström <mikael.ronstrom@oracle.com>
Date:   Fri Nov 10 19:41:55 2017 +0100

    Merge ../push_wl11158_76 into mysql-8.0-cluster-8.0

commit 84706472143ccda7995162b33b917572b9bb8f5f
Author: Mikael Ronström <mikael.ronstrom@oracle.com>
Date:   Fri Nov 10 19:35:46 2017 +0100

    WL#11158: Fix review comments

commit d704b59cf161f98ac5bf3d0f9b72b55284576217
Author: Mikael Ronström <mikael.ronstrom@oracle.com>
Date:   Thu Nov 2 11:27:41 2017 +0100

    WL#11158: Part 5:
    Add limit on batch_size_bytes as well, if row size is larger than 2kBytes we will decrease
    parallelism to avoid buffer overload problems.

commit 71b05bff372510b8cd95b551c267e72dbbb5de5b
Author: Mikael Ronström <mikael.ronstrom@oracle.com>
Date:   Thu Nov 2 11:26:34 2017 +0100

    WL#11158: Part 4:
    Different configuration parameters to set max batch size for
    Unique index builds,
    Foreign key builds and
    Table partitioning reorganisation.
    Still hard coded number (16) for index statistic scans.

commit be278e72bc73ba846b121ff86f97044851524ffe
Author: Mikael Ronström <mikael.ronstrom@oracle.com>
Date:   Thu Nov 2 11:23:14 2017 +0100

    WL#11158: Step 3:
    Modify TRIX to use the configured maximum schema object batch size for
    UI builds.
    Other SUB_SYNC_REQ requestors are left as-is for the time-being.
    TRIX is modified rather than DICT as :
     - Only UIs have an incoming parallelism parameter, the other
       request types do not...
     - Not clear that DICT is the correct place to determine the
       parallelism to use
    A full solution should decide on the above, potentially increasing
    parallelism for other build types based on config or other inputs.

commit 277efe8a9ec88f7d8e3c1a215534e29278b24fac
Author: Mikael Ronström <mikael.ronstrom@oracle.com>
Date:   Thu Nov 2 11:19:39 2017 +0100

    WL#11158 Part 2:
    A new config parameter is added to set the maximum batch size
    for scans involved in schema object builds.
    
    This allows some tuning of the resources devoted to schema object
    builds.
    
    DBUTIL is the block principally involved in allocating resource
    for these operations, it is modified to include this parameter.
    
    As this is now a changable parameter, the affected dimensions are
    parameterised to match.
    
    Output from printouts when enabled with default (64) :
    Inputs :
    MaxSchemaObjectBuildBatchSize : 64
    MaxPreparedOps : 6
    MaxNonSchemaBuildOps : 48
    NumConcurrentPrepares : 1
    SparePages : 5
    PagesPerPreparingOp : 5
    PagesPerTransaction : 0
    MAX_ATTRIBUTES_IN_TABLE : 512
    MAX_TUPLE_SIZE_IN_WORDS : 3500
    MAX_KEY_SIZE_IN_WORDS : 1023
    Outputs :
    MaxConcurrentOps : 112
    MaxConcurrentTrans : 112
    MaxAttributeMappings : 3072
    DataBuffWordsPerOp : 4523
    numDataBuffers : 46276
    numPages : 10

commit 4d48efcbf58f62379a645ba79d07b75f598efe0e
Author: Mikael Ronström <mikael.ronstrom@oracle.com>
Date:   Thu Nov 2 11:12:50 2017 +0100

    WL#11158
    A new parameter is added to GSN_SUB_SYNC_REQ, specifying the desired
    batch size for the implicit scan.
    Previously the batch size was hardcoded to 16 in SUMA.
    Currently this signal is only ever sent within a node from TRIX to SUMA,
    so no upgrade code is required.

commit 1be8f8a606f5b8dfd1adf2ef3e98f65ec5346189
Merge: 54fe8e8 bfeae1b
Author: Balasubramanian Kandasamy <balasubramanian.kandasamy@oracle.com>
Date:   Fri Nov 10 22:48:33 2017 +0530

    Merge branch 'mysql-5.7' into mysql-8.0

commit bfeae1b57db34cb4f6d879fbea704becbc886f96
Author: Balasubramanian Kandasamy <balasubramanian.kandasamy@oracle.com>
Date:   Fri Nov 10 22:38:36 2017 +0530

    	Bug#27079017 - FC27 PKGS FAILURES WHEN MYSQL-CONNECTOR-ODBC INSTALLED ALREADY FROM NATIVE REPO
    	- Due to changes in packages, skip libs-compat and embedded-compat packages

commit 54fe8e89d78c3bfe1710c3beca2649694e00c146
Merge: 50c7af1 8d2de5f
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Fri Nov 10 16:38:21 2017 +0100

    NULL Merge branch 'mysql-5.7' into mysql-8.0

commit 8d2de5f2c3467e4aa90a547c84bd016571a17e15
Author: Jon Olav Hauglid <jon.hauglid@oracle.com>
Date:   Tue Jul 26 13:08:15 2016 +0200

    Bug#24343330: READ OF OUT-OF-SCOPE (TEMPFILE) IN MYSQL_UPDATE()
    
    The problem was that an IO_CACHE variable used during UPDATE,
    was allocated on the stack and later copyied into a heap
    allocated variable. However, the pointers inside this struct
    was not adjusted, so that they still pointed to the stack.
    After the stack frame ended, they became invalid.
    
    This patch fixes the problem by allocating the IO_CACHE on
    the heap instead and copying the pointer to this IO_CACHE
    struct, rather than copying the contents of the struct.
    
    Issue identified by the new ASAN option
    -fsanitize-address-use-after-scope
    
    (cherry picked from commit d3bff0c03637119f960c7d3db67a85912bc37e4a)

commit 013947c2c7336a4699f99da28be9c3d71162bb09
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Thu Nov 9 09:45:58 2017 +0100

    Bug#27095089 ENABLE -FSANITIZE-ADDRESS-USE-AFTER-SCOPE BY DEFAULT FOR ASAN BUILDS
    
    See bug 24343330, which needs -fsanitize=address
    -fsanitize-address-use-after-scope in order to be detected
    
    Add a compiler feature check for
    -fsanitize=address -fsanitize-address-use-after-scope
    and enable it if supported for 'cmake -DWITH_ASAN=1'
    *and* the extra -DWITH_ASAN_SCOPE=1 is enabled.
    
    Change-Id: I25100a03c47de74df235360d57297e60c2352b88
    (cherry picked from commit e15249418502f61437fa24b9641e9879ba4d3a66)

commit 23b90b3102628b0e080284a34b435825f75bb806
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Fri Nov 10 12:18:02 2017 +0100

    Bug #25643811: MYSQL DOES NOT COMPILE WITH GCC 7
    
    cmd-line-utils/libedit/terminal.c:366:28:
    warning: comparison between pointer and zero character constant [-Wpointer-compare]

commit 50c7af1fc06520a67306fa1ee243f9c090ba139a
Author: Elżbieta Babij <elzbieta.babij@oracle.com>
Date:   Fri Nov 10 11:36:30 2017 +0100

    Bug #26518925 - ASSERTION FAILURE IN INNODB IN-MEMORY TMP TABLE CODE (WL8117)
    
    In temptable there is a possibility of row without fields, in query like select distinct 1 from t1,t2 where t1.a=t2.a;
    
    RB#17421
    Reviewed by Paweł Olchawa

commit ed9b12d2abccc240b753c575b1fb5abb1dc53141
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Fri Nov 10 10:08:03 2017 +0100

    Bug#27095089 ENABLE -FSANITIZE-ADDRESS-USE-AFTER-SCOPE BY DEFAULT FOR ASAN BUILDS
    
    Post-push fix: enable -fsanitize-address-use-after-scope only if option
    WITH_ASAN_SCOPE is ON (there were too many new failures in pushbuild)
    
    Change-Id: Ia48037992bdbedb01b38228ee05b48b7e12173bc

commit d5e1502af12c8e86f9e715c1af9e27204823562b
Merge: 640f934 6e44c0a
Author: Jaideep Karande <jaideep.karande@oracle.com>
Date:   Fri Nov 10 08:54:09 2017 +0100

    Merge branch 'mysql-5.7' into mysql-8.0

commit 640f9349067684a6c7a2f53e7ba60cb96362bbf7
Author: Deepthi ES <deepthi.e.s@oracle.com>
Date:   Fri Nov 10 13:04:20 2017 +0530

    Bug#26555590 : RPL.RPL_MULTI_SOURCE_CORRUPT_REPOSITORY FAILS WITH RESULT CONTENT MISMATCH
    
    Problem:
    --------
    Sporadic failure was because test expects the value of 'Slave_SQL_Running_State'
    to be 'Slave has read all relay log; waiting for more updates' without ensuring
    if sql thread has applied all events from relaylog.
    
    Fix:
    ----
    Introduced a wait_condition to wait until slave sql_thread has applied all events
    from the relaylog before checking the value of 'Slave_SQL_Running_State'.

commit 6e44c0a015787e19be8157d42d86532daff41391
Author: Jaideep Karande <jaideep.karande@oracle.com>
Date:   Fri Nov 10 08:31:05 2017 +0100

    Bug#27067956: TEST GR_APPLIER_SLAVE_COMMANDS FAILS SPORADICALY ON PB2
    
    STOP START STOP GR Applier is causing additional warnings being logged in error
    file because of previous pending operations.
    Test case has been changed to use wait when required.

commit 5b9ed13b17590a3d0d121d472642102e8df16759
Merge: 6e86dbf 2203b2d
Author: Aditya A <aditya.a@oracle.com>
Date:   Fri Nov 10 11:13:02 2017 +0530

    Merge branch 'mysql-5.7' into mysql-8.0

commit 2203b2d189d811f5557746f08804696fc4dc7d42
Author: Aditya A <aditya.a@oracle.com>
Date:   Fri Nov 10 11:11:10 2017 +0530

    Bug #22486025	INNODB: FAILING ASSERTION: KEY_LEN != 0 || FIND_FLAG != HA_READ_KEY_EXACT
    
    Post push test case fix

commit 6e86dbfba3f9de4c380a83e9a3c7f7616a6d7c7f
Author: Anibal Pinto <anibal.pinto@oracle.com>
Date:   Thu Nov 9 18:18:08 2017 +0100

    BUG#26496908: GR_SHOW_SLAVE_STATUS_FOR_CHANNEL_RECOVERY IS FAILING SPORADICALLY IN PB2
    
    The test was failing when stopping the group replication, on server2 was
    missing some transactions.
    
    The test was not waiting for server2 was back online before shutting down the
    group.

commit 52c8436bf7949d1cae951f13702571f4ba876f92
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Thu Nov 9 16:52:48 2017 +0100

    Bug#27095089 ENABLE -FSANITIZE-ADDRESS-USE-AFTER-SCOPE BY DEFAULT FOR ASAN BUILDS
    
    Fix a unit test which reported "address use after scope".
    
    Change-Id: I2e9685f4c3294298da70672e84f8020eabd70cb5

commit e15249418502f61437fa24b9641e9879ba4d3a66
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Thu Nov 9 09:45:58 2017 +0100

    Bug#27095089 ENABLE -FSANITIZE-ADDRESS-USE-AFTER-SCOPE BY DEFAULT FOR ASAN BUILDS
    
    See bug 24343330, which needs -fsanitize=address
    -fsanitize-address-use-after-scope in order to be detected
    
    Add a compiler feature check for
    -fsanitize=address -fsanitize-address-use-after-scope
    and enable it if supported for 'cmake -DWITH_ASAN=1'
    
    Change-Id: I25100a03c47de74df235360d57297e60c2352b88

commit 0ca8da2abcabe2d623bae32d0f53f53306f2ce90
Author: Dag Wanvik <dag.wanvik@oracle.com>
Date:   Thu Nov 9 12:14:56 2017 +0100

    Bug#27061487 WINDOW FUNC, CRASH IN DECIMAL2BIN
    
    Missing initialization of decimal buffer leads to error when wf is not
    nullable: maybe_null == false.
    
    Fix: initialize decimal buffer after wf_common_init in ::val_decimal
    for wfs. Also return nullptr only when null_value is set after
    common_init.

commit 7a291bee9344ae405771b17acf2522c1498aa014
Author: Abhishek Ranjan <abhishek.ar.ranjan@oracle.com>
Date:   Thu Nov 9 18:17:15 2017 +0530

    Bug#26636238 : ERROR/INPLACE UPGRADE TO READ-ONLY 8.0: PERFORMANCE
                   SCHEMA INITIALIZATION FAILED
    
    Post push fix:
    
    Record result file for thread_pool.thread_pool_i_s_restart.test
    to reflect the changes in the test file.

commit f5239bc8aa18b4b3b22fce1a2e9ef87d466c1ef1
Merge: d4c2cd7 760925e
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Thu Nov 9 13:46:10 2017 +0100

    NULL Merge branch 'mysql-5.7' into mysql-8.0

commit 760925e813d33e0b3304324dc2f5590e96d016a7
Merge: bfe6ecb c81db04
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Thu Nov 9 13:45:42 2017 +0100

    NULL Merge branch 'mysql-5.6' into mysql-5.7

commit c81db04314cd2505203eb563f282c89bd7cb01f5
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Thu Nov 9 13:31:38 2017 +0100

    Bug#26022865 BUILD FOR WINDOWS-S12-64BIT,ADVANCED IS FAILING ON PB2 MYSQL-5.6
    
    Remove cmake code for signing executables.
    Automatic signing has always failed anyways.
    It should be done manually as part of the release process.

commit d4c2cd7a12fbeb8c5b531b46d1dfddf1e52c53de
Merge: a9f36f5 bfe6ecb
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Thu Nov 9 13:36:16 2017 +0100

    NULL Merge branch 'mysql-5.7' into mysql-8.0

commit bfe6ecb99fffe1a01f68146aa0f61e6ebdf5361e
Merge: 8b011c5 dc75c90
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Thu Nov 9 13:35:41 2017 +0100

    NULL Merge branch 'mysql-5.6' into mysql-5.7

commit dc75c90a60bd92e9ec007a06892b6ada309a73cd
Merge: 3aed38d b0a936b
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Thu Nov 9 13:35:09 2017 +0100

    NULL Merge branch 'mysql-5.5' into mysql-5.6

commit a9f36f55ca38f832cacebcbef33738b20c9ac218
Author: Aakanksha Verma <aakanksha.verma@oracle.com>
Date:   Thu Nov 9 16:38:33 2017 +0530

    Bug #26492721   MYSQL/INNODB CRASHES DURING ALTER TABLE
    
    Post push fix for test failure.
    
    Reviewed by: Naga Satyanarayana Bodapati <satya.bodapati@oracle.com>
    Over IM.

commit 263636ea8c9df9ac5047878ad170d44b7de53b0e
Merge: bbc4f3e 8b011c5
Author: Marek Szymczak <marek.szymczak@oracle.com>
Date:   Thu Nov 9 11:03:25 2017 +0100

    Merge branch 'mysql-5.7' into mysql-8.0

commit 8b011c5238d20e07dedc1df5226a4a5609b3d82f
Author: Marek Szymczak <marek.szymczak@oracle.com>
Date:   Thu Nov 9 10:53:03 2017 +0100

    WL#8838 Compressed and encrypted JSON audit log output
    
    Post-push fix: Code rewritten in a way, which is not a subject of compiler optimization.

commit 2a9360a5202272d7dcade5f71893488ab0011364
Author: Ole John Aske <ole.john.aske@oracle.com>
Date:   Thu Nov 9 08:54:47 2017 +0100

    Fixed failing ndb_join_pushdown*.test by recording new result files.

commit b0a936b0d933ad56192fd7cc47f4b4f460da4230
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Thu Nov 9 08:45:45 2017 +0100

    dos2unix cmake/mysql_add_executable.cmake

commit 416d58a9ddb341e7037ee15834fdb739baffc1c4
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Thu Nov 9 08:36:59 2017 +0100

    Bug#26022865 BUILD FOR WINDOWS-S12-64BIT,ADVANCED IS FAILING ON PB2 MYSQL-5.6
    
    Remove cmake code for signing executables.
    Automatic signing has always failed anyways.
    It should be done manually as part of the release process.

commit bbc4f3ef63201e8816d11de113d047b237b3ea41
Author: Dmitry Lenev <dmitry.lenev@oracle.com>
Date:   Tue Nov 7 15:50:47 2017 +0300

    Fix for bug#27041536 "TRANS_TABLE || !CHANGED || THD->GET_TRANSACTION()->CANNOT_SAFELY_ROLLBACK...".
    
    CREATE TABLE SELECT which attempted to create non-InnoDB table failed
    due to assertion if there was pre-existing view referencing table to be
    created.
    
    The assertion failure occurred because intermediate commits, which
    happened during update of dependent view metadata in case when table
    in SE not supporting atomic DDL was created, wiped out safe-to-rollback
    flag in transaction context.
    
    This fix removes intermediate commits during dependent view metadata
    updates in CREATE TABLE SELECT. They are not really necessary as even
    for SEs which don't support atomic DDL we can always rollback the
    statement by dropping table created. Such intermediate commits were
    actually causing more trouble than assertion failure above as in RBR
    mode they flushed CREATE TABLE and row events to binary log, thus
    creating discrepancy with potential rollback-by-drop-target-table
    if error occurred after intermediate commit.

commit fe174a57408b75df54bceaea258ea8311f9f788b
Author: Lars Tangvald <lars.tangvald@oracle.com>
Date:   Thu Oct 26 09:15:06 2017 +0200

    Bug#27040731	DEB: RENAME MYSQL-ENTERPRISE-BACKUP TO MYSQL-COMMERCIAL-BACKUP
    
    Renamed MEB package to mysql-commercial-backup to be more in line with the
    other packages

commit 0afa444f1ad558598b5bfd59464d6fc492b75772
Author: Lars Tangvald <lars.tangvald@oracle.com>
Date:   Thu Oct 26 09:12:56 2017 +0200

    Bug#27040648	REMOVE MEB LICENSE FILES FROM COMMUNITY SOURCE
    
    Moved meb packaging directory

commit 7678faa7c75f3be1fc554359d0b242621ce6110d
Author: Knut Anders Hatlen <knut.hatlen@oracle.com>
Date:   Wed Jul 19 14:31:02 2017 +0200

    Bug#26483625: DON'T PRODUCE LOGICAL DIFFS FOR NO-OP UPDATES
    
    When partial update of JSON values is used, and JSON_SET changes a
    value in a JSON document, and the new value is exactly the same as the
    old value, a logical diff may be collected.
    
    There is code that avoids collection of binary diffs for these no-ops.
    This patch extends that code so that it also avoids the unnecessary
    collection of logical diffs.
    
    The patch also removes some leftover debug code from a unit test.

commit dcec3b3905825ee07bc0451b85439504985d8a4e
Merge: fc7aa8a de2bbe2
Author: Aakanksha Verma <aakanksha.verma@oracle.com>
Date:   Thu Nov 9 01:24:12 2017 +0530

    Merge branch 'mysql-5.7' into mysql-8.0

commit de2bbe2aa1c8eb7aceeb8c17c45232b2c442bc98
Merge: ddfbfcf 3aed38d
Author: Aakanksha Verma <aakanksha.verma@oracle.com>
Date:   Thu Nov 9 01:20:43 2017 +0530

    Merge branch 'mysql-5.6' into mysql-5.7

commit 3aed38dd6761468713ec023f2ae411ef43465497
Author: Aakanksha Verma <aakanksha.verma@oracle.com>
Date:   Thu Nov 9 01:17:02 2017 +0530

    Bug #26492721   MYSQL/INNODB CRASHES DURING ALTER TABLE
    
    Renaming the test file as per the naming convention.

commit fc7aa8a4ae57aaa16d5232edaf3d5f8a6501250b
Author: Satya Bodapati <satya.bodapati@oracle.com>
Date:   Wed Nov 8 18:07:42 2017 +0100

    Followup testcase fix to Bug#27014083

commit 965cb398dfd1a0372ec81a412753560cef1a3d0f
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Tue Nov 7 18:13:31 2017 +0100

    Bug#26933472 NDB DOES NOT COMPILE WITH GCC 7
    
    Extra patch to avoid array-out-of-bounds in create_instance():
      ndb_eng->info.info.features[1].feature = ENGINE_FEATURE_PERSISTENT_STORAGE;
    
    Change-Id: If28f9f2f69cccb6cbc3be644ac34925ec9e45e8f
    (cherry picked from commit 2c6bebb6411974c6d93a87c1f66f3f5a0a7dd34e)

commit 024a6c0955db78c7d94895cd1b9e05990869f1e1
Author: Magnus Blåudd <magnus.blaudd@oracle.com>
Date:   Wed Nov 8 15:51:10 2017 +0100

    WL#9185 MySQL Cluster support for new DD
    
     - add testcase showing that a table might get a new table id in NDB
       after truncate. NDB will use the first free slot

commit 86f1f6c809fc91d0e0cb0f4247d35fa256e9946a
Author: Ingo Struewing <Ingo.Struewing@oracle.com>
Date:   Mon Nov 6 17:28:18 2017 +0100

    Bug#27075416 - TEST CASE MEB-SBT_ENVIRONMENT FAILS WITH TEST-CASE-TIMEOUT ON UBUNTU
    
    Move entry for meb.sbt_environment from
    common default.experimental to Meb's one.
    
    Unrelated changes:
    
    Fix compiler warnings from gcc 7.

commit a5383a38e32a71d086adb0338fff5558e9540c41
Author: Magnus Blåudd <magnus.blaudd@oracle.com>
Date:   Wed Nov 8 15:34:25 2017 +0100

    Revert "WL#9185 MySQL Cluster support for new DD"
    
    This reverts commit b1208abb4d3426b7a4eb3c659f5afb4bd5469f33.

commit 5a8af78338e94f646c05d22dc8f9a29cba64626a
Author: Satya Bodapati <satya.bodapati@oracle.com>
Date:   Thu Oct 26 20:30:27 2017 +0200

    Bug#27014083 - 8.0 CRASH RECOVERY FAILS FOR UPGRADED 5.7 COMPRESSED TABLES WITH SIZE < 96K
    
    Problem:
    --------
    A compressed table is created in 5.7 with KEY_BLOCK_SIZE as 8. After upgrading to 8.0 and
    subsequent crash recovery on the compressed table fails with error that it doesn't have
    minimum expected size.
    
    The minimum size expected in 5.7 is (FIL_IBD_INITIAL_FILE_SIZE) 4 * UNIV_PAGE_SIZE. Note that
    the page size is UNIV_PAGE_SIZE. This means even for compressed tables with 1k, 2k, 4k,etc
    we still create IBD file with 4 * UNIV_PAGE_SIZE bytes. Ideally we should we have used
    4 * page_size.physical() bytes.
    
    In 8.0, the minimum size expected is increased to 6 due to two extra SDI indexes per
    tablespace. Later when one SDI index is removed (as part of WL#9538), minimum size should have
    been reduced to 5 (another bug).
    
    As part of upgrade, we add one SDI index to tablespace but it doesn't extend the physical
    tablespace size to FIL_IBD_INITIAL_FILE_SIZE * UNIV_PAGE_SIZE bytes. Index creation only add
    one/two extra page_size.physical() bytes. So subsequent crash recovery on this tablespace fails
    because of size mismatch.
    
    Fix:
    ----
    1. Change the minimum expected size (FIL_IBD_INITIAL_FILE_SIZE) from 6 to 5. (We have only one
       extra SDI index)
    
    2. Create IBD file with FIL_IBD_INITIAL_FILE_SIZE * page_size.physical() bytes instead of
       FIL_IBD_INITIAL_FILE_SIZE * UNIV_PAGE_SIZE bytes.
    
    3. Dont read page 0 assuming UNIV_PAGE_SIZE bytes. To determine page_size of tablespace,
       first read UNIV_ZIP_MIN_SIZE bytes(1K) bytes and get tablespace flags, space_id etc.
       Once the page_size is derived from tablespace flags, read the tablespace using the page_size.
    
    Reviewed-By: Bin Su <bin.x.su@oracle.com>
    RB: 17797

commit f60e47f0934b208735dcc0fa436f28b20e8a7ac2
Author: Magnus Blåudd <magnus.blaudd@oracle.com>
Date:   Wed Nov 8 15:18:18 2017 +0100

    Bug#27051914 REFRESHTUPLE() NOT SUPPORTED ON TABLE WITH BLOBS
    
     - Performing a refreshTuple() on a table with blobs is not supported
       but no check for this condition has been implemented. There is a
       workaround in ndbcluster which skips calling refreshTuple() if the
       table has blobs which would be more exact using the
       information managed internally in the NdbApi.
     - Fix by adding check which fail refreshTuple() if the table has blobs
       and change the workaround in ndbcluster to handle the new error.

commit 81facc2785ce02f590a7f107c1b53b50a7a911f5
Author: Dag Wanvik <dag.wanvik@oracle.com>
Date:   Tue Nov 7 16:38:35 2017 +0100

    Bug#27060420 WINDOW FUNC, VIEW, CRASH IN DO_COPY_MAYBE_NULL
    
    SELECT_LEX::resolve_rollup, if an item is present in GROUP BY clause,
    sets maybe_null to true as ROLLUP will generate NULL's for the column.
    
    In this case the item is an Item_ref_view. The underlying field is
    not, however, set to maybe_null. This later blows up during buffered
    windowing when we try to copy a field back from the frame buffer.  It
    has a null value due to ROLLUP, but the field doesn't allow it (has no
    to_null_ptr; i.e. since we copy back the original from_null_ptr was
    empty).
    
    Fix:
    
    Set item->real_item()'s maybe_null in addition to item's maybe_null.
    
    Repro test added.

commit 76baba81de61a562ce94b520919f6426421e2adf
Author: Dag Wanvik <dag.wanvik@oracle.com>
Date:   Tue Nov 7 16:36:45 2017 +0100

    Bug#27082154 MTR NO LONGER FINDS EXECUTABLES FOR XCODE BUILT PROJECT
    
    This was a regression after the fix for Bug#26985269: code which
    previously was execute for Mac OS, no longer was: now it was only
    executed for Windows, leading to the issue.
    
    Extend the condition for WINDOWS to also include Mac OS.

commit f3731c17e01d3f080c39bc8b49aa4e6daea600a6
Author: Ole John Aske <ole.john.aske@oracle.com>
Date:   Fri Nov 3 14:38:15 2017 +0100

    Bug#27067538 EXPLAIN OF PUSHED 'MATERIALIZED' JOINS CRASH DUE TO NULL-PTR DEREFERENCING
    
    Explain'ing of join pushdown may encounter unused QEP_TABs. These has a
    'table() == NULL' reference set up (among other unused member variables).
    
    The pattern elsewhere in the optimizer code is to simply ignore such QEP_TABs,
    which we also does in this patch.
    
    Patch is required by the MysqlCluster patch for bug#27022925,
    SPJ: 'MATERIALIZED' SEMI JOINS ARE NOT CONSIDDERED FOR JOIN PUSHOWN which
    enables join pushdown for more variants of semi joins. As this other patch is
    required for provoking this bug, this patch has no testcase included.
    However, a testcase will be available as part of bug#27022925 patch.
    
    (cherry picked from commit f7b0771b38ae685d192abbe65bf31263e484df94)

commit f7b0771b38ae685d192abbe65bf31263e484df94
Author: Ole John Aske <ole.john.aske@oracle.com>
Date:   Fri Nov 3 14:38:15 2017 +0100

    Bug#27067538 EXPLAIN OF PUSHED 'MATERIALIZED' JOINS CRASH DUE TO NULL-PTR DEREFERENCING
    
    Explain'ing of join pushdown may encounter unused QEP_TABs. These has a
    'table() == NULL' reference set up (among other unused member variables).
    
    The pattern elsewhere in the optimizer code is to simply ignore such QEP_TABs,
    which we also does in this patch.
    
    Patch is required by the MysqlCluster patch for bug#27022925,
    SPJ: 'MATERIALIZED' SEMI JOINS ARE NOT CONSIDDERED FOR JOIN PUSHOWN which
    enables join pushdown for more variants of semi joins. As this other patch is
    required for provoking this bug, this patch has no testcase included.
    However, a testcase will be available as part of bug#27022925 patch.

commit c1776576b4fa081fb88553d4e5c3cd88554d5b7a
Merge: 3db4c97 6742538
Author: Ole John Aske <ole.john.aske@oracle.com>
Date:   Wed Nov 8 13:28:58 2017 +0100

    Merge branch 'mysql-5.7-cluster-7.6' into mysql-8.0-cluster-8.0

commit 6742538628b4fe0df1d92234d3f2c807533160b2
Merge: 960a7ed c5eff03
Author: Ole John Aske <ole.john.aske@oracle.com>
Date:   Wed Nov 8 13:28:26 2017 +0100

    Merge branch 'mysql-5.7-cluster-7.5' into mysql-5.7-cluster-7.6

commit bf9a2eb9ce25e67b8e2a1362ed72452451627491
Merge: 383b3be ddfbfcf
Author: Aakanksha Verma <aakanksha.verma@oracle.com>
Date:   Wed Nov 8 17:49:26 2017 +0530

    Merge branch 'mysql-5.7' into mysql-8.0

commit c5eff0331ce6f29eb55a6d2367ac72c734388322
Merge: 377db6b f1f4a49
Author: Ole John Aske <ole.john.aske@oracle.com>
Date:   Wed Nov 8 13:17:37 2017 +0100

    Merge branch 'mysql-5.6-cluster-7.4' into mysql-5.7-cluster-7.5

commit ddfbfcfdfcb4f77f72e459a293686a2be27af112
Merge: a27e2ff ca0d885
Author: Aakanksha Verma <aakanksha.verma@oracle.com>
Date:   Wed Nov 8 17:46:12 2017 +0530

    Merge branch 'mysql-5.6' into mysql-5.7

commit ca0d8852897f1124e5b63c5fcc588f28f68f5add
Author: Aakanksha Verma <aakanksha.verma@oracle.com>
Date:   Wed Nov 8 17:42:55 2017 +0530

    Bug #26492721   MYSQL/INNODB CRASHES DURING ALTER TABLE
    
    PROBLEM
    
    While doing an alter table that does multiple change columns , the heap
    assigned for the particular table increases and corresponding increase
    to dict_sys->size isn't done because of which the dict_sys->size keeps
    decreasing with every iteration of set of alter tables provided in the
    bug page hitting the assertion dict_sys->size > 0 .
    
    FIX
    
    Fix is to add a check for any table heap size increase during change
    column and add the increased value of heap size to dict_sys->size to
    avoid it getting diminished on subsequent runs of alter tables.
    
    Reviewed by: Jimmy Yang<Jimmy.Yang@oracle.com>
    RB: 17817

commit f1f4a49abf9c28e1f8b2d248afdb99f1948f4cdb
Author: Ole John Aske <ole.john.aske@oracle.com>
Date:   Wed Nov 8 13:04:25 2017 +0100

    bug#26984919 Addendum patch
    
    Testcases added for this bug didn't enable the required optimizer switches to allow
    the hinted semijoin strategies to be used. Thus, 'DEPENDENT SUBQUERY' plan was choosen
    instead, which was not what we wanted to test for the MTR test ndb_join_pushdown_none.test.

commit 383b3be7af0a0dfa7f7ed2c0dac809dd09de8449
Author: Anibal Pinto <anibal.pinto@oracle.com>
Date:   Wed Nov 8 11:31:40 2017 +0000

    BUG#27087931: CLANG THROWS SQL_SERVICE_INTERFACE.CC:26 ERROR: UNUSED VARIABLE 'COMMAND_NAME'
    
    The fix for BUG#26787288: CHECK_WARNINGS FOR
    GROUP_REPLICATION.GR_RELAY_LOG_NAME_CHANGE TIMES OUT ON PB2 removed the
    use of the command_name array.
    
    Removed the command_name due to cause failures with clang compiler.

commit 2a29e21a6b966607f9f6497753c458ae0fccc487
Author: Erik Froseth <erik.froseth@oracle.com>
Date:   Mon Sep 25 11:12:13 2017 +0200

    Bug#26846289 HISTOGRAM TRUNCATES SUB-SECOND ACCURACY IN "LAST-UPDATED"
    
    Problem: Each histogram has a field "last-updated" that shows when
    the histogram was last updated. This field did not show sub-second
    accuracy.
    
    Fix: Make sure that sub-second accuracy is preserved when serializing
    the histogram into JSON by not truncating the microsecond part.
    
    Change-Id: I906e79e7858507e4ed724305b1aca4d532d200f4

commit 068255f326b7bce86e5ac5e16b7fb4f49eb3de88
Author: Marc Alff <marc.alff@oracle.com>
Date:   Tue Nov 7 15:43:30 2017 +0100

    Bug#25109007 DON'T DUMP MYSQL.GTID_EXECUTED
    
    Before this fix,
    the mysqlpump (PUMP) client dumps the content of table mysql.gtid_executed.
    
    Upon reload, the content of table mysql.gtid_executed is modified,
    so that the gtid_executed position is lost upon server restart.
    
    The root cause is: the content of this table should NOT
    be dumped and reloaded, as this is a log position:
    a log position should be updated when applying logs,
    not forced externally.
    
    The mysqldump (DUMP) client already ignores this table.
    
    The fix is to also ignore mysql.gtid_executed in mysqlpump.

commit 3201d5d0c25cd7e103e8e61af88a054de423897a
Author: Krzysztof Kapuścik <krzysztof.kapuscik@oracle.com>
Date:   Tue Nov 7 12:48:34 2017 +0100

    Bug #27015730 ASSERT IN LOG0LOG.CC: LOG_SYS->FLUSHED_TO_DISK_LSN >= OLDEST_LSN
    
    During the recovery the write_lsn was set to current LSN
    but the flush positions (current_flush_lsn and
    flushed_to_disk_lsn) were left unmodified. If nothing was added to
    log before the call to log_checkpoint the assertion was raised.
    
    Because the write_lsn was equal to current lsn the log_write_up_to
    was doing nothing keeping the flushed_to_disk_lsn untouched. But the
    checkpoint code was doing a check that everything up to checkpoint
    lsn was flushed.
    
    The fix sets the flushed position after "recovery" to lsn value
    so last written adn flushed positions are equal.

commit f0be065efd50162d287bc9a34e91454a4e14bd77
Author: Satya Bodapati <satya.bodapati@oracle.com>
Date:   Tue Oct 31 13:02:38 2017 +0530

    Bug#26995951 - REGRESSION IN SERVER STARTUP TIME
    
    Problem:
    -------
    As part of Bug#26832347 - INNODB: CANNOT FIND SPACE FOR TBS_.*_RENAME IN
    TABLESPACE MEMO, an extra iteration of dd::Tablespaces is introduced to
    fix the cache.
    
    Fetching dd::Tablespaces is taking 1min for 1Million tablespaces.
    This increased the startup time
    
    Fix:
    ----
    Avoid the tablespaces fetch & cache update if there are no prepared
    trxs.
    
    Note: We cannot use trx_sys->n_prepared_trx at
    dd_tablespace_update_cache() because binlog would have
    committed/rolledback the prepared trxs by the time we are at
    dd_tablespace_update_cache(). It would be always 0. So we need to
    introduce extra bool to detect the presence of prepared trxs.
    
    Reviewed-By: Bin Su <bin.x.su@oracle.com>
    RB: 17805

commit 2421e50614564a03dfa0cf677ec4f3ed03e2a51f
Author: Satya Bodapati <satya.bodapati@oracle.com>
Date:   Fri Nov 3 23:52:48 2017 +0530

    Bug#26997500 - UPGRADE FAILS DUE TO ORPHAN .FRM AND CANNOT BE RESUMED
    
    Problem:
    --------
    Upgrade aborts if there is an orphan .frm
    After removing the orphan .frm, subsequent retries of upgrade will
    be unsuccessful.
    
    During upgrade, we rename FTS AUX table with their new parent table_id.
    When upgrade aborts due to orphan .frm, it doesn't rename back to the
    original name
    
    Subsequent retry will fail because upgrade cannot find the aux table IBD
    with the old name
    
    Fix:
    On failure, rename FTS AUX tables from 8.0 format to 5.7 format
    
    Reviewed-By: Bin Su <bin.x.su@oracle.com>
    RB: 17725

commit 3db4c97c58872ca7c7440803f4670eb889fb0c17
Author: Thomas Nielsen <thomas.nielsen@oracle.com>
Date:   Wed Nov 8 11:31:09 2017 +0530

    Bug #25112726 NDB_RESTORE RETURNS -1 INSTEAD OF EXPECTED EXIT CODE ON INDEX REBUILD FAILURE
    
    Changes made in order to return appropriate error code instead of -1 in ndb_restore.

commit d1abb45c618df6278b113262d83fd79f10c54652
Author: Chaithra Gopalareddy <chaithra.gopalareddy@oracle.com>
Date:   Wed Nov 8 10:00:02 2017 +0530

    Bug#26975848: IFNULL: CRASHES WITH FIRST_VALUE
    Bug#27062694: WINDOW FUNC: MUCH CRASHING WITH FIRST_VALUE/LAST_VALUE!!
    Bug#27062796: WINDOW FUNC: CRASH IN STRING::COPY WITH WKB FUNCTIONS
    
    Patch for Bug#26975848 : This same patch fixes the remaining two bugs
    An error is generated while evaluating the first argument to Item_func_ifnull.
    Without checking for errors, we proceed further to evaluate the second argument
    which is a WINDOWING function. And the error is caught here. Windowing
    function returns nullptr. But does not set null_value to true. This results
    in server exit later.
    
    Solution:
    Set null_value to true in ::val_str functions of Item_lead_lag,
    Item_first_last_value and Item_nth_value. ::val_str functions are
    expected to set null_value for error cases and for an actual null value.
    We have an ASSERT in Item::send function to verify the same.
    Also check for errors in Item_sum_hybrid::compute and change ::val_* of
    Item_sum_hybrid accordingly.

commit 55eca823f5602c1e74c4a4d5453a51d5d4a67c70
Author: Bin Su <bin.x.su@oracle.com>
Date:   Wed Nov 8 10:08:31 2017 +0800

    Bug#26960345 - MISLEADING ERROR MESSAGE WHEN CREATING INNODB TABLE ON FULL DISK
    
    The difference is because of we now remove the .frm files after new DD.
    
    Creating .frm files may report the 'No space left on device', which is a
    server error only. Since after new DD, now .frm is necessary, server would
    directly create innodb tablespace, and the DB_OUT_OF_FILE_SPACE is mapped to
    HA_ERR_RECORD_FILE_FULL, so the error message became 'The table xxx is full'.
    
    To give a more meaningful error, if fil_ibd_create fails, DB_OUT_OF_DISK_SPACE
    would be returned, and server will also introduce a new error called
    ER_DISK_FULL, saying 'Create table/tablespace 'xxx' failed, as disk is full'.
    
    RB: 17825
    Reviewed-by: Satya Bodapati <satya.bodapati@oracle.com>

commit f584df21af19f2fab94863e67293e025f91cfaa4
Author: Jaideep Karande <jaideep.karande@oracle.com>
Date:   Tue Nov 7 18:18:05 2017 +0100

    Bug#25654425: GR_APPLIER_EARLY_FAILURE HAS OCCASIONAL TIMEOUT ON PB2
    
    Problem: Two parallel grab_write_lock(writers) deadlock
    
    Description:
    When GR stops due to ERROR, followed by STOP GR, applier thread and STOP GR
    thread tries to acquire shared_write_lock using function grab_write_lock.
    Assume kill_pending_transaction acquires the grab_write_lock which is guarded
    by another mutex write_lock.
    STOP GR wants to acquire grab_write_lock so STOP GR thread first acquires wrlock and
    enter critical region waiting for grab_write_lock to become available.
    Kill_pending_transaction is not able to release grab_write_lock because to release lock
    it needs lock on write_lock, which is being held by STOP GR now.
    
    Resolution:
    Code has been corrected for write_lock.
    write_lock is mutex to guard write_lock_in_use.

commit 5a7ddbba4e10804f0e6bfbd87d7f093478fe670a
Merge: b1208ab 960a7ed
Author: Tiago Alves <tiago.alves@oracle.com>
Date:   Tue Nov 7 17:00:39 2017 +0000

    WL#11305: Merge branch 'mysql-5.7-cluster-7.6' into mysql-8.0-cluster-8.0

commit 960a7edc17b5f301c5a6295b9d56bcc91ead3364
Merge: 66720e1 377db6b
Author: Tiago Alves <tiago.alves@oracle.com>
Date:   Tue Nov 7 16:58:39 2017 +0000

    WL#11305: Merge branch 'mysql-5.7-cluster-7.5' into mysql-5.7-cluster-7.6

commit 377db6b0d1748072715987899f482ec25ffd3a97
Merge: b65cbe5 15fda5c
Author: Tiago Alves <tiago.alves@oracle.com>
Date:   Tue Nov 7 16:57:39 2017 +0000

    WL#11305: Merge branch 'mysql-5.6-cluster-7.4' into mysql-5.7-cluster-7.5

commit 15fda5c6d0ec12a27df4053d94d0e7d976f268df
Merge: 9974fec e70da4a
Author: Tiago Alves <tiago.alves@oracle.com>
Date:   Tue Nov 7 16:54:42 2017 +0000

    WL#11305: Merge branch 'mysql-5.6-cluster-7.3' into mysql-5.6-cluster-7.4

commit e70da4a3b116358280ef21cb082d63510cd45d1c
Merge: fabfb37 de5b6d1
Author: Tiago Alves <tiago.alves@oracle.com>
Date:   Tue Nov 7 16:53:19 2017 +0000

    WL#11305: Merge branch 'mysql-5.5-cluster-7.2' into mysql-5.6-cluster-7.3

commit de5b6d1e936b7f48b5408225dff99d0eacc90d17
Author: Tiago Alves <tiago.alves@oracle.com>
Date:   Tue Nov 7 16:41:31 2017 +0000

    clang-format code style cleanup

commit bc2ed4d700b15e49e0cd0db8bac8bef7b783c1a9
Author: Tiago Alves <tiago.alves@oracle.com>
Date:   Tue Oct 31 17:53:10 2017 +0000

    WL#11305 Support atrt replication setup for MySQL 5.5 and upwards
    
    ATRT supported replication up to 5.5 where replication settings were passed
    using both command-line arguments when starting mysqld and sql commands to
    configure replication. Command-line arguments have been deprecated since
    MySQL 5.5 and this support was removed from atrt.

commit 9e5d1e64e28121d090db8e2f82df08f9dc7ab503
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Tue Oct 31 14:10:57 2017 +0100

    Bug#26134893 DYNAMIC LINKING WITH OPENSSL ON MACOS
    
    Post-push fix. The initial implementation used 'copy_if_different' to install
    ssl .dylibs in the build directory. Files are *always* different, since
    we patch them with install_name_tool.
    
    Solution: do the copying in a sub-cmake job, so we can easily skip
    the copying/patching if already done.
    
    Also: extend 'make clean' to remove library_output_directory
    Change-Id: I0d3b1ca04a7bb6845bcb9301e14d9dbe0150e60c

commit 32557141d01f31af712d960743b36260dda12a93
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Wed Nov 1 12:27:58 2017 +0100

    Bug#26933472 NDB DOES NOT COMPILE WITH GCC 7
    
    GCC has new warnings that stop the compilation in maintainer mode
    
    Extend the list of warnings in storage/ndb/CMakeLists.txt
    
    Fix some warnings of the form:
    storage/ndb/test/ndbapi/testDict.cpp:5059:1: error:
    %d directive writing between 1 and 11 bytes into a region
    of size between 0 and 227 [-Werror=format-overflow=]
    
    thr_send_threads object should be cache line aligned (NDB_CL).
    But operator new is used which do not support alignment.
    
    This patch overallocate memory and then constructs the thr_send_threads
    object within at aligned address using placement new, in the same way as
    for g_thr_repository.
    
    This patch is for mysql-8.0
    
    Change-Id: I3f21d4714b992257691c2b07ef7415407b95f180

commit 295e392d7851ac3db405c74b5d5778f31c6e331f
Author: Dmitry Shulga <dmitry.shulga@oracle.com>
Date:   Tue Nov 7 17:44:50 2017 +0700

    Follow-up patch for the bug#25185947 -- ISSUES WITH RENAMING ROOT USER
    
    This patch suppresses warning messages like
    "mysqld: Cannot load from mysql.columns_priv. The table is probably corrupted"
    for the test main.ps_sys_upgrade.
    
    Such warning messages are emitted by the statement FLUSH PRIVILEGES that is run by
    mysql_upgrade in order to create the new user mysql.infoschema@localhost as part of
    server upgrade. The reason for issuing a warning is that the length of the column
    'user' for  tables  mysql.user, mysql.db, mysql.columns_priv, mysql.procs_priv
    was changed from 32 to 16 before server upgrade is started. So such warning are expected
    and can be safely ignored.

commit 020053b1d43816a644a36add3279e7a8f09691da
Merge: b7479fd a27e2ff
Author: Nuno Carvalho <nuno.carvalho@oracle.com>
Date:   Tue Nov 7 11:18:35 2017 +0100

    Merge branch 'mysql-5.7' into mysql-8.0

commit a27e2ffe9f4213eca481bb72d08a037d2637362c
Author: Nuno Carvalho <nuno.carvalho@oracle.com>
Date:   Fri Nov 3 18:05:18 2017 +0100

    BUG#27049034: SOMETIMES MEMBERS ENTER IN ERROR STATE AFTER LONG RECOVERY
    
    In Group Replication, when a member join a group it goes through the
    recovery process in order to have the same data as of the group.
    The recovery process is composed by 3 stages:
      1) Apply existent transactions on group_replication_applier, if
         existent, this happens when this member already was a member of
         the group and left with transactions to apply.
      2) Fetch and apply the data the new member is missing when
         compared with the group. This happens through a asynchronous
         replication channel, named group_replication_recovery, which
         stop condition is apply all data until the moment on which the
         new member joined, marked by View_change_log_event.
         While this is ongoing, the concurrent group workload is being
         queued and will be deal with on the next stage.
      3) Apply the queued transactions during stage 2 and then switch
         the member status to ONLINE.
         The stop condition is:
           5.7: the new member will wait until the queue is empty and
                group_replication_applier applied all transactions.
           8.0: the new member will wait until the number of
                transactions queued during the 2nd stage are applied.
    
    On this bug, at the end of the 3rd stage, the recovery process
    reached its termination condition, that is, all accounted
    transactions are applied.
    On that *exact* moment, a new transaction is being queued. Please
    remember that transactions are materialized as events on binary and
    relay logs.
    When the applier signals that applied all transactions, it is also
    blindly searching for partial transactions, that will remove to
    avoid future applier errors, which would happen if the applier did
    stop at this point.
    Though, this search and remove does only make sense on applier stop
    cases. On execution completeness that must not be done, otherwise it
    can corrupt or purge the applier relay log, which can led to data
    loss.
    
    To solve the above issue, when the applier is waiting for execution
    completeness, it does not search and remove partial transactions.

commit b7479fd89440527599c1dd8d9327fdfde4127e72
Author: Daogang Qu <bill.qu@oracle.com>
Date:   Tue Nov 7 17:05:04 2017 +0800

    Bug #25694140  THE IMPLEMENTATION OF QUERYING P_S.REPLICATION_APPLIER_FILTERS IS SUBOPTIMAL - post fix
    
    There is a UBSAN trouble. Which is caused by copying an empty string.
    
    To fix the problem, do not copy an empty string.

commit 1948c61b2b37681cfc4d1525df8f246f0c229520
Author: Guilhem Bichot <guilhem.bichot@oracle.com>
Date:   Mon Nov 6 15:06:47 2017 +0100

    Bug#27068017 COLUMN METADATA REGRESSION SEEN IN TEST X.NOTICES_ENABLE
    
    Fix: just record the new, better result.
    
    Cause: in the output of the X plugin,
    flags=128 means MYSQLX_COLUMN_FLAGS_MULTIPLE_KEY i.e. column is part
    of an index (see  xpl::Streaming_command_delegate::field_metadata()).
    In the query:
     select grp,group_concat(a order by a,d-ascii(c)-a) from test.t1
     group by grp order by grp;
    "grp" which is received by the client is not directly t1.grp;
    it is an intermediate column created by setup_copy_fields() (for GROUP BY), so it is
    not indexed (whereas t1.grp is): there's no indexing which the user
    may use on this column. To create this column, setup_copy_fields() calls
    Field::new_field() which precisely takes this flag down (as well as
    some other flags which similarly don't "survive through a tmp
    table step", and unlike flags which do survive e.g. UNSIGNED).
    So it is proper to not show this flag to the user, for this query.
    This is a good side-effect of the fix for Bug#26188578 ; it's because
    in that fix, we let item->field point to the new field, not the original
    field, in setup_copy_fields().

commit d802604849d88cf88d84676bbfd1fb2fce11dbf8
Merge: 2c5473a 425b08c
Author: Parveez Baig <parveez.baig@oracle.com>
Date:   Tue Nov 7 13:19:26 2017 +0530

    Null-merge from 5.7.

commit 425b08c716b8adb93ed1c1d22c3e9268025d7ca0
Author: Parveez Baig <parveez.baig@oracle.com>
Date:   Mon Nov 6 10:31:38 2017 +0530

    WL11144: Improve test coverage for create user/alter/drop if exists with replication
    
      This patch adds test coverage for scenarios around
    create/alter/drop user IF[NOT] exists.

commit 2c5473a12aa686f44676f9c7bce0e299d371973c
Author: Xing Zhang <xing.z.zhang@oracle.com>
Date:   Tue Nov 7 15:37:36 2017 +0800

    Bug #27041420: ASSERTION `LENGTH == 3' FAILED.
    
    In Item_func_weight_string::val_str(), output_buf_size is rounded up to be
    even number. But Field_newdate still asserts length of odd number. Remove
    the assertion because Field_newdate::make_sort_key() always uses three
    bytes and the extra byte will be truncated in Item_func_weight_string::
    val_str(). So the rounded up byte won't have any impact on it.
    
    Change-Id: I02065865461c3d3f9a69583a2cac0fe7e0309ee3

commit 4a4ab4ba79b6c71ff6c9f3aef1514f96af50a6f3
Author: Gopal Shankar <gopal.shankar@oracle.com>
Date:   Tue Nov 7 07:54:40 2017 +0100

    Bug#26199233 create like ignores innodb_file_per_table
    
    Post-push change. Recording results of memcached.memc286_sdi_create.
    The implicit tablespace name's are not shown in SHOW CREATE TABLE
    now after the fix for above bug. This behaviour is in sync with 5.7.

commit a653e0a28ae9da0435cbbd086c3cc8afed8a4685
Author: Ashish Padiyar <ashish.padiyar@oracle.com>
Date:   Tue Nov 7 12:11:14 2017 +0530

    Bug#26965866: MYSQL_UPGRADE_GRANT.TEST RUNS TOO MUCH, CAUSING TIMEOUT
    
    Issue:
    ------
    mysql_upgrade_grant test was timing out quite often on solaris11-sparc-64bit
    in 8.0+ branches. The test runs for a considerably long time on other platforms
    as well.
    
    Fix:
    -----
    --source include/big_test.inc was added to make the test a big test.

commit c282140aa4bb76455a38be223589c6a442cef083
Author: Praveenkumar Hulakund <praveenkumar.hulakund@oracle.com>
Date:   Tue Nov 7 05:12:09 2017 +0100

    WL#11143 - Change default log_error_verbosity to 2
    
    Default value of system variable log_error_verbosity is changed
    from 3 to 2 as part of this WL.
    
    The purpose is to make MySQL less verbose by default.
    
    Change-Id: If4378434beb7ecc23062fe54ab913b22b29d9478

commit b0d8742aa8863d9f47f0e04038d0eff977049cdd
Author: Daogang Qu <bill.qu@oracle.com>
Date:   Tue Nov 7 09:28:21 2017 +0800

    Bug #25694140  THE IMPLEMENTATION OF QUERYING P_S.REPLICATION_APPLIER_FILTERS IS SUBOPTIMAL
    
    When querying performance_schema.replication_applier_filters or
    performance_schema.replication_global_applier_filters tables,
    it generates a view on the filters for every row that is
    created. This is suboptimal.
    
    We implement the best approach to make sure that the P_S view over
    the filters is generated only when the filters are changed. To
    per-channel replication filters, actually increasing counter does
    not change the structure of the P_S view. So we should hold the
    write lock of rpl_channel_filters to generate the P_S view only on
    startup, on CHANGE REPLICATION FILTER, on RESET SLAVE ALL, and on
    CHANGE MASTER to ..., then we just need to hold a read lock of
    rpl_channel_filters to read the P_S view while querying
    P_S.replication_applier_filters. To global replication filter,
    we should hold the write lock of Rpl_global_filter to generate
    its P_S view only on startup and on CHANGE REPLICATION FILTER,
    then we just need to hold a read lock of Rpl_global_filter to read
    its P_S view while querying P_S.replication_applier_global_filters.
    At the same time, we optimize the code to create a derived class
    of class Rpl_filter for global replication filter and fix a prone
    issue.

commit f7efb398c569c2a3cf91eb6833c763c5f1bd5c3c
Merge: 98704d2 5a47424
Author: Aditya A <aditya.a@oracle.com>
Date:   Mon Nov 6 23:17:48 2017 +0530

    Merge branch 'mysql-5.7' into mysql-8.0

commit 5a4742471b22735171226e0d062ada527b864662
Merge: bd92340 e18ac41
Author: Aditya A <aditya.a@oracle.com>
Date:   Mon Nov 6 23:12:55 2017 +0530

    Merge branch 'mysql-5.6' into mysql-5.7

commit e18ac41fb7481b119988a8a31a30b517971d6a5c
Author: Aditya A <aditya.a@oracle.com>
Date:   Mon Nov 6 23:09:26 2017 +0530

    Bug #26256456	INNODB CRASHED WHEN MASTER THREAD EVICT DICT_TABLE_T OBJECT
    
    PROBLEM
    -------
    
    1) Flush table command fails to drop the aborted index because the drop_aborted condition is
       checked after n_ref_count is decremented.
    
    2) While removing the table from cache in background ,we were first dropping the clustered index
       and then checking for aborted index which is wrong because to drop aborted index we require
       to traverse to the index list.Since the index list is deleted we ended up in an assert
    
    FIX
    ---
    
    1) Check drop_aborted condition before decrementing n_ref_count.
    2) When removing the table from cache in background ,check for aborted condition first,drop the
       aborted indexes and then proceed to drop the rest of indexes.

commit 98704d2d05f6711ff55375f065374e470eba5891
Author: Maria Couceiro <maria.couceiro@oracle.com>
Date:   Wed Sep 20 15:21:40 2017 +0100

    BUG#26762675 INNODB: PARTIAL UPDATE DOES NOT PERFORM ON SLAVE SIDE
    
    Problem:
    The slave will not generate and apply binary diffs when it receives
    partial update row log events from the master when binlog_row_value_options
    is set to partial_json only on the master.
    
    Fix:
    The slave now generates and applies binary diffs whenever it receives a
    partial update row log event from the master, independently of its
    binlog_row_value_options value.

commit a4acaf66e99517c21fb6034f2fa40e4b2322cb94
Author: Knut Anders Hatlen <knut.hatlen@oracle.com>
Date:   Fri Oct 20 15:49:38 2017 +0200

    Bug#20964700: RECURSION OF ITEM_FUNC::WALK LEAD TO STACK OVERFLOW
    
    Constant propagation is sometimes too eager and creates cycles in the
    Item tree, which again leads to infinite recursion when the Item tree
    is processed.
    
    This patch skips constant propagation when the constant expression
    contains a reference to the column it is meant to replace, thus
    avoiding the creation of cycles in the Item tree.

commit a7eb92d3cfe9e9ea2044ac1004f9da4f79f4fc91
Author: Deepa Dixit <deepa.dixit@oracle.com>
Date:   Mon Nov 6 14:36:52 2017 +0530

    Bug#26985269: MTR STILL SEARCHING FOR OBSOLETES MYSQLD-{NT,MAX,MAX-NT}
                  AND OBSOLETE DIRS
    
    Issue:
    ------
    MTR searches for a long list of mysqld variants, some of which
    are obsolete now. It also looks for the binaries in a long list of paths,
    some of which are Windows specific. The code needed to be cleaned up.
    
    Fix:
    ----
    Windows specific paths are searched only on Windows, and the obsolete
    mysqld variants have been removed.
    
    Reviewed-by: Pavan Naik <pavan.naik@oracle.com>

commit b1208abb4d3426b7a4eb3c659f5afb4bd5469f33
Author: Magnus Blåudd <magnus.blaudd@oracle.com>
Date:   Mon Nov 6 11:24:41 2017 +0100

    WL#9185 MySQL Cluster support for new DD
    
     - add testcase checking that you get same table id in NDB
       after a truncate, NDB will reuse the same table id for same name
       if it's still free

commit 403960a9b562a7755b38d3b0688e8e7be6813102
Author: Magnus Blåudd <magnus.blaudd@oracle.com>
Date:   Fri Nov 3 08:39:57 2017 +0100

    Bug#26990244 REMOVE WERROR WARNINGS FROM NDBCLUSTER [noclose]
    
     - fix unused parameter warnings in ndbapi and util include files
       used by ndbcluster
     - define ATTRIBUT_UNUSED rather than using the MY_ATTRIBUTE, this is
       analogue to ATTRIBUTE_NOINLIN, ATTRIBUTE_NORETURN already in
      ndb_global.h

commit dddd4bca77bef8503ca2de05e54a6c74597e6404
Author: Magnus Blåudd <magnus.blaudd@oracle.com>
Date:   Fri Nov 3 08:37:35 2017 +0100

    Bug#26990244 REMOVE WERROR WARNINGS FROM NDBCLUSTER [noclose]
    
     - change the suppression of -Wunused-parameter warning to
       suppress it only no to fail during -Werror build.
       This  makes the warning visible.

commit e9cc7b145273de253829fba54c01daf21d283269
Author: Magnus Blåudd <magnus.blaudd@oracle.com>
Date:   Mon Nov 6 08:08:04 2017 +0100

    WL#9185 MySQL Cluster support for new DD
    
     - remove unnecessary cast of cloned table object

commit 2d89c1db038c9bfaf680a7920d4f1b7cf50e1c72
Author: Knut Anders Hatlen <knut.hatlen@oracle.com>
Date:   Tue Oct 31 13:58:28 2017 +0100

    Bug#27010089: ASSERTION FAILURE:
                  ROW0SEL.CC:2846:TEMPL->MYSQL_COL_LEN == LEN
    
    When evaluating an end-range condition in a scan of a non-covering
    secondary index, and the end-range condition references an indexed
    virtual column, InnoDB may read the wrong column from the index. This
    could lead to assertion failures or wrong results.
    
    This happens because row_search_end_range_check() calls
    row_sel_store_mysql_field() with false as the last argument. The type
    of that argument has changed from bool to ulint to represent a column
    number. The argument value false is implicitly converted to zero, and
    is therefore interpreted as the column number zero, which is not
    necessarily correct.
    
    The fix is to pass ULINT_UNDEFINED instead of false as the last
    argument torow_sel_store_mysql_field(). This follows the pattern from
    Bug#25175249, which changed the type of the argument from bool to
    ulint, and which also changed callers that passed false as the last
    argument to pass ULINT_UNDEFINED instead.
    
    Change-Id: I73f1ab921235e507421f0df807fdc0e0d1614ffe

commit 16abb7aa34bafa6f02dfe1cdb3eeaf8d78d50b81
Author: Balasubramanian Kandasamy <balasubramanian.kandasamy@oracle.com>
Date:   Mon Nov 6 14:40:50 2017 +0530

    Add mysqlbackup to docker rpm builds

commit 8ed58b61e86a6558b52c250532f1c3ca8446941b
Merge: af4e595 bd92340
Author: Lars Tangvald <lars.tangvald@oracle.com>
Date:   Mon Nov 6 09:49:42 2017 +0100

    Merge branch 'mysql-5.7' into mysql-8.0

commit bd923401a0fa31ff06e7af5c11d4c123fdb152c3
Merge: d54337a a526762
Author: Lars Tangvald <lars.tangvald@oracle.com>
Date:   Mon Nov 6 09:48:55 2017 +0100

    Merge branch 'mysql-5.6' into mysql-5.7

commit a526762625f456e61a0cc89c9cf39887d1b94cf8
Author: Lars Tangvald <lars.tangvald@oracle.com>
Date:   Mon Nov 6 09:48:03 2017 +0100

    Deb packaging: Remove handling of eol'ed Ubuntu 12.04, 15.10 and 16.10

commit af4e595d6bf980917ffe545c667f33aae6f6dec3
Merge: 84ed023 d54337a
Author: Lars Tangvald <lars.tangvald@oracle.com>
Date:   Mon Nov 6 09:43:51 2017 +0100

    Merge branch 'mysql-5.7' into mysql-8.0

commit d54337a13eada6c9d28d0c3ad97b5d04458727f5
Merge: 077ba45 1be7db9
Author: Lars Tangvald <lars.tangvald@oracle.com>
Date:   Mon Nov 6 09:43:34 2017 +0100

    Null-merge from 5.6

commit 1be7db9219e227862a4eed9b9025574a1befe5ba
Author: Lars Tangvald <lars.tangvald@oracle.com>
Date:   Mon Nov 6 09:39:56 2017 +0100

    Deb packaging: Remove unused packaging files

commit f9f1e15e50f4bc71420dddfa86e50c5fbcbfb0f6
Merge: f7fecd6 66720e1
Author: Mauritz Sundell <mauritz.sundell@oracle.com>
Date:   Mon Nov 6 09:21:43 2017 +0100

    Merge branch 'mysql-5.7-cluster-7.6' into mysql-8.0-cluster-8.0

commit 66720e128e18da1e26362e80b7c64788408da847
Merge: c19690f b65cbe5
Author: Mauritz Sundell <mauritz.sundell@oracle.com>
Date:   Mon Nov 6 09:20:20 2017 +0100

    Merge branch 'mysql-5.7-cluster-7.5' into mysql-5.7-cluster-7.6

commit b65cbe5ed24f191f945e77a52488f8ce407fd43f
Merge: fdd26c5 9974fec
Author: Mauritz Sundell <mauritz.sundell@oracle.com>
Date:   Mon Nov 6 09:18:56 2017 +0100

    Merge branch 'mysql-5.6-cluster-7.4' into mysql-5.7-cluster-7.5

commit 9974fec08ebd29350457cc0f296e10594b1ddf5e
Merge: 25f358a fabfb37
Author: Mauritz Sundell <mauritz.sundell@oracle.com>
Date:   Mon Nov 6 09:16:16 2017 +0100

    Merge branch 'mysql-5.6-cluster-7.3' into mysql-5.6-cluster-7.4

commit fabfb3743248fe1d8abfa8951a7e8e9c0a9f7074
Merge: 8702af5 55cfc32
Author: Mauritz Sundell <mauritz.sundell@oracle.com>
Date:   Mon Nov 6 09:15:55 2017 +0100

    Merge branch 'mysql-5.5-cluster-7.2' into mysql-5.6-cluster-7.3

commit 55cfc320d5d43ffb7cd96ba99a0d4cb1f6b13bb3
Author: Mauritz Sundell <mauritz.sundell@oracle.com>
Date:   Mon Nov 6 09:14:26 2017 +0100

    BUG#26979030: Change && to -a for test in shell script

commit 84ed023d4d691e29692db286515d8284191ff102
Author: Thayumanavar S <thayumanavar.x.sachithanantha@oracle.com>
Date:   Mon Nov 6 07:53:28 2017 +0100

    BUG#26948662 - REMOVE SUPER_ACL CHECK IN RESOURCE GROUPS.
    
    Post push fix - fix failing tests.

commit e13caa10419a08c0e5cdda1b9969a848ef2a1e0a
Merge: 4cd938e 077ba45
Author: Aditya A <aditya.a@oracle.com>
Date:   Mon Nov 6 11:14:36 2017 +0530

    Merge branch 'mysql-5.7' into mysql-8.0

commit 077ba45a0537fafae58ae7704678d3b60c390c7c
Author: Aditya A <aditya.a@oracle.com>
Date:   Mon Nov 6 11:05:22 2017 +0530

    Bug #22486025	INNODB: FAILING ASSERTION: KEY_LEN != 0 || FIND_FLAG != HA_READ_KEY_EXACT
    
    This assertion basically comes because innodb doesn't support
    index on zero length column.This problem comes only for
    innodb intrinsic temporary table. It was decided that we will
    presently return an error for the queries which build a
    index on a zero length column . Supporting the index on
    zero length column will be taken as a separate bug.

commit 4cd938e5e2aa270334ebd9240e6e3b91e598b297
Author: narayanan <v.narayanan@oracle.com>
Date:   Mon Nov 6 10:57:45 2017 +0530

    Valgrind failure in meb.big_validate_cmp_image
    
    When uncompress fails (with an exception) in the process workflow,
    it causes the buffer element dequeued from the source queue to be
    lost, resulting in a memory leak. This patch ensures that an exception
    thrown is caught and the memory is freed.
    
    RB: 17813

commit 61d3d58bf9e1e69297300e560290e6d81803be55
Author: Anitha Gopi <anitha.gopi@oracle.com>
Date:   Mon Nov 6 02:30:21 2017 +0100

    Fixed format of default.experimental

commit 1bc42c8b6c92753e9048cd2cb58214892c490b72
Author: Darshan M N <darshan.m.n@oracle.com>
Date:   Sat Nov 4 13:39:43 2017 +0100

    BUG#26562371 INNODB: ASSERTION FAILURE: LOCK0LOCK.CC:NNN:!TRX
    || !LOCK_REC_OTHER_TRX_HOLDS_EX
    
    Issue:
    ======
    
    After [ wl#10793: Use VATS for scheduling lock release under high load],
    we ignore transaction locks that are marked or chosen as deadlock victim.
    
    This needs to be handled in debug functions where we assert for
    conflicting locks. We handle it already in lock_rec_other_has_expl_req()
    and a similar check is needed in lock_rec_other_trx_holds_expl().
    
    Fix:
    ====
    
    Fix for [Bug #24344131] - rb#16742, handles similar debug assert issue
    when a transaction is perceived committed after it is removed from rw
    list.
    
    So the fix for this bug involves putting together both the conditions and
    checking in all required places to avoid assert for conflicting locks:
    
    1)    Transaction is being committed [not in rw list]
    2)    Transaction is being rolled back
    
    RB: 17101
    Reviewed-by: Debarun Banerjee <debarun.banerjee@oracle.com>

commit 88b5b599ef117355c7ebd582ba7c734d1b10709d
Merge: b20ad5f cba8a83
Author: Dyre Tjeldvoll <Dyre.Tjeldvoll@oracle.com>
Date:   Sat Nov 4 18:21:32 2017 +0100

    Null-merge of [cba8a83 Bug#26739438: DEADLOCK ON GET_LOCK(..., 0)] from mysql-5.7

commit cba8a8376783d75a31d47c8104143fdfab7c89d5
Author: Dyre Tjeldvoll <Dyre.Tjeldvoll@oracle.com>
Date:   Sat Nov 4 18:19:10 2017 +0100

    Bug#26739438: DEADLOCK ON GET_LOCK(..., 0)
    
    Problem: Concurrent calls to GET_LOCK could cause deadlock, even with
    a wait time of 0.
    
    Root cause was that MDL_context::acquire_lock() would add the ticket
    as waiter and perform deadlock detection analysis even when the wait
    time was 0.
    
    Solution: Return error immediately if lock cannot be obtained and wait
    time is 0.
    
    (cherry picked from commit c528fee7d9c8186bcc14549f62b1f835ab01c0c5)

commit b20ad5f92407451058150472cc71aa0f72b93493
Author: Hemant Dangi <hemant.dangi@oracle.com>
Date:   Fri Nov 3 20:37:11 2017 +0530

    Bug#26435775: START AND STOP GR HANGS AFTER NO SPACE LEFT ON DEVICE ERROR
    
    Issue:
    ======
    When user tries to kill the START GROUP_REPLICATION thread which is blocking
    for very long time, it changes its state to killed but it still doesn't die.
    Such a case is when the applier module initialization is waiting for disk
    space. Also the user is not able to execute new START/STOP GROUP_REPLICATION
    query, as they also blocks on lock (plugin_running_mutex).
    Internally, START GROUP_REPLICATION thread acquires a lock (plugin_running_mutex)
    which it only release when it finishes. And when user tries to kill any thread
    in MySQL it doesn't kill the thread, just set its THD::killed state to either
    of THD::killed_state. As we wait for the applier module to start without looking
    at the thread state, the start group replication procedure is stuck. So till this
    START GR thread release the plugin_running_mutex lock, the user can't stop group
    replication or start a new one.
    
    Solution:
    =========
    The start group replication thread waits for applier to complete.
    We change its blocking wait to timedwait where it can check THD::killed
    state after every 1 second, and if it finds that thread has been killed,
    it comes out of wait loop.

commit ec19be9f478d4ec2092f7db32c07b150e10e4038
Author: Dyre Tjeldvoll <Dyre.Tjeldvoll@oracle.com>
Date:   Thu Oct 19 10:18:08 2017 +0200

    Bug#26739438: DEADLOCK ON GET_LOCK(..., 0)
    
    Problem: Concurrent calls to GET_LOCK could cause deadlock, even with
    a wait time of 0.
    
    Root cause was that MDL_context::acquire_lock() would add the ticket
    as waiter and perform deadlock detection analysis even when the wait
    time was 0.
    
    Solution: Return error immediately if lock cannot be obtained and wait
    time is 0.
    
    (cherry picked from commit c528fee7d9c8186bcc14549f62b1f835ab01c0c5)

commit f7fecd648e2bc656191fb2aa4f4e3a748f75c492
Merge: 2f010ea c19690f
Author: Ole John Aske <ole.john.aske@oracle.com>
Date:   Fri Nov 3 15:08:15 2017 +0100

    Merge branch 'mysql-5.7-cluster-7.6' into mysql-8.0-cluster-8.0

commit 2461b869c7f3d03c0820d7591f213c5059c96b96
Author: Nuno Carvalho <nuno.carvalho@oracle.com>
Date:   Thu Oct 26 17:53:20 2017 +0200

    BUG#26187850: TRANSACTION-WRITE-SET-EXTRACTION OPTION CAN CAUSE CONCURRENCY LOSS
    
    When --transaction-write-set-extraction option is enable, which
    among other computations, does call
    ha_innobase::get_foreign_key_list() to gather the foreign keys
    involved on the current transaction, it was observed that on some
    situations there is serialization between
    ha_innobase::get_foreign_key_list() and concurrent DDLs.
    What would happen is the DML would wait for the DDL to complete,
    that is, it would be serialized without need, apart from the use of
    ha_innobase::get_foreign_key_list().
    
    On 8.0 we have the new Data Dictionary in place, which brings a new
    API to interact with table definitions and foreign keys.
    On this patch we did replace the use of
    ha_innobase::get_foreign_key_list() with the dd::Foreign_key API
    cache provided at TABLE_SHARE_FOREIGN_KEY_INFO, eliminating the
    serialization issue.
    As a bonus, we did also extend the tests with foreign keys that
    reference unique keys.

commit 2b99a8387d0bcf5f89dd56218194a5d41e49bf27
Merge: 87da035 38cf041
Author: Libing Song <libing.song@oracle.com>
Date:   Fri Nov 3 21:43:48 2017 +0800

    Null-merge from 5.7.

commit 38cf041bd3e5cf9ab69b2574c31a2b12ca233f4f
Author: Libing Song <libing.song@oracle.com>
Date:   Fri Nov 3 21:41:47 2017 +0800

    BUG#26474110 RPL_KILLED_DDL USES A DEBUG POINT NOT EXIST
    
    Post fix: included have_debug_sync.inc into the test

commit 2f010eaf8c3cd8d7902c4aae5f6ebfcb03da02f6
Author: Dinesh Surya Prakash <dinesh.prakash@oracle.com>
Date:   Mon Oct 23 14:10:27 2017 +0530

    Bug#26966826 PORT BUG#23523926 DEPRECATE "PERROR --NDB" TO 8.0
    
    "perror" is a mysql tool to give error message for an error code. We can
    also get ndb cluster error messages when we pass "--ndb" as argument along
    with error code. But now a new tool called "ndb_perror" is available
    exclusively for ndb cluster. Hence now depricating "--ndb" functionality in
    "perror".
    
    BUG#23523926 does the same fix on 7.6 version. But, mysql-trunk have renamed
    and moved the file "\extra\perror.cpp" to "\utilities\perror.cc".So, during
    8.0 merge this change is conflicted and missed.
    
    Now, making the fix directly into "mysql-trunk" to avoid conflicts in
    future.
    
    (cherry picked from commit ac74bdd8b330f531743189e4cec14453fb791137)

commit 87da035673d3d3a2be0283877136ca4d38bb3ed3
Merge: 5eaae2c 26429d5
Author: Bjorn Munch <bjorn.munch@oracle.com>
Date:   Fri Nov 3 12:28:24 2017 +0100

    Merge branch 'mysql-5.7' into mysql-8.0

commit 26429d55448d54c7e0ecf070956e48fdcfca603a
Merge: 6abbd99 652df2a
Author: Bjorn Munch <bjorn.munch@oracle.com>
Date:   Fri Nov 3 12:25:38 2017 +0100

    Merge branch 'mysql-5.6' into mysql-5.7

commit 652df2a2d82d9ea029d3df9da371279298983e9c
Merge: 2fbe5e2 f92722b
Author: Bjorn Munch <bjorn.munch@oracle.com>
Date:   Fri Nov 3 12:23:21 2017 +0100

    Merge branch 'mysql-5.5' into mysql-5.6

commit f92722b5d9713947f22018f28eee971c7e547c7e
Author: Bjorn Munch <bjorn.munch@oracle.com>
Date:   Fri Nov 3 12:21:26 2017 +0100

    Bug #27021754 MYSQLTEST MAN PAGES WILL BE REMOVED, PACKAGING MUST BE PREPARED
    
      Removed relevant man pages from file lists for RPM and DEB
    
      RPM: added conditional removal of them, so it works both before and
      after man pages are actually removed
    
      DEB: added to exclude list (5.6+)

commit 5eaae2c97d7f6bb4df15f49eda81873593e9edd4
Author: Thayumanavar S <thayumanavar.x.sachithanantha@oracle.com>
Date:   Fri Nov 3 11:52:57 2017 +0100

    BUG#26948662 - REMOVE SUPER_ACL CHECK IN RESOURCE GROUPS
    
    SUPER_ACL usage is deprecated. This patch removes the SUPER_ACL
    checks in resource groups. The patch also adds an information
    note to the log during mysqld startup either if the platform doesn't
    support tuning thread priority, which implies that thread priority settings
    in resource groups SQL commands are ignored.

commit 84694b6b33f0df3bdaa995295f25586883e23eea
Merge: d20a8b3 6abbd99
Author: Dyre Tjeldvoll <Dyre.Tjeldvoll@oracle.com>
Date:   Fri Nov 3 11:12:51 2017 +0100

    Null-merge of [6abbd99 Bug#26931470: PLEASE BACKPORT TO 5.7: DEFAULT LOG-TC-SIZE TOO SMALL ON POWER - 3 * ( 64K PAGE] from mysql-5.7

commit 6abbd99b6620a2f52d4ecc2f6206530accf7be81
Author: Jon Olav Hauglid <jon.hauglid@oracle.com>
Date:   Fri Nov 3 11:11:27 2017 +0100

    Bug#26931470: PLEASE BACKPORT TO 5.7: DEFAULT LOG-TC-SIZE TOO SMALL ON POWER - 3 * ( 64K PAGE
    
    This is a backport to 5.7 of
    
    Bug#23014086: DEFAULT LOG-TC-SIZE TOO SMALL ON
                  POWER - 3 * ( 64K PAGE SIZE) MINIMIUM NEEDED
    
    The problem was that the memory page size for the memory mapped
    transaction coordinator was hardcoded to 8k. This did not work
    properly on platforms like ARM64 and PowerPC where the page
    size is much larger.
    
    This patch fixes the problem by using my_getpagesize() to get
    the page size of the current platform rather than using a hardcoded
    value.
    
    This has consequences for and changes the behavior of the
    --log-tc-size startup option. The minimum and default value
    of the option is now 6 * pagesize. This means it is still
    24k on Linux (4k pagesize). The value also now has to be
    multiples of pagesize rather than multiples of 8k.
    
    Patch based on contribution from Alexey Kopytov.
    
    (cherry picked from commit e3b09cae22163edfc1951641767b776c8545ad49)
    
    Original backport provided by Daniel Black.

commit c19690fa141c6bdee4625716e6361b97be413abe
Author: Ole John Aske <ole.john.aske@oracle.com>
Date:   Fri Nov 3 09:37:23 2017 +0100

    Bug #27022925 SPJ: 'MATERIALIZED' SEMI JOINS ARE NOT CONSIDDERED FOR JOIN PUSHOWN
    
    The 'Materialized' part of a semi join execution was represented in such a way
    that it was not even 'visible' for the code evaluating the pushability
    if a query plan.
    
    The pitfall turned out to be that there are two slightly different
    'counts' representing the number of tables in a query plan,
    'primary_tables' and 'tables'. It turns out that the 'primary_tables'
    did not include the materialized tables in its count.
    
    This patch change the init of table 'count' in the class Join_plan
    to use 'tables' instead of 'primary_tables'. The materialized
    part of the query plan will then become visible.
    
    As a side effect some 'non-real' (temporary) tables added by the
    optimizer also becomes visible. Thus the patch also added check
    for 'table() != NULL' a couple of places in order to ignore
    such non-real tables.

commit 9c091788b6e664bb48c55e4ce6139bf4cb8854be
Merge: c8069ee a7c7d48
Author: Ole John Aske <ole.john.aske@oracle.com>
Date:   Fri Nov 3 09:12:08 2017 +0100

    Merge branch 'mysql-5.7-cluster-7.6' into mysql-8.0-cluster-8.0

commit d20a8b37d8cf3f64e172e2c10bd41d41d53f56b4
Author: Venkatesh Duggirala <venkatesh.duggirala@oracle.com>
Date:   Fri Nov 3 12:23:52 2017 +0530

    Bug#26748533 SEMISYNC MASTER CRASH AFTER RESET MASTER
    
    Post push: Fixing pb2 failure. The test should be run
    only with non gtid mode.

commit a7c7d48cbbd0b841426b32cdf7f658f1362b2f54
Merge: 02ab9bf fdd26c5
Author: Ole John Aske <ole.john.aske@oracle.com>
Date:   Thu Nov 2 12:18:58 2017 +0100

    Merge branch 'mysql-5.7-cluster-7.5' into mysql-5.7-cluster-7.6

commit fdd26c5c0d4794d9425292235b4e77bc0be77fc1
Merge: f01f9a3 25f358a
Author: Ole John Aske <ole.john.aske@oracle.com>
Date:   Thu Nov 2 12:18:12 2017 +0100

    Merge branch 'mysql-5.6-cluster-7.4' into mysql-5.7-cluster-7.5

commit 25f358a11ce01f79143835de0084466c512547f1
Author: Ole John Aske <ole.john.aske@oracle.com>
Date:   Thu Nov 2 12:03:21 2017 +0100

    Bug#26984919 	SPJ: 'DUPLICATE WEEDOUT' STRATEGY MAY RETURN INCORRECT RESULTS
    
    This is a problem similar to what was recently fixed in
    
    - Bug#26926666 SPJ: 'LOOSESCAN' TABLES SHOULD NOT BE CHILD MEMBERS IN A PUSHED JOIN
    
    Furthermore, there also existed a similar 'push limitation'  for
    child tables using the 'FirstMatch' semi join strategy, probably since
    the first release of the join pushdown feature.
    
    After studying all these 3 limitations, we realize that the common denominator
    for them all, is that a scan-child being part of a semi join 'nest', should
    not be pushdown joined with a parent table not being within the same
    semi joined 'nest'.
    
    This patch takes advantage if this realization and thus implement
    a single mechanism covering this pushability limitation for
    both the existing 'FirstMatch' and 'LooseScan' strategy, as well
    as the 'Duplicate weedout' being the subject of this bug report.
    
    The abstract_query_plan method ::get_join_type() is extended
    to also identify JT_SEMI_JOIN between a tableand its predecessor.
    
    ::is_pushable_as_child() replace its current logic to catch
    'FirstMatch' and 'LooseScan' handling with checking for JT_SEMI_JOIN
    instead, which now will also automagically catch 'Duplicate weedout'.
    
    As a side effect a MTR testcase which previously incorrectly
    rejected 'FirstMatch' pushing of two tables inside the *same*
    semi join nest is now allowed to be pushed.
    
    The 'explain' -> show warnings output is slightly changed as a
    result of not specifically checking for 'FirstMatch' and
    'LooseScan' anymore. Instead 'semi join' is reported
    as the reject reason.

commit 27244736c63237121c6719bec731a179e938fba7
Author: Knut Anders Hatlen <knut.hatlen@oracle.com>
Date:   Mon Oct 30 16:28:05 2017 +0100

    Bug#27041288: ASSERTION FAILURE:
                  ROW0SEL.CC:3955:PREBUILT->MYSQL_PREFIX_LEN <= RECORD_BUFFER..
    
    If a table contains a column whose length is zero, the optimizer may
    allocate a record buffer that is too small to hold the columns read by
    the query. This leads to an assert failure in debug builds.
    
    The optimizer looks for the last column accessed by the query in order
    to find out how much space it needs for each record. To find the last
    column, it compares the pointers to the beginning of each of the
    columns. When one of the columns has zero length, two columns may have
    the same start position. Since the algorithm doesn't have any
    tie-breaker for this case, it may end up returning the second to last
    column instead of the last column.
    
    The fix is to compare the end of the column instead of the beginning
    of the column, since it is the end that is interesting when
    calculating the minimum space needed for a record.
    
    Change-Id: Iadc3a0782dd3bcc553993eeb4ecc4b42b0fc07fa

commit 452aeee2ca3894c9ac67eb968c39e41335e20c9b
Author: Ole John Aske <ole.john.aske@oracle.com>
Date:   Thu Nov 2 11:15:52 2017 +0100

    Bug#26919289 Addendum patch
    
    Previous patch for the 'MYSQLD CRASH DURING 'JOIN PUSHDOWN' ANALYSIS'-bug
    assured that the m_remap[]-array was initialized upto the 'count' tables
    in the query plan.
    
    However, there were other code paths which tried to access m_remap[]
    beyond the end of 'known' tables. Typically such cases are found
    where the query planner decide to create a (temporary-) materialized subquery
    table which is placed after the 'normal' tables in the query plan.
    
    This patch ensures that the illegal table enum value 'MAX_TABLES' is
    returned as the table number when accessing such a table.

commit 4daa0db26824162421e58cfbb1b397692ed510ba
Author: Krzysztof Kapuścik <krzysztof.kapuscik@oracle.com>
Date:   Tue Oct 17 09:32:10 2017 +0200

    Bug#26940197 CREATE TABLESPACE DELETES USER FILE
    
    When tablespace create is requested the delete tablespace
    operation is scheduled in DDL LOG. This operation is
    removed if create succeeds or executed on failure.
    
    The problem was that if the file already existed (for
    example because it was another tablespace file just
    specified with other path) the file was deleted.
    
    With this fix there is a check for file existence before
    the delete is added to DDL LOG preventing the user file
    being deleted on rollback.

commit 978cb11ad4357805c2a8ca88dbe2bdb7e76395b5
Author: Krzysztof Kapuścik <krzysztof.kapuscik@oracle.com>
Date:   Thu Oct 26 11:34:41 2017 +0200

    BUG #26818787: ASSERTION: DATA0DATA.IC:430:TUPLE
    
    Fix for an issue with purge of secondary index with virtual and
    externally stored column(s). If new record was being inserted
    at place of a deleted one (insert by modify) and purge was trying
    to build index entry from that record at the same time a NULL
    was returned by row_build_index_entry and then used.

commit e6238348d2708916a19f221488f0279d8503754d
Merge: be597c0 2cd254e
Author: Jaideep Karande <jaideep.karande@oracle.com>
Date:   Thu Nov 2 08:48:43 2017 +0100

    Merge branch 'mysql-5.7' into mysql-8.0

commit c8069eea61fb3fa6e7854b11bc18f86c707f613f
Merge: 4a2ff18 02ab9bf
Author: Mikael Ronström <mikael.ronstrom@oracle.com>
Date:   Thu Nov 2 08:47:19 2017 +0100

    Merge ../push_76 into mysql-8.0-cluster-8.0

commit 2cd254eb34d1e0bfb22d9db3be8f324ce3003249
Author: Jaideep Karande <jaideep.karande@oracle.com>
Date:   Thu Nov 2 08:43:08 2017 +0100

    Bug#25392468: TESTS WAITING ON ROLLBACK FAILING WITH WAIT_CONDITION
    
    Problem: Test case assumes rollback will broadcast transaction
    
    Description:
    After enforcing the use of wait_condition.inc post bug BUG#25247574 some test
    cases started failing.
    These tests use a debug sync point to block rollback queries.
    That is not true, and they are not blocked as group replication does not
    broadcasts the transaction where the code was being blocked.
    
    Resolution:
    ROLLBACK transactions will not be received by GR for broadcast, so conflict
    testing between ROLLBACK and COMMIT is not needed.
    However to maintain completeness of test case, ROLLBACK part has been retained.
    Debug sync points have been removed now, since they will not block.
    Parallelly running transaction is COMMIT so there will be no conflict.

commit 02ab9bf990ca7df66a699b47567b5fe5175b3ee9
Author: Mikael Ronström <mikael.ronstrom@oracle.com>
Date:   Thu Nov 2 08:42:08 2017 +0100

    BUG#25428560: Introduce new config variable O_DirectSyncFlag that treats all writes using O_DIRECT as synched writes, not set by default

commit 4a2ff1805aa127b38af679499609492eeb9faa6b
Merge: b8163e3 884236b
Author: Mikael Ronström <mikael.ronstrom@oracle.com>
Date:   Thu Nov 2 08:25:03 2017 +0100

    Merge ../push_76 into mysql-8.0-cluster-8.0

commit 884236b16b6910b95558f1e4b6cc4ee5b74bdf03
Author: Mikael Ronström <mikael.ronstrom@oracle.com>
Date:   Thu Nov 2 08:18:47 2017 +0100

    WL#11216: New command to enable/disable node log of debug info

commit b8163e3527dd9238c81495b00ddc15ce4e3fdd9e
Merge: 89eea61 3a82394
Author: John David Duncan <john.duncan@oracle.com>
Date:   Wed Nov 1 13:44:56 2017 -0700

    Merge branch 'mysql-5.7-cluster-7.6' into mysql-8.0-cluster-8.0

commit 3a82394117cdaddbcd9b3239a11f1ba7ffaec49e
Merge: 7e37938 f01f9a3
Author: John David Duncan <john.duncan@oracle.com>
Date:   Wed Nov 1 13:43:07 2017 -0700

    Merge branch 'mysql-5.7-cluster-7.5' into mysql-5.7-cluster-7.6

commit f01f9a34886a296bdfbb1f13169795dc27e88ba3
Author: John David Duncan <john.duncan@oracle.com>
Date:   Wed Nov 1 13:41:00 2017 -0700

    Fix for bug#26429923
     1: Set character set of CHAR(10) column back to LATIN1
     2: Fix ndb_exec.inc to explicitly enable use of "local infile" in MySQL 8.0
     3: Rename column in ndb_exec_output table from "row" (which is now a reserved word in the parser) to "output_line"

commit be597c0cb2ae0cb654cb5648fe20178f91d27189
Author: Dag Wanvik <dag.wanvik@oracle.com>
Date:   Wed Nov 1 15:20:13 2017 +0100

    Bug#26188578 Bug#26164633 Bug#26360114 Bug#26781725 Bug#26848089 Regressions with WL#9236 (Doxygen fix)

commit 83ddd393c8215a1a41ee2c39dacf9d2f5f7cbb59
Author: Jaideep Karande <jaideep.karande@oracle.com>
Date:   Wed Nov 1 18:00:51 2017 +0100

    BUG#26023928: PB2 TEST CASE FAILURE GROUP_REPLICATION.GR_CORE_REPLICATION_COMMANDS
    
    Problem: GR_CORE_REPLICATION_COMMANDS is failing randomly on PB2
    
    Description: Observed post load and applier channel stop sometime one of member
    is getting expelled.
    We know this issue can be see due to 5 seconds timeout.
    Issue has not been seen since 27 September on PB2.
    
    Resolution:
    Test case is not related to work load testing.
    Test case has been modified to reduce work load from 1500 to 150 inserts.
    Applier START/STOP has also been modified.
    This reduced test case execution timing.
    On server where test case used to execute in 97 seconds now test finishes in
    82 seconds.

commit 77632c043f93f64239a9286b3ec81640ddf45d27
Author: Norvald H. Ryeng <norvald.ryeng@oracle.com>
Date:   Wed Nov 1 15:38:24 2017 +0100

    Fix Doxygen warnings

commit 8c5b626d52fce338d1505fa797bff1325635b9c0
Merge: e9ed7ce a87ab93
Author: Shishir Jaiswal <shishir.j.jaiswal@oracle.com>
Date:   Wed Nov 1 19:39:02 2017 +0530

    Merge branch 'mysql-5.7' into mysql-8.0

commit a87ab932915d8929f2f8a1d6f6475d7e93709065
Author: Shishir Jaiswal <shishir.j.jaiswal@oracle.com>
Date:   Wed Nov 1 19:36:06 2017 +0530

    Bug#26199978 - WRONG ERROR MESSAGE FOR PARTIAL BACKUPS WITH
                   GTID_MODE = ON
    
    DESCRIPTION
    ===========
    Attempt to take partial backup through mysqlpump on a GTID
    enabled server fails reporting,
    
     "mysqlpump: [ERROR] (1) A partial dump from a server that
      has GTIDs is not allowed.
      Dump process encountered error and will not continue."
    
    If one trusts this message, he would think that there is no
    way ("at all") mysqlpump can be used to take partial backup
    with GTID enabled server, which is wrong.
    
    ANALYSIS
    ========
    We've two issues here:
    
    1. The error message, as stated above.
    2. One(undocumented) way to still do so is to pass
    --set-gtid-purged=OFF. Ideally both the values [ON|OFF]
    should be allowed even in case of partial backup, depending
    upon the use case (the use cases should be part of error
    message)
    
    FIX
    ===
    Sql_formatter::format_dump_start() checks for the
    gtid-purged mode, so we now error out "only" when this mode
    is set to AUTO. The message is as follows.
    
     "A partial dump from a server that is using GTID-based
     replication requires the --set-gtid-purged=[ON|OFF] option
     to be specified. Use ON if the intention is to deploy a
     new replication slave using only some of the data from the
     dumped server. Use OFF if the intention is to repair a
     table by copying it within a topology, and use OFF if the
     intention is to copy a table between replication topologies
     that are disjoint and will remain so."
    
    The above message is self-explanatory.
    
    NOTE FOR THE DOCUMENTATION TEAM
    ===============================
    Please add the above message for option
    "--set-gtid-purged=value" under "mysqlpump Option
    Descriptions" section in the documentation pages.

commit e9ed7ce0f1f8b42c284ef2c73a964ab474a1d982
Author: Kristofer Älvring <kristofer.pettersson@oracle.com>
Date:   Wed Nov 1 10:23:58 2017 +0100

    Bug#26679935 THE RW LOCK IN CHECK_GRANT IS TAKEN EVEN IF THE SESSION HAS ACTIVE ROLES.
    
    If active roles are used, then the acl cache lock which protects the
    global acl cache doesn't need to be taken during check_grant().
    By relaxing the lock we gain some performance and scale out capability.

commit 89eea61b03e4a917b9264928eb8cbfe38f762daf
Author: Magnus Blåudd <magnus.blaudd@oracle.com>
Date:   Tue Oct 31 14:35:16 2017 +0100

    Bug#26990244 REMOVE WERROR WARNINGS FROM NDBCLUSTER [noclose]
    
     - change tests for compiler flags to use -W<warning> instead
       of -Wno-<warning> as the latter is known to cause false positives.

commit 17514b8f6a43f1c412e5889e9c790f3db6a31746
Merge: 8d0b528 7e37938
Author: Mikael Ronström <mikael.ronstrom@oracle.com>
Date:   Wed Nov 1 09:21:26 2017 +0100

    Merge ../push_76 into mysql-8.0-cluster-8.0

commit 7e37938d1d78d787ef536a540342b9631ac6b691
Author: Mikael Ronström <mikael.ronstrom@oracle.com>
Date:   Wed Nov 1 09:18:55 2017 +0100

    WL#8069: Bug#26955266: First phase of WL#8069 introduced UNDO_LOCAL_LCP and UNDO_LOCAL_LCP_FIRST, when looking for end of UNDO log we missed to check for both UNDO_LCP_FIRST and UNDO_LOCAL_LCP_FIRST, added some comments about end of UNDO logic

commit 108b62bfa6c35d3f19bac25c42e3de27a9a4677a
Author: Ingo Struewing <Ingo.Struewing@oracle.com>
Date:   Mon Oct 30 18:04:49 2017 +0100

    Bug#27040633 - MEB COMPILATION WITH GCOV FAILS DUE TO MYSQLBACKUP_TEST
    
    Build failed with -DWITH_GCOV=1.
    
    Add gcov options to the mysqlbackup_test target.
    
    RB#17790

commit e0b469a596bd287482c6128924b997de3ebdc432
Author: Aditya A <aditya.a@oracle.com>
Date:   Wed Nov 1 06:45:21 2017 +0530

    Bug #26191879 FOREIGN KEY CASCADES USE EXCESSIVE MEMORY
    
    Post push fix to fix ASAN memory leak.

commit 09539753fa0e3b43caf5636248dc2af27b8644a9
Author: Nuno Carvalho <nuno.carvalho@oracle.com>
Date:   Wed Sep 13 19:27:23 2017 +0200

    WL#11139: Remove group_replication_allow_local_disjoint_gtids_join option
    
    The option group_replication_allow_local_disjoint_gtids_join[1] was
    introduced with the purpose[2]:
      This variable is an override mechanism for a new consistency feature
      in the plugin. When you try to add to the group a server that has
      more data than the existing members, by default the joining member
      will be rejected.
      The purpose is to avoid possible recovery and run time errors in
      the plugin leading to data divergence and other issues. If you are
      sure of what you are doing, and that the extra data is safe, then
      you can use this option.
    
    The scenarios on which this can help users are:
    
     S1) Solve a broken majority asap
         * Group had 3 members in single-primary mode
         * 2 members crashed and end up with different data
           (GTID_EXECUTED) when compared with the group.
         * User wants to add one of the members (S2) to solve the
           majority loss or increase group members number to handle
           possible future member failures.
         * The member that is still on the group is the one that is the
           primary or will be elected as primary when majority is
           re-established, since is the only one ONLINE.
         * The group will be stable if a future failover does not switch
           to the S2 member.
    
    The runtime errors that may happen are that the member which did
    force the join with disjoint GTIDS, if it does a write, the changed
    rows will never be updated by other members. Certification will
    fail.
    The recovery errors that may happen are that if this member is
    chosen as donor, it will distribute the disjoint GTIDS among the new
    members and increase the likelihood of the runtime errors to happen.
    
    It must never be used unless the DBA knows exactly what she/he is
    doing or does need to solve a broken majority, on which crashed
    members suffered corruption and she/he will not perform writes on
    it. Which can already be done by resetting master and setting
    GTID_PURGED to match the GTID executed of the group if they really
    want to add the damaged server to the group.
    
    People use this option to force member join, and assume that since
    member did successfully join everything is OK. Which is not the
    case, data is inconsistent.
    
    The correct procedure to fix a majority loss is described at
    https://dev.mysql.com/doc/refman/8.0/en/group-replication-network-partitioning.html
    
    Since the trade-off between this option benefit vs danger is
    negative, we are removing this option.

commit 257951dce15caddcba02089a0cfe5736705b9ac6
Merge: 6b9716c fa2755d
Author: Nuno Carvalho <nuno.carvalho@oracle.com>
Date:   Tue Oct 31 16:08:53 2017 +0100

    Null-merge from 5.7.

commit fa2755d42b4b3facb9979fba8f55b3175b66bfe1
Author: Nuno Carvalho <nuno.carvalho@oracle.com>
Date:   Wed Sep 13 19:23:14 2017 +0200

    WL#11138: Deprecate group_replication_allow_local_disjoint_gtids_join option
    
    The option group_replication_allow_local_disjoint_gtids_join[1] was
    introduced with the purpose[2]:
      This variable is an override mechanism for a new consistency feature
      in the plugin. When you try to add to the group a server that has
      more data than the existing members, by default the joining member
      will be rejected.
      The purpose is to avoid possible recovery and run time errors in
      the plugin leading to data divergence and other issues. If you are
      sure of what you are doing, and that the extra data is safe, then
      you can use this option.
    
    The scenarios on which this can help users are:
    
     S1) Solve a broken majority asap
         * Group had 3 members in single-primary mode
         * 2 members crashed and end up with different data
           (GTID_EXECUTED) when compared with the group.
         * User wants to add one of the members (S2) to solve the
           majority loss or increase group members number to handle
           possible future member failures.
         * The member that is still on the group is the one that is the
           primary or will be elected as primary when majority is
           re-established, since is the only one ONLINE.
         * The group will be stable if a future failover does not switch
           to the S2 member.
    
    The runtime errors that may happen are that the member which did
    force the join with disjoint GTIDS, if it does a write, the changed
    rows will never be updated by other members. Certification will
    fail.
    The recovery errors that may happen are that if this member is
    chosen as donor, it will distribute the disjoint GTIDS among the new
    members and increase the likelihood of the runtime errors to happen.
    
    It must never be used unless the DBA knows exactly what she/he is
    doing or does need to solve a broken majority, on which crashed
    members suffered corruption and she/he will not perform writes on
    it. Which can already be done by resetting master and setting
    GTID_PURGED to match the GTID executed of the group if they really
    want to add the damaged server to the group.
    
    People use this option to force member join, and assume that since
    member did successfully join everything is OK. Which is not the
    case, data is inconsistent.
    
    The correct procedure to fix a majority loss is described at
    https://dev.mysql.com/doc/refman/5.7/en/group-replication-network-partitioning.html
    
    Since the trade-off between this option benefit vs danger is
    negative, we are deprecating this option.
    It will be removed on a future version.

commit 6b9716c37c6e2ff67a5b4fbd2493d81be8f4a4de
Merge: 5b8e738 be09bfa
Author: Nuno Carvalho <nuno.carvalho@oracle.com>
Date:   Tue Oct 31 15:41:17 2017 +0100

    Merge branch 'mysql-5.7' into mysql-8.0

commit be09bfa4a5df62f64bd37034befcdaa5b12c9bb0
Author: Nuno Carvalho <nuno.carvalho@oracle.com>
Date:   Tue Oct 24 19:16:49 2017 +0200

    BUG#27008102: CRASH DURING SHUTDOWN WHEN START GR EXECUTED IF MAX CONNECTIONS ALREADY OPENED
    BUG#27016552: MAX_CONNECTIONS ARE ACCOUNTED FOR GR INTERNAL CONNECTIONS
    
    Group Replication does use the SQL API to execute internal
    operations on the server during START and STOP, like enable and
    disable read only mode.
    While opening this internal connection, if the server already
    reached the max_connections value, Group Replication was failing as
    expected but a dangling thread was left behind, which later would
    cause issues.
    
    This patch addresses that issue, by handling completely the open
    connection failure scenario.
    This patch also improves the error messages on this error scenario,
    by including the internal server error and message, and on the
    particular case of max_connections also instructing the user what
    needs to be changed.

commit 5b8e73878dfeb0b4555e7317b5d9e761b127c86a
Author: Thayumanavar S <thayumanavar.x.sachithanantha@oracle.com>
Date:   Tue Oct 31 14:37:27 2017 +0100

    BUG#26974113 - CONTRIBUTION BY FACEBOOK; READ COMPRESSED PACKETS OF SIZE
                   0XFFFFFF.
    
    mysqld server when returning a resultset consisting of logical packets
    that are multiples of 0xFFFFFF drops a connection under compress mode.
    When server/client processes a compressed packet that consists of logical
    packets which are multiples of 0xFFFFFF, the last packet in the series is
    terminated by a zero length packet. During read of last zero length packet, we
    save the byte of the header of zero length and skip to the next header of the
    packet. During the next iteration if there are remaining data in buffer to be
    processed, the header of the next packet is overwritten with the byte saved
    from the header of the zero length packet. This result in the connection
    being dropped.
    
    The fix is to restore the byte that belongs to the header of the next packet.
    This patch is based on contribution from Facebook Inc.

commit 5aeded9058d6769e67f933932e2f6371c049693c
Author: Roy Lyseng <roy.lyseng@oracle.com>
Date:   Tue Oct 17 11:01:50 2017 +0200

    Bug#26436185 Assertion 'buf_is_inside_another(data_in_mysql_buf, ...)
    
    The problem occurs when there is a materialized semi-join operation
    that is evaluated more than once, and one of the tables in the
    materialization is a const table (with join type JT_CONST).
    In second materialization, when the const table is referenced, invalid
    data are accessed, and when these data are shipped to the Temptable
    storage engine, a data validation fails and an assert is raised.
    
    After materialization is done, in debug mode, the contents of the input
    tables are trashed in join_materialize_semijoin(). However, const tables
    (with join type JT_CONST, JT_SYSTEM and JT_EQ_REF - the latter when
    keys are unchanged) are not reread on later materialization, thus
    trashing their contents is incorrect.
    
    The fix is to skip trashing of data for const tables.
    
    The test case for this bug is added to a new test file subquery_bugs,
    which is designated for bugs in subquery operations that need
    a specific set of optimizer switches to hit.
    
    The test case only checks the JT_CONST join type. The other handled
    join types may be theoretical only.

commit 1ea1caf95a2b351ef8b54f59ffa1b9294d189c00
Author: Pedro Figueiredo <pedro.figueiredo@oracle.com>
Date:   Tue Oct 31 10:49:29 2017 +0000

    Bug#20818704 BINLOG_WAIT_FOR_EXECUTED_GTID_SET_INTERRUPT FAILS SPORADICALLY WITHQUERY REAP
    
    Description
    -----------
    binlog_wait_for_executed_gtid_set_interrupt.test  Fails sporadically on
    Daily-trunk, here is the failure log:
    
        binlog.binlog_wait_for_executed_gtid_set_interrupted 'row' w7 [ fail ]
        Test ended at 2015-04-01 22:41:07
    
        CURRENT_TEST: binlog.binlog_wait_for_executed_gtid_set_interrupted
        mysqltest: At line 34: query 'reap' succeeded - should have failed with errno
        1317...
    
        The result from queries just before the failure was:
        RESET MASTER;
        CREATE TABLE t1 (c1 INT NOT NULL PRIMARY KEY) ENGINE=InnoDB;
        INSERT INTO t1 VALUES (1);
        SELECT WAIT_FOR_EXECUTED_GTID_SET('MASTER_UUID:4', 100);
        DROP TABLE t1;
        KILL QUERY CONNECTION_ID;
    
    Analysis
    --------
    - The purpose of the test is to check if the ER_QUERY_INTERRUPTED error number is
    returned when a connection is killed with 'KILL QUERY' when 'WAIT_FOR_EXECUTED_GTID_SET'
    is active.
    - The 100 seconds timeout maybe being reached due to overload on the machine.
    - No other race condition seems to be plausible to happen on the given test.
    
    Fix
    ---
    - Increase the timeout on 'WAIT_FOR_EXECUTED_GTID_SET' to a very high value, in
    order to ensure that the the function exists due to the 'KILL QUERY' statement.

commit 8d0b52837a3277ad057ad8e42d919c87b510d421
Author: Varun Nagaraju <varun.nagaraju@oracle.com>
Date:   Fri Oct 27 12:42:45 2017 +0530

    Bug #27009386: SOME NDBAPI EXAMPLE PROGRAMS DO NOT CLEANUP DATA, TABLE BEFORE EXIT
    
    The program ndbapi_simple_dual doesn't clean up its data,tables after
    its execution which causes error when tried to run more than once.
    
    Fix : Tables are dropped after usage so that there are no problems
    for further executions.

commit be0cdf6f20e8e5de5cec9d00d9ad234d7e07145e
Author: Satya Bodapati <satya.bodapati@oracle.com>
Date:   Thu Oct 19 20:10:43 2017 +0200

    Bug#26330279 - ASSERT ON ROW_PURGE_REMOVE_SEC_IF_POSS_LEAF| INNOBASE/ROW/ROW0PURGE.CC
    
    Problem:
    --------
    
    On a table with virtual column and a secondary index on the prefix of virtual column.
    A replace operation is executed with the same values of existing record. So as part of
    REPLACE, the existing record is delete-marked and subsequent insert operation is
    treated as update-by-modify(un-delete mark) the record.
    
    Later when purge tries to process the update-undo, it finds the record eligible
    for purge but the record is no longer delete-marked. Hence it asserts.
    
    Ideally, purge shouldn't find the record eligibile for purge. The problem occurs
    when trying to match the secondary index record to its corresponding cluster index
    record.
    
    If there are no versions matching the secondary index record, we declare the
    secondary index as purgeable.
    
    In the bug case, when trying to match the secondary index (which is on vcol),
    the comparision goes wrong because the actual secondary index field size is
    less than the field size logged for virtual column.
    
    Fix:
    ----
    When trying to match secondary index on virtual column to its corresponding
    cluster index record, the field size on prefix index will be adjusted to its
    actual secondary index field size.
    
    Reviewed-By: Jimmy Yang <jimmy.yang@oracle.com>
    RB: 17706

commit a74803a1a0a8a7604961e5617a0ec4281615974e
Author: Krzysztof Kapuścik <krzysztof.kapuscik@oracle.com>
Date:   Thu Oct 19 09:34:26 2017 +0200

    Bug#26771717 ASSERT IN TEMPTABLE::STORAGE::CLEAR()
    
    There was an invalid assertion in clear() metho and it was removed.
    The assertion checked that when there are multiple pages the number
    of elements must be larger than number of elements on a single page.
    This was not true when the erase() was called as it may decremented
    the number of elements leaving the pages allocated if the elements
    were not at the end.
    
    Additionally fixed missing initialization in move constructor.
    The pointer members were uninitialized and in some cases (non-zeroed
    memory allocated for the object) the asserts in move assignement
    operator were raised.
    
    Reviewed by: Pawel Olchawa <pawel.olchawa@oracle.com>

commit 8043c6b3392e565248cdee204f424e8e96e51eaa
Author: Dag Wanvik <dag.wanvik@oracle.com>
Date:   Mon Oct 30 13:06:16 2017 +0100

    Bug#27010574  WINDOW FUNCTIONS: BUG WITH LAST_VALUE AND FRAME (follow-up)

commit d7ae9745780ca8c2a60b53c7051489822443eb94
Author: Satya Bodapati <satya.bodapati@oracle.com>
Date:   Mon Oct 30 12:43:42 2017 +0100

    Bug#27042401 - INNODB_ZIP.WL6347_COMP_INDX_STAT FAILS RANDOMLY ON PB2
    
    Separate CREATE INDEX loop leads to delete + insert of SDI records.
    So if SDI record is not purged before next CREATE index, extra page
    could be occupied. Since the aim is to test physical ibd size,
    we try to remove dependency on purge by creating all indexes along
    with CREATE TABLE

commit fc506112b3d426b447a7b483d37e483a35082f98
Author: Dag Wanvik <dag.wanvik@oracle.com>
Date:   Fri Oct 27 21:47:52 2017 +0200

    Bug#27010574  WINDOW FUNCTIONS: BUG WITH LAST_VALUE AND FRAME
    
    We originally had the restriction that RANGE frames were only allowed
    with a single ORDER BY expression.
    
    We lifted that if there is no value involved, but only UNBOUNDED or
    CURRENT ROW. This requires an extension of the logic the detect peers,
    which is missing: Currently we set up a comparator for the (first)
    order by expression and test whether a row is before or after the
    frame by an Item_func_{gt, le} depending on ORDER BY's directions
    (ASC, DESC).
    
    The patch generalizes the logic to in Window::setup_range_expressions
    and Window::before_or_after_frame to multiple ORDER BY expressions
    
    Added repro test, plus some to exercise NULL handling.

commit 41454d7d53ed006155cf62b6be9f84d0c6472994
Author: Abhishek Ranjan <abhishek.ar.ranjan@oracle.com>
Date:   Wed Oct 25 23:31:02 2017 +0530

    Bug#26944731 : UPGRADE TO 8.0 FAILS: DUPLICATE SET VALUES IN TABLE FROM
                   A PERMISSIVE SQL_MODE..
    Bug#26948678 : MYSQLD: INVALID DEFAULT VALUE FOR 'CACHED_TIME'
    
    1> In-place upgrade from 5.7 fails when server is started with
       --explicit-defaults-for-timestamp=0 in creating dictionary tables
       with error: Invalid default value for 'cached_time'
    
    2> In-place upgrade from 5.7 fails irrespective of user provided sql
       mode if SET data type has duplicated values with error:
       Column <column_name> has duplicated value <value> in SET
    
    3> --initialize with --explicit-defaults-for-timestamp=0 to
       create new data directory fails in creating performace schema
       'variables_info' table with error:
       Invalid default value for 'SET_TIME'
    
    Fix:
    -----
    1> Set explicit-defaults-for-timestamp to true for the bootstrap thread.
       Dictionary tables and performance schema tables are created from
       bootstrap threads. This will allow dicitonary and performace schema
       table creation by following the standard behavior for timestamp data
       type.
    
    2>  While migrating tables, mysql_prepare_create_table() is called which
        checks for duplicated value in SET data type. Error is reported for
        duplicated values only in strict sql mode. Set sql_mode to ZERO when
        populating data dictionary for in-place upgrade.

commit 78a9b3a35fa97622a6925514bbe47d216121a451
Author: Parveez Baig <parveez.baig@oracle.com>
Date:   Mon Oct 30 11:09:23 2017 +0530

        WL11144: Improve test coverage for create/alter/drop user if exists with replication
    
         This WL is to add test coverage for scenarios around
        create/alter/drop user IF[NOT] EXISTS in replication.

commit 8a931d7483a2d61a747d43970dfa103a242fc11b
Author: Aditya A <aditya.a@oracle.com>
Date:   Sun Oct 29 12:00:49 2017 +0530

    Bug #26191879       FOREIGN KEY CASCADES USE EXCESSIVE MEMORY
    
        PROBLEM
    
        The iterative approach used in the fix of Bug 16244691 was causing
        excessive memory usage when doing a cascade operation owing to the
        fact that for each row being updated we were allocating a update
        node from heap and this memory was not getting released to OS
        even after completion of delete.
    
        FIX
    
        We went back to recursive approach of cascading operation
        instead of iterative approach .

commit 1a30bda8ffa67665884370a7bcec0a14ceb0b64d
Merge: b6141a7 60d873d
Author: Sreeharsha Ramanavarapu <sreeharsha.ramanavarapu@oracle.com>
Date:   Sun Oct 29 08:10:17 2017 +0530

    Merge branch 'mysql-5.7' into mysql-8.0

commit 60d873d4343a8fe101d35faaa9869e96e853d60c
Author: Sreeharsha Ramanavarapu <sreeharsha.ramanavarapu@oracle.com>
Date:   Sun Oct 29 07:52:40 2017 +0530

    Bug #26727773: OPTIMIZER CHOSES COMPOSITE INDEX FOR REF
                   OVER RANGE
    
    Issue:
    ------
    While choosing between ref-access and range-access on the
    same index, we prefer range if certain pre-determined
    criteria are fulfilled
    (See can_switch_from_ref_to_range()).
    
    One such criteria is to choose avoid ref-access if it has
    an overly-optimistic / unrealistically low cost. This can
    happen when, as in this case, records_per_key is very low.
    
    For this query, ref-access acquires its estimated number
    of rows value records_per_key (which is 1) and is
    considered to be the cheapest. But in reality the estimate
    of range-access which uses more keyparts is accurate
    (due to index dives).
    
    So, choosing range-access would be ideal. But the optimizer
    choose ref-access.
    
    Solution:
    ---------
    This problem was mostly handled in Bug #23259872.
    
    For 5.7:
    --------
    Range-access estimates the number of rows to be
    1 (correctly) and ref-access arrives at the same number
    from records_per_key (incorrectly). Range access is more
    accurate and the overhead of using range is also limited.
    Hence, choosing range is better than ref, because ref's
    estimate is from the less reliable records_per_key.
    
    It is better to use the "<=" rather than "<", to set the
    "is_dodgy" flag which is one of the criteria in
    can_switch_from_ref_to_range().
    
    For 8.0 and trunk:
    ------------------
    Irrespective of the number of rows estimated for
    ref-access, if range-access uses more keyparts, don't
    consider this index for ref-access.

commit b6141a7fef05cc737c2705a6f03da0792108426e
Merge: eae31fd 2c8d9fe
Author: Libing Song <libing.song@oracle.com>
Date:   Sat Oct 28 07:48:38 2017 +0800

    Null-merge from 5.7.

commit 2c8d9fe218fb4ed9bd1b62ae94143ecda7a20ba4
Author: Libing Song <libing.song@oracle.com>
Date:   Wed Aug 23 22:39:00 2017 +0800

    BUG#26474110 RPL_KILLED_DDL USES A DEBUG POINT NOT EXIST
    
    There where two problems:
    1. debug_lock_before_query_log_event was lost.
    2. ALTER EVENT was not binlogged when it was killed
       just after event table was updated.
    
    Analysis On 2th Problem
    =======================
    After event table is updated successfully, it calls load_named_event().
    If load_named_event() returns true, the ALTER EVENT will not be logged.
    Since event able is myisam table, the update cannot be updated. So
    it cause the problem: the statement updated something but it is not
    binlogged. KILL QUERY causes load_named_event() return true. That caused
    the inconsistency between master and slave.
    
    Fixes
    =====
    1. Added the debug_lock_before_query_log_event
    2. binlog the ALTER EVENT, even load_named_event() return true.

commit eae31fd70985b576cba3b9558d3e9067a47a1ffc
Author: Dag Wanvik <dag.wanvik@oracle.com>
Date:   Fri Oct 27 18:49:40 2017 +0200

    Bug#26996642 ITEM WALK MAY MISS WINDOW SPECIFICATION
    
    Added the missing walks. Some smaller cleanups. Removed parts of
    26802696 DENSE_RANK WRONG WITH BUFFERED PROCESSING due to other
    changes from this patch making them no longer needed.

commit 79902f3d2e1f7d424259784a31d25859ebaa77cc
Author: Guilhem Bichot <guilhem.bichot@oracle.com>
Date:   Tue Oct 24 22:32:59 2017 +0200

    Bug#26188578 Bug#26164633 Bug#26360114 Bug#26781725 Bug#26848089 Regressions with WL#9236
    
    Bug#26188578 WL#9603: HAVING CONDITION IS OPTIMIZED OUT FOR ALIAS ON AGGREGATE W/O GROUP BY
    Bug#26164633 WL#9603: WRONG RESULT WHEN PARTITION EXPR USING AGGREGATES EVALUATES TO NULL
    Bug#26360114 WRONG RESULT WITH AGGREGATE AND HAVING CLAUSE IN VIEW
    Bug#26781725 INCORRECT RESULTS FOR QUERY(MAX FUNC+HAVING CLAUSE) WHEN USED INSIDE VIEW
    Bug#26848089 LEAD/LAG WINDOW FUNCTIONS ON QUOTED JSON STRINGS RETURNS SAME VALUE FOR ALL ROWS
    
    Regressions introduced by changes to Item_ref done in the patch for
    window functions (WL#9236).
    
    Background of existing design before the WL of window functions:
    
    - Item_ref is very old design which was introduced for SQL clause
    HAVING, when HAVING references an item of the SELECT list through an
    alias. It points to an Item ('ref' pointer). When there is a tmp table
    involved in the execution (e.g. GROUP BY before HAVING), we may
    calculate a SELECT list expression (let's say it's an Item_func) and
    store it in the tmp table in the group's row. The
    tmp table's column where it's stored is known as the Item's result_field.
    If HAVING references that expression through an alias, HAVING contains
    Item_ref with a 'ref' pointing to the Item_func. When evaluating
    HAVING, we want to use the already calculated value of Item_func
    (_not_ evaluating the Item_func again, as it may not be deterministic),
    we do that by looking at the value stored in ref->result_field.
    That is why Item_ref::val_int calls ref->val_int_result(), not
    val_int().
    - So the system is relying on the capacity of Item_ref to
    automatically pick the stored value.
    - While that sounds ok for queries with no or only one tmp table, it
    is not enough for more complex queries
    - hence, a second design: "ref item slices": in different phases of
    execution (simply: depending on which table, tmp or non-tmp,
    we're reading now), a same SELECTed expression is represented by
    different Items: it may be SUM initially (Item_sum), then, once
    calculated (with Item_sum::val_int()) and stored in a tmp table with
    one row per group, it becomes Item_field (a column of the tmp
    table). After all groups have been written, if a filesort is used
    to do a final ORDER BY, that sort must call the Item_field's val_int,
    not the Item_sum::val_int which is just the value of the last group.
    - So, depending on which table we're reading now, the SELECTed
    expression is one object or another; for that, we wrap the expression
    in Item_ref, with 'ref' pointing to a place (a cell in the "ref item
    slice"), and at this place we deposit a pointer either to the original
    Item_sum or to the tmp table's Item_field, depending on the phase
    we're in.
    Phases are identified by numbers (grep for the REF_SLICE enum).
    
    With the advent of window functions, more tmp tables are used, and
    form a chain. The fact that Item_ref::val_int always reads ref->result_field
    (i.e. what was saved in the next tmp table) sometimes leads to reading
    not-yet-calculated data from the next tmp table.
    For example, if we have an Item_func I_F, and a tmp table used for windowing,
    and we have an Item_ref I_R to the I_F (HAVING always creates an
    Item_ref), and before the tmp table is written we use I_R::val_int,
    that gets the value of I_F->result_field, reading random data from the
    tmp table. Such I_R::val_int() (or val_int_result(), equivalently)
    could occur in filesort(), for example.
    HAVING is one problem; but the ORDER BY clauses of windowing also use
    Item_ref; and aggregate functions also do (if involved in a more
    complex expression, see Item::split_sum_func2). Aggregate functions
    may be used as arguments to windows, so, depending on the phase,
    Item_ref should pick the aggregate function's value or its saved
    value, which it can't do. The behaviour of Item_ref of "always reading
    the result_field", combined with the increased number of tmp tables,
    made things harder to manage than they used to be.
    
    So things are refactored in this patch:
    - Item_ref::val_(int,etc)() just calls ref->val_(int,etc)(), doesn't
    read ref->result_field anymore
    - when you are reading QEP_TAB Q and want to evaluate an expression
    which depends on values stored in Q and previous tables in the
    execution order, switch to Q->ref_item_slice slice: it will switch to
    Items which point into Q's table.
    - when you are doing a GROUP BY where grouped rows are not
    materialized in a tmp table (because rows are produced in group order
    by the join), a pseudo-tmp table buffer is used (no change here); if
    you want to evaluate an expression which depends on values
    stored in this buffer, use the REF_SLICE_TMP3 slice.
    - the reads above include: sorting the table, evaluating a condition
    on the table, etc.
    
    Changes:
    
    All val_*result() are removed.
    So Item_ref::val_(int,etc) calls ref->val_(int,etc), not
    val_result. Thus, "ref" needs to be "advanced by one step", as we
    don't look into "its result already stored into the next tmp
    table", anymore. So ref slices are "advanced by one  step" during
    execution.
    Unchanged meaning of "the current ref slice of JOIN":
    it's still the "ref"s (targets) for Item_refs when evaluating Items in
    the current phase of execution.
    Unchanged meaning of QEP_TAB::ref_item_slice: the
    it's still the "ref"s (targets) for Item_refs when evaluating Items
    when reading this QEP_TAB.
    Exception: QEP_TAB::ref_item_slice is not anymore set to
    REF_SLICE_TMP3, as that latter slice is never the one to use to read
    from any QEP_TAB; it's the one to use to read from a pseudo-tmp-table
    of GROUP BY. A consequence is that we cannot use
    QEP_TAB::ref_item_slice to switch to REF_SLICE_TMP3 anymore, so we use
    a new member JOIN::before_ref_item_slice_tmp3 for that.
    Almost all execution functions need to advance to the right slice
    before they read a table.
    
    QEP_TAB::all_fields and QEP_TAB::fields are removed: we can get the
    same information from QEP_TAB::ref_item_slice, using new function
    JOIN::get_current_fields().
    
    class Item:
    all val_x_result() are gone, all calls to them replaced with val_x().
    Item_ref made to behave like Item_direct_ref; thus, Item_direct_ref
    removed and replaced with Item_ref.
    
    Item_field::save_in_field_inner() (item.cc):
        after the changes done to fix_inner_refs() in this patch,
        for the materialization of some IN subquery, we use store_key_item
        to store the left args of the IN subquery,
        while we used to use store_key_field (see comment about fix_inner_refs);
        these left args are indeed outer refs belonging to a grouped query;
        store_key_field() takes its source in Item_field::field;
        store_key_item() rather uses Item_field::save_in_field_inner()
        which takes its source in Item_field::result_field, which assumes
        this field contains the up-to-date value. This logic sounds
        strange and the present patch uses the "field" member as source,
        instead. Perhaps the old logic was necessary when ref slice wasn't
        "advanced one step" as we do now. The modified code is from before
        2000 so we cannot know more about its reason.
    
    item_subselect.cc: ref_by[1] introduced (see explanation there). So we
    now have two "ref_by" pointers; it's then difficult to pass both as
    arguments to split_sum_func2 in sql_resolver.cc so we let
    split_sum_func2 find pointers itself.
    
    sql_join_buffer.cc: assert that we needn't switch slice, because we never
    use join buffer on a tmp table. Removed useless switch.
    
    JOIN::set_ref_item_slice(): as we use it more now, make it do nothing if
    slice number doesn't change (optimization).
    Switch_ref_item_slice: now it's used in one case where the said slice
    may or not exist, so I make the object a no-op if the slice doesn't
    exist.
    
    JOIN::set_group_rpa: not needed anymore as set_ref_item_slice()
    detects when sliceno doesn't change so we can call it repeatedly;
    removed.
    
    SELECT_LEX::fix_inner_refs(): simplified as Item_direct_ref and
    Item_ref are one now, no need to choose between the two.
    
    sql_select.cc:get_store_key():
    there was an "else if" branch special for DIRECT_REF.
          else if ((*(Item_ref**)(item_ref)->ref)->ref_type()
                   == Item_ref::DIRECT_REF &&
                   item_ref->real_item()->type() == Item::FIELD_ITEM)
                   field_item= static_cast<Item_field*>(item_ref->real_item());
    It was specific of an outer reference belonging to a query with GROUP
    BY. It relied on the two different types of Items created in
    fix_inner_refs(). I remove this because it's not possible anymore to
    distinguish Item_ref from Item_direct_ref (they're one now), and the
    distinction is necessary to make this 'else' work. Likely it makes us
    pick store_key_item() instead of store_key_field(), in this outer-ref
    case, which is acceptable.
    
    sql_select.cc: reset_wf_result_fields(): removed.
      More info about the problem that required this function:
      select from (select WF1 over w1, WF2 over w2) dt;
      where "dt" is materialized. First the "dt" table structure is created with
      create_tmp_table() and that sets WF{1,2}->result_field (pointing into
      columns of "dt"). Then the inner subquery is optimized, that calls
      create_tmp_table() for the two windows. First for w1: WF1 is to be
      calculated in w1 so a column is added for its result in the tmp table; so
      its result_field gets re-set to point there, all fine. Continuing with the
      creation of wf1, WF2 is skipped. Then change_to_use_tmp_fields() sees that
      WF1 and WF2 have a result_field (see test
      'else if ((field= item->get_tmp_table_field()))'), so concludes that the ref
      slice used to read the tmp table of w1 should contain Item_fields for WF1
      and WF2; that's incorrect for WF2, and leads to WF2 never being calculated.
      My fix: in create_tmp_table(), when the destination table is to materialize
      a derived table / UNION (i.e. is not a group-by/windowing table), there's no
      reason to set result_field (results are not saved by this means anyway, but
      by Query_result_union::send_data() which reads the last table of the query
      and writes that to the materialized table), so don't set it.
    
    sql_select.cc: JOIN::make_tmp_tables_info():
          Complement to comment "Exit the TMP3 slice": failing test was
          main.func_group, consider:
          SELECT (SELECT COUNT(DISTINCT t1.b)) FROM t1 GROUP BY t1.a;
          When evaluating COUNT(DISTINCT t1.b): we copy t1.b to tmp table used by
          COUNT(DISTINCT) (i.e. tmp table of Aggregator_distinct):
          for that we must copy t1.b from JOIN's result, not from TMP3 slice:
          indeed TMP3 was filled when we switched to a new group (see
          end_send_group), so it contains the value of t1.b for the first row of
          the group; while COUNT(DISTINCT) wants the value of the current row (or
          it would think all rows of group have same value of t1.b). So the
          copy_field to the COUNT(DISTINCT) tmp table must take its source in
          JOIN, so ref slice must not be TMP3 in setup_sum_funcs.
          Alternatively, I tried to let COUNT(DISTINCT) read from TMP3, so I had
          to update t1.b in TMP3 for every read row but:
          - it broke the undocumented behaviour that "for a non-functionally dependent
          column in group we choose first row"
          - it broke other tests
    
    sql_executor.cc:
    simplified slice switching: switch, when about to read a table, to the
    Items which point to this table; in practice it means:
    - before reading first row (as it may start with a filesort, which may
    have to evaluate some ORDER BY expression on the table); slice switch
    remains in force for next rows too
    - for tmp tables: before evaluating HAVING; even a bit earlier: before
    copy_fields() (see comment in end_send_group())
    - copy_funcs(): no need to calculate functions in two passes, anymore;
    so tmp_table_param::hidden_func_count is removed (was added by the WF
    WL). Proper order is given by sort_copy_func() now.
    - setup_copy_fields(): no need for special case for Item_aggregate_ref,
    said Evgeny; indeed I don't understand why it still would be needed:
    as Item_ref::val_* just evaluates the referenced Item_field (doesn't
    look at result_field), we can just copy the underlying Item_field.
    - complement to comment "As GROUP expressions have changed" at *end* of
    end_send_group():
            Fixes test: main.group_by, query:
            select a, round(rand(100)*10) r2, sum(1) r1 from t1 where a = 1 group  by a
            having r1>1 and r2<=2;
    - complement to comment "We have created a new Item_field" in
    setup_copy_fields():
                The only new thing is below: let 'item->field' allow access to
                REF_SLICE_TMP3. This won't disturb the Copy_field as it has cached
                field->ptr (in copy_field->set()) before the change to
                'item->field' below.
                Why this change: because when we are in slice TMP3 (end_send_group), to
                evaluate HAVING we use Item_ref::val_int() which doesn't anymore use
                ref->val_int_result() but ref->val_int() instead: and
                Item_field::val_int() uses 'field' not 'result_field' so the
                Item_field here must have valid data (i.e. TMP3) in its 'field'.
    - change in QEP_TAB::remove_duplicates(): the function
    used (this-1)->fields. Now that I get rid rid of this member, I found
    a way to do without it: it was used to count hidden fields in 'this';
    I replaced the counting with the existing hidden_field_count.
    - assertions of type:
      this != join()->before_ref_item_slice_tmp3
    are added to make sure that only well-identified functions read from
    REF_SLICE_TMP3.
    
    sql_tmp_table.cc:
    - don't set result_field when it doesn't make sense;
    removes the need to clear it later (i.e. removed
    reset_wf_result_fields()).
    - as we can now create a tmp table by using as source the fields of slice
    REF_SLICE_TMP3, which don't point in a real table::record[0], fixed the
    "move_field" logic in calculation of the field's default value.
    - added sort_copy_func() to evaluate Copy_func-s in proper order (see
    comment there); uses new function Item_ref::contains_alias_of_expr()
    (item.cc); requires to replace Item* pointer in Func_ptr_array with a
    pair of Item* and alias-of-expr property: class Func_ptr.
    - complement to comment "Let each group expression know"
          it is needed to fix Bug#26475312. Indeed, the scenario was (see
          test in window_functions_bugs.test):
          - for group-by write to a tmp table tmp1
          - there is no group aggregate function (so this GROUP BY is there only
          to make distinct groups) so we use end_write() with a duplicate
          elimination in tmp1
          - the concatenation of group expressions is too long to make it a unique
          key so we use a "unique constraint" (hash_field) instead
          - after tmp1 there is tmp2 for windowing.
          - in end_write() we do check_unique_constraint(); after checking
          hash_field it gets a "candidate duplicate"; to check it more thoroughly
          we use group_rec_cmp() to compare the two rows; this function finds the
          value of group expressions in each row; for that it evaluates the
          expressions; but (after the refactoring) the slice we're at is that of
          tmp1 (not of the table before tmp1, anymore); the expression is
          thus a Item_field with 'field' in tmp1; and 'result_field' in tmp2; when
          group_rec_cmp() used get_tmp_table_item() on this Item_field it returned
          result_field i.e. group_rec_cmp() was reading in tmp2, wrongly.
          The fix is the make group_rec_cmp() find the proper 'field'. We record
          it below. Note that it was recorded in the old code too, but not if using
          hash_field (see branch "if (group && !using_unique_constraint)").
          - I also changed unique_hash_group like group_rec_cmp as they looked
          similar.
    - complement to comment "Get the value from default_values":
            Using move_field_offset(diff) below assumes that orig_field->ptr
            points into record[0], which may not be the case. Example:
            - we are creating a tmp table to materialize the query's result, for a
            PS cursor
            - the last table of the query, i.e. input to the cursor's tmp table,
            is the result of GROUP BY, so here 'fields' is items of
            REF_SLICE_TMP3
            - so orig_field is from REF_SLICE_TMP3, it was created by
            setup_copy_fields() from table->field[x] and its ptr points to a
            temporary memory area.
            Conclusion: so we rather use orig_field->table->field[x] which is
            properly in record[0].  By adding 'diff' to ptr we point that field to
            its default value.
            Fixed mysql_client_test.test (precisely the test for bug 11904 there).
    
    table.h: st_order::field renamed to clearer name field_in_tmp_table.
    
    New MTR test bits for better coverage of modified code.
    Tests for the four fixed bugs.
    
    having.test: UPDATEs to the series table are added to make sure a
    failing section doesn't make other following sections fail.
    
    Change-Id: I9775573b821886932b48b08c5ae9ece12e249e71

commit 9d02b780a061cd3b7372ec23b081ff7b6552195c
Author: Guilhem Bichot <guilhem.bichot@oracle.com>
Date:   Thu Oct 19 10:51:12 2017 +0200

    Bug#25190109 AFTER WINDOW FUNCTIONS ARE PUSHED, SIMPLIFY SOME CTE CODE
    
    In the implementation of window functions, we extended HEAP_POSITION
    which makes the need for allow_scan_from_position go away
    (see change in sql_tmp_table.cc).
    Practical consequence: in a recursive CTE with UNION DISTINCT,
    and if there are lots of columns in the CTE, so that their total
    length was bigger than a few hundred bytes, we were forcing the
    CTE's tmp table to be innodb, now we don't anymore, it will be
    MEMORY.
    
    Also, window functions were developed to work with both MEMORY
    and Temptable as internal engine; but right before the release of WF
    there was a MTR test timeout which led us to force Temptable; later
    investigation showed that the failure was just a wrongly sized
    max_heap_table_size, so there was nothing to worry about,
    so we re-enable MEMORY for WFs.

commit c9b659152e155612619516b66769abac03d2559b
Merge: 16490a5 c1dbc33
Author: Daniel Blanchard <daniel.blanchard@oracle.com>
Date:   Fri Oct 27 14:52:31 2017 +0100

    Null-merge from 5.7.

commit c1dbc33d40bf10f35774da582e95513be50bc0a6
Merge: ff81289 2fbe5e2
Author: Daniel Blanchard <daniel.blanchard@oracle.com>
Date:   Fri Oct 27 14:48:13 2017 +0100

    Merge branch 'mysql-5.6' into mysql-5.7

commit 2fbe5e22983a17b7dfaaf1f6f9ca478b3f25033b
Author: Daniel Blanchard <daniel.blanchard@oracle.com>
Date:   Fri Oct 27 14:44:15 2017 +0100

    BUG#26734457 BACKPORT BUG#22305994 TO 5.6 AND 5.7
    
    Fixing post push pb2 failure

commit 16490a505a4c961c6874e155f323424415e8e560
Merge: 60ad65b ff81289
Author: Daniel Blanchard <daniel.blanchard@oracle.com>
Date:   Fri Oct 27 14:05:35 2017 +0100

    Null-merge from 5.7.

commit ff812892b5523185b3b79386f0df35fca50535c8
Merge: 4f45bbd 8fccdde
Author: Daniel Blanchard <daniel.blanchard@oracle.com>
Date:   Fri Oct 27 13:40:16 2017 +0100

    Merge branch 'mysql-5.6' into mysql-5.7
    
    Change-Id: Ia8f48702408d13a320b565f7600833ef20031b9e

commit 60ad65b5e23b6faf08229c09e10f3845f9f30ace
Author: Parveez Baig <parveez.baig@oracle.com>
Date:   Fri Oct 27 17:07:23 2017 +0530

    Bug#26883857: RPL_SERVER_UUID FAILS SPORADICALLY ON WEEKLY-TRUNK AND WEEKLY-8.0
    
    The test is failing on windows in assert_grep.inc because the
    specific message will not be found in the error log. The problem
    is that on windows the server is logging the messages by
    creating the new error log file in a different location whenever
    --log-error-verbosity option is specified through MTR. Test has
    this option in it's cnf file. As a result the test will fail as
    it won't be able to find the messages in the usual error log file.
    
    Fix: removed the log-error-verbosity option for master server
         from the cnf file and setting it in test case itself.

commit 8fccdde4a22ef2b5948b976205465c1e088336b5
Author: Daniel Blanchard <daniel.blanchard@oracle.com>
Date:   Mon Sep 4 10:30:14 2017 +0100

    BUG#26734457 BACKPORT BUG#22305994 TO 5.6 AND 5.7
    
    Use GetSystemTimePreciseAsFileTime in my_micro_time on Windows when it
    is available to achieve higher timer resolution.
    
    Change-Id: I200c54b83fedb22c2e4c45bc151aed44fec0ff6c

commit d2e8bfc4cde1a63ad7c94088c73a781a684e91e6
Merge: 777cc15 4f45bbd
Author: Ajo Robert <ajo.robert@oracle.com>
Date:   Fri Oct 27 16:50:02 2017 +0530

    Merge branch 'mysql-5.7' into mysql-8.0

commit 4f45bbd52c0d94bdddb7d41733aaa9963b85e181
Merge: 78370cb 83578b0
Author: Ajo Robert <ajo.robert@oracle.com>
Date:   Fri Oct 27 16:49:42 2017 +0530

    NULL Merge branch 'mysql-5.6' into mysql-5.7
    
    Change-Id: Ie45c710dad37611a90f9d12e40904f8cd29f432b

commit 83578b0fcaafde79c30f3961d5f44cae87f7fb6b
Author: Ajo Robert <ajo.robert@oracle.com>
Date:   Fri Oct 27 16:19:45 2017 +0530

    Post push fix for Bug#25062396.
    Change: Variable initialization.
    
    Change-Id: I2e4afddcfb9651c98a554695b1565fdb1504b69a

commit 777cc15d2d291fdaed91e6089fa8c9b66a413fc7
Merge: 281cd00 78370cb
Author: Karthik Kamath <karthik.kamath@oracle.com>
Date:   Fri Oct 27 11:58:57 2017 +0100

    Null merge branch 'mysql-5.7' into mysql-8.0

commit 78370cb444097199fcc41e12492d72402f2b7b19
Merge: f18713f 6e38ae2
Author: Karthik Kamath <karthik.kamath@oracle.com>
Date:   Fri Oct 27 11:56:57 2017 +0100

    Null merge branch 'mysql-5.6' into mysql-5.7

commit 6e38ae2a23b4ce9ac9742e1556f4ca9561fd5b8b
Author: Karthik Kamath <karthik.kamath@oracle.com>
Date:   Fri Oct 27 11:55:47 2017 +0100

    BUG#26106655: DISCREPANCY BETWEEN IMPLICIT DB OF PARENT
                  TABLE FOR FK AND REFERENCES PRIVILEGE
    
    ANALYSIS:
    =========
    Check for REFERENCES privilege was using incorrect database
    in some cases.
    
    There was discrepancy between database which was used by
    SEs for parent tables and used for check of REFERENCES
    privilege in cases when no explicit database was specified
    for parent table.
    
    FIX:
    ====
    This patch removes the discrepancy by aligning check for
    REFERENCES privilege with SE behavior.

commit 281cd0050071d9eae3734737462660f6badf1460
Merge: 7c2d9b1 f18713f
Author: Maria Couceiro <maria.couceiro@oracle.com>
Date:   Fri Oct 27 10:48:35 2017 +0100

    Merge branch 'mysql-5.7' into mysql-8.0

commit f18713fbb71cbe53f10fad7aa00bb6071a0c96e3
Author: Maria Couceiro <maria.couceiro@oracle.com>
Date:   Fri Oct 27 09:19:58 2017 +0100

    BUG#25873029 HEAP-USE-AFTER-FREE IN RPL.RPL_JSON [noclose]
    
    Disabling rpl.rpl_virtual_gcol test for valgrind and ASAN runs.

commit 7c2d9b1ddb55d3ba15cdb0c2db3c2cb011ab54cc
Author: Terje Rosten <terje.rosten@oracle.com>
Date:   Fri Oct 27 10:17:40 2017 +0200

    Bug#25967079 WRONG MIN_VALUE IN PFS.VARIABLES_INFO ON 32 BITS BIG ENDIAN PLATFORM
    
    Wrong format specifier caused issue on 32 bits BE platforms.
    
    Change is mysql-8.0 specific, resolved in trunk by
      BUG#26696147: REMOVE MY_SNPRINTF

commit b0cbb069a02b685d950f183d679915ff31988931
Author: Bharathy Satish <bharathy.x.satish@oracle.com>
Date:   Fri Oct 27 10:44:44 2017 +0200

    Bug #26085774: SERVER CRASHES WHEN STARTED USING CORRUPTED MYSQLD-AUTO.CNF
    
    Post push fix. mtr test added as part of this patch is failing on windows.
    This is because on windows the error code returnded is 0 even when server
    fails to start. Fixed this issue.

commit 5a2f19e2930f8f26a789812f9eb23a5c372ed922
Author: Athreya Permunda <athreya.permunda@oracle.com>
Date:   Fri Oct 27 12:25:07 2017 +0530

    Bug #27009386 SOME NDBAPI EXAMPLE PROGRAMS DO NOT CLEANUP DATA, TABLE BEFORE EXIT
    
    The ndbapi_array_simple and ndbapi_array_using_adapters example programs fail to run
    when tried to run more than once. This is because the program fills the respective
    table with tuples when run the first time and tries to insert the same tuples when
    run again, thus giving an error that the tuples already exist.
    code: 630, msg: Tuple already existed when attempting to insert.
    
    Fix:
    After inserting and reading the tuples of the tables, perform a cleanup, i.e., delete
    all tuples in the tables.

commit 9dbe18a9bd7d509f775491ccbd9ea19fa7eaf785
Author: Parveez Baig <parveez.baig@oracle.com>
Date:   Fri Oct 27 13:15:13 2017 +0530

    Bug#27005984: IMPROVE THE INC FILE RPL_SKIP_TO_END_OF_RELAY_LOG.INC
    
     The inc file include/rpl_skip_to_end_of_relay_log.inc will
    make use of the function defined in gtid_utils.inc but it has
    not been documented in the inc file about it. If
    rpl_skip_to_end_of_relay_log.inc will be called without
    including gtid_utils.inc test would fail sporadically.
    The failure might be sporadic as the inc file make use of
    function in gtid_utils.inc only whenever all the transactions
    received have not been committed.
    
    Fix: Added the comment under header section about the use of
         gtid_utils.inc and also made the test to fail with an error
         message if gtid_utils is not included before using
         include/rpl_skip_to_end_of_relay_log.inc

commit 0e4c0fc6aba587a0fe9e1cd56d12b82743ca2c61
Author: Erlend Dahl <erlend.dahl@oracle.com>
Date:   Thu Oct 26 15:13:49 2017 +0200

    Bug#27010613 CONTRIBUTION: FIX TYPO IN RECOVERY MESSAGE
    
    Correct misspelling of "recovery".
    
    Patch contributed by Daniël van Eeden.
    
    Approved by Sunny Bains <sunny.bains@oracle.com> over IM.

commit bb200043936d90fdb4d1a1bfb06f678c92a8a102
Merge: 15353b7 f05b9a5
Author: Ole John Aske <ole.john.aske@oracle.com>
Date:   Thu Oct 26 15:53:25 2017 +0200

    Merge branch 'mysql-5.7-cluster-7.6' into mysql-8.0-cluster-8.0

commit f05b9a534ddef14e34764030c43ebff24f45f6ed
Author: Ole John Aske <ole.john.aske@oracle.com>
Date:   Thu Oct 26 15:51:46 2017 +0200

    Fix failing ndb_spj_dict.test
    
    Also accept 'table not found' as legal outcome of testcase.

commit f51eb4a4de06bac50198bbc65015798c33b3b104
Merge: 856fa6b 090bb6a
Author: Arun Kuruvila <arun.kuruvila@oracle.com>
Date:   Thu Oct 26 18:12:52 2017 +0530

    Merge branch 'mysql-5.7' into mysql-8.0

commit 090bb6ac6e1537f1b10e314f7b554fa791f03890
Merge: a72de07 840a2d7
Author: Arun Kuruvila <arun.kuruvila@oracle.com>
Date:   Thu Oct 26 18:11:38 2017 +0530

    Merge branch 'mysql-5.6' into mysql-5.7

commit 840a2d7d35dfaa68074d1ae6b52dadd73b8e5462
Merge: f9ea26b 4677865
Author: Arun Kuruvila <arun.kuruvila@oracle.com>
Date:   Thu Oct 26 18:09:50 2017 +0530

    Merge branch 'mysql-5.5' into mysql-5.6

commit 4677865be92bd6a7f3c0e75611ae128d10fda475
Author: Arun Kuruvila <arun.kuruvila@oracle.com>
Date:   Thu Oct 26 18:07:36 2017 +0530

    Bug #26880757: MYISAM_USE_MMAP=1 ON WINDOWS FREQUENTLY DOES
                   NOT UPDATE FILE ON DISK
    
    Description:- When the server variable, "myisam_use_mmap" is
    enabled, MyISAM tables on windows are not updating the file
    on disk even when the server variable "flush" is set to 1.
    This is inturn making the table corrupted when encountering
    a power failure.
    
    Analysis:- When the server variable "myisam_use_mmap" is set,
    files of MyISAM tables will be memory mapped using the OS
    APIs mmap()/munmap()/msync() on Unix and CreateFileMapping()
    /UnmapViewOfFile()/FlushViewOfFile() on Windows. msync() and
    FlushViewOfFile() is responsible for flushing the changes
    made to the in-core copy of a file that was mapped into
    memory using mmap()/CreateFileMapping() back to the
    file system.  FLUSH is determined by the OS unless
    explicitly called using msync()/FlushViewOfFile().
    
    When the server variables "myisam_use_mmap" and "flush" are
    enabled, MyISAM is only flushing the files from file system
    cache to disc using "mysql_file_sync()" and not the memory
    mapped file from memory to FS cache using "my_msync()".
    ["my_msync()" inturn calls  msync() on Unix and
    FlushViewOfFile() on Windows.
    
    Fix:- As part of the fix, if server variable
    "myisam_use_mmap" is enabled along with  "flush",
    "my_msync()" is invoked to flush the data in memory to file
    system cache and followed by "mysql_file_sync()" which will
    flush the data from file system cache to disk.

commit 15353b7dde26bfcd4040c4f9bfaca36b06fd57e7
Author: Dinesh Surya Prakash <dinesh.prakash@oracle.com>
Date:   Mon Oct 23 14:25:46 2017 +0530

    Bug#26966826 PORT BUG#23523926 DEPRECATE "PERROR --NDB" TO 8.0
    
    pre existing test case ndb_basic.test covered the testcase of BUG#23523926.
    But this test case is disabled and hence a new test scenario were added to
    ndb_perror.test which has similar test scenarios for ndb_perror.

commit 856fa6b229de420eb5b3b664c8f44a4ad41e92a3
Merge: a34e835 a72de07
Author: Venkatesh Duggirala <venkatesh.duggirala@oracle.com>
Date:   Thu Oct 26 16:42:34 2017 +0530

    Merge branch 'mysql-5.7' into mysql-8.0

commit a72de071db4f8f559041260cf1236ab874d3b5dd
Merge: d50d332 f9ea26b
Author: Venkatesh Duggirala <venkatesh.duggirala@oracle.com>
Date:   Thu Oct 26 16:41:09 2017 +0530

    Merge branch 'mysql-5.6' into mysql-5.7

commit a34e835e8f10ee3a91a51bbe91076944cc71fe30
Author: Bharathy Satish <bharathy.x.satish@oracle.com>
Date:   Thu Oct 26 10:54:21 2017 +0200

    Bug #26085774: SERVER CRASHES WHEN STARTED USING CORRUPTED MYSQLD-AUTO.CNF
    
    Problem: mysqld-auto.cnf file is a json formatted file. When processing this
    file, code assumes all key values to be of string. However when this file is
    manually edited to change any of the value from string to any other data type,
    server code crashes.
    Fix: There is a check introduced which will check if the key-value is a string.
    If this check fails server reports JSON parsing error.

commit f9ea26bb68920e27ad66c87b25e1c3479e7834c4
Author: Venkatesh Duggirala <venkatesh.duggirala@oracle.com>
Date:   Wed Oct 25 21:45:49 2017 +0530

    Bug#26748533 SEMISYNC MASTER CRASH AFTER RESET MASTER
    
    Problem: While some active transaction are waiting for ack from Slave,
             executing 'RESET MASTER' is leaving Master's semisync
             in bad state.
    
    Analysis: In ReplSemiSyncMaster::commitTrx, when transaction is
              waiting for an acknowledgement from the Slave, before
              it goes into the wait state, it increases
              rpl_semi_sync_master_wait_sessions status variable to indicate
              the number of sessions waiting for the acknowledgements. Also
              before it goes into the wait state, it releases LOCK_binlog_ lock
              to avoid any hang issues for the other sessions which are looking
              for LOCK_binlog_. When the thread releases LOCK_binlog_ lock and
              waiting for the acknowledgement, there is a possibility that
              some other thread which is executing 'RESET MASTER' can get the lock
              and reset all the status variables. rpl_semi_sync_master_wait_sessions
              is one of such status variables. After the wait is over in
              ReplSemiSyncMaster::commitTrx (either the timeout or received acknowledgement
              from Slave), the logic is decreasing rpl_semi_sync_master_wait_sessions)
              without checking whether 'RESET MASTER' was executing by any other parallel
              thread. This leads invalid value for rpl_semi_sync_master_wait_sessions
              status variable. Any other logic which is trying to use this status variable
              will lead to unexpected results in the server.
    Fix: Check the value of rpl_semi_sync_master_wait_sessions before decrementing
         it and decrement it only if it is non-zero value.

commit e7ff11ef1067ec8f9e0b6e42955bfb4591b5f5b4
Author: Magnus Blåudd <magnus.blaudd@oracle.com>
Date:   Wed Oct 25 08:44:03 2017 +0200

    WL#8500 Adapt MySQL CLuster to 8.0
    
     - change prefix of ndb_socket functions,
          i.e my_socket -> ndb_socket. Originally the
       ndb_socket files were written as socket library
       wrapper functions for mysys and then it made sense to use
       the my_ prefix. Now it's a selfcontained part of NDB
       and thus it should use the ndb_ prefix.
     - remove unused my_socket_set_errno() and replace
       with direct call to WSASetLastError() in Win specific code
     - remove unused my_socket_get_fd()
     - remove unused my_bind()
     - remove unused my_shutdown() and my_socket_equal()
     - fix ndb_socket.h includes, it's not a system header file
     - rename ndb_socket_close() -> ndb_socket_close_with_reset()
     - remove NDB_CLOSE_SOCKET define and call ndb_socket_close() directly
     - change NDB_SOCKET_TYPE to a typedef

commit d50dd54d9cafb687da21afc40ed39eb2eed614d0
Author: Magnus Blåudd <magnus.blaudd@oracle.com>
Date:   Wed Oct 25 08:17:50 2017 +0200

    WL#8500 Adapt MySQL CLuster to 8.0
    
     - remove small dependency on mysys in ndb_socket. This is in
       preparation for major header refactorings in mysql-trunk and
       it's better to make ndb_socket independent of those rather than
       accepting that ndb_socket start to include fils from all over the
       place.
     - introduce new type ndb_socket_len_t and use it instead
       of socket_len_t from mysys

commit e3473e59abebf2f302f4afb4085157252899aa14
Author: Magnus Blåudd <magnus.blaudd@oracle.com>
Date:   Thu Oct 26 08:42:24 2017 +0200

    Bug#26958920 - MAIN.FILE_CONTENTS FAIL WHEN RUN WITH CLUSTER RPM
    
     - remove disabling of file_contents.test

commit 2989733f7f9672dbf43092870ad98e41a6e04303
Author: Erlend Dahl <erlend.dahl@oracle.com>
Date:   Wed Oct 25 12:57:51 2017 +0200

    Bug#26919124 WRONG PERMS ON SCRIPT IBD2SDI.PL AND MYSQLD_SAFE.SH

commit 6f76c19574469bc181202d9093426bbb4c522a88
Merge: a4f0ed1 d50d332
Author: Marc Alff <marc.alff@oracle.com>
Date:   Wed Oct 25 18:30:33 2017 +0200

    Merge branch 'mysql-5.7' into mysql-8.0
    
    Conflicts:
    client/dump/table.cc

commit a4f0ed116ca06099a9706f8cc0d3532d8a33ae3c
Author: Pedro Figueiredo <pedro.figueiredo@oracle.com>
Date:   Wed Oct 25 14:48:23 2017 +0100

    Bug#26449236 RPL.RPL_SLAVE_REGISTER_COVERAGE FAILS SPORADICALLY ON PB2
    
    Description
    -----------
    rpl.rpl_slave_register_coverage fails sporadically on pb2, however passes on
    retry. Frequency of failure is very high. The test looks unstable. Hence
    raising a bug.
    
    Analysis
    --------
    - The test fails due to the value of 'Last_IO_Errno' column for the 'SHOW
    SLAVE STATUS' command being equal to 0
    
    - This value is retrieved both in the
    'mysql-test/suite/rpl/t/rpl_slave_register_coverage.test' file and in the
    'mysql-test/include/wait_for_slave_param.inc'
    
    - This value being equal to 0 means that the slave IO thread hasn't raised
    an error within the timeout interval stored in $slave_timeout varaible
    and used in the file 'mysql-test/include/wait_for_slave_param.inc'
    
    - Since the error that should be raised is one resulting from changing from
    an authorized user to an unauthorized one, it means that the slave may haven't
    synchronized with the master, yet, and might be hanging on
    
    Fix
    ---
    - Add a synchronization point after the 'CREATE USER rpl_user', by sourcing
    'include/sync_slave_sql_with_master.inc'.

commit ed49e739ed9a39cbccb9f05295d0dee2bd8bd9d8
Author: Malika Agarwal <malika.agarwal@oracle.com>
Date:   Wed Oct 25 17:18:24 2017 +0530

    Bug#27021672: FUNCS_1.IS_BASICS_MIXED, MAIN.OUTFILE, MAIN.PS_SYS_UPGRADE
                  FAILING ON PB2
    
    Tests have been disabled.

commit 2d7c0105a160b20f68b7c3fa29591f142833110c
Merge: 7e54e48 ded320b
Author: Balasubramanian Kandasamy <balasubramanian.kandasamy@oracle.com>
Date:   Wed Oct 25 17:59:32 2017 +0530

    Merge branch 'mysql-5.7-cluster-7.6' into mysql-8.0-cluster-8.0

commit ded320b9328e4c260675f7e9fd449ea7842b0968
Merge: 3a623e9 2978a23
Author: Balasubramanian Kandasamy <balasubramanian.kandasamy@oracle.com>
Date:   Wed Oct 25 17:56:51 2017 +0530

    Merge branch 'mysql-5.7-cluster-7.5' into mysql-5.7-cluster-7.6

commit 2978a237bd36794bcd2e341f02cbff6c0e141094
Author: Balasubramanian Kandasamy <balasubramanian.kandasamy@oracle.com>
Date:   Wed Oct 25 17:50:20 2017 +0530

        Bug#26958920 - MAIN.FILE_CONTENTS FAIL WHEN RUN WITH CLUSTER RPM
         - Skip the management-server directory in the documentation path
           for cluster release

commit ffd67cc8f2561f6daa25ba32aa8159e40064b2aa
Author: Anibal Pinto <anibal.pinto@oracle.com>
Date:   Wed Oct 25 14:05:45 2017 +0200

    BUG#26372117: GROUP REPLICATION VARIABLE UPDATES ARE NOT SAFE AGAINST STOP
    
    When a group replication variable was updated it validates if the internal
    module is working. The validation don't pretend that the module is working
    after that point.
    
    To prevent this problem we now only allow changing the variable if the group
    replication isn't changing state, from start to stop or vice versa.

commit d50d332f81a8aa222700b508fb9d55d97868dfec
Author: Marc Alff <marc.alff@oracle.com>
Date:   Wed Oct 25 14:03:21 2017 +0200

    Bug#26116415 TABLESPACE CLAUSE CONFUSES MYSQLPUMP
    
    Before this fix,
    mysqlpump failed to export tables using a tablespace.
    
    The root cause is that mysqlpump parses the
    result of SHOW CREATE TABLE,
    and is not expecting the TABLESPACE clause.
    
    In the following statement:
    CREATE TABLE `t1` (
      `a` int(11) DEFAULT NULL
    ) /*!50100 TABLESPACE `mytbsp` */ ENGINE=InnoDB DEFAULT CHARSET=latin1
    
    MYSQLPUMP was looking for ") ENGINE=" ...,
    and failed to detect this line.
    
    The fix is to relax parsing of SHOW CREATE TABLE,
    so that the line:
      ) /*!50100 TABLESPACE `mytbsp` */ ENGINE=...
    is also detected as the table options clause.

commit fd07aa8027e7314fdda1df3a8418b35fd414188b
Author: Tiago Jorge <tiago.jorge@oracle.com>
Date:   Tue Oct 17 14:25:23 2017 +0100

    BUG#26985976 - REINSTATE BUG#22671846 PATCH IN MYSQL 8.0+
    
    Description:
    -----------
    With the patch for WL#10632 - Update XCom in GR and due to a poor merge, one
    trampled the patch that had been made to solve Bug#22671846.
    
    How To Repeat:
    -------------
    The code is not present since the push of WL#10632
    
    Suggested Fix:
    -------------
    Reinstate the patch.

commit b5f06cdc8e38dcece4ad3a9089b85353619d554b
Author: Jaideep Karande <jaideep.karande@oracle.com>
Date:   Wed Oct 25 12:20:40 2017 +0200

    BUG#25429322 : GROUP_REPLICATION.GR_PREPARED_STATEMENTS FAILS SPORADICALLY ON SLOW SYSTEMS
    
    Problem: Test case GR_PREPARED_STATEMENTS only checks count of records
    
    Description:
    Test case GR_PREPARED_STATEMENTS only checks count of records and does not
    wait for operations to replicate across group.
    Test case has series of inserts, delete and update statements.
    On slow system its possible count of records may match in between operations
    causing later record matching checks to fail.
    
    e.g.
    1.  S-1 I(1) TABLE(1)
    2.  S-1 I(2) TABLE(1,2)
    3.  S-1 I(3) TABLE(1,2,3)
    
    4.  S-2 I(4) TABLE(1,2,3,4)
    5.  S-2 I(5) TABLE(1,2,3,4,5)
    6.  S-2 I(6) TABLE(1,2,3,4,5,6)
    
    7.  S-2 U(+10) TABLE(11,12,13,14,15,16)
    8.  S-2 D(11) TABLE(12,13,14,15,16)
    9.  S-2 D(12) TABLE(13,14,15,16)
    (S-1 mean server-1, I(1) mean insert 1 in table t1, and TABLE(1) means records
    in table t1)
    Count of records matches to 4 in step 4 and step 9.
    On slow machines WAIT condition comes out in step 4 instead of step 9.
    This causes difference in records causing test to fail.
    
    Resolution:
    Added call to rpl_sync to make sure records are replicated.
    Replaced corresponding wait with assert.

commit 3089dc51542c40ecb74509bd05d2ae8a1fab3c33
Merge: 1c73c5b b0d4c8b
Author: Pedro Figueiredo <pedro.figueiredo@oracle.com>
Date:   Wed Oct 25 09:34:48 2017 +0100

    Merge branch 'mysql-8.0-pf-bug-26370868' into mysql-8.0

commit 1c73c5b73459b4fd861de3be628cae2588ee045d
Author: Chaithra Gopalareddy <chaithra.gopalareddy@oracle.com>
Date:   Wed Oct 25 12:55:50 2017 +0530

    Bug #26740557: WINDOW FUNC + JSON: ASSERTION FAILED: FALSE IN ITEM::VAL_JSON
    
    Problem:
    For the testcase in bugpage, after aggregating datatypes in
    Item_lead_lag::resolve_type, the the resulting datatype is set to be
    ITEM_TYPE_JSON. As a result, we further determine that the compare
    function for "=" operator would be compare_json which calls val_json() on
    Item_lead_lag. Since val_json is not defined, Item::val_json gets called
    which asserts.
    
    Analysis:
    In a general case, windowing functions get evaluated in end_write_wf() which
    calls save_in_field. This function calls evaluation functions based on the
    result type (except for some special cases). So for json datatypes, it would
    be val_str. However in the test case, no user tables are involved. So the
    plan is determined to be constant and therefore we set the end select function
    to be end_send_group which calls the evaluation functions based on the datatypes
    involved.
    
    Solution:
    Defined val_json for Item_lead_lag. Also changed ::resolve_type() for
    Item_first_last_value and Item_nth_value in line with Item_lead_lag. This
    necessitates the need for defining ::val_json for these functions too.

commit e6820a8f323aadfe9eddb5457ae983d7666a4b13
Author: Bin Su <bin.x.su@oracle.com>
Date:   Tue Oct 24 16:35:32 2017 +0800

    Fix memory leak for ./mtr --mem --sanitize innodb.autoinc_persist_debug
    
    The problem is PersistentTableMetadata was allocated by replacement
    new during recovery, but the vector in it may require more memory
    later. So the new memory could not be managed by the delete of
    original memory used for replecement new.
    
    Since the replacement new is totally unncessary, replacing it with
    normal new fixes this problem.
    
    Reviewed-by: Allen Lai <allen.lai@oracle.com>

commit e3493155fac3770122c04306601714a46ee3035d
Author: Hemant Dangi <hemant.dangi@oracle.com>
Date:   Tue Oct 24 16:13:03 2017 +0200

    Bug#26277771: BAD WRITE SET TRACKING WITH UNIQUE KEY ON A DELETE FOLLOWED BY AN INSERT.
    
    Issue:
    ======
    The Writesets generated for keys were not using collation into consideration,
    and because of that wrong last_committed and sequence_number were
    getting added to binary log and thus trnsactions were getting applied
    in wrong order by parallel applier on slave.
    
    Solution:
    =========
    The fix uses make_sort_key to transform keys, with different charset and
    collation, into its binary image, suitable for sorting using binary comparison.

commit ba5ceef7441a7a30607cafe1c9904788b96e3931
Author: Ingo Struewing <Ingo.Struewing@oracle.com>
Date:   Fri Oct 20 12:24:43 2017 +0200

    WL#10328 - mysql-trunk-meb-wl10183 changes in Server Trunk
    
    Post-push fixes.
    
    Disable Clang compiler warnings for extra/re2.
    
    Get mysqlbackup.pdb to the binary package on Windows.
    
    Avoid MEB tests to create databases when they are skipped.
    
    Fix meb.big_validate_cmp_image.

commit 3a6cb32bd7bf6be62f81efe68b296b6b7a1c2807
Author: Abhishek Ranjan <abhishek.ar.ranjan@oracle.com>
Date:   Tue Oct 24 14:32:26 2017 +0530

    Bug#26945125 : UPGRADE TO 8.0 FAILS WHEN GENERATED COLUMNS CONTAINED DEPRECATED FUNCTIONS
    
    If a function used in the definition of a (virtual) generated column
    is removed in mysql-8.0, starting mysql-8.0 server on mysql-5.7 data
    directory gives 'No database selected' error in the error log. The
    name of the table is also not mentioned for which the error occured.
    
    Fix:
    ----
    - In-place upgrade from mysql-5.7 to mysql-8.0 with generated column
      definition containing functions which are removed in mysql-8.0 is
      not supported.
    - Add the name of schema name and table name in the error message
      for which generated column expression processing failed.
    - Do not print error in error log encountered while parsing the
      generated columns.

commit 950054da658a654025b2e71ba5eb0c7bf2e9032e
Author: Lukasz Kotula <lukasz.kotula@oracle.com>
Date:   Tue Oct 17 09:45:53 2017 +0200

    Bug#26980453 - X.CONNECTION_LOCAL_SCOPE TOGGLES ON PB2
    
    Desciption
    ----------
    
    On some machines local scope address can resolve to "localhost"
    which make difference between acutal output and result file.
    
    Fix
    ---
    
    Replace local scope address with "localhost" in output.
    
    RB:17662
    Reviewed-by: Grzegorz Szwarc <grzegorz.szwarc@oracle.com>
    Reviewed-by: Tomasz Stepniak <tomasz.s.stepniak@oracle.com>

commit 7e54e48babd9744aa749e138376b0b879c93f820
Author: Magnus Blåudd <magnus.blaudd@oracle.com>
Date:   Tue Oct 24 08:54:31 2017 +0200

    WL#9185 MySQL Cluster support for new DD
    
     - remove set_ndb_share_state(), it's a remnant from
       removing the unused NSS_ALTERED state

commit 6aa8fadafaafd90503b1591e80a95810d6df1593
Author: Magnus Blåudd <magnus.blaudd@oracle.com>
Date:   Thu Oct 19 13:31:56 2017 +0200

    WL#9185 MySQL Cluster support for new DD
    
     - remove unused function definition

commit 067ce4e6d8debd372ce8f5d7d63800fa2602d757
Author: Magnus Blåudd <magnus.blaudd@oracle.com>
Date:   Fri Oct 20 16:40:38 2017 +0200

    WL#9185 MySQL Cluster support for new DD
    
     - remove useless variable "found"

commit 6acb10e6e9b38a70f069c1ed8e3f0b59546fca42
Merge: 16a3ad7 1eb4374
Author: Daogang Qu <bill.qu@oracle.com>
Date:   Tue Oct 24 11:23:27 2017 +0800

    Merge branch 'mysql-5.7' into mysql-8.0

commit 1eb4374db09f7d24488307bbed4b8100f197240d
Author: Daogang Qu <bill.qu@oracle.com>
Date:   Tue Oct 24 11:21:19 2017 +0800

    Bug #26976071   TYPO, 'THE BINLOG AND LOG_SLAVE UPDATE OPTIONS'
    
    Start mysqld with --skip-log-bin causes the following error message:
    [ERROR] mysqld: slave_preserve_commit_order is not supported unless
    the binlog and log_slave update options are both enabled.
    The error message is misleading, since there is no such option as
    "log_slave update".
    
    To fix the problem, correct the error message to
    "slave_preserve_commit_order is not supported
    unless both log_bin and log_slave_updates are enabled.".

commit 16a3ad7c5ce5c6a52dca6703ad0f451c484d71a0
Author: Christopher Powers <chris.powers@oracle.com>
Date:   Thu Oct 19 23:32:41 2017 +0200

    Bug#26980399 STACK BUFFER OVERFLOW OF LOWER_CASE_NAME WHEN SETTING VARIABLES
    
    This bug is a regression from Bug#25680866 "CHARACTER SET SPECS HAVE LOUSY PERFORMANCE..."
    which introduced functions that map character set and collation names to a number.
    These functions copy a null-terminated name string into a fixed-size buffer for
    for conversion to lower case. The problem is that incoming strings longer than
    the buffer are not re-terminated with null, allowing subsequent reads beyond
    the end of the buffer.
    
    The fix ensures that character set names are null-terminated before converting
    to lowercase.

commit fb24f312ed7d438bb4f2c0d79ca2416ec7fee6da
Author: Abhishek Ranjan <abhishek.ar.ranjan@oracle.com>
Date:   Mon Oct 23 21:58:18 2017 +0530

    Bug#26636238 : ERROR/INPLACE UPGRADE TO READ-ONLY 8.0: PERFORMANCE
                   SCHEMA INITIALIZATION FAILED
    
    Post push fix:
    
    Fix test case to repeat information schema version mismatch
    failure with --innodb-read-only instead of --read-only option
    for thread_pool.thread_pool_i_s_restart.test

commit b29c79e5df6044857da133abb2122e9e9a4f5dcf
Merge: e4ea43f e09ef05
Author: Maria Couceiro <maria.couceiro@oracle.com>
Date:   Mon Oct 23 16:05:26 2017 +0100

    Merge branch 'mysql-5.7' into mysql-8.0

commit e09ef052c2f4145981fc7a51a197b55b16a495c1
Author: Maria Couceiro <maria.couceiro@oracle.com>
Date:   Tue Sep 26 12:15:37 2017 +0100

    BUG#26280724 ASSERT FAILURE WHEN REPLICATING TABLE WITH VIRTUAL JSON COLUMN
    
    Problem and analysis:
    When row based replication is enabled and slave-rows-search-algorithms
    is set to 'INDEX_SCAN,HASH_SCAN', updating a table containing a virtual
    generated field that relies on its string representation to generate
    the hash for the table scan would result in an error when generating
    the said string.
    
    Fix:
    Since virtual generated fields cannot be used to identify a row, do
    not create hashes for virtual generated fields. Also, exclude these
    fields when comparing records field by field.

commit e4ea43fce46613ac83c070954da283028060c3a5
Author: Grzegorz Szwarc <grzegorz.szwarc@oracle.com>
Date:   Fri Oct 20 18:01:33 2017 +0200

    Bug #26906519: JSON_UNQUOTE() SHOULDN'T BE CALLED FOR PARAMETERS TO JSON FUNCTIONS
    
    Description:
    The following mysqlsh sequence of commands generates an unexpected
    error:
    collection.find().fields(["json_type(name)"])
    
    Fix:
    If a parameter is given to a known function expecting JSON string,
    do not json_unquote() it.
    
    Reviewed-by: Lukasz Kotula <lukasz.kotula@oracle.com>
    Reviewed-by: Tomasz Stepniak <tomasz.s.stepniak@oracle.com>
    RB: 17722

commit 9466f785a72a0d512c13e4c08273b6cc07851403
Author: Grzegorz Szwarc <grzegorz.szwarc@oracle.com>
Date:   Wed Oct 18 12:20:20 2017 +0200

    Bug #26906487: CREATE_INDEX TURNS COLLECTION INTO PLAIN TABLE
    
    Description:
    Creating an index on a collection will dissolve its "magic" and turn
    it back into a table. Apparently, list_object will no longer recognize
    collections as such once an index is created on it.
    
    Fix:
    The regex expression used to distinguish between collection and table
    has been improved.
    
    Reviewed-by: Lukasz Kotula <lukasz.kotula@oracle.com>
    Reviewed-by: Tomasz Stepniak <tomasz.s.stepniak@oracle.com>
    RB:17680

commit 6080e8f05b8978ecac7afb1737c50d1dbe873bb0
Author: Erlend Dahl <erlend.dahl@oracle.com>
Date:   Mon Oct 23 09:49:24 2017 +0200

    Make a GR test restore the system variable state.
    
    Save and restore configuration variables to make sure
    group_replication.gr_ps_applying_trx_recovery_channel passes
    check-testcase in all test configurations.

commit ac74bdd8b330f531743189e4cec14453fb791137
Author: Dinesh Surya Prakash <dinesh.prakash@oracle.com>
Date:   Mon Oct 23 14:10:27 2017 +0530

    Bug#26966826 PORT BUG#23523926 DEPRECATE "PERROR --NDB" TO 8.0
    
    "perror" is a mysql tool to give error message for an error code. We can
    also get ndb cluster error messages when we pass "--ndb" as argument along
    with error code. But now a new tool called "ndb_perror" is available
    exclusively for ndb cluster. Hence now depricating "--ndb" functionality in
    "perror".
    
    BUG#23523926 does the same fix on 7.6 version. But, mysql-trunk have renamed
    and moved the file "\extra\perror.cpp" to "\utilities\perror.cc".So, during
    8.0 merge this change is conflicted and missed.
    
    Now, making the fix directly into "mysql-trunk" to avoid conflicts in
    future.

commit 199c439e0588bb8007e6521cf670394c44df5e94
Author: Norvald H. Ryeng <norvald.ryeng@oracle.com>
Date:   Mon Oct 23 12:59:26 2017 +0200

    Bug #26990896 UPGRADE TO EPSG DATASET 9.2
    
    The previous SRS definitions were generated from EPSG Dataset 9.1. The
    new ones are generated from EPSG Dataset 9.2.
    
    Changes:
    
     - New SRSs: SRIDs 8082-8083 and 8232-8348
     - Adjustment of TOWGS84 parameters of SRIDs 2987 and 4638
     - Correction of name of SRID 6863
    
    Change-Id: I4b737c3971b09211cd2ed38906fc3c3cfc6a6e56

commit ddefac5d66e561e921c67fee82ad73cd41dd8026
Author: Knut Anders Hatlen <knut.hatlen@oracle.com>
Date:   Wed Oct 18 16:42:47 2017 +0200

    Bug#23321196: GCOLS: ASSERTION FAILURE: DFIELD_IS_NULL(DFIELD2) || DFIELD2->DATA
    
    An assertion was triggered when deleting rows from a table that had an
    indexed virtual BLOB column with a NOT NULL constraint, and the
    generated column expression evaluated to NULL in one of the rows that
    were being deleted.
    
    When the NULL value that resulted from the generated column was
    converted to a not-NULL value to fit the column definition, the
    address stored in Field_blob::ptr was zero. This made
    Field_blob::get_ptr() return nullptr, even though the column was
    marked as non-nullable, and this broke the assertion.
    
    The fix is to make the address stored in Field_blob::ptr point to an
    empty string when coercing a NULL value into a NOT NULL column.

commit 832e8d87b6b0a5b64c8b35f58841ae175aa1cd24
Author: Gopal Shankar <gopal.shankar@oracle.com>
Date:   Sun Oct 22 07:10:14 2017 +0200

    Bug#26199233 create like ignores innodb_file_per_table
    
    This patch fixes following three issues,
    
    Consider following table,
      SET @@global.innodb_file_per_table=OFF;
      CREATE TABLE t1 (c1 INT) ENGINE=InnoDB;
    
    Problem 1)
      The statements
      SET @@global.innodb_file_per_table=ON;
      CREATE TABLE t2 LIKE t1;
    
      Ignores innodb_file_per_table setting and picks the
      tablespace name used by table t1, even if user did not
      explicitly specify the tablespace name for t1. MySQL 5.7
      assigns tablespace name based on innodb_file_per_table
      setting.
    
    Problem 2)
      SHOW CREATE on table t1, shows TABLESPACE `innodb_system`
      clause, even when user did not explicitly specify
      tablespace.  MySQL 5.7 do not show TABLESPACE clause.
    
    Problem 3)
      SHOW CREATE on table names that match DD table names
      created in any database, endup showing tablespace name as
      'mysql'.
      E.g.,
        ...
        CREATE DATABASE db1;
        CREATE TABLESPACE ts0 ADD DATAFILE 'df0.ibd';
        CREATE TABLE db1.tables (c1 INT)
          ENGINE=InnoDB tablespace=ts0;
        SHOW CREATE TABLE db1.tables;
        Table Create Table
        tables  CREATE TABLE `tables` (
           `c1` int(11) DEFAULT NULL
        ) /*!50100 TABLESPACE `mysql` */
        ENGINE=InnoDB DEFAULT CHARSET=utf8mb4
        ...
    
    The patch fixes above issues by,
    
    - Maintain a boolean property 'explicit_tablespace=true' in
      mysql.tables.options, if user provides TABLESPACE clause
      when creating tables.
    
    - Make CREATE LIKE copy tablespace name, only
      if 'explicit_tablespace' property is true for the source
      table.  Otherwise InnoDB would decide the tablespace name
      based on 'innodb_file_per_table', this fixes 1)
    
    - SHOW CREATE implementation now reads the table property
      'explicit_tablespace' to decide if we need to print the
      TABLESPACE clause in the output. This fixes 2)
    
    - Use 'mysql' tablespace id to speed-up
      get_tablespace_name() on DD tables. This fixes 3).
    
    - The recorded result files now match 5.7 results.
    
    - Added new test case in innodb.create_tablespace.
    
    Change-Id: I7f890569f41a048e5e264d50434c30b8d4773311

commit 1f2dc7993225c2a1b64a15e1a7eb0f1c309e25f3
Merge: e2658bd 15a6dbb
Author: Karthik Kamath <karthik.kamath@oracle.com>
Date:   Mon Oct 23 11:05:33 2017 +0530

    Merge branch 'mysql-5.7' into mysql-8.0

commit 15a6dbb22394ec5a93d09249fc9f8d0f73e758aa
Merge: b4de634 2f6b4b3
Author: Karthik Kamath <karthik.kamath@oracle.com>
Date:   Mon Oct 23 11:04:18 2017 +0530

    Merge branch 'mysql-5.6' into mysql-5.7

commit 2f6b4b330b9584c8d82b5a3f7939d92d6fd08ea7
Merge: 895873b a24a42e
Author: Karthik Kamath <karthik.kamath@oracle.com>
Date:   Mon Oct 23 11:00:07 2017 +0530

    Merge branch 'mysql-5.5' into mysql-5.6

commit a24a42e68b43ab3b4ea796abc24bbe1a4577202c
Author: Karthik Kamath <karthik.kamath@oracle.com>
Date:   Mon Oct 23 10:56:20 2017 +0530

    BUG#26529369: CREATE INDEX WITH LONG COMMENT CAUSE
                  UNEXPECTED ERROR
    
    ANALYSIS:
    =========
    Creating many indexes with large amount of index
    information causes a server exit.
    
    FIX:
    ====
    A appropriate error is reported when the cumulative index
    information length exceeds the 2 byte range (i.e 65535).

commit e2658bdaab08014c8c12bf4da33f105a781d9636
Author: Parveez Baig <parveez.baig@oracle.com>
Date:   Mon Oct 23 10:10:30 2017 +0530

    Bug#25213570: RPL_GTID.RPL_MULTI_SOURCE_MTR_INCLUDES FAILS SPORADICALLY ON PB2
    
     The test sources include/rpl_skip_to_end_of_relay_log.inc which
    calls the function GTID_FROM_GTID_SET which exists in
    include/gtid_utils.inc . But the test won't source the file
    include/gtid_utils.inc hence the test fails with ERROR failed:
    1305: FUNCTION test.GTID_FROM_GTID_SET does not exist
    
    Fix: Set $rpl_gtid_utils= 1 before calling master-slave.inc in test.

commit a606ee86965aade91d6f53493adfa90a637c541c
Merge: 0d3d5be 3a623e9
Author: Pekka Nousiainen <pekka.nousiainen@oracle.com>
Date:   Sat Oct 21 14:49:31 2017 +0300

    Merge branch 'wl7614-7.6' into wl7614-8.0

commit 3a623e98107b854f12bceb1d4f4077bfa5ef0700
Author: Pekka Nousiainen <pekka.nousiainen@oracle.com>
Date:   Sat Oct 21 14:43:53 2017 +0300

    wl#7614 max-rows.diff
    
    fix test option --max-rows for csv

commit 849cacbad9090218ba6e6b8026f82b3b6cdf4f3d
Author: Pekka Nousiainen <pekka.nousiainen@oracle.com>
Date:   Sat Oct 21 14:41:29 2017 +0300

    wl#7614 options-06.diff
    
    change option --verbose to --log-level
    reserves --verbose for user-level output

commit 398990a485837dd3b51ce4634a0c7c2023e42847
Author: Pekka Nousiainen <pekka.nousiainen@oracle.com>
Date:   Sat Oct 21 14:19:52 2017 +0300

    wl#7614 pagecnt-fix.diff
    
    fix diag team csv input odd pagecnt

commit dc8c1c5520e7db47a2f17460b3c9722267d80e6f
Author: Pekka Nousiainen <pekka.nousiainen@oracle.com>
Date:   Sat Oct 21 14:18:23 2017 +0300

    wl#7614 options-05.diff
    
    change defaults based on test runs
    (20 cores, HDD - YMMV)

commit 18338a4c97ce93d1f8ebd3b989e4a009063ca50c
Author: Pekka Nousiainen <pekka.nousiainen@oracle.com>
Date:   Sat Oct 21 14:15:21 2017 +0300

    wl#7614 options-04.diff
    
    add stats for csv waittail/movetail

commit 17d96ce21bbc444f6f210fd16f555fbc7db6f6de
Author: Pekka Nousiainen <pekka.nousiainen@oracle.com>
Date:   Sat Oct 21 14:12:56 2017 +0300

    wl#7614 options-03.diff
    
    missing saved options

commit a7f8955df172ed2bc8af10ed383dbd450378df97
Merge: 7cc98ef b4de634
Author: Christopher Powers <chris.powers@oracle.com>
Date:   Fri Oct 20 19:56:43 2017 +0200

    Merge branch 'mysql-5.7' into mysql-8.0

commit b4de6344d18962a7c63d085c1de009295ed99a86
Merge: d9898b6 895873b
Author: Christopher Powers <chris.powers@oracle.com>
Date:   Fri Oct 20 19:03:55 2017 +0200

    Merge branch 'mysql-5.6' into mysql-5.7

commit 895873bd10e497999d2438458d67733704865541
Author: Christopher Powers <chris.powers@oracle.com>
Date:   Fri Oct 20 19:00:10 2017 +0200

    Bug#26732229 PERFORMANCE SCHEMA STATEMENT TABLES SHOULD DISPLAY REWRITTEN QUERY TEXT - MTR
    
    Improve timing in the statement rewrite test for better reliability on PB2.

commit 7cc98efbbaf5de22fa17728933d437ff1ad2a8b6
Author: Dmitry Shulga <dmitry.shulga@oracle.com>
Date:   Fri Oct 20 19:30:51 2017 +0700

    Follow-up patch for the bug#25185947 -- ISSUES WITH RENAMING ROOT USER
    
    Fixed failure in the test rpl_nogtid.rpl_row_001.

commit ea7e577aadb6f1823ac5b138e468b63fdddff20e
Author: Malika Agarwal <malika.agarwal@oracle.com>
Date:   Fri Oct 20 15:06:09 2017 +0530

    Bug #27000217: AUDIT_LOG.AUDIT_LOG_STATUS_VARS FAILS OFTEN ON PB2 [noclose]
    
    The test fails often on PB2, has been disabled

commit 5b511ac230a666e2991b962bf5905fed0144afd5
Author: Srikanth B R <srikanth.b.r@oracle.com>
Date:   Fri Oct 20 14:58:30 2017 +0530

    Bug#26958754 MTR SKIPS ADDING --CONSOLE TO MYSQLD OPTS WHEN
                 --LOG-ERROR ISN'T USED ON WINDOWS
    
    Post-push fix
    
    Change-Id: I213f1f2f4ae5b039f11d8a8326b16a1fad5de38a

commit dacee741022291ffe4d53c7d5110ec3eb52b6172
Author: Rahul Sisondia <rahul.sisondia@oracle.com>
Date:   Fri Oct 20 14:35:50 2017 +0530

    Bug#26880447 OPTIMISTIC PARTIAL BACKUP WITH MATCHED TABLES FAILS
    
    Description
    -----------
    Optimistic backup executes in two phases i.e. first phase and second phase.
    In the first phase it copies only InnoDB files, and second phase is like
    usual backup. Depending upon the options of optimistic backup, there could be
    possibility that innodb files are copied in the first phase or second phase.
    We have a member variable to keep count of InnoDB files included in the backup
    so far but it is reset in every phase.
    
    That means, if InnoDB files are copied in the first phase and there are no files
    to copy in the second phase, then condition checks fail. This could be true
    vice-versa as well.
    
    Fix
    ---
    Changed the member variable that keeps track of InnoDB table copied to a static
    variable.
    
    In the end of first phase of optimistic backup, we don't evaluate the IBD files
    copied to the backup.
    
    Testing
    -------
    
    1. The test file had a major problem. File-per-tablespace was not ON.
    So IBD files related test were working by chance.  Enabled the file-per-table
    in the test file.
    
    2. Added a test when all InnoDB files are copied in the first phase of
      optimistic backup.
    
    3. Added a test when all InnoDB files are copied in the second phase of
    optimistic backup.
    
    Branch-mysql-trunk-meb-wl10183-itch
    Commit#2cdf3977b6f95e9a62a3b077efc3e02ea57c2efe
    Timestamp-2017-10-04 12:10:43
    
    Branch- meb-trunk-wl10183-itch
    Commit#3462d2e99568d29cb624a3ce1429a38a58a52df8
    Timestamp - 2017-10-04 12:52:55
    
    Review
    ------
    RB#17548

commit cee25cafeb801d82bec5b68e1c407cd02d369c64
Author: Rahul Sisondia <rahul.sisondia@oracle.com>
Date:   Fri Oct 20 14:35:22 2017 +0530

    Bug#26897015 PARTIAL BACKUP WITH COMPRESS NOT GIVING ERROR WHEN NO TABLES ARE MATCHING REGX
    
    Description
    -----------
    
    In case of partial backup even if no tablespace is matched, dictionary tablespace is always included. We  retrieve this tablespace from m_state_ibd_files Queue. This queue contains the target file name that has extension .ibz.  As a result the condition check fails.
    
    Fix
    ---
    We now check for mysql.ibz file as well.
    
    Testing
    -------
    
    Added a test for comress backup. Also, improved the other cases.
    
    Branch-mysql-trunk-meb-wl10183-itch
    Commit#27fa6ac3f429d85a4dc9801302bad727823e9ce9
    Timestamp- 2017-09-29 17:55:46
    
    Branch- meb-trunk-wl10183-itch
    Commit#8b770a3c557280da11ab659577664b8cef080f39
    Timestamp -  2017-10-01 13:03:48

commit cc7394e3d8372fced3250196794cdfe310b0c6db
Author: Srikanth B R <srikanth.b.r@oracle.com>
Date:   Fri Oct 20 14:20:49 2017 +0530

    Bug#26958754 MTR SKIPS ADDING --CONSOLE TO MYSQLD OPTS WHEN
                 --LOG-ERROR ISN'T USED ON WINDOWS
    
    Post-push update to the patch
    
    Change-Id: I43dd50cdcdc1740345b48516d3959e6e3082b363

commit 336a252466fb4ee529340b92c0b7dbff0ee8349c
Author: Srikanth B R <srikanth.b.r@oracle.com>
Date:   Thu Oct 12 11:04:58 2017 +0530

    Bug#26958754 MTR SKIPS ADDING --CONSOLE TO MYSQLD OPTS WHEN
                 --LOG-ERROR ISN'T USED ON WINDOWS
    
    Issue:
    -----
    On Windows, MTR checks if --log-error is present in the test options
    or .cnf files and if found, --console is added to the mysqld options
    so that error log is written to stderr and stdout. This was being
    done by searching for the option using the pattern '^log[-_]error'.
    
    Due to this condition, --console was not included even when other
    options like --log-error-verbosity or --log-error-services are
    specified since they match the pattern too.
    
    Fix:
    ---
    The pattern to skip adding --console to the mysqld options is modified
    so that it is added only when the option --log-error is given.
    
    Change-Id: I96a4e9f94f48967a206e630326eb8fa1778d6f06

commit 6967344ea1e9c33e9aa75773d1265a2b00fa06b7
Author: Ingo Struewing <Ingo.Struewing@oracle.com>
Date:   Thu Sep 28 13:12:59 2017 +0200

    WL#10328 - mysql-trunk-meb-wl10183 changes in Server Trunk
    
    First push of MySQL Enterprise Backup (MEB).
    
    (cherry picked from commit d2d5cc33e6d370b5df943e42ec0558cf3510bbd4)

commit 6086664941b6e495f65f776d0068ef866af87a3a
Merge: 17e5abf d9898b6
Author: Ajo Robert <ajo.robert@oracle.com>
Date:   Fri Oct 20 12:07:03 2017 +0530

    Merge branch 'mysql-5.7' into mysql-8.0

commit d9898b64995e2d78bfd465abb0cb23e187d94423
Merge: a08eb8d 04e66ba
Author: Ajo Robert <ajo.robert@oracle.com>
Date:   Fri Oct 20 12:06:44 2017 +0530

    NULL Merge branch 'mysql-5.6' into mysql-5.7
    
    Change-Id: I5223dc640ec53a78f871eeb4e7ace1213f6b6869

commit 04e66ba99d0189f7f8f3f6a766984ae77aa36f09
Author: Ajo Robert <ajo.robert@oracle.com>
Date:   Fri Oct 20 12:06:02 2017 +0530

    Bug#25062396 - ASSERTION `CUR_SHAPE != GCALC_FUNCTION::
                            SHAPE_POINT' FAILED.
    
    Post push test case fix.
    
    Change-Id: I67a12c0a398b640f45d371334933a5e6a0a4e486

commit 17e5abf01ec4d557abe7ce50c0a80e932ac40412
Author: Chaithra Gopalareddy <chaithra.gopalareddy@oracle.com>
Date:   Fri Oct 20 11:52:10 2017 +0530

    Bug #26975882: CRASH IN STRING::COPY, USUALLY WITH WKB FUNCTIONS / WINDOW FUNC
    
    An error is generated while evaluating the first argument to Item_func_buffer.
    Without checking for errors, we proceed further to evaluate the second argument
    which is a WINDOWING function. And the error is caught here. Windowing
    function returns nullptr. But does not set null_value to true. This results
    in server exit later.
    
    Solution:
    Check the error early in Item_func_buffer function.

commit 8219583275b931e6c9785110ae5dc2c6bdf6e8ac
Author: Chaithra Gopalareddy <chaithra.gopalareddy@oracle.com>
Date:   Fri Oct 20 11:21:32 2017 +0530

    Bug#26740635: DAYOFYEAR FUNC: ASSERTION FAILED: NULL_VALUE
    
    Problem:
    ASSERT fails in ::get_date_from_time as one of the function called from
    here returns true after checking for thd->is_error(). However the error
    is raised by functions called earlier which results in null_value not
    being set for this function.
    This makes the ASSERT fail as get_time() is expected to return TRUE only
    when null_value is set to true.
    
    Analysis:
    Errors are generated in the following functions, but are not propagated
    correctly because of the broken interfaces.
    Item_cond_or::val_int():
    Evaluation of the first argument to Item_cond_or raises the error and
    sets "null_value" to true as expected. But Item_cond_or does not check
    for the error. Instead it checks for null_value and continues to evaluate
    the second argument.
    While evaluating the second argument, one of its function call returns
    true because of the ERROR that was raised earlier for the first argument.
    This is not right, as ::get_date_from_time expects ::get_time to return
    true only after setting null_value to true and there by failing the assert.
    
    Item_func_bit_neg::int_op()
    null_value is not set because an integer overflow error was raised.
    
    Item_sum_bit::eval_op()
    Error is raised when an invalid json object is detected. But ::eval_op()
    is not checking for errors.
    
    Item_func_maketime::get_time()
    Error is raised while evaluating the arguments. But null_value is not set
    to true as its argument's "null_value" is not set to true. One of the argument
    in the failing case is actually an Item_func_equal which considers NULL to be
    a valid value. However in this case, null_value is set to TRUE because of an
    error.
    
    Solution:
    As of now, we do not have clearly defined interfaces to return errors. So,
    for now we change the assert to also check if error has been set.

commit 0d3d5bea83684c1de23d613ecf25331953dc2813
Author: Magnus Blåudd <magnus.blaudd@oracle.com>
Date:   Fri Oct 13 11:07:11 2017 +0200

    Bug#26990244 REMOVE WERROR WARNINGS FROM NDBCLUSTER [noclose]
    
      - change the rules to downgrade werror warnings on a more
        finegrained per directory level
      - this will make it possible to compile the ndbcluster code without
        suppressing as many compiler warnings

commit fe55460a52a362f3d41c4cda69aa9d8a91542c4b
Author: Satya Bodapati <satya.bodapati@oracle.com>
Date:   Fri Oct 20 06:05:29 2017 +0200

    Bug#26995534 - REMOVE WORKAROUNDS AFTER BUG#26539665 IS FIXED
    
    Now that schema SDI are not serialized, remove the workarounds
    that existed to handle concurrent insert of same schema in a
    general tablespace.

commit b0d4c8b20ae03af03248caa3bc1796bd711e9bb4
Author: Pedro Figueiredo <pedro.figueiredo@oracle.com>
Date:   Thu Oct 19 17:19:57 2017 +0100

    Bug#26370868: POSSIBLE UNINTENDED MACRO USAGE IN "BINLOG.CC" LINE 6618
    
    Description
    -----------
    Potential issue in file "mysql/mysql-server/sql/binlog.cc" function
    MYSQL_BIN_LOG::new_file_impl.
    
            my_printf_error(ER_ERROR_ON_WRITE, ER(ER_CANT_OPEN_FILE),
                            MYF(ME_FATALERROR), name,
                            errno, my_strerror(errbuf, sizeof(errbuf), errno));
            goto end;
    
    Analysis
    --------
    Should have ER(ER_ERROR_ON_WRITE) instead of ER(ER_CANT_OPEN_FILE).
    
    Fix
    ---
    - Replace "ER_CANT_OPEN_FILE" macro with "ER_ERROR_ON_WRITE"
    - Replace correspondant error message in rpl_binlog_errors.result
    - Replace correspondant error message in rpl_gtid_mode.result

commit 8db914be1a9bf8691c75e042e8da47b8adc0aba6
Merge: d5a5b89 a08eb8d
Author: Horst Hunger <horst.hunger@oracle.com>
Date:   Thu Oct 19 16:39:44 2017 +0200

    Merge branch 'mysql-5.7' into mysql-8.0

commit a08eb8d270508f983a283a7621b036427783ff9c
Author: Horst Hunger <horst.hunger@oracle.com>
Date:   Thu Oct 19 16:31:55 2017 +0200

    Bug #26996342: Disabled keyring tests completely under hudson as regularly failing.

commit d5a5b8998fe23bfe34d8db4ca62fd8d044acfcf3
Author: Dyre Tjeldvoll <Dyre.Tjeldvoll@oracle.com>
Date:   Thu Oct 19 15:33:56 2017 +0200

    Bug#26539665: Post-push fix. Add MY_ATTRIBUTE((unused)
    
    (cherry picked from commit 13d31b78662b7ba5723ca42d62b1f439f2be53ef)

commit f33fc7bcc2f34f426716009ead92945fe7cbfccf
Author: Dyre Tjeldvoll <Dyre.Tjeldvoll@oracle.com>
Date:   Wed Oct 18 15:03:47 2017 +0200

    BUG#26539665: ASSERT FAILURE: !SDI_INSERT_FAILED || TRX_IS_INTERRUPTED(TRX)
    
    Problem: The above problem was found to be caused by parallel inserts
    of the schema SDI into the SDI B-tree when creating tables in the same
    schema in parallel.
    
    Solution: Don't create and store schema SDIs. The schema SDI only
    contains the default character set for new tables in the schema. This
    is information is not essential and not needed for import. Not storing
    the SDIs avoid the contention which causes the original problem.
    
    This patch covers the server changes.
    
    (cherry picked from commit b878c40a28fbb03761c35ba4364acf453e9e0535)

commit 053107fa440b37b7f4784256578d8c61d8dfbc6a
Author: Dag Wanvik <dag.wanvik@oracle.com>
Date:   Thu Oct 19 13:42:51 2017 +0200

    Bug#26995758 TEST INSTABILITY IN WINDOW_FUNCTIONS.TEST
    
    Added extra ORDER BY expression to get stable results.
    
    Change-Id: I8e901b8b42f9d194457e98ce0ec7724873c9476e

commit 102ed64e91ff80940c55be5e3e85bb075703053d
Author: Joao Gramacho <joao.gramacho@oracle.com>
Date:   Thu Oct 19 12:02:55 2017 +0100

    Bug#26993433 TRANSACTION_LENGTH IS USING ONLY 8 BYTES FOR TRANSACTION
                 SIZES ABOVE 16777216
    
    Problem and analysis
    --------------------
    
    GTID_LOG_EVENT transaction_length field is based on a packed integer
    representation, using from 1 to 9 bytes depending on the value to be
    represented.
    
    For transactions with 16777216 bytes or more, the field should use 9
    bytes, but it is using 8 instead.
    
    Fix
    ---
    
    Use 9 bytes for representing the transaction_length of transactions with
    16777216 bytes or more.

commit 70a66045b14648d14710376ad7c3f57af862a255
Author: Dmitry Shulga <dmitry.shulga@oracle.com>
Date:   Thu Oct 19 16:24:02 2017 +0700

    Follow-up patch for the bug#25185947 -- ISSUES WITH RENAMING ROOT USER
    
    The following tests were fixed: firewall.firewall-gen-log-off, firewall.firewall-priv,
    firewall.firewall, funcs_1.is_columns_ci, funcs_1.is_key_column_usage_ci,
    funcs_1.is_schemata_ci, funcs_1.is_statistics_ci, funcs_1.is_table_constraints_ci,
    funcs_1.is_tables_ci, funcs_1.is_views_ci

commit eb116dc7afb7a904a1b398a9549beb8e1cbc7009
Author: Havard Dybvik <havard.dybvik@oracle.com>
Date:   Thu Oct 19 10:39:55 2017 +0200

    Bug#26975864: ASSERTION FAILED: DEC <= 6, MY_DATETIME_TO_STR, LEAST, GREATEST, ETC
    
    Post-push fix 2. Changes to sql/item.cc in first post-push fix should not
    have been commited.

commit a4c0010f26f00cd43866fd09f367776727c3cc58
Merge: a51f6b7 e3fa814
Author: Anibal Pinto <anibal.pinto@oracle.com>
Date:   Thu Oct 19 10:10:13 2017 +0200

    Merge branch 'mysql-5.7' into mysql-8.0

commit e3fa8141ef52977e6f3a44b6ff3df4c0b2f1bff0
Author: Anibal Pinto <anibal.pinto@oracle.com>
Date:   Thu Oct 19 09:58:45 2017 +0200

    BUG#26821852: GR TEST FAILURES ON PB2 5.7
    
    Tests gr_server_uuid_matches_group_name_bootstrap and
    gr_server_uuid_matches_group_name_non_bootstrap were executing a assert_grep on
    error log and the error wasn't yet happened.
    
    Put assert_grep on log before cleanup, that guarantee that the error was
    executed.
    
    Test gr_start_replication_auto_with_ssl_recovery had some operations with auto
    increment not necessary for execution of the test that can trigger some errors
    on slower platforms. Code remove from test.

commit a51f6b736fe2a67b915d3649b04eb07076c4485e
Author: Dyre Tjeldvoll <Dyre.Tjeldvoll@oracle.com>
Date:   Wed Oct 18 17:06:03 2017 +0200

    Bug#24510948: Post-push fix.
    
    Original patch changed main.schema because some parallel operations
    now block on schema MDL, rather than table MDL. This because the
    schema MDL taken when a table is loaded into the TDC was made
    transactional.
    
    However, when running with --ps-protocol this schema MDL is held only
    during prepare, as transactional MDLs are released when rolling back
    to savepoint at the end of prepare. During execute the table is still
    in the TDC, so no MDL is taken on schema, and the old behavor of
    blocking on table MDL is observed.
    
    Introduce a variable for the wait condition and set it according to the
    --ps-protocol value.
    
    (cherry picked from commit 2c07bd377e2c29b5c07e222ce611d7fcf272fe74)

commit 0b4455b2e8ad68aefe743a65e3f60eba1dd7ec23
Author: Pavan Naik <pavan.naik@oracle.com>
Date:   Thu Oct 19 10:53:24 2017 +0530

    BUG#26630826: MTR: REPLACE_RESULT IS NOT ABLE TO REPLACE LONG STRINGS
                  IN PATH NAME
    
    Description:
    ------------
    The mysqltest command 'exec' executes the shell command using popen
    function which returns the pointer to a file containing the output of
    the command. Then 512 bytes per chunk is read from that file, and the
    pattern(s) mentioned in the previous replace_result command is
    searched. However, this might fail if the pattern gets truncated when
    a chunk of 512 bytes is read.
    
    Fix:
    ----
    Instead of reading 512 bytes per chunk, read the entire line from the
    file and use it to match the patterns.
    
    Change-Id: Ia13d599a6bcaeeb09541092113aa35ad42ab7fa8

commit 0da29659615dfbbd0a63d7218a40d7c9800d6406
Merge: 893ddfa 3ee5bfd
Author: Sreeharsha Ramanavarapu <sreeharsha.ramanavarapu@oracle.com>
Date:   Thu Oct 19 10:24:28 2017 +0530

    Merge branch 'mysql-5.7' into mysql-8.0

commit 3ee5bfd2ca47e2d7223c30899bd7e7177cde8cbe
Merge: edf85f6 a90693e
Author: Sreeharsha Ramanavarapu <sreeharsha.ramanavarapu@oracle.com>
Date:   Thu Oct 19 10:23:04 2017 +0530

    Merge branch 'mysql-5.6' into mysql-5.7

commit a90693ecad98288df4d25934b495b02c72553c36
Merge: 32c80a2 996aa61
Author: Sreeharsha Ramanavarapu <sreeharsha.ramanavarapu@oracle.com>
Date:   Thu Oct 19 10:21:07 2017 +0530

    Merge branch 'mysql-5.5' into mysql-5.6

commit 996aa611134b975ff62182e65d1cb04d9e8c0427
Author: Sreeharsha Ramanavarapu <sreeharsha.ramanavarapu@oracle.com>
Date:   Thu Oct 19 10:19:36 2017 +0530

    Bug #26867652: INCORRECT BEHAVIOR WITH PREPARE STATEMENT
                   AND PARAM IN ORDER BY
    
    Issue:
    ------
    This issue can occur when the ORDER BY list refers to a
    column that contains a parameter in the select list.
    
    Solution:
    ---------
    In JOIN::update_depend_map and get_sort_by_table, the
    ORDER BY list's used_tables isn't checked for parameters.
    This can result in incorrect behavior.
    
    This is a partial backport of Roy's
    "Bug#25466100: Refactor const_item processing"

commit 16ea03e9c56cef8899063189c321f14cf4a32bf1
Merge: f6f1ec8 a917d6a
Author: Piotr Obrzut <piotr.obrzut@oracle.com>
Date:   Wed Oct 18 23:18:27 2017 +0200

    Upmerge of the 7.2.31 build

commit a917d6a7a57e3a081d2cb77d911abda9f7960906
Merge: 307dd58 4069fde
Author: Piotr Obrzut <piotr.obrzut@oracle.com>
Date:   Wed Oct 18 23:09:58 2017 +0200

    Upmerge of the 7.2.31 build

commit 4069fdef23692c8a6f7b0ea2a20a398cd2506988
Merge: 4f9ef61 163aa70
Author: Piotr Obrzut <piotr.obrzut@oracle.com>
Date:   Wed Oct 18 23:06:14 2017 +0200

    Upmerge of the 7.2.31 build

commit 163aa703795a8d3bbd0b5ebe6fc81b5e17b54677
Merge: eb6d29f 8702af5
Author: Piotr Obrzut <piotr.obrzut@oracle.com>
Date:   Wed Oct 18 22:57:29 2017 +0200

    Upmerge of the 7.2.31 build

commit 8702af528e40c373a334f34589e766b345112fba
Merge: 2ccf20b 20b0c1c
Author: Piotr Obrzut <piotr.obrzut@oracle.com>
Date:   Wed Oct 18 22:56:04 2017 +0200

    Upmerge of the 7.2.31 build

commit 20b0c1cfdc7a46274fe649c7d154873e82494819
Merge: 221ee6b f228edb
Author: Piotr Obrzut <piotr.obrzut@oracle.com>
Date:   Wed Oct 18 22:46:01 2017 +0200

    Merge from mysql-cluster-7.2.31-release

commit f6f1ec8cd8cbf32972bd229e51b7064feca70db3
Merge: 3379941 307dd58
Author: Prashant Tekriwal <prashant.tekriwal@oracle.com>
Date:   Wed Oct 18 19:44:02 2017 +0200

    Upmerge of the 7.3.19 build

commit 307dd589c2ca845b88a2aa3c8c601e8b48455f67
Merge: d7710a4 4f9ef61
Author: Prashant Tekriwal <prashant.tekriwal@oracle.com>
Date:   Wed Oct 18 19:05:37 2017 +0200

    Upmerge of the 7.3.19 build

commit 4f9ef615d37619e27ac204be0c6133f9e6179226
Merge: 880b63a eb6d29f
Author: Prashant Tekriwal <prashant.tekriwal@oracle.com>
Date:   Wed Oct 18 18:43:46 2017 +0200

    Upmerge of the 7.3.19 build

commit eb6d29f4c38bac69d81f01c2c032fb13dd5edbe7
Merge: 78a3051 2ccf20b
Author: Prashant Tekriwal <prashant.tekriwal@oracle.com>
Date:   Wed Oct 18 18:40:56 2017 +0200

    Upmerge of the 7.3.19 build

commit 2ccf20bf0c66730cb53e04292e8e2a88f4321029
Merge: dd7b2de bd5c998
Author: Prashant Tekriwal <prashant.tekriwal@oracle.com>
Date:   Wed Oct 18 18:34:16 2017 +0200

    Merge from mysql-cluster-7.3.19-release

commit 337994151e6553ba59809fdc5d2f78dbeaa8e826
Author: Magnus Blåudd <magnus.blaudd@oracle.com>
Date:   Wed Oct 18 18:31:08 2017 +0200

    WL#8500 Adapt MySQL CLuster to 8.0
    
     - silence compiler warnings in ndb_engine.c shich occurs when
       using the engine_info struct to declare its capabilities. The struct
       is using an array of size 1 but the memory for trhe struct is
       dynamically allocated to have enough room for a few more slots
       in the array. This trick isn't known by the compiler.
    
      storage/ndb/memcache/src/ndb_engine.c: In function 'create_instance':
    ../../../../mysql-cluster-com-8.0.1/storage/ndb/memcache/src/
    ndb_engine.c:148:30: warning: array subscript is above array bounds [-
    Warray-bounds]
    ndb_eng->info.info.features[1].feature =
    ENGINE_FEATURE_PERSISTENT_STORAGE;
     ...

commit 2333b08b3c2d61e1ec712c2dfbc893259cc1f569
Author: Magnus Blåudd <magnus.blaudd@oracle.com>
Date:   Wed Oct 18 18:24:00 2017 +0200

    WL#8069
    
     - follow up fix to silence warnings about unused variables in
       release compile.
    
      storage/ndb/src/kernel/blocks/dbtup/DbtupDiskAlloc.cpp:1144:12:
    warning: unused variable 'free' [-Wunused-variable]
    Uint32 free = pagePtr.p->free_space - pagePtr.p->uncommitted_used_space;
    ^~~~
     ...

commit d5d26e22ff006522c7abb156419251690b42d87f
Author: Magnus Blåudd <magnus.blaudd@oracle.com>
Date:   Wed Oct 18 16:16:54 2017 +0200

    WL#8500 Adapt MySQL CLuster to 8.0
    
     - remove unused functionality for showing MySQL Server patches
       which was added as part of WL#8726

commit 893ddfaa49bb9130669a04dc5474d3fe40539e39
Author: Havard Dybvik <havard.dybvik@oracle.com>
Date:   Wed Oct 18 09:54:27 2017 +0200

    Bug#26975864: ASSERTION FAILED: DEC <= 6, MY_DATETIME_TO_STR, LEAST, GREATEST, ETC
    
    Post-push fix for tests failing on Windows and with PS protocol.

commit 8023c9f047c6b3ebecc3630787fb510dc7550391
Merge: 0fd5648 d7710a4
Author: Lars Tangvald <lars.tangvald@oracle.com>
Date:   Wed Oct 18 13:15:13 2017 +0200

    Null merge of the 7.5.8 build

commit d7710a4d49e462c6e6208aae16e5f7fe65548ec1
Merge: 90384bb 880b63a
Author: Lars Tangvald <lars.tangvald@oracle.com>
Date:   Wed Oct 18 13:11:58 2017 +0200

    Upmerge of the 7.5.8 build

commit 880b63a025383ba80170c4ebc186516cecd16432
Merge: 40b3db6 8213109
Author: Lars Tangvald <lars.tangvald@oracle.com>
Date:   Wed Oct 18 13:10:19 2017 +0200

    Merge from mysql-cluster-7.5.8-release

commit 86883e074a7a1159a873e0da95f9ad2a15ad8632
Author: Norvald H. Ryeng <norvald.ryeng@oracle.com>
Date:   Wed Oct 18 12:35:53 2017 +0200

    Bug #26412713 ASSERTION `THD->IS_ERROR()' FAILED IN SQL/SQL_INSERT.CC
    
    Problem: An INSERT IGNORE statement trying to set a GEOMETRY NOT NULL
    column to NULL would fail an assertion in debug mode.
    
    INSERT IGNORE ignores a number of errors, instead converting the errors
    to warnings, similar to non-strict mode. However, setting a non-nullable
    GEOMETRY (or subtype) column to NULL is not allowed in non-strict mode
    either, since there is no valid value to convert the NULL to. Still, the
    error handler for INSERT IGNORE didn't flag an error, leading to
    assertions testing thd->is_error() failing.
    
    Fix: Create a new error code that is not ignored by the INSERT IGNORE
    error handler.
    
    Also raise errors in a few other cases where illegal NULL values where
    silently converted to empty strings (and therefore invalid geometry
    values).
    
    Change-Id: I01593bf5a45355d7408129980db397877186ee02

commit 5377a4e431a3137eb8bd7926860767c5bb6488dc
Author: Dmitry Shulga <dmitry.shulga@oracle.com>
Date:   Wed Oct 18 15:18:45 2017 +0700

    Bug #25185947 -- ISSUES WITH RENAMING ROOT USER
    
    When a user root@localhost is renamed to any other name an attempt
    to run the statement SHOW DATABASE results in error:
    ERROR 1449 (HY000): The user specified as a definer ('root'@'localhost') does
    not exist
    
    The reason for the bug is that as of version 8.0 handling of SHOW DATABASE
    goes to INFORMATION_SCHEMA.SCHEMATA view, that is the real view.
    
    The view INFORMATION_SCHEMA.SCHEMATA is defined as SUID view with root@localhost as definer.
    Therefore, every time a view is accessed and the view is not already in the cache an
    attempt to compile the view is made. Since the view has an invalid definer (the definer
    user was renamed) opening the view fails.
    
    In order to fix the error a new system user 'mysql.infoschema'@localhost is introduced.
    This user specified as definer for every view in information_schema. The user
    'mysql.infoschema'@localhost is locked and have only grant to select from tables/views
    in information_schema. His sole role is just to be owner of views in information_schema.
    Note that we can't use name longer than 16 characters for this user since it will complicate
    privilege tables upgrade from 5.7 versions.
    
    The side effect of introducing a new user who is owner of system view in information_schema
    is that direct upgrade of privilege tables from 5.1 to 8.0 is no more possible.
    
    The approach this patch takes is a mid-term workaround, long-term solution should involve
    tracking view dependencies on users and prohibiting user renames if there are views
    dependent on them (or updating view definitions accordingly, see also WL6359
    'Implement dependency tracking for SQL objects').

commit 0fd564830e7fdfaca0601cb8dd00e95ceb353f39
Author: Magnus Blåudd <magnus.blaudd@oracle.com>
Date:   Mon Oct 16 09:55:28 2017 +0200

    WL#8537 Change ndbcluster to use RUN_HOOK
    
     - implement support for waiting on state "server started" in
       Ndb_component. Rewrite ndb_index_stat_thread and ndb_binlog_thread
       to use the new functionality of Ndb_component. Make the new
       server started hooks notifiy the two components that server
       has been started.
     - this removes ndbcluster's usage of LOCK_server_started,
       COND_server_started and mysqld_server_started

commit 4f5632734799ee0f0a00f5abc0baf2a3017fc330
Author: Magnus Blåudd <magnus.blaudd@oracle.com>
Date:   Tue Oct 10 09:35:07 2017 +0200

    WL#8537 Change ndbcluster to use RUN_HOOK
    
     - implement hooks monitoring server and replication thread state.
       Install hooks for waiting for "ndb setup"  just before the server
       allows incoming connections and also in the start of replication
       applier thread
     - remove legacy ndb_wait_setup callback functionality from the server
     - fix suppression in ndb_rpl_slave_config which no longer suppress
       the expected error message

commit b0852f0e449b7133ca555293ac253bfc3b5ead1c
Author: Magnus Blåudd <magnus.blaudd@oracle.com>
Date:   Mon Oct 9 13:05:38 2017 +0200

    WL#9185 MySQL Cluster support for new DD
    
     - fixup canonical include paths

commit 4dd6077450a6c2cf8a994b12dc014bec71f77800
Author: Magnus Blåudd <magnus.blaudd@oracle.com>
Date:   Mon Oct 9 12:04:39 2017 +0200

    WL#9185 MySQL Cluster support for new DD
    
     - add include paths for classes being used.
     - in general the ha_ndbcluster_binlog code should not use
       dd functions directly, the function "open shadow table" function
       need to be moved

commit f5686da8f87cccb58cf66e9cf5337b83110db7a1
Author: Havard Dybvik <havard.dybvik@oracle.com>
Date:   Tue Oct 17 09:57:21 2017 +0200

    Bug#26975864: ASSERTION FAILED: DEC <= 6, MY_DATETIME_TO_STR, LEAST, GREATEST, ETC
    
    If one of the temporal arguments to LEAST/GREATEST was of type DATETIME,
    but the aggregated data type was something else than VARCHAR or a
    temporal type, the LEAST/GREATEST item would not have a temporal data
    type while its temporal properties were being set. The temporal
    properties for the LEAST/GREATEST item, including its fractional
    precision, would therefore not be calculated correctly, causing an
    assertion to fail later in the execution.
    
    As a fix, the data type of LEAST/GREATEST is now temporarily set to a
    temporal type if one or more, but not all, of its arguments are of temporal type
    regardless of the aggregated data type.

commit 1f03d87c8df3691cb1fe5d893904c9a1da1fb0a6
Author: Marc Alff <marc.alff@oracle.com>
Date:   Tue Oct 17 10:44:17 2017 +0200

    Bug#26029765 SHOW PLUGIN COMMAND SHOULD TAKE CARE OF PLUGINS IN
    PLUGIN_IS_DYING STATE AS WELL
    
    Before this fix, concurrent execution of:
    - SHOW PLUGIN
    - UNINSTALL PLUGIN
    could cause an assertion failure in DEBUG builds.
    
    The root cause is as follows:
    - During UNINSTALL PLUGIN,
      the plugin is placed in a temporary PLUGIN_IS_DYING state.
    - SHOW PLUGIN does not have code to print this state,
      resulting in an assert.
    
    The fix is to fix the missing case in show_plugins(),
    to print the PLUGIN_IS_DYING state as "DELETING".

commit 809ed4073ea7c41cbcf7e21c3c222fdbabcd2b59
Merge: a14d70c edf85f6
Author: Anibal Pinto <anibal.pinto@oracle.com>
Date:   Tue Oct 17 15:50:16 2017 +0200

    Merge branch 'mysql-5.7' into mysql-8.0

commit edf85f627297c235d1c39f3ec0c799a14187207a
Author: Anibal Pinto <anibal.pinto@oracle.com>
Date:   Tue Oct 17 15:10:58 2017 +0200

    BUG#26787288: CHECK_WARNINGS FOR GROUP_REPLICATION.GR_RELAY_LOG_NAME_CHANGE TIMES OUT ON PB2
    
    The test produces a failure when server is starting and the following steps put
    it on restart. This situation caused a possibility of group replication execute
    an query on the server but don't have any response due server is stopping.
    
    The group replication service sql command wasn't retrieving an error when this
    failure happened that caused the server to crash on the end of the test.
    
    We modified the function to return failure when this occurred.
    
    When accessing to SQL result we confirm that it has values.

commit a14d70c67933f679f73b11b1f0226e62073731d3
Merge: fb289e4 9fff258
Author: Nuno Carvalho <nuno.carvalho@oracle.com>
Date:   Tue Oct 17 15:14:38 2017 +0200

    Merge branch 'mysql-5.7' into mysql-8.0

commit 9fff258e28ea059178e5aacc04bb9ca2968c8dc5
Author: Nuno Carvalho <nuno.carvalho@oracle.com>
Date:   Tue Oct 17 12:58:08 2017 +0200

    BUG#26770576: ALL MEMBERS ARE EXITED FROM GR WHEN 1/3 NODE TRIED TO REJOIN AFTER SHUTDOWN
    
    Problem: All members in group goes in ERROR STATE when new member joins and
    certification database is big
    
    Scenario (slow machine with heavy load):
    1. Start 3 server (MEMBER_1, MEMBER_2, MEMBER_3)
    2. Wait for all members to be ONLINE
    3. Start heavy load on MEMBER_1 (wait for 5 to 10 minutes) (MEMBER_2 and MEMBER_3 receives data slowly.)
    4. STOP, START MEMBER_3
    5. MEMBER_1 and MEMBER_2 goes offline
    
    Description: When new member joins server, certification database can be big.
    Certification database is transferred with View_change.
    If packet size(View_change) is greater then 4MB, GR stops and goes in error state.
    
    Resolution:
    Applier thread will be initialized with slave_max_allowed_packet, which default
    size is 1GB.

commit fb289e4eb82c03155a0a1da5dd7daf46f67a16f7
Author: Pavan Naik <pavan.naik@oracle.com>
Date:   Wed Sep 27 09:59:48 2017 +0530

    BUG#26629683: MTR: ENHANCEMENT TO RUN NON PARALLEL TESTS
    
    Description:
    ------------
    Recently, WL#2955 introduced a new test suite 'rpl_many_mysqlds' which
    contains tests that should not be parallelized by MTR because they
    require many mysqlds. Due to this, a lot of new MTR runs are added in
    collection files to run these tests with parallel value 1.
    
    Fix:
    ----
    - Enhance MTR to filter out the tests sourcing 'not_parallel.inc'
      file. Tests sourcing not_parallel.inc are marked as 'non-parallel'
      tests. These tests are run at the end with parallel value of 1
      overriding the '--parallel' option value.
    
      Note: Running non-parallel tests also needs 'non-parallel-test'
            option to be enabled.
    
    - Move all the tests under rpl_many_mysqlds suite to rpl suite and
      modify all the tests to be a big-test.
    
    - Remove the MTR command lines added for rpl_many_mysqlds from
      collection files.
    
    - Modified default.daily, default.release.in, default.weekly and
      default.weekly-valgrind collection files to run 'non-parallel'
      tests.
    
    Change-Id: I4e664cb74b801c2989b8add53d4fb792b9beded2

commit c8d9a1e08c7afc5a0cfa9c4f1fbdd73db935dd0b
Merge: c7fc626 90384bb
Author: Ole John Aske <ole.john.aske@oracle.com>
Date:   Tue Oct 17 09:10:01 2017 +0200

    Merge branch 'mysql-5.7-cluster-7.6' into mysql-8.0-cluster-8.0

commit 90384bb8ab00ab17187e3216b2af6a2daddc14ed
Merge: 2d38da0 40b3db6
Author: Ole John Aske <ole.john.aske@oracle.com>
Date:   Tue Oct 17 09:09:15 2017 +0200

    Merge branch 'mysql-5.7-cluster-7.5' into mysql-5.7-cluster-7.6

commit 40b3db62c39439f2a05f1d88460d496fc3cb5833
Merge: ce02597 78a3051
Author: Ole John Aske <ole.john.aske@oracle.com>
Date:   Tue Oct 17 09:08:08 2017 +0200

    Merge branch 'mysql-5.6-cluster-7.4' into mysql-5.7-cluster-7.5

commit 78a30516c8a52b7eb7eaaa7246b8e9b75f6a6c09
Author: Ole John Aske <ole.john.aske@oracle.com>
Date:   Tue Oct 17 08:55:31 2017 +0200

    bug#26919289 follow up, use lower case in table names in MTR testcase

commit d494db2688b5623623c5c528812b5b4e1d320cec
Author: Havard Dybvik <havard.dybvik@oracle.com>
Date:   Mon Oct 16 09:31:05 2017 +0200

    Bug#26960106: VARCHAR SET AS AGGREGATED DATA TYPE FOR STRING RESULT FIELDS WITH LONG VALUES
    
    After the fix for bug#25123839, the aggregated data type was set to
    VARCHAR whenever the result type was STRING_RESULT and the field length
    was larger than 255 characters (maximum length for CHAR). This caused
    problems for data types whose result type was STRING_RESULT, but
    supported field values longer than 255 characters (e.g. JSON).
    
    As a fix, explicitly set data type to VARCHAR if an aggregated field has
    data type CHAR or BINARY (both internally represented as
    MYSQL_TYPE_STRING) but its length exceeds the maximum length for
    fixed-sized string fields, thus excluding variable-sized string types from
    this adjustment.

commit 23563b8155dc61e84c6d7df95bf7c0854b1f8764
Author: Parveez Baig <parveez.baig@oracle.com>
Date:   Tue Oct 17 12:12:27 2017 +0530

    Bug#26787126 : RPL_ROW_JSONDIFF_STRESS FAILS SPORADICALLY: DIFF MISMATCH
    
     Sporadically rpl_reset.inc in the test was not resetting
    replication correctly as a result the next update after the
    reset was not received by the slave. Hence rpl_diff.inc after
    the update was failing as master and slave had different data.
    Also due to the same reason in Bug26718101 create table was
    failing whenever rpl_diff.inc was passed (even after improper
    rpl reset) as slave was not recieving the drop table transaction
    after reset.
    
    Fix: Removed rpl_reset.inc and added commands to reset replication
         in the test itself.

commit 74d1fdc357d891c4d44c42657750ec04941af0c5
Author: Thayumanavar S <thayumanavar.x.sachithanantha@oracle.com>
Date:   Tue Oct 17 06:58:22 2017 +0200

    BUG#26725206 - EVENTS, CRASH RECVER FAILS WITH CAN'T INIT TC
                   LOG, EVENTS
    
    Events that get dropped as part of ON COMPLETION NOT PRESERVE are
    binlogged with a  XID of zero. Events that are dropped as part of
    the event scheduler invocation doesn't have query_id value set.
    XID generation depends on THD::query_id and hence this results in
    xid value of zero.
    
    The fix is to set the THD::query_id for the DROP EVENT sql constructed
    by Event Scheduler..

commit af9fb22e49a00be42b9ceae4a7ae6be4c35e1c16
Author: Rahul Sisondia <rahul.sisondia@oracle.com>
Date:   Tue Oct 17 10:00:49 2017 +0530

    Bug#26524707 SEGMENTATION FAULT ON KEYRING_OKV INITIALIZATION
    
    Missed to mask the temporary directory path due to typo in the name.
    Replaced the $MYSQL_TEST_DIR to $MYSQL_TEMP_DIR in the test file and updated
    the result file

commit c7fc626850cff88f189a3abe11c5ccf77e36bad5
Author: Magnus Blåudd <magnus.blaudd@oracle.com>
Date:   Mon Oct 16 19:59:49 2017 +0200

    WL#8500 Adapt MySQL Cluster to 8.0
    
     - fix spelling error in ndb_error_reporter INSTALL command

commit 8bcc088e05b8d03025d45d5bc170a46729a5c3a0
Merge: 59153e8 5c6bf1d
Author: Gipson Pulla <gipson.pulla@oracle.com>
Date:   Mon Oct 16 19:42:36 2017 +0200

    Upmerge of the 5.6.38 build

commit 5c6bf1d418fad44c7ce0e9d628d403619722197d
Merge: 2074b47 32c80a2
Author: Gipson Pulla <gipson.pulla@oracle.com>
Date:   Mon Oct 16 19:42:02 2017 +0200

    Upmerge of the 5.6.38 build

commit 32c80a2bac800f5c5401cc56ab88e43f3313eb62
Merge: e2f92d9 7335776
Author: Gipson Pulla <gipson.pulla@oracle.com>
Date:   Mon Oct 16 19:39:48 2017 +0200

    Merge branch 'mysql-5.6.38-release' into mysql-5.6

commit 59153e83301ae89772f764ce48713cd185a07e2b
Author: Dag Wanvik <dag.wanvik@oracle.com>
Date:   Mon Oct 16 11:15:53 2017 +0200

    Bug#26389508 INT JOIN_READ_KEY(QEP_TAB*): ASSERTION `!TABLE->HAS_NULL_ROW()' FAILED
    
    Analysis:
    
    When a window with buffering follows a equijoin on a unique index
    (JT_EQ_REF) , we can get into trouble because windowing modifies the
    input record, presuming that once the windowing has been handed the
    record, next time control passes back to the join code a (new) record
    will be read to the input record.
    
    However, this does not hold with JT_EQ_REF, cf. the caching done in
    join_read_key:
    
    From its Doxygen:
    
      "Since the eq_ref access method will always return the same row, it
       is not necessary to read the row more than once, regardless of how
       many times it is needed in execution.  This cache element is used
       when a row is needed after it has been read once, unless a key
       conversion error has occurred, or the cache has been disabled."
    
    Fix:
    
    We solve this problem by reinstating the input record before handing
    control back from end_write_wf. We optimize: only do this if the
    window in question follows after such a JOIN, i.e. window #1, and it
    has actually clobbered the input record. This can only happen if
    the last qep_tab has type JT_EQ_REF.
    
    Another, perhaps better approach, is to refactor to never touch the
    input record but keep the copying between the out record and the frame
    table record instead. Left for future refactoring.
    
    Added some missing Window method "const"s, and folded a couple of
    one-liners into window.h (from .cc).
    
    Repro added.
    
    Change-Id: I33bc43cd99ff79303b17d181abc3805ce226fb85

commit 64eb20ac7076b10301c42f8a05afa12b993e53b5
Merge: dfbe036 2074b47
Author: Sergey Glukhov <sergey.glukhov@oracle.com>
Date:   Mon Oct 16 19:38:43 2017 +0300

    Merge branch 'mysql-5.7' into mysql-8.0

commit dfbe036a4f62e097d2908552e5d04325bcb94696
Author: Rahul Sisondia <rahul.sisondia@oracle.com>
Date:   Mon Oct 16 21:20:47 2017 +0530

    Bug#26524707 SEGMENTATION FAULT ON KEYRING_OKV INITIALIZATION
    
    Description
    ---------------
    If invalid OKV server is specified then OKV keyring initialization fails but instead of reporting error it crashes.
    err stack structure is correctly initialized but the problem is that there is variable name conflict.
    There already exists a macro with the same name in the errno.h. As a result compiler could is substituting
    the macro instead of actual variable at the time of assigning to err_stack.
    
    Fix:
    ------
    Changed the variable name from 'errno' to 'err_no' under macro  MYSQL_VANILLA_OKV
    
    MTR tests :
    ---------------
    Added an invalid okv_enrollment dir in the std_data.
    Added a scenario in the existing test file to connect to the invalid OKV server.
    We copy the ookv_enrollment dir to the temp dir and update the server address to an invalid value.
    
    ==============================================================================
    
    TEST                                      RESULT   TIME (ms) or COMMENT
    --------------------------------------------------------------------------
    
    worker[1] Using MTR_BUILD_THREAD 300, with reserved ports 13000..13009
    keyring_okv.keyring_okv_conf_dir_qa      [ pass ]  77925
    --------------------------------------------------------------------------
    The servers were restarted 0 times
    Spent 77.925 of 137 seconds executing testcases
    
    Completed: All 1 tests were successful.

commit 2074b47cd3200875bf637a650b951fb15b0dc05b
Merge: ff81eb4 e2f92d9
Author: Sergey Glukhov <sergey.glukhov@oracle.com>
Date:   Mon Oct 16 18:48:19 2017 +0300

    Merge branch 'mysql-5.6' into mysql-5.7

commit db1c7cbd9fc85aa8e885a61779fb6fd05aaf1b39
Author: Magnus Blåudd <magnus.blaudd@oracle.com>
Date:   Mon Oct 16 11:51:46 2017 +0200

    WL#8500 Adapt MySQL Cluster to 8.0
    
     - configure ndb_error_reporter in $bld_dir/runtime_output_directory/
     - don't look for ndb_error_reporter in storage/ndb/tools/ anymore

commit 9c1de2b34492432a75e392a90f9a537a225594db
Author: Magnus Blåudd <magnus.blaudd@oracle.com>
Date:   Mon Oct 16 11:11:37 2017 +0200

    WL#8500 Adapt MySQL Cluster to 8.0
    
     - add suppressions for the expected warning written to error log when
       data nodes are restarted
     - remove unnecessary drop commands, if those exists(which they never
       will) the test would fail.

commit e2f92d9c43fe1147b3dd99401a6e2b86a03e87a2
Author: Sergey Glukhov <sergey.glukhov@oracle.com>
Date:   Mon Oct 16 17:55:01 2017 +0300

    Bug#26877788 SELECT FROM INFORMATION_SCHEMA.FILES RETURNS NO RECORDS WHEN ORDER BY IS USED
    
    test case fix.

commit d28651837a8029befdf49dda87d182cae7717219
Author: Pavan Naik <pavan.naik@oracle.com>
Date:   Mon Oct 16 18:39:00 2017 +0530

    BUG#26966008: MTR: ENABLE CHECK-TESTCASES FOR TESTS SOURCING
                  'FORCE_RESTART_IF_SKIPPED.INC'
    
    Post push fix, fixed GR test failures which need --big-test
    option to run.
    
    Reviewed-by: Narendra Chauhan <narendra.chauhan@oracle.com>

commit ee9de6e1d9461adf5c76594e22066904e6d229b4
Merge: f7e8d28 ff81eb4
Author: Ajo Robert <ajo.robert@oracle.com>
Date:   Mon Oct 16 20:10:48 2017 +0530

    Merge branch 'mysql-5.7' into mysql-8.0

commit ff81eb474b4bcdec1384d6bb69c14b09e2d49d3c
Merge: 6e0d7a9 2a7dded
Author: Ajo Robert <ajo.robert@oracle.com>
Date:   Mon Oct 16 20:10:23 2017 +0530

    NULL Merge branch 'mysql-5.6' into mysql-5.7
    
    Change-Id: I022d8bd3738a640938fbaca968ea70e47d672d42

commit 2a7ddedb91bdc6b68093db2f07818130f6683714
Author: Ajo Robert <ajo.robert@oracle.com>
Date:   Mon Oct 16 20:08:13 2017 +0530

    Bug#25062396 - ASSERTION `CUR_SHAPE != GCALC_FUNCTION:: SHAPE_POINT' FAILED.
    
    Invalid input parameters could lead to wrong result buffer.
    Which can cause an assert due to traversing to uninitialized
    pointers and abrupt exit or cyclic processing of the result
    buffer.
    
    Fix included handling of below scenarios.
    1. Uninitialized structure elements.
    2. Handling of NULL pointers.
    3. Breakout from cyclic loops.
    4. Wrong result object (Point with more than one coordinates).
    
    Change-Id: I9badfa248889bc4e2f460b77d6a4be5dd72a962a

commit f7e8d289e58279e20c12c5010465d623d12648a6
Author: Norvald H. Ryeng <norvald.ryeng@oracle.com>
Date:   Mon Oct 16 14:31:20 2017 +0200

    Bug #26941370 ST_GEOMFROMGEOJSON ALLOWS OUT-OF-RANGE COORDINATES
    
    Problem: ST_GeomFromGeoJSON didn't check that geographic coordinates
    were within the valid range.
    
    Also, it was allowed to add a "crs" member to any level of the GeoJSON
    document, and the specified SRID would take effect for the whole
    document. The GeoJSON specification mandates that the "crs" member, if
    any, is put at the top leve of the document.
    
    Fix: Check that longitude and latitude coordinates are within the ranges
    (-180, 180] and [-90, 90], respectively (in degrees -- other limits for
    other units). Raise ER_LONGITUDE_OUT_OF_RANGE or
    ER_LATITUDE_OUT_OF_RANGE if coordinates are out of range.
    
    The exact limits may deviate slightly from the ideal because of floating
    point arithmetics.
    
    Fail with ER_INVALID_GEOJSON_CRS_NOT_TOP_LEVEL if a "crs" member that
    specifies a different SRID than the SRID of the top-level object is
    found at a lower level of the GeoJSON document.
    
    Change-Id: Ib5a55b781bf0fcd71dc06fe6dbef3a67778b30e8

commit 9be4cfa6b838f70fdc6680c2d7349e1296e3ca45
Merge: d577b1f 6e0d7a9
Author: Venkatesh Duggirala <venkatesh.duggirala@oracle.com>
Date:   Mon Oct 16 18:05:06 2017 +0530

    Merge branch 'mysql-5.7' into mysql-8.0

commit 6e0d7a9c96598fb86fd0566d081ed0c53ac22d21
Author: Venkatesh Duggirala <venkatesh.duggirala@oracle.com>
Date:   Mon Oct 16 18:04:45 2017 +0530

    Bug#26899370 BINLOG_MIXED_ROW_VERBOSE IS FAILING IN HUDSON RUNS
    
    Post push fix: Fixing pb2 failure
    
    1) Hardcoded master-bin.000001 in the test.
       In some pb2 runs, the default binlog name is binlog.000001.
       So test script is failing at remove_file. Changed now.
    
    2) remove_file should be done before 'RESET MASTER' not after
       RESET MASTER in order to do the real cleanup.
       Otherwise it will again create some mess at the end of the test script.

commit d577b1f1520454468299501715657059a6762956
Author: Satya Bodapati <satya.bodapati@oracle.com>
Date:   Thu Oct 12 18:19:05 2017 +0530

    Bug#26945437 - UPGRADE TO 8.0 HITS STACK OVERFLOW
    
    Problem:
    -------
    During upgrade process, InnoDB system table is moved to LRU list.
    When there are huge number of tables, InnoDB is evicting tables as part
    of table cache cleanup (done by master thread).
    
    Once a system table is evicted, it cannot be loaded and goes into
    recursive mode trying to load system table.
    
    Fix:
    1. Prevent eviction of InnoDB dictionary tables (SYS_*).
    2. Also fix log_corruption.test to use datadir of 5.7.9
       In the test, it is using older datadir and therefore workaround
       or suspsicious code that tolerates absence of SYS_VIRTUAL
    
    Reviewed-By: Jimmy Yang <jimmy.yang@oracle.com>
    RB: 17600

commit 1b85ded61ad9f3f5d88e7479090d1ae3e855b505
Merge: 01f4a38 014f4b8
Author: Arun Kuruvila <arun.kuruvila@oracle.com>
Date:   Mon Oct 16 17:08:55 2017 +0530

    Merge branch 'mysql-5.7' into mysql-8.0

commit 014f4b89637c735b71b1f1b7dae7185f61348d79
Author: Arun Kuruvila <arun.kuruvila@oracle.com>
Date:   Mon Oct 16 15:35:37 2017 +0530

    Bug#26152751: INNODB LEAKS MEMORY, PERFORMANCE_SCHEMA
                  FILE_INSTANCES #SQL-IB3129987-252773.IBD
    
    Description:- When a Innodb table is altered numerous times
    memory growth is observed for PFS file instances.
    
    Analysis:- The temporary IBD file instance created during
    ALTER table (using copy algorithm) is not deleted from PFS.
    For every ALTER TABLE operation, a residue IBD file instance
    is created which causes memory growth.
    This problem is not restricted to Innodb tables alone but
    also other SE which uses copy algorithm for ALTER TABLE
    operation. Following is the order of file creation during
    the ALTER operation which uses copy algorithm :-
    
    a) A temporary FRM file (example: temp1.frm) is created and
       the corresponding file instance entry is made.
    b) File t1.frm  is renamed to temp2.frm and the file
       instance entry in PFS is not updated.
    c) File temp1.frm is renamed to t1.frm and the file instance
       entry in PFS is not updated.
    d) File temp2.frm is deleted and the file instance entry is
       not updated since no corresponding entry is found in PFS.
    
    Similar sequence is observed for MYI/MYD/IBD/.. files. PFS
    file instances are not updated during the file rename
    operation which in turn triggers memory growth. A RENAME
    operation performed on a table will also trigger similar
    issue. Even after the rename, FRM/IBD/MYI/MYD... files
    instance names are not updated in the PFS.
    
    Fix:- A new performance schema API "rename_file_close_wait"
    is introduced to handle the rename of a file, which will
    take care of adjusting the hash by name. The new API does
    the following operations:
    - lf_hash_search to find the old instrumented file.
    - lf_hash_delete to remove the old name.
    - fix the file name in PSI_file.
    - lf_hash_insert to add the new name.

commit 2a15709987c7d05d2d9ea994927e2dbb1468cf0d
Merge: 50a1a0f 2d38da0
Author: Ole John Aske <ole.john.aske@oracle.com>
Date:   Mon Oct 16 13:30:34 2017 +0200

    Merge branch 'mysql-5.7-cluster-7.6' into mysql-8.0-cluster-8.0

commit 2d38da0579e74a1fb465b3bb1f1eb80af80b337c
Merge: 5833297 ce02597
Author: Ole John Aske <ole.john.aske@oracle.com>
Date:   Mon Oct 16 13:12:46 2017 +0200

    Merge branch 'mysql-5.7-cluster-7.5' into mysql-5.7-cluster-7.6

commit ce02597173c8368aed242cc4b6e594f5db8eca28
Merge: d5335d4 8157762
Author: Ole John Aske <ole.john.aske@oracle.com>
Date:   Mon Oct 16 12:51:28 2017 +0200

    Merge branch 'mysql-5.6-cluster-7.4' into mysql-5.7-cluster-7.5

commit 815776227d6206f83265664b39383fbebda25a19
Author: Ole John Aske <ole.john.aske@oracle.com>
Date:   Mon Oct 16 12:13:33 2017 +0200

    Bug #26919289 MYSQLD CRASH DURING 'JOIN PUSHDOWN' ANALYSIS
    
    When representing a 'Materialized semijoin' in the query plan,
    the mysql optimizer inserted extra QEP_TAB + JOIN_TAB objects
    to represent access to the materialized subquery result.
    
    The join pushdown analyzer didn't properly set up its internal
    data structures for these 'artificial tables' and instead left them
    uninitalized. Thus later usage of any item objects REF'ering the materialized
    semijoin ended up using an ininitialized 'tableno' field when
    accessing a 64-bit tableno-bitmask, possibly refering it beyond
    its physical end.
    
    Caused an assert to be hit in DEBUG mode, and possibly (yet unknown)
    unpredictable results else.

commit 50a1a0ff99d413a0554743ce23187153f9cee3e0
Merge: 1e88aaa 5833297
Author: Mikael Ronström <mikael.ronstrom@oracle.com>
Date:   Mon Oct 16 12:21:06 2017 +0200

    Merge ../push_76 into mysql-8.0-cluster-8.0

commit 5833297d79a138a77b90a04f4a2c225b6846dc30
Merge: a40a227 d5335d4
Author: Mikael Ronström <mikael.ronstrom@oracle.com>
Date:   Mon Oct 16 12:20:51 2017 +0200

    Merge ../push_75 into mysql-5.7-cluster-7.6

commit d5335d429605d4dc2c4c61c374b57e7be0e67825
Merge: ca031f3 5e28e1f
Author: Mikael Ronström <mikael.ronstrom@oracle.com>
Date:   Mon Oct 16 12:20:26 2017 +0200

    Merge ../push_74 into mysql-5.7-cluster-7.5

commit 5e28e1f79aa1b283b41192cde34a2582fb436930
Merge: b441ef2 dd7b2de
Author: Mikael Ronström <mikael.ronstrom@oracle.com>
Date:   Mon Oct 16 12:20:11 2017 +0200

    Merge ../push_73 into mysql-5.6-cluster-7.4

commit dd7b2de08c95b284e0eadb048fbed1cb7a3bf50b
Merge: 7f2a624 221ee6b
Author: Mikael Ronström <mikael.ronstrom@oracle.com>
Date:   Mon Oct 16 12:19:54 2017 +0200

    Merge ../push_72 into mysql-5.6-cluster-7.3

commit 221ee6bdf608ee4ed5f312897a12cc18a17ddbfd
Author: Mikael Ronström <mikael.ronstrom@oracle.com>
Date:   Mon Oct 16 12:19:34 2017 +0200

    BUG#26979030: atrt-gather-result.sh can fail during a normal LCP when files are deleted during rsync call, this generates error code 24 from rsync, allow this error code as an ok error code

commit 01f4a387694bc20eec4b56ecb5f33d125475cfd0
Merge: 6d92932 c089e5b
Author: Nawaz Nazeer Ahamed <nawaz.nazeer.ahamed@oracle.com>
Date:   Mon Oct 16 15:41:20 2017 +0530

    Upmerge of the 5.5.58 build

commit c089e5b4a7d9b9340a43a96ca59ce68dea6e1c15
Merge: 55690db b956662
Author: Nawaz Nazeer Ahamed <nawaz.nazeer.ahamed@oracle.com>
Date:   Mon Oct 16 15:39:48 2017 +0530

    Upmerge of the 5.5.58 build

commit b956662b3bbbe7fe1bbe782445f21163101e59f3
Merge: 37c9e1c 0bceaef
Author: Nawaz Nazeer Ahamed <nawaz.nazeer.ahamed@oracle.com>
Date:   Mon Oct 16 15:39:01 2017 +0530

    Upmerge of the 5.5.58 build

commit 0bceaef5d9b6fd3e34f862901174d01e35fe7b1a
Merge: 4ac23b2 be111ff
Author: Nawaz Nazeer Ahamed <nawaz.nazeer.ahamed@oracle.com>
Date:   Mon Oct 16 15:21:04 2017 +0530

    Merge branch 'mysql-5.5.58-release' into mysql-5.5

commit 6d92932f024f5a74c1b4693ea5902f99f2f890f7
Author: Tiago Jorge <tiago.jorge@oracle.com>
Date:   Fri Jul 7 16:45:13 2017 +0100

    WL#10803 - MySQL GCS: Support name resolution in whitelist
    
    EXECUTIVE SUMMARY
    ======================
    This worklog implements support for hostnames in the
    GCS/XCom connection whitelisting feature. Therefore,
    users will be able to configure whitelisting not only
    with IPs but also with hostmames
    
    DESCRIPTION
    ======================
    
    In Cloud Environments, the following scenarios are quite common:
    - Machines popping on and off of a group;
    - IP Address are obtained from a pool that is dedicated to some machines;
    
    In this case, it is quite hard to maintain a proper whitelist, since values are in
    constant mutation.
    
    For that, it was requested that, since we already support names in peer addresses
    and in local addresses, one should also support names in the whitelist parameters,
    e.g: www.randomname.com/16, as an example.
    
    User Story:
    - As a DBA, i want to be able to configure whitelist parameter using hostnames
    instead of IP Addresses so that I am able to allow connections from outside
    hosts that do not have a fixed address
    
    - As a DBA, i want to be able to configure whitelist parameter using a mix of
    hostnames and IP Addresses with netmasks I am able to allow connections from
    outside
    hosts that do not have a fixed address and still allow fixed IPs to connect to
    the group

commit 1e88aaa1a0834319534f3941c4d823b6c3e82d45
Merge: 85d4055 a40a227
Author: Ole John Aske <ole.john.aske@oracle.com>
Date:   Mon Oct 16 11:17:22 2017 +0200

    Merge branch 'mysql-5.7-cluster-7.6' into mysql-8.0-cluster-8.0

commit a40a227900e11d9dc204eabda17ad3455b5b6516
Merge: 786f6de ca031f3
Author: Ole John Aske <ole.john.aske@oracle.com>
Date:   Mon Oct 16 10:46:42 2017 +0200

    Merge branch 'mysql-5.7-cluster-7.5' into mysql-5.7-cluster-7.6

commit ca031f382afc071f983b63fac5d80271a278abb1
Merge: d7ddd51 b441ef2
Author: Ole John Aske <ole.john.aske@oracle.com>
Date:   Mon Oct 16 10:43:02 2017 +0200

    Merge branch 'mysql-5.6-cluster-7.4' into mysql-5.7-cluster-7.5

commit b441ef2e06809efc4f03f16b2ce3602256ea1c49
Author: Ole John Aske <ole.john.aske@oracle.com>
Date:   Mon Oct 16 10:28:52 2017 +0200

    Bug#26926666 SPJ: 'LOOSESCAN' TABLES SHOULD NOT BE CHILD MEMBERS IN A PUSHED JOIN
    
    'LoosesScan' execution requires the returned rows to be sorted in the order
    specified by an index.
    
    Such functionality can not be offered for a *child* member in a pushed join.
    Thus, any LooseScan'ed tables has to be excluded from being children
    in a pushed join query.

commit 85d4055c720121e2cba4221a455c3c265c043277
Author: Ole John Aske <ole.john.aske@oracle.com>
Date:   Mon Oct 16 09:44:32 2017 +0200

    Bug#25868387 WRONG DATA RETURNED WITH NDB JOIN PUSHDOWN
    
    Fix a regression caused by patch for:
      bug#23130819  (REFACTOR STATE CHANGES FOR THE ROW BUFFER ASSOCIATED WITH THE TABLE CLASS)
    
    The 'Refactor state change' seems to have removed some 'clear all row buffers' logic
    and instead only relied on that all handler calls returned 'HA_ERR_END_OF_FILE' if
    no rows were found.
    
    The ndbcluster handler interface for  ha_ndbcluster::index_read_pushed()
    instead returned 'ok' (0) of no rows were found, which was now interpreted
    as 'another row found'.
    
    Patch fix this by returning 'HA_ERR_END_OF_FILE' as expected by
    the enhanced handler semantics.

commit 9aa35919e16d1b87f32d3073d8ba3e251bf94dc1
Author: Pavan Naik <pavan.naik@oracle.com>
Date:   Fri Oct 13 12:35:52 2017 +0530

    BUG#26966008: MTR: ENABLE CHECK-TESTCASES FOR TESTS SOURCING
                  'FORCE_RESTART_IF_SKIPPED.INC'
    
    Description:
    ------------
    Fix for bug#24806257 accidentally disabled check-testcase for
    tests sourcing 'force_restart_if_skipped.inc' include file and
    not getting skipped.
    
    Fix:
    ----
    Fix the condition which checks whether to run check-testcase
    or not, and fix all the test failures.
    
    Reviewed-by: Deepa Dixit <deepa.dixit@oracle.com>
    Reviewed-by: Narendra Chauhan <narendra.chauhan@oracle.com>
    Reviewed-by: Sven Sandberg <sven.sandberg@oracle.com>
    RB: 17633

commit 74ba1fb4e773ccd0d79c9cbfb3e33e5e6be0e3f4
Merge: 0664365 55690db
Author: Hery Ramilison <hery.ramilison@oracle.com>
Date:   Sun Oct 15 20:35:19 2017 +0200

    Upmerge of the 5.7.20 build

commit 55690db80a3753fccc01d2e7e8edc64a6e1d417b
Merge: 0367562 0441472
Author: Hery Ramilison <hery.ramilison@oracle.com>
Date:   Sun Oct 15 20:32:19 2017 +0200

    Merge branch 'mysql-5.7.20-release' into mysql-5.7

commit 0664365b423571ad3659641ecc9b92a90ea18935
Merge: dcf93bd 0367562
Author: Marek Szymczak <marek.szymczak@oracle.com>
Date:   Sat Oct 14 00:41:07 2017 +0200

    Merge branch 'mysql-5.7' into mysql-8.0

commit 0367562113a876f4d7659ed8d1f691a0361a228f
Author: Marek Szymczak <marek.szymczak@oracle.com>
Date:   Sat Oct 14 00:36:30 2017 +0200

    WL#8838 Compressed and encrypted JSON audit log output
    
    Post-push fix: Audit Log test fixes.

commit dcf93bdd520263d464930106f6b9b7f02b6bbeff
Author: Satya Bodapati <satya.bodapati@oracle.com>
Date:   Fri Oct 13 15:35:38 2017 +0530

    Bug#26938297 - IMPORT OF COMPRESSED TABLE FAILS AND CRASHES THE SERVER
    
    Problem:
    
    Import of compressed table with 1k page size fails. This is because SDI
    index page has externally stored blob and import wasn't using the right
    index. It used the clustered index of table for SDI page and causes the
    blob assert.
    
    Fix:
    
    During IMPORT, use the correct index, ie SDI index for transforming SDI
    pages
    
    Reviewed-By: Bin Su <bin.x.su@oracle.com>
    RB: 17623

commit 4a25eaa5771d6a30a766127d7a1a48779f9e7625
Author: Satya Bodapati <satya.bodapati@oracle.com>
Date:   Wed Oct 4 19:20:28 2017 +0530

    Bug#26832347 - INNODB: CANNOT FIND SPACE FOR TBS_.*_RENAME IN TABLESPACE MEMO
    
    Problem:
    --------
    A crash after ALTER TABLESPACE x RENAME to y, a subsequent rename fails.
    
    When binlog is enabled, crash happens after DDL trx is written to
    binlog but before commit in engine.
    
    On startup, we create in-memory tablespace by reading from DD
    (boot_tablespaces()).
    
    At this point of time, binlog recovery is not yet over and reading from
    DD will give outdated/stale information. A fil_space_t object will be
    created with name 'x'. Post binlog recovery, the DD will have
    tablespacename as 'y'.
    
    Subsequent rename is 'ALTER TABLESPACE y RENAME to z'. DD asks SE to
    rename tablespace from y to z. InnoDB tries to look for tablespace with
    name 'y' but cannot find it. It has created the in-memory object with
    'x'. Hence, it throws error and rename fails.
    
    Fix:
    ----
    After dictionary rollback, binlog recovery and DDL_LOG replay, DD is
    consistent. At this stage, re-read all tablespace names and fix the
    cached tablespace objects (fil_space_t).
    
    Reviewed-By: Bin Su<bin.x.su@oracle.com>
    RB: 17551

commit 050d85f03803c4973536f91315f6593c3ee06af4
Merge: a9611c6 72b7c67
Author: Aditya A <aditya.a@oracle.com>
Date:   Fri Oct 13 21:36:07 2017 +0530

    Bug #26191879	FOREIGN KEY CASCADES USE EXCESSIVE MEMORY
    NULL Merge branch 'mysql-5.7' into mysql-8.0

commit 72b7c678ae7deb40e5a085f2a22f2493c393ddfe
Author: Aditya A <aditya.a@oracle.com>
Date:   Fri Oct 13 21:33:43 2017 +0530

    Bug #26191879	FOREIGN KEY CASCADES USE EXCESSIVE MEMORY
    
    PROBLEM
    
    The iterative approach used in the fix of Bug 16244691 was causing
    excessive memory usage when doing a cascade operation owing to the
    fact that for each row being updated we were allocating a update
    node from heap and this memory was not getting released to OS
    even after completion of delete.
    
    FIX
    
    We went back to recursive approach of cascading operation
    instead of iterative approach .

commit a9611c686e3b1705a9b4bb2c10947e525a68e67b
Author: Anibal Pinto <anibal.pinto@oracle.com>
Date:   Fri Oct 13 16:02:33 2017 +0200

    BUG#26883936: UNCLEAR AND DUPLICATED MESSAGE AFTER RECOVERING FROM A MAJORITY LOSS
    
    After:
      - Create two nodes
      - Kill one of them
      - Force a new configuration
    
    the following errors appear in the log:
    
    2017-09-28T05:09:43.732265Z 0 [Warning] [000000] Plugin group_replication
    reported: 'The member with address 10.0.2.15:13000 has already sent the
    stable set. Therefore discarding the second message.'
    2017-09-28T05:09:43.733539Z 0 [Warning] [000000] Plugin group_replication
    reported: 'The member with address 10.0.2.15:13000 has already sent the
    stable set. Therefore discarding the second message.'
    2017-09-28T05:09:43.735076Z 0 [Warning] [000000] Plugin group_replication
    reported: 'The member with address 10.0.2.15:13000 has already sent the
    stable set. Therefore discarding the second message.'
    2017-09-28T05:09:43.736512Z 0 [Warning] [000000] Plugin group_replication
    reported: 'The member with address 10.0.2.15:13000 has already sent the
    stable set. Therefore discarding the second message.'
    2017-09-28T05:09:43.737462Z 0 [Warning] [000000] Plugin group_replication
    reported: 'The member with address 10.0.2.15:13000 has already sent the
    stable set. Therefore discarding the second message.'
    
    This message can be logged on two situations:
      1) There is a network partition, messages are queued until the
         group is unblock, and when it is unblocked all delivered in
         batch, then the warning.
         For this scenario, network partition, we already the proper log
         messages, so this "duplicate stable set" message is not needed.
      2) There is a member sending stable set messages in loop, if that
         unlikely event happens, then everything is wrong and this
         message does not clarify nothing.
    
    Removed the message and improved certification garbage collection performance
    message.

commit f864b8abd1167a6b825ca38af8b48999f76e7d72
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Tue Oct 10 09:45:53 2017 +0200

    Bug#26927607 DYNAMIC LINKING WITH OPENSSL FOR NDBCLUSTER ON MACOS
    
    Extra patch for -DWITH_NDB_TEST=1
    All executables which link with mysqlclient must be created with
    MYSQL_ADD_EXECUTABLE so that the openssl .dll / .dylib / .so
    is found at link time and at runtime
    
    (cherry picked from commit b10fd56f16d58be75d1f33d06ef3f4e1f350532c)

commit b565a0f76174a712e1d9c044d96d259a474d9d14
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Fri Sep 29 13:11:16 2017 +0200

    Bug#26927607 DYNAMIC LINKING WITH OPENSSL FOR NDBCLUSTER ON MACOS
    
    Add support for -DWITH_NDBCLUSTER=1 -DWITH_SSL=</path/to/custom/openssl>
    
    Problem:
    Linking CXX executable ndbinfo_sql
    dyld: Library not loaded: libssl.1.0.0.dylib
    
    Fix: MYSQL_ADD_EXECUTABLE does the necessary magic to find openSSL
    
    Problem:
    Linking CXX shared module ndb_engine.so
    ld: file not found:
    /Volumes/hd2/pb2/build/sb_0-23974122-1498237767.55/openssl-1.0.2k-macos10.12-x86-64bit/lib/libcrypto.1.0.0.dylib
    
    Fix: Link with the copied libraries, rather than the original ones.
    
    Problem:
    Failed to open library "/export/home/tmp/didrik/trunk-add-executable-ndb/storage/ndb/memcache/ndb_engine.so": dlopen(/export/home/tmp/didrik/trunk-add-executable-ndb/storage/ndb/memcache/ndb_engine.so, 6): Library not loaded: libssl.1.0.0.dylib
      Referenced from: /export/home/tmp/didrik/trunk-add-executable-ndb/storage/ndb/memcache/ndb_engine.so
      Reason: image not found
    
    otool -L storage/ndb/memcache/ndb_engine.so says:
            libssl.1.0.0.dylib (compatibility version 1.0.0, current version 1.0.0)
            libcrypto.1.0.0.dylib (compatibility version 1.0.0, current version 1.0.0)
            /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1238.60.2)
            /usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 307.5.0)
    
    Fix: set LIBRARY_OUTPUT_DIRECTORY for ndb_engine,
         and patch ndb_engine with install_name_tool
    
    otool -L library_output_directory/ndb_engine.so
    library_output_directory/ndb_engine.so:
            @loader_path/libssl.1.0.0.dylib (compatibility version 1.0.0, current version 1.0.0)
            @loader_path/libcrypto.1.0.0.dylib (compatibility version 1.0.0, current version 1.0.0)
            /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1238.60.2)
            /usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 307.5.0)
    
    make install DESTDIR=/tmp/foo
    otool -L /tmp/foo/usr/local/mysql/lib/ndb_engine.so
    /tmp/foo/usr/local/mysql/lib/ndb_engine.so:
            @loader_path/libssl.1.0.0.dylib (compatibility version 1.0.0, current version 1.0.0)
            @loader_path/libcrypto.1.0.0.dylib (compatibility version 1.0.0, current version 1.0.0)
            /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1238.60.2)
            /usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 307.5.0)
    
    ================
    For linux: ensure that load-time dependencies after install
    are resolved relative to $ORIGIN.
    
    chrpath library_output_directory/ndb_engine.so
    library_output_directory/ndb_engine.so: RPATH=$ORIGIN/:/export/home/didrik/openssl-1.0.2k-ubuntu17.04-x86-64bit/lib:
    
    make install DESTDIR=/tmp/foo
    
    chrpath /tmp/foo/usr/local/mysql/lib/ndb_engine.so
    /tmp/foo/usr/local/mysql/lib/ndb_engine.so: RPATH=$ORIGIN/:$ORIGIN/
    (the result here depends on cmake version, there should be at least one '$ORIGIN/'
    
    (cherry picked from commit 57e83a35625f6e1c45ff5e7d9c3341a15a0125a2)

commit d12a3395980694b04d097be46cbe3e7268af0ec6
Author: Sergey Glukhov <sergey.glukhov@oracle.com>
Date:   Fri Oct 13 13:30:12 2017 +0300

    After merge fix.

commit fd7560b2601a339ad08d5b6b6d18cc9cd1b70ec0
Merge: ed62b7e 031173d
Author: Sergey Glukhov <sergey.glukhov@oracle.com>
Date:   Fri Oct 13 13:28:13 2017 +0300

    Merge branch 'mysql-5.7' into mysql-8.0

commit ed62b7e734b3a56f41f9a20c7654a2817e3b568c
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Fri Oct 13 12:13:03 2017 +0200

    Bug #26712418: EMBEDDED SERVER MYSQL_OPTIONS() OPTIONS NOT REMOVED
    WITH REST OF EMBEDDED SERVER
    
    Post-push fix of a memory leak.
    
    Change-Id: If4ec872e165ece47ad76fff5cff9b0123a1db026

commit 031173d624c2f30c16a1b8542a38c9772e31acf2
Merge: dc1c1e7 37c9e1c
Author: Sergey Glukhov <sergey.glukhov@oracle.com>
Date:   Fri Oct 13 12:45:08 2017 +0300

    Merge branch 'mysql-5.6' into mysql-5.7

commit 09621bac8755af1be3aacf22cf3392faa61bfa6b
Author: Ashish Padiyar <ashish.padiyar@oracle.com>
Date:   Fri Oct 13 14:11:30 2017 +0530

     Bug#21907546: MAIN.USER_VAR FAILS WITH RESULT CONTENT MISMATCH
    
        Issue:
        ------
        user_var test was failing sporadically on PB2 with result content mismatch
        in the query execution plan.
    
        Fix:
        ----
        ANALYZE TABLE was added to distribute table indices evenly.
    
        Reviewed-by: Deepa Dixit<deepa.dixit@oracle.com>
        Reviewed-by: Sreeharsha R<sreeharsha.ramanavarapu@oracle.com>
        RB: 17341

commit 8a0745a159500cea5f578ec0c542481400b677f5
Author: Magnus Blåudd <magnus.blaudd@oracle.com>
Date:   Fri Oct 13 09:56:01 2017 +0200

    Bug #26030132: REMOVE SQL_ALLOC [noclose]
    
     - fix crashes
     - remove one destroy() of memory not THR_MALLOC allocated
     - change three more delete to destroy()

commit 37c9e1c3e10e3153114c291ffde0314fb8aa1fb0
Author: Sergey Glukhov <sergey.glukhov@oracle.com>
Date:   Fri Oct 13 10:31:32 2017 +0300

    Bug#26877788 SELECT FROM INFORMATION_SCHEMA.FILES RETURNS NO RECORDS WHEN ORDER BY IS USED
    
    During subquery materialization table list is modified
    so that empty JOIN_TAB table is inserted in the middle of
    table list. It leads to interruption of the loop in
    get_schema_tables_result() function and tables which are
    after empty JOIN_TAB are not processed.
    
    The fix:
    Do not interrupt the loop on empty JOIN_TAB.

commit 7fa0d4f2558bc3489983b7ae2786941f3355d48f
Author: Magnus Blåudd <magnus.blaudd@oracle.com>
Date:   Fri Oct 13 08:46:06 2017 +0200

    WL#10475 : Defaults: Enable Parallel Replication Applier
    
     - follow up patch to fix problem when running the rpl_row_001.test
       with cluster replication. The test was not properly waiting for the
       committed transactions to be written to the binlog before saving
       master position.

commit 9c8b28fb3cd3c95531c145701246fe09c0126906
Merge: 43efe5b dc1c1e7
Author: Balasubramanian Kandasamy <balasubramanian.kandasamy@oracle.com>
Date:   Fri Oct 13 12:56:28 2017 +0530

    Merge branch 'mysql-5.7' into mysql-8.0

commit dc1c1e783274afe8fba35c96a761c23a76b83ac2
Author: Balasubramanian Kandasamy <balasubramanian.kandasamy@oracle.com>
Date:   Fri Oct 13 12:52:55 2017 +0530

    Bug#26963839 - SERVER FAILING TO INSTALL ON FEDORA 27 OVER NATIVE MARIADB-CONNECTOR-C-DEVEL.X8
      - Due to changes in packages, add more obsoletes to -devel package.

commit 5359c68e420d5df90e62e8220ba0db155cf9cf47
Author: Magnus Blåudd <magnus.blaudd@oracle.com>
Date:   Fri Oct 13 09:01:44 2017 +0200

    WL#8500 Adapt MySQL Cluster to 8.0
    
     - move ndb_setup_slave.inc out of global include and instead let it
      be only in the suite where it's used.

commit 3de2ac07eaeccaa628feeb56a87cdd0e7d02584f
Author: Magnus Blåudd <magnus.blaudd@oracle.com>
Date:   Fri Oct 13 08:49:54 2017 +0200

    WL#8500 Adapt MySQL Cluster to 8.0
    
     - fix spelling error in the rpl_ndb configuraiton. There are two
       mysqld's in the first cluster, called . 1 and 2. and there should be
       one section for each of them in my.cnf

commit 623e913255ed8c51888fc346a968d59ba4020f1c
Author: Magnus Blåudd <magnus.blaudd@oracle.com>
Date:   Fri Oct 13 08:46:06 2017 +0200

    WL#10475 : Defaults: Enable Parallel Replication Applier
    
     - follow up patch to fix problem when running the rpl_row_001.test
       with cluster replication. The test was not properly waiting for the
       committed transactions to be written to the binlog before saving
       master position.

commit 18e4bf4ba7de29c228c7784b2a61bd47bdc61f75
Author: Magnus Blåudd <magnus.blaudd@oracle.com>
Date:   Fri Oct 13 08:02:34 2017 +0200

    BUG#14785681 RPL_DDL.TEST NEVER RUN
    
     - follow up patch to previous test which removed rpl_ddl.test
     - also remove the corresponding rpl_ndb_ddl.test which sources the
       same include file as the now removed test.
     - also remove the common test include file extra/rpl_tests/rpl_ddl.test
     - also remove disabling of rpl_ndb_ddl.test referencing bug
     - also remove mention of things which "should be merged to
       rpl_ddl.test" from rpl_innodb.test

commit ed5c3a90fda8104e1c9d08f56d7008efd4fbd952
Merge: 7a62c02 786f6de
Author: Lakshmi Narayanan Sreethar <lakshmi.narayanan.sreethar@oracle.com>
Date:   Fri Oct 13 02:42:09 2017 +0530

    Merge branch 'mysql-5.7-cluster-7.6' into mysql-8.0-cluster-8.0

commit 786f6de420e988a6c62fd6cb30896c26bc9ec1bf
Merge: 39c1d2f d7ddd51
Author: Lakshmi Narayanan Sreethar <lakshmi.narayanan.sreethar@oracle.com>
Date:   Fri Oct 13 02:30:55 2017 +0530

    Merge branch 'mysql-5.7-cluster-7.5' into mysql-5.7-cluster-7.6

commit d7ddd51493cb1baca8a469084523aa39a63ed8dc
Author: Lakshmi Narayanan Sreethar <lakshmi.narayanan.sreethar@oracle.com>
Date:   Fri Oct 13 02:15:13 2017 +0530

    WL#10816: Mediumint support for ClusterJ : Post push fix
    
    ndb.clusterj test fails due to insufficient memory in few platforms.
    Increase the memory to fix this.

commit b2af1438419a1ccbfc7bfe8e58d9bcabec08c45b
Author: Lakshmi Narayanan Sreethar <lakshmi.narayanan.sreethar@oracle.com>
Date:   Fri Oct 13 01:09:08 2017 +0530

    Bug#26758939 : FAIL TO LOCK THREAD TO CPU - Post Push Fix
    
    Previous patches for Bug#26758939 disabled Lock/UnlockCPU apis in
    environment where the glibc version was less than 2.23 to avoid the
    effects of a bug. But since this seems too strict, most of the
    changes made as a part of Bug#26758939 are reverted in this patch. This
    re enables Lock/UnlockCPU apis in all environments regardless of the
    glibc version used.
    
    The glibc bug causes the sched_setaffinity() call to fail when an all
    ones CPU mask is set. The call fails and the error is set to EINVAL -
    invalid arguments. UnlockCPU uses a all ones CPU mask and will fail
    similarly if the glibc version is lower than 2.23. This patch instead
    of using an all ones CPU mask, uses sysconf to get the actual number of
    processors available to the system and then sets the cpu mask
    accordingly.

commit 43efe5b569016c8997d332cde15fc8f649dc07d4
Merge: 010f458 24b6750
Author: Marc Alff <marc.alff@oracle.com>
Date:   Thu Oct 12 21:37:19 2017 +0200

    Merge branch 'mysql-5.7' into mysql-8.0
    
    Null merge for 8.0

commit 24b6750b6d3699d454bee000ec9d63ea85a0ed95
Merge: ea5ca94 ab52e8d
Author: Marc Alff <marc.alff@oracle.com>
Date:   Thu Oct 12 21:35:39 2017 +0200

    Merge branch 'mysql-5.6' into mysql-5.7

commit ab52e8d6b60ed6ac7fbff9338efe09fef18485a6
Author: Marc Alff <marc.alff@oracle.com>
Date:   Thu Oct 12 21:25:17 2017 +0200

    Bug#26021187 OVERFLOW IN DIGEST_ADD_TOKEN
    
    Post push fix,
    test case does not support embedded.

commit 7a62c02681b57bb9a13d7cceb1f6c91be4d88e82
Author: Magnus Blåudd <magnus.blaudd@oracle.com>
Date:   Thu Oct 12 18:15:45 2017 +0200

    WL#9185 MySQL Cluster support for new DD
    
     - fix problem with table_name parameter not being used, instead
       the table name from the unpacked table definition was used. Although
       that should be the same name it's better to use the provided
       table_name and introduce a check that they are equal
     - rename  table_object to install_table

commit 3eaeec2d5d972e5f734dd020f22334ee36c3ad3d
Author: Magnus Blåudd <magnus.blaudd@oracle.com>
Date:   Thu Oct 12 18:06:19 2017 +0200

    WL#8500 Adapt MySQL Cluster to 8.0
    
     - canonicalize include paths
     - remove unused includes

commit f3a82491ad9ba7e14f70b5340f1d72618d3ffd8b
Author: Magnus Blåudd <magnus.blaudd@oracle.com>
Date:   Thu Oct 12 17:09:32 2017 +0200

    WL#8500 Adapt MySQL Cluster to 8.0
    
     - remove unneccesary includes
     - remove out of place comment

commit 010f458c3b11960ea11fa46009ad33de9acd4524
Merge: 88b2686 ea5ca94
Author: Marc Alff <marc.alff@oracle.com>
Date:   Thu Oct 12 17:28:22 2017 +0200

    Merge branch 'mysql-5.7' into mysql-8.0

commit ea5ca9432069b20594922f6a2936a98affe6d32d
Merge: cd2b383 ad9492e
Author: Marc Alff <marc.alff@oracle.com>
Date:   Thu Oct 12 17:27:50 2017 +0200

    Merge branch 'mysql-5.6' into mysql-5.7

commit ad9492e6012d7c2bcc1ce70f10cb3df2112e23f8
Author: Marc Alff <marc.alff@oracle.com>
Date:   Thu Oct 12 11:47:17 2017 +0200

    Bug#26021187 OVERFLOW IN DIGEST_ADD_TOKEN
    MySQL Bug 86209 Overflow in digest_add_token
    
    Before this fix, some queries could cause
    an overflow in the digest code,
    in function digest_add_token().
    
    External contribution from:
    - Laurynas Biveinis
    - Roel van de Paar
    
    Please see the original contribution
    attached to the bug report for:
    - the root cause analysis
    - the test cases
    - the rationale for the fix
    - the full change set comments.

commit 88b268635740482cc8cb05b6dcd230f7f5add1ac
Author: Dag Wanvik <dag.wanvik@oracle.com>
Date:   Wed Oct 11 15:44:04 2017 +0200

    Bug#25051195 WRONG CALCULATION OF DECIMALS AFTER POINT FOR IFNULL W/ GROUP BY USING TMP TBL
    
    IFNULL is used with type combination {decimal,int}, the resulting
    decimal loses on digit after the decimal point in the calculation of
    ::max_length. This leads to a loss of a decimal digit after point in
    the corner case of GROUP BY which needs a temporary file, e.g. this
    kind of query:
    
       SELECT IFNULL(e2,i1) in, SUM(d1) FROM t GROUP BY e2,i1 ORDER BY in;
    
    This bug will be more visible when we get window functions which rely on
    temporary files in non-trivial cases.
    
    FIX
    ------------------------------
    
    Add space for decimal point to the calculation in
    Item_func_ifnull::resolve_type.
    
    Repro test added.
    
    ANALYSIS (refer to added test case):
    ------------------------------------
    
    The calculation of char_length in Item_func_ifnull::resolve_type is
    used as an argument to fix_char_length. The calculation forgets to add
    space for decimal point if present.
    
    The calculation for NULLIF looks like this:
    
    Item_func_ifnull::resolve_type:
       :
       char_length= max(len0, len1) + decimals + (unsigned_flag ? 0 : 1);
    
    where "decimals" is 2 in our case.
    
    In the similar computation of IF, this is calculated with another (correct)
    code path:
    
    cf Item_func_if::resolve_type ->
       fix_num_type_shared_for_case->
       Item_func::count_decimal_length ->
       my_decimal_precision_to_length_no_truncation
    
    which has this line:
       uint32 retval= (uint32)(precision + (scale > 0 ? 1 : 0) +
                      (unsigned_flag || !precision ? 0 : 1));
    
    the "scale" here being the number of digits after point, making the
    calculation add 1 in our case, since "scale" is 2.
    
    Change-Id: If54750e9e3b456d063591a359514d69f2bc0c510

commit 047352927b8882d52aafc24906a3f8265585495c
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Thu Oct 12 16:41:03 2017 +0200

    WL#8838 Compressed and encrypted JSON audit log output
    
    Post-push fix: warnings about virtual member functions, and non-virtual DTOR.
    
    Change-Id: I42e0917161c821dc1434621a9bb20d4b2c6d6690

commit a4d8735764ef0864bc26d70ad3816f93d85fc6f9
Author: Praveenkumar Hulakund <praveenkumar.hulakund@oracle.com>
Date:   Thu Oct 12 13:34:09 2017 +0200

    Bug#25761992 - VIEW VALIDATION WHEN PLUGINS ARE LOADED/UNLOADED
    
    View is validated (i.e view state is set to valid/invalid and view
    column metadata is updated) by a DDL operation on a table, view or
    stored function referenced by it. But if the view is referencing
    a INFORMATION_SCHEMA table then its not validated on a plugin
    load and unload.
    
    To fix this issue, changes are done to validate views referencing
    INFORMATION_SCHEMA tables in the following cases
    
      * On dynamic load of INFORMATION_SCHEMA plugin (INSTALL PLUGIN)
    
      * On dynamic unload of INFORMATION_SCHEMA plugin (UNINSTALL
        PLUGIN)
    
      * INFORMATION_SCHEMA plugin load during server restart.
    
      * INFORMATION_SCHEMA plugin unload during server restart.
    
      * on server restart, if INFORMATION_SCHEMA metadata version is
        updated.
    
    Change-Id: Ic0c2560053a45aaef6fd5e38577465ea9c181350

commit 46857a3ffbb6d437a51b9d5292dbe16b2b6a4394
Author: Georgi Kodinov <georgi.kodinov@oracle.com>
Date:   Thu Oct 12 12:30:39 2017 +0300

    Bug #26712418: EMBEDDED SERVER MYSQL_OPTIONS() OPTIONS NOT REMOVED
    WITH REST OF EMBEDDED SERVER
    
     Removed:
     * MYSQL_OPT_GUESS_CONNECTION
     * MYSQL_OPT_USE_EMBEDDED_CONNECTION
     * MYSQL_OPT_USE_REMOTE_CONNECTION
     * MYSQL_SET_CLIENT_IP
     * code in mysql_options() and mysql_get_option() to support these
     * mysql->options.methods_to_use
     * mysql->options.ci.client_ip
     * The whole union at mysql->options.ci
     * unused members of the client structures (safe to do due to the
       major version upgrade)
     * extension and embedded_info from st_mysql_data
     * info_buffer from st_mysql

commit 4e4d7e0fda0a308a097fd68697b98a13cb4ea46d
Merge: 9e0fba2 39c1d2f
Author: Mauritz Sundell <mauritz.sundell@oracle.com>
Date:   Thu Oct 12 13:17:16 2017 +0200

    Merge branch 'mysql-5.7-cluster-7.6' into mysql-8.0-cluster-8.0

commit 6f265fb9eeed47582ad508f4167987112638e96a
Merge: 7cc7c16 cd2b383
Author: Marek Szymczak <marek.szymczak@oracle.com>
Date:   Thu Oct 12 13:13:02 2017 +0200

    Merge branch 'mysql-5.7' into mysql-8.0

commit 39c1d2f0d02203a9691dc123082bb1adc01639fd
Author: Mauritz Sundell <mauritz.sundell@oracle.com>
Date:   Thu Oct 12 12:25:47 2017 +0200

    WL#11169: Fix for part 1, memory corruption.
    
    Do not pass address to local variable to init_globals_list(), it cause a
    dangling pointer.  In debug mode clear_global_variables() will be called
    prior each processing of asynchrous signal and the dangling pointer will
    be used "clear" whatever it points to.

commit cd2b383f14ef061ecfee57a6b31de9eb1177378e
Author: Marek Szymczak <marek.szymczak@oracle.com>
Date:   Thu Oct 12 13:09:15 2017 +0200

    WL#8838 Compressed and encrypted JSON audit log output
    
    Post-push fix: Audit Log plugin is not compiled when OpenSSL is missing.

commit 7cc7c16f3d80255718c8bcaf319e131fb8be4a56
Author: Mayank Prasad <mayank.prasad@oracle.com>
Date:   Thu Oct 12 14:30:49 2017 +0530

    Bug #26588738 : MEMCACHED.MEMC280_MISC FAILS WITH SIG 11 ON PB2
    
    Background:
      memcached plugin listens to a specific (hardocded) port in MTR tests.
      Therefore when a testcase is executed in parallel to itself, it might fail with
      an error that port is in use. Which is expected. And then memcached plugin code
      goes for a cleanup.
    
    Issue:
      In memcached code, my_thread_init() was taken out from handler_create_thd().
      Thus, during cleanup, when handler_create_thd() is called, it crashes (as thd
      is not initialized and THR_mysys is NULL).
      It was not failing in MySQL 5.7 because in 5.7, my_thread_init() was inside
      handler_create_thd().
    
    Fix:
      Before calling handler_create_thd(), make sure to call my_thread_init(), to
      initialized thread.
    
      Reviewed by: Jimmy.Yang@oracle.com
      RB: 17547

commit 8b165e235ccfa00c9b2595f3f2fa7aecfd5c06a8
Author: Roy Lyseng <roy.lyseng@oracle.com>
Date:   Wed Oct 11 14:54:37 2017 +0200

    Bug#26389402: Outer join optimized away with user-defined functions
    
    When a stored function is used with table column values as arguments
    in a WHERE predicate, its not_null_tables property is falsely set to
    a non-empty value. If this predicate is applied to an outer join
    operation and one of the arguments is from an inner table of the
    outer join, the predicate may be used to convert the outer join to
    an inner join.
    
    According to SQL standard, only functions that have the "RETURNS NULL
    ON NULL INPUT" property should behave like that. (MySQL does not
    currently implement this property.) This function changes semantics
    of stored functions to not implement RETURNS NULL ON NULL INPUT.
    
    Some internal functions (like internal_table_rows) need the same
    possibility as the stored functions. This bug fix will prepare
    not_null_tables functionality for these functions, but will not
    actually change the implementation for these functions.
    
    A "null_on_null" property is implemented on the Item_func class.
    null_on_null is by default true, but is overridden with false in class
    Item_func_sp. Any other function that need the same not_null_tables
    property may also override null_on_null in its constructor.
    
    When null_on_null is false, not_null_tables_cache is always set
    to 0 when updated.
    
    For some Item_func derived classes that effectively did not implement
    RETURNS NULL ON NULL INPUT, the overridden function not_null_tables()
    that used to return 0 is replaced with a simple assignment to
    null_on_null in the constructor, thus eliminating several overridden
    functions.

commit 9e0fba2952dcb47fddb3b546bb4320f0d3a3bc6e
Author: Magnus Blåudd <magnus.blaudd@oracle.com>
Date:   Thu Oct 12 10:08:31 2017 +0200

    WL#8500 Adapt MySQL Cluster to 8.0
    
     - fix .result file of rpl_ndb_row_001 as upstream source include
       file have chnaged to use replication include files

commit 670442e1062f9ec03c4192fb3e70aec5efbffb8e
Author: Magnus Blåudd <magnus.blaudd@oracle.com>
Date:   Thu Oct 12 08:55:01 2017 +0200

    WL#9185 MySQL Cluster support for new DD
    
     - disable ndb_share.test and ndb_reconnect.test
     - there is a problem with the "check_not_readonly" which now has been
       rewritten to create a table called check_not_readonly, that table is
       sometimes installed a second time when running schema distribution
       synchronization during mysqld restart. Need to find a different way
       to wait for "not readonly or fix so it's not installed a second time
       (must be a race)

commit b37fc98e5e4dce8b6c45d446ae5ebfb3136435bd
Author: Havard Dybvik <havard.dybvik@oracle.com>
Date:   Thu Oct 12 09:15:32 2017 +0200

    Bug#25123839: LEAST AND GREATEST MAKES INCONSISTENT DATA TYPES, COMPARED TO UNION AND COALESCE
    
    Post-push fix.
    
    Update for test failing only on Windows.

commit c8c23bd609d1643b3ad999bdc375053230f113bc
Merge: 3305634 f671191
Author: Magnus Blåudd <magnus.blaudd@oracle.com>
Date:   Thu Oct 12 08:34:17 2017 +0200

    Merge cluster-7.6 -> cluster-8.0

commit f67119193fb88ef8391ec4937e492033431c3608
Merge: c70b8b2 ae0a098
Author: Magnus Blåudd <magnus.blaudd@oracle.com>
Date:   Thu Oct 12 08:33:24 2017 +0200

    Merge cluster-7.5 -> cluster-7.6

commit ae0a098b215bedc78e3b924e635c6c86ebae6ded
Author: Magnus Blåudd <magnus.blaudd@oracle.com>
Date:   Thu Oct 12 08:29:00 2017 +0200

    Bug#14845851 MYSQL CLUSTER - AUTO INCREMENT NOT RESET WHEN TRUNCATE NON- BINLOGGING SQL NODES [noclose]
    
     - disable test as it fails with varying failures across all versions

commit cf1ee9e76a80b0044252c11359cc0a287782b52d
Author: Bin Su <bin.x.su@oracle.com>
Date:   Thu Oct 12 14:09:31 2017 +0800

    Bug#26950659 - INITIALIZE FAILED:: NODE->N_PENDING == 0 FIL_CLOSE_ALL_FILES
    
    During shutdown, after confirming there is no IO from buffer pool,
    there is still some pending IO on DD tablespace found when closing all files.
    The cause is that after checking buffer pool, server still tries to
    write back dynamic metadata, which results in new IO for DD tablespace.
    This may happen when fast shutdown.
    
    To fix this, write-back of dynamic metadata should be done first,
    before checking buffer pool, if it's a fast shutdown.
    
    RB: 17616
    Reviewed by: Jimmy Yang <jimmy.yang@oracle.com>

commit 3305634498d796606eedcb63384aee5a45f42551
Author: Magnus Blåudd <magnus.blaudd@oracle.com>
Date:   Thu Oct 12 07:56:54 2017 +0200

    Bug#26958920 MAIN.FILE_CONTENTS FAIL WHEN RUN WITH CLUSTER RPM [noclose]
    
     - disable main.file_contents due to failure when running in rpm built
       for cluster

commit 2d873e03353951401dc11f25b25d46261878ce7c
Author: Magnus Blåudd <magnus.blaudd@oracle.com>
Date:   Thu Oct 12 07:47:33 2017 +0200

    Bug#26794727 MISSING DISK DATA INFORMATION IN INFORMATION_SCHEMA
    [noclose]
    
     - mysqldump fails to dump logfilegroups and partitions, thus the dump
       is incomplete and tables in tablespaces can't be restored by running
       the dumped sql file. This problem probably need both bug#26794727 as
       well as WL#9185
     - disable ndb_dd_dump referencing Bug#26794727 to start with

commit 432c86dfd81ba25ae99adf2698aa9eb36f370c5d
Merge: 33f1b6d 2b6a574
Author: Harin Vadodaria <harin.vadodaria@oracle.com>
Date:   Thu Oct 12 07:41:56 2017 +0200

    Merge branch 'mysql-5.7' into mysql-8.0

commit 2b6a57494bd270f04caf9d1df50350761415f4b2
Author: Harin Vadodaria <harin.vadodaria@oracle.com>
Date:   Thu Oct 12 07:39:16 2017 +0200

    WL#8838 Compressed and encrypted JSON audit log output
    
    Post-push fix : Fixed build issue.

commit 35f341f156eb2f077b6759d4286c25f9bf4c35a3
Author: Magnus Blåudd <magnus.blaudd@oracle.com>
Date:   Thu Oct 12 07:34:06 2017 +0200

    Bug#26824659 LIBNDBCLIENT.SO FAILS TO LOAD LIBSSL.SO [noclose]
    
     - correct bug subject
     - disable also clusterj due to this problem

commit 33f1b6d0888640407c14ae8fd2bfd3e730c71d14
Merge: eab118f 2a302f2
Author: Sreeharsha Ramanavarapu <sreeharsha.ramanavarapu@oracle.com>
Date:   Thu Oct 12 10:19:10 2017 +0530

    Merge branch 'mysql-5.7' into mysql-8.0

commit 2a302f2079364e09c91cc1685545a5f0513b616f
Author: Sreeharsha Ramanavarapu <sreeharsha.ramanavarapu@oracle.com>
Date:   Thu Oct 12 10:17:35 2017 +0530

    Bug #26881855: GCOL: INCORRECT BEHAVIOR WITH CONSTANT ITEM
    
    Issue:
    ------
    Virtual generated column expression that contain a
    comparision operators between certain datatypes can cause
    problems.
    
    When a table is opened, the expression in the generated
    column is created on the table's memroot. As subsequent
    statements access the same table, convert_constant_item()
    checks the types and under certain conditions chooses to
    re-create one of the objects with the correct type. The new
    object will be created on the statement's memroot and will
    be freed at the end of the statement. This can cause
    problem when subsequent statements access the same table.
    
    Root cause:
    -----------
    Currently Item_int_with_ref class has no field_type and
    defaults to an integer. convert_constant_item() decides to
    re-create the objects based on the field_type even when a
    re-create will only result in a new Item_int_with_ref
    object.
    
    Solution:
    ---------
    Add a field_type to Item_int_with_ref. This will make sure
    that convert_constant_item() can distinguish if a new
    object is actually neccessary.
    
    This fix also addresses Bug #26881924 and Bug #26881874.
    
    This problem was fixed in trunk by Roy's Bug#25221172.

commit eab118f90113355ecc109150784c7815f21706c5
Merge: 650d4cc 3e535f2
Author: Marek Szymczak <marek.szymczak@oracle.com>
Date:   Wed Oct 11 18:15:34 2017 +0200

    Merge branch 'mysql-5.7' into mysql-8.0

commit 54e5f2f21a016165462498ff9046bc08deb1a725
Merge: f31902f c70b8b2
Author: Mauritz Sundell <mauritz.sundell@oracle.com>
Date:   Wed Oct 11 17:49:34 2017 +0200

    Null merge branch 'mysql-5.7-cluster-7.6' into mysql-8.0-cluster-8.0

commit c70b8b2bc0bd14e91ae2c7ad4cb1ae7f39ce12d2
Author: Mauritz Sundell <mauritz.sundell@oracle.com>
Date:   Wed Oct 11 17:45:24 2017 +0200

    PB2 all_default_valgrind builds for mysql-5.7-cluster-7.6 is in bad shape.
    
    Temporarily turning of unlimited test failures.

commit 3e535f2d02e161a37603083a243784166ded86db
Author: Marek Szymczak <marek.szymczak@oracle.com>
Date:   Wed Oct 11 17:29:27 2017 +0200

    WL#8838 Compressed and encrypted JSON audit log output
    
    Audit log extension that allows logging into JSON file format. Files of all
    logging formats can be compressed and encrypted. Content of JSON files can be
    accessed using SQL interface.
    
    Reviewed-by:
    ============
    Georgi Kodinov <georgi.kodinov@oracle.com>
    Ramil Kalimullin <ramil.kalimullin@oracle.com>

commit 650d4ccf7851861b576cce3b98db889447ebc510
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Wed Oct 11 17:20:31 2017 +0200

    Revert "Bug #26712418: EMBEDDED SERVER MYSQL_OPTIONS() OPTIONS NOT REMOVED"
    
    Broken ABI check
    
    This reverts commit b44745136fc5d9f5dce468e595335b5e3d482d2a.

commit b44745136fc5d9f5dce468e595335b5e3d482d2a
Author: Georgi Kodinov <georgi.kodinov@oracle.com>
Date:   Thu Sep 28 15:55:29 2017 +0300

    Bug #26712418: EMBEDDED SERVER MYSQL_OPTIONS() OPTIONS NOT REMOVED
      WITH REST OF EMBEDDED SERVER
    
    Removed:
    * MYSQL_OPT_GUESS_CONNECTION
    * MYSQL_OPT_USE_EMBEDDED_CONNECTION
    * MYSQL_OPT_USE_REMOTE_CONNECTION
    * MYSQL_SET_CLIENT_IP
    * code in mysql_options() and mysql_get_option() to support these
    * mysql->options.methods_to_use
    * mysql->options.ci.client_ip
    * The whole union at mysql->options.ci
    * unused members of the client structures (safe to do due to the
      major version upgrade)
    * extension and embedded_info from st_mysql_data
    * info_buffer from st_mysql

commit 1ae73c8d2bd04c4c3deb39164bebf628f5f7b1d2
Author: Georgi Kodinov <georgi.kodinov@oracle.com>
Date:   Fri Sep 29 12:19:39 2017 +0300

    Bug #26435766: PASSWORD EXPIRE FLAG IS NOT WORKING PROPERLY FOR
      EXTERNAL AUTHENTICATION PLUGINS
    
    Two things:
    1. Added a check if non-default password expiration options (e.g.
    PASSWORD EXPIRE or PASSWORD EXPIRE INTERVAL 1 DAY) are passed to
    CREATE/ALTER USER that will use an authentication method that does
    not support password expiration. Note that PASSWORD EXPIRE DEFAULT
    and PASSWORD EXPIRE NEVER are still supported.
    2. Now the password expiration flag is reset for all authetnication
    methods not only for the ones that support password expiration.
    This is needed since there's no need to keep the flag on for methods
    that do not support it.

commit 8c21e57521a93dab637001c25a623c821cfed085
Author: Parveez Baig <parveez.baig@oracle.com>
Date:   Wed Oct 11 18:45:32 2017 +0530

    Bug#26918599 : MAIN.BINLOG_PARTIAL_JSON_WARNINGS --REPEAT=X FAILS
    
    Test is failing because the assert_only_after in test is set to
    CURRENT_TEST: main.binlog_partial_updates_warnings rather than
    CURRENT_TEST: main.binlog_partial_json_warnings which is the
    test name. Since assert_grep.inc can't find any line matching
    to assert_only_after value it counts all the occurences of the
    specified assert_select value. Finally test fails as the number
    of matching lines are more.
    
    Fix: Changed CURRENT_TEST: main.binlog_partial_updates_warnings
         to CURRENT_TEST: main.binlog_partial_json_warnings

commit 74b6da6e90ed8ac48f8c4c8bed023910d7365ab4
Merge: 12d8c72 6f91ffc
Author: Venkatesh Duggirala <venkatesh.duggirala@oracle.com>
Date:   Wed Oct 11 15:58:16 2017 +0530

    Merge branch 'mysql-5.7' into mysql-8.0

commit 6f91ffc35430b4f66c1367e362eac951358ad21e
Author: Venkatesh Duggirala <venkatesh.duggirala@oracle.com>
Date:   Wed Oct 11 15:57:15 2017 +0530

    Bug#26899370	BINLOG_MIXED_ROW_VERBOSE IS FAILING IN HUDSON RUNS
    
    Problem: binlog_mixed_row_verbose is failing in hudson runs.
    
    Analysis & Fix:
    Test script binlog_mixed_row_verbose assumes that after executing
    'RESET MASTER', binlog number will start from 1. But it is not happening
    because of the improper cleanup from the previous test
    binlog_mix_gtid_errors.test.  binlog_mix_gtid_errors.test is not doing
    a proper cleanup after it injected error during 'PURGE BINARY LOGS' command.
    
    Fix: Because of the inject error, binlog file is not purged but
    entry is removed from the index file. So delete the file
    manually during the cleanup of test binlog_mix_gtid_errors.test.

commit 12d8c72d9be8a21ca35100f34cff6a35672c1beb
Author: Dyre Tjeldvoll <Dyre.Tjeldvoll@oracle.com>
Date:   Wed Oct 11 11:14:57 2017 +0200

    BUG#26953043: Disable test temporarily
    
    (cherry picked from commit 971e3ca8ab9588993247a2848bbd6707d12f5369)

commit f31902ffedef6cba260e28074a4fa5615b242f34
Author: Magnus Blåudd <magnus.blaudd@oracle.com>
Date:   Wed Oct 11 11:09:56 2017 +0200

    WL#8500 Adapt MySQL Cluster to 8.0
    
     -remove unused ndbcluster_fill_is_table()

commit dd5944038439cc1db9f65c4bf2ed61b40fe61eb2
Author: Magnus Blåudd <magnus.blaudd@oracle.com>
Date:   Wed Oct 11 11:08:20 2017 +0200

    WL#8500 Adapt MySQL Cluster to 8.0
    
     - remove unnecessary ndb_log_exlusive_reads() and instead look at the
       sytem variable directly

commit 94e0649a48caa2e1e64c729b176df91432324558
Author: Marc Alff <marc.alff@oracle.com>
Date:   Wed Oct 11 10:41:03 2017 +0200

    Bug#17840780 PERFORMANCE_SCHEMA.SETUP_INSTRUMENTS* TESTS UNSTABLE ON PB2
    
    Improved the test perfschema.setup_instruments_default robustness.
    
    Do not restart the server from within a mtr test script,
    it makes the test slow and unstable under heavy load.

commit 1b3751a7c3c15400ee6fb629aa39b7816f302d49
Author: Allen Lai <zheng.lai@oracle.com>
Date:   Wed Oct 11 14:10:13 2017 +0800

    Fixed bug#25633175 MECAB PLUGIN FAILS TO LOAD ON WINDOWS
    
    We need to send proper parameter to Mecab::Createmodel.
    
    Approved by Bin Su <bin.x.su@oracle.com> on IM.

commit 24aa92b196310ef80aa9c5dd26d44ad04464c1f1
Author: Anitha Gopi <anitha.gopi@oracle.com>
Date:   Wed Oct 11 05:25:29 2017 +0200

    Revert "BUG#26406981: FLAG MISSING .RESULT FILE AS FAILED TEST"
    
    This reverts commit 9b6a13545ce0d73a13c02f6dd41fb11d29d32e40.

commit 8a2b8e6ac824ed7ea67d44e3cee97523de42fedb
Author: Anitha Gopi <anitha.gopi@oracle.com>
Date:   Wed Oct 11 05:24:57 2017 +0200

    Revert "BUG#26406981: FLAG MISSING .RESULT FILE AS FAILED TEST"
    
    This reverts commit a5e953c8144e490fd1492402cf0ea2a3cf0eca43.

commit 38f14328c9cfe17050c7c3cfdda260075dde482e
Author: Jimmy Yang <jimmy.yang@oracle.com>
Date:   Tue Oct 10 03:11:12 2017 +0200

    Fix bug #25339192 NEWDD: SERVER SHOULD DISALLOW FOREIGN KEYS ON BASE COLUMN
    OF STORED COLUMN
    
    Reviewed-by: Bin Su <bin.su@oracle.com>

commit a5e953c8144e490fd1492402cf0ea2a3cf0eca43
Author: Pavan Naik <pavan.naik@oracle.com>
Date:   Tue Oct 10 22:51:28 2017 +0530

    BUG#26406981: FLAG MISSING .RESULT FILE AS FAILED TEST
    
    Post-push fix.

commit 9b6a13545ce0d73a13c02f6dd41fb11d29d32e40
Author: Pavan Naik <pavan.naik@oracle.com>
Date:   Tue Oct 10 12:31:51 2017 +0530

    BUG#26406981: FLAG MISSING .RESULT FILE AS FAILED TEST
    
    Post push fix, enable check-testcase for tests sourcing
    'force_restart_if_skipped.inc' file and not getting skipped.
    
    Reviewed-by: Deepa Dixit <deepa.dixit@oracle.com>

commit 75d5a2a4be03c1bcd3f4a5397b1e320bc4a42efa
Merge: 4ef6fec e13ae14
Author: Joao Gramacho <joao.gramacho@oracle.com>
Date:   Tue Oct 10 16:40:19 2017 +0100

    Merge branch 'mysql-5.7' into mysql-8.0

commit e13ae14057d029b8da188bb9fe6a0230a06ff204
Author: Joao Gramacho <joao.gramacho@oracle.com>
Date:   Thu Sep 21 12:14:53 2017 +0100

    BUG#25585436 ASSERT `!RLI_DESCRIPTION_EVENT || IS_PARALLEL_EXEC()' AT
                 RPL_RLI.CC:2393
    
    Problem and Analysis
    --------------------
    
    The issues happen when the MTS coordinator is trying to determine which
    worker should handle a new transaction being scheduled that depends on
    a transaction still in progress in a worker because of MTS logical
    clock.
    
    If the worker fails to apply the transaction, instead of being
    notified that there was an error and the logical clock the coordinator
    was waiting will never be reached, the coordinator is assigning the
    transaction to itself before seen that an error happened.
    
    When the MTS coordinator becomes aware of the error, it has already
    scheduled (and applied) some events of the new transaction, messing with
    some of the cleanup logics.
    
    Requesting the MTS coordinator (STOP SLAVE) while it is applying a
    transaction that should be handled by workers are making debug binaries
    to hit the assert.
    
    Fix
    ---
    
    Make schedule_next_event return an error when a dependent transaction
    is aware of the failure of a transaction it was waiting on.

commit 4ef6fec79f9f186cc61559917dd775e5a7c1b270
Author: Chaithra Gopalareddy <chaithra.gopalareddy@oracle.com>
Date:   Tue Sep 5 11:51:26 2017 +0530

    Bug#26802696 DENSE_RANK WRONG WITH BUFFERED PROCESSING (follow-up)
    
    It turns out "Item_percent_rank" has the same logic error as
    "Item_rank", but we can fix this by taking advantage of the fact this
    is a two-pass window function, so we can inquire
    "Window::last_rowno_in_peerset()" instead of comparing with previous
    row (as is done for RANK and PERCENT_RANK) in the window function's
    own logic, since they are not two-pass. Aside: this was not done
    originally because the "last_rowno_in_peerset" state hadn't been
    introduced yet.
    
    With this patch, we now set "needs_peerset" to true in
    "Item_percent_rank::check_wf_semantics" and use
    "last_rowno_in_peerset()" to calculate the rank there by eliminating
    m_previous member.
    
    Change-Id: Ifa1d2d827fcbd4164234740c91f5058d8fcdfee0

commit dad2242c4fe49c30585cacf370769cbf8bee439c
Author: Dag Wanvik <dag.wanvik@oracle.com>
Date:   Thu Oct 5 17:26:31 2017 +0200

    Bug#26802696 DENSE_RANK WRONG WITH BUFFERED PROCESSING
    
    For the first row in a partition when we have buffering, we
    erroneously get values that are one too high. RANK has the same issue,
    but there is accidentally works correctly anyway.
    
    Analysis:
    
    The reason is that the initialization of the cache comparator of the
    ORDER BY happens too early. In streaming mode, we call clear (which
    resets the comparator) in Item_rank::val_int - which works fine because
    the values of the ORDER BY expressions is already available in the
    outbuffer (copy_fields has been done already).
    
    In buffered mode, however, the call to clear happens from
    process_buffered_windowing_record *before* copy_fields has been called
    as part of a general reset of window functions' states (when we start
    a partition).
    
    Solution:
    
    Split the state reset and the priming of the comparator, so
    that the latter always happens in Item_rank::val_int.
    
    Repro added.
    
    Change-Id: I8157ed96f2aca7a843ebf0a80364c75d52adef48

commit e94a846455eaf634ae07de78a89e6ef4840c4651
Author: Narendra Chauhan <narendra.chauhan@oracle.com>
Date:   Tue Oct 10 19:39:43 2017 +0530

    Bug#26945099 - RPL.RPL_REWRITE_DB_FILTER_COUNTER IS FAILING DUE TO RESULT CONTENT MISMATCH
    
    Description:
    Testcase is running query on performance_schema.replication_applier_filters
    to check for the "REPLICATE_REWRITE_DB" filters set. But, if any other
    filters related testcase (which have CRF command) gets executed before this
    testcase, then, that can create result content mismatch in this testcase.
    
    RB: 17594

commit 971b7cd0338bda98247354ba1ff54857070c4592
Author: Roy Lyseng <roy.lyseng@oracle.com>
Date:   Fri Oct 6 10:59:16 2017 +0200

    Bug#26542829: Assertion !(check_datetime_range(ltime)) failed
    
    The symptoms of this bug is sometimes an assertion, sometimes
    only a valgrind warning about "jump or move depends on uninitialised
    value" in do_copy_null(). The problem may occur when a derived table
    with an ORDER BY clause is merged into an outer query, when the columns
    from ORDER BY are not also referenced in outer query. The problem is
    due to missing to mark the column underlying "field2" in the read set
    of table t1.
    
    field2 is used in ORDER BY inside a derived table. field2 references
    a column from the SELECT list. But since fields from SELECT list
    in a derived table are not marked in the read_set when they are first
    resolved, we need to make sure those fields are marked when used for
    other purposes, such as in ORDER BY. Notice that we only want to
    mark columns when merging into an outermost query expression, and
    not into another derived table.
    
    Bug case is added to main.derived-no-prepared due to bug#26808862.

commit 161ecff95259a3bfb20a6e66e65c8baf9a94c628
Merge: 1af47ef 730baca
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Tue Oct 10 12:54:31 2017 +0200

    NULL Merge branch 'mysql-5.7' into mysql-8.0

commit 1af47ef793f9992211b562cbe9cb2365dac28d9e
Author: Dyre Tjeldvoll <Dyre.Tjeldvoll@oracle.com>
Date:   Tue Oct 10 10:43:01 2017 +0200

    Bug#26919378: ASSERTION `HA_THD() == NULLPTR || M_PREBUILT->TRX != THD_TO_TRX(HA_THD()) || M_P
    
    Problem: Assert added for bug#26126789 gave false positives.
    
    Solution: Remove assert.
    (cherry picked from commit ed05c722d9189f53b22534b6d0e4aa8aff9feefd)

commit 730baca1c0b6ea63fd79aec0536e9e1937837926
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Fri Oct 6 10:02:40 2017 +0200

    Backport libutils.cmake parts of 26562464: ONE DEFINITION RULE VIOLATIONS
    
    This ensures that all externally visible symbols in libmysqlclient.so
    are exported with correct type, rather than as an array of (void*)
    functions.
    
    Also:
     - fix a typo in libmysql/CMakeLists.txt libmysql_link_flag/libmysql_link_flags
     - similar typo in libmysqld/CMakeLists.txt
     - add libmysql_api_test POST_BUILD target, to verify that all symbols are exported.
    
    Change-Id: If92e6a7102004fc929f065e78fd35117ed56ceb0

commit 6a7ddc17d8674697e49c65ba75f13efb59a53f28
Author: Abhishek Ranjan <abhishek.ar.ranjan@oracle.com>
Date:   Tue Oct 10 01:28:24 2017 +0530

    Bug#26636238 : ERROR/INPLACE UPGRADE TO READ-ONLY 8.0: PERFORMANCE SCHEMA INITIALIZATION FAILED
    
    Post push fix:
    perfschema.init_pfs_from_dd fails on the ASAN build. The reason for
    failure is that server restart returns different error code than
    expected.
    
    The failure is due to an existing bug in the innodb initialization.
    If InnoDB is partially initialized and it encounters an error, InnoDB
    does not do proper cleanup required. In the test case, InnoDB is
    started with --innodb-read-only option and encounters error while trying
    to resize the log files. The default value for innodb_log_file_size
    is different in mysqld and mtr.
    
    Fix the test case by supplying the same value of innodb_log_file_size
    while restarting the server with which log files were created.

commit 240bfe9710904e87c699ba4f6df7b6e792da8267
Merge: 2f5f2d9 396f7fb
Author: Lars Tangvald <lars.tangvald@oracle.com>
Date:   Tue Oct 10 10:46:45 2017 +0200

    Merge branch 'mysql-5.7' into mysql-8.0

commit 396f7fbde5ad83f082f9bc888c28263f3636c364
Merge: 14eecf2 5a0a832
Author: Lars Tangvald <lars.tangvald@oracle.com>
Date:   Tue Oct 10 10:46:26 2017 +0200

    Merge branch 'mysql-5.6' into mysql-5.7

commit 5a0a83243a6aecbdc694fb63b1c0b3832c0111ee
Author: Lars Tangvald <lars.tangvald@oracle.com>
Date:   Wed Sep 13 08:13:49 2017 +0200

    Deb packaging: Add support for Ubuntu 17.10 (Artful)

commit 2f5f2d9743d383213a749ae198df3e7c73103709
Author: Havard Dybvik <havard.dybvik@oracle.com>
Date:   Tue Oct 10 10:11:08 2017 +0200

    Bug#25123839: LEAST AND GREATEST MAKES INCONSISTENT DATA TYPES, COMPARED TO UNION AND COALESCE
    
    Post-push fix.
    
    Update failing tests.

commit 2e1049e2c30fdaf756c7389112ab356a2bd9e63d
Author: Thayumanavar S <thayumanavar.x.sachithanantha@oracle.com>
Date:   Tue Oct 10 09:16:23 2017 +0200

    BUG#26710081 - EVENTS_TRANSACTIONS_CURRENT:GTRID IS NOT
                   PROPERLY DISPLAYED.
    
    Incorrect value of XID_GTRID is reported in the
    perfschema.events_transactions_current_table for XA transactions.
    This happens because if an statement in the XA transaction results
    in creating an attachable transaction as part of it's internal operation in
    querying the Data Dictionary table. The attachable transaction result in
    creating an PSI transaction handle which resets the already created transaction
    locker object in PFS.
    The fix is not to create the transaction locker object in PFS thereby not
    recording the transaction related counters for attachable transaction.
    The result files of MTR test files corresponding to transaction events
    now are similar as in MySQL 5.7. Bug# 26936457 will record attachable
    transaction events as a nested event of the master transaction in PFS.
    Certain counters like IO waits and table waits that occur as part of
    attachable transaction shall be associated with the main transaction events.

commit 8fa9bf5f1c9b6e8a25efcdcabba8f9bf178ca8eb
Author: Deepthi ES <deepthi.e.s@oracle.com>
Date:   Tue Oct 10 12:29:44 2017 +0530

    Bug#26762989 : RPL.RPL_SLAVE_STATUS FAILS ON PB2 SPORADICALLY
    
    Problem:
    Test was checking if cache from slave is also cleaned without ensuring that
    'FLUSH PRIVILIGES' command executed on master is replicated and synced on slave
    
    Solution:
    Included 'sync_slave_sql_with_master.inc' before checking that FLUSH PRIVILEGE
    is propagated and cache from slave is also cleaned.

commit c9d17aac64fb7942e211c7e60d0253e97c588e0e
Merge: 7737de7 14eecf2
Author: Sreeharsha Ramanavarapu <sreeharsha.ramanavarapu@oracle.com>
Date:   Tue Oct 10 12:16:09 2017 +0530

    Merge branch 'mysql-5.7' into mysql-8.0

commit 14eecf28669ca6945522d77c4045856c9d29fd74
Author: Sreeharsha Ramanavarapu <sreeharsha.ramanavarapu@oracle.com>
Date:   Tue Oct 10 12:14:50 2017 +0530

    Bug #26251621: INCORRECT BEHAVIOR WITH TRIGGER AND GCOL
    
    Post-push fix.
    
    Embedded doesn't have sha2.

commit 7737de736d902d97192e05da0c1ec81d27bbdc00
Merge: accba9b e30b5a5
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Tue Oct 10 07:34:30 2017 +0200

    NULL Merge branch 'mysql-5.7' into mysql-8.0

commit e30b5a54149933eca6fce1e3ba597a729160471f
Merge: e77b4fc ab8a32b
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Tue Oct 10 07:34:01 2017 +0200

    NULL Merge branch 'mysql-5.6' into mysql-5.7

commit ab8a32bf0659e51e847109d26b90b00b5c14f32b
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Mon Oct 9 16:15:29 2017 +0200

    Backport patch for Bug#16877045 5.6-CLUSTER-7.3 WIN32 SQL_YACC.CC BUILD PROBLEM
    
    Building with ninja shows the problem:
    cmake .. -G Ninja
    ninja
    ninja: error: dependency cycle: sql/GenServerSource -> sql/CMakeFiles/GenServerSource -> sql/sql_builtin.cc -> cmake_order_depends_target_sql -> sql/GenServerSource
    
    Bug#16877045 5.6-CLUSTER-7.3 WIN32 SQL_YACC.CC BUILD PROBLEM
     - Somewhat circular dependency caused by the configured files sql_builtin.cc  being included as
        part of the files to generate in sql/
     - Move sql_builtin.cc out of GEN_SOURCES variable.
     - Create new variable CONF_SOURCES to be used for configured files.
     - Fix minor out of source build problem where the generated  libmysql.ver wasn't found
    
    Also:
    zero-initialize a couple of stack variables, to avoid 'may be uninitialized' warnings

commit accba9b00fb2aa89a2e15a6a293752295a03b029
Merge: 2b05bd3 e77b4fc
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Tue Oct 10 07:21:48 2017 +0200

    NULL Merge branch 'mysql-5.7' into mysql-8.0

commit e77b4fc263845dbff100b13616124ebe1e599e87
Merge: f8bddba f0c4b9c
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Tue Oct 10 07:21:22 2017 +0200

    NULL Merge branch 'mysql-5.6' into mysql-5.7

commit f0c4b9cbc52b8165382069a701973895d5f90e62
Merge: 9236f35 4ac23b2
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Tue Oct 10 07:20:42 2017 +0200

    NULL Merge branch 'mysql-5.5' into mysql-5.6

commit 2b05bd3c6275fccc9b5c0e6bbda89cfaa1a483f6
Merge: e76067e f8bddba
Author: Aakanksha Verma <aakanksha.verma@oracle.com>
Date:   Tue Oct 10 10:35:34 2017 +0530

    Null Merge branch 'mysql-5.7' into mysql-8.0

commit f8bddba56012094341be27590b27277427ecfa10
Author: Aakanksha Verma <aakanksha.verma@oracle.com>
Date:   Tue Oct 10 10:33:06 2017 +0530

    Bug #26390658   RENAMING A PARTITIONED TABLE DOES NOT UPDATE
    		MYSQL.INNODB_TABLE_STATS.
    
    PROBLEM
    
    While renaming table that has partitions , table stats don't get updated
    with renamed parition names.
    Renaming of a partitioned table in 5.7 is done as part of normal
    ha_innobase::rename_table and hence after the partitioned tables are
    renamed they are not correctly updated to the stats table since table
    name fed to the rename stats table function is only the original table
    and not the new names of the partition.
    
    FIX
    
    Have made a call to update the table statistics after each rename of
    partitioned table happens.
    
    Reviewed by: bin su<bin.x.su@oracle.com>
    RB: 17444

commit 726165be450f9ba041cf7ccd00d38763bfc68e70
Author: John David Duncan <john.duncan@oracle.com>
Date:   Mon Oct 9 20:26:10 2017 -0700

    Fix CMake failure in storage/ndb/src on Mac OS X by checking for empty list before filtering out duplicates.

commit e76067e65c9ec05a7aee787fd6701674902c44a1
Author: Bin Su <bin.x.su@oracle.com>
Date:   Tue Oct 10 09:18:39 2017 +0800

    Bug#25953183 - I_LARGE_TESTS.PARTITION_BIG_INNODB IS NOT MORE WORKING AS EXPECTED.
    
    This bug could be a regression of meta-sync push, however, after WL#9536,
    it should be fixed. I could verify this bug has also been fixed after
    the fix of bug#26589535 has been pushed. The only change for current bug
    is that the result file needs some adjustment and the test case can be
    re-enabled.
    
    RB: 17577
    Reviewed by: Jimmy Yang <jimmy.yang@oracle.com>

commit 008e803cf45200351612d2cb6d23e8afb221b4ee
Author: Martin Sköld <Martin.Skold@oracle.com>
Date:   Mon Oct 9 23:56:19 2017 +0200

    Bug#14845851 MYSQL CLUSTER - AUTO INCREMENT NOT RESET WHEN TRUNCATE NON-BINLOGGING SQL NODES
    
    Removed reference to missing not_embedded.inc in test case

commit 6f0f48ad402ca38dfcd362b44fff1cd72143c2bc
Merge: 9dae5d5 609c77d
Author: John David Duncan <john.duncan@oracle.com>
Date:   Mon Oct 9 11:41:48 2017 -0700

    Merge branch 'mysql-5.7-cluster-7.6' into mysql-8.0-cluster-8.0

commit 609c77d492f8812eec31f9ee4ba02daaedf8b166
Author: John David Duncan <john.duncan@oracle.com>
Date:   Mon Oct 9 11:40:23 2017 -0700

    NDB nodejs code: remove workaround for bug briefly introduced by wl#10234 patches.

commit 39bd901d3d9c33d16b415c4c9c4fa1d9fe2777a5
Author: John David Duncan <john.duncan@oracle.com>
Date:   Tue Jul 11 12:57:58 2017 -0700

    wl#10234: add legacy API for backwards & binary compatibility

commit 9dae5d58bef158af3827bb5e77a2bc96a145d0de
Merge: 4fcce59 ec105da
Author: Martin Sköld <Martin.Skold@oracle.com>
Date:   Mon Oct 9 19:35:08 2017 +0200

    Merge branch 'mysql-5.7-cluster-7.6' into mysql-8.0-cluster-8.0

commit ec105da10faa5854fb5ebc46274f9942e736674a
Merge: b6b333e 30ca54c
Author: Martin Sköld <Martin.Skold@oracle.com>
Date:   Mon Oct 9 19:34:29 2017 +0200

    Merge branch 'mysql-5.7-cluster-7.5' into mysql-5.7-cluster-7.6

commit 30ca54c8176d90d5422dc142408abdcfdc266d7e
Merge: bcd8066 bc55cb1
Author: Martin Sköld <Martin.Skold@oracle.com>
Date:   Mon Oct 9 19:33:43 2017 +0200

    Merge branch 'mysql-5.6-cluster-7.4' into mysql-5.7-cluster-7.5

commit bc55cb181196c3573f09f0a42e8b233b6928773d
Merge: 23a246f 7f2a624
Author: Martin Sköld <Martin.Skold@oracle.com>
Date:   Mon Oct 9 19:33:04 2017 +0200

    Merge branch 'mysql-5.6-cluster-7.3' into mysql-5.6-cluster-7.4

commit 7f2a6240945901c8452a19226861252ea7a67ed8
Merge: 66ecce3 3c48849
Author: Martin Sköld <Martin.Skold@oracle.com>
Date:   Mon Oct 9 19:32:38 2017 +0200

    Merge branch 'mysql-5.5-cluster-7.2' into mysql-5.6-cluster-7.3

commit 3c48849ef900ccb9bb87d33382b3c7ed2a45ad54
Author: Martin Sköld <Martin.Skold@oracle.com>
Date:   Mon Oct 9 19:30:40 2017 +0200

    Bug#14845851 MYSQL CLUSTER - AUTO INCREMENT NOT RESET WHEN TRUNCATE NON-BINLOGGING SQL NODES
    
    Added suppression of log warning in test case

commit 93137d4b99077e17e11bde19b00c4a451fb51973
Author: Havard Dybvik <havard.dybvik@oracle.com>
Date:   Tue Mar 21 12:46:31 2017 +0100

    Bug#25123839: LEAST AND GREATEST MAKES INCONSISTENT DATA TYPES, COMPARED TO UNION AND COALESCE
    
    Resolving of result type in LEAST/GREATEST and UNION is now done using
    the same logic as in COALESCE by passing all arguments to
    Item::aggregate_type().
    
    This change affects how the arguments to LEAST/GREATEST are compared and
    consequently the output. Previously, comparisons sometimes depended on
    the "context" in which the output would be used. For example,
    LEAST("11","2") would compare the arguments as strings and return "11",
    whereas LEAST("11", "2") + 0 would compare the arguments as integers and
    return 2 due to the output being used in an "integer context".
    
    There exists, however, at this time no clear definition of what a
    "string context", "integer context", etc. is. It has therefore been
    decided to drop the "context" term.
    
    The arguments are now compared depending only on the result type from
    the function itself. The result from LEAST("11", "2") will thus always
    be "11", leading to a more deterministic behavior. It is the actual
    result from this comparison that is converted to any required output
    type, such as an integer.

commit 5762c1e3b73bcdec290157e19dbed3053ec9beaf
Author: Havard Dybvik <havard.dybvik@oracle.com>
Date:   Tue Mar 21 12:46:30 2017 +0100

    Bug#25123839: LEAST AND GREATEST MAKES INCONSISTENT DATA TYPES, COMPARED TO UNION AND COALESCE
    
    Add tests showing derived data types by UNION, COALESCE, and
    LEAST/GREATEST.

commit 4ac23b28408209c149a673e6b0c3e264c4da8faa
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Mon Oct 9 16:24:11 2017 +0200

    Backport patch for Bug#16877045 5.6-CLUSTER-7.3 WIN32 SQL_YACC.CC BUILD PROBLEM
    
    Building with ninja shows the problem:
    cmake .. -G Ninja
    ninja
    ninja: error: dependency cycle: sql/GenServerSource -> sql/CMakeFiles/GenServerSource -> sql/sql_builtin.cc -> cmake_order_depends_target_sq
     sql/GenServerSource
    
    Bug#16877045 5.6-CLUSTER-7.3 WIN32 SQL_YACC.CC BUILD PROBLEM
     - Somewhat circular dependency caused by the configured files sql_builtin.cc  being included as
        part of the files to generate in sql/
     - Move sql_builtin.cc out of GEN_SOURCES variable.
     - Create new variable CONF_SOURCES to be used for configured files.

commit 4fcce599a83a87024ea91c072374787b2db2ef1e
Merge: d84df39 b6b333e
Author: Martin Sköld <Martin.Skold@oracle.com>
Date:   Mon Oct 9 16:04:30 2017 +0200

    Merge branch 'mysql-5.7-cluster-7.6' into mysql-8.0-cluster-8.0

commit b6b333ecbf15e7e37c324dbc583c2ae96f5550c9
Merge: 1b05fda bcd8066
Author: Martin Sköld <Martin.Skold@oracle.com>
Date:   Mon Oct 9 16:03:30 2017 +0200

    Merge branch 'mysql-5.7-cluster-7.5' into mysql-5.7-cluster-7.6

commit bcd8066c5f158e61455a947666e786bb186fca00
Merge: ef48dcb 23a246f
Author: Martin Sköld <Martin.Skold@oracle.com>
Date:   Mon Oct 9 16:02:44 2017 +0200

    Merge branch 'mysql-5.6-cluster-7.4' into mysql-5.7-cluster-7.5

commit 23a246f381732caba77c3a18d90240307f7e8239
Merge: 3f908eb 66ecce3
Author: Martin Sköld <Martin.Skold@oracle.com>
Date:   Mon Oct 9 16:02:06 2017 +0200

    Merge branch 'mysql-5.6-cluster-7.3' into mysql-5.6-cluster-7.4

commit 66ecce3e9c0e36770d3de4160515663f6ad6fbc1
Merge: 8f7d0dd d79a52e
Author: Martin Sköld <Martin.Skold@oracle.com>
Date:   Mon Oct 9 16:01:28 2017 +0200

    Merge branch 'mysql-5.5-cluster-7.2' into mysql-5.6-cluster-7.3

commit d79a52e21a8228f6a41dadc74913580b39d4e3ce
Author: Martin Sköld <Martin.Skold@oracle.com>
Date:   Mon Oct 9 16:00:27 2017 +0200

    Fixed number of servers

commit d84df39ad5800ada919c93e95ba6105ece1c5c57
Merge: 1778af8 1b05fda
Author: Martin Sköld <Martin.Skold@oracle.com>
Date:   Mon Oct 9 15:15:16 2017 +0200

    Merge branch 'mysql-5.7-cluster-7.6' into mysql-8.0-cluster-8.0

commit 1a3330c17e28cc20c2835c0adcde26f31a9822f6
Author: Dmitry Lenev <dmitry.lenev@oracle.com>
Date:   Mon Oct 9 15:26:22 2017 +0300

    Follow-up to Bug#26647340 "LIFT LIMITATION ON ALTER TABLE RENAME + TABLES WITH FOREIGN KEYS + LOCK TABLES".
    
    Adjusted main.merge test to reflect that ALTER TABLE ... RENAME is
    now allowed under LOCK TABLES.

commit b49807ee5b91e59e9d83ba7e59c2bb8a67975df7
Author: Marc Alff <marc.alff@oracle.com>
Date:   Mon Oct 9 14:47:14 2017 +0200

    Bug#26934782 WRONG SESSION_TRACK_SCHEMA DESCRIPTION DOXYGEN DOCUMENTATION
    
    Fixed the Doxygen documentation for SESSION_TRACK_SCHEMA.

commit 1b05fdaf235c5f927ef67630b7208a9c18511629
Merge: 07e0177 ef48dcb
Author: Martin Sköld <Martin.Skold@oracle.com>
Date:   Mon Oct 9 12:39:43 2017 +0200

    Merge branch 'mysql-5.7-cluster-7.5' into mysql-5.7-cluster-7.6

commit ef48dcbb50e205c3ef3c3edbf305ba1678977703
Author: Martin Sköld <Martin.Skold@oracle.com>
Date:   Mon Oct 9 12:39:02 2017 +0200

    Fixed number of servers

commit a92d1e120471baa5bfeda8fdff8e11fbbae81d33
Merge: be86b89 3f908eb
Author: Martin Sköld <Martin.Skold@oracle.com>
Date:   Mon Oct 9 12:36:50 2017 +0200

    Merge branch 'mysql-5.6-cluster-7.4' into mysql-5.7-cluster-7.5

commit 45d8f7fa2b23ae34dfc57b4b18d5e025acde5d1b
Merge: 916447d 3b5243e
Author: Arun Kuruvila <arun.kuruvila@oracle.com>
Date:   Mon Oct 9 16:00:54 2017 +0530

    Merge branch 'mysql-5.7' into mysql-8.0

commit 3b5243e4586baeb395d696360aaad4437912152a
Author: Arun Kuruvila <arun.kuruvila@oracle.com>
Date:   Mon Oct 9 15:57:22 2017 +0530

    Bug#26529942: NON-DEFAULT UMASK AND UMASK_DIR HAS NO EFFECT
                  IN MYSQL 5.7
    
    Description: Mysql server is not respecting the values of
    the environment variables, UMASK and UMASK_DIR.
    
    Analysis: As per the mysql documentation, if UMASK is set,
    mysqld uses ($UMASK | 0600) as the mode for file creation.
    Similarly if UMASK_DIR is set, mysqld uses ($UMASK_DIR |
    0700) as the base mode for directory creation. But the
    function "my_init()" is not setting the variables 'my_umask'
    and 'my_umask_dir' correctly if the environment variables,
    UMASK and UMASK_DIR is set.
    
    Fix: Variables, 'my_umask and 'my_umask_dir' are correctly
    set as per the mysql documentation.

commit 3f908eb2d6dd64967223d870bff1acded62457ea
Merge: f3824da 8f7d0dd
Author: Martin Sköld <Martin.Skold@oracle.com>
Date:   Mon Oct 9 10:05:44 2017 +0200

    Merge branch 'mysql-5.6-cluster-7.3' into mysql-5.6-cluster-7.4

commit 916447dece6ed2c5382ceaf6b2cf95159b9091ed
Author: Magnus Blåudd <magnus.blaudd@oracle.com>
Date:   Tue Sep 26 10:25:16 2017 +0200

    Bug#26867488 SERIALIZED METADATA IMPORT' FEATURE NEED MYSQL BUILT WITH
    WL#7069
    
     - problem when discovering table from SE since codepath to install
       table definition into data dictionary has been disabled by WL#7069
     - fix by allowing the SE to install the table into data dictionary
       itself, indicated by returning no sdi_blob from ha_discover()

commit 8f7d0dd903e6feabecb6ba43f3edd6c1290448f5
Merge: a7ac4a4 3608f7d
Author: Martin Sköld <Martin.Skold@oracle.com>
Date:   Mon Oct 9 09:32:06 2017 +0200

    Merge branch 'mysql-5.5-cluster-7.2' into mysql-5.6-cluster-7.3

commit 3608f7d65de12d1ea5ec0f9885b3b7adef13f019
Author: Martin Sköld <Martin.Skold@oracle.com>
Date:   Mon Oct 9 09:21:58 2017 +0200

    Bug#14845851 MYSQL CLUSTER - AUTO INCREMENT NOT RESET WHEN TRUNCATE NON-BINLOGGING SQL NODES
    
    When the injector_thread handles a remote truncate it must reset any shared auto_increment
    pre-fetch range. If the global table object is dropped and recreated then the new table instance
    might otherwise incorrectly see the old auto_increment range. Thus can occur if the mysqld
    is not writing the binlog since it then will not handle drop table events for the Ndb table
    being dropped and re-created as part of the truncate operation.
    Added a new test case that tests this scenario.

commit c0d544bdb33d9436673173e88fec68043ad4775c
Author: Chaithra Gopalareddy <chaithra.gopalareddy@oracle.com>
Date:   Mon Oct 9 12:49:14 2017 +0530

    Bug #26739028: WINDOW FUNC + FROM_UNIXTIME CRASH
    
    Problem:
    "null_value" is not set correctly as Item_lead_lag::compute() does not have a
    way to return any value. Because of which a decimal_buffer with no valid
    data is accessed and server exits.
    
    Solution:
    Re-write compute function in Item_lead_lag, Item_first_last_value and
    Item_nth_value to return true if null_value is set or if there is an error.

commit 9233a9a26d6f3b6ac24c76edfcf7b45b46b2bd86
Author: Bin Su <bin.x.su@oracle.com>
Date:   Mon Oct 9 09:03:05 2017 +0800

    Bug#26589535 - CHECK REDO LOG MARGIN FOR WRITING BACK METADAT TO INNODB_DYNAMIC_METADATA
    
    The main problem is that the write-back of dynamic metadata which will
    also generate redo logs happens on checkpoint, when the redo log room
    could be already not enough. Once this happens, the write-back would
    issue a new log_checkpoint too, thus the recursive log_checkpoint
    and write-back of dynamic metadata.
    
    To solve this as much as possible, when checking for redo log margin,
    the redo logs for current dynamic metadata,  which hasn't been written back,
    should be also considered. It's not easy to get a precise margin,
    so a rough estimated margin is also acceptable.
    The new margin considers the dynamic metadata update or insert itself,
    plusing the potential page splits from the clustered index of
    innodb_dynamic_metadata.
    
    This margin should be checked in both log_free_check() and mtr commits.
    Furthermore, log_free_check() should also be done periodically for
    DDL log updates.
    
    This patch also fixes the problem on redo log resize. If it's in read-only
    mode, there is no need to open innodb_dynamic_metadata for writing back
    metadata from redo log.
    
    RB:17483
    Reviewed by: Jimmy Yang <jimmy.yang@oracle.com>

commit f21947aa91d3f98d87781f3a35c4c430cf9b2b6d
Merge: 6228d69 58c0edb
Author: Sreeharsha Ramanavarapu <sreeharsha.ramanavarapu@oracle.com>
Date:   Sat Oct 7 07:30:07 2017 +0530

    Merge branch 'mysql-5.7' into mysql-8.0

commit 58c0edbc70b081c383dd75da6a5f603f794b790d
Author: Sreeharsha Ramanavarapu <sreeharsha.ramanavarapu@oracle.com>
Date:   Sat Oct 7 07:27:35 2017 +0530

    Bug #26251621: INCORRECT BEHAVIOR WITH TRIGGER AND GCOL
    
    Issue:
    ------
    This problem occurs under the following conditions:
    1) Table t2 has a virtual generated column with a certain
       string function.
    2) Table t1 has an AFTER INSERT trigger on table t2. It
       contains multiple statements, some unrelated to t2.
    3) While inserting into t1, the trigger fails (due to a
       legitimate error).
    4) Try to insert into table t2 and this can result in
       incorrect behavior.
    
    Root cause
    ----------
    Step 3 performs open_table for both tables t1 and t2 (since
    t2 is part of the trigger). Due to an error, this step is
    interrupted and the relevant tables are closed.
    
        if (thd->locked_tables_mode <= LTM_LOCK_TABLES ||
            table->query_id == thd->query_id)
        {
          DBUG_ASSERT(table->file);
          if (table->db_stat)
            table->file->extra(HA_EXTRA_DETACH_CHILDREN);
          table->cleanup_gc_items();
          ....
        }
    
    Here cleanup_gc_items() is called for table t1 because
    query_id is matching. But cleanup_gc_items() is never
    called for t2, since the query_id doesn't match and
    the table is in LTM_PRELOCKED mode.
    
    While closing the tables it is necessary to specifically
    call cleanup_gc_items(). Failure to call this function will
    leave the generated column's expression marked as fixed,
    while the related table object has been closed.
    
    In Step 4 the generated column's expression is considered
    as fixed (even when it isn't) and can result in incorrect
    behavior.
    
    Solution:
    ---------
    Stored Functions (SF) and triggers open all the tables
    involved at the beginning. If refix_gc_items is allowed for
    all the tables at the beginning of an SF and it exits due
    to an error during execution, cleanup_gc_items() for all
    the tables in the subsequent statements will not be called.
    
    refix_gc_items should be called only when table is directly
    used by the statement or substatement (i.e. right before
    the relevant substatement is going to be executed).

commit 6228d69199943a5dad34cba8f54b1e8c7198c276
Merge: 9d6b940 5739282
Author: Kevin Lewis <kevin.lewis@oracle.com>
Date:   Fri Oct 6 16:18:21 2017 -0700

    Merge branch 'mysql-5.7' into mysql-8.0

commit 573928259c8b181558e4d0d97f8e1837a00a0d2b
Author: Kevin Lewis <kevin.lewis@oracle.com>
Date:   Wed Aug 16 17:05:50 2017 -0700

    WL#10473: InnoDB: Deprecate innodb_undo_tablespaces in 5.7
    
    This setting is a global read-only variable, command line only,
    so it does not have any user interface other than its description.
    It must be mostly deprecated in the documentation.

commit 9d6b94017e1f7e3d2fdfdf1fdabd5c0de07e4faf
Author: Abhishek Ranjan <abhishek.ar.ranjan@oracle.com>
Date:   Fri Oct 6 00:32:31 2017 +0530

    Bug#26203731 : INFORMATION_SCHEMA.TABLES TABLE STATISTICS ARE NULL
    
    Post push fix:
    main.heap_hash fails on 32 bit build with result content mismatch
    for cardinality.
    
    The cardinality is calculated by formula (records / records_per_key).
    The result of the above calculation gives different value due to
    difference in float point number representation in 32bit and 64bit CPU.
    
    Fix the number of rows in the table to get consistent value for index
    cardinality in the test case.

commit 39e15f1714697b19a088c321826fde027953a7fe
Merge: a9fd503 da9eeea
Author: Venkatesh Duggirala <venkatesh.duggirala@oracle.com>
Date:   Fri Oct 6 19:32:53 2017 +0530

    Merge branch 'mysql-5.7' into mysql-8.0

commit da9eeea6dfe8bd95aec036232b898314ca2dcc97
Author: Venkatesh Duggirala <venkatesh.duggirala@oracle.com>
Date:   Fri Oct 6 19:32:29 2017 +0530

    Bug#25656123	MEMORY LEAK IN MASTER-MASTER GTID REPLICATION
    WITH SYNC_RELAY_LOG_INFO
    
    Post push fix:
    Fixing valgrind pb2 failure issue by
    1) Adjusting the data load
    2) Adding syncs before the asserts checks.

commit a9fd503dc74d4f567e0dcca899611c6f2a7580d0
Merge: aabb78e c306034
Author: Knut Anders Hatlen <knut.hatlen@oracle.com>
Date:   Fri Oct 6 14:34:37 2017 +0200

    Merge branch 'mysql-5.7' into mysql-8.0

commit aabb78e3b36cc55d31dd6f517d3616ffb49d9c53
Author: Dyre Tjeldvoll <Dyre.Tjeldvoll@oracle.com>
Date:   Fri Oct 6 12:56:22 2017 +0200

    Bug#26898576: --SYMBOLIC-LINKS/-S' IS DEPRECATED MESSAGE SHOULD BE MORE HELPFUL
    
    Problem: Since the symbolic links option is deprecated, a warning was
    printed whenever it was used. But since its use has previously been
    discouraged, many users disable it explicitly, and they are given the
    same warning.
    
    Fix: Adjust the warning to inform users that the option is disabled by
    default when it is being disabled explicitly. Issue a normal
    deprecation warning when the option is being enabled.
    
    Also move the test for !opt_help before the call to my_setwd() for
    datadir. This prevents an warning about missing datadir from being
    printed when executing --help without a valid datadir.
    
    (cherry picked from commit 005487f647472283e030c87b226c34d8aa1198d1)

commit facf4953d33cc754dc4a301c7c9b4debc9cff24f
Author: Marc Alff <marc.alff@oracle.com>
Date:   Wed Oct 4 09:30:41 2017 +0200

    Bug#26897738 PERFORMANCE SCHEMA SERVICES HEADERS DEPENDENCY ON MY_CONFIG.H
    
    Before this fix,
    performance schema related header files from
      mysql/components/services/
    would indirectly include
      include/my_config.h
    
    This dependency is not allowed,
    as it makes public (and installed) service headers
    dependent on private (and not installed)
    server build configuration headers.
    
    The fix is to re organize and clean up header files
    for performance schema services as follows:
    
    1) Do not use "ulonglong" and similar convenience types
    provided by "my_inttypes.h",
    use plain "unsigned long long" instead.
    
    2) Do not use "my_macro.h" and C_MODE_START (aka, extern "C").
    The point of a service is to not export functions anyway,
    so the extern "C" is never needed.
    
    3) Move fragments of "my_thread.h" into
      mysql/components/services/my_thread_bits.h,
    to define basic types related to threads.
    
    4) Move fragments of "my_io.h" into
      mysql/components/services/my_io_bits.h,
    to define basic types related to file and socket I/O.
    
    With these changes, performance schema service headers are self contained,
    without dependencies on non installed headers.

commit c306034e790ca25f4eb3f6ac3e38b97c10d38f6f
Author: Knut Anders Hatlen <knut.hatlen@oracle.com>
Date:   Tue Sep 12 08:57:14 2017 +0200

    Bug#26780307: INCONSISTENT JSON ESCAPING WHEN USING JSON TYPE
    
    The JSON specification says that all control characters from U+0000 to
    U+001F need to be escaped, but when MySQL shows JSON data as text, it
    does not escape the character U+001F.
    
    The fix is to escape all characters less than or equal to 0x1f.
    Previously it only escaped those less than 0x1f.
    
    This is a partial backport of bug#26388690.
    
    Change-Id: Ia9b4e6653057ac817ab0ca2e0f9c1895ad0f637e

commit 1778af8c29e7fe55bb8b41512bf0a362b3f2047c
Author: Magnus Blåudd <magnus.blaudd@oracle.com>
Date:   Fri Oct 6 09:04:44 2017 +0200

    WL#8500 Adapt MySQL Cluster to 8.0
    
     - supress warning about loosing connection to cluster also
       for second server
     - rewrite parsing of node_id to avoid using sever side variables
       and thus roundtrips ans additional code
     - move have_binlog_format_mixed_or_row.inc first as there is no point
       in seting up connections (as done by have_multi_ndb.inc) otherwise

commit 93e50fa984adc9b418c4bcf977390ce0ccb7f9e5
Author: Magnus Blåudd <magnus.blaudd@oracle.com>
Date:   Thu Oct 5 15:35:56 2017 +0200

    WL#9185 MySQL Cluster support for new DD
    
     - revert workaround for problem with storing
       the NDB tables id in se_private_id property of
       dd::Table

commit 561d56ad67157f1d50b64214777077fc8f80b6db
Author: Magnus Blåudd <magnus.blaudd@oracle.com>
Date:   Thu Oct 5 15:08:32 2017 +0200

    WL#8500 Adapt MySQL Cluster to 8.0
    
     - remove remnants of embedded server from have_multi_ndb.inc
     - remove cleanup section from have_multi_ndb.inc, should never be
       necessary with modern mtr
     - cleanup have_ndb.inc, the information_schema.engines table can be
       expected to always exist
     - remove setting of NDB_BACKUPS as that is already done in have_ndb.inc

commit ff4315f1207d4ec3cde178e238c6174b94fb7173
Author: Magnus Blåudd <magnus.blaudd@oracle.com>
Date:   Thu Oct 5 14:21:03 2017 +0200

    WL#8500 Adapt MySQL Cluster to 8.0
    
     - problem with tests verifying that the DD is consistent between
       MySQL Server's. Tests are using information_schema queries which
       caches table statistics.
     - fix by turning off caching to make sure that statistics is fetched
       from SE every time

commit 076b576b3b0f819ce9ac2629754b58c13554231e
Author: Magnus Blåudd <magnus.blaudd@oracle.com>
Date:   Thu Oct 5 14:19:19 2017 +0200

    WL#9185 MySQL Cluster support for new DD
    
     - problem with rename not writing the proper NDB table id and version
       to the DD on participants.
     - fix by reading the table id and version from NDB before renaming
       the table on participant. The read is done using the new db and
       table name, certainly it would be  better if these parameters where
       passed over in the schem distribution protocol, but this works until
       that can be done.

commit 2a6afa73d8a326187e7b3db0db794d37ec3236fa
Author: Magnus Blåudd <magnus.blaudd@oracle.com>
Date:   Tue Oct 3 13:54:04 2017 +0200

    WL#9185 MySQL Cluster support for new DD
    
      - problem with copying alter table which
        fails while copying data, causing the temporary named destination table
        to be left in NDB. Need to rewrite copying alter table code path to
        drop temprary tables in order to be "atomic ddl" compliant.
      - disable ndb_fk_no_fk, ndb_fk_db and ndb_dd_alter that fails after running an
        ALTER which is aborted in the middle

commit c48830757447f36748a69d9a4e0000027ac1921f
Author: Magnus Blåudd <magnus.blaudd@oracle.com>
Date:   Mon Oct 2 10:43:27 2017 +0200

    WL#9185 MySQL Cluster support for new DD
    
     - remove some intermediate variables which are easily deduced
       by looking at current sql command

commit 085d23de1a7d51bf591dda390cf3fa7f5a15bde4
Author: Magnus Blåudd <magnus.blaudd@oracle.com>
Date:   Mon Oct 2 09:00:04 2017 +0200

    WL#9185 MySQL Cluster support for new DD
    
     - remove call to handler::delete_table() whose intention was to
       invoke the default "delete_table" functionality and remove files
       from disk belonging to ndbcluster, nowadays there are not such files
       and thsue tit's no longer necessary to call the function.

commit 00724d91b081f749d5fee9a1c9057f8cd78a88aa
Author: Magnus Blåudd <magnus.blaudd@oracle.com>
Date:   Mon Oct 2 08:19:09 2017 +0200

    WL#9185 MySQL Cluster support for new DD
    
     - remove variable for setting how the table should
       behave in single user mode and instead set the
       correct value directly

commit 2d5767ca15dbdd2aed813e3c7c4dc4db5b73a7ed
Author: Magnus Blåudd <magnus.blaudd@oracle.com>
Date:   Thu Sep 28 10:09:43 2017 +0200

    WL#8500 Adapt MySQL Cluster to 8.0
    
     - problem with inplace alter returning unexpected error code
       when it fails to create the foreign keys. This is dues to an
       old compatibility hack which translated HA_ERR_CANNOT_ADD_FOREIGN
       into ER_CANNOT_ADD_FOREIGn as required by earlier MySQL Server
     - fix by removing the compatibility hack and return
       HA_ERR_CANNOT_ADD_FOREIGN as epxected by the current MySQL Server
     - update result file to the now improved output from SHOW WARNINGS
       where the original NDB error shows as a warnings
     - fix ndb_multi_column to use ER_ code names rather than hardcoded
       numbers

commit 15dec351d08e40982adee674a46e1e68fdcbce6e
Author: Magnus Blåudd <magnus.blaudd@oracle.com>
Date:   Thu Sep 28 09:41:29 2017 +0200

    WL#9185 MySQL Cluster support for new DD
    
     - problem whith schema dist participant who failed
       to open the table from NDB when committing an inplace alter
     - fix by setting the proper databasename before trying
       to open the table

commit 7139840d44aebacb2f16f281ec8bbab313b08eba
Author: Magnus Blåudd <magnus.blaudd@oracle.com>
Date:   Tue Sep 26 15:12:00 2017 +0200

    WL#9185 MySQL Cluster support for new DD
    
     - enable tests previously disabled due to bug 25915132, that bug
       isn't fixed yet but at least the problem does not affect so many
       tests anymore.
     - change latin1 -> utf8
     - change a few error codes which have been improved due to data
       dictionary and other work
     - mask out the NDB table id's in error message for truncate table
     - fix tests to not create several fk's with same name as that is
       no longer allowed
     - enable "load data local" for ndb_fk_addnode which have it's own
       .cnf file

commit c1a33390a080944995bda19bbc141ed498203e7f
Author: Magnus Blåudd <magnus.blaudd@oracle.com>
Date:   Tue Sep 26 13:45:37 2017 +0200

    WL#9185 MySQL Cluster support for new DD
    
     - enable test case ndb_index_unique as the provious problem no longer
       can be reproduced, probably fixed by making ndbcluster ATOMIC_DDL
       compliant

commit 16c0f65bde0c2c80c72f7e452a307a457a6b5850
Author: Magnus Blåudd <magnus.blaudd@oracle.com>
Date:   Tue Sep 26 11:29:35 2017 +0200

    WL#9185 MySQL Cluster support for new DD
    
     - fix problem with duplicate fk name in test
     - fix problem with utf8 causing a too large rowsize, keep latin1
     - enable ndb_fk_bugs

commit b043cb4fdd3bbb78b3886b31ca8cea7aeedce4bc
Author: Magnus Blåudd <magnus.blaudd@oracle.com>
Date:   Tue Sep 26 11:12:07 2017 +0200

    WL#9185 MySQL Cluster support for new DD
    
     - disable ndb_restore_schema_tolerance waiting for WL#10665 since it
       creates a table causing too large sdi blob

commit a1a0ca9c7126fbea2149e32e3271cf7cac77b68b
Author: Magnus Blåudd <magnus.blaudd@oracle.com>
Date:   Tue Sep 26 11:10:30 2017 +0200

    WL#9185 MySQL Cluster support for new DD
    
     - rewrite ndbcluster_discover() to not return any sdi blob
       when it has installed that table into data dictionary itself, this
       will cicumvent the problem with "SERIALIZED METADATA IMPORT' FEATURE
       NEED MYSQL BUILT WITH WL#7069" which otherwise occurred when dropping
       a table which wasn't yet discovered.
     - fix ndb_restore_check_warning.inc to not used reserved word "rows" in
       table definition
     - fix ndb_restore_check_warning.inc to not create the table in InnoDB
       instead of NDB
     - fix ndb_restore_schema_tolerance.test due to "BUG#25860404 CREATE
       TABLE DOES NOT CHECK EXISTENCE OF TABLESPACE IN NDB" which has been
       fixed in 8.0 and it's no longer allowed to specify a tablespace
       which does not exist in CREATE or ALTER TABLE
     - enable ndb_tools_connect andb ndb_restore_schem_tolerance

commit a34736e4b76dd72444ae028491e4c14d0721b8bb
Author: Magnus Blåudd <magnus.blaudd@oracle.com>
Date:   Tue Sep 26 10:25:16 2017 +0200

    Bug#26867488 SERIALIZED METADATA IMPORT' FEATURE NEED MYSQL BUILT WITH
    WL#7069
    
     - problem when discovering table from SE since codepath to install
       table definition into data dictionary has been disabled by WL#7069
     - fix by allowing the SE to install the table into data dictionary
       itself, indicated by returning no sdi_blob from ha_discover()

commit f5d2e2981a75cef4958047053c3dbcdb9c28f035
Author: Magnus Blåudd <magnus.blaudd@oracle.com>
Date:   Mon Sep 25 15:38:03 2017 +0200

    WL#9185 MySQL Cluster support for new DD
    
     - fix problem with dropping a table that exists in NDB but not in DD
       (this can for example happen when user has restored a backup). The
       table will first be "discovered" and then dropped directly.
       Problem occured when MDL lock of the table to discover was
       released by the code which installs the table into DD. This caused
       the subsequent coded that dropped the table from DD to fail since
       that also required MDL lock.
     - enable a few tests which were blocked by this functionality
     - fix .result files for latin1 -> ut8mb4 change
     - accept that USING HASH is lost when altering a table to engine which
       does not suport it

commit 5ec3be2e3f5cbe372fc7d921a08e674cbf91953d
Author: Magnus Blåudd <magnus.blaudd@oracle.com>
Date:   Thu Sep 21 17:53:45 2017 +0200

    WL#9185 MySQL Cluster support for new DD
    
     - remove unused function get_ndb_share_state()

commit 459c03dc54a6c82c08da2ea8ce0a974c0cb9985c
Author: Magnus Blåudd <magnus.blaudd@oracle.com>
Date:   Thu Sep 21 17:43:11 2017 +0200

    WL#9185 MySQL Cluster support for new DD
    
     - remove get_share() function and instead call ndbcluster_get_share()
       directly. It's mainly just another name for same function

commit cee8b76f0ded0e95ba5b52151dfea4c69a3b3d6d
Author: Magnus Blåudd <magnus.blaudd@oracle.com>
Date:   Thu Sep 21 17:08:23 2017 +0200

    WL#9185 MySQL Cluster support for new DD
    
     - rename ndbcluster_get_share() to ndbcluster_get_share_have_lock()
     - add checks that mutex are held
     - improve comments
     - return nullptr instead of 0

commit 1275939b09966e9d2a59cb9c8d379fc9a753b285
Author: Magnus Blåudd <magnus.blaudd@oracle.com>
Date:   Thu Sep 21 16:57:40 2017 +0200

    WL#9185 MySQL Cluster support for new DD
    
     - change ndbcluster_binlog_init() to be a NDB_SHARE member function
       called binlog_init()

commit 74539e7bcae160445a71a912bcf6d447171e8d6b
Author: Magnus Blåudd <magnus.blaudd@oracle.com>
Date:   Thu Sep 21 16:38:16 2017 +0200

    WL#9185 MySQL Cluster support for new DD
    
     - remove useless get_share() function and instead
       call ndbcluster_get_share() directly

commit 3352a55cf0cb9fcbc1c6886d1f195fb754482772
Author: Magnus Blåudd <magnus.blaudd@oracle.com>
Date:   Thu Sep 21 12:10:41 2017 +0200

    WL#9185 MySQL Cluster support for new DD
    
     - remove debugging printouts for NDB_SHARE, it's not possible
       to use those for debug as it's just too much printouts.

commit a20801cd7a3a4ebb81225a66d36dd3013256f82c
Author: Magnus Blåudd <magnus.blaudd@oracle.com>
Date:   Thu Sep 21 10:08:19 2017 +0200

    WL#9185 MySQL Cluster support for new DD
    
     - rewrite ha_ndbcluster::get_num_parts() to avoid using
       member variables and functions of ha_ndbcluster.
     - The function is called very early in the code path
       for opening a table and ha_ndbcluster might not have been
       involved earlier in this query. Also it's asking questions
       about a table but is using a ha_ndbcluster instance which
       haven't been opened yet. Implement as a local static function
       to avoid having access to member variables and functions.

commit b1ad91c8bb336ffd6c0aab7541424cf2e96bc087
Author: Magnus Blåudd <magnus.blaudd@oracle.com>
Date:   Mon Sep 18 15:01:56 2017 +0200

    WL#9185 MySQL Cluster support for new DD
    
     - problem with ndb_share which used "DESC" to trigger discovery of
       table which didn't exist in NDB but not in local DD. This doesn't
       work now since "DESC", "SHOW COLUMNS" as well as "SELECT .. FROM
       information_schema.columns" is implemented to read directly from
       the DD without opening the table in the engine. Thus the codepath
       does not trigger a discover.
     - fix by changing the test to use "select ... <table>" to force
       the discover
    
     - problem with local DD getting out of synch when NDB is restarted
       initial(i.e all tables in NDB are deleted). The local DD will then
       contain metadata for the tables which existed before the initial
       restart and they will be removed from local DD during "schema
       distribution synchronization". User may try to open the removed
       tables using the old metadata before connection to NDB is restored.
       This triggers a "discover" before the local DD is synchronized again.
     - fix by disallowing "discover" before "schema distribution
       synchronization" has comlpeted.
     - also change Ndb_dd_client::install_table() when someone tries to
       "install" a table which is already installed with the correct
        metadata version. This can happen when  a "discover" is stalled
        waiting for "schema distribution synchroniation".
    
     - rewrite old code for creating ndb_schema and ndb_apply_status table
       which worked with .frm files to check existence of table metadata
       and remove in DD instead.

commit 1859aa50ab44e3c8f68a910410ba1b79b9d43f21
Author: Magnus Blåudd <magnus.blaudd@oracle.com>
Date:   Mon Sep 18 11:08:15 2017 +0200

    WL#9185 MySQL Cluster support for new DD
    
     - Trying to run ndb_dist_priv shows that there are problems
       with this functionality in combination with the new DD. The
       combined behaviour of "shadow" tables and dist priv tables
       causes the DD to get out of synch to a state where it's not
       possible to get back to where it started. For example
       when altering a dist priv table back and forth to NDB, the
       table will disappear on the participants. This was the case
       also before new DD but it went unnoticed since everything
       was just files in a directory.
     - move disabled ndb_multi.test to a differeht section and add comment
       describing the problem
     - fix ndb_dist_priv.test and .result up to the point where it
       starts to test using mysql_upgrade

commit 87037c5ac82012124c60591962101a9119f8f720
Author: Magnus Blåudd <magnus.blaudd@oracle.com>
Date:   Fri Sep 15 15:51:57 2017 +0200

    WL#9185 MySQL Cluster support for new DD
    
     - finally enable ndb_multi
     - fixing the result to accept utf8mb4 instead of latin1
     - also accepting that SHOW TABLES no longer produce warnings about
       "shadow" tables. The SHOW TABLES query asks the DD directly and there
       is simply no way that ndbcluster could do a check to see if "shadows"
       existed

commit ad4fe80165e583a1e6073dc5e99c78cb1555026c
Author: Magnus Blåudd <magnus.blaudd@oracle.com>
Date:   Fri Sep 15 15:49:23 2017 +0200

    WL#9185 MySQL Cluster support for new DD
    
     - problem with one MySQL Server getting out of synch after dropping
       it's "shadow" table, then a subsequent drop of the table with same
       name in NDB from another mysqld tries to remove the table which
       doesn't exist
     - fix by skipping the "remove from DD" if table does not exist there.

commit fb49e4ccc0cc30391f283a50fd70c6989e229249
Author: Magnus Blåudd <magnus.blaudd@oracle.com>
Date:   Fri Sep 15 14:23:06 2017 +0200

    WL#9185 MySQL Cluster support for new DD
    
     - problem with "shadow table" preventing DROP DATABASE
       from removing the NDB tables from DD on participant
     - fix by adding code which lists all NDB tables in DD, drops
       them from there, invalidates them in NdbApi, closes any
       open MySQL Server table shares, marks the table as dropped
       and releases the server NDB_SHARE for the dropped tables
     - add comments decribing the above and also the case that
       the actual DROP DATABASE query is sometimes prevented from
       removing the actual data directory (and other artifacts)
     - this is a problem also in previous versions, dropping
       a database where some MySQL Servers have "shadow" tables will
       leave the metadata for all dropped NDB tables on the participants

commit 3945f19fced2f07554da34a1381b669cc1a56c8b
Author: Magnus Blåudd <magnus.blaudd@oracle.com>
Date:   Fri Sep 15 10:11:56 2017 +0200

    WL#9185 MySQL Cluster support for new DD
    
     - Problem with alter table while MDL lock is held on other mysqld
     - Move part of ndb_multi.test to new smaller test, disdable waiting for WL#10164
     - Disable ndb_ddl_open_trans with message describing the problem
       with MDL lock on participant(s)

commit 5d30f93bcadbe4025c83145b008487da0e6a77e7
Author: Magnus Blåudd <magnus.blaudd@oracle.com>
Date:   Fri Sep 15 09:51:15 2017 +0200

    WL#9185 MySQL Cluster support for new DD
    
     - remove check that .ndb files exists for created table
     - such files are no longer used in the new DD implementation

commit 59b1bc95a2920293e5a2ecc6eb5b394cf0a9c09b
Author: Magnus Blåudd <magnus.blaudd@oracle.com>
Date:   Fri Sep 15 09:44:35 2017 +0200

    WL#9185 MySQL Cluster support for new DD
    
     - split part of ndb_multi.test which test drop database in combination
       with "stale" .ndb files in the MySQL Servers data dir.
     - support for such functionality will either be implemented as upgrade
       code or in the drop database code(although it hasn't been possible to
       add it there earlier)
     - disable new testcase
     - add comments in code describing the case with "stale" .ndb files
     - mark ndbcluster_drop_database_impl as static

commit cc421e616b5832b6ab9989f16340cc7d63d343a6
Author: Magnus Blåudd <magnus.blaudd@oracle.com>
Date:   Thu Sep 14 11:59:20 2017 +0200

    WL#9185 MySQL Cluster support for new DD
    
     - the mysql.ndb_schema table should not show up in "SHOW TABLES" or
       "select * from information_schema.tables"
     - fix by removing the now defunct find_files callback and instead mark
       the table as "hidden in SE" in DD. This also has the effect that
       neither DDL or DML queries on the table is possible
     - implement new test case checking behaviour of ndb_schema and remove
       previous test from ndb_multi
     - rewrite ndb_not_readonly.inc to not use mysql.ndb_schema to check
       if MySQL Server has com out of readonly mode.
     - remove writing of warning to error log when failure to acquire GSL
       lock due occurs. The mesage is still psuhed as warning.
     - remove "report_cluster_disconnected" parameter to
       Ndb_global_schema_lock_guard::lock() it's dead code where noone
       requested it to be on.

commit 6bc626530d588a7436323f6bc34d9de407b36fe4
Author: Magnus Blåudd <magnus.blaudd@oracle.com>
Date:   Fri Sep 8 11:56:23 2017 +0200

    WL#9185 MySQL Cluster support for new DD
    
     - problem when altering a table to another engine as the
       table was not removed from the participants.
     - detect the special case of "alter to other engine" in
       ha_ndbcluster::delete_table(), lookup the orignal table name from
       thd and distribute the drop to participants.
     - slightly modify test case as the servers will not be identical after
       alter to other engine
     - remove unused extern in ha_ndb_index_stat.cc
     - enable and fix up ndb_dd_alter, ndb_blob and ndb_partition_range
       which were disabled due to this problem

commit a1039152cc79806f4ff7d75b4390c2d94ac3b014
Author: Magnus Blåudd <magnus.blaudd@oracle.com>
Date:   Tue Sep 12 15:52:02 2017 +0200

    WL#9185 MySQL Cluster support for new DD
    
    - fix problem where the schema distribution participant didn't ignore
      dropping databases which had so called "shadow tables"(i.e tables
      with same name but in othr engine) existed.
    - add testcase showing how database containing shadow table is ignored
      by participant
    - remove now unused ndb_find_files_list class

commit 87efb9a0199795420aaba38d5d8a86e6a92d0e75
Author: Magnus Blåudd <magnus.blaudd@oracle.com>
Date:   Tue Sep 12 11:24:45 2017 +0200

    WL#9185 MySQL Cluster support for new DD
    
     - fix problem where the schema distribution participant didn't ignore
       the so called "shadow tables" which are tables with same name but
       created in a different engine. It might seem weird to allow such
       inconsistencies between the data dictionaries on different
       MySQL Servers connected to the same cluster, but currently that's
       a feature.
     - add testcase showing how shadow table is ignored by participant

commit ba2c301844be1ebba1b2ea75a85073f0df915a82
Author: Magnus Blåudd <magnus.blaudd@oracle.com>
Date:   Fri Sep 8 09:01:49 2017 +0200

    WL#9185 MySQL Cluster support for new DD
    
    - rename ndb_dd_table_get_engine() -> ndb_dd_get_engine_for_table() so
    it's not in the ndb_dd_table_ prefix namespace

commit 45b36a9ae85818a14f516decfa44b5173655a854
Author: Magnus Blåudd <magnus.blaudd@oracle.com>
Date:   Thu Sep 7 07:49:15 2017 +0200

    WL#9185 MySQL Cluster support for new DD
    
     - remove unnecessary 'free_share' and call ndbcluster_free_share()
       directly in all places.
     - add assert checking that mutext is properly held
     - remove superflous log and dbug printouts from
       ndb_cluster_free_share()

commit 24e98bb98805c6b422f8b3dfc494a50b1f794ac6
Author: Magnus Blåudd <magnus.blaudd@oracle.com>
Date:   Wed Sep 6 15:27:24 2017 +0200

    WL#9185 MySQL Cluster support for new DD
    
     - make NDB_SHARE::use_count private in order to make it possible to see
       where it's actually incremented or decremented. Add functions
       for reading, incrementing or decrementing the use_count value

commit 78ba84158a12da25a7758cb45c4ab5700747647a
Author: Magnus Blåudd <magnus.blaudd@oracle.com>
Date:   Mon Sep 4 11:26:24 2017 +0200

    WL#9185 MySQL Cluster support for new DD
    
     - Synching the DD with NDB dictionary. Loop through the DD's schemas
       one by one, synchronizing each one separately, listing each table
       and checking if it's synchronized. Build list of tables which should
       eventually be removed from DD. Make separate loop to setup binlogging
       of tables.
     - enable ndb_reconnect and fix it to ignore the warnings that are
       written to server errog log when mysqld looses connection to
       cluster

commit ea3acc23890848ccd87ebcb32663828237321868
Author: Magnus Blåudd <magnus.blaudd@oracle.com>
Date:   Fri Sep 1 11:15:44 2017 +0200

    WL#9185 MySQL Cluster support for new DD
    
     - move code for working with the DD into Ndb_dd_client
     - factor out functions for calling dd::serialize() and
       dd::deserialize()
     - move functions for ndbcluster working
       with a dd::Table's se_private_data into ndb_dd_table.h
     - extend Ndb_dd_client with commit() and rollback(), call
       rollback() automatically in destructor unless commit()
       has not been called.

commit c52eb1e158dbf7303419334b3c4eb796e1119130
Author: Magnus Blåudd <magnus.blaudd@oracle.com>
Date:   Fri Sep 1 10:11:25 2017 +0200

    WL#9185 MySQL Cluster support for new DD
    
     - factor out common code for working with DD into Ndb_dd_client class
     - add support for acquiring and releasing MDL locks as well as disabling
       and restoring autocommit

commit d6f8ec5efe24a65da9138c47e5e1ddd5028b16d9
Author: Magnus Blåudd <magnus.blaudd@oracle.com>
Date:   Fri Sep 1 08:29:01 2017 +0200

    Bug#26616966 FAILURE OF NDBINFO TEST
    
     - small difference in number of scanned bytes. That value depend on
      used batch byte size et.c so it's and acceptable change.
     - accept the new result.

commit 921cdb06db4098da7fb488601d07660b91553609
Author: Magnus Blåudd <magnus.blaudd@oracle.com>
Date:   Wed Aug 30 13:43:36 2017 +0200

    WL#9185 MySQL Cluster support for new DD
    
     - there is currently a problem with using the se_private_id property of
       dd::Table which causes the mysqld to crash inside
       SHARED_DICTIONARY_CACHE, most likely because both InnoDB and NDB
       uses the same se_private_id(although for different tables).
     - temporarily workaround by saving the NDB tables id with key
       "object_id" in the se_private_data property.

commit 883fa98be345b408de6ee74ede010647fcb48313
Author: Magnus Blåudd <magnus.blaudd@oracle.com>
Date:   Tue Aug 29 15:23:50 2017 +0200

    WL#9185 MySQL Cluster support for new DD
    
     - add support for comparing that the mysqld has installed the
       correct version of metadata for a table by comparing the NDB table
       id and version instead of doing a binary comparison of the entire sdi
     - the NDB tables id is saved in se_private_id of the table in DD and
       the NDB tables version is saved with key "object_version" in
       se_private_data(which is a collection of name value pairs)
     - this reduces dependency on sdi and avoids having to generate a sdi
       during table open. It also avoids taking additional MDL on tablespace
       during table open
     - remove function cmp_packed_frm() for binary comparison of sdi as well
       as print_diff() used for printing any diff
     - improve test case to show that the NDB tables version is saved as
       object_version in se_private_data of DD

commit 7564f4d01cd0fbb413924815267228596a85cdc5
Author: Malika Agarwal <malika.agarwal@oracle.com>
Date:   Fri Oct 6 11:38:28 2017 +0530

    Bug#22304322: MAIN.LOCKING_SERVICE FAILS SPORADICALLY WITH RESULT CONTENT MISMATCH
        MAIN.LOCKING_SERVICE doesn't fail anymore, no longer tagged as experimental.

commit 4d8427d5cbf39622cc5cd94a845e3c80cd5d7d73
Author: Malika Agarwal <malika.agarwal@oracle.com>
Date:   Fri Oct 6 11:15:48 2017 +0530

    Bug #18977126: MAIN.SSL-BIG FAILS WITH TIMEOUT
        This test is not seen to fail anymore, removed from disabled.def.

commit d3e350a338048b3ade86a66b7be868611857ea18
Author: Knut Anders Hatlen <knut.hatlen@oracle.com>
Date:   Wed Sep 13 13:53:19 2017 +0200

    Bug#26787468: REPLICATION DOES NOT HANDLE NULL INSERTED
                  IN JSON NOT NULL COLUMN CORRECTLY
    
    An empty string is not a valid JSON binary value, but such empty
    values may appear in JSON columns due to the way INSERT IGNORE and
    similar mechanisms (like inserting in non-strict SQL mode) work.
    
    Empty documents have till now been handled by callers of
    json_binary::parse_binary(), which have translated empty documents to
    the JSON null literal. This is easy to forget, and some callers of
    parse_binary() are missing this check.
    
    Instead of adding special handling of empty documents to more callers,
    this patch moves the handling into json_binary::parse_binary() so that
    the callers don't need to worry about it.
    
    Change-Id: I1c8c3ed17934e990bbd86b153735b8849ceac353

commit 2cb8481ed0385c025270d781a4d2c28d0a2ec3d6
Author: Dyre Tjeldvoll <Dyre.Tjeldvoll@oracle.com>
Date:   Thu Oct 5 20:26:44 2017 +0200

    Bug#25510948: Post-push fix. Doxygen
    
    (cherry picked from commit b82874c524424c3c5ab986d0c61f8e951632a72f)

commit 1be729557fa492f8f5c31fb0a0de94f81e9bf2c1
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Thu Oct 5 16:33:09 2017 +0200

    Bug#26665217 BUILD WITH WITHOUT_SERVER MAY TRY LINK PLUGIN WITH LIBMYSQLD
    
    The authentication_ldap_sasl_client plugin is a client-side plugin,
    and should not be linked with server-side utilities.
    Add a new argument CLIENT_ONLY to MYSQL_ADD_PLUGIN
    
    This patch is for 8.0 and up

commit ce92174742f6d45dba01620a629ee72d786cc95e
Author: Knut Anders Hatlen <knut.hatlen@oracle.com>
Date:   Thu Jun 1 13:41:04 2017 +0200

    Bug#26177130: SLAVE CAN'T FIND ROW USING HASH_SCAN
                  IF JSON HAS DIFFERENT BINARY FORMAT
    
    The same JSON document may have different binary representation after
    WL#8963. Row-based replication uses binary equality to find the
    matching row on the slave, and this may now fail if the binary
    representation of the document is different on the slave than it is on
    the master.
    
    This fix overrides cmp_binary() in Field_json and makes it use
    Json_wrapper::compare() to compare the JSON values.
    
    cmp_binary() is also used in UPDATE statements in order to see if a
    record has changed before it is updated in the table. The update is
    skipped if the new record is found to be equal to the original record.
    With these changes, it is now able to skip updates in more cases
    (where the binary representation has changed, but not the contents of
    the document). Some test cases in json_functions_innodb and
    json_functions_ndb, which inspected the binary representation of the
    JSON documents, got changed results because of this.
    
    Change-Id: If00c4f35d32d2435a148eafc7e0d6a3183bc1b00

commit 2f2057db4ecee47f7ea12d6f3b5153ea896f4195
Merge: 2f86fa4 345db19
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Thu Oct 5 14:53:21 2017 +0200

    NULL Merge branch 'mysql-5.7' into mysql-8.0

commit 8213109835df16d0c872b96478b06ebf59b25c57
Author: Lakshmi Narayanan Sreethar <lakshmi.narayanan.sreethar@oracle.com>
Date:   Wed Sep 20 17:37:14 2017 +0530

    Bug#26758939 : Post push fix
    
    Updated ClusterJ testcase to expect the updated error message
    
    (cherry picked from commit 3a94f9769c793840fd85824dbab0df166b37e36e)

commit 345db19f256a5a425db018408b2cc828835c9b92
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Thu Oct 5 14:03:43 2017 +0200

    two trivial zero-initializations, to avoid "may be used unitialized" warnings
    
    Change-Id: I04de95d07e08d7949dcb6e8c347b2f79f780b6c3

commit 6c4e79664ca69c0d5149b6d2ded8f52ce3a55622
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Thu Oct 5 13:25:20 2017 +0200

    Bug#26918439 ROW0SEL.CC:5178:32 ERROR: ISO C++ FORBIDS COMPARISON BETWEEN POINTER AND INTEGE
    
    prebuilt->idx_cond is a pointer, so compare it to NULL rather than false.
    
    Change-Id: Id01bda87fc921d0d595e07f9a1d11151e723618e

commit cf119e7af92ea2355497be5aa4025f33a6de493f
Author: Arnab Ray <arnab.r.ray@oracle.com>
Date:   Thu Oct 5 16:34:30 2017 +0530

    RPM Build Failure
    
    Edit the RPM spec files to comment out all the NDB man pages until
    NDB 8.0 docs are ready

commit 2f86fa4d1c297bcbc7494d2fe37c6665d271756b
Author: Dmitry Lenev <dmitry.lenev@oracle.com>
Date:   Thu Oct 5 13:35:21 2017 +0300

    Follow-up to WL#6049 Meta-data locking for FOREIGN KEY tables.
    
    Enabled test for bug 14219233 which was disabled due to sporadic
    failures until WL6049 implemented.

commit 7a6ead7dadb348b85ab5abb2601b4b92aa7c5143
Author: Dyre Tjeldvoll <Dyre.Tjeldvoll@oracle.com>
Date:   Fri Sep 29 14:12:44 2017 +0200

    Bug#24510948: ALTER TABLE+INSERT+DROP DB HANG
    
    Problem: Running insert, alter and drop schema concurrently could
    trigger a deadlock.
    
    Root cause was that it was possible to block waiting for a TABLE_SHARE
    being opened by another thread while already holding MDL on the
    schema. The other thread would, as part of opening the share, attempt
    to also acquire MDL on the schema. This could result in a pseudo
    deadlock, as the operation would proceed only after the thread
    requesting the MDL had timed out.
    
    Solution: When the share is not found in the tdc and there is no prior
    MDL on schema, get_table_share() must temporarily release LOCK_open,
    acquire MDL on schema, and retry the tdc lookup. This way there is no
    need to acquire schema MDL while share->open_in_progress is true. Note
    that the MDL now has transaction duration rather than a (shorter) explicit
    duration. This should not harm concurrency, as exclusive access to the
    schema was always prevented by MDL on a table in it, and concurrent
    access is still possible.
    
    (cherry picked from commit 6a87de7a33ba3b9504d9aa6f283701595aa2c1c7)

commit 3e5dde741a678675c7fdc2edb2e47628c163f02c
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Thu Sep 28 09:57:54 2017 +0200

    Bug#26665217 BUILD WITH WITHOUT_SERVER MAY TRY LINK PLUGIN WITH LIBMYSQLD
    
    The authentication_ldap_sasl_client plugin is a client-side plugin,
    and should not be linked with server-side utilities.
    Add a new argument CLIENT_ONLY to MYSQL_ADD_PLUGIN
    
    Details:
    client/mysql.cc
    Fix some 'may be used uninitialized' warnings.
    
    mysql-test/lib/My/SafeProcess/CMakeLists.txt
    Remove obsolete handling of stlport, this can no longer be used for
    building the server.
    
    mysys/my_conio.c
    mysys/my_windac.c
    mysys/my_winfile.c
    Explicitly #include "my_sys.h" which is needed in order to build.
    my_sys.h is implicitly included by "mysys_priv.h" in a default build,
    but not in a client-build, which does not have HAVE_PSI_INTERFACE defined.
    
    storage/ndb/mcc/CMakeLists.txt
    Skip building for client-only build, as this is part of NDB server.
    
    storage/ndb/src/CMakeLists.txt
    NDBCLIENT_SYSTEM_LIBS can be empty on some platforms, so check
    contents before doing LIST(REMOVE_DUPLICATES)
    
    storage/ndb/src/mgmsrv/ConfigInfo.cpp
    Insert whitespace between text literals and preprocessor tokens.
    Modern compilers will otherwise reject to do the token concatenation.
    
    Change-Id: I0d993b131afe2f4ccbc5b1bedfa3da071d99f6a8

commit 91c5e4343dcee58731ff349a29a30e755ed8f0be
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Tue Oct 3 11:01:46 2017 +0200

    Bug#26612465 BUILDING WITH CMAKE 3.9.0 OR NEWER GIVES DEPRECATION WARNINGS [noclose]
    
    Patch 3 for 5.7
    Backport WiX/MSI fixes to avoid LOCATION property.
    
    Change-Id: Idd7a7fd94d403b4da54e93248f8436c78cb86b36

commit 6fce2cc6e22bbf26c7c1640f0fba12f4b1c1d659
Merge: 2972bda 07e0177
Author: Mauritz Sundell <mauritz.sundell@oracle.com>
Date:   Thu Oct 5 11:22:32 2017 +0200

    Merge branch 'mysql-5.7-cluster-7.6' into mysql-8.0-cluster-8.0

commit 07e0177b18f66a3fc960f7752b9addc17e7b399c
Author: Mauritz Sundell <mauritz.sundell@oracle.com>
Date:   Sun Oct 1 17:11:10 2017 +0200

    Bug#26906640 Return oldest free page in DBACC to global page pool.
    
    Dbacc:getLastAndRemove method may return a refrence to a newly released
    page which the calling function later accessed.
    
    Five released pages are kept within Dbacc instance, when further pages are
    released they were directly returned to global page pool.
    
    Some other thread could allocate this page between page was released in Dbacc and
    later accessed by Dbacc.

commit aab1edfd4cb1f526156dbc56bacafb501581dc05
Author: Marc Alff <marc.alff@oracle.com>
Date:   Thu Oct 5 11:09:06 2017 +0200

    Bug#24688694 SEVERAL UNSTABLE TESTS IN SUITE PERFSCHEMA
    
    Improved stability of test perfschema.selects

commit 2972bda7dd9739ab1a0958d617b6f37c97c4d628
Merge: d222f59 58138e1
Author: Sanjana DS <sanjana.ds@oracle.com>
Date:   Thu Oct 5 14:28:04 2017 +0530

    Merge branch 'mysql-5.7-cluster-7.6' into mysql-8.0-cluster-8.0

commit c7bb129f75fe48762ec2e6fe84e59249495cfb5c
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Tue Oct 3 13:49:09 2017 +0200

    Bug#26911453 UBSAN ERROR ON SETRINGORDERTEST.SETRINGORDERCCW UNIT TEST
    
    Fix misc UBSAN warnings in unit tests.
    To repeat:
    export UBSAN_OPTIONS="print_stacktrace=1"
    
    ./runtime_output_directory/merge_large_tests-t --gtest_filter='-*DeathTest*' > /dev/null
    
    unittest/gunit/gis_algos-t.cc:78:70:
    runtime error: downcast of address 0x000012dc0be8 which does not point to an object of type 'Gis_polygon_ring'
    
    include/sql_string.h:683:35: runtime error: null pointer passed as argument 2, which is declared to never be null
        #1 0x373e7af in histograms::Value_map<String>::add_values(String const&, unsigned long long) sql/histograms/value_map.cc:149
        #2 0x294fcf2 in dd_column_statistics_unittest::add_values(histograms::Value_map<String>&) unittest/gunit/dd_column_statistics-t.cc:62
    
    runtime_output_directory/merge_keyring_file_tests-t --gtest_filter='-*DeathTest*' > /dev/null
    
    plugin/keyring/common/keyring_key.cc:82:57: runtime error: null pointer passed as argument 2, which is declared to never be null
    
    Change-Id: I2651362e3373244b72e6893f0e22e67402b49a52
    (cherry picked from commit 1fe3f72561994da1d912a257689e1b18106f8828)

commit e7c90aa5ca46f32e68b5bc4a7965d97e975d16de
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Tue Oct 3 13:03:40 2017 +0200

    Bug#26571995 SET DEFAULT ROLE ALL don't set mandatory roles.
    
    Post-push fix for UBSAN warning:
    runtime error:
    null pointer passed as argument 1, which is declared to never be null
    sql/auth/sql_authorization.cc:7525
    
    To repeat: ./mtr --mem --sanitize json_table
    
    (cherry picked from commit 01fee7c1eb7aa2d516dab2e2d3e678056ad6ee5e)

commit fa38eeefd2f14ba1ac618039effd3b54be9eab08
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Mon Oct 2 17:41:47 2017 +0200

    Bug#26781567 REMOVE C LEGACY
    Post push fix for: Move some InnoDB memcached files from C to C++
    Fix build errors in solaris-cpecific code:
    
    storage/ndb/memcache/src/atomics.cc", line 25: Error: ")" expected instead of "new".
    
    storage/ndb/memcache/unit/stub_logger.cc", line 64: Error: Expected an expression.
    
    also: Disable NCURSES library lookup on SOLARIS:
    
    CMake Error: The following variables are used in this project, but
    they are set to NOTFOUND.  Please set them or make sure they are set
    and tested correctly in the CMake files: NCURSES_TINFO_LIB
    
    This also made subesequent feature tests fail, because of:
        SET(CMAKE_REQUIRED_LIBRARIES ${NCURSESW_LIB})
    
    (cherry picked from commit 7bd49b23868eaf6edc3f86a3a5246e996581d8d7)

commit 58138e122259c6968fc8fccabc1dc069db73a20b
Author: Sanjana DS <sanjana.ds@oracle.com>
Date:   Wed Aug 23 20:31:55 2017 +0530

    Bug #26026218 : TRANSPORTER ERROR 0X8004, 0X8023; CHECKSUM; UNSUPPORTED BYTE ORDER
    
    Patch adds a few require() statements in the transporter
    send and receive code.

commit 5ab8d0abe6f0b0cc48f1cd2b44e8dec7bac80ea0
Author: Frazer Clement <frazer.clement@oracle.com>
Date:   Fri Aug 18 17:14:35 2017 +0530

    Bug #26026218 : TRANSPORTER ERROR 0X8004, 0X8023; CHECKSUM; UNSUPPORTED BYTE ORDER
    
    Two new manual(recompile) error-injections in mt.cpp :
    
      NDB_BAD_SEND : Causes send buffer code to mess with a byte in a send buffer
      NDB_LUMPY_SEND : Causes transporters to be given small, oddly aligned and
                       sized IOVECs to send, testing ability of new and existing
                       code to handle this.
    
    These were useful for testing the correctness of the new code, and
    the resulting behaviour / debugging output.

commit d91b48d0295355b6f10ac660a8adcf8bddbd61b3
Author: Sanjana DS <sanjana.ds@oracle.com>
Date:   Tue Sep 26 14:31:38 2017 +0530

    Bug #26026218 : TRANSPORTER ERROR 0X8004, 0X8023; CHECKSUM; UNSUPPORTED BYTE ORDER
    
    Enable PreSendChecksum in mtr ndb_binlog suite.

commit 9b30f5bd2dd992b7e68caee8ada1f330176b5e18
Author: Mauritz Sundell <mauritz.sundell@oracle.com>
Date:   Fri Aug 18 17:10:06 2017 +0530

    Bug #26026218 : TRANSPORTER ERROR 0X8004, 0X8023; CHECKSUM; UNSUPPORTED BYTE ORDER
    
    Checksum checking is added to the TCP Transporter using the new class + utils.
    
    doSend() obtains an array of IOVECs and attempts to send all of the data from
    them, in multiple passes.
    
    The OS may manage to send some, all or none of the data, which could result in
    IOVEC offsets changing, becoming odd etc over time.
    
    doSend() will :
      a) Check checksums for all data available in IOVECs prior to OS::send()
      b) Check checksums for all sent data afer OS::send()
    
    Obviously this adds some CPU load to the threads performing sending.

commit 40fa09ce0f4cca91d99251ad657b4c17e744b6d1
Author: Sanjana DS <sanjana.ds@oracle.com>
Date:   Wed Aug 23 12:31:20 2017 +0530

    Bug #26026218 : TRANSPORTER ERROR 0X8004, 0X8023; CHECKSUM; UNSUPPORTED BYTE ORDER
    
    Patch adds new configuration parameter PreSendChecksum which enables
    pre-send checksum checking.
    
    Note: Checksum should also be on for this parameter to work

commit 46a3ca695623748f7b64e63efca77b67a0ae5fe6
Author: Mauritz Sundell <mauritz.sundell@oracle.com>
Date:   Fri Aug 18 12:06:21 2017 +0530

    Bug #26026218 : TRANSPORTER ERROR 0X8004, 0X8023; CHECKSUM; UNSUPPORTED BYTE ORDER
    
    A checksum checking class is added to the Transporter, allowing checksums to
    be verified between the application point-of-send (sendSignal et al) and the
    point of passing data to the OS.
    
    This involves parsing the sequences of bytes made available to send, to find
    message boundaries, and checksumming and verifying the content.
    
    In case of failure, as much context as is available at the point of failure
    is dumped out.

commit 091716a3a5a3405d3658064436952a089093dee6
Author: Mauritz Sundell <mauritz.sundell@oracle.com>
Date:   Wed Aug 16 19:53:53 2017 +0530

    Bug #26026218 : TRANSPORTER ERROR 0X8004, 0X8023; CHECKSUM; UNSUPPORTED BYTE ORDER
    
    Signals are integer numbers of 32-bit words long.
    A message checksum is the bitwise XOR of each of these words, so that the checksum
    word XORed with the other words in the signal gives zero.
    
    Current checksum utilities operate only on integer numbers of 32 bit words, but
    it is useful to be able to build a checksum cumulatively using arbitrary spans
    of bytes, which may not have corresponding relative word alignment.
    
    This is done by :
     - Observing that the word XOR is a series of byte XORs, from byte 0 to byte 3
     - Observing that the 'next byte to XOR' can be memorised in the checksum
       itself by rotating the checksum so that byte 0 is always next.
       - When a multiple-of-4 bytes have been processed, the checksum has rotated back
         to its original alignment.
    
    Steps :
     1.  Determine word-alignment of the source bytes
     2.  XOR in any unaligned partial-word bytes at the start
     3.  Rotate checksum to be used for word-aligned XOR of the bulk of the byte
         stream
     4.    Use normal word-oriented checksum for the bulk
     5.  Rotate checksum back to start position
     6.  XOR in any unaligned partial-word bytes at the end
     7.  Rotate checksum to be correct w.r.t the number of bytes added in

commit d222f598e0fe0885dbe2a661dffc79ddd0225541
Merge: c5e780b b488352
Author: Mikael Ronström <mikael.ronstrom@oracle.com>
Date:   Thu Oct 5 10:34:19 2017 +0200

    Merge ../push_76 into mysql-8.0-cluster-8.0

commit b488352fa4f998d4693e60e419d9492230691503
Author: Mikael Ronström <mikael.ronstrom@oracle.com>
Date:   Thu Oct 5 10:34:02 2017 +0200

    WL#11169: Fix for part 1, compiler warning generated error

commit 740589080acc2f42351870600a7cf4dfc3729876
Author: Knut Anders Hatlen <knut.hatlen@oracle.com>
Date:   Tue Sep 6 14:10:31 2016 +0200

    Bug#24345509: WRONG RESULTS WHEN GCOL INDEX IS USED
    
    When InnoDB evaluates an end-range condition while scanning a
    non-covering secondary index, the value of any virtual generated
    column referenced by the end-range condition is not available yet. The
    evaluation of the end-range condition may therefore give an incorrect
    result and cause the scan to stop before all qualifying records have
    been fetched.
    
    This is fixed by making the handler check if the pushed down end-range
    condition references a virtual column, and set a flag if it does.
    InnoDB checks the flag and, if necessary, reads the virtual column
    values from the secondary index before the end-range condition is
    evaluated.

commit c5e780bb2007c46dfafaab9b19c7b09962763483
Merge: fb97467 1808c39
Author: Mikael Ronström <mikael.ronstrom@oracle.com>
Date:   Thu Oct 5 08:48:44 2017 +0200

    Merge ../push_76_wl11169 into mysql-8.0-cluster-8.0

commit 1808c39ccd1e07e56ecb279e302faad818ed895b
Author: Mikael Ronström <mikael.ronstrom@oracle.com>
Date:   Wed Oct 4 13:41:04 2017 +0200

    WL#11169: Part1: Refactoring of DBACC, remove a number of not needed block variables

commit fb97467d1978660938e4e2361356d0e0d35f543b
Author: Arnab Ray <arnab.r.ray@oracle.com>
Date:   Thu Oct 5 11:13:28 2017 +0530

    Attempt 2 to fix RPM build failure
    
    Remove the setting of milestone variable to 'rc'

commit 0b10684d7cb5d74c45af5a95e48b56988278e8f1
Author: Lakshmi Narayanan Sreethar <lakshmi.narayanan.sreethar@oracle.com>
Date:   Fri Sep 29 15:49:55 2017 +0530

    Bug#26898072 : CLUSTERJ TEST NOT RUN IN RPM/DEBIAN BUILDS IN MTR
    
    ClusterJ Tests are not run in above said platforms as MTR is unable to
    find either the clusterj jars or the libndbclient library. This patch
    updates the have_clusterj.inc file to fix this.
    
    (cherry picked from commit be86b893613b228eae5f49ea4c073104100eced9)

commit 4a47093bbac99566a2402e1657905403b7f48452
Author: Thirunarayanan Balathandayuthapani <thirunarayanan.balathandayuth@oracle.com>
Date:   Thu Oct 5 10:35:53 2017 +0530

    Bug #26334475 ROLLBACK OF UPDATE STMT TRIES TO ACCESS FREED INDEX ONLINE LOG
    
    Problem:
    ========
       Rollback of concurrent update statement during online ddl leads to access
    the freed index online log.
    
    Solution:
    ========
       Before accessing online log, check whether the index is being created online.
    
    Reviewed-by: Satya Bodapati <satya.bodapati@oracle.com>
    RB: 17534

commit 5cbd7090687677ff4c9fe43c28c87d6c90e8c5d9
Author: Mayank Prasad <mayank.prasad@oracle.com>
Date:   Wed Oct 4 14:23:17 2017 +0530

    Bug#25972975 SERVER CRASH ON RUNNING I_INNODB_ZIP.BUG16067973 WITH --INNODB-SYNC-DEBUG=1
    
    Background:
    	innodb_buffer_pool_evict='uncompressed' causes all uncompressed pages to
    	be evicted from buffer pool. innodb_buffer_pool_evict_uncompressed() is
    	responsible to do above operation.
    
    Issue:
    	sequence in which locks are being taken is not correct.
    	SYNC_SEARCH_SYS, which is taken when AHI is being searched, shouldn't be
    	taken by a thread while its already holding
    	SYNC_BUF_BLOCK/SYNC_BUF_PAGE_HASH/SYNC_BUF_LRU_LIST locks. Because of
    	this, an assert is seen when innodb_debug_sync=1.
    
    Fix:
    	Issue was not present in 5.7 where the sequence of acquiring locks is
    	correct. Corrected lock acquiring sequence accordingly.

commit a89e2476ce1fe0e82582e18ae46d6b409afce416
Merge: 9681dd0 175c71b
Author: Sreeharsha Ramanavarapu <sreeharsha.ramanavarapu@oracle.com>
Date:   Thu Oct 5 08:47:39 2017 +0530

    Merge branch 'mysql-5.7' into mysql-8.0

commit 175c71b9ada003e0a04b8d12dd030c5ab3c58c4b
Author: Sreeharsha Ramanavarapu <sreeharsha.ramanavarapu@oracle.com>
Date:   Thu Oct 5 08:46:09 2017 +0530

    Bug #26838771: GCOL: INCORRECT BEHAVIOR WITH UPDATE ON FLY
    
    Issue:
    ------
    When an UPDATE statement is using update on the fly
    optimization, generated column related checks are skipped.
    
    Solution:
    ---------
    
    On 5.7:
    Call validate_gc_assignment at an earlier place in
    Query_result_update::initialize_tables.
    
    On 8.0 and trunk:
    Move the call to validate_gc_assignment
    Sql_cmd_update::prepare_inner(). This way no separate
    handling is required for single and multi-table UPDATE.

commit 9681dd024f5ec09e50b6dd1df21515046d61d44a
Author: Dag Wanvik <dag.wanvik@oracle.com>
Date:   Thu Sep 7 11:02:35 2017 +0200

    Bug#23529242 CONCAT: ASSERTION FAILED: MAYBE_NULL
    
    Analysis:
    
    In the repro:
    
       SET SQL_MODE= ''; // required to see issue, see [1]
       SELECT CONCAT(UNIX_TIMESTAMP(COUNT(1)), '|');
    
    we hit an assert that Item_func_concat::maybe_null is true when we see
    a NULL being returned from UNIX_TIMESTAMP.
    
    UNIX_TIMESTAMP return a NULL due to the illegal
    "datetime" value:
    
        mysql> select unix_timestamp(count(1));
        +--------------------------+
        | unix_timestamp(count(1)) |
        +--------------------------+
        |                     NULL |
        +--------------------------+
        1 row in set, 2 warnings (0.00 sec)
    
        Warning (Code 1292): Incorrect datetime value: '1'
    
    TIMESTAMP(1) and UNIX_TIMESTAMP(1) do behave differently:
    
        mysql> select timestamp(1);
        +--------------+
        | timestamp(1) |
        +--------------+
        | NULL         |
        +--------------+
        1 row in set, 1 warning (0.00 sec)
    
        mysql> select unix_timestamp(1);
        +-------------------+
        | unix_timestamp(1) |
        +-------------------+
        |                 0 |
        +-------------------+
        1 row in set, 1 warning (0.00 sec)
    
    and the documentation for UNIX_TIMESTAMP states unequivocally:
    
      "If you pass an out-of-range date to UNIX_TIMESTAMP(), it returns 0."
    
    But on the other hand when we have the COUNT(1) aggregate as an
    argument we get a NULL, which is a bug.
    
    Next, CONCAT has deduced it is not nullable based on the information
    about its arguments: UNIX_TIMESTAMP and the literal which is trivially
    not NULL. So, when that function does return a NULL,
    Item_func_concat::val_str hits the ASSERT.
    
    CONCAT has the wrong idea: it is indeed nullable because
    UNIX_TIMESTAMP is so, and the latter isn't marked as such. If it were,
    CONCAT would get that property too by the propagation in
    Item_func::fix_func_arg, but see [1].
    
    But back to COUNT(1): why doesn't the wrong argument COUNT(1), which
    evaluates to 1, give the same result as plain 1 as an argument.  The
    crucial difference is an intervening Item_ref in the item tree for the
    former which is sets null_value if an error is returned from the
    called get_date (called from Item_unix_timestamp::val_timeval ->
    Item::get_time_val -> Item_ref::get_date:
    
       return (null_value= (*ref)->get_date_result(ltime,fuzzydate));
    
    so in turn, UNIX_TIMESTAMP get its null_value set, too.  We see,
    though, that Item_unix_timestamp::val_timeval doesn't expect any
    underlying Item_ref to do just that (from its Doxygen):
    
    /**
       If argument is NULL, sets null_value. Otherwise:
       if invalid DATETIME value, or a valid DATETIME value but which is out of
       the supported Unix timestamp range, sets 'tm' to 0.
    */
    
    Fix:
    
    Let UNIX_TIMESTAMP(1) continue to return 0 when it sees an invalid
    argument, in contrast to TIMESTAMP().
    We can achieve this by letting Item_ref::get_date just return the error
    code of the underlying get_date_result as before, but explicitly propagate
    the null value (instead on setting it only based on the error code), thus:
    
      bool result= (*ref)->get_date_result(ltime,fuzzydate);
      null_value= (*ref)->null_value;
      return result;
    
    Note that Item_direct_ref::get_date already does the null propagation in this way.
    
    With the change, time_func with the new repro passes. I will run a
    larger set of tests to see if it has any repercussions.
    
    [1]
    
    If we use strict mode, CONCAT is marked as nullable disregarding its arguments
    in Item_str_func::fix_fields, cf this line, last condition:
      :
      /*
        In Item_str_func::check_well_formed_result() we may set null_value
        flag on the same condition as in test() below.
      */
      maybe_null= (maybe_null || thd->is_strict_mode());
      :
    
    This is why the setting of SQL_MODE is required in the repro.
    
    Repro added in func_time.test.
    
    Change-Id: Idd552856465ababd95a6c40794d67a57efb4b7ed

commit 3d1b7493a7b637795fc6598e38ca3b7c95dc8fb9
Author: Dag Wanvik <dag.wanvik@oracle.com>
Date:   Tue Oct 3 21:19:50 2017 +0200

    Bug#26813454 UNWARRANTED ERROR INDICATING WINDOW NAME NOT DEFINED
    
    The SELECT's window list gets corrupted, so the name resolution can't find the
    window definition.
    
    This happens because of a bug in the List class: for windows we use a combination
    of List::prepand and List::push_back.
    
    List::prepand is buggy and doesn't maintain the List::last invariant
    is the list is empty. ::prepand is used for the set of explicit window
    definitions.
    
    When we later attempt to push_back the window definition in the ORDER BY,
    the list gets corrupted.
    
    This patch fixes this, corrects the spelling to ::prepend, adds a test
    case to window_functions.test and a new unit test to sql_list-t.
    
    Change-Id: Icf05d976b5d9bf8c6c0f6ec68f9535b275f72de2

commit 62729a2f637e1898da84280e64baadd6ca10ff56
Author: Praveenkumar Hulakund <praveenkumar.hulakund@oracle.com>
Date:   Wed Oct 4 19:29:13 2017 +0200

    Revert "Bug#25761992 - VIEW VALIDATION WHEN PLUGINS ARE LOADED/UNLOADED"
    
    This reverts commit 155f876e7418b25b3c001bbe56eba5a12169a96b

commit dadd0e5e68af47cc3ba594accb05738b39262610
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Wed Oct 4 17:00:35 2017 +0200

    Remove SQL_EXPORTED_SOURCES PARENT_SCOPE, remnants from embedded build.
    Remove sql_rtree library, not needed since source file is part of gis library.

commit db86bd718d52602662511a883c8117fb9e48635f
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Mon Oct 2 14:40:34 2017 +0200

    Bug#26907731 IMPLEMENT -DWITH_SSL=SYSTEM FOR OSX AND WINDOWS
    
    The current default for WITH_SSL is "bundled", i.e. YaSSL
    We plan to remove YaSSL, and set default to "system" instead.
    
    Note that this patch does *not* change the default.
    
    There are no "system" SSL libraries for OsX and Windows.
    Instead we propose to install these libraries on all lab machines:
    
    OSX:
    http://brewformulas.org/Openssl
    brew install openssl
    
    Installs to:
    /usr/local/opt/openssl
    
    chmod -R a+rx /usr/local/opt/
    chmod -R a+rx /usr/local/Cellar/
    chmod -h a+rx /usr/local/opt/openssl
    chmod -h a+rx /usr/local/opt/openssl*
    chmod -h a+rx /usr/local/opt/openssl/lib/libcrypto.dylib
    chmod -h a+rx /usr/local/opt/openssl/lib/libssl.dylib
    
    Windows:
    https://slproweb.com/products/Win32OpenSSL.html
    
    Installs to:
    C:\OpenSSL-Win64
    
    Contents of Unattended install answer file "OpenSSL-1.0.2L_unattended.inf":
    [Setup]
    Lang=default
    Dir=C:\OpenSSL-Win64
    Group=OpenSSL
    NoIcons=0
    Tasks=copytobin
    
    Unattended install command:
    C:\OpenSSL-1.0.2L.exe /LOADINF="C:\OpenSSL-1.0.2L_unattended.inf" /SILENT
    /NORESTART
    
    This is done in order to simplify building/testing on OsX/Win. The
    alternative would be to download SSL packages from pushbuild,
    and run 'cmake -DWITH_SSL=/path/to/SSL/package'

commit 3774d992d7d3c9493c74c81fd02997840625da93
Author: Norvald H. Ryeng <norvald.ryeng@oracle.com>
Date:   Wed Oct 4 15:40:19 2017 +0200

    Bug #25510403 SRID OF RESULT OF SET OPERATION IS DIFFERENT FROM INPUT
    GEOMETRIES
    
    Problem: Some results produced by set operations are in SRID 0 when the
    arguments to the function are in another SRID.
    
    The functions manipulate the result from Boost.Geometry in order to make
    it as simple as possible, e.g., return only a linestring when a
    multilinestring contains only one element. In some cases, new geometries
    are created without setting the SRID, so it defaults to 0.
    
    Fix: Set the SRID to the input SRID.
    
    Change-Id: I981002ecbe92581da735f664419ded7d142759bc

commit e260df6592a76170c0fdc9fd2d10908edbef0d20
Author: Arnab Ray <arnab.r.ray@oracle.com>
Date:   Wed Oct 4 18:52:01 2017 +0530

    Fix RPM build failure
    
    Fix is to replace the @MYSQL_NO_DASH_VERSION@ version identifier
    with @MYSQL_RPM_VERSION@. The latter is required for cluster
    RPM builds

commit e817848456e5a65a1d36dceaa2961c5fd86cdcb8
Author: Knut Anders Hatlen <knut.hatlen@oracle.com>
Date:   Thu Sep 28 12:54:15 2017 +0200

    Bug#26679983: SIG 11 IN MAKE_JOIN_READINFO|SQL/SQL_SELECT.CC
    
    If an error happens when setting up the temporary table for duplicate
    weedout in a semi-join, for example because the disk is full, the
    server may terminate instead of gracefully giving an error message
    describing the problem.
    
    The fix is to check the return value from
    create_duplicate_weedout_tmp_table() and abort the query early if
    creating the temporary table failed.

commit 7dd2e0bd9c5a655b7380bdc2b8e626e8654ac79e
Author: Knut Anders Hatlen <knut.hatlen@oracle.com>
Date:   Wed Sep 27 10:26:10 2017 +0200

    Bug#26679495: SIG 11 IN SUBSELECT_HASH_SJ_ENGINE::CLEANUP|SQL/ITEM_SUBSELECT.CC
    
    If a query uses hash semi-join to execute an IN subquery, and an error
    is raised in subselect_hash_sj_engine::setup() (for example because
    the disk is full), the server may crash while cleaning up after the
    query, because some of subselect_hash_sj_engine's members are not
    initialized.
    
    The fix is to make the cleanup code check if the members are
    initialized before it tries to clean them up.

commit 8d86f48cf6422674472cef3e3cc4f81b81a8444a
Merge: 7d7ed5c 681a493
Author: Nisha Gopalakrishnan <nisha.gopalakrishnan@oracle.com>
Date:   Wed Oct 4 18:31:33 2017 +0530

    Merge branch 'mysql-5.7' into mysql-8.0

commit 681a493b546f4f78e3bd7f8f5299ef5812f3df2c
Merge: 6fd2a24 9236f35
Author: Nisha Gopalakrishnan <nisha.gopalakrishnan@oracle.com>
Date:   Wed Oct 4 18:29:59 2017 +0530

    Merge branch 'mysql-5.6' into mysql-5.7

commit 7d7ed5c830c3a02ffd4ead0f9eebb2d7febf9ee2
Author: Guilhem Bichot <guilhem.bichot@oracle.com>
Date:   Wed Oct 4 09:03:41 2017 +0200

    Bug#26907753 COMBINING CTE AND WINDOW FUNCTION GIVES WRONG RESULT
    
    Problem: a query with a CTE or derived table or view which itsef contains a
    window function returned a wrong result.
    
    We're creating a tmp table to serve as frame buffer for the window function.
    This table will store the value of Item "i+1" into a column; to access
    this column (Field object) we're reading the Item's result_field,
    assuming the Item is a sub-class of Item_result_field. Most often it is
    (e.g. Item_func_plus is) but here it's not, as "i+1" is actually
    Item_direct_view_ref wrapping Item_func_plus. So it's a wrong C cast
    which causes wrong results (in a debug build it rather causes an
    assertion failure).
    
    Fix: use get_tmp_table_item(), which returns result_field for the
    Item_direct_view_ref, without need for casting.

commit 32451a6ca4618ed35a764dd0e67206062361f3d3
Merge: 8b45a2e 02a3bdc
Author: Arnab Ray <arnab.r.ray@oracle.com>
Date:   Wed Oct 4 15:59:19 2017 +0530

    Null Merge branch 'mysql-5.7-cluster-7.6' into mysql-8.0-cluster-8.0

commit 8b45a2e7336c138697695c2943bf48d2369ee9d4
Author: Pekka Nousiainen <pekka.nousiainen@oracle.com>
Date:   Wed Oct 4 12:56:29 2017 +0300

    Merge branch 'wl7614-7.6' into wl7614-mtc
    
    (cherry picked from commit a85dcb480c0fc70c867ff7bf4acd74f2b7c97b70)

commit 02a3bdc7a6901d31ab319d3667dbb32273ec7757
Author: Hemant Dangi <hemant.dangi@oracle.com>
Date:   Thu Jun 22 13:56:27 2017 +0530

    Bug#26314756: ASYNCHRONOUS_CHANNELS_STATE_OBSERVER INITIALIZATION MISSING FROM DELAYED GR
    
    Issue:
    ======
    In case of delayed server start GR plugin starts from
    Delayed_initialization_thread::initialization_thread_handler class and not
    from plugin_group_replication_start(). asynchronous_channels_state_observer
    observers which keep track of all replication channel starts, stop, .. won't
    get start in this case as it is not getting initialized.
    As asynchronous replication channel cannot be started on secondary, while
    group replication is running on single primary-mode, this missing
    initialization of asynchronous_channels_state_observer will allow secondaries
    to start asynchronous replication channel and get data through asynchronous
    replication.
    
    Solution:
    =========
    Add missing initialize_asynchronous_channels_observer() function in
    Delayed_initialization_thread::initialization_thread_handler().
    
    (cherry picked from commit 160aef6fc359e093ddbaaa346fa1570e8357e4ac)

commit 935f7b104ca3c9152692f5ab271e9cff8c027986
Author: Harin Vadodaria <harin.vadodaria@oracle.com>
Date:   Thu Jun 22 12:30:49 2017 +0200

    Bug#26310935: MOVE AWS KMS CREDENTIALS TO DIFFERENT DIRECTORY
    
    Description: Moving AWS KMS credentials to a different
                 directory to facilitate source packages
                 creation without those credentials.
    (cherry picked from commit 153eb9cabd543d27f4bc112359e1af9d5636f34e)

commit fd025878fd828bfe3d8ebcfa2df7b2b5429710d9
Author: Allen Lai <zheng.lai@oracle.com>
Date:   Mon Jun 12 14:39:14 2017 +0800

    Bug#26243264 ALTER TABLE ON ENCRYPTED TABLE CAUSES FRM OUT OF SYNC AND DECRYPTS DATA
    
    This bug is cased by that we didn't set the encryption attribuite properly in altering table.
    
    Approved by Jimmy Yang <Jimmy.Yang@oracle.com>
    
    (cherry picked from commit 2ef1a5d1b626e1f5ae6a35c69f8a221f95a266f4)

commit c35a5a1903b4987bfe32fc8a9cf22d515dd61fdb
Author: Piotr Obrzut <piotr.obrzut@oracle.com>
Date:   Thu Jun 1 08:03:07 2017 +0200

    Merge branch 'mysql-5.6' into mysql-5.7
    
    (cherry picked from commit d8e6a93b0ead34c61aaa12c2c4a41d817c075ba8)

commit 6129e25998e135d6f700fca39df6b94c85b35059
Author: Dmitry Lenev <dmitry.lenev@oracle.com>
Date:   Mon May 29 22:40:23 2017 +0300

    Fix for bug#26106655 "DISCREPANCY BETWEEN IMPLICIT DB OF PARENT TABLE FOR FK AND REFERENCES PRIVILEGE".
    
    Check for REFERENCES privilege was using incorrect database in some cases.
    
    There was discrepancy between database which was used by SEs for parent
    tables and used for check of REFERENCES privilege in cases when no explicit
    database was specified for parent table.
    
    This patch removes the discrepancy by aligning check for REFERENCES
    privilege with SE behavior.
    
    (cherry picked from commit bd6aa24131505886b06381fcce97d97efa9f6002)

commit c95c85383be2274afb217834ebd965d78f810422
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Thu Jun 1 12:48:13 2017 +0200

    Bug#22834591: unused-local-typedef warnings from boost 1.59
    
    Build broken when all -DWITH_XXX=system
    
    cmake .. -DWITH_EDITLINE=system -DWITH_LIBEVENT=system -DWITH_LZ4=system -DWITH_MECAB=system -DWITH_SSL=system -DWITH_ZLIB=system
    
    CMake Error at plugin/keyring/CMakeLists.txt:53 (ADD_COMPILE_FLAGS):
      Unknown CMake command "ADD_COMPILE_FLAGS".
    
    Fix:
    INCLUDE(${MYSQL_CMAKE_SCRIPT_DIR}/compile_flags.cmake)
    
    (cherry picked from commit 70b6d76899732daf96da1f02777e4049dc2a6bca)

commit 829c994d50f1f9f4eef19b3d0efb6091314bf642
Author: Balasubramanian Kandasamy <balasubramanian.kandasamy@oracle.com>
Date:   Wed May 31 19:02:08 2017 +0530

    Update compatver to 5.6.37 for fedora26 server builds
    
    (cherry picked from commit d5aae9182fdc0d0f82c387561f99b3a00ec71411)

commit f0c5aa0042867e20da696d0920dc71b92738dccf
Author: Terje Rosten <terje.rosten@oracle.com>
Date:   Tue May 30 10:28:10 2017 +0200

    BUG#26148391 MYSQLD_PRE_SYSTEMD SCRIPT DOES NOT GET ERROR LOG FROM CUSTOM MY.CNF
    
    Script searched for log-error only, however log_error is also
    supported by mysqld, fixed by using regexp.
    
    (cherry picked from commit 10819a832cccddf894ba32b6b39f739b16283433)

commit e021f09db7cb14dcabfff546753306d6892f99dd
Author: Yashwant Sahu <yashwant.sahu@oracle.com>
Date:   Tue May 30 12:02:20 2017 +0530

    Bug#26163403: COPYRIGHT HEADER MISSING IN AUTHENTICATION_LDAP FILES
    
    * Added GPL licensing text for LDAP SASL client side plug-in.
    
    (cherry picked from commit 55df42e3a3ad7b39c793c66d41fff76dc9910143)

commit 97d4d3a102d36117b3d0594517d045f8f0758d47
Author: Harin Vadodaria <harin.vadodaria@oracle.com>
Date:   Mon May 29 13:43:22 2017 +0200

    WL#9143: Keyring plugin for the Amazon's AWS
             Key Management service
    
    Post-push fix: Fixing keyring_udf failure
    
    (cherry picked from commit 9c5ae02e3ce451c328cf6d851fa05a2d3410b0c3)

commit 9882eb0d422ca2b0b168d9a7298bfd888007c329
Author: Deepa Dixit <deepa.dixit@oracle.com>
Date:   Wed Oct 4 15:37:28 2017 +0530

    Bug#26918495: PERFSCHEMA.SOCKET_SUMMARY_BY_INSTANCE_FUNC FAILS ON SOLARIS
    
    Disabling the test on Solaris platform.
    
    Approved by Anitha Gopi <anitha.gopi@oracle.com> via IM.

commit ed3ada812f1069d586ec4b3580dbc5d985be5f35
Author: Pekka Nousiainen <pekka.nousiainen@oracle.com>
Date:   Wed Oct 4 12:42:33 2017 +0300

    wl#7614 options-02.diff
    
    loop delay 100ms to --checkloop option

commit b1e7e16ef18cae74db94089d2254616ff15ef07c
Author: Pekka Nousiainen <pekka.nousiainen@oracle.com>
Date:   Wed Oct 4 12:41:51 2017 +0300

    wl#7614 options-01.diff
    
    add simpler --pagebuffer option

commit 6f89cc3ee97d17d78d38ff4b3d4d9013367d0145
Author: Pekka Nousiainen <pekka.nousiainen@oracle.com>
Date:   Wed Oct 4 12:41:16 2017 +0300

    wl#7614 noregex-04.diff
    
    csv: small fixes

commit 5daac7316b7aed4def83bb4b9a0a582bbbde78d3
Author: Ganapati Sabhahit <ganapati.sabhahit@oracle.com>
Date:   Wed Oct 4 14:55:48 2017 +0530

    Fix for, Bug#25732961 : RPL.RPL_GENERAL_LOG FAILING ON DAILY TRUNK,

commit 28924a6944714e7c107c9ff574694fca6e44f396
Author: Lukasz Kotula <lukasz.kotula@oracle.com>
Date:   Mon Oct 2 11:44:22 2017 +0200

    Bug#26899284 - X PLUGIN CRASHES WHEN IT IS BUILD WITH -DDISABLE_MYSQLX_PROTOBUF_LITE=ON
    
    Description
    ===========
    Setting "DISABLE_MYSQLX_PROTOBUF_LITE" cmake option,
    causes a crash in X Plugin at usage of X message.
    
    Fix
    ===
    X Plugin was compiled with wrong "X message" header files. Instead using full
    definition it was using lite. Added to X Plugin definitions USE_MYSQLX_FULL_PROTO
    which enforces usage of full X message definitions.
    
    Reviewed-by: Grzegorz Szwarc <grzegorz.szwarc@oracle.com>
    RB: 17525

commit 9236f352b78365390e720729dfebabdcf9ad0fcc
Author: Nisha Gopalakrishnan <nisha.gopalakrishnan@oracle.com>
Date:   Wed Oct 4 10:56:20 2017 +0530

    BUG#21625016: INNODB FULL TEXT CASE SENSITIVE NOT WORKING.
    
    Analysis:
    ========
    
    Full text search on InnoDB tables using binary collation
    for indexed columns does not return case sensitive matches.
    
    For case sensitive matches, it is recommended to use binary
    collation for the indexed columns. During the processing
    of the FTS query, the query string is always converted to
    lower case regardless of the collation type. Hence, case
    insensitive matches were returned during the FTS search.
    
    Fix:
    ===
    Don't convert the query string to lower case during FTS
    search if the collation of the indexed column is of
    binary type.

commit a301bdfb929d4a3bababb205a4f56f3630df9030
Author: Christopher Powers <chris.powers@oracle.com>
Date:   Thu Sep 28 19:33:54 2017 +0200

    BUG#26281359 SERVER CRASH WHEN PFS PLUGINS INSTALLED AND DELETE FROM PFS TABLES CONCURRENTLY
    
    - Made PFS_unknown_acl more restrictive
    - Hardened table_plugin_table interface against race conditions

commit e0111a4c48074677618e9adbe9c509a29dde0c1e
Merge: aee361c 6fd2a24
Author: Nisha Gopalakrishnan <nisha.gopalakrishnan@oracle.com>
Date:   Tue Oct 3 21:05:33 2017 +0530

    Merge branch 'mysql-5.7' into mysql-8.0

commit 6fd2a247475cbfa3a1236f3aed7ee6e4e96bfb61
Author: Nisha Gopalakrishnan <nisha.gopalakrishnan@oracle.com>
Date:   Tue Oct 3 21:03:51 2017 +0530

    BUG#26626277: BUG IN "INSERT... ON DUPLICATE KEY UPDATE" QUERY
    
    Analysis:
    =========
    The AFTER UPDATE trigger is not invoked for 'INSERT..ON DUPLICATE
    KEY UPDATE', when the value to be updated and the new value
    provided are the same.
    
    The AFTER UPDATE TRIGGER was triggered only if the new and old
    record values were different for 'INSERT..ON DUPLICATE KEY UPDATE'
    handling. Since the values specified in the UPDATE clause
    and the old value were the same, the trigger was never invoked.
    
    Fix:
    ====
    The AFTER UPDATE trigger is invoked even if the values specified
    in the UPDATE clause and the old value are the same.

commit 373db2d2bb61ad676e300e8ab65cb4c33f71e2f2
Author: Lakshmi Narayanan Sreethar <lakshmi.narayanan.sreethar@oracle.com>
Date:   Tue Oct 3 18:50:57 2017 +0530

    Merge branch 'mysql-5.7-cluster-7.6' into mysql-trunk-cluster
    
    (cherry picked from commit b8cacf1593a39e67ac7a398130c9e81a73dcbdd1)

commit 1ded1f9e4cde87c5bbd174efbb13321625841be1
Merge: 877bda7 be86b89
Author: Lakshmi Narayanan Sreethar <lakshmi.narayanan.sreethar@oracle.com>
Date:   Tue Oct 3 18:50:24 2017 +0530

    Merge branch 'mysql-5.7-cluster-7.5' into mysql-5.7-cluster-7.6

commit be86b893613b228eae5f49ea4c073104100eced9
Author: Lakshmi Narayanan Sreethar <lakshmi.narayanan.sreethar@oracle.com>
Date:   Fri Sep 29 15:49:55 2017 +0530

    Bug#26898072 : CLUSTERJ TEST NOT RUN IN RPM/DEBIAN BUILDS IN MTR
    
    ClusterJ Tests are not run in above said platforms as MTR is unable to
    find either the clusterj jars or the libndbclient library. This patch
    updates the have_clusterj.inc file to fix this.

commit aee361c00d2800137955c7dfed82f29ceecddeb2
Author: Norvald H. Ryeng <norvald.ryeng@oracle.com>
Date:   Tue Oct 3 13:18:22 2017 +0200

    Bug #26188208 ST_CROSSES(GC, GC) RETURNS INCORRECT RESULT FOR CORNER
    CASE
    
    Problem: ST_Crosses may return an incorrect result when at least one
    parameter is a geometry collection and multiple elements of the geometry
    collection must be taken into account in order to determine whether the
    geometries cross.
    
    Fix: Change the way ST_Crosses is computed for geometry
    collections. First check that the two arguments have at least one
    interior point in common (and, if both arguments are of dimension 1,
    that the common interior is of dimension 0). Then check that at least
    one interior point of the first argument is in the exterior of the
    second argument.
    
    Also change how linestrings and multilinestrings are treated in geometry
    collections: The old behavior was to compute the union of all
    linestrings before removing the parts that overlap with polygons. But
    that does not necessarily preserve the boundary points. E.g.,
    MULTILINESTRING((0 0, 2 2),(1 1, 2 2)), which has a boundary point at
    (1 1), may be converted to MULTILINESTRING((0 0, 1 1), (1 1, 2 2)),
    which does not have a boundary point at (1 1). Therefore, the new
    behavior is to collect linestrings and multilinestrings in a common
    multilinestring without computing the union of them.
    
    Change-Id: Ibc918142df5fa87d783ee8d715b999322eca3a2f

commit 3d3b97188ed16a074c58cc42ff8aa4f892de15a8
Author: Lukasz Kotula <lukasz.kotula@oracle.com>
Date:   Tue Oct 3 09:51:00 2017 +0200

    Add .push file for mysql-trunk-xplugin

commit 971b5453e28517c73ad75bca9a45ac7e4ca48dda
Author: Chaithra Gopalareddy <chaithra.gopalareddy@oracle.com>
Date:   Tue Oct 3 12:57:03 2017 +0530

    Bug#21373532: RANGE TESTS FAILS DUE TO DIFFERENCE IN EXPLAIN OUTPUT
    
    
    Post push fix. Stabilizing the test again. Solaris debug builds differ in
    plan slightly.

commit 6a9c2d625854000a739fc736864760b29c619a1b
Author: Marc Alff <marc.alff@oracle.com>
Date:   Fri Sep 29 09:34:58 2017 +0200

    Bug#26428017 VARIABLE SCOPE OF AUTOCOMMIT NOT CHANGING TO
    COMMAND_LINE/EXPLICIT/EXTRA
    
    Issue:
    
    Before this fix, table performance_schema.variables_info
    was not reporting proper data for the autocommit system variable.
    
    In particular, the VARIABLE_SOURCE column was always COMPILED,
    even when the autocommit system variables set in command lines argument
    or in configuration files.
    
    Root cause:
    
    The root cause is specific to the --autocommit variable itself
    
    - Sys_autocommit is a Sys_var_bit
    - my_handle_options() does not support *bit* values, only booleans,
      so that my_handle_options() can not set the autocommit bit in
      THD::variables.option_bit directly
    
    To work around that, a *second* option, also named autocommit,
    was added in my_long_options[]
    
    As a result, there are *two* options named "autocommit",
    which confuses the code when keeping track of the option source.
    
    The --autocommit option source is not preserved (because it is not a system
    variable), while the @@global.autocommit system variable source is never
    updated (it is shadowed by --autocommit).
    
    Fix:
    
    Allocate a source structure for the --autocommit option,
    so that the source of --autocommit is preserved when parsing arguments.
    
    When the data is copied from --autocommit to @@global.autocommit,
    also copy the metadata (the option source)

commit e73f0b97179613594fb4780297aea6d0d027c2da
Author: Dmitry Shulga <dmitry.shulga@oracle.com>
Date:   Mon Oct 2 18:13:06 2017 +0700

    BUG#25978684: GR+XA: ASSERT `! IS_SET() AT SQL_ERROR.CC:406 WHEN MEMBER IS IN ERROR/RECOVERING
    
    The reason for the bug was that an error happened in before_commit hook
    (that is run during handling XA COMMIT) set error in Diagnostics_area but
    this fact wasn't reported correctly to a calling side.
    It resulted in crash when my_ok() is called to set successful status
    in the end of processing of statement XA COMMIT.
    
    To fix the bug the functions ha_commit_or_rollback_by_xid(),
    binlog_xa_commit(), binlog_xa_rollback(), binlog_xa_commit_or_rollback
    are modified to report and handle error condition. Moreover, handlerton's
    methods commit_by_xid_t and rollback_by_xid_t were modified to
    return status of XA operation as prescribed by XA specification. Formely,
    a status value was returned just as int and different storage engines could return
    uncompatible error codes. This patch introduces the new enumeration xa_status_code
    that lists error codes expected from handlerton methods commit_by_xid_t,
    rollback_by_xid_t.
    
    Also refactoring was done to move repeating code for finding transacton in recovery
    state and checking pre-conditions for XA transaction being recovered from methods
    Sql_cmd_xa_commit::trans_xa_commit, Sql_cmd_xa_rollback::trans_xa_rollback
    into standalone function find_trn_for_recover_and_check_its_state().

commit dd664ec3dc6afff1fd9a72acfee54518710d89d1
Merge: ed555b7 a2559d5
Author: Venkatesh Duggirala <venkatesh.duggirala@oracle.com>
Date:   Fri Sep 29 19:27:58 2017 +0530

    Merge branch 'mysql-5.7' into mysql-8.0

commit a2559d5becdf71474f72a9ae0bb71f886060b477
Author: Venkatesh Duggirala <venkatesh.duggirala@oracle.com>
Date:   Fri Sep 29 19:23:49 2017 +0530

    Bug #24918678 GCS: IMPROVE ERROR MESSAGE "ERROR ON OPENING ...ERROR= 0000000000000000" ON WINT
    
    Problem: There are two problems reported in the bug.
             a) ERROR= 00000000 in the error message always does not make sense.
             b) In windows platform, error message contains error number instead of detailed error message like in the unix platform.
                Eg: Connection to socket 2032 failed with error 10061
    
    Fix: For a) ERROR=0 is removed from the error message
         For b) In windows, code will use strerror_s now to get the detailed error message and will
                append that to error message.

commit ed555b746d5994e2d10dd0f5e5e2015783e15d0e
Merge: 4642adf 89a91e7
Author: Knut Anders Hatlen <knut.hatlen@oracle.com>
Date:   Fri Sep 29 15:50:02 2017 +0200

    Null-merge branch 'mysql-5.7' into mysql-8.0

commit 89a91e70c1077130ba2bf4b674febda8edaeec9f
Author: Knut Anders Hatlen <knut.hatlen@oracle.com>
Date:   Tue Sep 26 12:19:51 2017 +0200

    Bug#26867509: JSON_OBJECT CREATES INVALID JSON CODE
    
    When inserting JSON values from a grouped query into a string column,
    the inserted values could sometimes include the concatenation of all
    the values previously inserted into that column.
    
    The fix is to make Item_copy_json::save_in_field_inner() reset the
    buffer before converting the JSON value to text.
    
    (cherry picked from commit 0178fbc193bfaa0af49136e444ad5b73586d6f83)

commit 4642adfb35cad840ba79ec5cf690e4f3cc899006
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Fri Sep 29 10:34:24 2017 +0200

    Bug#26781567 REMOVE C LEGACY
    Bug#26612465 BUILDING WITH CMAKE 3.9.0 OR NEWER GIVES DEPRECATION WARNINGS
    
    Post push fix for: Move some InnoDB memcached files from C to C++
    Turns out we need some 'extern "C"' in order to load the memcached plugin:
    
    bin-ndb/storage/ndb/memcache/ndb_engine.so:
    undefined symbol: _Z11slabs_clsidP14default_enginem
    $c++filt _Z11slabs_clsidP14default_enginem
    slabs_clsid(default_engine*, unsigned long)
    
    _Z12item_releaseP14default_engineP10_hash_item
    item_release(default_engine*, _hash_item*)
    
    _Z30default_engine_create_instancemPFP18server_handle_v1_tvEPP16engine_interface
    default_engine_create_instance(unsigned long, server_handle_v1_t* (*)(), engine_interface**)
    
    On Mac:
    cmake changes to build dbclient_so
    
    storage/ndb/src/common/portlib/NdbCondition.cpp:175
    error: no matching
          function for call to 'clock_gettime'
      clock_gettime(clock_id, abstime);
    
    Tested with:
    ./mtr --mem --suite=ndb_memcache,ndbcluster
    
    (cherry picked from commit 310d0c4676f0d5d1d544eacfb7e184a7654d1f78)

commit 4ba318edfe59a463ab948ac9804503730a3260b8
Merge: 0178fbc 9c356e5
Author: Piotr Obrzut <piotr.obrzut@oracle.com>
Date:   Fri Sep 29 14:44:45 2017 +0200

    Merge branch 'mysql-5.7' into mysql-8.0

commit 9c356e55acc22d02a57e03bd49aa2c8d34fb3ccc
Author: Piotr Obrzut <piotr.obrzut@oracle.com>
Date:   Fri Sep 29 14:35:37 2017 +0200

    Bug #26835724 SERVER 5.7 REDIST CHECK IS FAILING DURING INSTALLATION
    
    Updated registry keys for the redist check.

commit 0178fbc193bfaa0af49136e444ad5b73586d6f83
Author: Knut Anders Hatlen <knut.hatlen@oracle.com>
Date:   Tue Sep 26 12:19:51 2017 +0200

    Bug#26867509: JSON_OBJECT CREATES INVALID JSON CODE
    
    When inserting JSON values from a grouped query into a string column,
    the inserted values could sometimes include the concatenation of all
    the values previously inserted into that column.
    
    The fix is to make Item_copy_json::save_in_field_inner() reset the
    buffer before converting the JSON value to text.
    
    Change-Id: I328c88f2fee95ff4406b21d961d9297a3b9fa624

commit 6b30a318baba68c38fe635e7ff6f645afbf15f96
Author: Mauritz Sundell <mauritz.sundell@oracle.com>
Date:   Thu Sep 28 22:06:46 2017 +0200

    Merge branch 'mysql-5.7-cluster-7.6' into mysql-trunk-cluster
    
    (cherry picked from commit fa0e3d16a2a08bb28a3112fda123a2796f0731fc)

commit a3d269127581e0c7de7bb1f74034964f6c130556
Author: Arnab Ray <arnab.r.ray@oracle.com>
Date:   Thu Sep 28 14:31:31 2017 +0530

    WL#8500 Adapt MySQL Cluster to 8.0
    
    - Disable ndb_blob_big and ndb_restore_schema_rewrites tests
    
    (cherry picked from commit 219d31f139482510f95f2dfa21da35b51545a72c)

commit 48363d07c449bd8520f8441a75a29f651b00eacd
Author: Arnab Ray <arnab.r.ray@oracle.com>
Date:   Thu Sep 28 13:07:45 2017 +0530

    Revert "Temporarily hack mtr.pl to allow a large number of failing tests"
    
    This reverts commit db6d63af46f16ff4fbbc31f7426447148cff7eeb.
    
    (cherry picked from commit a5831af223e23037b3351b69ea5d9d19ed1fe384)

commit 7afe496b1c4feefd07c5605d5d4e8e32346662d8
Author: Magnus Blåudd <magnus.blaudd@oracle.com>
Date:   Wed Sep 27 09:20:57 2017 +0200

    WL#8500 Adapt MySQL Cluster to 8.0
    
     - downgrade the "Adding ndb_top" message from important to just a normal
       information message, just as any other such messages.
    
    (cherry picked from commit 4439c4f6c064a1a48e73911960057c267a249642)

commit 242213f1d287a78058e821a6e2783d37af8fa7aa
Author: John David Duncan <john.duncan@oracle.com>
Date:   Wed Sep 27 20:14:01 2017 -0700

    Bug#26617328 (noclose) candidate fix.
    Fix memory leaks in some client programs where ndb_load_defaults()
    was used without ndb_free_defaults(), as found by address sanitizer.
    
    (cherry picked from commit 8bd8f1aaa779d26972ca9250da87e6c3fe73e271)

commit ae50a08827a6b5bbfe2d660809845ef3d8356cfe
Author: Dinesh Surya Prakash <dinesh.prakash@oracle.com>
Date:   Tue Sep 26 17:19:59 2017 +0530

    Bug #26730019 FUNCTION NDBCLUSTER_GET_BINLOG_REPLICATION_INFO() ERROR HANDLING IS NOT PROPER
    
    When creating a table with non-existing conflict function, cluster returns
    an improper error message.
    
    example:
    insert into mysql.ndb_replication values ("test", "t1", 0, NULL, "NDB$X(X)");
    create table t1 (a int key, X int) engine ndb;
    
    ERROR HY000: Got error 1626 'Unknown error code' from NDBCLUSTER
    
    This is because ha_ndbcluster returns unusual MySQL error code(not
    present in handler::print_error()) from ndbcluster_get_binlog_replication_info(),
    those are then returned from  ha_ndbcluster::create(). The MySQL Server
    understands that an error has occured while trying to create the table and
    calls the handler::print_error() function which is overloaded by
    ha_ndbcluster::print_error(), neither of those function understands the
    error code passed and thus an unknown error is printed.
    
    Fix the problem by calling my_error()/my_printf_error() directly when the
    error occurs(it's well known what the problem is), that error message is
    then save in the DA(Diagnostics area) and will not be overwritten by later
    code trying to set it to something else.
    
    After having called the MySQL error functions, it's possible to return
    almost any error code from ha_ndbcluster::create() but care must be taken
    to not choose one where the subsequent call to handler::print_error()
    causes a segmentation fault when printing the second error as that function
    wil be called regardless  of an error is already set or not.
    
    (cherry picked from commit 71dabf928304c23132b44e27421375aeead0777d)

commit 72f6a82c8f1869cefeece8391d9f29078df67f60
Author: John David Duncan <john.duncan@oracle.com>
Date:   Tue Sep 26 09:55:15 2017 -0700

    Disable ndb_memcache tests again. Problem has been diagnosed as a build
    error where ndb_engine.so cannot dynamically load libssl after being built
    with external (non-bundled) SSL.
    
    This reverts commit 534b431889d4569a4935ee18b27faf94e3805623.
    
    (cherry picked from commit b7f05e2d4018bc1293d6db37ac0386168a1a1f60)

commit 536b214ae0a0162f093389cecab002dc372bdda2
Author: Magnus Blåudd <magnus.blaudd@oracle.com>
Date:   Tue Sep 26 14:50:47 2017 +0200

    WL#9185 MySQL Cluster support for new DD
    
     - enable ndb_rpl_dd_partitions and ndb_rpl_dd_basic for which the
       problem has already been solved by prior patch
    
    (cherry picked from commit 724508c8452fd7c3d1356f8d74d7d35b3ae16387)

commit 182e67c64d92f993f47593e3606f07b8d1221d59
Author: Arnab Ray <arnab.r.ray@oracle.com>
Date:   Fri Sep 22 18:36:23 2017 +0530

    WL#8500 Adapt MySQL Cluster to 8.0
    
    - Fix the ndb_rpl_conflict_basic, ndb_rpl_rep_error, and
      ndb_rpl_conflict_epoch_extended_exceptions_table tests
    - The above tests failed with Result Content Mismatch due to
      the addition of error id to the error log in WL#11009
    - Fix is to remove the error id from the error log output being
      extracted
    
    (cherry picked from commit e296431837d9b27fe760e8376008c3df16778254)

commit a79ba7b36e921850fd920ddc2e5b331254cff19d
Author: Arnab Ray <arnab.r.ray@oracle.com>
Date:   Fri Sep 22 12:03:15 2017 +0530

    WL#8500 Adapt MySQL Cluster to 8.0
    
    - Fix failure of ndb_rpl_2other test
    - The failure was caused by the fact that slave-preserve-commit-order
      option is now ON by default. This test explicitly turns off the
      log-slave-update option which must be enabled for the former
      option i.e. slave-preserve-commit-order to be supported
    - Fix is to turn off slave-preserve-commit-order for the test and
      add checks to the test to ensure that both options have been
      turned off
    
    (cherry picked from commit c4e21d1394e3d2573098712fb3128181dd53ffc3)

commit 3508eb2389b16d24e4bc7229ec75d6613805f698
Author: John David Duncan <john.duncan@oracle.com>
Date:   Mon Sep 25 10:36:00 2017 -0700

    Bug#26824659 (noclose) Reenable ndb_memcache tests after failing to reproduce problem.
    
    (cherry picked from commit 534b431889d4569a4935ee18b27faf94e3805623)

commit fcb9f0cf90fc72831c4c4b35dea79e9a25a34494
Author: Mikael Ronström <mikael.ronstrom@oracle.com>
Date:   Mon Sep 25 11:15:16 2017 +0200

    Merge ../76_tree into mysql-trunk-cluster
    
    (cherry picked from commit afedfc3d999d64c5fa51475ed3ebeb95df61444f)

commit 3d9ac7074b2a2f9cbc45eebd5d35e086e553ab70
Author: Neha Kumari <neha.n.kumari@oracle.com>
Date:   Fri Sep 29 15:38:19 2017 +0530

    Bug#25656992:DROP TEMPORARY TABLE CREATES A TRANSACTION IN BINARY LOG ON READ ONLY SERVER
    
    Problem:
    
    If "DROP TEMPORARY TABLE..." gets executed on server with GTID enabled and
    read_only mode enabled, then 'DROP /!40005 TEMPORARY / TABLE IF EXISTS
    sometablename' gets inserted in server binary log. This creates errant
    transaction, that other slaves in cluster might not have and can break
    replication if server with errant transaction gets promoted to master and
    this transaction is already deleted from binary logs
    
    Fix:
    
    Do not write DROP TEMPORARY TABLE into binary log if nothing dropped.
    
    The fix is implemented through following changes.
    - Only count those temporary tables whose DROPs are actually going to
      be binlogged in mysql_rm_table for
      ER_GTID_UNSAFE_BINLOG_SPLITTABLE_STATEMENT_AND_GTID_GROUP
      diagnostic.
    - In mysql_rm_table_no_locks, process tables temporary tables needing and
      not needing binlog separately.
    - In mysql_alter_table, add a thd->decide_logging_format call in one of
      the temporary table opening paths in order to record the create-time
      binlog format for an ALTER TABLE-recreated temporary table correctly.

commit b662cb0659ccd3ba7bb62ed4c6c1d431246334c2
Author: John David Duncan <john.duncan@oracle.com>
Date:   Tue Sep 19 10:44:47 2017 -0700

    Bug#26435061 failure of ndb_spj_skew in MySQL 8.0
    Test uses a HAVING clause with implicit GROUP BY
    This is not legal under the default SQL_MODE in MySQL 8
    Fix by adding explicit GROUP BY clause.
    
    (cherry picked from commit 56976a45162f28ae243052d8d7b927153f4baefe)

commit 6d7f63f990c2d0a96c4bd07a68bd768127ed995d
Author: Maitrayi Sabaratnam <maitrayi.sabaratnam@oracle.com>
Date:   Fri Sep 22 18:14:58 2017 +0200

    Merge branch 'mysql-5.7-cluster-7.6' into mysql-trunk-cluster
    
    Conflicts:
    	sql/ha_ndbcluster.cc
    
    (cherry picked from commit 6b4dd7970965d16280d17f9cb81ba3a10f04aaf7)

commit 7eb63e67a67b3db4ab6a4fd7521c89f44cd51f05
Author: Mauritz Sundell <mauritz.sundell@oracle.com>
Date:   Fri Sep 22 15:51:16 2017 +0200

    Merge branch 'mysql-5.7-cluster-7.6' into mysql-trunk-cluster
    
    (cherry picked from commit 7934e30dfe7f2be534bf667fdc63b9eaeea7d6c7)

commit aa8dba29534ecfe320c5808face31eafcc845874
Author: Mauritz Sundell <mauritz.sundell@oracle.com>
Date:   Fri Sep 22 15:50:38 2017 +0200

    Merge branch mysql-5.7-cluster-7.6 into mysql-trunk-cluster
    
    (cherry picked from commit 6c2f5a5c85d7c2955add84ada6e50fb42b42eba5)

commit f82966190dd500d03ee19594e86af80132c2c53b
Author: Mikael Ronström <mikael.ronstrom@oracle.com>
Date:   Fri Sep 22 14:21:38 2017 +0200

    Merge ../76_26847666_fix into mysql-trunk-cluster
    
    (cherry picked from commit 4e362bc35d3ed41b881d966e02e43e6ea9bbe45d)

commit d53b4055ee73e1a2502b07e1213e213f5bb1d66f
Author: Mikael Ronström <mikael.ronstrom@oracle.com>
Date:   Fri Sep 22 13:18:23 2017 +0200

    Merge ../76_26847666 into mysql-trunk-cluster
    
    (cherry picked from commit 755bf06e6075001613bd35492927f818067ecea2)

commit e97feba95e28cd88bcf9e97d110891abf16a8ba6
Author: Pekka Nousiainen <pekka.nousiainen@oracle.com>
Date:   Thu Sep 21 22:00:07 2017 +0300

    Merge branch 'wl7614-7.6' into wl7614-mtc
    
    (cherry picked from commit 394c9242d5910d934ac4aec5b5690c0f801be171)

commit b1a24dd133700737d2b4fb15baba285b0a327022
Author: Arnab Ray <arnab.r.ray@oracle.com>
Date:   Thu Sep 21 18:51:21 2017 +0530

    WL#8500 Adapt MySQL Cluster to 8.0
    
    - Disable the information_schema_partitions test
    - Re-introduce the ndb_fk_no_fk_legacy result file
    
    (cherry picked from commit 15a90ff2b756c0265b320f003576dc43e0c549a2)

commit 3be4121a30d18a6de196157b2a455e1f83fb7945
Author: Arnab Ray <arnab.r.ray@oracle.com>
Date:   Thu Sep 21 13:06:46 2017 +0530

    Bug #26824659 FAILURE OF ALL TESTS IN THE NDB_MEMCACHE SUITE ON EL7 PLATFORM [noclose]
    
    - Disable the failing tests while we wait for a fix
    
    (cherry picked from commit c6eac64792336c207045b84f4e4695b65f3606e2)

commit 1ca1b89e051f6a5eda8cf4cf9910ac5a6b70e4e8
Author: Arnab Ray <arnab.r.ray@oracle.com>
Date:   Thu Sep 21 12:37:14 2017 +0530

    WL#8500 Adapt MySQL Cluster to 8.0
    
    - Add separate result files for the ndb_dist_priv_default and
      ndb_dist_priv_ndb tests. Both tests previously shared the same
      result file, ndb_dist_priv_common
    - Change the ndb_fk_no_fk_ndb test to use a result file with the
      same name in place of the ndb_fk_no_fk_legacy.result file used
      previously
    - Add the ndb_no_result_file include file to various tests that
      have no result file. An effort to generate result files for these
      tests would be good but that is left as a task for a later time
    - These changes were required due to the fix for Bug#26406981
      FLAG MISSING .RESULT FILE AS FAILED TEST. A test without a
      corresponding result file is now marked as failed by MTR.
    
    (cherry picked from commit 90dde3c3c06b5e6e2e63205bdb7b7b05a4ffcb77)

commit 98a6b99acff68d80e6fd29cd6ab9670dab6d926a
Author: Arnab Ray <arnab.r.ray@oracle.com>
Date:   Wed Sep 20 17:27:36 2017 +0530

    Bug #26794953 INCORRECT PARTITIONS INFORMATION IN INFORMATION_SCHEMA.PARTITIONS [noclose]
    
    - Add small test case to reproduce the issue described in the bug
    - Disable other tests while we wait for the fix
    
    (cherry picked from commit ad4ad39d759b63cf12092e5b06cad1786457352f)

commit 151a0d80de9013adbfcc39a3e29d2d35de137107
Author: Arnab Ray <arnab.r.ray@oracle.com>
Date:   Wed Sep 20 12:30:13 2017 +0530

    Bug #26794727 MISSING DISK DATA INFORMATION IN INFORMATION_SCHEMA [noclose]
    
    - Disable ndbcluster.tablespace_datafiles and ndb.ndb_dd_basic tests
    - Remove the part of the ndb.ndb_dd_intiial_lg test that was querying
      information_schema. This check is unnecessary since if the initial
      logfile group was not created, the next CREATE TABLESPACE will
      fail anyway
    
    (cherry picked from commit 259415c98d98f487004acca4f5ff010a265c94cb)

commit 5dc054532c48f11b065dfa6fe0111f6622e44dc0
Author: Lakshmi Narayanan Sreethar <lakshmi.narayanan.sreethar@oracle.com>
Date:   Wed Sep 20 17:39:43 2017 +0530

    Merge branch 'mysql-5.7-cluster-7.6' into mysql-trunk-cluster
    
    (cherry picked from commit d1514dce508943a577af89d11732636e845e77e9)

commit df0a1d8b4e763c3a4b21deb2af16bace86162b84
Author: Dinesh Surya Prakash <dinesh.prakash@oracle.com>
Date:   Fri Sep 8 17:21:07 2017 +0530

    bug #26484255 failure of ndb_global_schema_lock_error test on windows
    
    PROBLEM:
    
    when creating table in innodb(or any other data engine with cluster in no
    start mode, MySQL fails to create the table.
    
    EXAMPLE:
    
    --source ndb_restart_nostart.inc
    create table test.t2(i int primary key)engine=innodb;
    failed: 157: Could not connect to storage engine
    
    EXPLAINATION:
    
    When creating table, MySQL checks if the given table name already exists
    in all data engines using a handler function registerd by the engine.
    so, when the call comes to cluster handler function, cluster retrives
    the ndb dictonary and checks for the table name. But it ends in "no
    connection" failure as the cluster is not started yet.
    
    FIX:
    fix by changing handler fucntion to return table not found when there is no
    connection.
    
    (cherry picked from commit 1d986ff04ad0f78322d9cc311365dd2bf7d0ff14)

commit cc86e468f03b234676309f565b059338aa57d54c
Author: Magnus Blåudd <magnus.blaudd@oracle.com>
Date:   Fri Sep 1 08:29:01 2017 +0200

    Bug#26616966 FAILURE OF NDBINFO TEST
    
     - small difference in number of scanned bytes.
     - the test runs some "random queries" and then checks
       that these counters have moved. If one value or the
       other is smaller it's just because the "random queries"
       where ran a little differenti by the MySQL Server.
     - accept the new resuult as it's just a few bytes
       less.
    
    (cherry picked from commit f3ba39a2e389459a9e5124f5313f99960f116b3d)

commit 48a14810fcb000168e65ee0031fc2dfed7cc8fc5
Author: Magnus Blåudd <magnus.blaudd@oracle.com>
Date:   Thu Aug 31 10:53:22 2017 +0200

    Bug#26414104 FAILURE OF NDB_DDL TESTS THAT INCLUDE VERIFY_MYSQL_DD.INC
    
     - reimplement dummy callbacks to avoid that MySQL Server writes a SDI
       file for each table in the data directory. There is no  point in
       keeping .SDI files for each NDB table since the table and their
       metadata is alread safely stored in the transactional dictionary
       of NDB
     - this problem was caused by malicious removal of the previously
       implemented dummy callbacks while implementing WL#9538
    
    (cherry picked from commit 228696f5b2f303e4aabe9db15d2a040ee7ee8a5e)

commit c5eb6bb48e5a462bcd335996c52151a0c05548da
Author: Pekka Nousiainen <pekka.nousiainen@oracle.com>
Date:   Sat Sep 16 02:22:41 2017 +0300

    Merge branch 'wl7614-7.6' into wl7614-mtc
    
    (cherry picked from commit 836ed8428e8a931889314fa0a1164f237fcf8022)

commit cf54b62595b123cd43bb65c38b6d5f594114c920
Author: Pedro A. Ribeiro <pedro.a.ribeiro@oracle.com>
Date:   Thu Sep 14 17:17:46 2017 +0200

    Bug#26758939 : FAIL TO LOCK THREAD TO CPU
    
    Post push fix
    
    Replace deprecated type "my_bool"  by "bool".
    
    The first version of the patch introduced a goto call to label
    "error" which would  only be used when HAVE_LINUX_SCHEDULING
    is defined. This might cause compilation errors. Replaced goto call
    by a function return call with proper error code.
    
    This solution is not robust against future changes in error handling
    inside the function NdbThread_UnlockCPU(). However an improvement
    would require a major refactor of this function.
    
    (cherry picked from commit 82e2a77f0eb47c92417da1765fc9e7b6656f178f)

commit 26403022c7a87c6b8d5f765ec5a1816964d2cfaa
Author: Martin Sköld <Martin.Skold@oracle.com>
Date:   Thu Sep 14 15:24:20 2017 +0200

    Merge branch 'mysql-5.7-cluster-7.6' into mysql-trunk-cluster
    
    (cherry picked from commit eb4c8373458fb92da70d56624be61666818dd4e9)

commit df7e5fa79d96d6b798bc8300ba58f84277f19d5a
Author: John David Duncan <john.duncan@oracle.com>
Date:   Tue Sep 12 13:18:58 2017 -0700

    Adapt NDB memcache sandbox script to new locations of executables in build tree
    after wl#10524 moved them.
    
    (cherry picked from commit b5b9725afba379ae3d3a1a7b22ff576c3f806997)

commit a69e953d9e22d125b870f98b8cf10de107fdee8e
Author: Lakshmi Narayanan Sreethar <lakshmi.narayanan.sreethar@oracle.com>
Date:   Wed Sep 13 22:49:31 2017 +0530

    Merge branch 'mysql-5.7-cluster-7.6' into mysql-trunk-cluster
    
    (cherry picked from commit 18badfb08a479b515b3b4a0e586a113eaa75dded)

commit 5aa04f57ee762a9ce5dc01f3557c2c7793dad563
Author: Arnab Ray <arnab.r.ray@oracle.com>
Date:   Tue Sep 12 11:34:59 2017 +0530

    WL#8500 Adapt MySQL Cluster to 8.0
    
    - Update result file of the ndb_condition_pushdown test to remove
      the now redundant deprecation warnings for EXPLAIN EXTENDED
    - The EXTENDED option for EXPLAIN has been removed in WL#9678
    
    (cherry picked from commit 69bf88593cd185f5c491c32dae7382ef9c0c01cb)

commit 556cfb3eb9bcfe43dff82a93075f13eeec86adac
Author: Arnab Ray <arnab.r.ray@oracle.com>
Date:   Tue Sep 12 11:29:28 2017 +0530

    WL#8500 Adapt MySQL Cluster to 8.0
    
    - Update ndb_binlog_log_reads and ndb_binlog_restart tests to use
      the new default binary log name format, "binlog.XXXXXX"
    - Update result files with the new binary log names
    - Change introduced as part of WL#10470 Defaults: Enable Binary Log
    
    (cherry picked from commit a38e20f524829cb0db75a070764bf517f21364f5)

commit daa70e32aae2da90c6512b0434a86c1466e77e5f
Author: John David Duncan <john.duncan@oracle.com>
Date:   Mon Sep 11 18:35:02 2017 -0700

    Merge branch 'mysql-5.7-cluster-7.6' into mysql-trunk-cluster
    
    (cherry picked from commit e9fbc1405ef4ffdb25eefb589f053ea8dda773a3)

commit 1dc06f0709221cbf90f482f9fcc9270b178a14ef
Author: Arnab Ray <arnab.r.ray@oracle.com>
Date:   Mon Sep 11 21:59:40 2017 +0530

    WL#8500 Adapt MySQL Cluster to 8.0
    
    - WL#10475 : Defaults: Enable Parallel Replication Applier enabled
      parallel replication applier by default which broke a number of
      tests in the ndb_rpl suite
    - Fix is to set slave-parallel-workers to 0 when ndbcluster loads.
      This disables parallel slave applier execution for ndbcluster
    - It's still possible to change the global value (using SQL) but
      then the code which checks that slave_parallel_worker is used
      will kick in and say it's not an allowed config
    
    (cherry picked from commit d01850989b88d7d451f331826c5fe45771382fc5)

commit 13d8199dba8d1a662912e7078c259858c6e3c266
Author: Arnab Ray <arnab.r.ray@oracle.com>
Date:   Mon Sep 11 21:59:16 2017 +0530

    Revert "WL#8500 Adapt MySQL Cluster to 8.0"
    
    This reverts commit 7b1832f91c211b6cfcc6e70319c35e8aa44dbd47.
    
    (cherry picked from commit 7a6afafd503d174319a6194f04bc6d9693230b95)

commit d94f485fba6c195d006e913a11cf52879c050e93
Author: Arnab Ray <arnab.r.ray@oracle.com>
Date:   Mon Sep 11 18:02:54 2017 +0530

    WL#8500 Adapt MySQL Cluster to 8.0
    
    - WL#10475 : Defaults: Enable Parallel Replication Applier enabled
      parallel replication applier by default which broke a number of
      tests in the ndb_rpl suite
    - Fix is to set slave-parallel-workers to 0. This disables parallel
      slave applier execution for ndbcluster
    
    (cherry picked from commit 7b1832f91c211b6cfcc6e70319c35e8aa44dbd47)

commit e233df13977525fb2fcc3f7d44bc648268c69faf
Author: Lakshmi Narayanan Sreethar <lakshmi.narayanan.sreethar@oracle.com>
Date:   Fri Sep 8 00:48:00 2017 +0530

    Merge branch 'mysql-5.7-cluster-7.6' into mysql-trunk-cluster
    
    (cherry picked from commit bf6682aabdd362130ef13127188af4f0c4e77f13)

commit 8bfcd03e53de16d256831821c5fe7cde62bc017c
Author: Arnab Ray <arnab.r.ray@oracle.com>
Date:   Thu Sep 7 12:19:54 2017 +0530

    WL#8500 Adapt MySQL Cluster to 8.0
    
    - Update a number of tests and include files in the ndb_binlog suite
      to use the new default binary log name format, "binlog.XXXXXX"
    - Update result files with the new binary log names
    - Change introduced as part of WL#10470 Defaults: Enable Binary Log
    
    (cherry picked from commit 265b54cfc677b7af2d55cf71b4ce3cd253451c03)

commit dcf5a6b0eb745262d282b1ee92cfe9983748d2fd
Author: Arnab Ray <arnab.r.ray@oracle.com>
Date:   Thu Sep 7 12:03:51 2017 +0530

    Remove unwanted '+' that had found its way into earlier patch
    to allow a large number of failing tests
    
    (cherry picked from commit 0976aad1d5e394bc1ebfcd2dd53226495204de9c)

commit d165d408c15973764520fd88861bd18b946625d8
Author: Arnab Ray <arnab.r.ray@oracle.com>
Date:   Thu Sep 7 11:40:22 2017 +0530

    WL#8500 Adapt MySQL Cluster to 8.0
    
    - Update result file of the ndb_fk_is test
    - New result returns the correct UNIQUE_CONSTRAINT_NAME values
    
    (cherry picked from commit 1398e3fe0ecdd734427be599b6324d8fd1496547)

commit a9984665039dc7ca16d627b9516c567d44248050
Author: Priyanka Sangam <priyanka.sangam@oracle.com>
Date:   Wed Sep 6 20:15:13 2017 +0530

    Merge branch 'mysql-5.7-cluster-7.6' into mysql-trunk-cluster
    
    (cherry picked from commit b75363743aa6447c876dcd56d303d92167008e2b)

commit cebf08fc8f1a8a834e5d88c4bc82fb0c3e1d0d93
Author: Arnab Ray <arnab.r.ray@oracle.com>
Date:   Wed Sep 6 15:56:19 2017 +0530

    Temporarily hack mtr.pl to allow a large number of failing tests
    
    (cherry picked from commit db6d63af46f16ff4fbbc31f7426447148cff7eeb)

commit 3eab3ba8748798d0a9af05a5aba558a3ed470e8f
Author: Arnab Ray <arnab.r.ray@oracle.com>
Date:   Wed Sep 6 14:30:39 2017 +0530

    WL#8500 Adapt MySQL Cluster to 8.0
    
    - Add test case to tablespace_datafiles to show issue with missing
      information in i_s.files
    
    (cherry picked from commit 1a73dbda74079f85b5250a0f15596a9f87d82747)

commit c342a4618bb69400028a26303fe483bd5705a423
Author: Arnab Ray <arnab.r.ray@oracle.com>
Date:   Thu Aug 31 16:16:38 2017 +0530

    WL#8500 Adapt MySQL Cluster to 8.0
    
    - Remove the ENGINE=NDB specified for ALTER and DROP TABLESPACE
      statements in various tests
    - The ENGINE option for the above statements has been deprecated
    
    (cherry picked from commit 613de89e40b09556c2c7bad6f061e06407b1ff8b)

commit 7aa1409bc2379afdff89db84c2a8309df21d3801
Author: Arnab Ray <arnab.r.ray@oracle.com>
Date:   Thu Aug 31 12:12:35 2017 +0530

    Bug #26414247: FIX README IN NDB/NODEJS/
    
    - Remove the copyright line from the bottom of two nodejs README
      files
    - README files in general do not require copyright lines
    
    (cherry picked from commit 093be30b2309cd9edd0e559d28d781ebf38ae815)

commit 979cf932ba7361612d5816177720f3fd750e7883
Author: Lakshmi Narayanan Sreethar <lakshmi.narayanan.sreethar@oracle.com>
Date:   Fri Sep 1 21:10:58 2017 +0530

    Merge branch 'mysql-5.7-cluster-7.6' into mysql-trunk-cluster
    
    (cherry picked from commit 9f388bc2411c28cfd652dcfa1ea12a862d396d26)

commit 9d7a8bcf8d380b5b09e539cf6bdeb9ad8ba5d413
Author: Priyanka Sangam <priyanka.sangam@oracle.com>
Date:   Fri Sep 1 16:11:06 2017 +0530

    Merge branch 'mysql-5.7-cluster-7.6' into mysql-trunk-cluster
    
    (cherry picked from commit 534f81e95d93960a2752d1f89b503b3edb6ce44d)

commit 92c401691af26160b86bd34d1c89f785c1556a49
Author: Priyanka Sangam <priyanka.sangam@oracle.com>
Date:   Fri Sep 1 11:31:58 2017 +0530

    Merge branch 'mysql-5.7-cluster-7.6' into mysql-trunk-cluster
    
    (cherry picked from commit 36c8cf0a008b7169bdb743fd9fc9c9bde1f47d3e)

commit e5fa84d659fe2faddc878db4fceaeece2e7948d4
Author: Frazer Clement <frazer.clement@oracle.com>
Date:   Fri Sep 1 00:36:51 2017 +0100

    Merge ../mysql-5.7-cluster-7.6 into mysql-trunk-cluster
    
    (cherry picked from commit c6013b7d7e6c96b1c336ceb1e3b90c0279f69220)

commit 883347cb0eb2ef275afe7633eb6987cf8e2fb5fc
Author: Dyre Tjeldvoll <Dyre.Tjeldvoll@oracle.com>
Date:   Wed Sep 20 15:16:15 2017 +0200

    Bug#26126789: lock0lock.cc: ((m_mode - (0xful & m_mode)) - (0xf0ul & m_mode) - (257 & m_mode))
    
    Problem: Failed creation of a temporary table using REPLACE could in
    certain circustance lead to an assert in a later statement.
    
    Root cause was that the trx_t::duplicates member is only properly reset
    when calling handler::ha_reset(). This function is not guaranteed to be
    called at the end of each statement, but usually it is.
    
    Fix: Make Query_result_create::drop_open_table() call handler::ha_reset()
    explicitly for temporary tables. For normal tables close_thread_table()
    is called which already calls ha_reset().
    
    This fixes the observed problem, but note that there are other
    situations where a handler is closed without calling ha_reset().

commit 155f876e7418b25b3c001bbe56eba5a12169a96b
Author: Praveenkumar Hulakund <praveenkumar.hulakund@oracle.com>
Date:   Fri Sep 29 08:47:06 2017 +0200

    Bug#25761992 - VIEW VALIDATION WHEN PLUGINS ARE LOADED/UNLOADED
    
    View is validated (i.e view state is set to valid/invalid and view
    column metadata is updated) by a DDL operation on a table, view or
    stored function referenced by it. But if the view is referencing
    a INFORMATION_SCHEMA table then its not validated on a plugin
    load and unload.
    
    To fix this issue, changes are done to validate views referencing
    INFORMATION_SCHEMA tables in the following cases
    
      * On dynamic load of INFORMATION_SCHEMA plugin (INSTALL PLUGIN)
    
      * On dynamic unload of INFORMATION_SCHEMA plugin (UNINSTALL
        PLUGIN)
    
      * INFORMATION_SCHEMA plugin load during server restart.
    
      * INFORMATION_SCHEMA plugin unload during server restart.
    
      * on server restart, if INFORMATION_SCHEMA metadata version is
        updated.
    
    Change-Id: Ic0c2560053a45aaef6fd5e38577465ea9c181350

commit df486f91d93b5cb719ba3401d9fabc68c3b8874e
Merge: 62f44f4 c0d742d
Author: Arnab Ray <arnab.r.ray@oracle.com>
Date:   Fri Sep 29 11:47:23 2017 +0530

    Merge branch 'mysql-8.0' into mysql-8.0-cluster-8.0

commit 5e6997ce62a968263b18b32bca857c25c37fd3ff
Merge: ba91480 619fc2f
Author: Venkatesh Duggirala <venkatesh.duggirala@oracle.com>
Date:   Fri Sep 29 09:25:18 2017 +0530

    Merge branch 'mysql-5.7' into mysql-8.0

commit 619fc2f9a610f618e734d9057037915ab9745996
Author: Venkatesh Duggirala <venkatesh.duggirala@oracle.com>
Date:   Thu Sep 7 18:38:03 2017 +0530

    Bug#26618925 XA ROLLBACK WITH WRONG XID WILL BE RECORDED INTO THE BINLOG
    
    Problem: XA ROLLBACK is getting binlogged even when it is failed.
    
    Fix: Error case is checked when XA ROLLBACK is getting binlogged.
    Change-Id: Id45e29090b482546920471186ee93400810208ec

commit 877bda76bda4bf17479554e18543240e7a4083c9
Merge: a820458 82fe249
Author: Mauritz Sundell <mauritz.sundell@oracle.com>
Date:   Thu Sep 28 22:03:29 2017 +0200

    WL#9756 Miscellaneous refactoring.

commit 82fe249449406a5b5d266b634039888c149ce95d
Author: Mauritz Sundell <mauritz.sundell@oracle.com>
Date:   Tue May 2 21:59:29 2017 +0200

    Explicitly use 30 bit page numbers for RG_DISK_PAGE_BUFFER.
    
    DBTUP only supports 31 bit page numbers.
    
    Reviewed by Mikael Ronstrom 2017-05-09.

commit 9d44072599396a637a599cb257247f3c12ee3e26
Author: Mauritz Sundell <mauritz.sundell@oracle.com>
Date:   Tue May 2 21:55:34 2017 +0200

    Explicitly use 30 bit page numbers for RT_DBTUP_PAGE.
    
    DBTUP only supports 31 bit page numbers.
    
    Reviewed by Mikael Ronstrom 2017-05-09.

commit f7d83f80e83f27ba5731b25f146b7258c6193c8b
Author: Mauritz Sundell <mauritz.sundell@oracle.com>
Date:   Mon Apr 24 09:34:38 2017 +0200

    Refactoring. Let KeyTable2 and DLHashTable2 take default record type from pool.
    
    Reviewed by Mikael Ronstrom 2017-05-09.

commit f113d54b31ff988323bc4243cd2800886180ec1c
Author: Mauritz Sundell <mauritz.sundell@oracle.com>
Date:   Mon Apr 24 09:24:36 2017 +0200

    Refactoring. Let KeyTable take default record type from pool.

commit 5cbe4844641dd476e628c07e6b441a495b2354e8
Author: Mauritz Sundell <mauritz.sundell@oracle.com>
Date:   Wed May 17 14:06:19 2017 +0200

    Refactoring. Let KeyTable take default record type from pool.
    
    Reviewed by Mikael Ronstrom 2017-05-09.

commit 3cb9d12a24fd1c08f1632a36a1e9283d7970d332
Author: Mauritz Sundell <mauritz.sundell@oracle.com>
Date:   Sun Apr 23 00:46:33 2017 +0200

    Refactoring. Let DLHashTable take default record type from pool.
    
    Reviewed by Mikael Ronstrom 2017-05-09.

commit 01502741fe6099f802a55011d53cc4de60cf7657
Author: Mauritz Sundell <mauritz.sundell@oracle.com>
Date:   Sun Apr 23 00:00:53 2017 +0200

    Refactoring: Make IntrusiveList take record type from pool.
    
    Reviewed by Mikael Ronstrom 2017-05-09.

commit ee3abbeebb007d595bb6d75ac6d7efc6f5389ba3
Author: Mauritz Sundell <mauritz.sundell@oracle.com>
Date:   Wed May 17 14:02:40 2017 +0200

    Refactoring.  Add explicit Page8_pool for getPtr.
    
    Reviewed by Mikael Ronstrom 2017-05-09

commit 81e90d4d8d3f83211da7bd766d56e01bb45a149c
Author: Mauritz Sundell <mauritz.sundell@oracle.com>
Date:   Sat Apr 22 23:24:43 2017 +0200

    Refactoring.  Inherit record type when nesting pools.
    
    Reviewed by Mikael Ronstrom 2017-05-09

commit ad0a15f620bf53ddb770f90a873eb7d124021784
Author: Mauritz Sundell <mauritz.sundell@oracle.com>
Date:   Thu Apr 13 21:56:58 2017 +0200

    Pass TcConnectionrec* instead of TcConnectionrecPtr.
    
    To pass one word less, and make it more likely that arguments are passed
    using registers instead of stack.
    
    Reviewed by Mikael Ronstrom 2017-09-28.

commit 81b0dc672e50f59a4c474439d55c0b2a06397dd1
Author: Mauritz Sundell <mauritz.sundell@oracle.com>
Date:   Thu Apr 13 21:56:58 2017 +0200

    Remove block global tcConnectptr.
    
    For easier debugging.
    
    Reviewed by Mikael Ronstrom 2017-05-09.

commit ba9148062ff0c979567a313b026ec0f3e6855ae1
Merge: 97effff 3e30d26
Author: Lars Tangvald <lars.tangvald@oracle.com>
Date:   Thu Sep 28 17:52:04 2017 +0200

    Merge branch 'mysql-5.7' into mysql-8.0

commit 3e30d2616574d69bd2e09a8beac3adf728f5f7ec
Author: Lars Tangvald <lars.tangvald@oracle.com>
Date:   Thu Sep 28 14:22:10 2017 +0200

    Bug#26647168	PostPostpushfixfix
    
    The line excluding README also matched README-test, which
    still needs to be excluded, or the packaging will fail (5.7+)

commit 97effffcfccf595ee50310ae077068734be6d02c
Merge: c0d742d 6f35076
Author: Joao Gramacho <joao.gramacho@oracle.com>
Date:   Thu Sep 28 15:42:02 2017 +0100

    Merge branch 'mysql-5.7' into mysql-8.0

commit 6f35076f4d2fa1b9a890228ccaf5d8a89b48a14d
Author: Joao Gramacho <joao.gramacho@oracle.com>
Date:   Thu Sep 28 10:07:57 2017 +0100

    BUG#26878022 MYSQLBINLOG: ASSERTION `(OLD_MH->M_KEY == KEY) ||
                 (OLD_MH->M_KEY == 0)' FAILED
    
    Post push fix to ASAN issues.

commit c0d742d94637fc58ffcc81f2900a074156a2e65a
Merge: 7298f44 d51f5667
Author: Venkatesh Duggirala <venkatesh.duggirala@oracle.com>
Date:   Thu Sep 28 16:24:26 2017 +0530

    Merge branch 'mysql-5.7' into mysql-8.0

commit d51f5667e090b87fc5b0817886eac1fd419c9df1
Author: Venkatesh Duggirala <venkatesh.duggirala@oracle.com>
Date:   Thu Sep 28 16:24:05 2017 +0530

    Bug#25656123 MEMORY LEAK IN MASTER-MASTER GTID REPLICATION WITH SYNC_RELAY_LOG_INFO
    
    Problem:  Applier thread is leaking memory when it is updating
    repository tables for skipped events.
    
    Analysis:
    Applier thread does free_root(thd->mem_root,...) after every
    event group execution (in Query_log_event::do_apply_event and
    Row_log_event do_apply_event execution).
    But when Applier thread is skipping/igonring some events,
    free_root is not getting executed.
    
    Rotate_log_events are generated on Slaves with server_id=0
    for all the ignored events, so that the positions in the repository
    is updated properly even for ignored events.
     This kind of Rotate_log_event is generated when
           1) the event is generated on the same host and reached due
           to circular replication (server_id == ::server_id)
          2) the event is from the host which is listed in ignore_server_ids
          3) IO thread is receiving HEARTBEAT event from the master
          4) IO thread is receiving PREVIOUS_GTID_LOG_EVENT from the master.
    
    Slave skips an event if the slave_skip_counter is greater than zero.
    
    Even in case of events are skipped/ignored,  applier thread needs to update
    repository table. While updating repository table, applier thread uses thread's
    memory root .  We have to free thd's mem_root after we update the positions
    in the repository table if the event is a skipped/ignored event.
    Otherwise, imagine a situation where slave_skip_counter is big number
    or Slave is getting only ignored events, slave is updating the repository
    for these events.  All the memory used while these operations are going
    on is never freed unless slave starts executing the events
    (after slave_skip_counter becomes zero or slave gets non-ignorable events).
    
    Fix: After skipped/ignored event updates the repository table,  memory used
    by mem_root is not required any more and can be freed.

commit 7298f44d3dcc0c8dfdf772d54a386d6918fee4c3
Author: Daogang Qu <bill.qu@oracle.com>
Date:   Thu Sep 28 18:39:07 2017 +0800

    Bug #26666470  MYSQLD --HELP SHOULD PRINT DEFAULT VALUE OF RELAY-LOG AND RELAY-LOG-INDEX - post fix
    
    Generating opt_relay_logname and opt_relaylog_index_name from
    hostname before generating relay_log_basename and
    relay_log_index affects the generation of relay_log_basename
    and relay_log_index. If the hostname is configured to contain
    domain name, it causes the failure of the following tests:
    i_rpl.rpl_row_merge_engine_bug17018343
    rpl.rpl_dual_pos_advance
    rpl.rpl_row_img_blobs
    rpl.rpl_row_jsondiff_stress
    rpl_gtid.rpl_gtid_drop_table
    rpl_gtid.rpl_gtid_heartbeat_2slave
    rpl_gtid.rpl_line_topology_block_receiver
    i_rpl.default_hostname_check
    
    To fix the problem, generating opt_relay_logname and
    opt_relaylog_index_name from relay_log_basename and
    relay_log_index after they are generated. Introduce
    opt_relaylog_index_name_supplied to indicate that
    opt_relaylog_index_name is supplied by users from
    config file / command line, or generated from
    relay_log_index. Which can avoid the failure of
    starting slave after restarting server with option
    relay-log set to the new path (rpl_binlog_index
    can verify the case).

commit f211ec4e376ef48bcada0ec7fc44ea8131013d4d
Author: Neha Kumari <neha.n.kumari@oracle.com>
Date:   Thu Sep 28 13:09:41 2017 +0530

    Bug#24670909:USING TEMPORARY TABLES ON SLAVES INCREASES GTID SEQUENCE NUMBER
    
    Problem:
    Previously, a session disconnect causes DROP TEMPORARY TABLE IF EXISTS
    to be binlogged for all the opened temp tables in that session. Even
    though temporary table operation are not otherwise binlogged in row or
    mixed mode, this was done regardless of binary log format in use, as
    it was not tracked, whether a particular temp table was not created in
    STATEMENT mode - in which case it does need the DROP.
    For ROW/MIXED users, this behavior causes spurious binlog writes
    and GTIDs generated on otherwise read only servers.
    
    Fix:
    Track the binlog format at temporary table create time
    (open_table_uncached and after final decide_logging_format call for
    CREATE ... SELECT), and that can be used to decide whether a DROP should be
    logged or not in method close_temporary_tables.

commit 4a836ff8915ad1706f0b225d59bda405513dc471
Merge: f99f1cf df3d4a2
Author: Lars Tangvald <lars.tangvald@oracle.com>
Date:   Thu Sep 28 10:13:50 2017 +0200

    Merge branch 'mysql-5.7' into mysql-8.0

commit df3d4a2d1701331c235106d29762947daf794b51
Merge: 260d2e0 c0a5e58
Author: Lars Tangvald <lars.tangvald@oracle.com>
Date:   Thu Sep 28 10:11:29 2017 +0200

    Merge branch 'mysql-5.6' into mysql-5.7

commit c0a5e58d28ecc768b05e291ca94744bfbfefe424
Author: Lars Tangvald <lars.tangvald@oracle.com>
Date:   Thu Sep 28 10:01:21 2017 +0200

    Bug#26647168	Postpush fix
    
    The debian/rules file listed the default-location license files as skipped.
    This silently overrides their entries in the .install files so no packages
    contains the files, but without the packaging failing.

commit f99f1cf7498a83882f7afd3abc25171792849795
Author: Daogang Qu <bill.qu@oracle.com>
Date:   Thu Sep 28 13:18:18 2017 +0800

    Bug #26865538 	THE ACK RECEIVER DOES NOT WORK WELL WITH YASSL IN SEMISYNC - post fix 2
    
    Run the rpl_semi_sync_group_commit_deadlock_ssl with only openssl.

commit 2b2aac1992be3e52e9eb0c208ec1e159e3e87493
Author: Daogang Qu <bill.qu@oracle.com>
Date:   Thu Sep 28 11:16:53 2017 +0800

    Bug #26865538 	THE ACK RECEIVER DOES NOT WORK WELL WITH YASSL IN SEMISYNC - post fix
    
    Put rpl_semi_sync_group_commit_deadlock_ssl into rpl_nogtid as
    we did to rpl_semi_sync_group_commit_deadlock in mysql-8.0.

commit 06e33da15563aa37c16637e7ed8b5e54fe0e32b4
Merge: 58fdaba 260d2e0
Author: Daogang Qu <bill.qu@oracle.com>
Date:   Thu Sep 28 11:04:21 2017 +0800

    Merge branch 'mysql-5.7' into mysql-8.0

commit 260d2e08497c9156c044cd0dc44913ac2ed6831a
Author: Daogang Qu <bill.qu@oracle.com>
Date:   Thu Sep 28 10:59:19 2017 +0800

    Bug #26865538 	THE ACK RECEIVER DOES NOT WORK WELL WITH YASSL IN SEMISYNC
    
    YaSSL will read more than one acknowledgement packets together if
    there are more than one acknowledgement packets are ready in the
    system net buffer, but ack_receiver thread just handles the first
    acknowledgement after each poll(). So the following acknowledgement
    may never be handled if there is no new acknowledgement coming.
    Which causes that rpl_semi_sync_group_commit_deadlock.test timeout.
    
    To fix the problem, the ack_receiver thread handles all the
    acknowledgements in the system net buffer after each poll().

commit 58fdaba1f8936f7a5945658b43161a829e4faa21
Author: Xing Zhang <xing.z.zhang@oracle.com>
Date:   Wed Aug 30 14:30:31 2017 +0800

    Bug #25680866: _CHARACTERSET SPECIFICATIONS HAVE LOUSY PERFORMANCE FOR SOME CHARACTER SETS
    
    Literal character set name is translated to character set number by looping
    through all_charsets array. The performance is low and will get worse when
    we add new collations in the future.
    
    Fix:
    Change to use unordered_map to translate character set name to number.
    
    BM_LookupAllCollations   454 -> 383 ns/iter [+ 18.5%]
    BM_LookupAllCharsets     253 -> 180 ns/iter [+ 40.6%]
    
    Change-Id: I9730789ff2baa7b931a95d472c127c7192d7557a
    (cherry picked from commit d03d71be1f082d8c74487cf6787df29e8d1447c8)

commit c7bd4ed786578fca0c8cd6c2a92892ed862a2ac1
Author: Jimmy Yang <jimmy.yang@oracle.com>
Date:   Wed Sep 27 23:53:50 2017 +0200

    Bug #26299984 TMPDIR SET TO ROOT OF DRIVE LEAD TO SPAM;INVALID (OLD?)
    TABLE OR DATABASE NAME '
    
    Reviewed-by: Allen Lai <allen.lai@oracle.com>

commit 27a557be4f34dfb4a6a345e36be8ebe22d7592a2
Merge: b571ae2 60da023
Author: Joao Gramacho <joao.gramacho@oracle.com>
Date:   Wed Sep 27 15:49:17 2017 +0100

    Merge branch 'mysql-5.7' into mysql-8.0

commit 60da0231694e5a63e30fb6581047896213de4927
Author: Joao Gramacho <joao.gramacho@oracle.com>
Date:   Wed Sep 27 10:23:39 2017 +0100

    BUG#26878022 MYSQLBINLOG: ASSERTION `(OLD_MH->M_KEY == KEY) || (OLD_MH->M_KEY == 0)' FAILED
    
    Problem and Analysis
    --------------------
    
    The mysqlbinlog client program is trying to reallocate a buffer passing
    a pointer to an advanced position of the buffer instead of the base
    address of the buffer.
    
    This is making P_S and realloc function to not detect correct PSI memory
    key for the buffer.
    
    Fix

commit b571ae2af7c352008c1538a776fc4ceaa665d505
Merge: 2e10142 31666fc
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Wed Sep 27 13:57:38 2017 +0200

    NULL Merge branch 'mysql-5.7' into mysql-8.0

commit 31666fc8fee413337a7d37c96d1e7bd2e8592213
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Fri Sep 22 15:22:12 2017 +0200

    Bug#26612465 BUILDING WITH CMAKE 3.9.0 OR NEWER GIVES DEPRECATION WARNINGS [noclose]
    
    Patch 2 for 5.7
    - Increase CMAKE_MINIMUM_REQUIRED VERSION from 2.8.2 to 2.8.9
    - Keep a global list of KNOWN_CONVENIENCE_LIBRARIES
    - Add an ADD_IMPORTED_LIBRARY macro for merging of imported static libraries
      with "convenience" libraries.
    - Remove usage of LOCATION property in DTRACE_INSTRUMENT
    - Remove usage of LOCATION property in GET_DEPENDEND_OS_LIBS
    - Remove usage of LOCATION property when determining what to link into
      the embedded server.
    - Use $<TARGET_FILE:${LIB}> rather than LOCATION for the mysqld
      PRE_LINK command on windows.
    - Remove usage of LOCATION when creating ndbclient_so (shared client
      library for NDBCLUSTER)
    
    DTRACE and EMBEDDED have new code, everything else is backported from 8.0
    
    Change-Id: I5c6b5c722c8cedb0a521f3a47b6fa676efa938a2

commit 1ab422baafdf4741d5899e6a99b91be96c916638
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Wed Sep 27 12:50:09 2017 +0200

    Problem: some gis tests may fail in optimized mode with embedded server.
    
    Fix: Backport from patch for:
        Bug#25148549 REVISIT COMPILER FLAGS FOR ORACLE DEVELOPER STUDIO
    
    This reduces optimization level from -xO3 to -xO2 for one source file.
    
    Change-Id: I93a440764d422651ff85a69c87c168300c7ff051

commit 2e101424bab92050f380de620581ea8dc1539b68
Merge: 897dbfb 45122ba
Author: Lars Tangvald <lars.tangvald@oracle.com>
Date:   Wed Sep 27 10:24:42 2017 +0200

    Merge branch 'mysql-5.7' into mysql-8.0

commit 45122ba31d21da79c42718e9e3e9d1830d9d0485
Merge: 10e8972 36d6261
Author: Lars Tangvald <lars.tangvald@oracle.com>
Date:   Wed Sep 27 10:20:07 2017 +0200

    Merge branch 'mysql-5.6' into mysql-5.7

commit 897dbfbe237fb35e8ecd5f862dd86f7e45820f6e
Author: Chaithra Gopalareddy <chaithra.gopalareddy@oracle.com>
Date:   Wed Sep 27 13:26:12 2017 +0530

    Bug#21373532: RANGE TESTS FAILS DUE TO DIFFERENCE IN EXPLAIN OUTPUT
    
    Post push fix. Test is not stable on debug builds on some platforms.

commit 7c90f7fcea2ef4d32afaa6836cd62e618e651af9
Merge: 3193e02 10e8972
Author: Sujatha Sivakumar <sujatha.sivakumar@oracle.com>
Date:   Wed Sep 27 12:54:41 2017 +0530

    Bug#24812958: REPLICATION ERROR OCCURS, USE XA
    TRANSACTION(ONE PHASE)
    
    Merge branch 'mysql-5.7' into mysql-8.0

commit 10e8972daac6c58e4c3143d34cf7728e26ed4e93
Author: Sujatha Sivakumar <sujatha.sivakumar@oracle.com>
Date:   Wed Sep 27 12:50:59 2017 +0530

    Bug#24812958: REPLICATION ERROR OCCURS, USE XA
    TRANSACTION(ONE PHASE)
    
    Problem:
    =======
    Use XA transaction and execute DELETE or UPDATE statement.
    If `0 rows affected`, replication error occurs. But if more
    than 1 rows affected, replication error does not occur. And
    if use `XA PREPARE` (not use `ONE PHASE`), replication error
    doesn't occur.
    
    Analysis:
    =========
    The reported issue is reproducible in 'STATEMENT' based
    replication format.  In case of 'ROW' based replication if
    the DML operation results in '0 rows affected' then the
    query is not written to the binary log. Hence the scope of
    the issue is limited to 'STATEMENT' mode.
    
    Behavior of existing code:-
    =========================
    Transactional DML operations make use of two phase commit
    protocol. First phase is 'prepare' phase and the second
    phase is 'commit'.
    
    tc_log->prepare() - Prepare phase
    tc_log->commit() - Commit phase
    
    During 'Prepare Phase', if there is an XA transaction, which
    is in 'IDLE' state, then the transaction is written to the
    binary log. 'XA END' operation will set the XA_STATE to
    'IDLE'. 'XA PREPARE' and 'XA COMMIT ONE PHASE' commands will
    have their prior XA state as 'IDLE'.
    
    Sample binlog content for XA PREPARE:-
    
    XA END X'786174657374',X'',1
    XA PREPARE X'786174657374',X'',1
    
    Sample binlog context for XA COMMIT ONE PHASE:-
    
    XA END X'786174657374',X'',1
    #170904 server id 1 ...  XA PREPARE X'786174657374',X'',1
    XA COMMIT X'786174657374',X''
    
    In order to make 'XA COMMIT ONE PHASE' to follow the 'two
    phase commit' protocol the current XA_STATE of 'XA COMMIT
    ONE PHASE' is changed from 'IDLE' to 'PREPARED' as
    intermediate, right after the prepare phase is done.
    
    All these are required to enforce that no storage engine
    commit operation is done during prepare phase.
    
    During commit phase i.e during tc_log->commit() execution,
    storage engine specific commit operation is performed.
    
    Bug Scenario:-
    ============
    There are no rows that are affected, hence two phase commit
    operation will not be carried out. Prepare phase gets
    skipped for 'XA COMMIT ONE PHASE' operation.
    tc_log->prepare() is not executed.
    
    As per the above 'XA COMMIT ONE PHASE' rule XA_STATE is set
    to intermediate 'PREPARED' state. tc_log->commit() is
    invoked.
    
    During commit operation the code finds that the XA_STATE is
    'PREPARED' and doesn't log anything. A plain 'COMMIT'
    operation is written to the binary log.
    
    Binlog output in Bug scenario:
    ==============================
    SET TIMESTAMP=1504515863/*!*/;
    XA START X'786174657374',X'',1
    /*!*/;
    # at 943
    #170904 14:34:23 server id 1  end_log_pos 1050 CRC32
    0xf66ec1b4   Query thread_id=8 exec_time=0 error_code=0 SET
    TIMESTAMP=1504515863/*!*/;
    DELETE FROM xatest where id=1
    /*!*/;
    # at 1050
    #170904 14:34:23 server id 1  end_log_pos 1125 CRC32
    0xd1c7b760   Query thread_id=8 exec_time=0 error_code=0
    SET TIMESTAMP=1504515863/*!*/;
    COMMIT
    
    i.e 'XA START' is followed by plain 'COMMIT' in binary log.
    
    Ideally the binlog should be like this:
    =======================================
    SET TIMESTAMP=1504515056/*!*/;
    DELETE FROM xatest where id=1
    /*!*/;
    # at 1336
    #170904 14:20:56 server id 1  end_log_pos 1433 CRC32
    0x058559ec   Query thread_id=8 exec_time=0 error_code=0
    SET TIMESTAMP=1504515056/*!*/;
    XA END X'786174657374',X'',1
    /*!*/;
    # at 1433
    #170904 server id 1 ... XA PREPARE X'786174657374',X'',1
    XA COMMIT X'786174657374',X'',1 ONE PHASE
    
    When the slave server finds plain 'COMMIT' operation for an
    on going 'ACTIVE' XA transaction it throws the above error.
    
    Fix:
    ===
    Make use of the 'PREPARE' state of 'XA COMMIT ONE PHASE'
    operation to identify that the current phase of 'two phase
    commit protocol' as 'commit' phase and check if the XA
    COMMIT ONE PHASE' operation has already written its contents
    to binlog or not. If it has not written anything during
    'prepare phase' write the appropriate END statements in the
    binary log.

commit 3193e02423803eb81ff0a4c4b8f5906b690fc7a8
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Tue Sep 26 09:37:49 2017 +0200

    Bug#26612465 BUILDING WITH CMAKE 3.9.0 OR NEWER GIVES DEPRECATION WARNINGS [noclose]
    
    Post-push fix: ensure that merged library is re-built if a
    "convenience library" is re-built.
    
    (cherry picked from commit 462e8fdb874dfe8ffeb88721866b56224548a741)

commit 4b07f9fc86ae9801cb1c3e1006f715623b4261ed
Author: Mauritz Sundell <mauritz.sundell@oracle.com>
Date:   Fri Apr 28 23:42:25 2017 +0200

    Make restore use long lqhkeyreq.
    
    Keep short key-less lqhkeyreq for delete-by-rowid in wl8069.
    
    Reviewed by Mikael Ronstrom 2017-05-09.

commit a8204583917bf3594a392309d16d5a0eaaea3efc
Author: Mauritz Sundell <mauritz.sundell@oracle.com>
Date:   Tue Mar 14 08:41:04 2017 +0100

    WL#9756 Let DBTC handle its queue.  DBDIH only keep track of number of blocked verifications.
    
    Reviewed by Mikael Ronström 2017-03-28.

commit a235065e1896eaf8feefa1fc9b74a1c354c5a564
Author: Mauritz Sundell <mauritz.sundell@oracle.com>
Date:   Fri Apr 28 19:26:15 2017 +0200

    EXECUTE_DIRECT, new for long signals
    
    Reviewed by Mikael Ronstrom 2017-05-09

commit 754442972f45eea00cdac08381211e6145e37b85
Author: Mauritz Sundell <mauritz.sundell@oracle.com>
Date:   Tue Mar 14 00:54:04 2017 +0100

    WL#9756 Move verification queue out from DBDIH into DBTC with no signal flow changes.
    
    Reviewed by Mikael Ronström 2017-03-28.

commit 378e94875e9486d92c7270ee548e2bf34326aa59
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Tue Sep 26 14:57:35 2017 +0200

    Remove empty .cc files from mysqlpump:
    
    /usr/bin/ranlib: file: ../../archive_output_directory/libmysqlpump_lib.a(i_connection_provider.cc.o) has no symbols

commit ac4dc54814b723ccee9d35a67c309131f4d1103f
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Tue Sep 26 14:33:15 2017 +0200

    Bug #26574924 UPGRADE TO BOOST 1.65.0
    
    More source files need /bigobj on windows

commit 3467710c5bc1165c8bcced876c0e6566e562fe32
Author: Chaithra Gopalareddy <chaithra.gopalareddy@oracle.com>
Date:   Tue Sep 26 17:39:47 2017 +0530

    Bug#21373532: RANGE TESTS FAILS DUE TO DIFFERENCE IN EXPLAIN OUTPUT
    
    One of the test case change has already been pushed. This patch fixes
    index_merge_delete.test
    
    The variation in the plan is expected on different platforms as stated in
    the test file. Added what is done for other tests just below.
    
    Regarding the new change ( from "Delete all rows" to NULL
    in the plan) for some of the deletes is due to changes in 8.0. The
    condition (a subquery) is not a const_item() anymore which makes optimizer
    choose a different plan in 8.0 (in 5.7, const_item() for the subquery
    returns true).

commit 896b45daa27a9c8069fe864064b708136df85bc1
Author: Roy Lyseng <roy.lyseng@oracle.com>
Date:   Tue Sep 26 10:02:26 2017 +0200

    Bug#26798989: Sig 11 in find_table_in_global_list
    
    The problem here is when we have a materialized derived table that
    is determined to be superfluous, thus destroy_materialized() is
    called on it. Later, the function find_table_in_global_list() is
    called to search for duplicate table names for the table to be
    updated. When it finds the derived table, it is in an inconsistent
    state (table->table != NULL but table->table->s undefined).
    
    The solution is to let be the derived table's TABLE_LIST object
    remain in a consistent state after its materialized object is deleted,
    by setting its TABLE pointer to NULL.

commit ff830db8af9292ddcc39b03d9ba4656a2405d281
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Tue Sep 26 10:06:51 2017 +0200

    Revert "BUG#26562371 INNODB: ASSERTION FAILURE: LOCK0LOCK.CC:NNN:!TRX"
    
    This reverts commit c0dba9149ab7db2df1d7f8f4aa564cbdc07fb481.

commit 7f9dd3e6c87a94e46e576e7ce5932f04d3c02664
Author: Lukasz Kotula <lukasz.kotula@oracle.com>
Date:   Wed Sep 20 15:51:05 2017 +0200

    Bug#26789121 - MYSQLXCLIENT::GET_SOCKET_FD DOESN'T RETURN A VALID SOCKET
    
    Description
    ===========
    
    Method "mysqlxclient::get_socket_fd()" defined in mysqlxclient library
    always returns zero.
    
    Fix
    ===
    
    The method "mysqlxclient::get_socket_fd" is going to calls vio_fd to get
    the file descriptor.
    
    Change-Id: I8b268eb196001e466bf41799d8e8147cf4e911bf

commit 19344255047eacf1a6a9f142135f576c37981544
Author: Lukasz Kotula <lukasz.kotula@oracle.com>
Date:   Wed Sep 20 17:03:17 2017 +0200

    BUG#26828447 - LIBMYSQLXCLIENT HEADERS #INCLUDE FILES RELATIVE TO SERVER SOURCE TREE
    
    Description
    ===========
    
    mysqlxclient header files are intended for (eventual) external use,
    still the file names are relative to main source directory.
    
    Fix
    ===
    
    File names should be relative to "plugin/x/client" or
    "plugin/x/generated" directory. Reverted to original
    layout.
    
    Change-Id: I2d6d1fe81bd1a6fdae9fba4cdd2dcbe294c6bf30

commit c0dba9149ab7db2df1d7f8f4aa564cbdc07fb481
Author: Darshan M N <darshan.m.n@oracle.com>
Date:   Tue Sep 26 08:54:54 2017 +0200

    BUG#26562371 INNODB: ASSERTION FAILURE: LOCK0LOCK.CC:NNN:!TRX
    || !LOCK_REC_OTHER_TRX_HOLDS_EX
    
    Issue:
    ======
    
    After [ wl#10793: Use VATS for scheduling lock release under high load ],
    we ignore transaction locks that are marked or chosen as deadlock victim.
    
    This needs to be handled in debug functions where we assert for conflicting
    lock. We handle it already in lock_rec_other_has_expl_req() and a similar
    check is needed in lock_rec_other_trx_holds_expl().
    
    Fix:
    ====
    
    Fix for [Bug #24344131] - rb#16742, handles similar debug assert issue when
    a transaction is perceived committed after it is removed from rw list.
    
    So the fix for this bug involves putting together both the conditions and
    checking in all required places to avoid assert for conflicting locks:
    
    1)    Transaction is being committed [not in rw list]
    2)    Transaction is being rolled back
    
    RB: 17101
    Reviewed-by: Debarun Banerjee <debarun.banerjee@oracle.com>

commit 8e610651c0336eedcf2944feb6d1b817e6be8085
Merge: f4efe4e ef9d0d5
Author: Jaideep Karande <jaideep.karande@oracle.com>
Date:   Tue Sep 26 06:48:33 2017 +0200

    Merge branch 'mysql-5.7' into mysql-8.0

commit ef9d0d52890be4b3758af95aee859257838a9bda
Author: Jaideep Karande <jaideep.karande@oracle.com>
Date:   Tue Sep 26 06:42:53 2017 +0200

    BUG#25404162: GR CHECKS WRONG FOREIGN TABLES CASCADES
    
    Description:
    When group_replication_enforce_update_everywhere_checks=ON the Group
    Replication plugin checks if there are foreign keys cascades and disallows
    updates to such tables.
    However SET NULL operations are not checked, which can cause data
    in-consistency.
    
    Resolution:
    Block operations on child table if it has SET NULL.

commit f4efe4e7a3fde61d842882c903d64a2cfce2d8f3
Author: Jimmy Yang <jimmy.yang@oracle.com>
Date:   Sat Sep 23 01:02:54 2017 +0200

    WL#5989 Support InnoDB tablespace version in se_private_data of
    mysql.tablespaces
    
    Added Server Version number and Tablespace Version number to page 0
    of tablespaces and se_private_data of mysql.tablespaces

commit d173d38b1abe0767302560f036068e658094b9ad
Author: Luis Soares <luis.soares@oracle.com>
Date:   Mon Sep 25 17:29:57 2017 +0100

    BUG#25390330: ASSERT IN RPL_REPLICATION_OBSERVERS_EXAMPLE_PLUGIN_CHANNELS_RECEIVER_THREAD
    
    The channel service reports that the applier is waiting
    if all applier threads states are set to waiting. The
    test case asserts that the applier threads are waiting
    through the channel service immediately after a sychronization
    with the master. However, this by itself does not guarantee
    that the thread states will be set to waiting by the time
    the channel service is invoked. Indeed in some cases, that
    does not happen and an assertion is triggered.
    
    The expectation of the test is that eventually the threads
    will be waiting. As such, the fix is to only proceed to
    testing the observer plugin after the initial conditions
    are met, i.e., master and slave are synchronized and
    the applier threads have updated their states correctly.

commit bb3a07bf049290d2b596754d723f24f902b159fa
Author: Satya Bodapati <satya.bodapati@oracle.com>
Date:   Mon Sep 25 16:48:25 2017 +0200

    Followup to revert of 5bd7ad008480667dfb5cae6de7efc6b40473e829

commit ee6e10a7c66a4999adbbbc1f111d96cbbc675608
Merge: 84e1e6c 5bd7ad0
Author: Thirunarayanan Balathandayuthapani <thirunarayanan.balathandayuth@oracle.com>
Date:   Mon Sep 25 18:59:30 2017 +0530

    Merge branch 'mysql-5.7' into mysql-8.0

commit 5bd7ad008480667dfb5cae6de7efc6b40473e829
Author: Thirunarayanan Balathandayuthapani <thirunarayanan.balathandayuth@oracle.com>
Date:   Mon Sep 25 18:56:33 2017 +0530

    Revert "Bug #25076416   VIRTUAL COLUMN IS NOT CONSIDERED WHILE"
    
    This reverts commit f5f08d016519dfaf9f7e56eb9243be4e00462cd1.

commit 84e1e6c1dd3fdc0c235a7e566f8fada8da8890b9
Author: Evgeny Potemkin <evgeny.potemkin@oracle.com>
Date:   Mon Sep 25 15:47:02 2017 +0400

    WL#8867: Add JSON_TABLE function
    
    Post-push test update.

commit cec5700af4091316c682d1172584442c39db8bfb
Merge: 079e0e6 f5f08d0
Author: Thirunarayanan Balathandayuthapani <thirunarayanan.balathandayuth@oracle.com>
Date:   Mon Sep 25 17:09:52 2017 +0530

    Merge branch 'mysql-5.7' into mysql-8.0

commit f5f08d016519dfaf9f7e56eb9243be4e00462cd1
Author: Thirunarayanan Balathandayuthapani <thirunarayanan.balathandayuth@oracle.com>
Date:   Mon Sep 25 17:04:25 2017 +0530

    Bug #25076416   VIRTUAL COLUMN IS NOT CONSIDERED WHILE
                    FETCHING THE AUTOINC COLUMN
    
    Analysis:
    
    While fetching the auto-increment value from the table, InnoDB
    tries to find the index which has the first column as autoincrement column.
    While searching the index, InnoDB uses column offset of the table
    to fetch the auto_increment column but virtual column is not considered
    while searching the column and it leads to wrong column.
    
    Fix:
    
    Consider the virtual column of the table while fetching the
    auto_increment column from the table using column offset.
    
    Reviewed-by: Jimmy Yang<Jimmy.yang@oracle.com>
    RB: 16281

commit 079e0e68ecfe789e23b1617b2603bb57388b0e07
Author: Abhishek Ranjan <abhishek.ar.ranjan@oracle.com>
Date:   Fri Sep 22 15:42:21 2017 +0530

    Bug#26636238 : ERROR/INPLACE UPGRADE TO READ-ONLY 8.0: PERFORMANCE
                   SCHEMA INITIALIZATION FAILED
    
    Post push fix:
    
    Fix test case to check performance schema version mismatch failure
    with --innodb-read-only instead of --read-only option.

commit 4c3ec2b9975d59e91ecd83010647f2f504f48a51
Author: Evgeny Potemkin <evgeny.potemkin@oracle.com>
Date:   Fri Sep 22 20:57:44 2017 +0400

    WL#8867: Add JSON_TABLE function
    
    Complete implementation + bug fixes.

commit 6847eb792aa89d7ce87adaa5e38b94d15bd370d5
Merge: 6f59035 977d6e5
Author: Mikael Ronström <mikael.ronstrom@oracle.com>
Date:   Mon Sep 25 11:14:58 2017 +0200

    Merge ../75_tree into mysql-5.7-cluster-7.6

commit 977d6e575788d04c6abf80ead7f24fa98a190658
Merge: 3f310f4 f3824da
Author: Mikael Ronström <mikael.ronstrom@oracle.com>
Date:   Mon Sep 25 11:14:23 2017 +0200

    Merge ../74_tree into mysql-5.7-cluster-7.5

commit f3824da79a8af89d8d3b5ff486fea100d4224bcd
Merge: 6e374cd a7ac4a4
Author: Mikael Ronström <mikael.ronstrom@oracle.com>
Date:   Mon Sep 25 11:14:06 2017 +0200

    Merge ../73_tree into mysql-5.6-cluster-7.4

commit a7ac4a49177f441e9c302ae4b69cce98f61aa542
Merge: ebc8f3e ee3ee19
Author: Mikael Ronström <mikael.ronstrom@oracle.com>
Date:   Mon Sep 25 11:13:52 2017 +0200

    Merge ../72_tree into mysql-5.6-cluster-7.3

commit ee3ee1930d50594ab109e781178bc316ea1e2c94
Author: Mikael Ronström <mikael.ronstrom@oracle.com>
Date:   Mon Sep 25 10:23:00 2017 +0200

    BUG#21049554: Attempt to fix bugs for OM_SYNC was a failure, now second attempt

commit 838d5a3caf3072198b8b4f5fdcce12b232834728
Merge: 6a4fadf b35166a
Author: Sujatha Sivakumar <sujatha.sivakumar@oracle.com>
Date:   Mon Sep 25 13:00:01 2017 +0530

    Bug#26324852: THERE IS NO LOCAL IP ADDRESS MATCHING THE ONE
    CONFIGURED FOR THE LOCAL NODE
    
    Merge branch 'mysql-5.7' into mysql-8.0

commit b35166a83661227ed237bb70c31354d2f1cd4e43
Author: Sujatha Sivakumar <sujatha.sivakumar@oracle.com>
Date:   Mon Sep 25 12:56:19 2017 +0530

    Bug#26324852: THERE IS NO LOCAL IP ADDRESS MATCHING THE ONE
    CONFIGURED FOR THE LOCAL NODE
    
    Problem:
    ========
    We bind many virtual IPs in one machine, it seems that group
    replication can not recognize all of the virtual IPs that we
    bind.
    
    Execution of "start group_replication" will fail and error
    log shows :
    
    '[GCS] There is no local IP address matching the one
    configured for the local node (10.202.44.222:24901).
    
    Analysis:
    =========
    No matter how many virtual IPs that users configure, MySQL
    group replication will be able to fetch only the first 12
    IPs among them. The reason for that is, within the code an
    initial buffer of size 512 bytes is allocated to hold list
    of network interfaces. Each interface is represented by
    'struct ifreq'. The size of 'struct ifreq'= 40 bytes.
    
    Hence the buffer that was provided by the group replication
    layer can hold a maximum of 12 interfaces.
    
    i.e (40 *12)=480 < 512.
    
    Documented behavior of 'ioctnl':
    ================================
    'ioctnl' function is used to retrieve the list of interface
    addresses. The user will be passing a buffer and the kernel
    fills the ifreqs with all current L3 interface addresses
    that are running. Along with this the kernel also returns
    actual length in ifc_len. If ifc_len is equal to the
    original length the buffer probably has overflowed and user
    should retry with a bigger buffer to get all addresses.
    
    In order to do an appropriate overflow check, the ifc_len
    should be a multiple of struct ifreq size. Since the
    initialized value '512' is not a multiple the code will
    return earlier after reading the first 12 IP addresses.
    
    Fix:
    ===
    Changed the initial buffer size to be a multiple of struct
    ifreq size.

commit 6a4fadfdd0a0865b89ad2911bf6a4d5a1083a011
Author: Thirunarayanan Balathandayuthapani <thirunarayanan.balathandayuth@oracle.com>
Date:   Mon Sep 25 10:49:53 2017 +0530

    Bug #26299705	ASSERTION FAILURE: TRX0I_S.CC:1003 FOR FETCH_DATA_INTO_CACHE_LOW
    
    Problem:
    =======
    	Race condition while checking the transaction state without
    transaction mutex for information schema query.
    
    Solution:
    ========
    	Access the state after taking transaction mutex.
    
    Reviewed-by: Bin Su <bin.x.su@oracle.com>

commit 947db42ce737c878c6b928deda5cc2652fcb8f99
Author: Sivert Sorumgard <sivert.sorumgaard@oracle.com>
Date:   Wed Sep 6 22:56:20 2017 +0200

    Bug#22486020 TARGET TABLESPACE META DATA LOCK NOT ACQUIRED DURING ALTER UNDER LOCK TABLE
    
    Make sure that target tablespaces are locked when
    issuing ALTER TABLE under LOCK TABLE, and add a new
    testcase.
    
    Also re-enabling a different test case in the same
    test file (unrelated to the bug addressed here).

commit 832c969655afdce7ec16e81f674bd3db05089124
Author: Daogang Qu <bill.qu@oracle.com>
Date:   Sun Sep 24 09:31:19 2017 +0800

    Bug #26665558   MYSQLD --HELP SHOULD REFRAME HELP MESSAGE FOR LOG-BIN
    
    The current mysqld --help message is fishy for --log-bin[=name]
    after wl#10470.
    
    Rewrite the help message to "Configures the name prefix to use for
    binary log files. The name prefix defaults to hostname-bin if the
    --log-bin option is not configured. To set a different name prefix
    for binary log files use --log-bin=name. To disable binary logging
    use the --skip-log-bin or --disable-log-bin option." base on the
    following two changes in wl#10470:
    1. If --log-bin is not configured, default binary logging is
       ENABLED.  corresponding variables are set as follows:
         log_bin= ON
         log_bin_basename= {datadir}/hostname-bin
         log_bin_index= {datadir}/hostname-bin.index
    2. If --log-bin is configured without a string or with an empty
       string, binary logging is ENABLED, and, corresponding variables
       are set as follows:
         log_bin= ON
         log_bin_basename= {datadir}/hostname-bin
         log_bin_index= {datadir}/hostname-bin.index

commit 6f2d04025ef88c7fdcb612a3b09044b13ca00208
Author: Daogang Qu <bill.qu@oracle.com>
Date:   Sun Sep 24 09:15:28 2017 +0800

    Bug #26666470 	MYSQLD --HELP SHOULD PRINT DEFAULT VALUE OF RELAY-LOG AND RELAY-LOG-INDEX
    
    The relay-log and relay-log-index are set to default values
    `hostname`-relay-bin and `hostname`-relay-bin.index
    respectively. But, same are not shown through mysqld
    --verbose --help command.
    
    To fix the problem, make the mysqld --verbose --help
    command show the default values `hostname`-relay-bin
    and `hostname`-relay-bin.index respectively.

commit 08cc72416982448cdf77289f6f055c5722c5d477
Author: Gleb Shchepa <gleb.shchepa@oracle.com>
Date:   Fri Sep 15 03:24:45 2017 +0400

    WL#8063: True bottom-up server parser: refactoring of the LOAD statement

commit 6f5903523fdeb46263a27229127eb4fc325a8791
Author: Maitrayi Sabaratnam <maitrayi.sabaratnam@oracle.com>
Date:   Fri Sep 22 14:55:19 2017 +0200

    Bug#26764270 - ALTER TABLE STORAGE FROM DISK TO MEMORY DOESN'T MOVE DISK COLUMN DATA TO MEMORY
    
    Patch contains:
    - When table storage is changed, copy algorithm is chosen if appropriate.
    - Returns better error msg when an index is created on an explicit disk column.
    - A test checking table storage changes.

commit de548d48c539b5ddfb8552ae3a529abb059e1cd9
Author: Mauritz Sundell <mauritz.sundell@oracle.com>
Date:   Fri Sep 22 15:49:53 2017 +0200

    wl#7614 Output to $NDB_TOOLS_OUTPUT instead of NDB_TOOLS_OUTPUT in ndb_import2.test.

commit c810dcbef3b44a925529fcb49383be9751df874c
Author: Neha Kumari <neha.n.kumari@oracle.com>
Date:   Fri Sep 22 19:19:33 2017 +0530

    Bug#18843730:BINLOG_FORMAT=MIXED UNCONDITIONALLY USES ROW FORMAT IF THERE ARE OPEN TMP TABLES
    
    Problem:
    
    When master and slave (with log-slave-updates enabled) are both running with
    MIXED mode replication and master executes a query that is logged in ROW
    format, after that query any other query that would be otherwise safe to log
    in STATEMENT format is unconditionally logged in ROW format for the whole
    duration of the connection.
    This can be problematic for those connections that stay connected for
    very lengthy periods, such as when using persistent connections or
    connections pools, or the MySQL slave server's slave SQL thread.
    
    Fix:
    Track if statement creates or drops a temporary table
    and log in ROW if it does.
    This means that any statement that is using exclusively temporary tables will not
    be binlogged at all. Any DDL or DML that uses a mix of temporary and
    non-temporary tables will be binlogged in ROW format for the
    non-temporary table operations. The one exception is DROP table when
    dropping a temporary table which will always be binlogged as DROP
    TEMPORARY TABLE IF EXISTS on the master.
    
    Also, adjust the rules of allowing changing the session binlog_format in the
    presence of open temp tables as follows: forbid changing from ROW or
    MIXED to STATEMENT, as their CREATE TEMPORARY TABLE statements might
    not have been binlogged. All other transitions are allowed now.

commit 123b3d21a9757f625269204f7ecc14c715ecb741
Merge: e3d967d 3f310f4
Author: Mauritz Sundell <mauritz.sundell@oracle.com>
Date:   Fri Sep 22 15:48:27 2017 +0200

    Merge branch 'mysql-5.7-cluster-7.5' into mysql-5.7-cluster-7.6

commit e3d967d83904f4b60b8ffc73a7ab62ce7a49e12e
Author: Mikael Ronström <mikael.ronstrom@oracle.com>
Date:   Fri Sep 22 14:21:26 2017 +0200

    BUG#26847666: Fix

commit 3f310f4d43a80ce4c0c45792f83daa6f6efde9ab
Merge: 3a94f97 6e374cd
Author: Mauritz Sundell <mauritz.sundell@oracle.com>
Date:   Fri Sep 22 14:05:41 2017 +0200

    Merge branch 'mysql-5.6-cluster-7.4' into mysql-5.7-cluster-7.5

commit 6e374cdad76999485fa635e67a1d6335a9b47e1e
Merge: 71d64d8 ebc8f3e
Author: Mauritz Sundell <mauritz.sundell@oracle.com>
Date:   Fri Sep 22 14:04:42 2017 +0200

    Merge branch 'mysql-5.6-cluster-7.3' into mysql-5.6-cluster-7.4

commit ebc8f3e8a1a593f27e98dee5f09947915b7ac51c
Merge: 3745db8 450f189
Author: Mauritz Sundell <mauritz.sundell@oracle.com>
Date:   Fri Sep 22 14:04:27 2017 +0200

    Merge branch 'mysql-5.5-cluster-7.2' into mysql-5.6-cluster-7.3

commit 450f189455af023371df06045396a5e56dd04aa0
Author: Mauritz Sundell <mauritz.sundell@oracle.com>
Date:   Mon Sep 11 16:52:34 2017 +0200

    Bug#26094556 MTR MAY MIX WORKERS OUTPUT ON FAILURE
    
    Make test output synchronized with other output from MTR, not cause mixed
    output between worker threads.
    
    Only print test output for tests without .result file if test failed.
    
    Note, with --nocheck-testcases the above behaviour is turned off and test
    output for tests without .result file will show up unsynchronized
    independent of success status.
    
    Note, with bug#26406981 support for MTR tests without .result file is in
    general removed.
    
    There is an exception for some ndb tests that still depends on the feature.
    
    Some of these are quite noisy and often mess up MTR logs in PB2.
    
    Change-Id: I766cdefee0e37643152a6da585a4dbefe4b38afd

commit 176140933703a3bfd7e8eb0ae97ca96e181653d8
Merge: c8e33fe 2811fd3
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Fri Sep 22 13:50:50 2017 +0200

    NULL Merge branch 'mysql-5.7' into mysql-8.0

commit 2811fd3ee6c3d1d8855c19324ab1ca2aacd619c8
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Tue Sep 19 18:43:11 2017 +0200

    Bug#26612465 BUILDING WITH CMAKE 3.9.0 OR NEWER GIVES DEPRECATION WARNINGS [noclose]
    
    Patch 1 for 5.7
    Configure plugins and storage engines after convenience libraries.
    
    This is a prerequisite for merging "convenience libraries" properly
    for NDBCLUSTER. Prior to this, mysys_ssl was treated as an "unknown
    system library". With this patch it is treated as a known "convenience
    library".
    
    Change-Id: I6f0d88275b41bddb3839bce58179a553cc29e430

commit d6d46a76f58229efd7dea7633068c67b148b89ed
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Tue Sep 19 18:30:45 2017 +0200

    Bug#26825211 BACKPORT FIX FOR #25643811 TO 5.7
    
    Backport relevant parts of patch for:
        Bug #25643811: MYSQL DOES NOT COMPILE WITH GCC 7
    
    Change-Id: Iafc7bc70b3621e12b484694ff927fb15e21ac5d2

commit 1cf5c363640ab8ff4707e12ffc69802b72c2f14d
Author: Mikael Ronström <mikael.ronstrom@oracle.com>
Date:   Fri Sep 22 13:18:10 2017 +0200

    BUG#26847666: Bug fix that makes use of API fail node handling to also handle TCRELEASEREQ

commit 013cf380effcc661b9320f5d8dd5cb73e8ec6091
Author: Mikael Ronström <mikael.ronstrom@oracle.com>
Date:   Fri Sep 22 13:17:52 2017 +0200

    BUG#26847666: Create new functions handleApiFailedConnection and set_api_fail_state, introduce enum for apiFailState, minor changes of placement of brackets, no functional change at all, added new test case

commit c8e33fe7f6305940a8909d19efcc447a538678d7
Merge: f00e21d 5bc2cf2
Author: Bharathy Satish <Bharathy.x.Satish@oracle.com>
Date:   Fri Sep 22 15:23:57 2017 +0530

    Merge branch 'mysql-5.7' into mysql-8.0

commit 5bc2cf2976ad62f069582aaaa3044f1c872e5eae
Author: Bharathy Satish <Bharathy.x.Satish@oracle.com>
Date:   Fri Sep 22 15:22:28 2017 +0530

    Bug #26694675: MYSQLPUMP SPAMS WITH SQL_NO_CACHE DEPRECATION WARNINGS
    
    Problem: mysqlpump reports deprecated warnings when dumping table data.
    This is because mysqlpump executes SHOW WARNINGS; after running every
    sql query.
    
    Fix: Just by encapsulating SQL_NO_CACHE inside version comment will not
    solve this issue. ex: SELECT /*!50708 SQL_NO_CACHE */ ...
    Even with version comments server reports a warning. mysqlpump executes
    SHOW WARNINGS and reports the same warning message.
    Fix is to remove SQL_NO_CACHE from the underlying SELECT query.

commit f00e21d5507b2b70fe1ef7596fcafd7b6fe5b095
Author: Deepthi ES <deepthi.e.s@oracle.com>
Date:   Fri Sep 22 15:12:23 2017 +0530

    Bug#26612370 : RPL_IO_THD_WAIT_FOR_DISK_SPACE_STRESS.TEST FAILS SPORADICALLY WITH MTS+GTID
    
    Changing the reference bug number to Bug#23581287 for disabled test.

commit e491684c5be22e4172ca732c0fcfac02fa8f3562
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Tue Sep 19 13:44:58 2017 +0200

    Bug#26612465 BUILDING WITH CMAKE 3.9.0 OR NEWER GIVES DEPRECATION WARNINGS
    
    Remove cmake policies no longer in use:
    CMP0007 was introduced in 2.6.0 and can go away.
    CMP0011 was introduced in 2.6.3 and can go away.
    CMP0026 can go away, we no longer use the LOCATION property.
    CMP0042 can go away, use MACOSX_RPATH instead (introduced in 2.8.12)
    
    (cherry picked from commit c0d2fca4735ceb26d8f3dd4e5f58277536523f64)

commit 338e4d0d2e7dd18747e4e2fea161e8e78be8d708
Merge: 9bd8cd9 2769d3d
Author: Anushree Prakash B <anushree.prakash.b@oracle.com>
Date:   Fri Sep 22 12:13:28 2017 +0530

    Merge branch 'mysql-5.7' into mysql-8.0

commit 2769d3ded8f5a4cd59ad7d30abc950d7681898df
Author: Anushree Prakash B <anushree.prakash.b@oracle.com>
Date:   Fri Sep 22 12:10:12 2017 +0530

    Bug#25813089 - CREATE USER IF NOT EXISTS SHOULD ALWAYS BE
                   WRITTEN TO THE BINLOGS
    
    Post push fix to address the test script failure.

commit 9bd8cd985d19a1e668fea83806cf4bb9e4d3584f
Author: Satya Bodapati <satya.bodapati@oracle.com>
Date:   Thu Sep 21 19:18:43 2017 +0200

    Bug#26834496 DROP DATABASE FAILS WHEN TABLES ARE CREATED ON A GENERAL TABLESPACE
    
    Problem:
    --------
    When there are tables in general tablespace, drop database fais.
    
    This happens because tablespace flags of genera tablespace are registered wrongly and
    so sdi operation fails.
    
    Fix:
    ---
    set SDI flag presence in dd::Tablespace::se_private_data.flags
    call my_error() on returning errors.
    
    Reviewed-By: Kevin Lewis <kevin.lewis@oracle.com>
    RB: 17440

commit bb1b7f29cdd39051409573258fecb7929220b6d8
Author: Anibal Pinto <anibal.pinto@oracle.com>
Date:   Thu Sep 21 18:57:16 2017 +0200

    BUG#26731317: LOAD DELAYS SWITCHING A GR NODE FROM RECOVERING TO ONLINE
    
    When a node joins a group replication group, it must perform recovery, in which
    transactions from a donor member are applied locally for state transfer.  Once
    the node has applied all the transactions, it must change state from RECOVERING
    to ONLINE to become a full-fledge member of the group.
    
    When a node has finished applying all the transactions in the back-log, it
    tests if there are still messages in the queue, and will not switch to ONLINE
    until there are none.
    
    But if there is a consistent load of transactions, a node may not get the
    opportunity to switch to ONLINE, even if it is ready, only because there are
    just a few messages circulating.
    
    To prevent the delay of the node we compare the number of transactions occurred
    is bigger than the number of initial queue size, if so we switch the member to
    ONLINE.
    
    If the queue is empty before the number of transactions is bigger than the
    queue size, the member will switch to ONLINE.

commit 84ea33bf9615d23f85aaefa9544ee12b35cf302f
Author: Tiago Jorge <tiago.jorge@oracle.com>
Date:   Thu Aug 24 12:06:42 2017 +0100

    BUG#26842009 - BACKPORT BUG#26712336 TO MYSQL-8.0
    
    Description:
    -----------
    After reinstating PB2 jobs for GCS with a daily and an itch job, some
    problems arose:
    - Not building on some platforms;
    - Not working on some platforms;
    - Tests failing
    
    How To Repeat:
    -------------
    Push current GCS code to mysql-trunk-itch-gcs and see it fail
    
    Suggested Fix:
    -------------
    Analyze and fix all issues in order to have a test baseline

commit 651ca673c1b7b13c4c0280f2e88f39f7adcc5775
Author: Abhishek Ranjan <abhishek.ar.ranjan@oracle.com>
Date:   Thu Sep 21 16:59:46 2017 +0530

    Bug#26636238 : ERROR/INPLACE UPGRADE TO READ-ONLY 8.0: PERFORMANCE SCHEMA INITIALIZATION FAILED
    
    When new data directory is created OR in-place upgrade from 5.7 is
    done with --read-only option, server startup fails in creating
    performance schema tables. Next server startup suceeds as
    mysql.dd_properties register 'PS_version=1' as soon as dictionary
    is created, before creating performance schema tables.
    
    --read-only mode is meant only to prohibit updates from client
    connections only, and not from server internal functions.
    For example, replication slave threads can do updates with
    --read-only option.
    
    Fix:
    
    - Performance Schema tables were not created when --read-only flag is
      set: both, during initialize and upgrade stage. This fix enables it.
      Fix makes the behavior of performance schema metadata same as we treat
      I_S metadata.
    
    - Performance Schema tables are not created when server is restarted
      and DDSE is in read only mode. The server would continue to restart.
    
    - The fix also enable information schema metadata to be updated during
      server restarts when --read-only flag is set. I_S views already gets
      created during initialize and upgrade phase irrespective of
      --read-only flag.
    
    - Current server stores the IS_version and PS_version without making
      sure if I_S/P_S tables are created. This patch fixes it to store the
      respective version in dictionary only after creation.
    
    - Changed versioning scheme of dictionary and I_S system views to be
      consistent with P_S versioning scheme.
    
    - Removed assert from InnoDB while restricts dictionary version to 1.

commit 2e02b2f07ed2de57451946420e855d55a97fbb79
Merge: 030c558 a9da615
Author: Bjorn Munch <bjorn.munch@oracle.com>
Date:   Thu Sep 21 14:30:05 2017 +0200

    Merge branch 'mysql-8.0.3-rc-release' into mysql-8.0

commit e89b17ec98a00357a8069e35ec7b350e5b665b95
Author: Pekka Nousiainen <pekka.nousiainen@oracle.com>
Date:   Thu Sep 21 15:08:39 2017 +0300

    wl#7614 noregex-03.diff
    
    csv: regex no longer used

commit a9bf2bb503cf8a1d53a30b7532f5023a20075b1a
Author: Pekka Nousiainen <pekka.nousiainen@oracle.com>
Date:   Thu Sep 21 15:08:17 2017 +0300

    wl#7614 noregex-02.diff
    
    csv: regex decimal to hand-coded

commit 01118f0f6b506a4eb3705267018ccacd12453039
Author: Pekka Nousiainen <pekka.nousiainen@oracle.com>
Date:   Thu Sep 21 15:07:43 2017 +0300

    wl#7614 noregex-01.diff
    
    csv: regex date/time to hand-coded

commit 030c5586c95c0ec59abfa10dc61bf437eb838623
Author: Allen Lai <zheng.lai@oracle.com>
Date:   Thu Sep 21 19:01:48 2017 +0800

    Followup patch of #bug#25811623 ASAN CRASH IN MY_MB_WC_UTF8_PROTOTYPE WITH FULLTEXT MATCH
    
    Fixed valgrind issue.

commit 440d1db543b4673a65b2e68be4a413524894667c
Author: Ramil Kalimullin <ramil.kalimullin@oracle.com>
Date:   Thu Sep 21 12:38:38 2017 +0400

    Bug #25077223: LIBMYSQLCLIENT CRASH CALLING MYSQL_PING() AFTER CONNECTION CLOSED
    
    Wrong cli_safe_read_with_ok()'s result check fixed for CLIENT_PROTOCOL_TRACING.

commit fa2f7e115205692cda571fc2ae8113e8e0b73d6a
Merge: 530c7d0 d090112
Author: Ramil Kalimullin <ramil.kalimullin@oracle.com>
Date:   Thu Sep 21 12:38:08 2017 +0400

    Null-merge from 5.7.

commit d0901127f0fc7d92c1c1d81b05bdd1f91952bddf
Author: Ramil Kalimullin <ramil.kalimullin@oracle.com>
Date:   Thu Sep 21 12:37:03 2017 +0400

    Bug #25077223: LIBMYSQLCLIENT CRASH CALLING MYSQL_PING() AFTER CONNECTION CLOSED
    
    Wrong cli_safe_read_with_ok()'s result check fixed for CLIENT_PROTOCOL_TRACING.

commit 530c7d0fb45a27689934d43dfd5d94867cfa59a3
Author: Neha Kumari <neha.n.kumari@oracle.com>
Date:   Thu Sep 21 13:21:48 2017 +0530

    Bug#25950554:THE FUNCTION RESET_CONNECTION DOES NOT RESET WRITE SET IN WRITESET_SESSION.
    
    Problem:
    When we do reset_connection which has the same effect as
    auto-reconnect, the write set session history is not cleared,
    which in case of auto-reconnect does get cleared.
    
    Fix:
    Reset the write set session history when mysql_reset_connection
    is called.

commit 63c4a8becad19c4ecde6e1af569240f3af16f733
Author: Praveenkumar Hulakund <praveenkumar.hulakund@oracle.com>
Date:   Thu Sep 21 06:41:13 2017 +0200

    Bug#25820175 - i_s query pushes down function as icp and opens dictionary table
    
    INFORMATION_SCHEMA views TABLES and STATISTICS uses internal
    functions which opens dictionary tables. When ICP is enabled, if
    these functions are used in the where condition then they are
    pushed down to the storage engine for the evaluation. But these
    internal functions should not be pushed to the storage engine.
    
    To fix this issue, marked internal function opening data dictionary
    table as DD_INTERNAL_FUNC. If ICP is enabled then while evaluating
    condition to push down, internal functions of type DD_INTERNAL_FUNC
    are not pushed down.
    
    Patch for this issue tested using the RQG.
    
    Change-Id: Ib3501fd923b149581c22261122f19b0bf6695812

commit a432d93beeb14aa2d02b14988385978bef1639ab
Author: Debarun Banerjee <debarun.banerjee@oracle.com>
Date:   Thu Sep 21 07:58:43 2017 +0530

    BUG#26555999 XCONNECTION DOESN'T SUPPORT CLONE PLUGIN COMMANDS
    
    BUG#26561706 CLONE COMMANDS SUPER PRIVILEGE IS DEPRECATED
    
    BUG#26617429 CLONE MAY CRASH WHEN DISK FULL
    
    BUG#26787838 WARNING RELATED TO DOUBLEWRTIE BUFFER
    
    BUG#26549840 RECOVERY EXTENDING SMALL FILES TO MULTIPLE OF EXTENT SIZE
    
    Problem :
    ---------
    1. X-Connection is not enabled for clone SQL command
    
    2. Super privilege is deprecated
    
    3. IO error handling in background and state change issue
    
    4. During clone DB start, tablespace file could have missing unallocated
    pages at end. This is adjusted currently after redo recovery, based on
    the size stored in header. The size of the tablespace file may not be
    in exact multiple of extent size before this adjustment. Double write buffer
    doesn't find a page based on rounded tablespace size while the page is
    actually there. The warning doesn't have any impact on functionality.
    
    5. For cloned DB start, during redo recovery a tablespace file is extended
    if the page is beyond the current file size. Currently it is extended to
    multiples of extent size which could extend small tablespaces to one
    full extent bloating the overall DB size.
    
    Solution :
    ----------
    1. Add X-Connection flag for clone SQL command
    
    2. Use backup privilege for clone
    
    3. Check for clone state for IO error in archiver background
    
    4. Extend file size after clone page copy stage if required based on
    tablespace header size if required.
    
    5A. Make tablespace extension specific to clone DB start
    
    5B. Extend to multiple of extents only if tablespace size is bigger than
    one extent.
    
    Reviewed-by: Satya Bodapati <satya.bodapati@oracle.com>
    
    RB: 17393

commit c170f38e591f392d70c5b0db41bb57138a4366cd
Author: Bin Su <bin.x.su@oracle.com>
Date:   Thu Sep 21 10:12:37 2017 +0800

    Bug#26788968 - INNODB: ASSERTION FAILURE: BTR0SEA.CC
    
    The assertion says that the index should not be of
    ONLINE_INDEX_ABORTED_DROPPED after a failing adding index.
    The problem is that after WL#9536, we now don't drop the index
    immediately when setting the index status to ONLINE_INDEX_ABORTED_DROPPED,
    so AHI would not be dropped too. So in fact, this assertion becomes
    bogus and should be removed.
    
    RB: 17419
    Reviewed-by: Jimmy Yang <jimmy.yang@oracle.com>

commit 3aef584becf84da5eaafc104fc8952373485d061
Author: Bin Su <bin.x.su@oracle.com>
Date:   Thu Sep 21 09:44:36 2017 +0800

    Bug#26678883 - ASSERTION `HAS_ERROR == THD->GET_STMT_DA()->IS_ERROR()
    
    The assertion means that InnoDB ever pushed an error when the thread was
    interrupted however ha_innobase::write_row didn't return an error to server.
    It's the asynchronous rollback, who required the MDL on related tables,
    received the interrupted during requesting MDL and pushed the error.
    It's difficult to check every operation after it killes other transactions,
    and the key is that for the asynchronous rollback, MDL is totally unnecessary.
    
    So the fix is in dd_mdl_for_undo(), the asynchronous rollback should be
    screened out and no mdl would be required. Also in this patch, the problem
    that only in-memory tables would be checked during opening tables for undo
    has been fixed. To open the table, it's wrong to assume the table is always
    in memory, so global DD would be accessed too.
    
    RB: 17422
    Reviewed-by: Jimmy Yang <jimmy.yang@oracle.com>

commit 2dfa7718fac874b697402a6b3a0719fca419c95a
Merge: 3aaf414 3a94f97
Author: Lakshmi Narayanan Sreethar <lakshmi.narayanan.sreethar@oracle.com>
Date:   Wed Sep 20 17:38:59 2017 +0530

    Merge branch 'mysql-5.7-cluster-7.5' into mysql-5.7-cluster-7.6

commit 3a94f9769c793840fd85824dbab0df166b37e36e
Author: Lakshmi Narayanan Sreethar <lakshmi.narayanan.sreethar@oracle.com>
Date:   Wed Sep 20 17:37:14 2017 +0530

    Bug#26758939 : Post push fix
    
    Updated ClusterJ testcase to expect the updated error message

commit a2670b4d14be94791898329caffe76e62d13c9db
Author: Steinar H. Gunderson <steinar.gunderson@oracle.com>
Date:   Tue Sep 19 15:43:46 2017 +0200

    Fix two Clang 5 warnings.
    
    Change-Id: Ie5f0ed4a39540e63f7f08231bb60ca01ade883d8
    (cherry picked from commit 90eac6f6eaa7b7ca371740c17393665e8f0539ca)

commit a2b842972da2a1e22edf9253d7fd79f23f859afe
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Tue Sep 19 09:51:11 2017 +0200

    Backport mysqld /DEF: argument from patch for Bug #26399073: MYSQL DOES NOT COMPILE WITH CLANG ON WINDOWS

commit f16f089d3c17c22a44274383976218f9b6a58d08
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Wed Sep 13 10:42:00 2017 +0200

    Bug#26612465 BUILDING WITH CMAKE 3.9.0 OR NEWER GIVES DEPRECATION WARNINGS [noclose]
    
    Simplify INSTALL_DEBUG_TARGET.
    Now that we know the location of executables, plugins and convenience
    libraries (xxx_output_directory) we don't need the LOCATION property.
    
    Calls to INSTALL_DEBUG_TARGET were spread out over misc. cmake files.
    Collect them in one place for static libraries.
    
    (cherry picked from commit a6ae5e797f3655a81a0e16b26ea9cc0309898f83)

commit 8e048ce21ab82f30101560a0b927020d55091eb9
Merge: ecde074 6ff0ab6
Author: Lukasz Kotula <lukasz.kotula@oracle.com>
Date:   Wed Sep 20 11:41:16 2017 +0200

    Merge branch 'mysql-5.7' into mysql-8.0

commit 6ff0ab686e90af5446789d017890dda79f355db7
Author: Lukasz Kotula <lukasz.kotula@oracle.com>
Date:   Tue Sep 5 17:04:15 2017 +0200

    Bug#26695342 - CONNECTOR/J 8.0 PACKAGE CHANGED NAME FROM "MYSQLX" TO "X"
    
    Description
    ===========
    J/Connector requires that X messages are generated by protobuf
    to package: "com.mysql.cj.x.protobuf".
    
    Change-Id: I8930f4db5a0fedd2c8e41f23c179577907aacc05

commit ecde0743c9159390dee5024b8251a134b9b161b8
Author: Satya Bodapati <satya.bodapati@oracle.com>
Date:   Wed Sep 20 11:34:02 2017 +0200

    Bug#26765438 - FAILING CREATE TEMP TABLE STATEMENT LEAVES ENTRY IN I_S.INNODB_TEMP_TABLE_INFO
    
    Problem:
    -------
    When temporary table creation fails, the in-memory table object is not freed.
    
    Fix:
    ----
    Since temporary tables are not DDL Logged, remove them on error.
    
    Reviewed-By: Bin Su <bin.x.su@oracle.com>
    RB: 17418

commit b4d7056afd764f613d191393306973554be19685
Author: Lukasz Kotula <lukasz.kotula@oracle.com>
Date:   Tue Sep 5 17:20:22 2017 +0200

    Bug#26695360 - X PROTOCOL DOCUMENTATION REFERES TO MYSQL SERVERS DOCUMENTATION 5.0 OR 5.5
    
    Description
    ===========
    "proto" files point to documentation of MySQL Server 5.0 and 5.5.
    
    Fix
    ===
    Links were corrected to point to MySQL Servers 8.0 documentation.
    
    Change-Id: Ib1ddf0eac32515b3822d0e3b218481e7683fcbad

commit e137ad34abfa06365c7dfd7e49e6d1dc2285629c
Merge: 67ede20 8ef18d9
Author: Lukasz Kotula <lukasz.kotula@oracle.com>
Date:   Wed Sep 20 11:29:09 2017 +0200

    Null-merge from 5.7.

commit 8ef18d942ce57600e714d58fb757e325738baaa1
Author: Lukasz Kotula <lukasz.kotula@oracle.com>
Date:   Tue Sep 5 17:20:22 2017 +0200

    Bug#26695360 - X PROTOCOL DOCUMENTATION REFERES TO MYSQL SERVERS DOCUMENTATION 5.0 OR 5.5
    
    Description
    ===========
    "proto" files point to documentation of MySQL Server 5.0 and 5.5.
    
    Fix
    ===
    Links were corrected to point to MySQL Servers 5.7 documentation.
    
    Change-Id: I205f551814d557ac19fd14aac38553a616033259

commit 67ede206ba2ea728e8b8928783ba2e4784472c9a
Author: Dyre Tjeldvoll <Dyre.Tjeldvoll@oracle.com>
Date:   Wed Sep 20 10:24:56 2017 +0200

    Bug#26516584: Post-push fix. Fix -werror optimized build failure

commit 1b4b4ee8c505759eda9ba873b458317b8db996ea
Merge: 6dc5232 d43745c
Author: Steinar H. Gunderson <steinar.gunderson@oracle.com>
Date:   Wed Sep 20 11:04:22 2017 +0200

    Null-merge from 5.7.

commit d43745ca1fbb68992df7043e1615697121e75b0a
Author: Steinar H. Gunderson <steinar.gunderson@oracle.com>
Date:   Wed Sep 20 11:04:03 2017 +0200

    Add a .gitreview file to the 5.7 branch.
    
    Change-Id: I2bebd00952f9ec9c61f83aae013e74b487ee513c

commit 6dc5232cdb72848ed682059d7f72343150e65b91
Author: Steinar H. Gunderson <steinar.gunderson@oracle.com>
Date:   Wed Sep 20 11:03:26 2017 +0200

    Update .gitreview file to use the mysql-8.0 branch.
    
    Change-Id: I63df6b8bf25cd2a6e5658cfd14c0c83d7b1a7a19

commit e98b013fb9022c312745b5f7167bda6a4bcb895a
Merge: 51496e8 40a6556
Author: Lukasz Kotula <lukasz.kotula@oracle.com>
Date:   Wed Sep 20 10:09:28 2017 +0200

    Null-merge from 5.7.

commit b2114f865a74fdfdd2e1d8782b5f79f775fe10b2
Author: Pedro A. Ribeiro <pedro.a.ribeiro@oracle.com>
Date:   Thu Sep 14 15:46:00 2017 +0200

    Bug#26758939 : FAIL TO LOCK THREAD TO CPU
    
    Post fix patch
    
    The first version of the patch introduced a goto call to label
    "error" which would  only be used when HAVE_LINUX_SCHEDULING
    is defined. This might cause compilation errors. Replaced goto call
    by a function return call with proper error code.
    
    This solution is not robust against future changes in error handling
    inside the function NdbThread_UnlockCPU(). However an improvement
    would require a major refactor of this function
    
    (cherry picked from commit 2753ab2b02a99ef91453a3da0a9bfc4d94a6605a)

commit ed7642a176250441921c5cbf1e45d6036123b579
Author: Lakshmi Narayanan Sreethar <lakshmi.narayanan.sreethar@oracle.com>
Date:   Tue Sep 12 21:06:38 2017 +0530

    Bug#26758939 : FAIL TO LOCK THREAD TO CPU
    
    When an ndbd is configured to lock its thread to its CPUs, it crashes
    during start phase with a "Failed to lock tid" error message.
    
    This bug is a side effect of fix for Bug#26378589. That patch disables
    the cpu locking feature if the required glibc version is not available.
    The bug in the glibc will be hit only during a Ndb_UnlockCPU() call.
    The datanodes never use this call. This unlock call can be only
    accessed through the API calls. So, this patch enables the cpu locking
    feature for the datanodes and disable them only for the API calls,
    based on the glibc version used. This patch also adds restrictions to
    prevent any future uses of sched_setaffinity() call with an all ones
    CPU mask in an unsupported glibc environment. The relevant ClusterJ
    message is also updated to provide more information to the user.
    
    (cherry picked from commit 9dd6bdd9915ea2b94d15c34e8bc36ef7078cd8c5)

commit 8c672586337e79b948b90f66ed13e4c376a0e663
Author: Lakshmi Narayanan Sreethar <lakshmi.narayanan.sreethar@oracle.com>
Date:   Fri Sep 8 00:46:27 2017 +0530

    WL#10816: Mediumint support for ClusterJ - Big Endian post push fix
    
    The medium int conversion to a Java int type was not properly handled
    in Big Endian machines. This patch fixes that.
    
    (cherry picked from commit 7e93eadecddd77ea10ed3a07ca864335122a0910)

commit a02aab32e5ae918e5cfd69bd47016c55e4053b17
Author: Anushree Prakash B <anushree.prakash.b@oracle.com>
Date:   Wed Sep 13 12:20:39 2017 +0530

    Merge branch 'mysql-5.6' into mysql-5.7
    
    (Bug#26372491 - RCE THROUGH THE MISHANDLE OF BACKSLASH postpush fix)
    (cherry picked from commit 7b433c573694dbde070359db7d26cb17749cbea1)

commit 92b5c669082aaa953796632c690bd9f28439da71
Author: Anushree Prakash B <anushree.prakash.b@oracle.com>
Date:   Fri Sep 8 18:32:58 2017 +0530

    Merge branch 'mysql-5.6' into mysql-5.7
    
    (Bug#26372491 - RCE THROUGH THE MISHANDLE OF BLACKSLASH)
    (cherry picked from commit 06db648de3b080bae518a083dd122ea10b058c04)

commit 18e105c972321f43b607810ef06c53c942a44028
Author: Venkatesh Duggirala <venkatesh.duggirala@oracle.com>
Date:   Thu Sep 7 17:45:57 2017 +0530

    Revert "Bug#26589008 SYNC_BINLOG=0 SHOULD IGNORE BINLOG_GROUP_COMMIT_SYNC_DELAY"
    
    This reverts commit 5654f5ec294f3d8ea087029ba9b47ad3eb2835b3.
    
    (cherry picked from commit 59c158713596ffa9a796c6462e9951dd05282246)

commit 40a65567a0b1b42ed334c9b79a1ed687021f1cfc
Author: Lukasz Kotula <lukasz.kotula@oracle.com>
Date:   Tue Sep 5 16:23:16 2017 +0200

    Bug#26695316 - MYSQLXTEST-HELP, WRONG TEXT ALIGNMENT (mysql-5.7)
    
    Description
    ===========
    "--help" and "--help-commands" arguments doesn't print the
    user informations correctly.
    
    Fix
    ===
    Added line breaks to correct the information layout. Added
    a MTR test to confirm any change of the output.
    
    Change-Id: Ieac8eb857ad02e80bdb0e73abf66f6bc44829705
    RB: 17297
    Reviewed-by: Grzegorz Szwarc <grzegorz.szwarc@oracle.com>

commit 51496e83fadcaca98040ad46a8522bb27af0aa9c
Author: Bin Su <bin.x.su@oracle.com>
Date:   Wed Sep 20 14:32:45 2017 +0800

    Bug#26773152 - ASSERTION FAILURE: DICT0DD.CC:1154:FORM->S->REAL_ROW_TYPE == ROW_TYPE_COMPRESSED
    
    This is a bogus assertion. It was expected that if key_block_size exists
    but the real type read from se_private_data is not COMPRESSED,
    then it must be a partitioned table. However this is not true.
    It's possible that a table with key_block_size = 16K and
    row_format = COMPRESSED can be reorganized into a tablespace of
    format DYNAMIC etc. by an ALTER TALBE ... COPY. After this ALTER TABLE,
    the row format of this table would become the same with the tablespace.
    So it's not true the real_row_type must be ROW_TYPE_COMPRESSED.
    
    Solution is to remove this bogus assertion.
    
    RB: 17414
    Reviewed-by: Allen Lai <allen.lai@oracle.com>

commit ea6386c7e14fc3c65d1a4c2de1216d0aca5fa3c8
Author: Chaithra Gopalareddy <chaithra.gopalareddy@oracle.com>
Date:   Wed Sep 20 10:49:49 2017 +0530

    Bug#26555487: MAIN.DESC_INDEX_INNODB FAILS DUE TO DIFFERENCE
                  IN EXPLAIN RESULT
    
    Changed the data to force optimizer to pick range access method instead
    of index on some platforms.

commit 2b3f81856303998eccea80514cd21a6bb20c3ba1
Author: Allen Lai <zheng.lai@oracle.com>
Date:   Tue Sep 19 15:12:37 2017 +0800

    Fixed bug#25946444 ASAN: HEAP-BUFFER-OVERFLOW WHEN SETTING GLOBAL VARIABLES
          bug#25811623 ASAN CRASH IN MY_MB_WC_UTF8_PROTOTYPE WITH FULLTEXT MATCH
    
    An invalid utf8 string caused this bug. So, we need check the input string when setting the
    value.
    
    Approved by Bin Su <bin.x.su@oracle.com>
                Xing Zhang <xing.z.zhang@oracle.com>
    RB: 17390

commit 5a677cb7de6c54c235998b369337e29f05ab6316
Author: Jimmy Yang <jimmy.yang@oracle.com>
Date:   Wed Sep 20 01:51:19 2017 +0200

    update high_prio_trx_predicate result

commit 418df5bf7ba08ae99898aefa64cf6308a2558898
Merge: 0135072 0a1147e
Author: Jimmy Yang <jimmy.yang@oracle.com>
Date:   Wed Sep 20 01:46:48 2017 +0200

    Merge branch 'mysql-5.7' into mysql-8.0

commit 0a1147e2e65b4b8a8d7949fa9b4588588d3e251b
Author: Jimmy Yang <jimmy.yang@oracle.com>
Date:   Wed Sep 20 01:38:26 2017 +0200

    Bug #25729649 LOCK0LOCK.CC:NNN:ADD_POSITION != __NULL
    
    Reviewed-by: Sunny Bains <sunny.bains@oracle.com>

commit bd5c998902579b04ea2f213bdd49d0050fc3d702
Author: Anushree Prakash B <anushree.prakash.b@oracle.com>
Date:   Wed Sep 13 12:17:36 2017 +0530

    Merge branch 'mysql-5.5' into mysql-5.6
    
    (cherry picked from commit 148b35d25800dfac8855262967eb76408126649b)

commit c087d8dacd128ea68bf1ed3e360c67189c5145b6
Author: Anushree Prakash B <anushree.prakash.b@oracle.com>
Date:   Fri Sep 8 18:30:57 2017 +0530

    Merge branch 'mysql-5.5' into mysql-5.6
    
    (cherry picked from commit c25e5c808ba2957db29a319acd4751bf74864584)

commit b674def31e965d94e8ac9c8b4a08cadb54b394eb
Author: Piotr Obrzut <piotr.obrzut@oracle.com>
Date:   Mon Aug 28 12:30:21 2017 +0200

    Bug #26501092 mysql server installer cannot detect that visual c++ 2010 is installed.
    
    (cherry picked from commit 816d1307409636655afee3424aa96451a4e22be2)

commit f228edb0ef088f22f47fe33fe35e15bab88d2dd7
Author: Anushree Prakash B <anushree.prakash.b@oracle.com>
Date:   Wed Sep 13 12:14:06 2017 +0530

    Bug#26372491 - RCE THROUGH THE MISHANDLE OF BACKSLASH
    
    Post push fix to address test script failure.
    
    (cherry picked from commit 461eef45301fe6c725b0add5a6f28057a3d67e21)

commit 9348a119b1a2db4f370e9ee24789cb4ae31b4cf5
Author: Anushree Prakash B <anushree.prakash.b@oracle.com>
Date:   Fri Sep 8 18:29:07 2017 +0530

    Bug#26372491 - RCE THROUGH THE MISHANDLE OF BACKSLASH
    
    DESCRIPTION:
    ===========
    The bug is related to incorrect parsing of SQL queries
    when typed in on the CLI. The incorrect parsing can
    result in unexpected results.
    
    ANALYSIS:
    ========
    The scenarios mainly happens for identifier names
    with a typical combination of backslashes and backticks.
    The incorrect parsing can either result in executing
    additional queries or can result in query truncation.
    This can impact mysqldump as well.
    
    FIX:
    ===
    The fix makes sure that such identifier names are
    correctly parsed and a proper query is sent to the
    server for execution.
    
    (cherry picked from commit 31a372aa1c2b93dc75267d1f05a7f7fca6080dc0)

commit 01350723d8ec16aa7f382687cefbed6a035024c8
Author: Nisha Gopalakrishnan <nisha.gopalakrishnan@oracle.com>
Date:   Tue Sep 19 19:26:44 2017 +0530

    BUG#26266789: ON SERVER 8.0 CREATE OR REPLACE VIEW
                  FAILS FOR COLUMN SIZE > 64
    
    Analysis
    ========
    Creating a view with explicit view column name greater
    than 64 characters reports an error on release build
    and triggers an assert on debug build.
    
    In 5.7, a view can be created with explicit column
    name greater than 64 chars. In 8.0, the column name
    in DD::COLUMNS is restricted to 64 characters(maximum
    column name length). Hence while attempting to store
    a view column name which exceeds 64 chars an assert
    is triggered.
    
    Fix:
    ===
    If the view column name exceeds the maximum column
    name length(64 chars), an appropriate error is reported.
    This makes it align with the restriction of 64 characters
    for aliases of column names in CREATE VIEW statements.

commit f4c87a9426395b411fc2d7a9359798899a23f062
Author: Anibal Pinto <anibal.pinto@oracle.com>
Date:   Tue Sep 19 15:42:41 2017 +0200

    BUG#26378948: ASSERTION IN GROUP_REPLICATION.GR_FILTER_CRASH
    
    The "--shutdown_server 0" at the test case is sometimes (depending
    on the host overload) making the debug framework to return from
    "debug_sync_set_action" function with an error (because no other thread
    signaled the "signal.continue").
    
    The debug sync was used to block server 1 to hold server 2 on recovery,
    now we stop group_replication_applier on server 1 to cause same behavior.

commit 089ed473475065facdf9dd1f82a120e948ebe696
Author: Satya Bodapati <satya.bodapati@oracle.com>
Date:   Mon Sep 18 15:43:56 2017 +0530

    Bug#26766632 - UPGRADE AND INNODB_FORCE_RECOVERY=5, THREADS DON'T EXIT GRACEFULLY
    
    Problem:
    --------
    When upgrade is started with innodb_force_recovery = 5, InnoDB starts
    background threads but doesn't exit
    them gracefully before shutdown.
    
    Fix:
    ----
    Disallow upgrade with innodb_force_recovery != 0
    Exit background threads on error
    
    Reviewed-By: Bin Su <bin.x.su@oracle.com>
    RB: 17392

commit a682220f0164e5aba4ea4e6f897756b9e5d4adef
Merge: dbe1ae3 90b07e5
Author: Nuno Carvalho <nuno.carvalho@oracle.com>
Date:   Tue Sep 19 15:20:04 2017 +0200

    Merge branch 'mysql-5.7' into mysql-8.0

commit 90b07e538f8e6c95305250b6c5c56295751a717a
Author: Nuno Carvalho <nuno.carvalho@oracle.com>
Date:   Thu Sep 14 18:51:48 2017 +0200

    BUG#26802395: ASSERT `SERVER_ENGINE_INITIALIZED()' AT DELAYED_PLUGIN_INITIALIZATION.CC:167
    
    During server initialization, with --initialize or
    --initialize-insecure, replication applier infrastructure is not
    initialized, as such Group Replication cannot be started on server
    boot.
    
    The above condition was not being properly considered, which led to
    a assertion failed.
    To avoid that issue, now the condition is properly considered and
    Group Replication is not started, which is intended since the server
    is being initialized.

commit dbe1ae3b97b2de7ecb6b271fd3b63b2a3e49f181
Author: Deepthi ES <deepthi.e.s@oracle.com>
Date:   Tue Sep 19 17:53:32 2017 +0530

    Bug#23247847 : RPL_DDL.TEST NEVER RUNS
    
    Removing a testcase which was getting skipped for all combinations of binlog format
    and is no longer required.

commit 1b9aee17f524b2e90d8c97c76cad55fcb79df3af
Author: Pavan Naik <pavan.naik@oracle.com>
Date:   Tue Sep 19 17:17:59 2017 +0530

    BUG#26821135: MTR TO PROVIDE THE REAL DATADIR OF A SERVER
    
    Description:
    ------------
    When a test run is started with '--mem' option enabled, MTR creates
    the var directory in one of the tmpfs location and then creates a
    symbolic link <bld_dir>/mysql-test/var pointing to the actual var
    directory location.
    
    In the config file, the variable @mysqld.1.datadir returns the
    symbolic path to the data directory location not the real path. There
    are few MEB tests which need absolute/real path of the data directory
    location of the server and these tests fail when run with '--mem'
    option enabled because @mysqld.1.datadir returns the symbolic path.
    
    Fix:
    ----
    Introduced a new variable '#abs_datadir' which when used in a cnf file
    (@mysqld.1.#abs_datadir) will return the location of the real data
    directory. Prefix '#' because, this option is not a valid mysqld
    option, so using '#' will comment out this option in var/my.cnf file
    and is ignored while staring the server.
    
    Reviewed-by: Srikanth B R <srikanth.b.r@oracle.com>
    RB: 17404

commit 30edb516954572b80860f30f44f8f40586409da0
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Tue Sep 19 09:12:03 2017 +0200

    Bug #26574924 UPGRADE TO BOOST 1.65.0
    
    Post-push fix: with UBSAN build:
    
    ./mtr --mem --sanitize main.gis
    
    include/boost_1_65_0/patches/boost/geometry/algorithms/detail/overlay/insert_touch_interior_turns.hpp:68:26: runtime error: signed integer overflow: 7407392592600 * 22222177777800 cannot be represented in type 'long long int'

commit 79eb90c001bf2819e4ab2ca6e5c3cf84119d625c
Author: Bin Su <bin.x.su@oracle.com>
Date:   Tue Sep 19 18:07:40 2017 +0800

    Bug#26779650 - LONG SEMAPHORE WAIT CAUSED BY DROP TABLE
    
    This is due to the for-loop in btr_drop_ahi_for_table() will skip
    pages of status BUF_IO_WRITE, and re-check it again later. But there
    are some other reasons the status can't be changed to BUF_IO_NONE quickly.
    Thus it continues to iterate over LRU list over and over. This may
    last for severl seconds or even minutes.
    
    Current fix is to relax the condition to drop AHI for pages of
    BUF_IO_WRITE too, and it will yield for a while after every iteration
    over all LRU lists.
    
    Reviewed-by: Jimmy Yang <jimmy.yang@oracle.com>

commit 36d6261f3cfd2541880dfd33e2386126c621e2fc
Author: Lars Tangvald <lars.tangvald@oracle.com>
Date:   Thu Aug 17 12:37:31 2017 +0200

    Bug#26647168	DEB PACKAGING: COPY LICENSE/README IN D/INSTALL INSTEAD OF D/RULES
    
    To include the license and readme files in all packages, they must be in
    separate locations for each package, since apt does not allow multiple
    packages to share the same file. We've used the rules file to make
    copies of the files for each package, but it's cleaner to do it in
    the install file for each package

commit bad6f31085a089fc1197e0310d002c733d6d12ff
Author: Kailasnath Nagarkar <kailasnath.nagarkar@oracle.com>
Date:   Tue Sep 19 15:31:26 2017 +0530

    Post push fix to update .result file for
    x.notices_enable and x.notices_disable

commit e192005e4243d7ffb4453e1942fd469ba38053d0
Author: Dyre Tjeldvoll <Dyre.Tjeldvoll@oracle.com>
Date:   Tue Sep 19 09:58:50 2017 +0200

    Bug#36516584: Post-push fix. Doxygen warning

commit 1d2fa2560cc8a9fc886493a3daad1cba91c8fbb8
Author: Thirunarayanan Balathandayuthapani <thirunarayanan.balathandayuth@oracle.com>
Date:   Tue Sep 19 12:48:09 2017 +0530

    Bug #26761960   TABLESPACE WITH SPECIAL CHARACTER MAY BE NOT FOUND AFTER RESTART
    
    Problem:
    ========
    During recovery, InnoDB creates fil_space_t with tablespace name by
    file name charset instead of table name charset. So it fails to open
    the tablespace and displays the error message saying "tablespace is missing".
    
    Solution:
    =========
    Use table name charset for tablespace name during fil_space_t creation in recovery.
    
    Reviewed-by: Sunny Bains <sunny.bains@oracle.com>
    Reviewed-by: Bin Su <bin.x.su@oracle.com>
    RB: 17317

commit 49935548802034c8463469b873674469463d40a9
Merge: 3e0e5c7 27bc5ed
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Tue Sep 19 08:55:41 2017 +0200

    NULL merge from mysql-5.7

commit 27bc5ed76cc7dfa91c3e55dd37cda868f623e8a8
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Mon Sep 18 16:29:06 2017 +0200

    Bug#26022865 BUILD FOR WINDOWS-S12-64BIT,ADVANCED IS FAILING ON PB2 MYSQL-5.6
    
    Remove cmake code for signing executables.
    Automatic signing has always failed anyways.
    It should be done manually as part of the release process.
    
    Also: remove unuse cmake code:
    INSTALL_MANPAGE INSTALL_SYMLINK GET_TARGET_NAME

commit 3e0e5c720e0ae5b6cf1b70ee56e06bc51fff607d
Author: Bharathy Satish <bharathy.x.satish@oracle.com>
Date:   Tue Sep 19 06:53:17 2017 +0200

    Bug #26395134: SET PERSIST_ONLY HAS WRONG EFFECT ON P_S.VARIABLES_INFO
    
    Post push fix. Recorded main.read_only_persisted_variables result file.

commit 74bca42e9893700b0efb6c23ae8ec85b3f4c7fe2
Author: Daogang Qu <bill.qu@oracle.com>
Date:   Tue Sep 19 08:59:30 2017 +0800

    Bug #26730000 	SERVER_ID LOOKS SET TO VALID VALUE STILL START SLAVE FAILS WITH ER_BAD_SLAVE
    
    Now, default server_id is set to 1 and user gets a warning
    if it is not set during server initialization. But, there
    is no WARNING and starting slave fails when server-id is
    not supplied by users during server starts.
    
    To fix the problem, remove the check on server_id_supplied
    on starting slave, and report a warning if the server-id
    is not supplied by users during server starts.

commit 1add7dd798941ee518f8ca37f524020a6a4e2d35
Author: Christopher Powers <chris.powers@oracle.com>
Date:   Mon Sep 18 22:46:22 2017 +0200

    Bug#26732229 PERFORMANCE SCHEMA STATEMENT TABLES SHOULD DISPLAY REWRITTEN QUERY TEXT - 8.0+ ASAN FIX
    
    Use rewritten query text when available.
    Save and restore the rewrite buffer in prepared statements.

commit 3ceef3a221fff3ef844a49de8db7252ec0d4b366
Author: Marc Alff <marc.alff@oracle.com>
Date:   Mon Sep 18 23:06:35 2017 +0200

    WL#10986 REMOVE PERFORMANCE_SCHEMA.SETUP_TIMERS IN 8.0
    
    Abandoned printing warnings on timer overhead,
    too unstable under heavy load.

commit 6b065da5ae1c4f0289408992545475d147d530d1
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Mon Sep 18 17:31:05 2017 +0200

    Bug #26574924 UPGRADE TO BOOST 1.65.0
    
    Post-push fix: typo in compiler feature check.

commit a67f58a7fc207876847175d34777049132694384
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Mon Sep 18 16:37:08 2017 +0200

    Bug#26711839 COMPILE WARNINGS ON MACOS
    
    vio/viosslfactories.cc:243:57: warning: missing field
          'm_volatility' initializer [-Wmissing-field-initializers]
      { &key_rwlock_openssl, "CRYPTO_dynlock_value::lock", 0}

commit 6539f34e5c1418141a62dcd868b494237b094eb5
Author: Dyre Tjeldvoll <Dyre.Tjeldvoll@oracle.com>
Date:   Mon Sep 18 15:20:24 2017 +0200

    Bug#26516584: Post-push fix. Re-record result file.

commit a38a2d545617c5270bfab467cf91f37eba3ee2ae
Author: Satya Bodapati <satya.bodapati@oracle.com>
Date:   Mon Sep 18 16:00:27 2017 +0200

    Bug#26764604 INNODB: FAILING ASSERTION: COL_NR < TABLE->N_DEF
    
    Problem:
    --------
    When InnoDB tries to find the qualifying index for foriegn key, it matches columns of a index.
    
    When col is virtual column, it looks up for name in wrong array of dict_table_t.
    
    Fix:
    ----
    If column is virtual column, get the name from table->v_col_names.
    
    Reviewed-By: Bin Su <bin.x.su@oracle.com>
    RB: 17394

commit 4f19c09a4cefd6819f600c869b7e0e66b8449bc6
Author: Norvald H. Ryeng <norvald.ryeng@oracle.com>
Date:   Mon Sep 18 15:57:43 2017 +0200

    Bug #26574924 UPGRADE TO BOOST 1.65.0
    
    Upgrade dependency to 1.65.0 and remove those patches for Boost 1.64.0
    that are already included in 1.65.0. Add patches to fix bugs in Boost
    1.65.0.
    
    Change-Id: Iea4c0929645a9dfc2d2e004605549242e33e85c7

commit e06c69800621942e2a3e3554a4fb5f3cd6d48fe2
Author: Marc Alff <marc.alff@oracle.com>
Date:   Mon Sep 18 15:15:34 2017 +0200

    WL#10986 REMOVE PERFORMANCE_SCHEMA.SETUP_TIMERS IN 8.0

commit 783f5bade89e5cb8574964253d76c2f4a78d0ea1
Merge: c159c00 065ed11
Author: Aakanksha Verma <aakanksha.verma@oracle.com>
Date:   Mon Sep 18 18:26:13 2017 +0530

    Merge branch 'mysql-5.7' into mysql-8.0

commit 065ed113dfa3a9fda2bfb0338d1731a8b20a86fa
Author: Aakanksha Verma <aakanksha.verma@oracle.com>
Date:   Mon Sep 18 18:23:52 2017 +0530

    Bug #26731025	INNODB PARTITION TABLE WILL LOCK INTO THE NEAR RECORD
    		AS A CONDITION IN THE USE
    
    PROBLEM
    =======
    During a multiple client scenario:
    Multiple updates from diffrent sessions end up in lock wait timeout
    issue.
    The lock wait timeout is occuring because when session 1 tries to update
    a record and takes a record lock on it and other session tries doing
    another update on another record, it starts to wait for lock to be
    released by session 1 when it tries reading the next record in range.
    Session 2 while fetching the next record calls on index_next that sets
    the match mode to be 0 instead of ROW_SEL_EXACT or 1 which would
    correctly set the lock type to be GAP LOCK and avoid the uneccessary
    wait it would have to do otherwise in the case when it can't have
    explict lock on record.
    
    FIX
    ====
    Its a regression from 5.7 onwards, in 5.6 the issue doesn't exist.
    Have made the call to index_next_same instead of index_next only in the
    case when scan type is PARTITION READ RANGE and the bool value of
    is_next_same is set to true, so that match mode is correctly set and
    LOCK_GAP gets set avoiding the uneccessary wait.
    
    Reviewed by: Debarun Banerjee <debarun.banerjee@oracle.com>
    RB: 17380

commit c159c00dababe1fa3c7835f678314701655cf69c
Merge: c6489cb e95573e
Author: Venkatesh Duggirala <venkatesh.duggirala@oracle.com>
Date:   Mon Sep 18 18:13:54 2017 +0530

    Merge branch 'mysql-5.7' into mysql-8.0

commit e95573e6552d5996a2defb9cd946c118023f2899
Author: Venkatesh Duggirala <venkatesh.duggirala@oracle.com>
Date:   Fri Sep 8 20:29:22 2017 +0530

    Bug#26027024	SLAVE_COMPRESSED_PROTOCOL DOESN'T WORK WITH
    SEMI-SYNC REPLICATION IN MYSQL-5.7
    
    Analysis: In mysql-5.6, dump thread (the thread that is created
    on Master after Slave requested for a binlog dump) is also used
    to receive acknowledgements from the Slave and act on them accordingly.
    For performance reasons, a special thread called Ack Receiver thread
    is added in mysql-5.7 Semi synchronous replication plugin.
    This thread does not have special handling to receive acknowledgements
    if Slave has enabled compression in the protocol. Hence Master is
    unable to handle any slave if Slave_compressed_protocol is enabled
    on it.
    
    Fix: Enable compress flag on the communication channels if the Slave
    has Slave_compressed_protocol ON.

commit c6489cba6d529c62ceb85ff50ef66cf2af0462fc
Author: Kailasnath Nagarkar <kailasnath.nagarkar@oracle.com>
Date:   Mon Sep 18 15:44:54 2017 +0530

    Bug #25050090: LIMITATION @@GROUP_CONCAT_MAX_LEN IS NOT
                   RESPECTED
    
    ISSUE:
    group_concat function returns data in bytes upto
    group_concat_max_len.
    However, output of the select query when used with union
    is shorter in terms of number of characters than the query
    without union.
    
    Also, there is difference in metadata for the two queries.
    
    Case 1: select group_concat(distinct ' ', col1)
            from table.
    
    In this case data is returned upto group_concat_max_len bytes.
    
    Metadata: When this select query is used to create table,
    the datatype for the column created for group_concat() is
    text. This is because, Item_func_group_concat::make_string_field()
    function calculates maximum number of characters based on
    maximum byte length divided by mbminlen.
    
    Case 2: select group_concat(distinct ' ', col1)
            from table as c
            union
            select '' as c;
    
    In this case also group_concat returns data upto
    group_concat_max_len bytes.
    However, in this case, Field_varstring::store()
    gets called.
    This function calls field_well_formed_copy_nchars().
    The nchars parameter passed to this fucntion is
    field_length/mbmaxlen.
    Therefore the output is shorter.
    (e.g. for utf8 1024/3 = 341 characters)
    
    Metadata: When this select query is used to create table,
    the datatype for the column created for group_concat() is
    VARCHAR(341). This is because, Item::make_string_field()
    function calculates maximum number of characters based on
    maximum byte length divided by mbmaxlen.
    
    In both the cases, if maximum number of characters exceed 512
    characters limit, then TEXT field is created, else VARCHAR
    field is created.
    
    However, note that, to calculate maximum number of
    characters, in case 1,  mbminlen is used, whereas in
    case 2, mbmaxlen is used.
    
    Therefore, there is inconsistency in metadata for the two
    queries.
    
    SOLUTION:
    max_length for group concat was set to group_concat_max_len.
    Changed this to first calculate max chars using mbminlen
    and then set max_length accounting for mbmaxlen for max chars.
    So, max_length = (group_concat_max_len/mbminlen) * mbmaxlen
    Added new variable group_concat_max_len to class Item_func_group_concat.
    This variable will hold actual value of group_concat_max_len.
    The output of group_concat will be restricted to this value instead
    of max_length.
    
    As mentioned above, instead of mbmaxlen, we now use mbminlen
    to determine maximum number of characters.
    This provides ability to store more characters in case of
    charsets that support variable length characters in case the
    data has characters that have length less than mbmaxlen.
    
    
    
    The change in metadata for first test is since group_concat_max_len
    is 400, and charset is utf8mb4, mbmaxlen is 4, hence length is 1600.
    
    The change in metadata for second test is since we are now using
    set_data_type_blob() which sets type as MYSQL_TYPE_LONG_BLOB (251).

commit 601daf7f3fea3ced05dfab65442bee853cec6b22
Merge: 0ad3bfa 9e404a1
Author: Shivashankar Nagaraj <shiva.y.shankar@oracle.com>
Date:   Mon Sep 18 14:06:35 2017 +0530

    Merge branch 'mysql-5.7' into mysql-8.0

commit 0ad3bfa48bab041cd223d288c326e0c26b4d8efb
Author: Bharathy Satish <bharathy.x.satish@oracle.com>
Date:   Mon Sep 18 10:18:33 2017 +0200

    Bug #26395134: SET PERSIST_ONLY HAS WRONG EFFECT ON P_S.VARIABLES_INFO
    
    Problem: SET PERSIST_ONLY sql will not change the value of a variable,
    however when executing this sql, the sql causes
    performance_schema.variables_info.variable_source column to be changed
    to DYNAMIC which gives an impression that the variable has been changed
    at runtime which is not correct.
    
    Fix: When SET PERSIST_ONLY sql is executed do not change
    variable_source/set_user/set_time/set_host columns in
    performance_schema.variables_info table.

commit 9e404a1c7ac9606fc3c103d9eea480508a5db72a
Author: Shivashankar Nagaraj <shiva.y.shankar@oracle.com>
Date:   Mon Sep 18 12:21:25 2017 +0530

    BUG#26495791: CONTRIBUTION: EXPAND TEST SUITE TO INCLUDE CRC32 TESTS
    
    Post-push fix for a pushbuild failure.

commit 9f61a7ceaff3f108eeb86280f51bcc61e886b2d0
Merge: ef940b7 077b326
Author: Sreeharsha Ramanavarapu <sreeharsha.ramanavarapu@oracle.com>
Date:   Mon Sep 18 09:05:07 2017 +0530

    Merge branch 'mysql-5.7' into mysql-8.0

commit 077b326b6409f315eecbb2ead8ad510cb99e95f9
Merge: 5bf8eee f65d90d
Author: Sreeharsha Ramanavarapu <sreeharsha.ramanavarapu@oracle.com>
Date:   Mon Sep 18 09:04:40 2017 +0530

    Merge branch 'mysql-5.6' into mysql-5.7

commit f65d90d1faaef82218fe00a41a068236854eb015
Author: Sreeharsha Ramanavarapu <sreeharsha.ramanavarapu@oracle.com>
Date:   Mon Sep 18 09:04:05 2017 +0530

    Bug #25989915: LOOSE INDEX SCANS RETURNING WRONG RESULT
    
    Post-push fix for embedded test in 5.6.
    
    Explicitly mention Innodb in DDL. Embedded test picks
    MYISAM.

commit ef940b7f392a78b31efb55e135cc045592d8de82
Merge: cfda9c8 5bf8eee
Author: Sreeharsha Ramanavarapu <sreeharsha.ramanavarapu@oracle.com>
Date:   Mon Sep 18 08:50:44 2017 +0530

    Merge branch 'mysql-5.7' into mysql-8.0

commit 5bf8eee17bcc0d727f2b13e098b2d80cf4e2d568
Author: Sreeharsha Ramanavarapu <sreeharsha.ramanavarapu@oracle.com>
Date:   Mon Sep 18 08:48:31 2017 +0530

    Bug #26627181: WRONG RESULT WITH LEFT JOIN + DERIVED TABLES
    
    Issue:
    ------
    This bug can occur when:
    - there is an outer join.
    - an Item_direct_view_ref object references a const value
      from an inner table.
    
    The problem occurs on latest 5.7.20 but not on 8.0. The
    reason is that the fix for Bug#26432173 was only a
    partial fix in 5.7 (i.e. fixed only for temp table cases)
    but a more general one in 8.0.
    
    Solution:
    ---------
    A new Item_direct_view_ref::used_tables() function is
    created to take into account whether an Item in a
    derived table / view is part of an inner table of an outer
    join.
    
    The new tests have been added to 8.0 and trunk.

commit 3aaf41420abeb4b2b67dffcccb45ec7f192533fb
Author: Pekka Nousiainen <pekka.nousiainen@oracle.com>
Date:   Sat Sep 16 01:45:36 2017 +0300

    wl#7614 rowmap-01.diff
    
    rowmap: replace std::vector by ordered list

commit cfda9c8057bd26604e4c961565d69313ccffd828
Author: Dmitry Lenev <dmitry.lenev@oracle.com>
Date:   Wed Sep 13 14:27:18 2017 +0300

    Bug#26647340 "LIFT LIMITATION ON ALTER TABLE RENAME + TABLES WITH FOREIGN KEYS + LOCK TABLES".
    
    The problem was that ALTER TABLE RENAME under LOCK TABLES removed
    table from the list of locked tables and releases metadata lock on
    it (on both old and new names actually). Thus such renames broke
    invariants related to foreign keys for LOCK TABLES.
    
    This patch solves the problem by changing behavior of ALTER TABLE RENAME
    under LOCK TABLES. We no longer remove table being renamed from the list
    of locked tables and release metadata lock on it. Instead we reopen the
    table under its new name and keep metadata lock on the new table name
    (metadata lock on old name is still released).
    
    Thanks to this change ALTER TABLE RENAME no longer breaks FK-related
    invariants for LOCK TABLES in most cases and can be allowed. The only
    potentially problematic case is when there is orphan FK which is
    associated with the new table name as parent.
    To avoid breaking invariants in this case we require child tables for
    such FKs to be locked for WRITE.
    
    This patch also changes code to correctly handle case when ALTER TABLE
    is non-atomic but still adds foreign keys and fails at the late stage
    (after new table definition is committed to the data-dictionary).
    In such cases we need invalidate objects for parent tables in caches
    to ensure contents of these caches is in sync with contents of the
    data-dictionary.

commit 9c1e4e0b07bbbadb7d54d46a425527745d334881
Author: Dyre Tjeldvoll <Dyre.Tjeldvoll@oracle.com>
Date:   Fri Sep 15 16:40:55 2017 +0200

    Bug#26516584: Post-push re-record result

commit 36bd69d557370db8c9041a47e57efc53e8b88e13
Author: Christopher Powers <chris.powers@oracle.com>
Date:   Thu Sep 14 17:03:01 2017 -0500

    Bug#26732229 PERFORMANCE SCHEMA STATEMENT TABLES SHOULD DISPLAY REWRITTEN QUERY TEXT - 8.0+
    
    Use rewritten query text when available.

commit 3a11fedf272fd1eefde303464b2fe32b2eee27aa
Merge: d5fe528 823c160
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Fri Sep 15 15:14:25 2017 +0200

    NULL Merge branch 'mysql-5.7' into mysql-8.0

commit d5fe5289c0fbef1998e7f8b6be41791a15675baf
Author: Dyre Tjeldvoll <Dyre.Tjeldvoll@oracle.com>
Date:   Fri Sep 15 12:13:40 2017 +0200

    BUG#26516584: HANDLE SDI API FAILURE NEW BEHAVIOUR
    
    Problem: During development of wl#9538 code was added which enforced
    that sdi_ handlerton functions did not call my_error()
    themselves. During testing of other wls it was discovered that this
    invariant no longer holds, and that the caller now can expect
    my_error() to have been called if the functions return non-zero, and
    the enforcement was commented out.
    
    Solution: Remove special handling of non-zero return value from these
    functions and return true in case of error. Include the normal assert
    that either is_error() or killed is true. Remove special checking
    function and generic error message which is no longer needed.

commit 3eba5a4d40bbb3f7b2263612c1688452a03b2654
Author: Satya Bodapati <satya.bodapati@oracle.com>
Date:   Fri Sep 15 12:19:02 2017 +0200

    Refix Bug#26389442
    
    - Remove duplicate variable ibuf_use and directly use innodb_change_buffering variable
      innodb_change_buffering is updated whenever uses changes the value

commit a10812cd2a482704ec4fcaa917cd69e1a99530ed
Author: Satya Bodapati <satya.bodapati@oracle.com>
Date:   Fri Sep 15 11:33:45 2017 +0200

    Revert "Bug#26389442 	INNODB_CHANGE_BUFFERING IS NOT A DYNAMIC VARIABLE"
    
    This reverts commit 63e5dbfed9eb0920b384ec93dddbeb5f1315d5d4.

commit 823c1601c3216d58930b12bada82371ffb31968b
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Thu Sep 14 12:35:34 2017 +0200

    dos2unix cmake/mysql_add_executable.cmake

commit 32a8550fc7eb079fbdbae58666fe311a10935f00
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Thu Sep 14 12:34:55 2017 +0200

    Log cmake message if we have found openssl .dll libraries on windows.

commit 9100c61e7c1c9ecd549057df4394660bd4e4c634
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Thu Sep 14 12:33:25 2017 +0200

    Backport some additional GenError dependencies

commit bbe2da9d9c0c3a41c11a47a29b5eadedea8672d9
Merge: ca324b4 2753ab2
Author: Pedro A. Ribeiro <pedro.a.ribeiro@oracle.com>
Date:   Fri Sep 15 11:09:14 2017 +0200

    Merge branch 'mysql-5.7-cluster-7.5' into mysql-5.7-cluster-7.6

commit 2753ab2b02a99ef91453a3da0a9bfc4d94a6605a
Author: Pedro A. Ribeiro <pedro.a.ribeiro@oracle.com>
Date:   Thu Sep 14 15:46:00 2017 +0200

    Bug#26758939 : FAIL TO LOCK THREAD TO CPU
    
    Post fix patch
    
    The first version of the patch introduced a goto call to label
    "error" which would  only be used when HAVE_LINUX_SCHEDULING
    is defined. This might cause compilation errors. Replaced goto call
    by a function return call with proper error code.
    
    This solution is not robust against future changes in error handling
    inside the function NdbThread_UnlockCPU(). However an improvement
    would require a major refactor of this function

commit b4a5e1fe6470b810bae9d9a992640d7c9d3b6718
Author: Roy Lyseng <roy.lyseng@oracle.com>
Date:   Fri Sep 15 09:09:41 2017 +0200

    Bug#26049942: create table .. as select .. quote() give wrong length
    
    A wrong formula was used to calculate maximum length of result strings
    for a few string functions: quote(), aes_decrypt() and weight_string().
    
    Now, all these functions will use length of argument in characters
    instead of bytes when calculating maximum result size.

commit 607752e091d21e47379cd459feec1c3549576ed4
Merge: 6b803d2 fde1dd0
Author: Christopher Powers <chris.powers@oracle.com>
Date:   Fri Sep 15 02:27:41 2017 +0200

    Null-merge from 5.7

commit fde1dd03c1b9fc9c008b8eedce0cb8544977457e
Author: Christopher Powers <chris.powers@oracle.com>
Date:   Fri Sep 15 00:35:40 2017 +0200

    Bug#26732229 PERFORMANCE SCHEMA STATEMENT TABLES SHOULD DISPLAY REWRITTEN QUERY TEXT
    
    Use rewritten query text when available.
    
    Updates:
    - Fix 5.7 build break Windows + MacOS
    - Re-record query_rewrite_plugins.performance_schema

commit 6b803d2bf258a622a1709c36bffe88f302c03e5d
Merge: fc2f451 3545adc
Author: Christopher Powers <chris.powers@oracle.com>
Date:   Thu Sep 14 23:48:15 2017 +0200

    Null-merge from 5.7

commit 3545adceee85445e6d2ca7c803463cbfbafadb73
Author: Christopher Powers <chris.powers@oracle.com>
Date:   Thu Sep 14 14:41:25 2017 -0500

    Bug#26732229 PERFORMANCE SCHEMA STATEMENT TABLES SHOULD DISPLAY REWRITTEN QUERY TEXT
    
    Use rewritten query text when available.

commit fc2f451ca6a48d23f9bd002e452b468d9a584c4c
Merge: 21238ec 83ec580
Author: Christopher Powers <chris.powers@oracle.com>
Date:   Thu Sep 14 22:55:41 2017 +0200

    Null-merge from 5.7

commit 83ec5808e7e535a5c7e8b7dedfab97a502491b67
Merge: 2d617a1 f2e681c
Author: Christopher Powers <chris.powers@oracle.com>
Date:   Thu Sep 14 22:54:24 2017 +0200

    Null-merge from 5.6

commit f2e681cc8ead137f0b4c6ed3a75899387d210643
Author: Christopher Powers <chris.powers@oracle.com>
Date:   Thu Sep 14 22:44:20 2017 +0200

    Bug#26732229 PERFORMANCE SCHEMA STATEMENT TABLES SHOULD DISPLAY REWRITTEN QUERY TEXT
    
    Use rewritten query text when available -- updated MTR, no embedded

commit 21238eca778c08669e39f1d10b03152f854b2a04
Merge: 63e5dbf 2d617a1
Author: Christopher Powers <chris.powers@oracle.com>
Date:   Thu Sep 14 19:50:03 2017 +0200

    Null-merge from 5.7

commit 2d617a1cbfd492f9ebb5446d77423c23d9b6ac2d
Merge: 63dfebd 22113d1
Author: Christopher Powers <chris.powers@oracle.com>
Date:   Thu Sep 14 19:48:37 2017 +0200

    Null-merge from 5.6

commit 22113d130f7f3192254cb3f2cfb83a857c795e65
Author: Christopher Powers <chris.powers@oracle.com>
Date:   Wed Sep 13 18:27:09 2017 -0500

    Bug#26732229 PERFORMANCE SCHEMA STATEMENT TABLES SHOULD DISPLAY REWRITTEN QUERY TEXT
    
    Use rewritten query text when available.

commit 63e5dbfed9eb0920b384ec93dddbeb5f1315d5d4
Author: Satya Bodapati <satya.bodapati@oracle.com>
Date:   Thu Sep 14 15:37:34 2017 +0200

    Bug#26389442 	INNODB_CHANGE_BUFFERING IS NOT A DYNAMIC VARIABLE
    
    Problem:
    --------
    WL#7488 removed the dynamic property of innodb_change_buffering variable
    
    Fix:
    ----
    Add the update code which handles the dynamic property of innodb_change_bufering
    variable.
    
    Patch written by Sunny Bains <sunny.bains@oracle.com>
    Tested and Reviewed by Satya Bodapati <satya.bodapati@oracle.com> on IM

commit ca324b47d20e14f42d690f8c4998ab5b22d1c182
Merge: 84acc35 9e797be
Author: Martin Sköld <Martin.Skold@oracle.com>
Date:   Thu Sep 14 14:45:12 2017 +0200

    Merge branch 'mysql-5.7-cluster-7.5' into mysql-5.7-cluster-7.6

commit 9e797bebb27c26676e6d273be00e77c6b59a28f7
Merge: 9dd6bdd 71d64d8
Author: Martin Sköld <Martin.Skold@oracle.com>
Date:   Thu Sep 14 14:40:29 2017 +0200

    Merge branch 'mysql-5.6-cluster-7.4' into mysql-5.7-cluster-7.5

commit 7c4d5030670745094ff579ea795af65955b971df
Merge: 15d6ba8 63dfebd
Author: Shivashankar Nagaraj <shiva.y.shankar@oracle.com>
Date:   Thu Sep 14 16:26:14 2017 +0530

    Merge branch 'mysql-5.7' into mysql-8.0

commit 63dfebd2a3d64d6c5280b4495f612cb3556ac6d2
Author: Shivashankar Nagaraj <shiva.y.shankar@oracle.com>
Date:   Thu Sep 14 16:19:57 2017 +0530

    BUG#26495791: CONTRIBUTION: EXPAND TEST SUITE TO INCLUDE CRC32 TESTS
    
    Description:
    This bug tracks a contribution by Daniel Black (Github user: grooverdan) as
    described in http://github.com/mysql/mysql-server/pull/157
    
    Apart from external contribution I have added few more additional testcases
    for CRC32() function, which are given below.
    
    New Testcases added:
      ->Verify the crc value of various numeric and string data types(int,
          double, blob, text, json, enum, set)
      ->Verify the crc value when expressions having comparison_operators
          and logical_operators
      ->Verify the crc value for the expression having string_functions,
          arithmetic_functions, json_functions
      ->Verify the crc value for the expression having Geometry functions
          like POINT, LINESTRING, MULTILINESTRING, POLYGON, MULTIPOLYGON
      ->Verify the crc value generated from stored procedures, functions,
          triggers, prepare statement, views.
    
    Fix:
    Patch based on contribution by Daniel Black (Github user: grooverdan)
    
    Reviewed-by: Anitha Gopi anitha.gopi@oracle.com
    Reviewed-by: Srikanth B R srikanth.b.r@oracle.com
    
    RB: 17294

commit 15d6ba8c536499f743bd367d9c91be94f68b6388
Merge: 9741a1a 7373d20
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Thu Sep 14 12:27:01 2017 +0200

    NULL Merge branch 'mysql-5.7' into mysql-8.0

commit 7373d20d8a45abd20b0c1252cde2dbb978338da5
Merge: 7b433c5 039ee8f
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Thu Sep 14 12:26:26 2017 +0200

    NULL Merge branch 'mysql-5.6' into mysql-5.7

commit 71d64d815b91db23590a2d40982c77671cc86a7e
Merge: 391d589 3745db8
Author: Martin Sköld <Martin.Skold@oracle.com>
Date:   Thu Sep 14 11:56:57 2017 +0200

    Merge branch 'mysql-5.6-cluster-7.3' into mysql-5.6-cluster-7.4

commit 9741a1a8111a6032a83171b409d540044edd8041
Author: Erlend Dahl <erlend.dahl@oracle.com>
Date:   Tue Sep 12 09:26:20 2017 +0200

    Bug#26279805 WRONG COPYRIGHT HEADERS IN COMPONENTS/ FILES
    
    Fix more copy-paste mess

commit 3745db829322f0ef2f69b9ffc8381d324cc13c65
Merge: 1595089 950d5aa
Author: Martin Sköld <Martin.Skold@oracle.com>
Date:   Thu Sep 14 10:34:49 2017 +0200

    Merge branch 'mysql-5.5-cluster-7.2' into mysql-5.6-cluster-7.3

commit 950d5aacbf4ce0f30ec6bf88c6597fd9c59bd8e5
Author: Martin Sköld <Martin.Skold@oracle.com>
Date:   Thu Sep 14 10:32:22 2017 +0200

    Bug#26333981 BI IS WRITING TABLE_MAP EVEN WHEN USING SQL_LOG_BIN = 0
    
    Added support for maintaining a accumulative any_value bitmap
    for GCI event operations that represents bits set consistently
    for all rows of a specific table in an epoch. A new method variant
    Ndb::getNextEventOpInEpoch3 is added that allows for retrieving the
    cumulative any_value bitmap.
    Added a check if all operations (rows) for a specific tables are all
    marked as nologging to exclude adding this table from the Table_map
    of the binlog injector. Added a new test case that verifies this case
    by checking just the Table_map (independent of how epochs are generated).

commit a55ec4a8fbcdabae5ddaa078380bbfa60de712b5
Author: Gleb Shchepa <gleb.shchepa@oracle.com>
Date:   Wed Sep 13 16:15:36 2017 +0400

    WL#8065, post-push fix for unit tests.
    
    The LockingClauseSyntaxTest unit test didn't initialize
    sql_command_flags[] flags, so the is_explainable_query()
    condition failed in PT_explain::make_cmd().
    
    The fix:
    * init_update_queries() has been renamed to init_sql_command_flags()
      for the better readability.
    * The init_sql_command_flags() call has been added to the LockingClauseSyntaxTest
      unit test.

commit 55a9f92cfe5b0d531af15b0ee51ab9c1553b6a5d
Author: Sivert Sorumgard <sivert.sorumgaard@oracle.com>
Date:   Thu Aug 31 08:47:15 2017 +0200

    Bug #26723442: CRASH IN SHARED_DICTIONARY_CACHE WHEN SETTING SE_PRIVATE_ID ON A DD::TABLE
    
    A bug in the comparison operator for one of the cache keys made
    the DD cache incorrectly conclude that two keys composed of the
    same SE private id, but for two different engines, were actually
    equal.

commit 43f3f6f421fe0e07a25da8b26eeb545945754fe0
Author: Marc Alff <marc.alff@oracle.com>
Date:   Tue Sep 12 14:16:05 2017 +0200

    Bug#26787170 DD VERSION NUMBER NOT MAINTAINED FOR PERFORMANCE SCHEMA
    
    Before this fix, the version number for the performance schema
    stored in the data dictionary was not consistently updated
    each time a performance schema table DDL changes.
    
    The root causes are:
    - the version number itself is in dd code, not maintained by
      the performance schema team, and easy to overlook.
    - there is no process in place to enforce that this version
      number is modified on schema changes,
      making it even more easy to overlook.
    
    With this fix:
    - File storage/perfschema/pfs_dd_version.h
      now contains the value of the version number stored in the data dictionary
    - A new MTR test script, perfschema.dd_version_check,
      is designed to break when schema changes are detected,
      acting as a reminder that the data dictionary version
      needs to be adjusted.

commit 84acc35e41b084e7839e99e8e7fc552a8286b85a
Merge: 113c772 9dd6bdd
Author: Lakshmi Narayanan Sreethar <lakshmi.narayanan.sreethar@oracle.com>
Date:   Wed Sep 13 22:49:06 2017 +0530

    Merge branch 'mysql-5.7-cluster-7.5' into mysql-5.7-cluster-7.6

commit 9dd6bdd9915ea2b94d15c34e8bc36ef7078cd8c5
Author: Lakshmi Narayanan Sreethar <lakshmi.narayanan.sreethar@oracle.com>
Date:   Tue Sep 12 21:06:38 2017 +0530

    Bug#26758939 : FAIL TO LOCK THREAD TO CPU
    
    When an ndbd is configured to lock its thread to its CPUs, it crashes
    during start phase with a "Failed to lock tid" error message.
    
    This bug is a side effect of fix for Bug#26378589. That patch disables
    the cpu locking feature if the required glibc version is not available.
    The bug in the glibc will be hit only during a Ndb_UnlockCPU() call.
    The datanodes never use this call. This unlock call can be only
    accessed through the API calls. So, this patch enables the cpu locking
    feature for the datanodes and disable them only for the API calls,
    based on the glibc version used. This patch also adds restrictions to
    prevent any future uses of sched_setaffinity() call with an all ones
    CPU mask in an unsupported glibc environment. The relevant ClusterJ
    message is also updated to provide more information to the user.

commit 964dd0dbf7827c431c46f43519b02cfdb1d7d36d
Author: Marc Alff <marc.alff@oracle.com>
Date:   Wed Sep 13 18:46:03 2017 +0200

    Bug#25608115 VARIABLES_INFO.SET_TIME COLUMN INITIALIZED INCORRECTLY
    
    Before this fix, the column SET_TIME
    in table performance_schema.variables_info
    was set incorrectly.
    
    It was set to the time a user performs a SELECT query,
    instead of being the timestamp when the variable changed.
    
    The root cause is the design of the table DDL itself:
    
    - Variables that are never set, because they are immutable,
      should not have a SET_TIME.
    - The column however was declared NOT NULL,
      which forces the code to provide a value.
    
    Related issue, the SET_USER and SET_HOST column,
    while nullable according to the DDL,
    where never set to NULL.
    
    With this fix, columns SET_TIME, SET_USER, SET_HOST
    are cleaned up to work as expected for an audit trail:
    
    1) SET_TIME is nullable.
    
    2) When a variable is never set,
    columns SET_TIME, SET_USER and SET_HOST are NULL.
    
    3) When a variable is set,
    column SET_TIME is the timestamp when the value was set, not read.
    Columns SET_USER and SET_HOST are set
    to the user/host who performed the change.

commit 733577633b7eec78a51b70636568d735c187e96c
Author: Anushree Prakash B <anushree.prakash.b@oracle.com>
Date:   Wed Sep 13 12:17:36 2017 +0530

    Merge branch 'mysql-5.5' into mysql-5.6
    
    (cherry picked from commit 148b35d25800dfac8855262967eb76408126649b)

commit 3fa3a31fc8fdbee002f32991f16ac6768c70c9c0
Author: Anushree Prakash B <anushree.prakash.b@oracle.com>
Date:   Fri Sep 8 18:30:57 2017 +0530

    Merge branch 'mysql-5.5' into mysql-5.6
    
    (cherry picked from commit c25e5c808ba2957db29a319acd4751bf74864584)

commit 0441472e19e9a2e41df5d61098eb97c3e211547c
Author: Anushree Prakash B <anushree.prakash.b@oracle.com>
Date:   Wed Sep 13 12:20:39 2017 +0530

    Merge branch 'mysql-5.6' into mysql-5.7
    
    (cherry picked from commit 7b433c573694dbde070359db7d26cb17749cbea1)

commit d47295512de7e1dcece92a0acb6b48ca8b80013f
Author: Anushree Prakash B <anushree.prakash.b@oracle.com>
Date:   Fri Sep 8 18:32:58 2017 +0530

    Merge branch 'mysql-5.6' into mysql-5.7
    
    (cherry picked from commit 06db648de3b080bae518a083dd122ea10b058c04)

commit 1e550f642d14a89ac218cb0fb296c54d21586ff5
Author: Venkatesh Duggirala <venkatesh.duggirala@oracle.com>
Date:   Thu Sep 7 17:45:57 2017 +0530

    Revert "Bug#26589008 SYNC_BINLOG=0 SHOULD IGNORE BINLOG_GROUP_COMMIT_SYNC_DELAY"
    
    This reverts commit 5654f5ec294f3d8ea087029ba9b47ad3eb2835b3.

commit be111ffd32b6aa1042a236e34f6775d6f9854b7a
Author: Anushree Prakash B <anushree.prakash.b@oracle.com>
Date:   Wed Sep 13 12:14:06 2017 +0530

    Bug#26372491 - RCE THROUGH THE MISHANDLE OF BACKSLASH
    
    Post push fix to address test script failure.
    
    (cherry picked from commit 461eef45301fe6c725b0add5a6f28057a3d67e21)

commit 97fd754a7c46e74abd2d19c7f71c6419381989e9
Author: Anushree Prakash B <anushree.prakash.b@oracle.com>
Date:   Fri Sep 8 18:29:07 2017 +0530

    Bug#26372491 - RCE THROUGH THE MISHANDLE OF BACKSLASH
    
    DESCRIPTION:
    ===========
    The bug is related to incorrect parsing of SQL queries
    when typed in on the CLI. The incorrect parsing can
    result in unexpected results.
    
    ANALYSIS:
    ========
    The scenarios mainly happens for identifier names
    with a typical combination of backslashes and backticks.
    The incorrect parsing can either result in executing
    additional queries or can result in query truncation.
    This can impact mysqldump as well.
    
    FIX:
    ===
    The fix makes sure that such identifier names are
    correctly parsed and a proper query is sent to the
    server for execution.
    
    (cherry picked from commit 31a372aa1c2b93dc75267d1f05a7f7fca6080dc0)

commit f5366d85c45beb8e95f438ac9c7bf3c8521d3e07
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Wed Sep 13 15:50:13 2017 +0200

    WL#9467 - Resource Groups.
    
    Post-push fix: remove warnings from sql_lex.h on windows.

commit fb783da43a197e7d7e2e350da8d4d03b6d5dd048
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Tue Sep 12 11:06:30 2017 +0200

    Bug#26022865 BUILD FOR WINDOWS-S12-64BIT,ADVANCED IS FAILING ON PB2 MYSQL-5.6
    
    Remove cmake code for signing executables.
    Automatic signing has always failed anyways.
    It should be done manually as part of the release process.
    
    (cherry picked from commit 3fc36802f7b4e0b17ff53b395cb2c068e673ab4b)

commit 3e8cfdee941c5247fca5c5dd69eb67047c323890
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Thu Sep 7 11:00:49 2017 +0200

    Bug#26612465 BUILDING WITH CMAKE 3.9.0 OR NEWER GIVES DEPRECATION WARNINGS [noclose]
    
    Use generator expression rather than LOCATION to find .pdb file.
    
    (cherry picked from commit b8ac7656f2157089396800c4c56475f5697aa091)

commit 27bfd2c7331a512e98d41fcff50241f618c7fa41
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Thu Sep 7 09:43:31 2017 +0200

    Bug#26612465 BUILDING WITH CMAKE 3.9.0 OR NEWER GIVES DEPRECATION WARNINGS [noclose]
    
    Remove unused code for installing man pages.
    
    (cherry picked from commit 216b92b5a8ae35c1d49de1f0a737930f26db8f29)

commit 0d1ad4ef2b5ea235b60f2df100b96df7ad15fdb5
Author: Jens Even Berg Blomsoy <jens.even.blomsoy@oracle.com>
Date:   Wed Sep 13 13:33:30 2017 +0200

    BUG#26766501 - PATCH FOR #26271244 CAUSES PERFORMANCE REGRESSION FOR READ WRITE WORK LOADS
    
    POST FIX
    ==========
    Removed the check for HT_HIDDEN_SE from lock_table_names() which is called
    frequently, and added it to mysql_rename_tables() which is the only place
    not covered by other checks. This fixed the regression problem.
    
    BUG#26271244 - ASSERT FAILS WHEN SHOW CREATE TABLE CALLED ON A FILE
    CREATED FOR FULLTEXT INDEX
    
    Analysis of Initial Problem
    ========
    a) FTS indexes are represented as hidden tables which do not show
    up when doing SHOW TABLES. Yet their .ibd files are in the schema
    directory and issuing SHOW CREATE TABLE on the corresponding table name
    would trigger an assert.
    
    b) Other issues revealed themselves while digging into the bug.
    OPTIMIZE, REPAIR, TRUNCATE and LOCK TABLES all asserted, while
    RENAME and DROP TABLE was allowed.
    
    FIX
    ======
    OPTIMIZE, REPAIR, TRUNCATE, LOCK, RENAME, ALTER and DROP TABLE
    now issues an error of ER_NO_SUCH_TABLE when called with and FTS
    index.

commit e4cc026e495850ce1da3846f8ab8cee0a038914f
Author: Kristofer Älvring <kristofer.pettersson@oracle.com>
Date:   Tue Sep 12 11:45:17 2017 +0200

    Bug#25658967 REVOKE ALL IS NOT REVOKING ALL PRIVILEGE WHEN CURRENT_USER() IS USED
    
    The REVOKE statement failed to revoke dynamic privileges if the
    target user was specified as CURRENT_USER().
    CURRENT_USER() is not evaluated by the parser. Instead evaluation
    must happen at runtime for each and every statement which use this
    function which wasn't the case for the code related to revolval of
    all dynamic privileges.

commit e325763bdceb9c6d484fb6f0bbc0f580ac87a909
Author: Norvald H. Ryeng <norvald.ryeng@oracle.com>
Date:   Wed Sep 13 12:25:10 2017 +0200

    Bug #26188118 MBROVERLAPS(LS, LS) INCORRECT FOR PERPENDICULAR LINES
    
    Problem: MBROverlaps incorrectly returns false for two crossing
    perpendicular lines.
    
    Since the lines are perpendicular, the bounding boxes are infinitely
    thin (line shaped). However, they are still boxes, and hence of
    dimensionality 2, so they should overlap.
    
    Change-Id: I078790c26ad61a1aa2c04e921aa46819c3368358

commit 040371bdf2f3838e795911f489ad8c5d2197a742
Author: Erlend Dahl <erlend.dahl@oracle.com>
Date:   Wed Sep 13 11:49:49 2017 +0200

    Revert "Bug#25608115 VARIABLES_INFO.SET_TIME COLUMN INITIALIZED INCORRECTLY"
    
    Build break.

commit 48b0873a7f489f05d4c3975d3f8e7f273486412b
Author: Marc Alff <marc.alff@oracle.com>
Date:   Tue Sep 12 15:01:34 2017 +0200

    Bug#25608115 VARIABLES_INFO.SET_TIME COLUMN INITIALIZED INCORRECTLY
    
    Before this fix, the column SET_TIME
    in table performance_schema.variables_info
    was set incorrectly.
    
    It was set to the time a user performs a SELECT query,
    instead of being the timestamp when the variable changed.
    
    The root cause is the design of the table DDL itself:
    
    - Variables that are never set, because they are immutable,
      should not have a SET_TIME.
    - The column however was declared NOT NULL,
      which forces the code to provide a value.
    
    Related issue, the SET_USER and SET_HOST column,
    while nullable according to the DDL,
    where never set to NULL.
    
    With this fix, columns SET_TIME, SET_USER, SET_HOST
    are cleaned up to work as expected for an audit trail:
    
    1) SET_TIME is nullable.
    
    2) When a variable is never set,
    columns SET_TIME, SET_USER and SET_HOST are NULL.
    
    3) When a variable is set,
    column SET_TIME is the timestamp when the value was set, not read.
    Columns SET_USER and SET_HOST are set
    to the user/host who performed the change.

commit 17adb913d029d8fefcb7eb4ecfbe8a2b8d9d0e11
Author: Sven Sandberg <sven.sandberg@oracle.com>
Date:   Tue Sep 12 14:48:48 2017 +0200

    BUG#26786886: RPL_ROW_JSONDIFF_ERROR FAILS WITH GTIDS ENABLED
    
    The test was not build for running with GTID_MODE=ON.  Moving to
    non-GTID suite.

commit 039ee8f6660142dff62f5341ca0a83ad36b6315f
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Wed Sep 13 09:52:48 2017 +0200

    dos2unix cmake/mysql_add_executable.cmake

commit 51ee85ffbd79d96bb36ac4278f73566a5ef88477
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Tue Sep 12 12:28:35 2017 +0200

    Log cmake message if we have found openssl .dll libraries on windows.

commit cd6eb65dbc7432c2e7c33a28120a42360e0fa252
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Fri Sep 8 17:44:34 2017 +0200

    Backport some additional GenError dependencies

commit 79eb13cda34b0a73dcfa9714794e8ff730cbb7c0
Author: Satya Bodapati <satya.bodapati@oracle.com>
Date:   Wed Sep 13 12:28:19 2017 +0530

    Bug#25922124 INNOCHECKSUM READ_FILE: CONDITIONAL JUMP OR MOVE DEPENDS ON UNINITIALISED VALUE
    
    Problem:
    -------
    
    This happens only with 1k compressed page size. We always read page 0 in
    parts.
    
    First, we read 1024 bytes to determine page_size etc and then read
    remaining part of page (with partial_read_read=true).
    When page_size is 1024, we already have the entire page but still we go
    try to read remaining part of page.
    
     386         if (partial_page_read) {
     387                 buf += UNIV_ZIP_SIZE_MIN;
     388                 physical_page_size -= UNIV_ZIP_SIZE_MIN;
     389                 bytes = UNIV_ZIP_SIZE_MIN;
     390         }
    
    (gdb) p physical_page_size $4 = 1024
    
        now
    
    buf += 1024 --> this moves buf to unintialized area.
    physical_page_size -= 1024 , this is 0
    bytes = 1024
    
    gdb) p physical_page_size
    $5 = 0 is passed to fread below().
    
    bytes += ulong(fread(buf, 1, physical_page_size, fil_in));
    
    After this, mach_read_from_4(buf + FIL_PAGE_OFFSET) < 3); triggers
    valgrind warning because buf now points to unintialized area.
    
    Fix:
    
    1. Remove the code which is no longer valid (have any purpose)
    2. Do not read from file if the bytes to be read is 04
    
    Reviewed-By: Bin Su <bin.x.su@oracle.com>
    RB: 17351

commit 95da8ec22521c5665cd887441aea95440385e1cb
Merge: 19fa698 7b433c5
Author: Anushree Prakash B <anushree.prakash.b@oracle.com>
Date:   Wed Sep 13 12:22:41 2017 +0530

    Merge branch 'mysql-5.7' into mysql-8.0

commit 7b433c573694dbde070359db7d26cb17749cbea1
Merge: 07a82d0 148b35d
Author: Anushree Prakash B <anushree.prakash.b@oracle.com>
Date:   Wed Sep 13 12:20:39 2017 +0530

    Merge branch 'mysql-5.6' into mysql-5.7

commit 148b35d25800dfac8855262967eb76408126649b
Merge: 3844dea 461eef4
Author: Anushree Prakash B <anushree.prakash.b@oracle.com>
Date:   Wed Sep 13 12:17:36 2017 +0530

    Merge branch 'mysql-5.5' into mysql-5.6

commit 461eef45301fe6c725b0add5a6f28057a3d67e21
Author: Anushree Prakash B <anushree.prakash.b@oracle.com>
Date:   Wed Sep 13 12:14:06 2017 +0530

    Bug#26372491 - RCE THROUGH THE MISHANDLE OF BACKSLASH
    
    Post push fix to address test script failure.

commit 19fa698bab1c107a4b244f66dea0cb887efaa2f1
Author: Satya Bodapati <satya.bodapati@oracle.com>
Date:   Tue Sep 12 16:57:04 2017 +0530

    Bug#26757227 - INNODB SHOULD RESERVE TABLE_IDS CONSITENTLY FOR NEW AND UPGRADED DATADIRS
    
    Problem:
    --------
    On upgrade, the first user table_id is from 1024. The first 1024
    table_ids are reserved for dictionary tables.
    
    On bootstrap, there is no such reservation, so it is inconsistent.
    
    having a reserved range of table_ids for dicitonary tables will also
    help in future upgrades.
    
    Fix:
    ----
    Reserve 1024 (DICT_MAX_DD_TABLES) ids for dicionary tables for 8.0
    bootstrapped datadirs.
    
    Reviewed-By: Bin Su <bin.x.su@oracle.com>
    RB: 17321

commit de5ba439d5d14964fd48de82301948d293e2f7b9
Author: Satya Bodapati <satya.bodapati@oracle.com>
Date:   Tue Sep 12 16:41:56 2017 +0530

    Bug#26757171 - INNODB DICTIONARY TABLES SHOULD BE REMOVED AT THE END OF UPGRADE
    
    Problem:
    -------
    After WL#9535, InnoDB no longer uses InnoDB dictionary. InnoDB
    Dictionary
    tables  SYS_* are only read during upgrade from 5.7 to 8.0
    
    Since we don't support downgrade, there is no purpose of the SYS_*
    tables
    after successful upgrade.
    
    Fix:
    ----
    Drop InnoDB Dictionary tables (SYS_*) at the end of successful upgrade.
    
    Reviewed-By: Bin Su <bin.x.su@oracle.com>
    RB: 17334

commit 89bbcd039d7bdcf494f16ab67441c0c47e3dbed6
Author: Daogang Qu <bill.qu@oracle.com>
Date:   Wed Sep 13 08:54:19 2017 +0800

    Bug #26729602 	UPGRADE 5.7->8.0.3: REPLICATION MAY NOT START DUE TO INDEX FILE NEW DEFAULT NAME - post fix
    
    Problem 1
    =========
    main.binlog_partial_json_warnings
    2017-09-12T02:26:28.880667Z 0 [Warning] [003784] You need to use --log-bin to make --binlog-format work.
    
    Analyze 1
    =========
    The main.binlog_partial_json_warnings is reporting the above warning with --binlog_format=mixed on weekly-trunk, since it restarts the server with --binlog-row-value-options=PARTIAL_JSON --binlog-row-image=MINIMAL --skip-log-bin --skip-log-slave-updates --skip-slave-preserve-commit-order.
    
    Fix 1
    =====
    To fix the problem, suppress the warning in the test.
    
    Problem 2
    =========
    CURRENT_TEST: sys_vars.log_bin_basic
     select @@global.log_bin;
     @@global.log_bin
    -1
    +0
     select @@session.log_bin;
     ERROR HY000: Variable 'log_bin' is a GLOBAL variable
     show global variables like 'log_bin';
     Variable_name	Value
    -log_bin	ON
    +log_bin	OFF
     show session variables like 'log_bin';
     Variable_name	Value
    -log_bin	ON
    +log_bin	OFF
     select * from performance_schema.global_variables where variable_name='log_bin';
     VARIABLE_NAME	VARIABLE_VALUE
    -log_bin	ON
    +log_bin	OFF
     select * from performance_schema.session_variables where variable_name='log_bin';
     VARIABLE_NAME	VARIABLE_VALUE
    -log_bin	ON
    +log_bin	OFF
    
    Analyze 2
    =========
    The main.binlog_partial_json_warnings is reporting the above mismatch on weekly-trunk, since it runs test with --mysqld=--skip-log-bin --mysqld=--skip-log-slave-updates --mysqld=--skip-slave-preserve-commit-order.
    
    Fix 2
    =====
    To fix the problem, source have_log_bin.inc in the test.
    
    Problem 3
    =========
    main.binlog_partial_json_warnings
    2017-09-09T14:20:50.365565Z 0 [Warning] [003786] No argument was provided to --log-bin, and --log-bin-index was not used; so replication may break when this MySQL server acts as a master and has his hostname changed!! Please use '--log-bin=siv28-bin' to avoid this problem.
    
    Analyze 3
    =========
    The main.binlog_partial_json_warnings is reporting the above warning with --mysqld=--skip-log-bin --mysqld=--skip-log-slave-updates --mysqld=--skip-slave-preserve-commit-order on weekly-trunk, since it restarts the server with --log-bin --binlog-format=statement --binlog-row-value-options=PARTIAL_JSON --binlog-row-image=MINIMAL.
    
    Fix 3
    =====
    To fix the problem, suppress the warning in the test.

commit f193b4b4ac1f66a244b633c40d9aa9855a376171
Author: Gleb Shchepa <gleb.shchepa@oracle.com>
Date:   Wed Sep 13 01:14:37 2017 +0400

    WL#8065: post-push update, Doxygen comment fix.

commit 3e951d2b9e3ed111c3804542485a01698d1c4538
Author: Gleb Shchepa <gleb.shchepa@oracle.com>
Date:   Wed Sep 13 00:35:12 2017 +0400

    WL#8066: True bottom-up server parser: refactoring of the HANDLER statement

commit 0c9f84f98f948027abd5a265c7286bbbbcdb7ba5
Author: Gleb Shchepa <gleb.shchepa@oracle.com>
Date:   Fri Sep 8 12:35:11 2017 +0400

    WL#8065: True bottom-up server parser: refactoring of the EXPLAIN statement

commit 62d5c2501cc7e27cfb7343a0110057f3e19c9b6a
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Tue Sep 12 16:15:01 2017 +0200

    Bug#26612465 BUILDING WITH CMAKE 3.9.0 OR NEWER GIVES DEPRECATION WARNINGS [noclose]
    
    Remove message from cmake, add as comment instead.

commit 7ee64d795b6adc0493c1aae68858ccc1142b7a8e
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Wed Aug 30 07:29:26 2017 +0200

    Bug#26612465 BUILDING WITH CMAKE 3.9.0 OR NEWER GIVES DEPRECATION WARNINGS [noclose]
    
    - Collect all "convenience" libraries in
      ${CMAKE_BINARY_DIR}/archive_output_directory
    
    - Extend the ADD_CONVENIENCE_LIBRARY macro with a POST_BUILD target
      which will save library location for later merge with other static libraries.
    
    - Add an ADD_IMPORTED_LIBRARY macro for merging of imported static libraries
      with "convenience" libraries.
    
    - Implement a new GET_DEPENDEND_OS_LIBS which does not depend on the
      LOCATION property.
    
    - Keep a list of known "convenience" libraries, and ensure that all
      libraries and library locations are known at merge time.
    
    - Rewrite all the merge targets, with separate rules for
      MSVC / APPLE / LINUX / UNIX
    
    (cherry picked from commit dc42a8443ac0d1c6516897a7a2e88c782b27008f)

commit acf32dc7a3fc4b33f4f60ce7ef7e17fd9b9127ea
Author: Satya Bodapati <satya.bodapati@oracle.com>
Date:   Tue Sep 12 00:03:33 2017 +0530

    Bug#26762517 - DEADLOCKCHECKER::SEARCH IN LOCK/LOCK0LOCK.CC
    
    Problem:
    --------
    The DD tables mysql/table_stats, mysql/index_stats are now
    updated via attachable RW transactions. It is possible that
    they update the same row from different attachable RW
    transactions leading to deadlock.
    
    Fix:
    ----
    Although a proper MDL would have prevented deadlock on this table,
    since these are stats tables, server wants to handle deadlock
    error and abort the update from attachable RW-trx by I_S SELECT.
    
    On debug builds, InnoDB asserts that deadlock on DD tables shouldn't be possible.
    In this fix, for these tables, we give exemption to deadlock assert
    and return deadlock error to server.
    
    Also exempt these tables from GAP lock assert.
    
    Reviewed-By: Bin Su <bin.x.su@oracle.com>
    RB: 17347

commit 967f9618b24af9f0c1b00fde60d85b8a1011bb3a
Author: Satya Bodapati <satya.bodapati@oracle.com>
Date:   Thu Aug 31 15:30:46 2017 +0200

    Bug#26628126 WL9536: ASSERTION FAILURE: LOG0DDL.CC:1629:ERR == DB_SUCCESS
    
    Problem:
    --------
    In DDL trx post commit, we try to acquire MDL on SDI table to prevent concurrent purge.
    And MDL acquisition can fail to due low MDL lock wait timeout or because of KILL QUERY.
    
    We don't expect failure during DDL trx post commit and assert MDL acquisition cannot fail.
    
    Fix:
    ----
    Acquire the SDI MDLs during drop of file_per_table tablespace & drop general tablespace.
    Remove SDI tables from cache in DDL trx post commit.
    
    Reviewed-By: Jimmy Yang <jimmy.yang@oracle.com>
    RB: 17265

commit 90cf66dc8b4663d13cab6d3c106b2e4505723254
Author: Satya Bodapati <satya.bodapati@oracle.com>
Date:   Tue Sep 12 11:35:12 2017 +0200

    Remove un-necessary include

commit 405e3f0b5d9450a43f9efbb6ad503f46afd7f8dc
Author: Allen Lai <zheng.lai@oracle.com>
Date:   Tue Sep 12 12:18:18 2017 +0800

    Fixed bug#26678239 INNODB.LOG_ENCRYPT_KILL FAILS OCCASIONALLY DUE TO
    LOG_EVENT::READ_LOG_EVENT():
    
    Add suppression to make it pass.

commit 806d71d531e556d375824daff159da8f47aee779
Author: Bin Su <bin.x.su@oracle.com>
Date:   Tue Sep 12 09:48:38 2017 +0800

    Bug#26535746 - DIFFERENT PARTITIONS CAN'T HAVE DIFFERENT ROW FORMAT
    
    After meta-sync push, the row format of the table would be updated
    every time if it's changed after a DDL, stored in dd::Table::row_format.
    This should be fine for normal InnoDB table. However, this applies to
    partitioned table too. So the row format of partitioned table would be
    consistent with the row format of the latest created/altered partition.
    Since it used to allow different partitions have different row formats,
    with above update strategy, every partitioned table would only know one
    row fromat from dd::Table::row_format, this result in some row format
    mismatch after next opening table.
    
    Since we do allow different row formats for different partitions,
    row format of every partition should be stored separately, then they
    won't be forgot. So for partitioned table:
    1. The dd::Table::row_format would not be updated by InnoDB internally
    for partitioned table, so does the key_block_size option
    2. row format of every partition should be stored in
    dd::Partition::se_private_data["format"], if this partition has
    different row format from the row format defined for the table.
    
    RB: 17257
    Reviewed-by: Jimmy Yang <jimmy.yang@oracle.com>

commit 113c772f9a6d33a5c405f064f2161800974ff32d
Merge: 73ce17c 8f03285
Author: John David Duncan <john.duncan@oracle.com>
Date:   Mon Sep 11 18:34:32 2017 -0700

    Merge branch 'mysql-5.7-cluster-7.5' into mysql-5.7-cluster-7.6

commit 8f03285ed27169030bb6666aa4d0bc8cb4826dd4
Merge: 7e93ead 391d589
Author: John David Duncan <john.duncan@oracle.com>
Date:   Mon Sep 11 18:34:19 2017 -0700

    Merge branch 'mysql-5.6-cluster-7.4' into mysql-5.7-cluster-7.5

commit 391d589db32548da2150acb380ef4fcf4ee800d4
Author: John David Duncan <john.duncan@oracle.com>
Date:   Mon Sep 11 18:21:43 2017 -0700

    New script storage/ndb/count-disabled
    Count disabled tests in ndb test suites.

commit d82f83558974d7c683ee7b068bfcd007ef95ee31
Author: Jimmy Yang <jimmy.yang@oracle.com>
Date:   Tue Sep 12 05:49:23 2017 +0800

    Bug #26649020 ASSERTION FAILED: STRLEN(DB) <= (64*3) && STRLEN(NAME) <= (64*3)
    
    Approved by: Allen Lai <allen.lai@oracle.com>

commit a955fab1787f49cf4442dc76f380f546db5e3a93
Author: Erlend Dahl <erlend.dahl@oracle.com>
Date:   Sun Sep 10 15:02:02 2017 +0200

    Bug#26778536 ENTRY NOT DROPPED FROM PERFORMANCE_SCHEMA.ACCOUNTS [noclose]
    
    Update
    
      i_main.hostname_ipv4-bug25510805
    
    and
    
      i_main.hostname_ipv6-bug25510805
    
    to start with a clean slate in perfschema.accounts.
    
    Approved by Anushree Prakash B <anushree.prakash.b@oracle.com>.

commit 39de16583f172a8bf99f9006207112c1ffb6a2d4
Author: Sreeharsha Ramanavarapu <sreeharsha.ramanavarapu@oracle.com>
Date:   Mon Sep 11 15:42:45 2017 +0530

    Bug #25989915: LOOSE INDEX SCANS RETURNING WRONG RESULT
    
    Post-push fix for result file in 8.0+.

commit dd75c96f1940c7dd49fa9b67556ae13d5c60b5d1
Author: Chaithra Gopalareddy <chaithra.gopalareddy@oracle.com>
Date:   Mon Sep 11 13:17:22 2017 +0530

    Bug#26496880: CRASH IN FIELD_BLOB::GET_KEY_IMAGE
    
    Problem:
    read_set for the field is not set because its not part of the query.
    As a result, server exits trying to read the data from the buffer.
    
    Analysis:
    For the query in the bugpage, as field "b" is not part of the query, optimizer
    does not set the bit for the field in read_set. This results in innodb
    not fetching the data for field "b". But "b" is part of the primary key. So
    optimizer tries to read the key and fails.
    
    Solution:
    prepare_for_position() called from make_join_read_info() marks the fields
    in read_set, which are part of primary key, if primary key is needed to
    find the row.
    We now call prepare_for_position() if window functions are present.

commit 62008e71bbcb112eaf68dd63d64619e45ea4e85e
Author: Allen Lai <zheng.lai@oracle.com>
Date:   Mon Sep 11 14:39:58 2017 +0800

    Bug#22680868 SOME INNODB TESTS ARE FAILING ON WINDOWS AFTER THE TDE PUSH
    
    Can not reproduce those failures on Windows, try to re-enable these test cases.

commit f107706e99037d7a4dec4ede3c5bbc6425ffa312
Author: Pavan Naik <pavan.naik@oracle.com>
Date:   Mon Sep 11 11:14:46 2017 +0530

    BUG#26406981: FLAG MISSING .RESULT FILE AS FAILED TEST
    
    After BUG#26406981 fix, a test not having its corresponding result
    file is marked as failed by MTR. But there exist few NDB tests which
    don't have result files.
    
    This follow up patch provides a way to avoid the result file check for
    these NDB tests by introducing a new include file
    'ndb_no_result_file.inc'. Result file check is skipped for the tests
    sourcing this include file.
    
    Note: The new include introduced is meant only for NDB tests and will
          not work with any other tests.
    
    Reviewed-by: Srikanth B R <srikanth.b.r@oracle.com>

commit c95dde336f6411b676d2dfb09146895488b895a5
Merge: c1620f7 07a82d0
Author: Sreeharsha Ramanavarapu <sreeharsha.ramanavarapu@oracle.com>
Date:   Mon Sep 11 10:02:20 2017 +0530

    Merge branch 'mysql-5.7' into mysql-8.0

commit 07a82d02461a8104ea409d0c72ab0f6ec04081eb
Merge: 1d6eb4e 3844dea
Author: Sreeharsha Ramanavarapu <sreeharsha.ramanavarapu@oracle.com>
Date:   Mon Sep 11 10:01:29 2017 +0530

    Merge branch 'mysql-5.6' into mysql-5.7

commit 3844dea192d33ddb5a99e96fd202b942141cf8d1
Author: Sreeharsha Ramanavarapu <sreeharsha.ramanavarapu@oracle.com>
Date:   Mon Sep 11 10:00:04 2017 +0530

    Bug #25989915: LOOSE INDEX SCANS RETURNING WRONG RESULT
    
    Problem:
    --------
    This problem occurs under the following conditions:
    1) Table has a unique index.
    2) Query checks whether a loose index scan is applicable to
    this query. And mistakenly chooses it despite unique
    indexes having no index extensions.
    
    This is can give wrong results. A similar problem also
    exists in Bug #26532061.
    
    Solution:
    ---------
    Index extensions are not applicable to UNIQUE indexes for
    loose index scans.
    
    So Field::is_part_of_actual_key should also consider the
    HA_NOSAME flag.

commit c1620f786aa8461c8b80ff4547bf4e4abfbac9ed
Author: Daogang Qu <bill.qu@oracle.com>
Date:   Mon Sep 11 09:16:51 2017 +0800

    Bug #26665527   MYSQLD--HELP SHOULD PRINT DEFAULT VALUE OF LOG-BIN-INDEX TOO
    
    On checking the output of mysqld --verbose --help, found that
    log-bin-index is not updated with any default values, where
    log-bin is set to hostname-bin.
    
    To fix the problem, make the mysqld --verbose --help command
    show the default value hostname-bin.index for --log-bin-index
    respectively.

commit 7cdac6ff2b800f02a667025445f366aa6f6203d0
Merge: b063011 1d6eb4e
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Fri Sep 8 17:08:37 2017 +0200

    Merge branch 'mysql-5.7' into mysql-8.0

commit 1d6eb4e6838554d284febb8410c75839c6bd9db9
Merge: 49e9ed3 7fb48ac
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Fri Sep 8 17:08:09 2017 +0200

    Merge branch 'mysql-5.6' into mysql-5.7

commit 7fb48acd68ce7d39b33745f35e46e35bce03b641
Merge: 3e3b658 31c2744
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Fri Sep 8 17:07:36 2017 +0200

    NULL merge from 5.5

commit 31c2744d300e3935821adbc58667f323067b71c9
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Fri Sep 8 16:47:44 2017 +0200

    Bug#23072792 MYSQL_GROUP_SUFFIX DOES NOT WORK
    
    Reintroduce environment variable MYSQL_GROUP_SUFFIX to be used as
    --default-group-suffix value if not already set.
    
    The environment variable was accidentally renamed to DEFAULT_GROUP_SUFFIX_ENV
    in MySQL server 5.5.

commit b06301114978b9ddf9132a0676d0f8ce325aee4c
Merge: ec6521d 49e9ed3
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Fri Sep 8 16:34:49 2017 +0200

    Merge branch 'mysql-5.7' into mysql-8.0

commit 49e9ed31e58e368f60c76ad982fff9e321dc5ef8
Merge: 06db648 3e3b658
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Fri Sep 8 16:16:06 2017 +0200

    Merge branch 'mysql-5.6' into mysql-5.7

commit 3e3b658595377e7b610725da2b0a2564a47c5df1
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Fri Sep 8 14:58:17 2017 +0200

    Bug#23072792 MYSQL_GROUP_SUFFIX DOES NOT WORK
    
    Reintroduce environment variable MYSQL_GROUP_SUFFIX to be used as
    --default-group-suffix value if not already set.
    
    The environment variable was accidentally renamed to DEFAULT_GROUP_SUFFIX_ENV
    in MySQL server 5.5.

commit ec6521d1ce51dbf520707207d22348b948247704
Merge: 7d8480a 06db648
Author: Anushree Prakash B <anushree.prakash.b@oracle.com>
Date:   Fri Sep 8 18:34:56 2017 +0530

    Merge branch 'mysql-5.7' into mysql-8.0

commit 06db648de3b080bae518a083dd122ea10b058c04
Merge: 3b9a2e3 c25e5c8
Author: Anushree Prakash B <anushree.prakash.b@oracle.com>
Date:   Fri Sep 8 18:32:58 2017 +0530

    Merge branch 'mysql-5.6' into mysql-5.7

commit c25e5c808ba2957db29a319acd4751bf74864584
Merge: a41e199 31a372a
Author: Anushree Prakash B <anushree.prakash.b@oracle.com>
Date:   Fri Sep 8 18:30:57 2017 +0530

    Merge branch 'mysql-5.5' into mysql-5.6

commit 31a372aa1c2b93dc75267d1f05a7f7fca6080dc0
Author: Anushree Prakash B <anushree.prakash.b@oracle.com>
Date:   Fri Sep 8 18:29:07 2017 +0530

    Bug#26372491 - RCE THROUGH THE MISHANDLE OF BACKSLASH
    
    DESCRIPTION:
    ===========
    The bug is related to incorrect parsing of SQL queries
    when typed in on the CLI. The incorrect parsing can
    result in unexpected results.
    
    ANALYSIS:
    ========
    The scenarios mainly happens for identifier names
    with a typical combination of backslashes and backticks.
    The incorrect parsing can either result in executing
    additional queries or can result in query truncation.
    This can impact mysqldump as well.
    
    FIX:
    ===
    The fix makes sure that such identifier names are
    correctly parsed and a proper query is sent to the
    server for execution.

commit 7d8480a3d71b86c78d185bcceecc196b77c58abf
Author: Hans H Melby <hans.h.melby@oracle.com>
Date:   Wed Jun 7 16:19:06 2017 +0200

    WL#9449 Restrict range of geographic coordinates in import functions
    
    Geographic longitude coordinates have to be within (-180, 180] degrees,
    and latitude coordinates within [-90 90] degrees (or corresponding
    values for other units).
    
    Add a new member function validate_coordinate_range() to each geometry
    class.
    
    In all WKT and WKB import functions, check if geometries in geographic
    spatial reference systems are within the valid range. If not, raise
    either ER_LONGITUDE_OUT_OF_RANGE or ER_LATITUDE_OUT_OF_RANGE.
    
    Change-Id: Ieeb66756269509c4a6db1dca74a4484e2ea61192

commit e9e2029297f007c0ae51c837b94e757f2fa6d839
Author: Marc Alff <marc.alff@oracle.com>
Date:   Thu Sep 7 10:14:09 2017 +0200

    Bug#26666274 INFINITE LOOP IN PERFORMANCE SCHEMA BUFFER CONTAINER
    
    Problem 1
    =========
    
    Under load, the performance schema code can execute
    an infinite loop in
      PFS_buffer_default_array::allocate()
    
    Root cause 1
    ============
    
    Consider the following loop:
    
      size_t monotonic;
      size_t monotonic_max;
    
      monotonic = m_monotonic.m_u32++;
      monotonic_max = monotonic + m_max; (a)
    
      while (monotonic < monotonic_max)
      {
        ...
        monotonic = m_monotonic.m_u32++; (b)
      }
    
      When the value of monotonic gets close to 2^32,
      the value of monotonic_max gets beyond 2^32 in (a)
      This is ok, as both variables are 64 bits integers.
    
      However, in the loop,
      m_monotonic.m_u32++ is only a 32 bits value (b),
      so that when incrementing to the next value,
      the monotonic counter will never get passed 2^32,
      and therefore will never reach monotonic_max.
    
      The while loop never ends, causing the bug.
    
    Fix 1
    =====
    
      The solution is to change m_monotonic to
      be a PFS_cacheline_atomic_size_t,
      to match the type (size_t) of monotonic and monotonic_max.
    
      With this fix, the loop works properly beyond 2^32.
    
      However, another issue was found by analysis.
    
    Problem 2:
    ==========
    
      When the value of monotonic gets close to 2^64,
      the value of monotonic_max gets beyond 2^64,
      causing an overflow, and wraps to a low integer (a).
    
      In this case, the while loop is never entered,
      because monotonic is near 2^64 and monotonic_max is near 0.
    
      The buffer is declared full, without looking at it.
    
      While theoretical (2^64 is a big value, the server needs
      to be up for a long time to get to this state),
      this can potentially lead to extra allocation
      of new container pages, consuming more memory than necessary.
    
    Fix 2
    =====
    
      Add logic that detects the overflow on monotonic_max,
      and reset the monotonic counter to 0.
    
    Misc
    ====
    
      This fix also changes several integer computations
      to use size_t, to clean up the code to avoid other overflows.

commit ad964b23a944105f9d81328d120bb47ade9446e1
Author: Erlend Dahl <erlend.dahl@oracle.com>
Date:   Fri Sep 8 07:39:14 2017 +0200

    Add .push file for mysql-8.0-stage

commit 6ff258a823ceb75bec1cdf4d8a1449b4a6003ee5
Merge: 53f43b4 3b9a2e3
Author: Sreeharsha Ramanavarapu <sreeharsha.ramanavarapu@oracle.com>
Date:   Fri Sep 8 06:04:32 2017 +0530

    Merge branch 'mysql-5.7' into mysql-8.0

commit 3b9a2e3a62fa70db704e88428a04428184ccba5b
Author: Sreeharsha Ramanavarapu <sreeharsha.ramanavarapu@oracle.com>
Date:   Fri Sep 8 06:02:22 2017 +0530

    Bug #26734162: INCORRECT BEHAVIOR WITH INSERT OF BLOB +
                   ON DUPLICATE KEY UPDATE
    
    Issue:
    ------
    This problem can occur when :
    1) A blob value is updated in
       INSERT ON DUPLICATE KEY UPDATE statement. This statement
       fails because of a constraint violation.
    2) A statement similar to the one above, but for which the
       execution is successful.
    
    This can result in unexpected behavior.
    
    Root cause:
    -----------
    The fix for Bug #25361251 moved clear_values_map() out of
    lex_end() which is called at the end of every statement and
    into write_record(). Since the first statement doesn't
    reach as far as write_record() due to an error, the
    structures created to hold blob values aren't cleared.
    
    Solution:
    ---------
    Add a call to clear_values_map() at the end
    Sql_cmd_insert::mysql_insert().

commit 73ce17c8477a84905c3cc0cce8ffae85eb1c3a38
Merge: 4314f2e 7e93ead
Author: Lakshmi Narayanan Sreethar <lakshmi.narayanan.sreethar@oracle.com>
Date:   Fri Sep 8 00:47:18 2017 +0530

    Merge branch 'mysql-5.7-cluster-7.5' into mysql-5.7-cluster-7.6

commit 7e93eadecddd77ea10ed3a07ca864335122a0910
Author: Lakshmi Narayanan Sreethar <lakshmi.narayanan.sreethar@oracle.com>
Date:   Fri Sep 8 00:46:27 2017 +0530

    WL#10816: Mediumint support for ClusterJ - Big Endian post push fix
    
    The medium int conversion to a Java int type was not properly handled
    in Big Endian machines. This patch fixes that.

commit 53f43b4a56e34bf9c5c804b5465e4ae1c9dbb028
Author: Rahul Malik <rahul.m.malik@oracle.com>
Date:   Thu Sep 7 21:49:15 2017 +0530

    Bug#26538702 lock_get_type_low(lock) == LOCK_REC
    
    Problem:
    --------
    After WL#10793, the age of waiting locks is updated on waiting locks or
    on release of locks. This is applicable only for record locks, so the
    assert fails when TABLE level lock is encountered.
    
    Solution:
    ---------
    Skip updating age of waiting lock, if it is TABLE level lock.
    
    Reviewed by  debarun banerjee <debarun.banerjee@oracle.com>

commit 2902c96c001fdaffb9178f68ce9d28a04e6319f0
Author: Marc Alff <marc.alff@oracle.com>
Date:   Thu Sep 7 15:14:07 2017 +0200

    WL#10985 DEPRECATE PERFORMANCE_SCHEMA.SETUP_TIMERS IN 5.7
    
    Merge cleanup for 8.0

commit 9b8d0b40cc003a220baeb79ce1a4b906a7ddf12f
Author: Erlend Dahl <erlend.dahl@oracle.com>
Date:   Thu Sep 7 14:50:08 2017 +0200

    Force a couple of audit_log tests to run in debug only.
    
    Approved by Deepa Dixit <deepa.dixit@oracle.com> over IM.

commit 1a25d35601417000b9b13bc0bd5c0f7d290b0b08
Merge: 2e995eb 59c1587
Author: Venkatesh Duggirala <venkatesh.duggirala@oracle.com>
Date:   Thu Sep 7 17:48:14 2017 +0530

    Merge branch 'mysql-5.7' into mysql-8.0

commit 59c158713596ffa9a796c6462e9951dd05282246
Author: Venkatesh Duggirala <venkatesh.duggirala@oracle.com>
Date:   Thu Sep 7 17:45:57 2017 +0530

    Revert "Bug#26589008 SYNC_BINLOG=0 SHOULD IGNORE BINLOG_GROUP_COMMIT_SYNC_DELAY"
    
    This reverts commit 5654f5ec294f3d8ea087029ba9b47ad3eb2835b3.

commit 2e995ebbaf507e7d640f4c0ef0e1fd18aa4171f7
Merge: cfcc92d 1d4a320
Author: Balasubramanian Kandasamy <balasubramanian.kandasamy@oracle.com>
Date:   Thu Sep 7 16:27:30 2017 +0530

    Merge branch 'mysql-5.7' into mysql-8.0

commit 1d4a320a8635848b30b5d5d68fa9a3e630f7f326
Merge: ab8314c a41e199
Author: Balasubramanian Kandasamy <balasubramanian.kandasamy@oracle.com>
Date:   Thu Sep 7 16:24:52 2017 +0530

    Merge branch 'mysql-5.6' into mysql-5.7

commit a41e199a28d01f720ea3049bf0246fde1ad95230
Merge: 54bf407 4fcf080
Author: Balasubramanian Kandasamy <balasubramanian.kandasamy@oracle.com>
Date:   Thu Sep 7 16:15:30 2017 +0530

    Merge branch 'mysql-5.5' into mysql-5.6

commit 4fcf0801332bdd5eec441790d46ab6136e1e0326
Author: Balasubramanian Kandasamy <balasubramanian.kandasamy@oracle.com>
Date:   Thu Sep 7 16:11:15 2017 +0530

    Bug#26742748 - 8.0 DOCKER IMAGE RPM GENERATES 5.7 DOC URL IN /ETC/MY.CNF

commit cfcc92d46c93db7331f5cfbf7fd6efe9d98670d1
Merge: a715f65 ab8314c
Author: Marc Alff <marc.alff@oracle.com>
Date:   Thu Sep 7 11:45:24 2017 +0200

    Merge branch 'mysql-5.7' into mysql-8.0

commit ab8314cdf9412af410c2dcd5769f0220ecde2093
Author: Marc Alff <marc.alff@oracle.com>
Date:   Thu Sep 7 10:50:56 2017 +0200

    WL#10985 DEPRECATE PERFORMANCE_SCHEMA.SETUP_TIMERS IN 5.7

commit 4314f2ec26cecb84f63896cb157f76c70a30c24f
Merge: b01d58b 78d2ed6
Author: Lars Tangvald <lars.tangvald@oracle.com>
Date:   Thu Sep 7 08:54:54 2017 +0200

    Upmerge of the 7.5.8 build

commit 78d2ed66ce364bd813988d0a3f6b8daade85d908
Merge: 4cda0ff c735736
Author: Lars Tangvald <lars.tangvald@oracle.com>
Date:   Thu Sep 7 08:54:01 2017 +0200

    Upmerge of the 7.4.17 build

commit 4cda0ff86aa99df17a66f312f40a950e8a96ce51
Author: Lars Tangvald <lars.tangvald@oracle.com>
Date:   Thu Sep 7 08:53:38 2017 +0200

    Raise version number after tagging 7.5.8

commit c73573646085e1d255aff4e480dbd3a75c47765a
Merge: 775da2d 1595089
Author: Lars Tangvald <lars.tangvald@oracle.com>
Date:   Thu Sep 7 08:51:32 2017 +0200

    Upmerge of the 7.3.19 build

commit 775da2d61b145809eeec3f3cac7e6738324cc142
Author: Lars Tangvald <lars.tangvald@oracle.com>
Date:   Thu Sep 7 08:51:10 2017 +0200

    Raise version number after tagging 7.4.17

commit 159508916e6b4581efe679ad661d1b42dc74b303
Merge: 0bc510b ea92578
Author: Lars Tangvald <lars.tangvald@oracle.com>
Date:   Thu Sep 7 08:49:20 2017 +0200

    Upmerge of the 7.2.31 build

commit 0bc510b8a681cb241e10c8aa2f337cd99fce79f6
Author: Lars Tangvald <lars.tangvald@oracle.com>
Date:   Thu Sep 7 08:48:52 2017 +0200

    Raise version number after tagging 7.3.19

commit ea925786a3d22a0524137cf53429aefafa1d8dcc
Author: Lars Tangvald <lars.tangvald@oracle.com>
Date:   Thu Sep 7 08:45:56 2017 +0200

    Raise version number after tagging 7.2.31

commit a715f65e9f2bd8c19e413b4c535dab2c70dc47b3
Author: Pavan Naik <pavan.naik@oracle.com>
Date:   Thu Sep 7 12:02:29 2017 +0530

    BUG#26629969: FAILURE IN I_INNODB.TABLE_COMPRESS_3 AFTER WL#9538
    
    Description:
    ------------
    The test i_innodb.table_compress_3 is failing with '--mem' option
    after the push of wl#9538. When '--mem' option is enabled, MTR sets
    the value of innodb_use_native_aio mysqld variable to 0 and this
    change is causing the result diff in the test run.
    
    Fix:
    ----
    Remove the code from MTR which checks for '--mem' option and sets the
    value of 'innodb_use_native_aio' to 0 since its not needed anymore.
    
    Reviewed-by: Satya Bodapati <satya.bodapati@oracle.com>
    RB: 17314

commit 010ca90f8653cc67fbcac94032405233822b14af
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Tue Sep 5 07:42:50 2017 +0200

    Bug #26597243: AMBIGUOUS INCLUDE PATHS
    
    Fix building of libzlib.a and generation of zconf.h
    
    Change-Id: I1498f5e1169ad67b0f4ac658530a4eef7bd7d7d2
    (cherry picked from commit 137096b8a3c287ff6245afae370fa92e147152da)

commit 813677d7fe4289dacf27b0387d9fe0098fde5fe4
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Thu Sep 7 07:52:17 2017 +0200

    Fix dynamic_loader-t which needs to have current working
    directory in the same place as the shared libs it wants to load.

commit 51c4db4f4014d015729b415e2e1f6e6989a75d21
Author: Abhishek Ranjan <abhishek.ar.ranjan@oracle.com>
Date:   Wed Sep 6 22:55:30 2017 +0530

    Bug#26203731 : INFORMATION_SCHEMA.TABLES TABLE STATISTICS ARE NULL
    
    Post push fix:
    
    Compilation with clang fails with error 'class member cannot be redeclared'
    for class Attachable_trx_rw.
    
    Definition of class Attachable_trx_rw is moved inside class THD.
    Remove forward declaration of class Attachable_trx_rw and declaration
    of class Attachable_trx_rw_i_s from class THD.

commit 3e0eda6f3f2a00849e6220a7decf770a34c819df
Merge: 41960e6 fa21a1a
Author: Balasubramanian Kandasamy <balasubramanian.kandasamy@oracle.com>
Date:   Wed Sep 6 22:46:56 2017 +0530

    Null-merge from mysql-5.7

commit fa21a1a71f3477e2d8544ae2bf9032e926f46de6
Merge: f5dc49f 54bf407
Author: Balasubramanian Kandasamy <balasubramanian.kandasamy@oracle.com>
Date:   Wed Sep 6 22:45:39 2017 +0530

    Null-merge from mysql-5.6

commit 54bf407b1b3e7ebbb34f7ed3af2639227bf46e3f
Merge: 582e84f 63e2b43
Author: Balasubramanian Kandasamy <balasubramanian.kandasamy@oracle.com>
Date:   Wed Sep 6 22:44:04 2017 +0530

    Null-merge from mysql-5.5

commit b01d58b522b1172cb33f9283e28458d2f8e5485f
Merge: 57f6fee 7c7f7c0
Author: Priyanka Sangam <priyanka.sangam@oracle.com>
Date:   Wed Sep 6 20:14:08 2017 +0530

    Merge branch 'mysql-5.7-cluster-7.5' into mysql-5.7-cluster-7.6

commit 7c7f7c0771e3ec93132e0a5fed62e0f4a540b9e2
Author: Priyanka Sangam <priyanka.sangam@oracle.com>
Date:   Wed Sep 6 20:11:55 2017 +0530

    Bug #25960230 899 ROWID ALREADY ALLOCATED ERROR UNDER HEAVY LOAD
    
    Reverting fix due to autotest failure.

commit 41960e6a0f7cfaaa4818ae9fc86a1e297e7b6dff
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Wed Sep 6 16:41:01 2017 +0200

    Bug#26680491 BUILD ON WINDOWS: ADAPT WIX SEARCH TO 32/64BIT VERSIONS OF CMAKE
    
    Fix typo when looking for alternative wix installation.

commit de6a11c0f323384cd9211323d2d25e00935afd79
Author: Abhishek Ranjan <abhishek.ar.ranjan@oracle.com>
Date:   Wed Sep 6 18:17:07 2017 +0530

    Bug#26203731 : INFORMATION_SCHEMA.TABLES TABLE STATISTICS ARE NULL
    
    In MySQL 8.0, SHOW TABLE STATUS ...  and SELECT * FROM
    INFORMATION_SCHEMA.TABLES ... do not return meaningful data for the
    fields rows, avg_row_length, data_length, max_data_length, index_length,
    data_free, update_time. Instead they return NULL. On MySQL 5.7 these
    statements return valid data. Same behavior is observed for cardinality
    column in INFORMATION_SCHEMA.STATISTICS table.
    
    New implementation of information schema in 8.0 introduces two modes for
    dynamic table statistics retrieval for information schema - `cached` and
    `latest`. In cached mode, dynamic meta-data is fetched from
    mysql.table_stats and mysql.index_stats tables. The data is populated
    and refreshed in the stats table by explicit ANALYZE command on the
    tables. If data is fetched from information schema in `cached` mode
    without first executing ANALYZE, user will get `NULL` or stale data
    for dynamic table statistics.
    
    Fix:
    
    - Implement time based caching of the dynamic metadata in mysql.table_stats
      and mysql.index_stats.
    
    - Time based caching will fetch data from Storage engines when retriving
      data for first time. User will never get NULL value.
    
    - Remove 'cached' and 'latest' modes for data fetching from information
      schema. Remove information_schema_stats variable.
    
    - Add SESSION variable `information_schema_stats_expiry` to specify the
      value of timeout for cached data.
    
    - Default value of information_schema_stats_expiry variable is 24 hours
      (86400 seconds).
    
    - If information_schema_stats_expiry is specified as ZERO, always retrieve
      latest data from storage engine.
    
    - Do not store the retrieved dynamic data in mysql.table_stats and
      mysql.index_stats if any of the following condition is satisfied:
      - information_schema_stats_expiry value is ZERO.
      - innodb_read_only is ON.
      - transaction_read_only is ON.
      - read_only is ON.
      - super_read_only is ON.
      - data is retrieved for performance schema table.
    
    - For other values for information_schema_stats_expiry, store the data
      retrieved from storage engine in mysql.index_stats and mysql.table_stats.
      The stored data will be used for further queries on information_schema.tables
      and information_schema.statistics till data expires.
    
    - Remove internal system views TABLES_DYNAMIC, STATISTICS_DYNAMIC and
      SHOW_STATISTICS_DYNAMIC.
    
    - The metadata of columns of information schema which store dynamic
      information now depends directly on the UDF implementing them. Add
      'unsigned' flag the UDFs to maintain unsigned property of the columns.

commit 63e2b430844662c4860c40a40aff811672f5333a
Author: Balasubramanian Kandasamy <balasubramanian.kandasamy@oracle.com>
Date:   Wed Sep 6 17:48:42 2017 +0530

    Bug#26747305 - HOSTNAME: COMMAND NOT FOUND WHILE STARTING CONTAINER WITH 5.5 DOCKER IMAGE
       - Add hostname package for docker rpm builds.

commit 47ccb03f967793aa582b47777d4e72019638a273
Author: Maria Couceiro <maria.couceiro@oracle.com>
Date:   Wed Sep 6 10:43:07 2017 +0100

    BUG#26729635 SLAVE HANGS - WAITING FOR SQL THREAD TO FREE ENOUGH RELAY LOG SPACE
    
    Problem:
    The I/O thread is blocked waiting for the SQL thread to free relay log
    space when MTS is enabled. According to the source code, the I/O thread
    is actually waiting for the SQL thread to set the variable
    ignore_log_space_limit=true before it can progress.
    
    Analysis:
    The deadlock should be avoided by the coordinator setting
    ignore_log_space_limit=true before going to sleep. However, the
    coordinator only sets ignore_log_space_limit=true in case
    log_space_total > log_space_limit. But, when the coordinator reaches
    this condition, the IO thread may have not yet updated log_space_total.
    Also, the threads do not use the same locks to protect log_space_total,
    so even if the IO thread has updated log_space_total before the
    coordinator reads it, the IO thread may read a stale thread-local
    value.
    
    Fix:
    Moved the call to harvest_bytes_written (which updates log_space_total)
    to earlier, so that it happens while the IO thread still holds
    end_pos_lock.

commit bd623b373b65df5e16a0cf02f4249d04d2408ea5
Author: Hans H Melby <hans.h.melby@oracle.com>
Date:   Wed Mar 15 12:36:37 2017 +0100

    WL#9450 Forbid using undefined SRIDs
    
    This worklog changes GIS import functions from giving a warning when
    using undefined SRIDs, to forbid it altogether by raising
    ER_SRS_NOT_FOUND. The following functions are thus changed:
    
    ST_GEOMCOLLFROMTEXT
    ST_GEOMCOLLFROMTXT
    ST_GEOMCOLLFROMWKB
    ST_GEOMETRYCOLLECTIONFROMTEXT
    ST_GEOMETRYCOLLECTIONFROMWKB
    ST_GEOMETRYFROMTEXT
    ST_GEOMETRYFROMWKB
    ST_GEOMFROMGEOJSON
    ST_GEOMFROMTEXT
    ST_GEOMFROMWKB
    ST_LINEFROMTEXT
    ST_LINEFROMWKB
    ST_LINESTRINGFROMTEXT
    ST_LINESTRINGFROMWKB
    ST_MLINEFROMTEXT
    ST_MLINEFROMWKB
    ST_MPOINTFROMTEXT
    ST_MPOINTFROMWKB
    ST_MPOLYFROMTEXT
    ST_MPOLYFROMWKB
    ST_MULTILINESTRINGFROMTEXT
    ST_MULTILINESTRINGFROMWKB
    ST_MULTIPOINTFROMTEXT
    ST_MULTIPOINTFROMWKB
    ST_MULTIPOLYGONFROMTEXT
    ST_MULTIPOLYGONFROMWKB
    ST_POINTFROMGEOHASH
    ST_POINTFROMTEXT
    ST_POINTFROMWKB
    ST_POLYFROMTEXT
    ST_POLYFROMWKB
    ST_POLYGONFROMTEXT
    ST_POLYGONFROMWKB
    
    In addition to making modifications in item_geofunc.cc to implement said
    functionality, lots of test files in the gis test suite, and some in the
    main test suite have been altered, as they previously had queries that
    used undefined SRIDs.
    
    Change-Id: I481f21517525de48de099ed760f7d6402c993032

commit 249b09448afed2842c8d6a68bc9b5d02d6e2f03f
Author: Prabeen Pradhan <prabeen.pradhan@oracle.com>
Date:   Wed Sep 6 14:04:28 2017 +0530

    Bug#26695153: SEVERAL TESTS FAILS WITH "[ERROR] [004143] INVALID (OLD?) TABLE OR DATABASE NAME
    
    The statement "UNINSTALL keyring_file" was leaving footprints.
    Subsequent tests were failing due to this. Added restart statement
    at the end of the test so that all footprints are cleaned.
    Identified few other tests which had similar statements
    and added restart statement at the bottom of those tests.

commit 313576afa27256515e9e41353a14928e786017d7
Author: Havard Dybvik <havard.dybvik@oracle.com>
Date:   Mon Aug 28 11:18:26 2017 +0200

    Bug#25951134: MEMORY LEAK OF INTERNAL TEMPORARY TABLES
    
    Excluding a subquery which necessitated a temporary table caused a
    memory leak of the temporary table. Upon exclusion, the reference to the
    SELECT_LEX, which contained the list of temporary tables for the
    subquery, was lost. Later when calling cleanup() for the outermost
    SELECT_LEX_UNIT of the query, the unit representing the excluded
    subquery would not be found. As a result, the memory allocated for the
    temporary table was never freed. The bug did not occur in 5.7 because
    then it was THD which contained the list of derived tables, whereas now
    it is SELECT_LEX.
    
    To properly cleanup excluded parts of a query, call
    SELECT_LEX::cleanup() as soon as its underlying levels are excluded and
    the query plan is updated, but before invalidating in order to preserve
    references required by cleanup().
    
    Note that excluding a subquery modifies the query plan, but this takes
    place during preparation before other sessions have access to the plan.
    Hence it is unnecessary to acquire lock on the query plan, and existing
    calls to thd->lock_query_plan() during preparation have been removed.

commit ae929fa2a6fdf25feb4f85ab8c5a82cc1fd5e3f3
Merge: a6cb6da f5dc49f
Author: Sreeharsha Ramanavarapu <sreeharsha.ramanavarapu@oracle.com>
Date:   Wed Sep 6 06:48:11 2017 +0530

    Merge branch 'mysql-5.7' into mysql-8.0

commit f5dc49f722fbfa7e4113685b7fa98e6eb3c395fc
Merge: 24eae6b 582e84f
Author: Sreeharsha Ramanavarapu <sreeharsha.ramanavarapu@oracle.com>
Date:   Wed Sep 6 06:47:34 2017 +0530

    Merge branch 'mysql-5.6' into mysql-5.7

commit 582e84f98704c179a26254146a7c2053397cc827
Merge: 3483011 15b72c6
Author: Sreeharsha Ramanavarapu <sreeharsha.ramanavarapu@oracle.com>
Date:   Wed Sep 6 06:46:28 2017 +0530

    Merge branch 'mysql-5.5' into mysql-5.6

commit 15b72c667722932310cf9b08ceff4440143ea8b0
Author: Sreeharsha Ramanavarapu <sreeharsha.ramanavarapu@oracle.com>
Date:   Wed Sep 6 06:45:50 2017 +0530

    Bug #26704451: INCORRECT BEHAVIOR WITH USE OF CERTAIN
                   CHARSETS AND SHA2
    
    Missed pushing to 5.5.

commit a6cb6daaae65bfac34b2b1e210aa333d9fd729ce
Author: Dmitry Lenev <dmitry.lenev@oracle.com>
Date:   Tue Sep 5 10:25:00 2017 +0300

    Bug #26659110 "LIFT LIMITATION ON RENAMING PARENT COLUMNS WHICH ARE REFERENCED BY FOREIGN KEYS".
    
    Temporary workaround for bug #25722221 "RENAME COLUMN DID NOT UPDATE
    FOREIGN_KEY_COLUMN_USAGE FOR FK CONSTRAINT" prohibited renaming of
    parent table columns which participated in the foreign keys even
    for ALTER TABLE which was carried out using INPLACE algorithm.
    
    This patch restores status quo ante workaround by allowing renaming
    of parent columns for ALTER TABLEs which are executed INPLACE algorithm.
    Renaming of foreign keys columns by ALTER TABLEs which are executed
    through COPY algorithm was not allowed before workaround and is still
    not allowed.
    
    The ALTER TABLE code was adjusted to update foreign key descriptions
    in the data-dictionary when parent column are renamed.
    
    This patch also reverts changes to InnoDB tests which were done by
    workaround patch.

commit 871f3d7e2a5a9fa5919c2774584f1d1966f2efae
Author: Jens Even Berg Blomsøy <jens.even.blomsoy@oracle.com>
Date:   Mon Sep 4 12:04:23 2017 +0200

    Post push fix for     Bug #26271244
        ASSERT FAILS WHEN SHOW CREATE TABLE CALLED ON A FILE CREATED FOR FULLTEXT INDEX

commit b04e72bb053867ce3a813d4d5851bf8874da1ca4
Author: Lukasz Kotula <lukasz.kotula@oracle.com>
Date:   Tue Sep 5 11:15:26 2017 +0200

    BUG#26581651 - UNNECESSARY XQUERY_RESULT::NEXT_RESULTSET() CALL REQUIRED
    
    Description
    ===========
    Neither "XQuery_result::has_resultset"  nor "XQuery_result::get_metadata"
    changes the state of XQuery_result object to "fetch-ended", after reception
    of StmtExecuteOk.
    
    Fix
    ===
    All methods od "XQuery_result" sets variable that allows to fetch next
    query.
    
    Change-Id: I39b965e8e43fee4ac500eab50a1892c6e61e7758
    Reviewed-by: Grzegorz Szwarc <grzegorz.szwarc@oracle.com>
    Reviewed-by: Tomasz Stepniak <tomasz.s.stepniak@oracle.com>

commit dbded7bf3d5bab83ae52a8a2edcc9fb568eff0cd
Author: Arnab Ray <arnab.r.ray@oracle.com>
Date:   Wed Aug 30 19:22:20 2017 +0530

    Bug #26650815 NDB: CREATE LOGFILE RESULTS ASSERT TRN_CTX->IS_ACTIVE(TRANSACTION_CTX:SESSION)
    
    - The issue is that CREATE LOGFILE GROUP does not use the DD, and
      as a result there's no active transaction to retrieve the
      GTID for the statement
    - This patch adds a workaround to ensure that CREATE LOGFILE GROUP
      takes a different execution path, one that does not need an active
      transaction
    - Also removed the .opt files added as a quick fix previously

commit e004cbce7c7791cfe0f30a364e2753e73ca74488
Author: Bin Su <bin.x.su@oracle.com>
Date:   Tue Sep 5 18:03:40 2017 +0800

    Bug#23716197 TEST THAT RENAMES SYSTEM TABLES LEAVES THE SERVER IN A BAD STATE
    
    Re-enable this test case: i_main.grant-bug20006361
    
    Approved by Erlend Dahl <erlend.dahl@oracle.com>

commit 3e41141d34f44ec803970880437ce7cf36ac0ca9
Author: Abhishek Ranjan <abhishek.ar.ranjan@oracle.com>
Date:   Mon Sep 4 04:30:46 2017 +0530

    Bug#26279884 : VIRTUAL COLUMNS ALLOW DEPRECATED FUNCTION TO BE USED
    
    Generated columns allow deprecated functions in the generation expression.
    As deprecated functions will cease to exist in future releases, it might
    create problems for the users.
    
    Fix:
    Do not allow deprecated functions in generation expression.
    
    Any function which is deprecated and does not do its internal replacement
    in generation expression should implement is_deprecated() function.

commit 34e8f7b66ce5a0e77603feaa9553b5e885d6526f
Author: Roy Lyseng <roy.lyseng@oracle.com>
Date:   Mon Sep 4 15:00:33 2017 +0200

    Bug#25398451: Segmentation fault in prepare_inner() at sql_call.cc
    
    Problem was a missing check for argument count during preparation
    of a procedure call.

commit b1382a0d401f0e2336bd4bcd0e257fd6b620f063
Author: Roy Lyseng <roy.lyseng@oracle.com>
Date:   Tue Sep 5 09:28:16 2017 +0200

    Bug#26659699 Assertion !(thd->lex->context_analysis_only & 2) failed
    
    The assert is hit in a CREATE VIEW statement on partitioned tables,
    when the server is trying to prune partitions of the underlying tables.
    A const subquery is attempted executed, but hits an assert in
    Item_subselect::exec(), since no subqueries should be evaluated
    when just analyzing a view creation.
    
    Partition pruning is called from SELECT_LEX::apply_local_transforms(),
    however, it is not reasonable to apply any transformations when
    analyzing a view creation, so the simple solution to this problem
    is to bail out of apply_local_transforms() immediately when analyzing
    a view creation.

commit cb8f9b7adeaa693fb1374b530bc3ec8b1153948a
Author: Roy Lyseng <roy.lyseng@oracle.com>
Date:   Mon Sep 4 16:30:37 2017 +0200

    Bug#23021693 gcol:assertion '!table->in_use->is_error()' failed
    
    The problem here is that an error leaks from test_quick_select()
    into the executor without being correctly processed.
    When update_generated_read_fields() is called, it expects no current
    error state and asserts.
    
    It is a major problem that subsystems like the range optimizer has no
    proper way of propagating an error state, however this is a minimum
    fix that checks for error immediately after the call and terminates
    execution when an error state is encountered.

commit c1de04c3a099fa2f283fcc4a3ac9740c0622a8a7
Author: Erlend Dahl <erlend.dahl@oracle.com>
Date:   Thu Aug 24 09:27:00 2017 +0200

    WL#9193 : Autoscale InnoDB resources based on system resources by default
    
    Turn the feature off for the time being.

commit ad0be93257048ff5c0a0ccd07d51695da2db7919
Author: Grzegorz Szwarc <grzegorz.szwarc@oracle.com>
Date:   Mon Sep 4 10:44:15 2017 +0200

    Bug #26616261: MYSQLXCLIENT RETURNS CR_UNKNOWN_ERROR, IN CASE WHEN IT SHOULD RETURN CR_CONNECTION_ERROR
    
    Post-push fix of failing mtr test

commit e17d9be51fc0bb29ce4bc5490e0f5de84a6c1e95
Author: Tomasz Stepniak <tomasz.s.stepniak@oracle.com>
Date:   Mon Sep 4 16:29:17 2017 +0200

    BUG#26716213: MYSQLXCLIENT SHOULDN'T EXECUTE GRACEFUL SHUTDOWN IN D-TOR
    
    Description
    ===========
    Making a connection between the X client library and non X Plugin
    triggers graceful shutdown flow in destructor which may lead
    to problems.
    
    Fix
    ===========
    Added "close" method which does the graceful shutdown. It should be called
    by the client applications. xcl::XSession destructor closes the socket without
    executing the graceful shutdown.
    
    RB: 17276
    Reviewed by: Grzegorz Szwarc <grzegorz.szwarc@oracle.com>
    Reviewed by: Lukasz Kotula <lukasz.kotula@oracle.com>

commit 6a9fbcd4a6eca400a8bc057cecd7cfd3118e40f6
Author: Knut Anders Hatlen <knut.hatlen@oracle.com>
Date:   Mon Aug 21 14:49:49 2017 +0200

    Bug#26649978: JSON_INSERT: ASSERTION FAILED: PARENT
    
    An assertion was raised if JSON_INSERT was used to insert an element
    into the root array or object of a JSON document, and auto-wrapping
    was used to identify the root element using the given path.
    
    The code that checks if we are inserting into the root element, checks
    if the length of the path is one. That is, it checks that the path
    consists of a single path leg that tells which position the inserted
    element will have inside the root element. But if there are
    auto-wrapping path legs at the beginning of the path, a path whose
    length is greater than one might also refer to an element in the root,
    so checking the path length doesn't reliably tell us if we're
    inserting into the root.
    
    This was not a problem until bug#26022576 made JSON_INSERT aware of
    auto-wrapping.
    
    The fix is to change the detection of the root element to check if the
    matched element has a parent. If it has no parent, it is the root
    element.
    
    For consistency, also make JSON_SET check if the element has a parent
    instead of checking the length of the path. In this case using the
    length of the path does not lead to any problems, since JSON_SET
    removes redundant auto-wrapping path legs before the path is used.
    
    Change-Id: Icb719031662700f213d3b31c5fa144aa7b8310b7

commit f2368f296df6e326d764c4657c9debbe27c69b46
Author: Nuno Carvalho <nuno.carvalho@oracle.com>
Date:   Mon Sep 4 15:16:18 2017 +0200

    BUG#26277771: BAD WRITE SET TRACKING WITH UNIQUE KEY ON A DELETE FOLLOWED BY AN INSERT
    
    Revert the fix since it was incomplete.

commit 7db577774ce5188a2bc53222f2e0188ff19bb0b6
Author: Daogang Qu <bill.qu@oracle.com>
Date:   Mon Sep 4 21:05:11 2017 +0800

    Bug #26729602 	UPGRADE 5.7->8.0.3: REPLICATION MAY NOT START DUE TO INDEX FILE NEW DEFAULT NAME
    
    Problem
    =======
    - User does not set log-bin nor log-bin-index (or the relay-log
      counter parts).
    - 5.7 server randomly picks a filename prefix - hostname ("H").
    - 8.0 server picks a hardcoded filename prefix ("A").
    - On upgrade, 8.0 server does not find A.index because it is named
      H.index.
    - Conclusion: a different default value for index filename prefix in
      8.0 causes disruption later on.
    
    Fix
    ===
    Enable binary logging and binary log basename defaults to
    "`hostname`-bin" name prefix if --log-bin is not configured,
    then the `hostname`-bin.index is generated for binary log
    index file name if --log-bin-index is not configured.
    Relay log basename defaults to "`hostname`-relay-bin"
    name prefix if --relay-log is not configured, then
    the `hostname`-relay-bin.index is generated for relay log
    index file name if --relay-log-index is not configured.
    Then on upgrade, the 8.0 server can find the two index
    files, since it is generating the same index file name
    with the 5.7 serever.

commit 127a5321c2e99f97e5151ddd1f1b5d01c8fdc103
Author: Tomasz Stepniak <tomasz.s.stepniak@oracle.com>
Date:   Mon Sep 4 11:02:01 2017 +0200

    BUG#26647488: DATE AND DATETIME TYPES CAN'T BE DISTINGUISHED AFTER SERIALIZATION TO X PROTOCOL
    
    DATETIME and DATE are treated as two separate types after serialization
    and sending them on the wire using X protocol.
    
    RB: 17237
    Reviewed by: Grzegorz Szwarc <grzegorz.szwarc@oracle.com>
    Reviewed by: Lukasz Kotula <lukasz.kotula@oracle.com>

commit dd51a355d1371b3f71b284f92377dba9c833c405
Author: Bin Su <bin.x.su@oracle.com>
Date:   Mon Sep 4 20:17:29 2017 +0800

    Bug#26640776 - SERVER CRASHES AT RECOVERY WHEN DBNAME HAS SOME SPECIAL CHARACTER IN IT
    
    This is mainly because table name in InnoDB should be always in
    filename charset. However, by retrieving schema and table names
    from server, it's possible to get the names in table name charset.
    So the dd_table_open_* functions should check and handle this conversion.
    
    RB: 17285
    Reviewed-by: Allen Lai <zheng.lai@oracle.com>

commit e6dd48b45706f5dc477e9e3999a865065aa999c6
Author: Dag Wanvik <dag.wanvik@oracle.com>
Date:   Mon Sep 4 12:47:10 2017 +0200

    Bug#26703246 ASSERTION FAILED: DELSUM+(INT) Y/4-TEMP >= 0
    
    Followup patch: disable a test warning to avoid failure when running tests
    with prepared statement protocol (-ps): we get two warnings; one when preparing
    and one more when executing. Direct execution gives only one warning.
    
    Fix: disable warnings for that statement.

commit 8a39462bf37c473fdfc1714f8308254b3896b8c9
Author: Dag Wanvik <dag.wanvik@oracle.com>
Date:   Fri Sep 1 19:28:47 2017 +0200

    Bug#26730020 REEXECUTE PREPARED STATEMENT CRASH WITH WINDOW FUNCTIONS
    
    When setting up windows' "PARTITION BY/ORDER BY"s caches
    (cf. setup_ordering_cached_items) we need the "PARTITION BY/ORDER BY"s
    expressions to be resolved first (cf. resolve_window_ordering).
    
    On a first prepare this happens in two different loops over the
    windows, i.e.  all resolving is done before we proceed to the cache
    setup.
    
    On an explicit (re)execute, another code path is taken, which do these
    two steps inside one loop. Normally this is fine, but in the repro it
    is not, consider our window definitions:
    
       WINDOW w2 AS (w1), w1 AS (ORDER BY a, a)
    
    We process the windows in textual order. Note that the ordering for w2
    is inherited from w1. That is, the cache setup for w2 depends on the
    order by for w1 having been resolved first (it is not done as part of
    processing w1 since it doesn't have an ORDER BY clause, and we only
    want to do the resolution once). The result is that we try to set up
    the cache for w2 *before* resolution of its effective (i.e. inherited)
    ORDER BY clause. This causes the issue.
    
    Fix: do all resolution first also on a (re)execute.
    
    Repro test added.

commit 6d1f54cef0566b128e90e8eb295e518d53b92b10
Author: Dmitry Lenev <dmitry.lenev@oracle.com>
Date:   Mon Sep 4 12:45:51 2017 +0300

    Follow-up to WL#6049 Meta-data locking for FOREIGN KEY tables.
    
    Updated results of main.partition_explicit_prune test after checking
    their correctness.

commit 6a9e16d4f9070eaf26decf313abc5a4c33958ecd
Author: Lukasz Kotula <lukasz.kotula@oracle.com>
Date:   Tue Aug 22 17:15:34 2017 +0200

    BUG#26042786 - GIPV6 CONNECTION BEHAVIOUR DIFFERENCE IN MYSQL 8.0
    
    Description
    ===========
    Account created on local-scope addesses is always used for
    authentication when the ip address resolves to empty hostname
    (host matching is skipped).
    
    Fix
    ===
    security_context_lookup function (part of Server session API)
    changed in MySQL 8. It always matches client host when its
    empty. Workaround was applied to X Plugin which uses nullptr
    for empty hostnames.
    
    RB: 17174
    Reviewed-by: Grzegorz Szwarc <grzegorz.szwarc@oracle.com>
    Reviewed-by: Tomasz Stepniak <tomasz.s.stepniak@oracle.com>

commit c0a2cb427fa967021a78950057c422e9b95c9b91
Author: Jens Even Berg Blomsøy <jens.even.blomsoy@oracle.com>
Date:   Fri Aug 18 17:37:31 2017 +0200

    Bug #26271244
    ASSERT FAILS WHEN SHOW CREATE TABLE CALLED ON A FILE CREATED FOR FULLTEXT INDEX

commit e9aaa1ca9d383c8b01dfd68c3ae280910642c021
Author: Libing Song <libing.song@oracle.com>
Date:   Fri Sep 1 20:30:49 2017 +0800

    BUG#26666609 SLAVE HANGS - WAITING FOR TABLE METADATA LOCK
    
    ANALYSIS
    ========
    REPAIR/OPTIMIZE/ANALYZE TABLE and
    ALTER TABLE ... REPAIR/OPTIMIZE/ANALYZE PARTITION
    statements maintain the tables one bye one. The metadata lock
    of the table is released immediately after it is maintained. That is
    earlier than the statement is binlogged and committed. That means
    the following statements which updates the same table may be binlogged
    earlier than it. Or they go into the same binlog flush queue. That
    meant they could be applied on slave parallel. It would cause a
    deadlock if --slave-preserve-commit-order is ON.
    
    For example:
    REPAIR TABLE t1;
    INSERT INTO t1 VALUES(1);
    go into to the same flush queue. They were binlogged with below information.
    
    REPAIR TABLE t1;
    INSERT INTO t1 VALUES(1);
    
    FIX
    ===
    m_last_blocking_transaction is added to store the sequence_number of the
    transactions which may not safe to parallel with the following transaction.
    The last_committed of the following transactions will be reset to
    m_last_blocking_transaction if their original last_committed is smaller
    than m_last_blocking_transaction.

commit 191abf384cade0c30d0622da731c4bfe1481aa42
Author: Sreeharsha Ramanavarapu <sreeharsha.ramanavarapu@oracle.com>
Date:   Sat Sep 2 06:44:55 2017 +0530

    Bug #26483909: INCORRECT BEHAVIOR FOR QUERY WITH DISTINCT
                   and ORDER BY ... LIMIT.
    
    Post-push fix:
    
    Windows doesn't like table alias in uppercase.

commit 4b3a241a49a7118e9733e2b724bb4a4aa5e82685
Author: Dmitry Lenev <dmitry.lenev@oracle.com>
Date:   Fri Sep 1 17:54:18 2017 +0300

    Bug#26719289 "8.0.3-RC SHOWS UP TO 25% PERFORMANCE REGRESSION WITH WL6049 PUSH".
    
    The problem was that WL6049 introduced heavy performance regression
    for write related tests. The source of this regression was new
    process_table_fks() function. This function is called for each table
    modified by typical DML statement to determine on which tables related
    through foreign keys to table modified we need to additionally acquire
    metadata locks. This function used dd::Dictionary_client::acquire()
    method to get information about table's foreign keys and this method
    is known to be scalability bottleneck since it acquires global
    (actually per object type) lock. Additionally when validating elements
    of prelocked set for foreign keys with cascading updates or deletes we
    acquired global LOCK_open lock and locks on all table cache partitions,
    which devasted scalability for statements causing such actions.
    
    This patch solves the problem by not using dd::Dictionary_client::acquire()
    in process_table_fks() and instead relying of information about foreign
    keys caches in TABLE_SHARE object. In the most common scenario it is already
    available when we call process_tables_fks(). In another case it can be
    easily accessed through table cache which is protected by partitioned
    lock. This patch also introduces caching of necessary information about
    foreign keys in the table share. We also use this TABLE_SHARE for
    prelocking set validation when necessary and thus avoid unnecessary
    locking for statements with cascading deletes or updates.

commit 5762a8141b6b20eceb025accf3052c8d21b899e9
Author: Marc Alff <marc.alff@oracle.com>
Date:   Thu Aug 31 13:38:19 2017 +0200

    Bug#26727443 PERFORMANCE SCHEMA MD5 DIGEST NEEDS TO CHANGE DIGEST FOR FIPS
    COMPLIANCE
    
    Before this fix, DIGEST hashes are computed using the MD5 hash.
    
    MD5 is not FIPS compliant.
    
    This fix replaces the MD5 hash with SHA256 (which is compliant).
    
    As a result, DIGEST columns are changed from VARCHAR(32) to VARCHAR(64)

commit 57f6feee26d1b6a3c88577e5a8485185c1d2f6bf
Merge: b850f63 55f1177
Author: Lakshmi Narayanan Sreethar <lakshmi.narayanan.sreethar@oracle.com>
Date:   Fri Sep 1 21:10:22 2017 +0530

    Merge branch 'mysql-5.7-cluster-7.5' into mysql-5.7-cluster-7.6

commit 55f117715469cc172b20b0ce76871400c4ca3743
Author: Lakshmi Narayanan Sreethar <lakshmi.narayanan.sreethar@oracle.com>
Date:   Wed Aug 30 19:42:42 2017 +0530

    WL#10816: Mediumint support for ClusterJ
    
    This patch adds medium int support to clusterj.
    
    Changes
    
     Utility.java
     - Added mapping for Mediumint and Medium unsigned int. They are now
       mapped to int data type.
    
     NdbRecordImpl.java
     - Added support for Autoincrement to Medium int datatypes
    
     Bundle.properties
     - Added a new error ERR_Bounds which is thrown when the user tries to
       insert an out of range value.
    
     Testcases
     - Updated AutoPKTest to include medium int datatypes
     - Added two new testcase MediumIntegerTypesTest and
       MediumUnsignedTypesTest that runs various tests in Medium int data
       types
     - Added a new verifyException method to AbstractClusterJTest class.
       This can be used to verify the expected exceptions in the testcases.
     - Updated schema.sql to include all the newly add the testcase schema

commit e3119fd8fb2067a8e3283b13d755d1b7af6b5b49
Author: Lakshmi Narayanan Sreethar <lakshmi.narayanan.sreethar@oracle.com>
Date:   Wed Aug 30 19:42:42 2017 +0530

    WL10815 : Clusterj support cpu thread binding - Implement SessionFactory methods.
    
    SessionFactoryImpl.java
     Added new methods to lock the connection pools connections' receiver
     threads to a given CPU and to set and read the activation threshold
     value of the said receiver threads.
    
    ClusterConnectionImpl.java
     Added methods to support the newly added methods in the SessionFactory
     class. Internally, the newly added SessionFactory methods delegate the
     work to the ClusterConnection objects in the connection pool.
    
    Constants.java
     Added new properties to pass the cpu ids and the activation threshold
     using the properties file. The values are parsed and applied to the
     connections in the connection pools when during creation.
    
    RecvThreadCPUTest.java
     New testcase to test the new methods of the SessionFactory class.

commit 5f44a830b55db66036581ec77603b522efb29f65
Author: Lakshmi Narayanan Sreethar <lakshmi.narayanan.sreethar@oracle.com>
Date:   Wed Aug 30 19:42:41 2017 +0530

    WL10815 : Clusterj support cpu thread binding - Adding Ndbjtie mappings
    
    This patch adds ndbjtie mappings for the following
    Ndb_cluster_connection class methods
      - set_recv_thread_activation_threshold
      - get_recv_thread_activation_threshold
      - set_recv_thread_cpu
      - unset_recv_thread_cpu
    
    This commit also overloads the set_recv_thread_cpu native method with a
    variant that takes in just a single cpu_id.

commit 736484830e3be3e19b34d79f52775675b1be8a28
Author: Lakshmi Narayanan Sreethar <lakshmi.narayanan.sreethar@oracle.com>
Date:   Wed Aug 30 19:42:41 2017 +0530

    WL10815 : Clusterj support cpu thread binding - Update ndbapi.
    
    ndbapi's set/unset_recv_thread_cpu methods return -1 on failure.
    This is not very much useful to the caller. This patch fixes those
    methods by returning the actual error in case of failure instead of -1.

commit e09ce12c9874b5f00ece6d359a5c249ab1d29c41
Author: Lakshmi Narayanan Sreethar <lakshmi.narayanan.sreethar@oracle.com>
Date:   Wed Aug 30 19:42:41 2017 +0530

    Bug#26378589 : CPU LOCKING FEATURE OF THE RECEIVER THREADS IS NOT ENABLED IN LINUX BUILDS
    
    The CPU locking feature is not enabled in the Linux builds due to an
    issue in the ndb_configure.cmake's test program used to check the
    availability of the sched_setaffinity syscall. This patch fixes that and
    one more issue in the ndb_configure.cmake file due to which the
    HAVE_FUTEX macro was not being enabled.
    
    Also, due to a bug in the GNU C library's sched_setaffinity call,
    requests that change the CPU affinity fails. Due to this bug in the
    library, the unset_recv_thread_cpu api call fails in the linux
    platform. This bug in the GNU library is fixed from version 2.23. So
    this patch makes that version a minimum requirement for the CPU Locking
    feature to be enabled.

commit 31892f702fe5a3755a582116d062bd4823934719
Author: Craig L Russell <craig.russell@oracle.com>
Date:   Mon Jun 19 11:47:13 2017 -0700

    #WL10815 add get/set receive thread activation threshold to ndbjtie

commit a34a82dc716fa5ac71cc215286dc0e29b53818a8
Author: Craig L Russell <craig.russell@oracle.com>
Date:   Mon Jun 19 11:33:11 2017 -0700

    update ndbjtie HOWTO

commit 1aed80b5b033fe4caf9fbefb90ceb77b362ec82f
Author: Norvald H. Ryeng <norvald.ryeng@oracle.com>
Date:   Fri Sep 1 13:49:17 2017 +0200

    Bug #25818451 ASAN HEAP-USE-AFTER-FREE WITH GEOMETRY + STRING
    
    Problem: ST_AsWKT may read freed memory.
    
    Item_func_as_wkt::val_str() first calls args[0]->val_str(swkb_tmp) on
    its first argument (the geometry), providing a temporary String object
    for storage. Most functions will either use that String to store the
    result and return a pointer to it, or return a pointer to a completely
    different String object.
    
    Some items return a completely different String object, but in the
    process write to the String provided by the calling function. Therefore,
    Item_func_as_wkt::val_str() resets its temporary string if the string
    returned by args[0]->val_str() is not swkb_tmp.
    
    However, some items, e.g., Item_func_left and Item_func_right, return a
    different string object that points to the same memory buffer as
    swkb_tmp. Since swkb_tmp is different from the returned String object,
    swkb_tmp is reset, thereby freeing the buffer that the return value
    points to. Then we try to copy that (freed) buffer into swkb_tmp.
    
    Fix: In Item_func_as_wkt::val_str() and Item_func_as_wkb::val_str(),
    instead of resetting swkb_tmp, make a completely new copy of the SRID +
    WKB string of the geometry parameter so that we're guaranteed the string
    owns its own buffer and is modifiable.
    
    Change-Id: If9ee8a0843b068a994d6b0c49cef4cad4eabc7c7

commit b850f63964ac219801b99325e6915da0f79a2130
Merge: aca3fd2 2ccadb1
Author: Priyanka Sangam <priyanka.sangam@oracle.com>
Date:   Fri Sep 1 16:10:50 2017 +0530

    Merge branch 'mysql-5.7-cluster-7.5' into mysql-5.7-cluster-7.6

commit 2ccadb1402c4dea4fa274bcab8ac79b4682e6075
Author: Priyanka Sangam <priyanka.sangam@oracle.com>
Date:   Fri Sep 1 16:09:48 2017 +0530

    Bug #25960230 899 ROWID ALREADY ALLOCATED ERROR UNDER HEAVY LOAD
    
    Fix ndb_err899 mtr failure.

commit 150c24189862dd39d759dea89da65d926f5b8d51
Author: Grzegorz Szwarc <grzegorz.szwarc@oracle.com>
Date:   Tue Aug 29 16:42:36 2017 +0200

    Bug #26616261: MYSQLXCLIENT RETURNS CR_UNKNOWN_ERROR, IN CASE WHEN IT SHOULD RETURN CR_CONNECTION_ERROR
    
    Description:
    UNIX socket connection method in Mysqlxclient library returns
    CR_UNKNOWN_ERROR, in case when it should return CR_CONNECTION_ERROR.
    
    Reviewed-by: Lukasz Kotula <lukasz.kotula@oracle.com>
    Reviewed-by: Tomasz Stepniak <tomasz.s.stepniak@oracle.com>
    RB: 17238

commit 95243e6e00983a81b2b2bbbe2fd87ec85b412007
Merge: 4b3a8c8 24eae6b
Author: Sreeharsha Ramanavarapu <sreeharsha.ramanavarapu@oracle.com>
Date:   Fri Sep 1 15:25:29 2017 +0530

    Merge branch 'mysql-5.7' into mysql-8.0

commit 24eae6b306ad9cca1af51b92e2095f306c2b9c82
Author: Sreeharsha Ramanavarapu <sreeharsha.ramanavarapu@oracle.com>
Date:   Fri Sep 1 15:24:08 2017 +0530

    Bug #25153670: INCORRECT BEHAVIOR WITH MULTI-TABLE UPDATE
                   USING TEMPORARY TABLE
    
    Issue:
    ------
    This problem occurs under the following conditions:
    1) When an UPDATE requires a temporary table.
    2) This temporary table is then created on INNODB.
    3) The size of the target table's primary key is greater
       than 1024.
    
    Root cause:
    -----------
    The temp table is used to hold the rows that qualify and
    need to be updated. This is done by storing the target
    table's primary key (PK) in the temp table to identify the
    row. All the rows are identified and stored in temp table.
    Then PK values in the temp table are used to identify the
    rows in t1 (target table) and are then updated.
    
    While creating a temp table,
    Query_result_update::optimize() creates a single
    field (Field_string) to squeeze all the columns of the
    target table's PK. This works fine if the size of
    PK < 1024.
    
    INNODB's fixed length column size is restricted to 1024
    (See "struct dict_field_t"). Exceeding this can result in
    incorrect behavior.
    
    Solution:
    ---------
    Since we have been unable to identify a good fix for
    this issue, an error will be returned for this DML
    statement.
    
    A different bug will be opened to track and fix this error.
    
    
    Changes specific to trunk:
    --------------------------
    sql_update.cc:
    While creating temp table, the big_tables option is unset.
    This code has been removed. This means that optimizer never
    chooses INNODB for temp table for UPDATE statements. The
    only way INNODB temp tables come into the picture is when
    there is an overflow from the temp table on HEAP.
    
    with_non_recursive.result:
    After the above change, some UPDATE statements with
    big_tables option will use INNODB temp tables.

commit 4b3a8c81249e6304f366f2d60c847bcec10a915e
Author: Lukasz Kotula <lukasz.kotula@oracle.com>
Date:   Mon Aug 28 13:39:41 2017 +0200

    Bug#26258481 - STRANGE META-DATA RETURNED FOR JSON RESULTS
    
    Description
    ===========
    All fields in Mysqlx::Resultset::ColumnMetaData message are
    optional. X Plugin always sends all fields that MySQL Server
    reports. Table in mysqlx_resultset.proto defines which are
    required.
    
    Fix
    ===
    Send only required field. The change is going to improve
    network performance and its going to limit interpretation
    of fields values that doesn't make sence with concrete
    column type.
    
    RB: 17217
    Reviewed by: Grzegorz Szwarc <grzegorz.szwarc@oracle.com>
    Reviewed-by: Tomasz Stepniak <tomasz.s.stepniak@oracle.com>

commit 263c8215be9986c176bc1b4f4e261c556073bf09
Author: Anibal Pinto <anibal.pinto@oracle.com>
Date:   Fri Sep 1 09:33:13 2017 +0200

    BUG#26671847: GROUP_REPLICATION.GR_APPLIER_THREAD_FAILURE_DETECTION IS UNSTABLE ON PB2 [Post-Fix]
    
    Problems appeared on PB2 with same symptom, not able to DROP a table after
    waiting for member change state for ONLINE.
    
    The wait for super read only be off, applied to start_group_replication was
    ported to be used on gr_wait_for_member_state.inc.

commit 8fb54c70857ea9536582ab671cbc56fceba45f8b
Author: Lukasz Kotula <lukasz.kotula@oracle.com>
Date:   Mon Aug 28 15:32:01 2017 +0200

    Bug#26695316 - MYSQLXTEST-HELP, WRONG TEXT ALIGNMENT
    
    Description
    ===========
    "--help" and "--help-commands" arguments doesn't print the
    user informations correctly.
    
    Fix
    ===
    Added line breaks to correct the information layout. Added
    a MTR test to confirm any change of the output.
    
    RB: 17218
    Reviewed-by: Grzegorz Szwarc <grzegorz.szwarc@oracle.com>
    Reviewed-by: Tomasz Stepniak <tomasz.s.stepniak@oracle.com>

commit aca3fd2f6a3a8e21a70699e6e7672665899151eb
Merge: 0d812d8 1e82fa6
Author: Priyanka Sangam <priyanka.sangam@oracle.com>
Date:   Fri Sep 1 11:31:09 2017 +0530

    Merge branch 'mysql-5.7-cluster-7.5' into mysql-5.7-cluster-7.6

commit 1e82fa6386d4b92d80763626d2b1d7d218dae75a
Author: Priyanka Sangam <priyanka.sangam@oracle.com>
Date:   Fri Sep 1 11:30:11 2017 +0530

    Bug #25960230 899 ROWID ALREADY ALLOCATED ERROR UNDER HEAVY
     LOAD
    
    Error 899 "rowID already allocated" occurs when a rowID is
    available at the primary and unavailable at the backup. An
    insert operation seizes the rowID at the primary and fails to
    seize it at the backup since it is unavailable.
    
    For multiple operations on the same tuple where the end result
    of the transaction is that the tuple is deleted, the last
    operation on that tuple is marked as the deallocator of the
    rowID. The operation is marked by setting the m_dealloc flag
    during COMMIT. When any op COMPLETEs, its m_dealloc flag is
    checked, and if set, its rowID is deallocated. In this case,
    a transaction T1 contains a READ followed by a DELETE on the
    same tuple, while another transaction T2 runs INSERT operations
    on the same table.
    
    T1 commits/completes in the unexpected (not incorrect) order:
    
    COMMIT(DELETE)->COMMIT(READ)->COMPLETE(READ)->COMPLETE(DELETE)
    
    - T1: DELETE commits on primary
    - T1: READ commits on primary, m_dealloc=1 for READ on primary
    - T1: READ completes on primary, deallocates rowID X:Y
    - T2: INSERT seizes freed rowID X:Y on primary
    - T2: INSERT tries to seize rowID X:Y on backup, gets error 899
      since rowID is not freed yet on backup
    - T1: DELETE completes on backup, deallocates rowID X:Y
    
    This is fixed by enforcing a constraint for commits that the
    dealloc op must be a write op. Write ops COMPLETE first on the
    backup and then on the primary, so the sequence of
              dealloc@backup -> dealloc@primary
    is enforced. So with write ops deallocating, a rowID cannot be
    freed on the primary before it is freed on the backup.
    
    The fix is that the last write op on the tuple is chosen as the
    dealloc op instead of the last read/write op on the tuple. Some
    refactoring is also done to separate the 'mark dealloc op' logic
    from the locking and commit logic, so that the existing behaviour
    for aborts can be retained.

commit 32151981375db8e3b30afd37777eca0f20334982
Author: Allen Lai <zheng.lai@oracle.com>
Date:   Fri Sep 1 13:28:17 2017 +0800

    Bug#25928984 METADATA LOCKS DROPPED WHILE DD OBJECTS ARE IN USE IN INNODB
    
    Followup patch for fixing unnecessary close table.

commit e150b396014b140335232cae51c89048e5d91eba
Merge: e3a6b41 11a7dca
Author: Sreeharsha Ramanavarapu <sreeharsha.ramanavarapu@oracle.com>
Date:   Fri Sep 1 08:49:48 2017 +0530

    Merge branch 'mysql-5.7' into mysql-8.0

commit 11a7dca8a885decd2a6eea439c9a3508af7ec0a5
Merge: 6de9538 3483011
Author: Sreeharsha Ramanavarapu <sreeharsha.ramanavarapu@oracle.com>
Date:   Fri Sep 1 08:49:14 2017 +0530

    Merge branch 'mysql-5.6' into mysql-5.7

commit 348301128842bd5df6f2412e66247d342d794f25
Author: Sreeharsha Ramanavarapu <sreeharsha.ramanavarapu@oracle.com>
Date:   Fri Sep 1 08:48:40 2017 +0530

    Bug #26704451: INCORRECT BEHAVIOR WITH USE OF CERTAIN
                   CHARSETS AND SHA2
    
    Post-push fix
    
    Embedded server doesn't have sha2.

commit e3a6b414f4bf9e9fb7e6e868069aead9c3979c3e
Author: Sreeharsha Ramanavarapu <sreeharsha.ramanavarapu@oracle.com>
Date:   Fri Sep 1 08:31:23 2017 +0530

    Bug #26483909: INCORRECT BEHAVIOR FOR QUERY WITH DISTINCT
                   and ORDER BY ... LIMIT.
    
    Issue:
    ------
    This problem can occur when :
    1) Query contains DISTINCT and ORDER BY ... LIMIT.
    2) Range access will be used but the conditions are such
    that it will still require a temporary table for ORDER BY.
    
    
    Root cause:
    -----------
    test_if_skip_sort_order() is called from
    JOIN::optimize_distinct_group_order and this returns true
    meaning that an index can be used and there is no need for
    sorting. But this is called with the flag "no_changes" set
    to true, that is no change to the plan will be affected.
    
    When the same function is called from JOIN::test_skip_sort,
    the "no_changes" is set to false and hence the plan can be
    changed. But since a range access isn't possible for the
    relevant index, it returns a false.
    
    This means that m_ordered_index_usage is left with
    ORDERED_INDEX_VOID and will cause an assert failure.
    
    Solution:
    ---------
    Ideally JOIN::skip_sort_order should be set to false when
    test_if_skip_sort_order() returns a false. This will avoid
    optimizing the distinct clause while assuming the ORDER BY
    doesn't require a sort.
    
    Other changes:
    --------------
    It is very confusing that the member variable
    'ordered_index_usage' and the values 'ordered_index_*' are
    in the lower case. This has been corrected.

commit 8929783bb66de5594ff952e08dfa5818d53f53a9
Author: Allen Lai <zheng.lai@oracle.com>
Date:   Fri Sep 1 09:43:55 2017 +0800

    Bug#25928984 METADATA LOCKS DROPPED WHILE DD OBJECTS ARE IN USE IN INNODB
    
    We need to release the mdl lock after dd::cache::Dictionary_client::Auto_releaser deconstructed.
    
    Reviewed by: Jimmy Yang <jimmy.yang@oracle.com>
                 Bin S <bin.x.su@eracle.com>
    RB:17248

commit 1fac960266246e410a0dea30ce6931709bde6a2a
Author: Knut Anders Hatlen <knut.hatlen@oracle.com>
Date:   Fri Aug 25 11:43:23 2017 +0200

    Bug#26524721: ASSERTION `MAYBE_NULL' FAILED IN ITEM_FUNC_CONCAT::VAL_STR
    
    The nullability of a column reference is wrong, and this causes an
    assert failure in the CONCAT function.
    
    When a query block uses aggregation without a GROUP BY clause, and
    there are no qualifying rows, the column references in the SELECT list
    will evaluate to NULL, even if they refer to not-nullable columns.
    
    Item_field::fix_fields() has code to adjust the maybe_null flag of the
    column reference accordingly, but it is only done if the column is
    found in the same query block. If the column comes from a derived
    table, the maybe_null flag is not adjusted.
    
    This patch makes Item_field::fix_fields() also adjust the nullability
    of references to columns in derived tables, if aggregation without
    GROUP BY is used.

commit 1afd2bd94b9f67985c64658e459dd707ff6d9c28
Author: Marc Alff <marc.alff@oracle.com>
Date:   Thu Aug 31 16:44:32 2017 +0200

    BUG#24785784 ASAN: SIGFPE AT MY_TIMER_INIT_FREQUENCY(MY_TIMER_INFO*) IN
    MYSYS/MY_RDTSC.CC
    
    Before this fix, function my_timer_init_frequency()
    could cause a division by zero with ASAN or UBSAN builds.
    
    With this fix,
    my_timer_init_frequency() is now more robust,
    and simply return a frequency of 0 when computing
    the cycle timer frequency is not possible.
    
    Also, improved my_timer_init_frequency(),
    to remove a loop invariant (unneeded subtraction).

commit 0d812d8230be061c1f6706ea9f5ef99e01b91acf
Merge: d80dbf0 2830f23
Author: Frazer Clement <frazer.clement@oracle.com>
Date:   Thu Aug 31 17:59:00 2017 +0100

    Merge ../mysql-5.7-cluster-7.5 into mysql-5.7-cluster-7.6

commit 2830f232758c98da556c6695ba7117bd2bfc2e36
Author: Frazer Clement <frazer.clement@oracle.com>
Date:   Thu Aug 31 17:56:40 2017 +0100

    Bug #26724559 NDB : VALGRIND : NDB_MODIFIERS LEAKS MEMORY
    
    Refactored NDB_Modifiers code
     - Code moved out of ha_ndbcluster.cc into new files
       ndb_modifiers.h
       ndb_modifiers.cc
     - Dependency on thd removed
     - Comment (re)generation functionality added to NDB_Modifiers
     - Testcases updated to reflect new canonical comment format
    
    Code is hopefully clearer and less error prone

commit 1f6781f64d929460b97679eaafe6235fa831df5c
Author: Frazer Clement <frazer.clement@oracle.com>
Date:   Thu Aug 31 17:53:51 2017 +0100

    Bug #26724559 	NDB : VALGRIND : NDB_MODIFIERS LEAKS MEMORY
    
    Fix error path leak.
    
    Refactoring to follow

commit 7b64b6ba840bae4cbc0c5e95986fe185402c2da3
Author: Dag Wanvik <dag.wanvik@oracle.com>
Date:   Mon Aug 28 18:51:17 2017 +0200

    Bug#26703246 ASSERTION FAILED: DELSUM+(INT) Y/4-TEMP >= 0
    
    Wrong null handling in Item_lead_lag::get_date/get_time
    
    [ This patch also fixes bug#26703156 - ASSERTION FAILED:
      !CHECK_TIME_MMSSFF_RANGE(LTIME) ]
    
    Item::get_time and Item::get_date are expected to return true if
    Item::null_value has been set. This is contrary to the common
    convention where the return boolean signals an error.
    
    Item_lead_lag would return false instead of true if
    Item_lead_lag::m_has_value was false. In the repros this happens
    because there is no FROM tables (i.e. a single row result) and all
    LEAD/LAG calls has a non-zero offset, so
    
             m_has_value == false  and
             null_value == true
    
    Upper level logic doesn't check null_value, but rather relies on the
    returned value to detect nulls.
    
    Fixed, and repro test cases added to lead_lag.test

commit 9e08a56344272d28ab0a9691b13c306574109691
Author: Kristofer Älvring <kristofer.pettersson@oracle.com>
Date:   Thu Aug 31 10:28:09 2017 +0200

    Bug#26571995 SET DEFAULT ROLE ALL don't set mandatory roles.
    
    This patch fixes an issue where the statements SET DEFAULT
    ROLE ALL and ALTER USER x DEFAULT ROLE ALL should include
    the mandatory roles but didn't.

commit 7c174381a50c3f9062678a3db41949447cfba6f8
Merge: f7cfd9e 6de9538
Author: Sreeharsha Ramanavarapu <sreeharsha.ramanavarapu@oracle.com>
Date:   Thu Aug 31 18:30:46 2017 +0530

    Merge branch 'mysql-5.7' into mysql-8.0

commit 6de9538a470a0b4d0eb46d2ef6619aae873890b3
Merge: aa10e0c 707a0db
Author: Sreeharsha Ramanavarapu <sreeharsha.ramanavarapu@oracle.com>
Date:   Thu Aug 31 18:29:59 2017 +0530

    Merge branch 'mysql-5.6' into mysql-5.7

commit 707a0db699394b7ce928513d06f2ffbdc6ed932b
Author: Sreeharsha Ramanavarapu <sreeharsha.ramanavarapu@oracle.com>
Date:   Thu Aug 31 18:28:29 2017 +0530

    Bug #26704451: INCORRECT BEHAVIOR WITH USE OF CERTAIN
                   CHARSETS AND SHA2
    
    Issue:
    ------
    Item_func_sha2::val_str_ascii is supposed return an ascii
    value, but it returns a utf16le when a user variable is set
    to a value of that charset and passed as parameter.
    
    Solution:
    ---------
    set_charset on the string value should be called after
    val_str has been calculated. This is already done in
    val_str_ascii functions for MD5 and SHA functions.

commit f7cfd9e54efdde145d3dd1f083733b584ce6af5b
Merge: ccb575b aa10e0c
Author: Aakanksha Verma <aakanksha.verma@oracle.com>
Date:   Thu Aug 31 15:51:49 2017 +0530

    Null Merge branch 'mysql-5.7' into mysql-8.0

commit aa10e0c603bc8501279b22005085f1741de4e47d
Merge: ca04e7f f2219d2
Author: Aakanksha Verma <aakanksha.verma@oracle.com>
Date:   Thu Aug 31 15:49:13 2017 +0530

    Merge branch 'mysql-5.6' into mysql-5.7

commit f2219d2430652b8aae97eeef51debb371c6bab06
Merge: d411a71 0ab7417
Author: Aakanksha Verma <aakanksha.verma@oracle.com>
Date:   Thu Aug 31 15:46:52 2017 +0530

    Merge branch 'mysql-5.5' into mysql-5.6

commit 0ab741787f84ebaf5bb096b2add73ce735cf1d25
Author: Aakanksha Verma <aakanksha.verma@oracle.com>
Date:   Thu Aug 31 15:44:42 2017 +0530

    Bug #20748521	ASSERTION `I == UINT2KORR(PART_REC_BUF_PTR)' FAILED. |
    		HANDLE_ORDERED_INDEX_SCAN
    
    PROBLEM
    =======
    
    Heap record fetch overwrites the space for next partition in
    m_ordered_rec_buffer.The 2 byte partition ID gets overwritten
    to zero and the assert fails .
    
    FIX
    ===
    Setting the m_rec_length to aligned size of share->reclength only incase
    of Heap engine.
    
    Reviewed by: Debarun Banerjee<debarun.banerjee@oracle.com>
    RB: 17255

commit ccb575b97b3bf14a9cecd63b1b24dfde97430f5b
Author: Lars Tangvald <lars.tangvald@oracle.com>
Date:   Thu Aug 31 12:11:14 2017 +0200

    Bug#26664112	FAILED TO SET CAPABILITIES ON FILE `MYSQLD' (INVALID ARGUMENT)
    
    The setcap command did not have the full path to the mysqld binary.
    Additionally, it was missing from the apparmor profile

commit 16922ead693830c9036ab1a79ce65e59222cb4ad
Merge: a5dd41e ca04e7f
Author: Aakanksha Verma <aakanksha.verma@oracle.com>
Date:   Thu Aug 31 14:10:20 2017 +0530

    Null Merge branch 'mysql-5.7' into mysql-8.0

commit ca04e7f7573caa4e3660c4463e484c8a921bde70
Merge: 4c41932 d411a71
Author: Aakanksha Verma <aakanksha.verma@oracle.com>
Date:   Thu Aug 31 14:08:43 2017 +0530

    Null Merge branch 'mysql-5.6' into mysql-5.7

commit d411a712c96c15311db6cc917d89afb9babe3f07
Author: Aakanksha Verma <aakanksha.verma@oracle.com>
Date:   Thu Aug 31 14:06:07 2017 +0530

    Post push fix for bug#26034430 ASSERTION `PART_REC_BUF_PTR' FAILED.
    
    Issue is committed by the patch under BUG#20748521
    ASSERTION `I ==UINT2KORR(PART_REC_BUF_PTR)' FAILED. | HANDLE_ORDERED_INDEX_SCAN
    originally
    Patch for which test was failing is at rb:17252
    
    Fixing the test case failure for test main.partition_innodb on
    5.6-debug.

commit d80dbf03968751d56c37be01b726b7248e2e76a0
Merge: 34e61c0 4f933e0
Author: Arnab Ray <arnab.r.ray@oracle.com>
Date:   Thu Aug 31 11:38:36 2017 +0530

    Null Merge branch 'mysql-5.7-cluster-7.5' into mysql-5.7-cluster-7.6
    
    (Merge tag 'clone-5.5.58-build' into mysql-5.5-cluster-7.2)

commit 4f933e01fb3df405bb302869ccd6f7a94e588d5d
Merge: e070db3 74704a1
Author: Arnab Ray <arnab.r.ray@oracle.com>
Date:   Thu Aug 31 11:37:08 2017 +0530

    Null Merge branch 'mysql-5.6-cluster-7.4' into mysql-5.7-cluster-7.5
    
    (Merge tag 'clone-5.5.58-build' into mysql-5.5-cluster-7.2)

commit 74704a169f5fa927eb52ec55daf8fb4e717f5f85
Merge: c8d643b 9012671
Author: Arnab Ray <arnab.r.ray@oracle.com>
Date:   Thu Aug 31 11:35:24 2017 +0530

    Null Merge branch 'mysql-5.6-cluster-7.3' into mysql-5.6-cluster-7.4
    
    (Merge tag 'clone-5.5.58-build' into mysql-5.5-cluster-7.2)

commit 90126710e0d445cb7e933e09f69fa0be6f5dc94a
Merge: 9e3c358 4b31d18
Author: Arnab Ray <arnab.r.ray@oracle.com>
Date:   Thu Aug 31 11:33:09 2017 +0530

    Null Merge branch 'mysql-5.5-cluster-7.2' into mysql-5.6-cluster-7.3
    
    (Merge tag 'clone-5.5.58-build' into mysql-5.5-cluster-7.2)

commit 34e61c066c70adc32a8283cf3cd0bac77f69737e
Merge: 2f9ba46 e070db3
Author: Arnab Ray <arnab.r.ray@oracle.com>
Date:   Thu Aug 31 11:24:16 2017 +0530

    Null Merge branch 'mysql-5.7-cluster-7.5' into mysql-5.7-cluster-7.6
    
    (Merge tag 'clone-5.6.38-build' into mysql-5.6-cluster-7.3)

commit e070db34799bbe9a9749831efe37262989bcf3f8
Merge: ba3196c c8d643b
Author: Arnab Ray <arnab.r.ray@oracle.com>
Date:   Thu Aug 31 11:22:27 2017 +0530

    Null Merge branch 'mysql-5.6-cluster-7.4' into mysql-5.7-cluster-7.5
    
    (Merge tag 'clone-5.6.38-build' into mysql-5.6-cluster-7.3)

commit 3b1b08679365116dc0a3cd7451559736203580ac
Author: Piotr Obrzut <piotr.obrzut@oracle.com>
Date:   Mon Aug 28 12:30:21 2017 +0200

    Bug #26501092 mysql server installer cannot detect that visual c++ 2010 is installed.
    
    (cherry picked from commit 816d1307409636655afee3424aa96451a4e22be2)

commit a5dd41e044517e6b3da3bc0591d4250e8f3abc96
Author: Erlend Dahl <erlend.dahl@oracle.com>
Date:   Tue Aug 29 12:59:48 2017 +0200

    Bug#26588846: MYSQL CUSTOM TYPES LEAK INTO THE CLIENT NAMESPACE [noclose]
    
    Correct the copyright notice in Docs/sp-imp-spec.txt

commit 3c848d262eea53bacab84d3743f071d42587c108
Author: Lukasz Kotula <lukasz.kotula@oracle.com>
Date:   Wed Aug 30 15:09:12 2017 +0200

    Bug#26723617 - X PROTOCOL CONTENTTYPE IS MUST HAVE FIELD-TYPE IN ITS NAME
    
    Description
    ===========
    Enum "ContentType" gives the additional hint/description about data
    transmitted under BYTE type. In future the enum may describe other
    types. Current approach makes it impossible to implement it for other
    types.
    
    Fix
    ===
    Renamed type "Mysqlx::Datatypes::ContentType" to
    "Mysqlx::Resultset::ContentType_BYTES"
    
    RB:17253
    Reviewed-by: Grzegorz Szwarc <grzegorz.szwarc@oracle.com>
    Reviewed-by: Tomasz Stepniak <tomasz.s.stepniak@oracle.com>

commit e966813b77ef0042cc6598ee9ede89ae45693a60
Author: Erlend Dahl <erlend.dahl@oracle.com>
Date:   Mon Aug 28 14:06:16 2017 +0200

    Stabilize a few tests after the RC 1 cut-off.
    
    Stabilize output for some tests (--sorted_result).
    
    Added missing clean-up in binlog.binlog_rewrite and
    sys_vars.slow_query_log_func
    
    Approved by Anitha Gopi <anitha.gopi@oracle.com>.

commit b69f0ac46ad06f148fd6d601bc09440443a778c0
Author: Steinar H. Gunderson <steinar.gunderson@oracle.com>
Date:   Fri Aug 11 12:45:49 2017 +0200

    WL #10343: Switch GCC optimization from -O3 to -O2
    
    Change from -O3 to -O2 everywhere, for smaller binaries, faster compile
    times and generally better performance. Mark some performance schema
    function as force-inline to avoid performance regressions, since they
    are important to inline despite being big.
    
    Change-Id: Ib7603f141e6974aeed7e4fde2ef7697864231ae3

commit cb191ee6ee4a5039777a64da6839b65e225ac4d9
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Wed Aug 30 12:41:34 2017 +0200

    Bug#26680491 BUILD ON WINDOWS: ADAPT WIX SEARCH TO 32/64BIT VERSIONS OF CMAKE
    
    Post-push fix: broken if/else in cmake in case no WiX is installed.

commit 44095a88052f78e5bb8c73619b1b280ed89cde3a
Merge: b9448e5 4c41932
Author: Karthik Kamath <karthik.kamath@oracle.com>
Date:   Wed Aug 30 18:50:29 2017 +0530

    Merge branch 'mysql-5.7' into mysql-8.0

commit 4c4193280943c6e100d432f25afeecdb82d84fcb
Merge: 339c506 c0b22c8
Author: Karthik Kamath <karthik.kamath@oracle.com>
Date:   Wed Aug 30 18:49:39 2017 +0530

    Merge branch 'mysql-5.6' into mysql-5.7

commit c0b22c8cdb3831e127ce623937606a4b57aa0b49
Author: Karthik Kamath <karthik.kamath@oracle.com>
Date:   Wed Aug 30 18:45:03 2017 +0530

    Bug#18432770: SYS_VARS.LOG_SLOW_ADMIN_STATEMENTS_FUNC TEST
                  IS FAILING ON 5.6+ WINDOWS PLATFORM
    
    post push fix for improving the reliability of the test

commit b9448e551ff2ea6af58e700c0299819a42410a0f
Merge: 50bace3 339c506
Author: Georgi Kodinov <georgi.kodinov@oracle.com>
Date:   Wed Aug 30 16:06:37 2017 +0300

    Merge branch 'mysql-5.7' into mysql-8.0

commit 339c5066702eee666bfa0676a18a40bfad35bf57
Author: Georgi Kodinov <georgi.kodinov@oracle.com>
Date:   Wed Aug 30 16:01:53 2017 +0300

    WL#8891: addendum 2: removed an incorrect test that was
    assuming that AUDIT_GENERAL_ERROR is called in a loop until the stack is
    depleted. We're not allowing one to abort it now, so the test is irrelevant.

commit 50bace330575c296e1aaede95591fe0af7296958
Merge: 23d7617 9bae624
Author: Piotr Obrzut <piotr.obrzut@oracle.com>
Date:   Wed Aug 30 14:54:59 2017 +0200

    Null Merge branch 'mysql-5.7' into mysql-8.0

commit 9bae62418dcddd5c9860313acfddd15a14c5ec22
Merge: 20cb6bc 816d130
Author: Piotr Obrzut <piotr.obrzut@oracle.com>
Date:   Wed Aug 30 14:51:39 2017 +0200

    Null Merge branch 'mysql-5.6' into mysql-5.7

commit 62f44f46eb180b1db1034a9214b07e8ea7aa93bb
Author: Magnus Blåudd <magnus.blaudd@oracle.com>
Date:   Wed Aug 30 14:43:02 2017 +0200

    WL#8500 Adapt MySQL Cluster to 8.0
    
     - remove unused _dump_tx.txt file which seems to be someones
       private copy and paste file

commit 23d7617b58bcc7d21fcbe0fce876ba340cc2c302
Author: Allen Lai <zheng.lai@oracle.com>
Date:   Wed Aug 30 13:23:25 2017 +0800

    Follow-up to WL#6049 Meta-data locking for FOREIGN KEY tables.
    
    Post-push fix for memory leak reported by ASAN build.
    
    Approved by Jimmy Yang <jimmy.yang@oracle.com> over IM.

commit 816d1307409636655afee3424aa96451a4e22be2
Author: Piotr Obrzut <piotr.obrzut@oracle.com>
Date:   Mon Aug 28 12:30:21 2017 +0200

    Bug #26501092 mysql server installer cannot detect that visual c++ 2010 is installed.

commit 86c6e8e10a22034404e05e4ec6c03ff5bd1b65f9
Merge: 646412f 20cb6bc
Author: Piotr Obrzut <piotr.obrzut@oracle.com>
Date:   Wed Aug 30 14:33:43 2017 +0200

    Null Merge branch 'mysql-5.7' into mysql-8.0

commit 20cb6bc68ebb094935c480a42ce1ade4be7ca220
Merge: c78733b 0084796
Author: Piotr Obrzut <piotr.obrzut@oracle.com>
Date:   Wed Aug 30 14:31:35 2017 +0200

    Null Merge branch 'mysql-5.6' into mysql-5.7

commit 0084796c17efeeab98eaa72c9062bec088ac1097
Author: Piotr Obrzut <piotr.obrzut@oracle.com>
Date:   Mon Aug 28 12:30:21 2017 +0200

    Bug #26501092 mysql server installer cannot detect that visual c++ 2010 is installed.

commit 646412ff12263b381c8530a84e5c6aaf236c4ed5
Merge: 5a1cb65 c78733b
Author: Aakanksha Verma <aakanksha.verma@oracle.com>
Date:   Wed Aug 30 17:55:41 2017 +0530

    Null Merge branch 'mysql-5.7' into mysql-8.0

commit 2f9ba46e2ac624d0d445641eb0f5770f85e33ddf
Merge: c8948c4 ba3196c
Author: Arnab Ray <arnab.r.ray@oracle.com>
Date:   Wed Aug 30 14:04:44 2017 +0530

    Merge branch 'mysql-5.7-cluster-7.5' into mysql-5.7-cluster-7.6
    
    (Merge tag 'clone-5.7.20-build' into mysql-5.7-cluster-7.5)

commit c78733b3d46985f1bc9908a7c3e927675b465311
Merge: d82b83b 857658e
Author: Aakanksha Verma <aakanksha.verma@oracle.com>
Date:   Wed Aug 30 17:53:52 2017 +0530

    Null Merge branch 'mysql-5.6' into mysql-5.7

commit 857658e00506a2b71b7c0cc8510c96a01c62c3a4
Author: Aakanksha Verma <aakanksha.verma@oracle.com>
Date:   Wed Aug 30 17:51:30 2017 +0530

    Bug #20748521	ASSERTION `I == UINT2KORR(PART_REC_BUF_PTR)' FAILED. |HANDLE_ORDERED_INDEX_SCAN
    
    Patch for mysql-5.6 version since the above bug also seen in 5.6 debug
    build.
    
    Reviewed by: Debarun Banerjee<debarun.banerjee@oracle.com>
    RB:17252

commit 5a1cb6571d3d07ab919825e25903590e89e30b78
Merge: 544bef4 d82b83b
Author: Sujatha Sivakumar <sujatha.sivakumar@oracle.com>
Date:   Wed Aug 30 15:35:45 2017 +0530

    Merge branch 'mysql-5.7' into mysql-8.0

commit d82b83b08545c1a29aed7df99b4b8a506349ab91
Author: Sujatha Sivakumar <sujatha.sivakumar@oracle.com>
Date:   Wed Aug 30 15:20:44 2017 +0530

    Bug#25940184: P_S TRANSACTION INSTRUMENTATION DOES NOT WORK
    PROPERLY FOR XA ON SLAVE
    
    Problem:
    =======
    When transaction instrumentation and consumers are enabled,
    the events_transaction_% tables can be used to find the XA
    xid components in a much cleaner way than using XA RECOVER.
    However this does not work correctly on the replication
    slave as the XA STATE is COMMITTED even if it should only
    be PREPARED.
    
    Analysis:
    =========
    On master an XA transaction is written to the binary log in
    two parts. When XA PREPARE is issued, the first part of the
    transaction up to XA PREPARE is written.  When XA COMMIT or
    XA ROLLBACK is issued, a second part of the transaction is
    written to the binlog. Hence in binary log few more
    transactions can be present in between XA PREPARE and XA
    COMMIT.
    
    On slave server applier thread will be applying all these
    transactions. Each active transaction will register itself
    with performance schema so that its progress status can be
    tracked in performance schema table. For each transaction
    'begin' and 'commit', there is an internal
    'start_transaction' and 'end_transaction' that will happen
    within performance schema.
    
    When applier thread starts executing 'XA PREPARE' it
    registers itself with performance schema and the transaction
    state will be 'XA_PREPARE'. At the end of the transaction
    applier invokes 'applier_reset_xa_trans' to do the cleanup
    for active XA transaction. Which intern invokes
    'MYSQL_COMMIT_TRANSACTION' which will set the XA_STATE to
    'COMMITTED' in performance schema.
    
    At this point if users execute XA RECOVER on slave the
    XA_STATE will be shown as 'PREPARED' but performance schema
    table will show it as 'COMMITTED'.
    
    Fix:
    ===
    During the execution of 'XA PREPARE' don't commit the
    transaction in PSI context. Leave the PFS state as it is.
    Clear the current thread transaction PSI specific pointer as
    NULL. With this current transaction will exit cleanly
    without altering the XA_STATE.
    
    'XA COMMIT' is not a regular transaction. But it has all the
    required XA transaction specific information to start a
    transaction in PSI context alone. Hence start a new
    transaction in PSI context by executing
    MYSQL_START_TRANSACTION. Initialize the new PSI transaction
    with XA details.  This process will also ensure that current
    GTID is updated in PSI transaction.  Then call
    'MYSQL_COMMIT_TRANSACTION'. This will provide appropriate XA
    status for 'XA COMMIT' statement.

commit 544bef4c305b36d16219631fd88d54dc7a5e45a5
Author: Balasubramanian Kandasamy <balasubramanian.kandasamy@oracle.com>
Date:   Wed Aug 30 14:41:23 2017 +0530

    Bug#26721433 - NOT ABLE TO START MYSQLD WITH RPM BUILT FOR DOCKER IMAGES
    
    The server doesn't actually need this to function, but uses it if the setcap
    command is run. The problem is that Docker blocks this by default, so the server
    immediately throws a permission error (even for something like mysqld --version),
    making the image unstable.

commit c3bdeda081b6d18d54b9fbbc01d976a470c779c3
Merge: 09585ca cc5d635
Author: Shishir Jaiswal <shishir.j.jaiswal@oracle.com>
Date:   Wed Aug 30 12:41:27 2017 +0530

    Merge branch 'mysql-5.7' into mysql-8.0

commit cc5d63560e85b459acd5a748a8ead7106d93253d
Author: Shishir Jaiswal <shishir.j.jaiswal@oracle.com>
Date:   Wed Aug 30 12:38:04 2017 +0530

    Bug#25996291 - NEED MORE INFORMATION THAN: PERFORMANCE
                   SCHEMA DISABLED (REASON: INIT FAILED)
    
    DESCRIPTION
    ===========
    If Performance schema initialization fails, the server log
    just reads,
    "[Warning] Performance schema disabled (reason: init
    failed)."
    
    It doesn't tell the exact reason what caused this failure
    making it difficult to overcome the failure.
    
    ANALYSIS
    ========
    initialize_performance_schema() executes several sub-init
    functions which are primarily involved in allocating the
    memory [with the help of pfs_malloc_array()] for various
    buffers. This function just return the status of the inits,
    however it would be helpful if something as below is
    printed.
    "Failed to allocate <x bytes> for buffer <name>"
    
    FIX
    ===
    We can either do this change in all the sub-init functions
    or we can do it in the callee function pfs_malloc_array().
    Following the 2nd approach and printing the warning now.

commit 4b31d185f70c27edafc3c17c200a8f3d766456d2
Merge: efe4510 ebfd0eb
Author: Arnab Ray <arnab.r.ray@oracle.com>
Date:   Wed Aug 30 12:12:57 2017 +0530

    Merge tag 'clone-5.5.58-build' into mysql-5.5-cluster-7.2

commit c8d643bfa5f085a0524db2abaee926edf70a463c
Merge: 176cf81 9e3c358
Author: Arnab Ray <arnab.r.ray@oracle.com>
Date:   Wed Aug 30 12:01:18 2017 +0530

    Merge branch 'mysql-5.6-cluster-7.3' into mysql-5.6-cluster-7.4
    
    (Merge tag 'clone-5.6.38-build' into mysql-5.6-cluster-7.3)

commit 9e3c358411810fdfb5a8ab1df6088f4407f7a29f
Merge: 1cb701a bdc4aa6
Author: Arnab Ray <arnab.r.ray@oracle.com>
Date:   Wed Aug 30 11:57:14 2017 +0530

    Merge tag 'clone-5.6.38-build' into mysql-5.6-cluster-7.3

commit 09585ca5f04fbb09bf23950f176d8f6389df709b
Author: Erlend Dahl <erlend.dahl@oracle.com>
Date:   Tue Aug 29 14:36:21 2017 +0200

    WL#11009: Logging services: log writers: add error ID to traditional error log
    
    Post-push fix to thread_pool test.
    
    Approved by Tatjana Nuerenberg <tatjana.nuernberg@oracle.com> over IM.

commit 232d2c36db075a02d1abaa08f5269e1adfb310d7
Merge: 72d8404 817776b
Author: Kailasnath Nagarkar <kailasnath.nagarkar@oracle.com>
Date:   Tue Aug 29 23:11:13 2017 +0530

    Null Merge branch 'mysql-5.7' into mysql-trunk

commit 817776b878397b612b4de5673075a84bdc27305c
Author: Kailasnath Nagarkar <kailasnath.nagarkar@oracle.com>
Date:   Tue Aug 29 23:05:59 2017 +0530

    Bug #25737271 : MYSQL SERVER CRASHED WITH SIG 11 ON
                    MERGE_BUFFERSP10SORT_PARAMP11ST_IO_CACHE
    
    ISSUE: The merge_buffers() function had incorrect way
           of handling buffers resulting in server exiting
           abnormally.
    
    SOLUTION:
    Corrected buffer handling in merge_buffers()

commit 72d8404b7e12bd7385b901cf51c62e546bcb59ed
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Tue Aug 29 07:41:43 2017 +0200

    Bug#26680491 BUILD ON WINDOWS: ADAPT WIX SEARCH TO 32/64BIT VERSIONS OF CMAKE
    
    Additional patch:
    search for WiX V3.11 also, so we can stupport Visual Studio15 20017
    
    Change-Id: I4b806a22ae4a2264904e98c5ef174768afe0f6a7

commit fc6848a3134a0e057160b8481e6bb60562635be8
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Mon Aug 28 09:25:30 2017 +0200

    Bug#26709497 VALGRIND WARNINGS IN UNIT TESTS
    
    There are misc valgrind warnings, to reproduce:
    valgrind --leak-check=full --show-leak-kinds=all
    runtime_output_directory/xxx-t* --gtest_filter='-*DeathTest*' > foo
    
    Fix: initialize objects, cleanup after execution.
    With this patch, warnings are gone, and the "small" tests report no leaks.
    The "large" tests still have some reachable objects.
    
    Change-Id: I5018223eac9764c469470997dacc24182fad89e3

commit 8551c42ed5d3f6645cc00c74b1cfc7268123d0ad
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Mon Aug 28 11:14:33 2017 +0200

    Bug #26597243: AMBIGUOUS INCLUDE PATHS [noclose, editline]
    
    Post-push fix: cmake . -DWITH_EDITLINE=system was broken.
    
    Change-Id: I5e2faae2db95d03ce4318ce0102f37d7ef84b401

commit d10b447732de213d0b34f475c4b4982d172d8ff0
Author: Anibal Pinto <anibal.pinto@oracle.com>
Date:   Mon Aug 28 15:49:18 2017 +0200

    BUG#26671847: GROUP_REPLICATION.GR_APPLIER_THREAD_FAILURE_DETECTION IS UNSTABLE ON PB2
    
    The test gr_thread_failure_detection was failing with the server on
    super_read_only mode after start_group_replication, not being able
    to remove a table.
    
    During WL#10622: "MySQL GCS: Instrument threads in GCS/XCOM" we
    needed to change the way we interact with SQL API, which did
    introduce some delays on the member flow of status update and
    super_read_only unset.
    Before WL#10622 the order was:
      1) unset super_read_only
      2) set member state to ONLINE
    both actions were instantaneous and did not cause thread context
    switch.
    
    After WL#10622, the unset super_read_only, due to the thread
    instrumentation on GCS does cause thread context switch. That was
    causing the situation on which the member was not yet ONLINE but
    super_read_only was disabled. This was, on its turn causing on some
    scenarios DDL to be rollback.
    So we did switch the order to:
      1) set member state to ONLINE
      2) unset super_read_only
    This way the state change is instantaneous, and during the period on
    which the member is ONLINE and super_read_only is being unset,
    transactions or DDL are not allowed to execute.
    This is the correct approach.
    
    The issue here is that WL#10622 forgot to consider that window on
    MTR include files. Now we are seeing sporadic test failures due to
    this order change.
    
    To solve these sporadic test failures, we did extend
    mysql-test/include/start_group_replication.inc to apart from waiting
    from the expected member state when it is called also consider the
    cases:
      - when we are starting the primary in the single-primary mode;
      - when we are starting a server on multiple-primary mode.

commit 56e968388dba5c252dd5fdb9aaa40b3c1c7ee113
Merge: ea9903b 2cf4ba8
Author: Sreeharsha Ramanavarapu <sreeharsha.ramanavarapu@oracle.com>
Date:   Tue Aug 29 20:14:44 2017 +0530

    Merge branch 'mysql-5.7' into mysql-trunk

commit 2cf4ba8277d0ca804eb4f9f9e5879eba7159fcee
Author: Sreeharsha Ramanavarapu <sreeharsha.ramanavarapu@oracle.com>
Date:   Tue Aug 29 20:13:34 2017 +0530

    Bug #18898433: EXTREMELY SLOW PERFORMANCE WITH OUTER JOINS
                   AND JOIN BUFFER
    
    Issue:
    ------
    The algorithm for join_records is :
    
    1. Generate fully matching records by calling
       join_matching_records(). That is, extensions for which
       the ON condition is true.
    2. Call to join_records() recursively to extend these
       matching records for remaining tables.
    3. Generate null complemented extensions for those rows in
       the join buffer that do not have matches.
       (Call to join_null_complements())
    4. Recursively extend null complemented rows for remaining
       tables. (second call to join_records()).
    
    For joins of the form t1 LEFT JOIN (t2 INNER JOIN t3), that
    is the first_inner and last_inner aren't the same, it is
    necessary to call join_records() twice to null complement
    all the tables.
    
    But for queries of the form t1 LEFT JOIN t2 LEFT JOIN t3,
    is the first_inner and last_inner same, the first call to
    join_records (Step 2) isn't necessary. Since null
    complementing will happen anyway towards the end.
    
    This is problematic because the extra (and recursive) call
    to join_records will result in extra reads from the relevant
    tables.
    
    Solution:
    ---------
    When there is a single inner table for outer join, skip the
    Step 2 (linked join_cache's call to join_records()).
    
    This will avoid both extra processing and I/O.

commit ba3196cfe7db496beff15d4c122f58930cb90d5b
Merge: 88f4225 480caa0
Author: Arnab Ray <arnab.r.ray@oracle.com>
Date:   Tue Aug 29 20:02:02 2017 +0530

    Merge tag 'clone-5.7.20-build' into mysql-5.7-cluster-7.5

commit ea9903bed8c2a988fbc3f9df6bbc5cc454c88167
Author: Grzegorz Szwarc <grzegorz.szwarc@oracle.com>
Date:   Wed Aug 16 16:41:13 2017 +0200

    Bug#26634803: X.CONNECTION_IPV6 MUST BE SKIPPED ON MACHINES THAT DO NOT SUPPORT IPV4 MAPPED
    
    Description:
    -----------
    "connection_ipv6" test runs on PB2 / stage branch on machines that do not
    support IPv6 or mapped IPv4 addresses. The reason of the failure is that
    stage branch start MTR with "no-skip" argument.
    
    Fix:
    -------------
    The test has been added to "excludenoskip.list"
    
    Reviewed-by: Lukasz Kotula <lukasz.kotula@oracle.com>
    RB: 17132

commit d4939e24d13a7aa53ddcda1e2cdd9fd87fb3cea6
Author: Ivo Roylev <ivo.roylev@oracle.com>
Date:   Tue Aug 29 16:22:02 2017 +0300

    Bug#26449109 Disable rpl_gtid.rpl_gtid_delete_memory_table_after_start_server until fixed

commit 6a3335b49f5dc276a64bd2ee11441f45d55e1eeb
Merge: 2f9ab49 95ebe28
Author: Anushree Prakash B <anushree.prakash.b@oracle.com>
Date:   Tue Aug 29 17:38:24 2017 +0530

    Merge branch 'mysql-5.7' into mysql-trunk

commit 95ebe28d1b38b7281b2d06431dc41f36103fd300
Author: Anushree Prakash B <anushree.prakash.b@oracle.com>
Date:   Tue Aug 29 17:36:16 2017 +0530

    Bug#25813089 - CREATE USER IF NOT EXISTS SHOULD ALWAYS BE
                   WRITTEN TO THE BINLOGS
    
    DESCRIPTION
    ===========
    MySQL 5.7 introduced a new command CREATE USER IF NOT
    EXISTS ... The idea of this command is that it can be run
    safely on a master and would not break things irrespective
    of whether the user exists on the master or on the slave.
    However, the implementation does not write this statement
    to the binlog when the user exists on the master which
    results in an inconsistency.
    
    ANALYSIS
    ========
    Presently, if the statements CREATE USER IF NOT EXISTS are
    a no-op on the master, they are not written to the the
    binlog. This results in an inconsistent behavior if a
    particular user is present on the slave but not on the
    master. Similar issue arises for ALTER USER IF EXISTS
    statements.
    
    FIX
    ===
    The fix ensures that the statements having queries like
    1. CREATE USER IF NOT EXISTS .. and
    2. ALTER USER IF EXISTS ..
    are binlogged making sure that replication does not
    break and the consistency is maintained across all masters
    and slaves.

commit a96b19d7026533e2633b46b64a40fd79146a5227
Author: Dinesh Surya Prakash <dinesh.prakash@oracle.com>
Date:   Thu Aug 17 17:06:42 2017 +0530

    Bug #26617215 FAILURE OF NDB_ERR4012 TEST
    
    During the upgrade, lots of new error messages got added to mysqld_error.h.
    So when we run the test there are mismatches in the error codes.
    
    Have corrected them according to the new error code.
    
    My_error() is called with the ndb_error code, beacuse of this mysql error message
    is printed for the ndb error code.
    
    Have changed my_error() to print_error()

commit 2f9ab49ce9923f3d41992b64614ea420446b8d7a
Author: Sivert Sorumgard <sivert.sorumgaard@oracle.com>
Date:   Tue Aug 29 10:05:57 2017 +0200

    Follow-up to WL#6049 Meta-data locking for FOREIGN KEY tables.
    
    Reload FK parent information also during --initialize.
    Make test dd_bootstrap_debug pass.

commit 6990126381d909b99646dfa5ac2c0f0bc8766ebb
Author: Norvald H. Ryeng <norvald.ryeng@oracle.com>
Date:   Tue Aug 29 12:37:43 2017 +0200

    Bug #26711258 UPGRADE TO EPSG DATASET 9.1
    
    The previous SRS definitions were generated from EPSG Dataset 9.0. The
    new ones are generated from EPSG Dataset 9.1.
    
    The only change is the addition of SRIDs 7991-8226.
    
    Change-Id: I27b6923a1b6666d7a407656ce40e7ca49d520a1a

commit 51bf5fce1f72e00ebbc8e59659ff87bb34997e08
Merge: 3210747 a8a9c81
Author: Balasubramanian Kandasamy <balasubramanian.kandasamy@oracle.com>
Date:   Tue Aug 29 15:56:33 2017 +0530

    Empty version change upmerge

commit a8a9c81abe714b08409190bfd3c751d42d3d6c60
Merge: 480caa0 f93e52b
Author: Balasubramanian Kandasamy <balasubramanian.kandasamy@oracle.com>
Date:   Tue Aug 29 15:52:14 2017 +0530

    Raise version number after cloning 5.7.20

commit f93e52bf19a70817dd7e4adcb01aae179878e0c6
Merge: bdc4aa6 03c1692
Author: Balasubramanian Kandasamy <balasubramanian.kandasamy@oracle.com>
Date:   Tue Aug 29 15:46:26 2017 +0530

    Raise version number after cloning 5.6.38

commit 03c1692d777b7d2e3d8f77ff6ed6b5d1a6ea4089
Author: Balasubramanian Kandasamy <balasubramanian.kandasamy@oracle.com>
Date:   Tue Aug 29 15:42:38 2017 +0530

    Raise version number after cloning 5.5.58

commit 3210747748fc4fccbfa8cbd1cf13f1f86167638b
Merge: 21c2ddf 480caa0
Author: Sujatha Sivakumar <sujatha.sivakumar@oracle.com>
Date:   Tue Aug 29 15:10:17 2017 +0530

    Merge branch 'mysql-5.7' into mysql-trunk

commit 480caa0e21b039eb937d07db3d80403372e83b45
Author: Sujatha Sivakumar <sujatha.sivakumar@oracle.com>
Date:   Tue Aug 29 14:55:26 2017 +0530

    Bug#26414532: MYSQLRPLSYNC ERRORS OUT BECAUSE SLAVE IS USING
    --SUPER-READ-ONLY OPTION
    
    Post push fix to address test issue.

commit 21c2ddfe39065cadf56a28095345c61c35ef1105
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Mon Aug 28 10:05:31 2017 +0200

    Bug#26711839 COMPILE WARNINGS ON MACOS
    
    When building on Mac we currently have *lots* of warnings.
    Fix where possible, silence otherwise (e.g. code generated by protobuf)
    
    Change-Id: I032fda2a90e8cbdda0e1805678beb3d44dcc9e88

commit f803d69aaa728094a24382421a6646b983dc149f
Author: Tomasz Stepniak <tomasz.s.stepniak@oracle.com>
Date:   Thu Aug 24 15:22:15 2017 +0200

    BUG #26588161: LIBMYSQLX: XCL::DATETIME.TO_STRING() FORMAT
    
    Changed the default date separator to '-' sign in libmysqlx.
    
    RB: 17017
    Reviewed by: Grzegorz Szwarc <grzegorz.szwarc@oracle.com>
    Reviewed by: Lukasz Kotula <lukasz.kotula@oracle.com>

commit 600389e3b2924b7f3fa1ceca8cf1108cfc8c173e
Author: Bin Su <bin.x.su@oracle.com>
Date:   Thu Aug 24 19:11:11 2017 +0800

    Bug#25886814 - TEST CASE SKIP_LOCKED_NOWAIT HIT TIMEOUT ON PB2.
    
    The cause for this bug is the same with bug#26629790.
    Since that bug has been fixed, this bug is also fixed at the same time.
    
    Some adjustment for this test case to make it work after WL#8592,
    and re-record the result file for it.
    
    RB: 17195
    Reviewed-by: Jimmy Yang <jimmy.yang@oracle.com>

commit a2a5908a7d6c65b71d22b14ed8375fb87228535a
Author: Marc Alff <marc.alff@oracle.com>
Date:   Mon Aug 28 17:43:11 2017 +0200

    Applied clang-format (4.0.0 git)
    to storage/perfschema.

commit d201fe402902077c8bac4fef89aca51164443a1e
Author: Deepthi ES <deepthi.e.s@oracle.com>
Date:   Mon Aug 28 18:47:36 2017 +0530

    Bug#26667921 : TEST GROUP_REPLICATION.GR_ROLES FAILING ON PB2
    
    Problem:
    Test was checking for ERROR 1592 messages in error log without ensuring that
    recovery has failed and server2 is in ERROR state.
    
    Solution:
    Decreased the value of group_replication_recovery_retry_count,
    group_replication_recovery_reconnect_interval before starting GR on server2
    and added a check to ensure that server2 is in ERROR state before we grep for
    error messages in error log.

commit ad841dd743712d9d7116acac18a48a43fe0d0eae
Author: Marc Alff <marc.alff@oracle.com>
Date:   Mon Aug 28 15:04:12 2017 +0200

    BUG#26543561 PERFSCHEMA.IDX_THREADS FAILS SPORADICALLY ON PB2
    
    Improved test robustness.
    
    Column THREAD_ID is now unsigned.
    
    Do not use THREAD_ID - @tid in test queries,
    as this leads to spurious errors:
      BIGINT UNSIGNED value is out of range
    
    Fixed test queries to use THREAD_ID = @tid instead.

commit a4f1e3f565e8a5a0d79db8e5830f05193966bf20
Merge: 9c0e54d 5b61fc4
Author: Anushree Prakash B <anushree.prakash.b@oracle.com>
Date:   Mon Aug 28 14:51:09 2017 +0530

    Merge branch 'mysql-5.7' into mysql-trunk

commit 5b61fc4ea7f8f44bd9d8a091dde22e9a05e05f28
Author: Anushree Prakash B <anushree.prakash.b@oracle.com>
Date:   Mon Aug 28 14:39:39 2017 +0530

    Bug#25813089 - CREATE USER IF NOT EXISTS SHOULD ALWAYS BE
                   WRITTEN TO THE BINLOGS
    
    DESCRIPTION
    ============
    MySQL 5.7 introduced a new command CREATE USER IF NOT
    EXISTS ... The idea of this command is that it can be run
    safely on a master and would not break things irrespective
    of whether the user exists on the master or the slave.
    However, the implementation does not write this statement
    to the binlog when the user exists on the master which
    results in an inconsistency.
    
    ANALYSIS
    ========
    Presently, if the statements CREATE USER IF NOT EXISTS are
    a no-op on the master, they are not written to the
    binlog. This results in an inconsistent behavior if a
    particular user is present on the slave but not on the
    master. Similar issue arises for ALTER USER IF EXISTS
    statements.
    
    FIX
    ===
    The fix ensures that the statements having queries like
    1. CREATE USER IF NOT EXISTS .. and
    2. ALTER USER IF EXISTS ..
    are binlogged making sure that replication does not
    break and the consistency is maintained across all masters
    and slaves.

commit 9c0e54d4732e7c63b831a696d287836a92d349ea
Merge: 3258fad 82360d0
Author: Kailasnath Nagarkar <kailasnath.nagarkar@oracle.com>
Date:   Mon Aug 28 13:23:12 2017 +0530

    Merge branch 'mysql-5.7' into mysql-trunk

commit 3258fad89888562848e3a5c019eee4ff4043fda0
Author: Dmitry Shulga <dmitry.shulga@oracle.com>
Date:   Mon Aug 28 14:43:54 2017 +0700

    Bug #26667007 -- MYSQL UPGRADE TO 8.0.3 USER WITH RELOAD GRANTED BACKUP_ADMIN WITH GRANT OPTION
    
    As part of wl9451, when a user has RELOAD privilege in 5.7 and the mysql server is
    upgraded to 8.0.3, the user is granted privilege BACKUP_ADMIN in order to be
    able to perform some backup duties.  This privilege is granted with admin
    option in all cases, regardless of whether the RELOAD was granted that way.
    
    The reason for the bug was the fact that a grant_priv column's value
    didn't take into account when inserting a record about the BACKUP_ADMIN privilege
    into the table mysql.global_grants.
    
    To fix the bug the INSERT statement in the sql script file scripts/mysql_system_tables_fix.sql
    was modified in order take into account a value of grant_priv column of the table mysql.user
    when the privilege BACKUP_ADMIN is added for a user having the RELOAD privilege assigned.
    
    Similar modification was done for the privilege XA_RECOVER_ADMIN.

commit 82360d0ffe61ffba78680563622fca9d619c0eac
Author: Kailasnath Nagarkar <kailasnath.nagarkar@oracle.com>
Date:   Mon Aug 28 13:05:20 2017 +0530

    Bug #25737271 : MYSQL SERVER CRASHED WITH SIG 11 ON
                    MERGE_BUFFERSP10SORT_PARAMP11ST_IO_CACHE
    
    ISSUE: The merge_buffers() function had incorrect way
           of handling buffers resulting in server exiting
           abnormally.
    
    SOLUTION:
    Corrected buffer handling in merge_buffers()

commit aefaa55607c5ae78132649f2583bb7115f0cfcc4
Author: Dmitry Lenev <dmitry.lenev@oracle.com>
Date:   Sun Aug 27 15:59:06 2017 +0300

    Follow-up to WL#6049 Meta-data locking for FOREIGN KEY tables.
    
    Fixed perfschema.transaction_nested_events test failure.
    
    Changes to cache invalidation which were done as part of this
    WL resulted in less data-dictionary lookups in one of parts of
    this test.
    
    Recorded new test results after checking that they are correct.

commit dc34caf4de4f68914a17dfbb7d1cfcc1ddfe62f3
Author: Marcin Babij <marcin.babij@oracle.com>
Date:   Fri Aug 25 23:11:29 2017 +0200

    Bug #26566360 	CMAKE DOESN'T PUSH X64 TOOLSET FOR VS 2017+

commit cf02196c4c4de346c91010f2679ae51f9c6bf644
Author: Dmitry Lenev <dmitry.lenev@oracle.com>
Date:   Fri Aug 25 14:08:44 2017 +0300

    Follow-up to fix for bug#25817660: Combination of virtual index, foreign key and trigger asserts
    
    The problem which was solved by original patch for
    handler::my_eval_gcolumn_expr_with_open() call affected
    handler::my_prepare_gcolumn_template() call too.
    
    The latter call too tried to initialize current LEX object
    before trying to open table. This happened even during regular
    processing and, indeed, destroyed the current statement context,
    causing an assert error in dispatch_command().
    
    Similarly to the original patch we solve the problem by
    removing the calls to lex_start() and lex_end() from the
    handler::my_prepare_gcolumn_template().
    This is safe since neither of thd->dd_client()->acquire(),
    open_table_uncached() nor innobase_build_v_templ_callback()
    use the current LEX object.

commit a58040bceb2aa4d1ab06d55c4673fb4c23bf4f95
Author: Sven Sandberg <sven.sandberg@oracle.com>
Date:   Mon Aug 21 09:43:47 2017 +0200

    Post-push fix: WL#2955: RBR replication of partial JSON updates
    
    Fix sporadic test failure.
    
    Variable $fix in rpl_row_jsondiff_stress may be empty; when that
    happens the line '--eval $fix' failed.  It is expected and allowed
    that $fix is empty sometimes, just a bit unlikely due to the ranomized
    nature of this test, and therefore the mistake was not found earlier.
    Fixed by guarding '--eval $fix' with 'if ($fix)'.

commit 90b046e9ab66dd2eca28796e48be078a03fd6e69
Merge: 7d51def 5d8931e
Author: Ivo Roylev <ivo.roylev@oracle.com>
Date:   Fri Aug 25 14:41:34 2017 +0300

    Null-merge from 5.7.

commit 5d8931ee86f7f959cf0d6bf54828f578632a4647
Author: Ivo Roylev <ivo.roylev@oracle.com>
Date:   Sun Aug 13 11:00:17 2017 +0300

    wl10820 backport

commit 7d51defcdd6ceedfdee1bc156cbb6b5a0eef52bc
Author: Sujatha Sivakumar <sujatha.sivakumar@oracle.com>
Date:   Fri Aug 25 14:53:36 2017 +0530

    Bug#26414532: MYSQLRPLSYNC ERRORS OUT BECAUSE SLAVE IS USING
    --SUPER-READ-ONLY OPTION
    
    Fixing post push valgrind issue.

commit 881fdb465a03da975f38125788cd11e512ad55ad
Author: Dmitry Shulga <dmitry.shulga@oracle.com>
Date:   Fri Aug 25 16:49:47 2017 +0700

    Bug #26665851 - USING FLUSH TABLES WITH READ LOCK AND LOCK INSTANCE LEADS TO A CRASH
    
    The problem was that FLUSH TABLES WITH READ LOCK statement could trigger
    a debug  assert if the current connection had acquired BACKUP LOCK.
    This had no consequences for release builds.
    
    This patch fixes the problem by adjusting the assert so
    that it takes the possibility of holding backup lock into account.

commit 9ef22a5948291d538f5ca12a1953b711e66d0982
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Fri Aug 25 09:04:05 2017 +0200

    WL#9467 - Resource Groups.
    
    Post-push fix: remove ~2000 warnings of the form: sql/sql_lex.h(4326):
    warning C4267: 'argument': conversion from 'size_t' to 'unsigned int'
    
    Change-Id: I2b776bb29ff9de96fbb0e49ef38386bd142ada25

commit b18911eaf036afaec6a6779bf4c08eba89746911
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Fri Aug 25 08:50:35 2017 +0200

    WL#9467 - Resource Groups.
    
    Post-push fix for: thread_attrs_api_solaris.cc:166:30:
    error: unused parameter 'priority' [-Werror=unused-parameter]
    
    Change-Id: Idfbab4cf7853fab38169bcd86f95a2630b1f9ac0

commit 0813434d8b8e2755a0532be3840324a36aaed0ef
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Fri Aug 25 08:25:41 2017 +0200

    Bug #26612067: REMOVE UNUSED CODE FROM BINARIES
    
    Post-push fix: disable --gc-sections when using gcc on solaris.
    
    Change-Id: I6b93d9d543d7d920ed11a72d2eac6936b7c1b293

commit 96443ce6741b535fc29aee845cef1a9a1e41a33f
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Tue Aug 22 09:16:42 2017 +0200

    Bug#26612465 BUILDING WITH CMAKE 3.9.0 OR NEWER GIVES DEPRECATION WARNINGS [noclose]
    
    Extra patch to make NDB link with IMPORTED ssl libraries.
    
    Change-Id: I442acb826861e4f9a1c728f6082a1c5de52b5b09

commit 6246a4044031de28143cb79858e829a665ae147b
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Mon Aug 21 15:51:10 2017 +0200

    Bug#26612465 BUILDING WITH CMAKE 3.9.0 OR NEWER GIVES DEPRECATION WARNINGS [noclose]
    
    CMake Deprecation Warning at CMakeLists.txt:44 (CMAKE_POLICY):
    The OLD behavior for policy CMP0026 will be removed from a future version
    of CMake.
    
    Change-Id: I4f79c5c08bc9577876b4b0d36299b9a764ca3b87

commit 068f308a18ac954cb0e21e8175a435c6ac560f3e
Merge: 449946c 66d23cf
Author: Nuno Carvalho <nuno.carvalho@oracle.com>
Date:   Fri Aug 25 10:57:49 2017 +0200

    Merge branch 'mysql-5.7' into mysql-trunk

commit 66d23cf58e6ab02b91c10cffb0f17bee5ed3f503
Author: Nuno Carvalho <nuno.carvalho@oracle.com>
Date:   Fri Aug 25 10:57:13 2017 +0200

    BUG#25495393: GROUP REPLICATION CAN USE SOME VERBOSITY IN THE ERROR LOG
    
    Fix a memory leak on Gcs_view handling on gcs_event_handlers.cc.

commit 449946ccfc096403cd51a93749e071a75aef9579
Merge: df19cad 33bc7b6
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Fri Aug 25 07:50:08 2017 +0200

    Null-merge from 5.7.

commit 33bc7b6676451e09cf8f179eec61c1589479721b
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Thu Aug 24 16:56:33 2017 +0200

    Bug#26680491 BUILD ON WINDOWS: ADAPT WIX SEARCH TO 32/64BIT VERSIONS OF CMAKE
    
    When upgrading to cmake3.8 bulding of MSI packages failed because the WiX
    toolkit is not found.
    
    Solution: Search in ProgramFiles(x86) in addition to existing search paths.

commit df19cad24c453cc7ae72c25ce6e3ab91ab93ed9c
Merge: 89813d0 45e7c0d
Author: Jaideep Karande <jaideep.karande@oracle.com>
Date:   Fri Aug 25 03:15:30 2017 +0200

    Merge branch 'mysql-5.7' into mysql-trunk

commit 45e7c0dd74c26d3adea65667882538fbd8613857
Author: Jaideep Karande <jaideep.karande@oracle.com>
Date:   Fri Aug 25 03:12:48 2017 +0200

    Bug#25495393: GROUP REPLICATION CAN USE SOME VERBOSITY IN THE ERROR LOG
    
    Post push handled windows build issues and doxygen warnings.

commit 89813d01c526cf4d173f349a1b6f7192b02f8648
Merge: b4236bb ed02e29
Author: Hemant Dangi <hemant.dangi@oracle.com>
Date:   Fri Aug 25 00:05:04 2017 +0200

    Merge branch 'mysql-5.7' into mysql-trunk

commit ed02e297ff98682c0c25d70de0d524ae522bac90
Author: Hemant Dangi <hemant.dangi@oracle.com>
Date:   Fri Aug 25 00:03:28 2017 +0200

    Bug#26024253: GR MEMBER STOP MUST STOP ALL ASYNCHRONOUS CHANNELS THAT ARE FEEDING DATA INTO IT
    
    Post push fix to add "have_debug.inc" to a gr_stop_async_on_stop_gr test case.

commit b4236bbf5b2859c7c4eb58a1d85765e147368449
Merge: 196beea 38fa9e9
Author: Jaideep Karande <jaideep.karande@oracle.com>
Date:   Thu Aug 24 22:40:40 2017 +0200

    Merge branch 'mysql-5.7' into mysql-trunk

commit 38fa9e96d16fefc0fd75d9976a7633fd537377b3
Author: Jaideep Karande <jaideep.karande@oracle.com>
Date:   Thu Aug 24 22:33:03 2017 +0200

    Bug#25495393: GROUP REPLICATION CAN USE SOME VERBOSITY IN THE ERROR LOG
    
    Handled failing builds due to missing sstream header file.

commit 196beeab4670bdcf7b9a559bd5ea3267ed9e58ce
Merge: b6ab07b 5ca5f18
Author: Jaideep Karande <jaideep.karande@oracle.com>
Date:   Fri Aug 25 00:06:01 2017 +0530

    Merge branch 'mysql-5.7' into mysql-trunk

commit 5ca5f18320e41a0ff131f66e7bb11912d0d3d888
Author: Jaideep Karande <jaideep.karande@oracle.com>
Date:   Wed Jul 26 04:20:24 2017 +0530

    Bug#25495393: GROUP REPLICATION CAN USE SOME VERBOSITY IN THE ERROR LOG
    
    Description:
    At present not all scenarios of Group membership changes are logged.
    When member join or member leaves, customers cannot identify same by looking
    at logs. View changes are not logged. Present logging does not assist DBAs with
    corrective measures during network partitions or inform DBAs when member
    re-connects.
    Also at some places we are logging internal debug messages which cannot be decoded
    by DBAs.
    Important member related configuration is also not logged.
    
    Resolution:
    Logging has been analyzed for:
    1. View changes
    2. Member join
    3. Member leave(graceful and crash)
    4. Member unreachable
    5. Member re-connect
    6. Removal of debug messages
    7. Member configuration has been extended with Member_id, member_uuid,
       single_primary_mode, and group_replication_auto_increment_increment
    8. Improvements in single-primary mode status reporting and member
       leaving/joining logging
    New messages have been added and change to existing messages where required has
    been done.

commit b6ab07ba67409e98f15ab0bf3c72b7afe6c2006d
Author: Dmitry Lenev <dmitry.lenev@oracle.com>
Date:   Thu Aug 24 21:13:52 2017 +0300

    WL#6049 "Meta-data locking for FOREIGN KEY tables" and WL#11059
    "Implement INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS as a system
    views over dictionary tables."
    
    WL#6049 Meta-data locking for FOREIGN KEY tables.
    
    The primary goal of this task is to ensure that foreign keys checks,
    which are performed by storage engine (e.g. InnoDB), do not access
    tables which are concurrently modified by DDL statements.
    
    Such an isolation of FK checks/actions from DDL statements can be
    achieved by ensuring that FKs are taken into account when we acquire
    metadata "operation-type aware" locks for DML and DDL statements.
    
    This is done by:
    
    1) Extending prelocking algorithm/process to take into account
       foreign keys and acquire metadata locks which are appropriate
       for the operations involving them (checks in parent or child
       tables take SR lock, cascading updates or deletes take SW lock,
       LOCK TABLES takes SRO or SNRW locks correspondingly).
    
    2) Changing DDL statements which add or drop foreign keys to the system
       to X lock on FK parent table before child table definition changes.
    
    3) Changing DDL statements which otherwise affect FK-related metadata
       (like RENAME TABLE on child or parent table) to acquire X lock on
       tables participating in the FK.
    
    4) Changing ALTER TABLE to acquire SU metadata lock on parent tables
       for newly added FKs so it can properly check them.
    
    The secondary goal of this task is to ensure that DDL on parent tables
    correctly updates foreign key metadata. Specifically we now correctly
    update the following metadata:
    
    I)   Name of unique constraint in parent table for the FK.
    
         Old code misused DD.FOREIGN_KEYS.UNIQUE_CONSTRAINT_ID to store
         id of supporting index for the FK in the child table. This WL replaces
         this column with VARCHAR(64) field which stores name of unique
         key in the parent table used for the FK -- UNIQUE_CONSTRAINT_NAME.
         DDL statements code was adjusted to keep this value correct on
         changes to parent table definition.
    
    II)  Referenced schema and table names (DD.FOREIGN_KEYS.REFERENCED_TABLE_SCHEMA
         and DD.FOREIGN_KEYS.REFERENCED_TABLE_NAME) during ALTER TABLE RENAME/
         RENAME TABLES on parent tables.
    
    This WL introduces some new temporary limitations:
    
    - We temporary disallow renaming of parent columns in FKs.
    
    - ALTER TABLE ... ALGORITHM=COPY acquires SRO locks on the parent
      tables for newly added FKs. This is temporary workaround for
      InnoDB SE making information about such FKs to other connections
      before DDL commit.
    
    - We disallow ALTER TABLE ... RENAME under LOCK TABLES on tables
      which have or will have foreign keys. This limitation should
      be weakened soon.
    
    WL#11059 Implement INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS as a system
             views over dictionary tables.
    
    This patch implements I_S.REFERENTIAL_CONSTRAINTS as a system view over data
    dictionary tables, and remove 5.7 code that uses a temporary
    table to represent I_S view.
    
    Following changes are made in the patch:
    
    * Define a system view over data dictionary tables representing
      I_S.REFERENTIAL_CONSTRAINTS.
    
    * Remove 5.7 code from sql_show.cc for I_S.REFERENTIAL_CONSTRAINTS.
    
    * The result file for main.information_schema_inno shows the
      unique_constraint_name as PRIMARY. This is expected change added in
      wl6049. We get 'PRIMARY' as constraint name if a key is promoted as
      primary key. If a unique key is not a primary key, then the constraint name
      does show the unique key name.
    
    * Fixed upgrade code to return just the constraint name and avoid prefixing
      the constraint schema name with it. We also check that the constraint
      name is not more than 64 characters, before continuing further.
    
    * Added ORDER BY clauses in some of I_S query to force order of
      tuple returned. Because, now the optimizer returns the rows and
      not read from temporary table as in 5.7 I_S design.
    
    * Remove part of test case in main.information_schema. Because,
    
      - The problem reported back then is only applicable for 5.7
        code.
    
      - The output of EXPLAIN ... <select on I_S system view> goes
        through optimizer and then plan return might vary.
    
    * Fixed InnoDB upgrade code, which ignored setting RESTRICT flag for
      update and delete rule.
    
    * Recorded result files with I_S column names being capitals now,
      this is expected, see wl6599 for more info.

commit e771373e681bb2113aa50b1c67f23c703385c0ad
Merge: 7b902bc c165ce8
Author: Hemant Dangi <hemant.dangi@oracle.com>
Date:   Thu Aug 24 20:04:04 2017 +0200

    Merge branch 'mysql-5.7' into mysql-trunk

commit c165ce82d364b37286ae1cd57feede76ac9349ab
Author: Hemant Dangi <hemant.dangi@oracle.com>
Date:   Thu Aug 24 19:59:47 2017 +0200

    Bug#26024253: GR MEMBER STOP MUST STOP ALL ASYNCHRONOUS CHANNELS THAT ARE FEEDING DATA INTO IT
    
    Issue
    =====
    If a member that has asynchronous channels feeding data into it - either on
    multi-primary deploy or the primary on single-primary deploy - does stop, all
    asynchronous channels must be stopped to avoid that changes are made locally
    (not replicated to the group).
    
    Even when super_read_only it is set on STOP GROUP_REPLICATION, that will not
    affect already running asynchronous which can still do changes.
    
    Solution
    ========
    When group replication stops, due to error or due to executing stop
    group_replication command, all asynchronous channels are stopped.

commit 7b902bc1fcdd54d36ae2101620b75a51f1b725c9
Merge: 7a75d5a 5654f5e
Author: Venkatesh Duggirala <venkatesh.duggirala@oracle.com>
Date:   Thu Aug 24 22:52:37 2017 +0530

    Merge branch 'mysql-5.7' into mysql-trunk

commit 5654f5ec294f3d8ea087029ba9b47ad3eb2835b3
Author: Venkatesh Duggirala <venkatesh.duggirala@oracle.com>
Date:   Thu Aug 24 10:56:38 2017 +0530

    Bug#26589008 SYNC_BINLOG=0 SHOULD IGNORE BINLOG_GROUP_COMMIT_SYNC_DELAY
    
    Problem: When sync_binlog=0, sync stage in binlog group commit is
             never reached. But still each binlog group is waiting for
             BINLOG_GROUP_COMMIT_SYNC_DELAY seconds before entering into
             sync stage.
    
    Fix: Now the code is changed in such a way that the waiting logic considers
         sync_binlog=0 case and skips delay logic in such case.

commit 7a75d5a4ff2d18e53a3bd1401d7e1e570b0235f4
Author: Mayank Prasad <mayank.prasad@oracle.com>
Date:   Thu Aug 24 22:17:53 2017 +0530

     Follow up push for WL#11009.
     Tests in special test suites were left out. Updated them accordingly.

commit 1ec9461d57e73a805e8a66720b8b9e702a230a09
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Thu Aug 24 15:58:20 2017 +0200

    Bug#26680491 BUILD ON WINDOWS: ADAPT WIX SEARCH TO 32/64BIT VERSIONS OF CMAKE
    
    When upgrading to cmake3.8 bulding of MSI packages failed because the WiX
    toolkit is not found.
    
    Solution: Search in ProgramFiles(x86) in addition to existing search paths.

commit 802d74391e569214b648ea568bd4c544d1535bc4
Author: Georgi Kodinov <georgi.kodinov@oracle.com>
Date:   Thu Aug 24 17:13:00 2017 +0300

    Addendum 1 to WL#8891's push: bad merge fix.

commit fc50bb621764c9091d9986f4ba09284447eaea61
Merge: 1befba0 c2b1fdc
Author: Terje Rosten <terje.rosten@oracle.com>
Date:   Thu Aug 24 16:10:46 2017 +0200

    Null-merge from 5.7.

commit c2b1fdc4f4aa61fe76b8ac7a34d0c1bb4ed2deda
Author: Terje Rosten <terje.rosten@oracle.com>
Date:   Fri Aug 11 16:00:58 2017 +0200

    Bug#26474153 CONTRIBUTION: ADJUST SPEC FILE TO SHOW A PROPER RPMBUILD COMMAND
    
    Package redhat-rpm-config adds some convenience macros when building
    on RHEL6 and later. Recommend package when rebuilding rpm package.
    
    RHEL5 is EOL, remove from comment.
    
    Change based on contribution from Simon Mudd, bug#87098.

commit 1befba0e6c0eba7df46fe9b498ed5f215c481258
Merge: 108b93f 7decf32
Author: Terje Rosten <terje.rosten@oracle.com>
Date:   Thu Aug 24 16:06:17 2017 +0200

    Merge branch 'mysql-5.7' into mysql-trunk

commit 7decf32cfeb50de379d1d1cc45edee448ff5ec89
Author: Terje Rosten <terje.rosten@oracle.com>
Date:   Fri Aug 11 16:16:30 2017 +0200

    Bug#26595288 5.7 STARTUP SCRIPTS ALWAYS INITIALIZE IF EMPTY DATADIR
    
    Add option to skip automatic init, making it possible to opt-out.
    Default is still to perform init.
    
    To skip init, create file /etc/sysconfig/mysql with contents like:
    
    NO_INIT=true

commit 108b93f66e5a5e579cdd1fb8f4c07fde6d4b39c2
Merge: 38e0872 9a9b6ec
Author: Terje Rosten <terje.rosten@oracle.com>
Date:   Thu Aug 24 16:01:18 2017 +0200

    Null-merge from 5.7.

commit 9a9b6ec37c70fc603385bdbc93797edf36fc0ad4
Author: Terje Rosten <terje.rosten@oracle.com>
Date:   Fri Aug 11 15:38:09 2017 +0200

    Bug#26446321 CONTRIBUTION: FIX INSTALL DATABASE BY USED MYSQLD --INITIALIZE
    
    Since MySQL 5.7 mysql_install_db has been deprecated, mysqld --initialize is
    now preferred. Switch mysqld_multi.sh.
    
    Based on contribution from tigerb, bug#87080.
    
    Change is 5.7 specific, MySQL 8 was fixed by:
     WL#9071: Remove mysql_install_db and server --bootstrap option

commit 38e08722bfa8a957dbdd7dc1b6d7d5981e44c350
Merge: 6110251 39cbc25
Author: Georgi Kodinov <georgi.kodinov@oracle.com>
Date:   Thu Aug 24 15:46:18 2017 +0300

    Merge branch 'mysql-5.7' into mysql-trunk

commit 39cbc25e9e7bb62cfd327ef1106ee27fbdcdbe9f
Author: Georgi Kodinov <georgi.kodinov@oracle.com>
Date:   Thu Aug 24 15:41:50 2017 +0300

    WL#8891: Audit Log: Abort SQL queries on rule based condition

commit 6110251e486fe68457cece231ef016c41e42d212
Author: Balasubramanian Kandasamy <balasubramanian.kandasamy@oracle.com>
Date:   Thu Aug 24 17:42:42 2017 +0530

    Fixed the changelog in rpm packages

commit f1bd60088dd4c0d332889fda937b51d472a2e0c5
Merge: 2151bd1 e6ab48a
Author: Georgi Kodinov <georgi.kodinov@oracle.com>
Date:   Thu Aug 24 14:43:20 2017 +0300

    Merge branch 'mysql-5.7' into mysql-trunk

commit 2151bd10c54479ee68ae3ad8959ccd3f7077c79c
Merge: a0d9941 671c1b6
Author: Ajo Robert <ajo.robert@oracle.com>
Date:   Thu Aug 24 17:06:34 2017 +0530

    NULL Merge branch 'mysql-5.7' into mysql-trunk

commit 671c1b618d88e414d337dece79949e9ec58145f8
Merge: eadb8d0 bdc4aa6
Author: Ajo Robert <ajo.robert@oracle.com>
Date:   Thu Aug 24 17:06:07 2017 +0530

    NULL Merge branch 'mysql-5.6' into mysql-5.7

commit bdc4aa601950295a602c5320f260d91e66e6ff82
Merge: 0012c45 ebfd0eb
Author: Ajo Robert <ajo.robert@oracle.com>
Date:   Thu Aug 24 17:04:45 2017 +0530

    Merge branch 'mysql-5.5' into mysql-5.6

commit ebfd0ebe55692c0f115f01d5441050b773674a71
Author: Ajo Robert <ajo.robert@oracle.com>
Date:   Thu Aug 24 17:03:21 2017 +0530

    Bug#26361149  MYSQL SERVER CRASHES AT: COL IN(IFNULL(CONST,
                           COL), NAME_CONST('NAME', NULL))
    
    Backport of Bug#19143243 fix.
    
    NAME_CONST item can return NULL_ITEM type in case of incorrect arguments.
    NULL_ITEM has special processing in Item_func_in function.
    In Item_func_in::fix_length_and_dec an array of possible comparators is
    created. Since NAME_CONST function has NULL_ITEM type, corresponding
    array element is empty. Then NAME_CONST is wrapped to ITEM_CACHE.
    ITEM_CACHE can not return proper type(NULL_ITEM) in Item_func_in::val_int(),
    so the NULL_ITEM is attempted compared with an empty comparator.
    The fix is to disable the caching of Item_name_const item.

commit e6ab48a52436f571e5ab1cfce318a3a6b9706a87
Author: Georgi Kodinov <georgi.kodinov@oracle.com>
Date:   Thu Aug 24 12:23:51 2017 +0300

    WL#8891: Audit Log: Abort SQL queries on rule based condition

commit a0d9941b6cd17a275bab23f5e95ffa16b698efd6
Author: Steinar H. Gunderson <steinar.gunderson@oracle.com>
Date:   Tue Aug 22 14:28:03 2017 +0200

    Bug #26666594: SYSCALL WARNINGS IN MACOS
    
    Make macOS use pthread_threadid_np() instead of calling the SYS_thread_selfid
    syscall directly.
    
    Change-Id: Ic795195cf6dabd55fe6245b8bf947f35258e61c4

commit 531f3b92766261cecc7b51839c4cdba02f1ae8c8
Merge: c01636c eadb8d0
Author: Anibal Pinto <anibal.pinto@oracle.com>
Date:   Thu Aug 24 12:45:09 2017 +0200

    Merge branch 'mysql-5.7' into mysql-trunk

commit eadb8d0f0a501125ddc90d0afd75d9b858d88113
Author: Anibal Pinto <anibal.pinto@oracle.com>
Date:   Thu Aug 24 12:39:14 2017 +0200

    BUG#26611272: Test gr_uninstall_while_network_blocked  is failling on PB2
    
    Desciption:
    
    This test create a group of two members, where one member is put in a UNREACHABLE state
    and then INSERT is executed which gets blocked, then when we try to execute UNINSTALL
    command it returns an error that plugin cannot be uninstalled now.
    
    But if the UNINSTALL is executed before the plugin receives INSERT query, the plugin
    will be able to UNINSTALL successfully, that results in a test failure as is
    expecting UNINSTALL to fail with error ER_PLUGIN_CANNOT_BE_UNINSTALLED.
    
    Solution:
    
    To prevent the uninstall getting executed successfully, we wait for server to receive
    the INSERT, before executing the UNINSTALL of Group Replication plugin.

commit c01636c07f4f34a1bd7f8f7ab1b5ddf60d2fb2af
Author: Deepthi ES <deepthi.e.s@oracle.com>
Date:   Thu Aug 24 15:36:58 2017 +0530

    WL#10475 : Defaults - Enable parallel replication applier
    
    Post push fix.
    1) Removed --debug-server runs in default.daily
    2) Included --mysqld=--skip-slave-preserve-commit-order for all-skiplogbin
       run in default.weekly
    3) Recorded few testcases to pass with --skip-log-bin
    4) Fixed testcases in innodb_stress suite.

commit 8127b7e869b944813d03276b1d026784e2e593a0
Merge: 58f1467 270a235
Author: Arun Kuruvila <arun.kuruvila@oracle.com>
Date:   Thu Aug 24 14:26:16 2017 +0530

    Merge branch 'mysql-5.7' into mysql-trunk

commit 270a2356f911279fa99c5c9879a6a61884b4f4f0
Merge: 8946b3f 0012c45
Author: Arun Kuruvila <arun.kuruvila@oracle.com>
Date:   Thu Aug 24 14:25:10 2017 +0530

    Merge branch 'mysql-5.6' into mysql-5.7

commit 0012c451bf04e49a50dc113637de2144ddfb89ee
Merge: 801b070 0bed495
Author: Arun Kuruvila <arun.kuruvila@oracle.com>
Date:   Thu Aug 24 14:23:52 2017 +0530

    Merge branch 'mysql-5.5' into mysql-5.6

commit 0bed495b4909b9d72e37c9075f0057263040ab3f
Author: Arun Kuruvila <arun.kuruvila@oracle.com>
Date:   Thu Aug 24 14:19:38 2017 +0530

    Bug#26482173: TLS CIPHER NEGOTIATION INCORRECTLY MATCHES ON
                  LAST BYTE ONLY (YASSL)
    
    
    Description:- TLS cipher negociation happens incorrectly
    leading to the use of a different
    
    Analysis:- YaSSL based MySQL server will compare only the
    last byte of each cipher sent in the Client Hello message.
    This can cause TLS connections to fail, due to the server
    picking a cipher which the client doesn't actually support.
    
    Fix:- A fix for detecting cipher suites with non leading
    zeros is included as YaSSL only supports cipher suites with
    leading zeros.

commit 58f146793e5a550c7ec976e2eb8b79b8724e4b15
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Fri Aug 18 16:42:55 2017 +0200

    WL#10524 Dynamic Linking of OpenSSL in MySQL Server
    
    Ensure that <openssl/applink.c> is included in both client and server libraries
    when linking dynamic OpenSSL on Windows.

commit 0bd18a942d42ae62e15d2290fbd0c4524db4b2cc
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Tue Aug 15 12:15:31 2017 +0200

    Bug#26272084 DYNAMIC LINKING WITH OPENSSL FOR GENERIC LINUX
    
    Add support for linking with libssl.so and libcrypto.so on Linux
    This will copy libssl.so and libcrypto.so into library_output_directory in the
    build tree, and use them when building our executables and shared libraries.
    The openssl .so libraries will also be INSTALLed together with our own .so
    libraries. This is done iff:
    
    - cmake is run with -DWITH_SSL=/path/to/installation
    - /path/to/installation contains the necessary .so libraries
    - this is a LINUX build
    - this is a STANDALONE INSTALL_LAYOUT

commit 0705442ceac64a6ca988aa8fcae4175172e635a3
Merge: 45102ec 8946b3f
Author: Dyre Tjeldvoll <Dyre.Tjeldvoll@oracle.com>
Date:   Thu Aug 24 09:39:10 2017 +0200

    Merge branch 'mysql-5.7' into mysql-trunk
    
    Null-merge of bug#26447825

commit 45102ec13c31c68e5a47918e3bebc51181571858
Author: Kristofer Älvring <kristofer.pettersson@oracle.com>
Date:   Mon Aug 21 11:53:04 2017 +0200

    Bug#26576989 DROP ROLE CAN MAKE SERVER UNUSABLE
    
    This patch fix two issues with the global variable
    mandatory_roles:
    * It was possible to setting anonymous authorization IDs as
    mandatory roles. This could lead to server instability
    * The additional privilege ROLE_ADMIN is now required to
    set the mandatory_roles variable.

commit 8946b3f641d632781b3eace099e698a6ff459dca
Author: Dyre Tjeldvoll <Dyre.Tjeldvoll@oracle.com>
Date:   Fri Aug 18 14:59:23 2017 +0200

    Bug#26447825: MYSQLD COMPLETELY SILENT EVEN IN FAILURE IF LOG-ERROR IS
    NOT WRITABLE
    
    Problem: C-library function freopen() is not atomic. It closes the
    stream given as argument before trying (and thereby checking if it is
    possible) to open the file which the stream is to be associated with. So
    in the event that the open() fails, the user is left without a working
    stream where the error message for the failed open can go. Likewise, any
    buffered messages not yet written to the stream are also lost.
    
    Solution: Stop using freopen() and re-implement my_freopen() using
    fopen(), fileno() and dup2(). That way any error from open() (or
    fileno()) is caught before doing anything which affects the stream.
    According to the man-page, dup2() is atomic.

commit 010e39ac92d9a1c26f3a69e905b8cf3be1cacbc3
Merge: f061ea58 11bb5b3
Author: Sujatha Sivakumar <sujatha.sivakumar@oracle.com>
Date:   Thu Aug 24 12:28:22 2017 +0530

    Bug#26414532: MYSQLRPLSYNC ERRORS OUT BECAUSE SLAVE IS USING
    --SUPER-READ-ONLY OPTION
    
    Merge branch 'mysql-5.7' into mysql-trunk

commit 11bb5b31a4c5b533473252ad6fe6c2fa79fe710e
Author: Sujatha Sivakumar <sujatha.sivakumar@oracle.com>
Date:   Thu Aug 24 12:23:00 2017 +0530

    Bug#26414532: MYSQLRPLSYNC ERRORS OUT BECAUSE SLAVE IS USING
    --SUPER-READ-ONLY OPTION
    
    Problem:
    ========
    After upgrading MySQL server from 5.7.17 to 5.7.18
    'mysqlrplsync' utility tool fails with following error.
    
    ERROR: Query failed. 1290 (HY000): The MySQL server is
    running with the --super-read-only option so it cannot
    execute this statement
    
    When this occurs, the Slave_SQL_Running on the slave server
    stops running and needs to be manually started again. The
    slave server does have the super-read-only option set to
    true. When running MySQL 5.7.17 this wasn't an issue.
    
    Analysis:
    ========
    When replication information repository is set to 'TABLE'
    few replication specific administration commands listed
    below, will try to update the repository tables.
    
    1) START SLAVE
    2) STOP SLAVE
    3) CHANGE MASTER
    4) RESET SLAVE
    5) RESET MASTER
    6) SET GLOBAL GTID_PURGED
    7) FLUSH BINARY LOGS
    8) 'gtid_executed' TABLE compression thread.
    
    First three commands were fixed as part of Bug#22097534:
    SUPER_READ_ONLY ABORTS STOP SLAVE IF
    RELAY_LOG_INFO_REPOSITORY=TABLE, DBG CRASH
    
    The reset of the commands were fixed as part of
    Bug#22857926: ASSERTION `! IS_SET()' AT SQL_ERROR.CC:38 IN
    READ_ONLY MODE FOR MANY RPL CMDS.
    
    During the Bug#22857926 fix, the previous Bug#22097534 fix
    specific changes were reverted a new approach was taken.
    
    The new approach used a flag named 'ignore_global_read_lock'
    whose intention is to ignore the read only option and allow
    commits to replication specific system tables.  If this flag
    is set then the additional check for 'read only' option is
    not done.
    
    But the above fix works fine only when 'AUTOCOMMIT=ON'.  In
    the case of AUTOCOMMIT=OFF the 'ignore_global_read_lock'
    flag is not set. Hence commands fail to ignore read_only
    restriction.
    
    STOP SLAVE command behavior explained in detail:
    
    STOP SLAVE command is an IMPLICIT COMMIT command, i.e
    parser will append an explicit BEGIN and COMMIT for this
    command.
    
    BEGIN
    STOP SLAVE;
    COMMIT;
    
    STOP SLAVE command will try to stop both the applier thread
    and receiver thread and update their positions in
    'slave_relay_log_info' and 'slave_master_info' tables.
    
    Case: AUTOCOMMIT=ON.
    
    1) BEGIN
    
    2) Update 'slave_relay_log_info' table and commit as a real
    transaction.
    
    System_table_access::close_table will invoke
    ha_commit_trans with 'ignore_global_read_lock=true'.
    
    Since autocommit is 'ON' each statement will do a complete
    commit and clean up the transaction context.
    
    3) Update 'slave_master_info' also does the same.
    
    4) COMMIT.
    
    COMMIT will invoke 'trans_commit_implicit'. It will check
    if there any active transactions which needs to be committed
    implicitly. Since step 2-3 are real commit transactions this
    final commit has nothing to do. It will exit without
    proceeding further.
    
    Case: AUTOCOMMIT=OFF.
    
    1) BEGIN
    
    2) Update 'slave_relay_log_info' table. This transaction is
    considered as a multi statement transaction mode, it will
    not commit on its own. It will wait for final COMMIT
    execution.
    
    3) Update 'slave_master_info' also does the same.
    
    4) COMMIT.
    
    COMMIT will invoke 'trans_commit_implicit'.
    
    It will check if there any active transactions which needs
    to be committed . Since there are active transaction
    sessions from step 2-3 'ha_commit_trans' will be called as
    shown below.
    
    'trans_commit_implicit' will invoke
    ha_commit_trans (thd,all=true,ignore_global_read_lock=false)
    
    This will not pass the read_only check and the command will
    fail.
    
    This issue happens for commands that update info tables
    other than 'gtid_executed' table. In case of 'gtid_executed'
    table irrespective of autocommit variable all the
    transactions are considered as 'real' transactions and they
    will do complete commit.
    
    Fix:
    ===
    Introduced a new variable, to flag the sql command under
    execution to ignore the read_only/super_read_only. If the
    variable is set then the command is allowed to execute even
    though read_only/super_read_only is enabled otherwise
    command is blocked.

commit f061ea58707d7351a484ffb6b48e3057bc3e7735
Merge: 131544d 35fbd4f
Author: Harin Vadodaria <harin.vadodaria@oracle.com>
Date:   Thu Aug 24 08:09:46 2017 +0200

    Merge branch 'mysql-5.7' into mysql-trunk

commit 35fbd4fe164c4fb456641a7380490882d337db35
Author: Harin Vadodaria <harin.vadodaria@oracle.com>
Date:   Thu Aug 24 07:41:46 2017 +0200

    Bug#26521654: AUTO GENERATED CERTIFICATES SHOULD USE X509 V3
    
    Description: Certificates generated by mysql server and
                 mysql_ssl_rsa_setup do not use X509v3 and
                 related extensions.
    
    Solution: Added X509v3 extension.

commit 131544d9a779ae1dbb6816338af7400092ba53cc
Author: Bin Su <bin.x.su@oracle.com>
Date:   Mon Aug 21 10:46:33 2017 +0800

    Bug#26629790 - TEST CASES HIGH_PRIO_TRX_* HANG AFTER MAIN.PARTITION_INNODB.
    
    In some ALTER PARTITION scenarios, it could return directly in external_lock.
    However, TrxInInnoDB::end_stmt() was not called. This leads to the previous
    timeout.
    
    Solution is call end_stmt() before return, and also adjust some counter
    related variables here instead of in commit phase.
    
    This patch also reverts previous workaround.
    
    RB:17154
    Reviewed-by: Jimmy Yang <jimmy.yang@oracle.com>

commit b71c421b24f86fa85b598ec2c3539dad87c5c010
Author: Pedro Gomes <pedro.gomes@oracle.com>
Date:   Wed Aug 23 23:21:39 2017 +0200

    Bug#25475132 GROUP REPLICATION: MYSQL CLIENT CONNECTIONS HANG DURING GROUP REPLICATION START
    Bug#26037344 THE DELAYED PLUGIN INITIALIZATION THREAD IS LEFT RUNNING WHEN IT IS NOT NEEDED
    
    Post fix.
    Extra comma that was not added to the commit in the merge.

commit 1799269f65756732a3aa3298257af6a3f264440f
Merge: 6ff897c 18ac73f
Author: Pedro Gomes <pedro.gomes@oracle.com>
Date:   Wed Aug 23 23:03:43 2017 +0200

    Bug#25475132 GROUP REPLICATION: MYSQL CLIENT CONNECTIONS HANG DURING GROUP REPLICATION START
    Bug#26037344 THE DELAYED PLUGIN INITIALIZATION THREAD IS LEFT RUNNING WHEN IT IS NOT NEEDED
    
    Merge branch 'mysql-5.7' into mysql-trunk

commit 18ac73fb2f82908a184f96d522ada6c33cde320f
Author: Pedro Gomes <pedro.gomes@oracle.com>
Date:   Wed Aug 23 22:42:22 2017 +0200

    Bug#25475132 GROUP REPLICATION: MYSQL CLIENT CONNECTIONS HANG DURING GROUP REPLICATION START
    Bug#26037344 THE DELAYED PLUGIN INITIALIZATION THREAD IS LEFT RUNNING WHEN IT IS NOT NEEDED
    
    Client complaints existed about how group replication would make
    connections hang on server start if the plugin was also
    starting. i.e., joining the group.
    To solve this we reworked the delayed initialization mechanism used on
    server starts, so it only blocks connections until the server is in
    read mode, not waiting for the member to join the group as before.
    This rework also solves the issue of the thread responsible for this
    task being initialized and running even when not needed.

commit 6ff897c583e5bc9d10cd52fa6b507bd08c42095f
Author: Ivo Roylev <ivo.roylev@oracle.com>
Date:   Wed Aug 23 20:08:41 2017 +0300

    Bug#26544582: keyring_okv tests should be skipped when not using OpenSSL
    
    Add a guard when mysql is compiled with yaSSL

commit b06cd6dc57f25a8329650d20ce85f49ba6061e70
Author: Gopal Shankar <gopal.shankar@oracle.com>
Date:   Wed Aug 23 12:51:37 2017 +0200

    WL#9814 Implement INFORMATION_SCHEMA system views for FILES/PARTITIONS
    
    There is multiple use of class name
    dd::Info_schema::MDL_deadlock_error_handler in two translation
    units (table_stats.cc and tablespace_stats.cc). This is not
    caught by usual compilation options and even by pb2 builds. The
    problem was seen with the linker option -flto. This patch
    combines both of implementation into class
    Info_schema_error_handler and moved to translation unit
    error_handler.cc.

commit b0ae5f77a1b03449f73815be5926aff081eb9133
Author: Bin Su <bin.x.su@oracle.com>
Date:   Wed Aug 23 21:52:12 2017 +0800

    BUG#26672689 - INNODB: ASSERTION FAILURE: DICT0UPGRADE.CC:573:AUTO_INC_VALUE != (18446744073709
    
    During upgrade, The max autoinc of partitioned tables were not set properly
    because all of them were compared with a max value, then none of them were
    picked.
    
    So the fix is comparing to a base value 0.
    
    Approved by Satya Bodapati <satya.bodapati@oracle.com>

commit 2af7d2eabbab1bfb2d990cc892f3471bb31c2618
Author: Erik Froseth <erik.froseth@oracle.com>
Date:   Wed Aug 23 09:02:56 2017 +0200

    Bug#26330090 HISTOGRAM STATISTICS HAVE MISNAMED CHARSET-ID KEY
    
    The JSON representation of histogram statistics used the name
    "charset-id", when it actually was referring to collation IDs.
    Change the name of this key to be "collation-id".
    
    Change-Id: I3383341195ac66c853aafe88cad7b48365cb9b78

commit aae67376992d2cfa555eed07781e920a6247337c
Author: Pavan Naik <pavan.naik@oracle.com>
Date:   Wed Aug 23 18:46:25 2017 +0530

    BUG#25215561: COULD NOT GET A UNIQUE BUILD THREAD ID
    
    Description:
    ------------
    Build thread concept in MTR is used to reserve ports for each worker
    process. Each worker process is associated with a unique build thread
    value and each build thread value is used reserve 10 ports.
    
    A user running a MTR will own these unique files created to reserve a
    build thread value. At end of the run, MTR will release lock on these
    files by closing them. But since these files are not cleaned up, they
    might cause permission issue if some other user tries to run MTR on
    same the machine. For example,
    
    Administrator runs:
    perl mysql-test-run.pl --vardir=R:/var --parallel=64
    
    This will create 64 unqiue files under 'mysql-unique-ids' directory.
    
    Then a regular user tries to run mtr:
    perl mysql-test-run.pl main.1st
    ...
    ...
    =====================================================================
    
    TEST RESULT TIME (ms) or COMMENT
    
    worker[1] mysql-test-run: *** ERROR: Could not get a unique build thread id
    
    Fix:
    ----
    Cleanup the unique files created to reserve ports at the end of the
    MTR test run.
    
    Reviewed-by: Deepa Dixit <deepa.dixit@oracle.com>
    Reviewed-by: Srikanth B R <srikanth.b.r@oracle.com>
    RB: 17181

commit fc10d034a5040296b2c0264392a4e863a94c37ab
Author: Steinar H. Gunderson <steinar.gunderson@oracle.com>
Date:   Thu Aug 10 13:59:39 2017 +0200

    Bug #26612067: REMOVE UNUSED CODE FROM BINARIES
    
    Enable removal of unused function (--gc-sections) and identical code folding
    (ICF); we only do this with the gold linker for now, since that's used on
    all relevant Linux platforms.
    
    This removes approximately 2 MB of code from the .text segment, of which
    about 600 kB comes from --gc-sections and the rest from ICF. Enabling full
    ICF (which potentially can break some odd coding patterns) would help
    approximately 100 kB more, which probably isn't worth it.
    
    Change-Id: I1956e330d97dd976b867eed478a2a280ab403260

commit 7991afb5761dbc9721987b75d1951e47de4c0cd5
Author: Norvald H. Ryeng <norvald.ryeng@oracle.com>
Date:   Wed Aug 23 13:01:04 2017 +0200

    Bug #26135876 CONDITIONAL JUMP OR MOVE DEPENDS ON UNINITIALISED VALUE(S)
    Bug #26336467 ASAN FAILURE IN UNIT TEST RELOPSTEST/1.CODECOVERAGE
    
    Bug#26336467 is a duplicate of bug #26135876, which has already been
    fixed. No extra fix is necessary, except removing #ifndef HAVE_ASAN
    around function calls that triggered ASAN failures.
    
    Change-Id: Icfdcfcbd62d6c37d8d7d2d907dcd7ed2dadfe8b7

commit b63de2b313c48d92b23b879e01c752e29a4185b9
Merge: e035dc5 c8948c4
Author: Pekka Nousiainen <pekka.nousiainen@oracle.com>
Date:   Wed Aug 23 12:18:07 2017 +0300

    Merge branch 'wl7614-7.6' into wl7614-mtc

commit c8948c495962ef6b03a97f550d1b9c7a5d0b1ff3
Author: Pekka Nousiainen <pekka.nousiainen@oracle.com>
Date:   Wed Aug 23 12:15:44 2017 +0300

    wl#7614 optim06.diff
    
    batched row transfers for ops

commit d30a55089044167e160acf7a1e0f4891da926d6a
Author: Pekka Nousiainen <pekka.nousiainen@oracle.com>
Date:   Wed Aug 23 12:15:25 2017 +0300

    wl#7614 optim05.diff
    
    batched row transfers

commit ecbb167afa4d4147bf02b1be074c8119b8ec2bbd
Author: Bharathy Satish <bharathy.x.satish@oracle.com>
Date:   Wed Aug 23 11:11:22 2017 +0200

    Bug #26259671: EVEN AFTER SET PERSIST, ENFORCE_UPDATE_EVERYWHERE_CHECKS
                   FAILS DUE TO SPE=ON
    
    Problem: When variables are persisted, variable-value pairs are written to
    config file in sorted order. This can cause problems when we have 2 or more
    variables whose values depend on each other.
    ex: group_replication_enforce_update_everywhere_checks,
    group_replication_single_primary_mode. Here it is not possible to enable
    enforce_update_everywhere_checks while single_primary_mode is enabled. Thus
    setting these variables must be in following order:
    
    SET PERSIST group_replication_single_primary_mode = OFF;
    SET PERSIST group_replication_enforce_update_everywhere_checks= ON;
    
    When the above variables are persisted the order in which the variables are
    written to config file changes, thus causing the server unable to start the
    plugin during server restart.
    
    Fix: This patch will save all persisted variables in mysqld-auto.cnf file
    in the same order in which they are set.

commit d4102dd7fc547bdf9dc5006d5a5211812bd83ecf
Author: Pekka Nousiainen <pekka.nousiainen@oracle.com>
Date:   Wed Aug 23 12:12:09 2017 +0300

    wl#7614 optim04.diff
    
    batched row alloc and free

commit 78bd02839d1de9c71bb7d48ceb89252638c82d0f
Author: Pekka Nousiainen <pekka.nousiainen@oracle.com>
Date:   Wed Aug 23 12:11:38 2017 +0300

    wl#7614 optim03.diff
    
    global stats, lock stats

commit 30062ab6ccc5ba328d309b79f790113c64ae2d8b
Author: Pekka Nousiainen <pekka.nousiainen@oracle.com>
Date:   Wed Aug 23 12:11:19 2017 +0300

    wl#7614 optim02.diff
    
    rename some confusing variables

commit df249360fe37b3a5e6700e6f5af07f5ec0e9f798
Author: Pekka Nousiainen <pekka.nousiainen@oracle.com>
Date:   Wed Aug 23 12:10:56 2017 +0300

    wl#7614 optim01.diff
    
    save performance related options

commit 4b8e82c65d6682627668fc9abb08ef6e5474db53
Author: Steinar H. Gunderson <steinar.gunderson@oracle.com>
Date:   Wed Aug 23 10:53:12 2017 +0200

    Bug #26597243: AMBIGUOUS INCLUDE PATHS
    
    Post-push fix: Fix some GCS headers that were not compiled in a default build.
    
    Change-Id: Ib8fc4cfba8115669baa48f231c9f8eec1d42b2c6

commit 78bf919625710a4de1dc641c2ff43f6ae00f613e
Author: Havard Dybvik <havard.dybvik@oracle.com>
Date:   Wed Jul 19 13:31:37 2017 +0200

    Bug#25832861: TABLE_SHARE->TMP_TABLE != NO_TMP_TABLE || M_LOCK_TYPE == 1' AT HANDLER::HA_UPDAT
    
    Note to reviewer: Simply implemented proposed changes from first review round.
    
    When a view or a derived table was marked as read only, only the views
    and tables referenced directly in that expression was also marked as
    read only. This failed to mark all associated tables of that view or
    derived tables if there were nested references.
    
    Marking a view or derived table as read only will now also mark all leaf
    tables as read only. If a table to be updated is found to be
    non-updatable but was referenced through a view or derived table, the
    alias of the upper-most view is now printed in the error message.

commit 76aefba30593c5abfb0ca04e2e329b7b6c6dac44
Author: Erlend Dahl <erlend.dahl@oracle.com>
Date:   Wed Aug 23 07:12:19 2017 +0200

    Bug#26660267 RESULTS OF SOME INNODB/UPGRADE TESTS DEPEND ON THE SERVER VERSION NUMBER
    
    Follow-up fix to innodb.sdi_delete_marked_result
    
    Approved by Satya Bodapati <satya.bodapati@oracle.com> over IM.

commit 819881f882969bb83cd07aaee6ca7d9b29b61212
Merge: 5ad8e05 3a3288c
Author: Anushree Prakash B <anushree.prakash.b@oracle.com>
Date:   Wed Aug 23 14:07:55 2017 +0530

    Merge branch 'mysql-5.7' into mysql-trunk

commit 3a3288c9d35b6294c13672bd66187ffae1654e86
Merge: 3f45fd3 801b070
Author: Anushree Prakash B <anushree.prakash.b@oracle.com>
Date:   Wed Aug 23 14:02:00 2017 +0530

    Merge branch 'mysql-5.6' into mysql-5.7

commit 801b0707e21d9e6033b7698abd3ad3a6ee8d89e0
Author: Anushree Prakash B <anushree.prakash.b@oracle.com>
Date:   Wed Aug 23 13:58:51 2017 +0530

    Bug#25510805 - MYSQL CRASHES WHEN TRYING TO CONNECT FROM
                   A HOST WITH AHOSTNAME OF 69 CHARACTERS
    
    DESCRIPTION:
    ===========
    When a connection is made from a host with a hostname
    length of more than HOSTNAME_LENGTH characters,
    MySQL crashes with a buffer overflow.
    
    ANALYSIS:
    ========
    If the hostname of the connecting host is greater than
    HOSTNAME_LENGTH (60 chars), copying the hostname to the
    performance schema table field which is limited to
    HOSTNAME_LENGTH characters results in a crash.
    
    FIX:
    ===
    The fix is to truncate the hostname to HOSTNAME_LENGTH
    number of characters before adding them to the performance
    schema tables which record host information and details.
    This makes sure that the client connection is established
    successfully.

commit 5ad8e050e66e889d90e4163290834e67392287d8
Merge: 702564f 3f45fd3
Author: Nisha Gopalakrishnan <nisha.gopalakrishnan@oracle.com>
Date:   Wed Aug 23 13:07:08 2017 +0530

    Merge branch 'mysql-5.7' into mysql-trunk

commit 3f45fd33654925fde447baa40afeacb3f10a3315
Merge: 2947333 c8b79b1
Author: Nisha Gopalakrishnan <nisha.gopalakrishnan@oracle.com>
Date:   Wed Aug 23 13:04:52 2017 +0530

    Merge branch 'mysql-5.6' into mysql-5.7

commit c8b79b122008e17ce3d0710a0c6a9ee04ceebbb1
Merge: ca782a5 331fb96
Author: Nisha Gopalakrishnan <nisha.gopalakrishnan@oracle.com>
Date:   Wed Aug 23 13:02:23 2017 +0530

    Merge branch 'mysql-5.5' into mysql-5.6

commit 331fb96afc1af52a44c0d218feb2f9f7e1a1b9a7
Author: Nisha Gopalakrishnan <nisha.gopalakrishnan@oracle.com>
Date:   Wed Aug 16 13:58:25 2017 +0530

    Bug#26390632: CREATE TABLE CAN CAUSE MYSQL TO EXIT.
    
    Analysis
    ========
    CREATE TABLE of InnoDB table with a partition name
    which exceeds the path limit can cause the server
    to exit.
    
    During the preparation of the partition name,
    there was no check to identify whether the complete
    path name for partition exceeds the max supported
    path length, causing the server to exit during
    subsequent processing.
    
    Fix
    ===
    During the preparation of partition name, check and report
    an error if the partition path name exceeds the maximum path
    name limit.
    
    This is a 5.5 patch.

commit 702564fb3bc7314e69b60c2f58a603726bf8d000
Merge: 7e0f351 2947333
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Wed Aug 23 09:28:18 2017 +0200

    Null-merge from 5.7.

commit 2947333bff9c9cf128f64f63ad9df2de906757aa
Merge: 22f0a42 ca782a5
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Wed Aug 23 09:27:40 2017 +0200

    Null-merge from 5.6.

commit ca782a59ef6d56e3ee555005fd9cd71d6195f313
Merge: 01a355e be9b6bc
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Wed Aug 23 09:26:41 2017 +0200

    Merge branch 'mysql-5.5' into mysql-5.6

commit 7e0f3510a730a2f3b186b6a6e59de03ba5e1f15c
Author: Jaideep Karande <jaideep.karande@oracle.com>
Date:   Wed Aug 23 08:33:08 2017 +0200

    Bug#26376145: GR_NOTIFICATIONS_QUORUM FAILS SPORADICALLY IN PB
    
    Problem:
    There is a race condition between INSERT(via code) and TRUNCATE(via client).
    We first change state to "UNREACHABLE" and then "INSERT state change to table
    gms_listener_example". If state is UNREACHABLE we TRUNCATE table in test case.
    
    Issue, since TRUNCATE and INSERT are done post state change to UNREACHABLE,
    TRUNCATE and INSERT race each other. Expected sequence INSERT -> TRUNCATE.
    TRUNCATE->INSERT leaves dangling record.
    
    Issue was verified by adding sleep between STATE_CHANGE and INSERT operation
    (this makes TRUNCATE to always execute first), test GR_NOTIFICATIONS_QUORUM
    always fail.
    
    Resolution:
    Post change we will first INSERT state change in table gms_listener_example and
    then set state to UNREACHABLE.

commit be9b6bc9f9fa758b39eb914732996e68633e8b9c
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Tue Aug 15 13:15:19 2017 +0200

    Bug#19875294 ASSERTION `SRC' FAILED IN MY_STRNXFRM_UNICODE (SIG 6 -STRINGS/CTYPE-UTF8.C:5151)
    
    Backport from 5.7 to 5.5 Field_set::val_str()
    should return String("", 0, cs) rather than String(NULL, 0, cs)

commit 8c888c194ba1d168bbac388e94858de2136571eb
Author: Neha Kumari <neha.n.kumari@oracle.com>
Date:   Tue Aug 22 16:00:30 2017 +0530

    BUG#24590891: RESTARTING A SLAVE AFTER SEEDING IT WITH A MYSQLDUMP LOSES ITS POSITION
    
    Post-push fix:
    This test was disabled becuase the mysqlpump part of the test was failing.
    Only the mysqldump part is enabled for the time being, once Bug#26116415 is
    fixed testing for mysqlpump should also be enabled.

commit 1a9eeb97432ec6ea2847f580c3ce3acc13eace0f
Merge: 4db97f7 22f0a42
Author: Venkatesh Duggirala <venkatesh.duggirala@oracle.com>
Date:   Wed Aug 23 09:19:20 2017 +0530

    Merge branch 'mysql-5.7' into mysql-trunk

commit 22f0a42941ba2fa67ca0a6a6e1b43acc1a63d9d8
Merge: 93050cf 01a355e
Author: Venkatesh Duggirala <venkatesh.duggirala@oracle.com>
Date:   Wed Aug 23 09:18:53 2017 +0530

    Merge branch 'mysql-5.6' into mysql-5.7

commit 01a355e5f0c5dd07d89b1f6ec6a15e52192ea176
Merge: f3d8bdc 5a88c15
Author: Venkatesh Duggirala <venkatesh.duggirala@oracle.com>
Date:   Wed Aug 23 09:17:38 2017 +0530

    Merge branch 'mysql-5.5' into mysql-5.6

commit 5a88c153df08d73674197b5cff78dbfcb9c13030
Author: Venkatesh Duggirala <venkatesh.duggirala@oracle.com>
Date:   Wed Aug 23 09:16:12 2017 +0530

    Bug#24763131 LOCAL-INFILE DEFAULT SHOULD BE DISABLED
    
    Problem & Analysis: Slave's Receiver thread, Applier thread and worker
        threads are created with LOCAL-INFILE option enabled. As the document
        says https://dev.mysql.com/doc/refman/5.7/en/load-data-local.html,
        there are some issues if a thread enables local infile.
        This flag should be enabled with care. But for the above mentioned
        internal threads, server is enabling it at the time of creation.
    
    Fix: Further analysis on the code shows that none of threads really
        need this flag to be enabled at any time as Slave never executes
        "LOAD DATA LOCAL INFILE" after reading it from Relay log.
        Applier thread removes "LOCAL" before start executing the query.

commit 4db97f7a1f54a5afe740ce5aa87dd99460317466
Author: Satya Bodapati <satya.bodapati@oracle.com>
Date:   Tue Aug 22 20:45:16 2017 +0200

    Bug#26660267 RESULTS OF SOME INNODB/UPGRADE TESTS DEPEND ON THE SERVER VERSION NUMBER
    
    Mask mysql_version_id using regex

commit 1cacefbd224c2f59b4470ff979014a5e324d5a12
Author: Georgi Kodinov <georgi.kodinov@oracle.com>
Date:   Tue Aug 22 19:03:34 2017 +0300

    Doxygenizing the protocol: the connection phase packets (partial)

commit e035dc5e9128e9983868dfa0c7de6fcbbecb3499
Merge: ce35d17 afa59da
Author: Frazer Clement <frazer.clement@oracle.com>
Date:   Tue Aug 22 16:57:29 2017 +0100

    Merge ../mysql-5.7-cluster-7.6 into mysql-trunk-cluster

commit afa59da07db251411f37324eae8c3fbecf86d0e5
Merge: 08bd7b0 88f4225
Author: Frazer Clement <frazer.clement@oracle.com>
Date:   Tue Aug 22 16:47:50 2017 +0100

    Merge ../mysql-5.7-cluster-7.5 into mysql-5.7-cluster-7.6

commit 88f4225e08131b423d53720e10022ead8a3adce2
Merge: 0e3e08a 176cf81
Author: Frazer Clement <frazer.clement@oracle.com>
Date:   Tue Aug 22 16:46:17 2017 +0100

    Merge ../mysql-5.6-cluster-7.4 into mysql-5.7-cluster-7.5

commit 176cf81f50eb042239d3da52643e38a6eebaeefd
Merge: a8b3554 1cb701a
Author: Frazer Clement <frazer.clement@oracle.com>
Date:   Tue Aug 22 16:44:54 2017 +0100

    Merge ../mysql-5.6-cluster-7.3 into mysql-5.6-cluster-7.4

commit 1cb701ab459799882a674616e2e627d16b519cea
Author: Frazer Clement <frazer.clement@oracle.com>
Date:   Tue Aug 22 16:35:00 2017 +0100

    Bug #26661468 	NDB : NO MECHANISM TO STALL LCP FOR TESTING
    
    Add dump code 7027 91919191 for stalling LCP start for
    test scenarios.

commit 08eb1011609449e53ffdd3802be9d0e25516454f
Author: Vitor Oliveira <vitor.s.p.oliveira@oracle.com>
Date:   Tue Aug 22 16:21:24 2017 +0200

    BUG#26537497: GROUP REPLICATION: FLOW CONTROL MESSAGE ALWAYS SENT EVEN WHEN DISABLED
    
    WL#9838 featured the ability to have some members in a Group Replication
    group that would not affect the minimum throughput of the flow-control
    mechanism, effectively ignoring those members in case they would be blocked.
    
    With the addition of WL#10380, WL#9838 no longer properly ignores those
    members, because of the way that feature was implemented - flow-control
    messages now need to be sent even when flow-control is disabled. This bug
    fix corrects the behaviour to be as specified in the WL.

commit 05403171cd8e67c932aba0a92048659f1141d9ed
Author: Erik Froseth <erik.froseth@oracle.com>
Date:   Tue Aug 22 12:12:55 2017 +0200

    WL#9223
    
    Post-push fix: The test perfschema.threads_history gave a different
    result in release and debug builds. The root cause for this was that
    the default size for performance_schema_events_waits_history_long_size
    is 10000. The server creates a different number of events_waits markers in
    release and debug, and in debug it exceeds 10000 for the table
    events_waits_history_long. The result is that the performance schema
    table starts to eat up itself, since it is implemented as a ring buffer.
    This would give a different result in the test file for release and debug
    builds.
    
    The fix is to increase the size of the variable
    performance_schema_events_waits_history_long_size to ensure that the
    performance schema table doesn't start to eat up itself.
    
    Change-Id: I354bc1ae48630639c947d85a5fdf3e65c4d878ed

commit 6ffe6299d7c33812f5f07f9b552a1ae67ccbce32
Author: Steinar H. Gunderson <steinar.gunderson@oracle.com>
Date:   Thu Aug 17 11:03:49 2017 +0200

    Bug #26597243: AMBIGUOUS INCLUDE PATHS [final]
    
    Remove now redundant INCLUDE_DIRECTORIES directives from various CMakeLists.txt
    files, giving us mostly consistent include paths everywhere. There are still
    some exception (like mysqlgcs and InnoDB), but they can stay for the time being;
    the bulk of the work is done.
    
    Change-Id: Ibe93a84a2024e5663110e34c199f7f510af2e183

commit 01284ea7e71f8f1312e17fdb848c8e469a44a9b2
Author: Steinar H. Gunderson <steinar.gunderson@oracle.com>
Date:   Wed Aug 16 16:57:11 2017 +0200

    Bug #26597243: AMBIGUOUS INCLUDE PATHS [noclose, cleanups]
    
    Fix some final wrong includes. After this, only NDB and InnoDB are not
    fully canonicalized.
    
    Change-Id: I8e9ba8f9ab8a2f6d0900a19eb99438add8d5ec7d

commit e0af08c721a87d84037a63a0bdc92e145809a642
Author: Steinar H. Gunderson <steinar.gunderson@oracle.com>
Date:   Wed Aug 16 16:07:49 2017 +0200

    Bug #26597243: AMBIGUOUS INCLUDE PATHS [noclose, plugins]
    
    Canonicalize all paths leading into plugin/, then resort #include statements in
    the affected files. Finally take plugin/ paths largely out of the include path.
    
    Since rapid/ is supposedly going away soon, add paths without the rapid/ prefix,
    and add it as a global #include. This will ease the transition.
    
    Change-Id: I64a28e2c73d43358f40079103c8e1f2889423043

commit ad9b2c43a2be75ad2fc87ae1560400ceede53e86
Author: Steinar H. Gunderson <steinar.gunderson@oracle.com>
Date:   Wed Aug 16 15:47:23 2017 +0200

    Bug #26597243: AMBIGUOUS INCLUDE PATHS [noclose, storage]
    
    Canonicalize all paths leading into storage/ (except ndb and InnoDB), then
    resort #include statements in the affected files. Finally take storage/
    paths, including PFS, out of the include path.
    
    Change-Id: I071254ed1985eacb4736734d213fb84ebe40dda8

commit 63017aa11edf809cd176671c06321fc8664505c6
Author: Steinar H. Gunderson <steinar.gunderson@oracle.com>
Date:   Wed Aug 16 14:54:26 2017 +0200

    Bug #26597243: AMBIGUOUS INCLUDE PATHS [noclose, regex]
    
    Canonicalize all paths leading into extra/regex/, then resort #include
    statements in the affected files. Finally take extra/regex out of the include
    path.
    
    Change-Id: Iec2ab1f3763ea184a14e50317f229932fc5127e7

commit 4e992855d0b9e9c8e6a4c06328a741eb73176c91
Author: Steinar H. Gunderson <steinar.gunderson@oracle.com>
Date:   Wed Aug 16 14:43:44 2017 +0200

    Bug #26597243: AMBIGUOUS INCLUDE PATHS [noclose, RapidJSON]
    
    Make RapidJSON includes into top-level system includes, make them
    consistently included with angle brackets everywhere, and add a TODO
    that we should support -DWITH_RAPIDJSON=system.
    
    Change-Id: Ia43501a944f5dedc006ed0b492e5d6d1ffd57b08

commit d5ae468158ff9e8a2d2da02cdfb3d5756b286de5
Author: Steinar H. Gunderson <steinar.gunderson@oracle.com>
Date:   Wed Aug 16 14:24:12 2017 +0200

    Bug #26597243: AMBIGUOUS INCLUDE PATHS [noclose, SSL]
    
    Canonicalize all paths leading into OpenSSL/YaSSL, then resort #include
    statements in the affected files. Finally take SSL includes out of the include path.
    
    Change-Id: I1e349bbd07495a7af5b1c79a9d33faff1a34b78a

commit ae9ceaa801a0291b93482331548dc7e49c7293e6
Author: Steinar H. Gunderson <steinar.gunderson@oracle.com>
Date:   Wed Aug 16 12:22:33 2017 +0200

    Bug #26597243: AMBIGUOUS INCLUDE PATHS [noclose, include]
    
    Add include/ to the top-level includes, and fix a few #include paths
    related to files directly in include/.
    
    Change-Id: I6f06c3b4264915c20f8e317facc5c5d7ffb1cfd6

commit 2349af1824f0bc2b50c78dbdb7eedb514e31625c
Author: Steinar H. Gunderson <steinar.gunderson@oracle.com>
Date:   Wed Aug 16 11:14:43 2017 +0200

    Bug #26597243: AMBIGUOUS INCLUDE PATHS [noclose, editline]
    
    Move editline into a top-level system include.
    
    Change-Id: I78e219f2612ca17274ce4374a680503b0df12382

commit 3bc4c713c078c90014001587e5e10746e3693960
Author: Steinar H. Gunderson <steinar.gunderson@oracle.com>
Date:   Wed Aug 16 10:49:09 2017 +0200

    Bug #26597243: AMBIGUOUS INCLUDE PATHS [noclose, scripts + vio]
    
    Canonicalize all paths leading into scripts/ and vio/, then resort #include
    statements in the affected files. Finally take both out of the include path.
    
    Change-Id: I0ee87ab886a0263661d6185b986a88452660971f

commit dfe82acf47aaa5cefd5d975f55776755587750c1
Author: Steinar H. Gunderson <steinar.gunderson@oracle.com>
Date:   Tue Aug 15 17:13:09 2017 +0200

    Bug #26597243: AMBIGUOUS INCLUDE PATHS [noclose, unittest]
    
    Canonicalize all paths leading into unittest/, then resort #include
    statements in the affected files. Finally take unittest/ out of the include path.
    
    Change-Id: I7fc90669bbea8c5415751fac929100faf6c11776

commit 8049957dc130600a8f2007a939a4ab93440132dd
Author: Steinar H. Gunderson <steinar.gunderson@oracle.com>
Date:   Tue Aug 15 16:28:08 2017 +0200

    Bug #26597243: AMBIGUOUS INCLUDE PATHS [noclose, mysys]
    
    Canonicalize all paths leading into mysys/ and mysys_ssl/, then resort #include
    statements in the affected files. Finally take them out of the include path.
    
    Change-Id: I79dc8294388328de0e1580db745e74d00b4f7d84

commit daa7074d14ba4124422257f42019985b32a17e05
Author: Steinar H. Gunderson <steinar.gunderson@oracle.com>
Date:   Tue Aug 15 16:09:05 2017 +0200

    Bug #26597243: AMBIGUOUS INCLUDE PATHS [noclose, sql/]
    
    Clean up more #includes from sql/ that were either missed or deliberately
    left out in the last pass.
    
    Change-Id: Ic097ce50a3c0c4ee87d5792502a132ee3d83df99

commit 6e445b35f9c581c6fe4fc980e1b1a77874f50fee
Author: Steinar H. Gunderson <steinar.gunderson@oracle.com>
Date:   Tue Aug 15 15:59:36 2017 +0200

    Bug #26597243: AMBIGUOUS INCLUDE PATHS [noclose, strings/]
    
    Canonicalize all paths leading into strings/, then resort #include statements
    in the affected files. Finally take strings/ out of the include path.
    
    Change-Id: I75e5307d27c77755e8c90f91261a6ae48a61e63b

commit 0dc8fc53ce2f7aea1810f21afd1048ce1f996a3f
Author: Steinar H. Gunderson <steinar.gunderson@oracle.com>
Date:   Tue Aug 15 15:53:36 2017 +0200

    Bug #26597243: AMBIGUOUS INCLUDE PATHS [noclose, my_config.h]
    
    Clean up all #includes of my_config.h so that they use quotes
    instead of angle brackets. Then resort headers in all affected files.
    
    Change-Id: Ia4e75918714d7c1e4cf7e0967f168abe1c48f3b6

commit 34ed287b2a51acaf36f2d0c654498d7547831a8b
Author: Steinar H. Gunderson <steinar.gunderson@oracle.com>
Date:   Tue Aug 15 14:28:44 2017 +0200

    Bug #26597243: AMBIGUOUS INCLUDE PATHS [noclose, angle brackets]
    
    Clean up all #includes of files from include/ so that they use quotes
    instead of angle brackets, with the notable exception of include/mysql/,
    since some of those are used from client headers (where they are reasonably
    system headers). Then resort headers in all affected files.
    
    As before, InnoDB is left alone.
    
    Change-Id: Ibd1874aed443c34899553d7c895c8484eca171af

commit ddccfc9014256ecc1b257e9806f1420e2b6c2067
Author: Steinar H. Gunderson <steinar.gunderson@oracle.com>
Date:   Tue Aug 15 14:23:55 2017 +0200

    Bug #26597243: AMBIGUOUS INCLUDE PATHS [noclose, lz4]
    
    Canonicalize all paths leading into LZ4 so that they are system
    includs, then resort #include statements in the affected files.
    Also clean up CMake inclusions of LZ4 so that there's only one,
    and that it's a system include.
    
    Change-Id: Id2e9d340c84570a2360700767a7a37ee78ba23f4

commit aed3562470748ff7ad49d0e008d32b6fb9c55ae3
Merge: 1665bd3 93050cf
Author: Sreeharsha Ramanavarapu <sreeharsha.ramanavarapu@oracle.com>
Date:   Tue Aug 22 14:09:32 2017 +0530

    Merge branch 'mysql-5.7' into mysql-trunk

commit 93050cf6f6c18205b81f4be9803c8e37e0400540
Author: Sreeharsha Ramanavarapu <sreeharsha.ramanavarapu@oracle.com>
Date:   Tue Aug 22 14:08:10 2017 +0530

    Bug #26432173: INCORRECT SUBQUERY OPTIMIZATION WITH
                   LEFT JOIN(SUBQUERY) AND ORDER BY
    
    Post-push fix for main.derived:
    Windows prefers derived table names in lowercase.

commit 1665bd3a3f123993f93c7d8e3e95ca2ce54c9f2f
Author: Georgi Kodinov <georgi.kodinov@oracle.com>
Date:   Mon Aug 21 12:06:40 2017 +0300

    Addendum to fixing bug #26173244:
    Fix for a failing test udf_skip_grants
    Rased the flag for UDF initialiation at the right time to indicate
    if SQL UDF definition/removal is allowed.
    The flag is no longer used to indicate if the global structures
    are allocated or not (as they are always allocated).

commit 48063635f3084281fdd922226cb8198ac2fe5645
Author: Tomasz Stepniak <tomasz.s.stepniak@oracle.com>
Date:   Tue Aug 22 08:34:11 2017 +0200

    BUG #26638422: FRACTIONAL TIME VALUE INCORRECT
    
    Microseconds part of Time and DateTime was not correctly displayed.
    Added missing preceding '0' in the fractional part of time representation.
    
    RB: 17140
    Reviewed by: Grzegorz Szwarc <grzegorz.szwarc@oracle.com>
    Reviewed by: Lukasz Kotula <lukasz.kotula@oracle.com>

commit d50c94dac1c493a5375ebb3b1df4b03a21ec96fb
Author: Erlend Dahl <erlend.dahl@oracle.com>
Date:   Mon Aug 21 16:30:24 2017 +0200

    WL#9223 Using histogram statistics in the optimizer
    
    Post-push fix for some tests - binlogging is now off by default.
    
    Approved by Erik Froseth <erik.froseth@oracle.com> over IM.

commit ce35d17c8df439eb41deba4bb6bd7e66f2db539a
Author: Magnus Blåudd <magnus.blaudd@oracle.com>
Date:   Tue Aug 22 08:09:41 2017 +0200

    wl#10234, Reintroduce building of SPJ performance measurement tool
    
     - skip building the tool on Windows

commit bf97d7cdc612552f796b3e9206281584101b99e3
Author: Gopal Shankar <gopal.shankar@oracle.com>
Date:   Mon Aug 21 12:59:02 2017 +0200

    Bug#26634507  CREATE_OPTIONS FLD IN INFORMATION_SCHEMA.TABLES NOT FILLING PROPERLY.
    
    The CREATE_OPTIONS field from INFORMATION_SCHEMA.TABLES does not
    show the option 'ENCRYPTION=' provided by CREATE TABLE command.
    This patch enables the same. The column CREATE_OPTIONS of
    INFORMATION_SCHEMA.TABLES now shows 'ENCRYPTION=Y/N' option. A
    test case is added.

commit 79293031aa6df0b56da984571c63b19fb74461fc
Author: Bin Su <bin.x.su@oracle.com>
Date:   Mon Aug 21 22:16:14 2017 +0800

    InnoDB NewDD worklogs(WL#9535 and WL#9536)
    
    Post-push fix: Fix valgrind issues for virtual_debug and innodb_bug19164038.

commit f2a51435c4536c7bf011ec1ae95f9e79cb13da6e
Author: Roy Lyseng <roy.lyseng@oracle.com>
Date:   Mon Aug 21 13:56:33 2017 +0200

    Bug#25817660: Combination of virtual index, foreign key and trigger asserts
    
    The problem is with handler::my_eval_gcolumn_expr_with_open().
    This function is designed to work from purge threads, but here it is
    used in regular execution of foreign key processing.
    From a purge thread it needed to initialize the current LEX before
    evaluating a generated column. But in regular processing, this will
    destroy the current statement context, causing an assert error
    in dispatch_command().
    
    The fix is to remove the calls to lex_start() and lex_end() in
    handler::my_eval_gcolumn_expr_with_open(). This is safe since neither
    of thd->dd_client()->acquire(), open_table_uncached() nor
    my_eval_gcolumn_expr_helper() affect the current LEX object.
    
    Apparently, this is also safe when called from a purge thread.
    Existing tests are unaffected by this change.

commit 0ef910fed1b96298213a0b2d04629bc39b38bcbb
Merge: 37e9d59 9c7ca08
Author: Ole-Hjalmar Kristensen <Ole-Hjalmar.Kristensen@oracle.com>
Date:   Mon Aug 21 14:04:10 2017 +0200

    Merge branch 'mysql-5.7' into mysql-trunk

commit 37e9d594ae91523515e51cca73409137925a23ce
Author: Erlend Dahl <erlend.dahl@oracle.com>
Date:   Mon Aug 21 12:37:38 2017 +0200

    WL#9538 - InnoDB_New_DD: Integrating InnoDB SDI with new DD
    
    Bump version number in .zip files
    
    Approved by Satya Bodapati <satya.bodapati@oracle.com>

commit 9c7ca080014739512ee279f60cd72d9c822eaa78
Author: Ole-Hjalmar Kristensen <Ole-Hjalmar.Kristensen@oracle.com>
Date:   Mon Aug 21 12:28:33 2017 +0200

    Followup fix Bug #25892493 GR XCOM SERVICE SEGFAULTS WHEN MORE THAN 1024 FILE DESCRIPTORS ARE IN USE
    
    The original fix introduced a misplaced call to task_sys_deinit when
    it was merged to 5.7. This fix moves the call to the correct place.

commit 45bb455329c447cde5c707c05899da79382d787b
Author: Georgi Kodinov <georgi.kodinov@oracle.com>
Date:   Mon Aug 21 12:06:40 2017 +0300

    Addendum to fixing bug #26173244: Fix for a failing test udf_skip_grants Rased the flag for UDF initialiation at the right time to indicate if SQL UDF definition/removal is allowed. The flag is no longer used to indicate if the global structures are allocated or not (as they are always allocated).

commit 0eb946abc2cf247b013a752925ee0c0069560dda
Merge: 2848662 75babb1
Author: Venkatesh Duggirala <venkatesh.duggirala@oracle.com>
Date:   Mon Aug 21 14:51:34 2017 +0530

    Null Merge branch 'mysql-5.7' into mysql-trunk

commit 75babb156b79b0e9c7242935ebc90c742f5966f4
Merge: 95a0073 f3d8bdc
Author: Venkatesh Duggirala <venkatesh.duggirala@oracle.com>
Date:   Mon Aug 21 14:50:52 2017 +0530

    Null Merge branch 'mysql-5.6' into mysql-5.7

commit 2848662ea130c44febb7d706f1ddad69273e2d05
Author: Knut Anders Hatlen <knut.hatlen@oracle.com>
Date:   Mon Aug 21 10:39:08 2017 +0200

    WL#9467 - Resource Groups.
    
    Post-push fix for a warning on GCC 7:
    
    enum constant in boolean context [-Werror=int-in-bool-context]

commit c82b158698e3e78a0af8be4b54dbac76f5fa5992
Author: Erik Froseth <erik.froseth@oracle.com>
Date:   Mon Aug 21 10:57:02 2017 +0200

    WL#9223
    
    Post-push fix: Fix an UBSAN warning caused by integer overflow.
    Force the calculation to be done using double arithmetic.
    
    Change-Id: I92937f0f33be4582aec3970f3abdca4ee642754e

commit f3d8bdcac4e8a137549ad6be9434185a9ee71c3f
Author: Venkatesh Duggirala <venkatesh.duggirala@oracle.com>
Date:   Wed Aug 16 13:30:52 2017 +0530

    Bug#22382199	RPL.RPL_DUMP_THREAD_KILL FAILS WHEN RUN WITH --MEM
    
    Problem: RPL.RPL_DUMP_THREAD_KILL is failig frequently in test runs.
    
    Analysis: When this test script is running in combination with other tests,
    it is possible that dump threads from those tests are not killed.
    Every test script has rpl_end.inc but that .inc does not kill dump threads.
    This test script expects that the number of dump threads are zero before
    starting the test.
    
    Fix: Doing cleanup (stopping dump threads) before the actual test starts.

commit 69d89314e749d6995a2bf122055966fa1d2058e1
Author: Pavan Naik <pavan.naik@oracle.com>
Date:   Mon Aug 21 14:11:50 2017 +0530

    BUG#26406981: FLAG MISSING .RESULT FILE AS FAILED TEST
    
    Description:
    ------------
    Currently MTR marks a test case as [pass] when .result file is missing
    for it. A test case without a .result file will always pass since
    there no result file to compare the output and this might cause real
    issues to be hidden.
    
    Fix:
    ----
    - By default(i.e when '--check-testcases' is enabled), a test case not
      having its corresponding .result file is marked as failed by MTR.
    
    - Use '--nocheck-testcases' option to disable the .result file check.
    
    - Removed innodb_undo.noop, innodb_undo.noop_124 and stress.wrapper
      tests.
    
    Reviewed-by: Deepa Dixit <deepa.dixit@oracle.com>
    Reviewed-by: Srikanth B R <srikanth.b.r@oracle.com>
    RB: 16920

commit 86a15f9de64162e863b2ee80e985d29d74e267e4
Author: Marc Alff <marc.alff@oracle.com>
Date:   Mon Aug 21 10:03:08 2017 +0200

    Adjust VERSION in doxygen

commit 3dc700a4a62a2c7b7279e153feb791a73bfe8657
Author: Bjorn Munch <bjorn.munch@oracle.com>
Date:   Mon Aug 21 09:23:07 2017 +0200

    Raise version number after cloning 8.0.3-rc

commit a85b352e22901641f4d05230eb86f009080545a1
Author: Dinesh Surya Prakash <dinesh.prakash@oracle.com>
Date:   Thu Aug 10 14:00:35 2017 +0530

    Bug#26484241 FAILURE OF NDB_BINLOG_LOG_READS TEST ON WINDOWS
    
    Test case redirects the binlog output to a file and use load data infile
    command to dump the file content to a table. So, when it is being
    redirected windows adds carriage return along with line feed and the same
    goes back to the table. In this case the query string to fetch test. t1
    will not work as we have CR at the end.
    
    Hence modified the query string to fetch the row properly.

commit 0e3db95d02821c0440ab250292f871992c1dcd58
Author: Arnab Ray <arnab.r.ray@oracle.com>
Date:   Fri Aug 11 13:45:37 2017 +0530

    WL#8500 Adapt MySQL Cluster to 8.0
    
    - Disable a number of tests under different bugs

commit 286c0efdd69497dad27adcb5ce803e80f08a98a5
Author: Arnab Ray <arnab.r.ray@oracle.com>
Date:   Fri Aug 11 12:09:19 2017 +0530

    WL#8500 Adapt MySQL Cluster to 8.0
    
    - Update result files of the ndb_condition_pushdown and
      ndb_join_pushdown_bka tests to accept new explain output
      and warnings

commit a35c3a995c71dd564b756d026f6f3929d5f3ad5d
Author: Sreeharsha Ramanavarapu <sreeharsha.ramanavarapu@oracle.com>
Date:   Thu Aug 10 06:55:56 2017 +0530

    Merge branch 'mysql-5.7' into mysql-trunk
    
    (cherry picked from commit a624cf4e41726d11ef271388f0c5cc2321ba155d)
