commit 634362420801ae9dc328b332e83082e847efee2d
Author: Aditya A <aditya.a@oracle.com>
Date:   Thu Mar 3 17:02:53 2016 +0530

    Bug# 22865112 LACK OF HTONLL CHECK CAUSE MYSQ5.6.30/5.7.12 BUILD FAILURE ON OS X
    
    PROBLEM
    -------
    
    Build failure in some mac machines due to redefinition of htonll function.
    
    FIX
    ---
    Introduced a check to not redefine htonll if OS provides htonll function.
    
    (cherry picked from commit 4b47067d6e74a5493d0604afed3d852d03092771)

commit bafbd56a682a290ed26b56c6aad6fde8530a214c
Author: Chaithra Gopalareddy <chaithra.gopalareddy@oracle.com>
Date:   Fri Feb 26 15:58:43 2016 +0530

    Bug #18899860: EXPLAIN .. SELECT .. FOR UPDATE TAKES LOCKS
    
    Problem:
    Explain for a statement with "For update" takes locks. Flags to take the lock
    are set while parsing itself for a "SELECT ..FOR UPDATE" statement.
    
    Solution:
    Do not set the flag for explain in parser. We do this by checking the lex->describe
    flag.

commit 0879db6aa7dc4ddd9a4a5f8e2e2f719f616c3b27
Merge: b4622b2 6065dbb
Author: Yashwant Sahu <yashwant.sahu@oracle.com>
Date:   Fri Feb 26 13:18:43 2016 +0530

    Merge branch 'mysql-5.5' into mysql-5.6
    
    Conflicts:
    	extra/yassl/include/yassl_int.hpp
    	extra/yassl/src/cert_wrapper.cpp
    	extra/yassl/src/yassl_int.cpp
    	extra/yassl/taocrypt/include/asn.hpp

commit 6065dbb1f05edef59a52cdad0a7be6b61a1d73b0
Author: Yashwant Sahu <yashwant.sahu@oracle.com>
Date:   Fri Feb 26 11:53:56 2016 +0530

    Bug #22738607:  YASSL FUNCTION X509_NAME_GET_INDEX_BY_NID IS NOT WORKING AS EXPECTED.

commit b4622b2f6e78608453dedd659c940f5445678b89
Author: Chaithra Gopalareddy <chaithra.gopalareddy@oracle.com>
Date:   Fri Feb 26 10:09:30 2016 +0530

    Bug#21178196 : UPDATE MAY USE INDEX MERGE WITHOUT ANY REASON
    	      (INCREASING CHANCES FOR DEADLOCK)
    
    Post push fix for opt_trace.range_ps_prot

commit 5c0f822678263b15601578d728826bd46ad74e30
Merge: e968bd6 3229dd7
Author: Venkatesh Duggirala <venkatesh.duggirala@oracle.com>
Date:   Fri Feb 26 09:02:11 2016 +0530

    Merge branch 'mysql-5.5' into mysql-5.6

commit 3229dd74a55ec75883677d8c70f36a62c9248ec1
Author: Venkatesh Duggirala <venkatesh.duggirala@oracle.com>
Date:   Fri Feb 26 09:01:49 2016 +0530

    BUG#20574550 MAIN.MERGE TEST CASE FAILS IF BINLOG_FORMAT=ROW
    
    The main.merge test case was failing when tested using row based
    binlog format.
    
    While analyzing the issue it was found the following issues:
    
    a) The server is calling binlog related code even when a statement will
       not be binlogged;
    b) The child table list was not present into table structure by the time
       to generate the create table statement;
    c) The tables in the child table list will not be opened yet when
       generating table create info using row based replication;
    d) CREATE TABLE LIKE TEMP_TABLE does not preserve original table storage
       engine when using row based replication;
    
    This patch addressed all above issues.
    
    @ sql/sql_class.h
    
    Added a function to determine if the binary log is disabled to
      the current session. This is related with issue (a) above.
    
    @ sql/sql_table.cc
    
    Added code to skip binary logging related code if the statement
      will not be binlogged. This is related with issue (a) above.
    
    Added code to add the children to the query list of the table that
      will have its CREATE TABLE generated. This is related with issue (b)
      above.
    
    Added code to force the storage engine to be generated into the
      CREATE TABLE. This is related with issue (d) above.
    
    @ storage/myisammrg/ha_myisammrg.cc
    
    Added a test to skip a table getting info about a child table if the
      child table is not opened. This is related to issue (c) above.

commit e968bd673fd047437259e52aca5771959bdb657d
Author: Chaithra Gopalareddy <chaithra.gopalareddy@oracle.com>
Date:   Thu Feb 25 10:21:36 2016 +0530

    Bug#21178196 : UPDATE MAY USE INDEX MERGE WITHOUT ANY REASON
    		  (INCREASING CHANCES FOR DEADLOCK)
    
    Problem:
    Index merge access plan is choosen over range scan when the cost
    for doing range scan would be same/less.
    
    Analysis:
    W.r.t the query presented in the bugpage, index merge access plan
    is choosen because it is covering. However, while calculating the cost
    for doing index merge scan, the current cost model thinks doing a sequential
    scan is more costly than doing a random scan. For the given case,
    while calculating the cost for disk sweep, we calculate cost for
    reading the blocks having the qualifying rows and the cost for skipping
    the other blocks. There is a minimal cost for skipping blocks too. And given
    that in this case, we are looking at one qualifying row and rejecting 1590000
    rows, we would end up skipping a lot of blocks. As a result the total cost
    for doing sequential scan becomes larger than doing a random scan.
    
    This in turn makes optimizer think doing index merge is better than the
    other access plans.
    
    Solution:
    If it is calculated that sequential scan cost is more than random scan cost,
    set the cost to random scan cost.
    
    Also, set is_interrupted to true before calling get_sweep_read_cost
    when the plan is not single table. This will make both single table select
    and single table update choose the same code path. This is in line with
    other calls made to get_sweep_read_cost.
    
    Test case is not added as large amount of data is needed to get a repeatable
    scenario.

commit f95f1915d1944deec7119a1e0f47d3f42fe6026e
Author: Shaohua Wang <shaohua.wang@oracle.com>
Date:   Wed Feb 24 03:20:21 2016 +0100

    Followup: BUG#22516559 MYSQL INSTANCE STALLS WHEN SYNCING FTS INDEX
    
    Fix sync and sync_block test and doxygen build failures on pb2.

commit 6f9b36a685aeda88db991c4a0dcc6b144a11026b
Author: Joao Gramacho <joao.gramacho@oracle.com>
Date:   Wed Feb 10 14:16:44 2016 +0000

    Bug#21616632 RPL.RPL_BUG33931 HAS OCCASIONAL FAILURES ON PB2
    
    Problem and Analysis:
    
    The test case is failing because it forces the two replication threads to
    error out once asked to start, but it is only waiting for the SQL thread to
    stop reporting the error before trying to apply an "RESET SLAVE" statement.
    
    When a not so fast server didn't stopped the I/O thread before the
    "RESET SLAVE" statement be applied, the test case fails as reported.
    
    Fix:
    
    In order to fix the issue, the test case must also wait for the I/O thread to
    be stopped before trying to reset the slave.

commit edf25c80abd7cac129ee1177c882951b9b67d184
Author: Shaohua Wang <shaohua.wang@oracle.com>
Date:   Tue Feb 23 15:13:07 2016 +0800

    Followup: BUG#22516559 MYSQL INSTANCE STALLS WHEN SYNCING FTS INDEX
    
    Fix sync and sync_block test failures on pb2.

commit 2d1a2e8b6e9149725d633a731081c2b744b50d6a
Merge: 3a10d65 316cfd9
Author: Arun Kuruvila <arun.kuruvila@oracle.com>
Date:   Tue Feb 23 12:11:59 2016 +0530

    Merge branch 'mysql-5.5' into mysql-5.6

commit 316cfd9da88bcbe17a24fa2b74500dd30290b3dd
Author: Arun Kuruvila <arun.kuruvila@oracle.com>
Date:   Tue Feb 23 12:10:41 2016 +0530

    Bug#21918190: FEDERATED TABLES CORRUPT TABLE CACHE WHEN
                  CONNECTIONS EXPIRE
    
    Description:- Server crashes with SEGSIGV because of
    accessing invalid memory while executing SELECT, FLUSH TABLE
    and KILL CONNECTION statements on a federated table
    concurrently.
    
    Analysis:- Server gets SEGSIGV in "ha_federated::close()"
    while accessing the members  of "net->vio". This happens
    because of a small timing window existing in
    "cli_safe_read()" where mysql connection is present while
    "net->vio" structure gets freed. The following sequence will
    reproduce the issue:-
    * Connection 1:-
      SELECT * FROM t1;
      It establishes connection to the remote server using
      "CLI_MYSQL_REAL_CONNECT()" which in turn calls
      "cli_safe_read()". In "cli_safe_read()", connection
      receives CR_SERVER_LOST error because of the
      KILL CONNECTION queries executed in parallel from another
      connection.
    * Connection 2:-
      FLUSH TABLE t1;
      Meanwhile, after freeing the vio object as a part of
      "end_server()" in "cli_safe_read()", connection 2 executes
      "FLUSH TABLE t1" which uses mysql connection used by
      connection 1 and gets SEGSIGV in "ha_federated::close()"
      while accessing vio object.
    
    Other than this issue, there exists one more crash which
    is also reproducible with the same repeat steps, but only
    in debug mode. This crash occurs because of the function
    "clear_error()" which is called inside
    "ha_federated::close()". "clear_error()" resets the
    diagnostic area regardless of which query triggers
    "ha_federated::close()". SQLCOM_FLUSH queries expects
    diagnostic area status to be "DA_EMPTY" after closing the
    table. While queries like SQL_COM_SELECT expects
    diagnostic area status to be "DA_OK" in case of success and
    "DA_ERROR" in case of failure after closing the federated
    table.
    
    Fix:- A condition is added to check whether "net->vio"
    structure is present before accessing its members. For
    fixing the other crash, the following fix approach is
    taken:-
    (1)"clear_error()" is called for all queries if the current
       thd and the "table->in_use" thd are different. I.e, error
       from mysql_close() are ignored while closing the table in
       case the the client executing the query was not issued
       against the FEDERATED table.
    (2)"clear_error()" is called for SQLCOM_FLUSH queries if the
       close table request comes from the current thd. Its
       clever to silently ignore errors from mysql_close() while
       closing the federated table on flush table request.

commit 3a10d657b2f77956a510739054b0c714db711260
Merge: f6a2f40 c97d958
Author: Arun Kuruvila <arun.kuruvila@oracle.com>
Date:   Tue Feb 23 11:57:25 2016 +0530

    Merge branch 'mysql-5.5' into mysql-5.6

commit c97d958a5a25f0c04dfe89df8fe4ce77ecd94599
Author: Arun Kuruvila <arun.kuruvila@oracle.com>
Date:   Tue Feb 23 11:54:59 2016 +0530

    Bug #21699037: HANDLE_FATAL_SIGNAL (SIG=11) IN
                   WILD_CASE_COMPARE SQL/SQL_ACL.CC:8744
    
    Description:- Executing GRANT PROXY command after altering
    the user table definition results in a server crash.
    
    Analysis :- Altering mysql user table definition and trying
    to execute GRANT PROXY command results in a server crash due
    to double freeing of ACL structures(acl_users, acl_dbs,
    acl_proxy_users). Even two consecutive FLUSH PRIVILEGES will
    reproduce this issue. Executing FLUSH PRIVILEGES for the
    first time after altering user table will return an error,
    "ERROR 1105 (HY000): Unknown error", while trying to reload
    the ACL structures. Error is caught while trying to check
    the "password_length" inside "acl_load()". At this point of
    execution, only "global_acl_memory" and "acl_users" are
    newly allocated for storing new ACL information. Since
    "acl_load()" fails here, "acl_reload()" tries to revert the
    ACL structures to old ones. "acl_free()" is called to free
    all the newly created ACL structures. But since "acl_load()"
    failed just after allocating "global_acl_memory" and
    "acl_users" structures, its wrong to call "acl_free()"
    blindly which will free all the acl structures. Allocating
    ACL structures before calling "acl_load()" will solve the
    issue.
    
    Fix:- ACL structures are allocated before calling
    "acl_load()". Similar approach has been done in
    mysql-trunk.

commit f6a2f407c6c77bdbd369e97b9b1c0a2a217fc59b
Merge: 88fb695 99210e3
Author: Arun Kuruvila <arun.kuruvila@oracle.com>
Date:   Tue Feb 23 11:43:43 2016 +0530

    Merge branch 'mysql-5.5' into mysql-5.6

commit 99210e3604659020f65185de894384fc204a8419
Author: Arun Kuruvila <arun.kuruvila@oracle.com>
Date:   Tue Feb 23 11:41:03 2016 +0530

    Bug#22176795 : MYSQL SEGFAULTS WHEN PERFORMING FULL TEXT
                   SEARCH IN BOOLEAN MODE
    
    Description:- MySQL crashes when doing full-text search in
    Boolean mode on a MYISAM table.
    
    Analysis:- Buffer overflow is happening while copying the
    newly found key to the ftbw word buffer in
    "_ft2_search_no_lock()"
    (line: storage/myisam/ft_boolean_search.c:462). Memory for
    word buffer is allocated in "ftb_query_add_word()"
    (line: storage/myisam/ft_boolean_search.c:1064) which is
    of size, (word_len * ftb_param->ftb->charset->mbmaxlen +
    HA_FT_WLEN + ftb_param->ftb->info->s->rec_reflength). The
    word buffer format is explained in line:
    storage/myisam/ft_boolean_search.c:341. Because of the
    presence of some special characters in the column used
    for Boolean full text search, size of the buffer to get
    copied becomes larger than the actual memory allocated
    which causes buffer overflow. This lead to the memory
    corruption of the members of 'ftb' structure which in
    turn results in server crash.
    
    Fix:- A check is introduced to confirm that the size of the
    buffer to get copied should be less than or equal to the
    expected size. Also the memory allocated for the the ftbw
    word should be "(word_len + 1) * ... , i.e, the word length
    + the binary operator length which is used with the word.
    "word_len" only gives the length of the word without
    operator.

commit 88fb6951f9f973468778cd75b63f88e517d23f1f
Author: Shaohua Wang <shaohua.wang@oracle.com>
Date:   Tue Feb 23 09:43:44 2016 +0800

    BUG#22516559 MYSQL INSTANCE STALLS WHEN SYNCING FTS INDEX
    
    Problem:
    Fts sync x-lock cach->lock for a long time, but it blocks
    DML on the same table, and it blocks all DML on the server,
    when global binlog_order_commits = 1.
    
    Solution:
    Release cache lock when sync a entry(fts_write_node), and
    move fts sync into fts optimise thread.
    
    Reviewed-by: Jimmy Yang <jimmy.yang@oracle.com>
    RB: 11562

commit 68d7206888a02d4f212f55b2d4e690a111630b87
Author: Aakanksha Verma <aakanksha.verma@oracle.com>
Date:   Mon Feb 22 12:52:06 2016 +0530

    Bug#22685001: MISLEADING MESSAGE ABOUT OPEN FILES LIMIT
    
    Post push to fix innodb_file_limit_check testcase failure on freeBSD machines

commit dd3a88763019b8713837b119e91a6e7e5054daba
Author: Ramil Kalimullin <ramil.kalimullin@oracle.com>
Date:   Fri Feb 19 23:35:38 2016 +0400

    WL#9072:  Backport WL#8785 to 5.5

commit e89d9bf39aaf2437331866e42b28111ec9f8ebec
Merge: f5e6fb4 fbcc66b
Author: Ramil Kalimullin <ramil.kalimullin@oracle.com>
Date:   Fri Feb 19 23:31:56 2016 +0400

    Null merge branch 'mysql-5.5' into mysql-5.6

commit fbcc66b358994792613c08bf4cb8cb64668a0a60
Author: Ramil Kalimullin <ramil.kalimullin@oracle.com>
Date:   Fri Feb 19 23:31:10 2016 +0400

    WL#9072:  Backport WL#8785 to 5.5

commit f5e6fb4d673004d5ecebd41683a3cd2864454106
Author: Aditya A <aditya.a@oracle.com>
Date:   Fri Feb 19 11:05:31 2016 +0530

    Bug #22721993       PB2 FAILURE OF MEMCACHED.MEMC284_MISC
    
        Perl memcached module interface not seeing correct return values.
        To validate if the rows are inserted or not we will use the get
        method.

commit afa239a30424e42747dd3d92be3fbd6458340b30
Author: Georgi Kodinov <georgi.kodinov@oracle.com>
Date:   Tue Feb 16 15:07:30 2016 +0200

    Addendum to bug #22722946: moved the test into a separate file and added
    checks for deubg code.

commit 3856a3b14e25b9343887f08156b2c5cddeb67e0d
Author: Chaithra Gopalareddy <chaithra.gopalareddy@oracle.com>
Date:   Sun Feb 14 20:37:05 2016 +0530

    Bug #18109609: LOOSE INDEX SCAN IS NOT USED WHEN IT SHOULD
    
    Problem:
    Loose index scan is not chosen if a query has a equality condition.
    
    Analysis:
    Optimizer indeed chooses loose index scan as the cheapest possible access
    plan for the given query before it checks for ref access.
    However optimizer chooses ref access without calculating the cost because
    of the heuristic "ref scan is always cheaper compared to range scan if it
    is utilizing the same or more keyparts ". However in case of loose index
    scan, it is not always guranteed that ref scan will be looking at
    same/less number of qualifying rows.
    
    Solution:
    Do not consider the above heuristic when the chosen access plan is loose
    index scan. Instead calculated the cost for doing ref access before choosing
    it.

commit aa85102dd89b004f0b86d9146cfd133793a922f9
Author: Georgi Kodinov <georgi.kodinov@oracle.com>
Date:   Fri Feb 12 13:51:52 2016 +0200

    Bug #22722946: integer overflow may lead to wrong results in get_56_lenc_string

commit af467b38db9983dd040606d0796d6cf9b76312f6
Author: Aakanksha Verma <aakanksha.verma@oracle.com>
Date:   Fri Feb 12 15:37:25 2016 +0530

    PROBLEM
    
    The patch from bug#22111472 causing  message getting issued
    pretty much irrespective of the actual value of either parameter.
    
    FIX
    
    Have rearranged the patch so that warning is printed only after
    innodb_open_files>open_files_limit is reached.
    
    Reviewed-by: Annamalai Gurusami<annamalai.gurusami@oracle.com>
    RB: 11784

commit 085c2058b88e36fe85dd3be0fcaa96aadea23e6f
Merge: 86a1cb8 fe63fa6
Author: Nisha Gopalakrishnan <nisha.gopalakrishnan@oracle.com>
Date:   Thu Feb 11 16:29:28 2016 +0530

    Merge branch 'mysql-5.5' into mysql-5.6

commit fe63fa668f7cf177f62175c360e52591ee1dce67
Author: Nisha Gopalakrishnan <nisha.gopalakrishnan@oracle.com>
Date:   Wed Feb 10 19:57:17 2016 +0530

    BUG#22037930: INSERT IGNORE FAILS TO IGNORE FOREIGN KEY
                  CONSTRAINT.
    
    Analysis
    =======
    
    INSERT and UPDATE operations using the IGNORE keyword which
    causes FOREIGN KEY constraint violations reports an error
    despite using the IGNORE keyword.
    
    Foreign key violation errors were not ignored and reported
    as errors instead of warnings even when IGNORE was set.
    
    Fix
    ===
    Added code to ignore the foreign key violation errors and
    report them as warnings when the IGNORE keyword is used.

commit 86a1cb8c92b14d77be1e34cfb2e704472503c213
Author: Joao Gramacho <joao.gramacho@oracle.com>
Date:   Wed Feb 3 15:54:23 2016 +0000

    Bug#22558874 I_RPL.RPL_SHOW_SLAVE_STATUS_HANG TEST FAILS IN TEST ASSERTION
    
    Problem:
    
    The test case was failing an assertion used to ensure the slave's
    GTID_EXECUTED set was equal to master's GTID_EXECUTED set.
    
    Analysis:
    
    The test case expected that the slave server had received two
    transactions before restarting it, but didn't added verification or
    sync routines to ensure the I/O thread had actually received the two
    transactions before restarting the server.
    
    Fix:
    
    Added a line to wait for the slave's I/O thread to be in sync with the
    master before restarting it.
    
    Added a line to wait for the slave's SQL thread to be in sync with its
    I/O thread just after restarting.

commit b54386924b03ecdc5026966a54167a4fe98d9c9b
Merge: 6eb2107 9f63394
Author: Jon Olav Hauglid <jon.hauglid@oracle.com>
Date:   Mon Feb 8 13:09:32 2016 +0100

    Merge branch 'mysql-5.5' into mysql-5.6

commit 9f6339412368e9054df6af6ec3911206630e3720
Author: Jon Olav Hauglid <jon.hauglid@oracle.com>
Date:   Mon Feb 8 11:28:20 2016 +0100

    Bug#22680706: 5.5 DOES NOT BUILD WITH GCC5
    
    Fix the following two build warnings so that 5.5 can be compiled
    with GCC5.
    
    storage/innobase/dict/dict0crea.c:1143:21: error: logical not is only applied
    to the left hand side of comparison [-Werror=logical-not-parentheses]
       ut_a(!node->index == (err != DB_SUCCESS));
                         ^
    storage/innobase/log/log0recv.c:1770:20: error: logical not is only applied
    to the left hand side of comparison [-Werror=logical-not-parentheses]
      ut_ad(!allow_ibuf == mutex_own(&log_sys->mutex));
                        ^

commit 6eb21070d4f47aa410cefd0eed5b7c880dc55560
Merge: 3d70eb7 48b8bf3
Author: Gipson Pulla <gipson.pulla@oracle.com>
Date:   Fri Feb 5 20:50:08 2016 +0100

    Upmerge of the 5.5.48 build

commit 48b8bf3c70531c83b1aedd9a8598737a55d35d63
Merge: 91ebb2b b776367
Author: Gipson Pulla <gipson.pulla@oracle.com>
Date:   Fri Feb 5 20:43:18 2016 +0100

    Merge branch 'mysql-5.5.48-release' into mysql-5.5

commit 3d70eb759a8434188a8c83d3153233be675c8798
Merge: f0fbac3 772309f
Author: Hery Ramilison <hery.ramilison@oracle.com>
Date:   Fri Feb 5 19:24:42 2016 +0100

    Merge branch 'mysql-5.6.29-release' into mysql-5.6

commit f0fbac3efae9439a801e3f9787bf40c7e3b9e19a
Author: Aakanksha Verma <aakanksha.verma@oracle.com>
Date:   Thu Feb 4 18:09:48 2016 +0530

    Bug #22111472 IT'S POSSIBLE TO HAVE INNODB_OPEN_FILES>OPEN_FILES_LIMIT
    AND IT CAN CRASH MYSQL.
    
    PROBLEM
    
    open_files_limit is a server variable which restricts the number of
    files which can be opened by the mysqld process.This can be set by the
    user.(The value is directly passed to setrlimit().) When Innodb opens
    a file we increment the variable fil_system->n_open. We limit the max
    files which can be opened by fil_system->max_n_open which can be set
    by the user using innodb_open_files. If we cross this limit innodb
    tries to close some files using in the LRU list to accomdate opening
    of new files. Now when the user gives
    innodb_open_files > open_files_limit and tries to open large number of
    files (> open_files_limit) ,innodb has no way of knowing that
    open_files_limit has been reached. When file open operation fails for
    certain operations in buf_page_get_gen() ,the server is crashed.
    
    FIX
    
    Fix for version mysql -5.7 in rb#11341
    Fix is for version mysql-5.6 :
    At the time of startup of innodb,fix tries to set value of the variable
    innobase_open_files(innodb_open_files) to table_cache_size if the
    condition innodb_open_files > open_files_limit is reached.
    
    Reviewed-by: Annamalai Gurusami <annamalai.gurusami@oracle.com>
    Reviewed-by: Jimmy Yang <Jimmy.Yang@oracle.com>
    RB: 11338

commit f64b2466a171b30a5eafac0549e37782007f49f1
Author: Georgi Kodinov <georgi.kodinov@oracle.com>
Date:   Wed Feb 3 16:27:07 2016 +0200

    Addendum to bug #19509471: normalized plugin names in audit log.

commit aa722493ed9ea21c0875e2e1753a079fe95a5134
Author: Karthik Kamath <karthik.kamath@oracle.com>
Date:   Wed Feb 3 11:54:58 2016 +0530

    BUG#22216779: 5.6 CRASHES ON A 5.7 DATADIR
    
    ANALYSIS:
    =========
    Server startup on 5.6 with the 5.7 data directory results in
    server crash. This is basically an attempt to downgrade, which
    is unsupported.
    The system table 'plugin' uses the InnoDB storage engine in 5.7
    whereas it uses MyISAM in 5.6. So during 5.6 server startup,
    the 'plugin' table cannot be opened which results in the 'hton'
    pointer set to NULL. Access to this pointer results in the
    server crash.
    
    FIX:
    ====
    A check has been introduced to verify if the 'hton' pointer contains
    a non NULL value. If not, safe server shutdown is ensured.

commit af5860faad80f6b4794d2ba81a067b0c6e931441
Author: Pavan Naik <pavan.naik@oracle.com>
Date:   Tue Feb 2 14:25:43 2016 +0530

    BUG#13687542 : MTR BEHAVES WRONG WHEN EXECUTING 'ERROR $VAR' IN A LOOP
    
    Description :
    =============
    MTR's 'error' command can be used when a statement is expected to fail.
    It is possible to give the error code either hard-coded or as an mtr variable,
    like: --error $variable.
    
    However, if an 'error $variable' statement is inside a loop, it evaluates
    to the same value every iteration.
    
    Issue :
    =======
    'expected_errors' array was not getting updated with the 'error' command
    value after the first iteration.
    
    Fix :
    =====
    Check for 'error' command and update the 'expected_errors' array for each
    iteration of the loop.
    
    Reviewed-by: Sayantan Dutta <sayantan.dutta@oracle.com>
    RB: 11463

commit c81c31a4a48a842c61224d9dd10f84c983d713ff
Merge: 1261f41 91ebb2b
Author: Sreeharsha Ramanavarapu <sreeharsha.ramanavarapu@oracle.com>
Date:   Fri Jan 29 08:30:38 2016 +0530

    Merge branch 'mysql-5.5' into mysql-5.6

commit 91ebb2bc66f46a7ef2efee7485fd1dcfed4b6914
Author: Sreeharsha Ramanavarapu <sreeharsha.ramanavarapu@oracle.com>
Date:   Fri Jan 29 08:29:06 2016 +0530

    Bug #18823979: PS: UCS2 + CASE WHEN THEN ELSE CRASH IN
                   ITEM_PARAM::SAFE_CHARSET_CONVERTER
    
    ISSUE:
    ------
    Charset conversion on a null parameter is not handled
    correctly.
    
    SOLUTION:
    ---------
    Item_param's charset converter does not handle the case
    where it might have to deal with a null value. This is
    fine for other charset converters since the value is not
    supplied to them at runtime.
    
    The fix is to check if the parameter is now set to null and
    return an Item_null object. Also, there is no need to
    initialize Item_param's cnvitem in the constructor to a
    string. This can be done in
    ITEM_PARAM::SAFE_CHARSET_CONVERTER itself.
    
    Members of Item_param, cnvbuf and cnvstr, have been removed
    and cnvitem has been made a local variable in
    ITEM_PARAM::SAFE_CHARSET_CONVERTER.

commit 1261f41c7722bbc6e64982a7218c47a97820a92b
Merge: c9fb715 cd2afc3
Author: Ajo Robert <ajo.robert@oracle.com>
Date:   Thu Jan 28 17:52:16 2016 +0530

    Merge branch 'mysql-5.5' into mysql-5.6

commit cd2afc34ab1051a01430885795177b759b7062a3
Author: Ajo Robert <ajo.robert@oracle.com>
Date:   Thu Jan 28 17:40:17 2016 +0530

    Bug #16912362 LOAD DATA INFILE CLAIMS TO BE HOLDING
    'SYSTEM LOCK' IN PROCESSLIST
    
    Analysis
    =========
    Show processlist shows 'System Lock' in 'State' field while
    LOAD DATA INFILE is running.
    
    thd->proc_info update is missing in LOAD DATA INFILE path.
    Thus any request will get last unpdated status from lock_table()
    during open_table().
    
    Fix:
    =======
    Update state information from LOAD DATA INFILE path.

commit c9fb7150c1c89ff8bfe29b731431caac22db01dd
Merge: c0480c5 ba8be50
Author: Balasubramanian Kandasamy <balasubramanian.kandasamy@oracle.com>
Date:   Wed Jan 27 18:45:16 2016 +0530

    Merge branch 'mysql-5.5' into mysql-5.6

commit ba8be508b6aa7fe4df4444fd9502ebb1e3fd814b
Author: Balasubramanian Kandasamy <balasubramanian.kandasamy@oracle.com>
Date:   Wed Jan 27 18:42:52 2016 +0530

        BUG#22600974 - SYSV INITSCRIPT FOR RHEL DON'T ENABLE MYSQLD SERVICE BY DEFAULT
    
        Enable mysqld service by default in sysv initscrips

commit c0480c5fc072e9962e41fb8e5e2189494b8d0421
Author: Christopher Powers <chris.powers@oracle.com>
Date:   Tue Jan 26 17:37:38 2016 -0600

    Bug#21105475 DROP TABLE DOESN'T DROP TABLE ENTRIES STARTING WITH # FROM P_S TABLE
    
    The Performance Schema identifies temporary tables by assuming that all tables
    named with the "#sql" prefix are temporaryand can be ignored. However,
    non-temporary tables having the "#sql" prefix are incorrectly identified as
    temporary.
    
    To avoid this ambiguity, the Performance Schema will identify temporary tables
    using attributes other than the table name, depending on the state:
    
    1) table_share->tmp_table if the share is available and complete, e.g. get_table_share()
    2) CREATE: (ha_create_table) Create info flags or explicit boolean for truncated MyISAM temp tables
    3) DROP: The filename, guaranteed to have a #sql prefix. Table share not available.
    
    Regardless of the table name, the filenames for temporary and intermediate
    tables always have the "#sql" prefix, e.g. "#sql-1234". For non-temporary
    tables, a "#" prefix is encoded to @0023 in the filename, e.g. table "#sql_foo"
    has the filename "@0023sql_foo."

commit a85098397747afd05f139243f923a90a00b23cae
Merge: a662aef 2a38baf
Author: Shaohua Wang <shaohua.wang@oracle.com>
Date:   Wed Jan 27 09:53:09 2016 +0800

    Merge branch 'mysql-5.5' into mysql-5.6

commit 2a38bafd514731172b79398df8ff035929ec810a
Author: Shaohua Wang <shaohua.wang@oracle.com>
Date:   Wed Jan 27 09:40:02 2016 +0800

    Followup:BUG#22530768 Innodb freeze running REPLACE statements
    
    Go back to __sync_* operations in TAS on x86.
    
    Patch is reviewed by Sunny over IM.

commit a662aef6921afe62994a15243649e468a7b4000d
Merge: bde2fc8 423dcdb
Author: Jon Olav Hauglid <jon.hauglid@oracle.com>
Date:   Tue Jan 26 09:20:35 2016 +0100

    Merge branch 'mysql-5.5' into mysql-5.6

commit 423dcdb0c4db20f0fea37fb81dde7d5277492ac4
Author: Jon Olav Hauglid <jon.hauglid@oracle.com>
Date:   Tue Jan 26 09:18:10 2016 +0100

    Bug#21770366 backport bug#21657078 to 5.5 and 5.6
    
    Post-push fix: The problem was that condition variable
    timeouts could in some cases (slow machines and/or short
    timeouts) be infinite.
    
    When the number of milliseconds to wait is computed, the
    end time is computed before the now() time. This can result
    in the now() time being later than the end time, leading to
    negative timeout. Which after conversion to unsigned becomes
    ~infinite.
    
    This patch fixes the problem by explicitly checking if we
    get negative timeout and then using 0 if this is the case.

commit bde2fc8c6ff5fb309e7d1f6a1aedc8a52970b769
Author: Marek Szymczak <marek.szymczak@oracle.com>
Date:   Fri Jan 22 11:09:26 2016 +0100

    Bug #19509471 ACCOUNT FILTERING SHOULD USE AUTHENTICATED ACCOUNT FOR MATCHING
    
    == Problem ==
    Audit log user inclusion/exclusion bases on USER() user and host information,
    which is not very reliable way of defining user/host pairs.
    
    == Fix ==
    Audit log verifies inclusion/exclusion based on CURRENT_USER() user and host,
    which is more reliable now. Usage of wildcards in the host part is allowed and
    it should follow account creation rules (CREATE USER).
    
    Audit log file output policy has not been changed.
    
    Reviewed-by: Georgi Kodinov <georgi.kodinov@oracle.com>
    Reviewed-by: Kristofer Pettersson <kristofer.pettersson@oracle.com>
    RB: 11424

commit c256a51a2c564179037c57fd1dcaa664f2dccac4
Merge: 9c4588d 716b5ab
Author: Deepthi Eranti_Sreenivas <deepthi.e.s@oracle.com>
Date:   Fri Jan 22 16:53:58 2016 +0530

    Merge branch 'mysql-5.5' into mysql-5.6

commit 716b5abfe112d0505eb1c9f116f75dfc40724fd7
Author: Deepthi Eranti_Sreenivas <deepthi.e.s@oracle.com>
Date:   Fri Jan 22 16:51:21 2016 +0530

    Bug#22086528: TEST CODE DISABLED THOUGH THE HISTORIC REASONS - BUGS - ARE FIXED
    
    Post push fix for 5.5 and 5.6.Disabled the test code due to Bug#22587377

commit 9c4588ded2317734f5b11bb3ebd6652425ce5d27
Author: Aakanksha Verma <aakanksha.verma@oracle.com>
Date:   Thu Jan 21 17:09:17 2016 +0530

    INNODB: "DATA DIRECTORY" OPTION OF CREATE TABLE FAILS WITH PWRITE() OS
    ERROR 22
    Fix for version mysql-5.6
    PROBLEM
    ========
    For version mysql-5.6.27 onwards InnoDB fails to create a table
    with explicit 'data directory' option when Innodb_flush_method
    is set to O_DIRECT.While creating link file we get a  a pwrite
    error 22 due to the alignment restrictions imposed by O_DIRECT
    flag  which is being set for the link file created.
    
    FIX
    ===
    Fixed the above issue by making use of file IO functions while
    creating the link file that wouldn't let the O_DIRECT flag
    restrictions arise.
    
    Reviewed-by: Kevin Lewis <kevin.lewis@oracle.com>
    Reviewed-by: Shaohua Wang <shaohua.wang@oracle.com>
    RB: 11387

commit df8923c8f3ecc94c855183cee15503e0d6d4e864
Merge: 612a42a 71c98f3
Author: Deepthi Eranti_Sreenivas <deepthi.e.s@oracle.com>
Date:   Wed Jan 20 18:28:47 2016 +0530

    Merge branch 'mysql-5.5' into mysql-5.6

commit 71c98f38ba9e2be3c1e8c94c989f801c8edc3d16
Author: Deepthi Eranti_Sreenivas <deepthi.e.s@oracle.com>
Date:   Wed Jan 20 18:23:16 2016 +0530

    Bug#22086528 : TEST CODE DISABLED THOUGH THE HISTORIC REASONS - BUGS - ARE FIXED
    
    Problem:
    mysql-test/suite/rpl/t/rpl_killed_ddl.test
    
    This test contains code which was disabled because of certain bugs.
    BUG#44041 declared to be a duplicate of Bug#45516 which was fixed 2010
    BUG#43353 fixed 2012
    BUG#44171 fixed 2010
    
    Fix:
    Enabled the test code related to the above mentioned bugs.

commit 612a42a9c51f22bd8902abbf68b31eb13ad5d331
Author: Venkatesh Duggirala <venkatesh.duggirala@oracle.com>
Date:   Wed Jan 20 14:40:49 2016 +0530

    BUG#20836250 MYSQLBINLOG --VERBOSE FOR BINARY DATATYPE NOT SKIPPING ' (QUOTE)
        & \ (BACKSLASH)
    BUG#22305605 STOP SLAVE IO THREAD PRINTS WRONG LOST CONNECTION MESSAGE IN ERROR LOG FILE
    
    Fixing post push pb2 failures

commit c1cc22e38ee7b24bfd0856bb3a09de286d2ebf56
Author: Tor Didriksen <tor.didriksen@oracle.com>
Date:   Mon Jan 18 15:11:41 2016 +0100

    Bug#22552615 EXTRACTVALUE RETURNS NULL WHEN NO MATCHING TEXT NODE IS FOUND FOR THE EXPRESSION
    
    This is a backport of the patch for
    Bug #13358486 WEIGHT_STRING = MY_STRNXFRM_UNICODE: ASSERTION `SRC' FAILED.

commit e7c07a7d40b056f71c284d6ee9baae45b8794760
Author: Sujatha Sivakumar <sujatha.sivakumar@oracle.com>
Date:   Tue Jan 19 15:40:27 2016 +0530

    Bug#21198611: MULTI-THREADED SLAVE LOG SPAMMING ON FAILURE
    
    Problem:
    =======
    When a multi-threaded slave stops with an error, the same
    error message is printed three times.
    
    Analysis:
    =========
    "sql_slave_killed" function is called frequently to check
    if SQL thread is alive or got killed. This function doesn't
    preserve SQL thread's kill command acceptance status. This
    causes the whole function to be re-executed each time. i.e
    even though the kill command got accepted during previous
    execution, since it is not preserved the function is
    re-executed. As part of this function's execution when SQL
    thread accepts kill status it prints few error messages to
    let the user know the current status. Because of these
    re-executions these error messages are also printed once
    again in the error log.
    
    Fix:
    ===
    Added a new variable which stores the SQL thread's kill
    acceptance status. If kill is accepted it is set to true
    and the error messages are printed only once at this point.
    During further invocations of this function, since kill
    is already accepted, nothing will be done by this function
    it simply returns the kill acceptance status.

commit 948c00aa1cbb1a4ca55107b6a9987fe32eb9ff83
Author: Venkatesh Duggirala <venkatesh.duggirala@oracle.com>
Date:   Mon Jan 18 16:12:02 2016 +0530

    BUG#20836250 MYSQLBINLOG --VERBOSE FOR BINARY DATATYPE NOT SKIPPING ' (QUOTE)
    & \ (BACKSLASH)
    
    Problem & Analysis:
    ===================
    Character set information is not available in the binary log,
    which affects string/binary column display in mysqlbinlog --verbose:
    There is no distinction made between corresponding binary and
    nonbinary string types (BINARY and CHAR, VARBINARY and VARCHAR, BLOB
    and TEXT). The output uses a data type of STRING for
    fixed-length strings and VARSTRING for variable-length strings.
    But single quote (' which 0x27) and backslash (\ which is 0x5c)
    are possible in binary datatype content and if we display single
    quote as character it will confuse the users and also backslash will
    skip the next character if we are treating them as string value.
    
    Fix: Display hexdecimal equivalent value for single quote and backslash,
    dont treat them as normal string characters i.e., display \x27 or \x5c
    instead.

commit f51a6c12206b5c0d42e47492bde9e288c25bee7a
Author: Venkatesh Duggirala <venkatesh.duggirala@oracle.com>
Date:   Mon Jan 18 14:05:43 2016 +0530

    BUG#22305605 STOP SLAVE IO THREAD PRINTS WRONG LOST CONNECTION MESSAGE IN ERROR LOG FILE
    
    Problem:
    STOP SLAVE IO_THREAD closes socket communication between Master and Slave.
    This prints an ERROR message in the error log
    [ERROR] Error reading packet from server: Lost connection to
    MySQL server during query (server_errno=2013). Here the socket closed intentionally
    by the DBA using command 'STOP SLAVE IO_THREAD'. Hence no need to print the message
    [ERROR] that says "Lost connection" which will confusion the users/DBAs.
    
    Analysis & Fix: When we are unable to read packet from the replication channel,
    we print this error message under the assumption that we lost connection
    from the master. But this is not true always, it could be that replication channel
    is closed due to a 'STOP SLAVE IO_THREAD' command execution on Slave.
    In this situation, this panic error should not be printed. Now after the patch,
    slave server checks if abort_slave flag is set or not. If it is not set,
    then it assumes that replication channel lost connection from
    the master and print this error message in the error log.

commit 7ea0b177740be8467406a78c6b60b0fe92d54a51
Author: Sujatha Sivakumar <sujatha.sivakumar@oracle.com>
Date:   Mon Jan 18 11:36:55 2016 +0530

    Bug#21435502: DROP TABLE IF EXISTS MAY BRAKE REPLICATION IF
    SLAVE HAS REPLICATION FILTERS.
    
    Problem:
    =======
    If a replica has replication filters on a given database and
    DROP TABLE IF EXISTS is issued on a table that holds a key
    being used as Foreign Key by another table the statement
    will fail as expected with error:
    
    ERROR 1217 (23000): Cannot delete or update a parent row: a
    foreign key constraint fails
    
    however this will break replication on the replica with:
    
    Last_SQL_Error: Query caused different errors on master and
    slave. Error on master: message (format)='Cannot delete or
    update a parent row: a foreign key constraint fails' error
    code=1217 ; Error on slave: actual message='no error',
      error code=0. Default database: 'db1'. Query:
    'DROP TABLE IF EXISTS `table1` /* generated by server */'
    
    Two issues were reported in this bug.
    
    1) Failed query logged to binary log.
    
    2) When a query with expected error is received on slave
    side and it was skipped due to replication filters, then
    the error checking should not happen on slave side. i.e
    the comparison of expected error with actual error must
    not happen.
    
    Analysis and fix:
    =================
    
    Issue 1:
    =======
    
    We do binlog failed queries when the query can generate
    'partial results'.  When a list of tables are dropped as
    part of a single 'DROP TABLE' command and if it fails, it
    can generate partial results and in such cases we log it
    with an expected error into the binary log so that slave's
    state is also the same as that of the master.
    
    But when the DROP TABLE command is used to DROP a single
    table and if that command fails then the query cannot
    generate 'partial results'. In that case the query will
    not be written to the binary log.
    
    Issue 2:
    =======
    This was fixed as part of Bug#20797764 fix in MySQL-5.6.27.

commit 8a6e123a92cdf77b156dca59199f5ca056473c37
Merge: e527ef1 c15900f
Author: Knut Anders Hatlen <knut.hatlen@oracle.com>
Date:   Sun Jan 17 20:31:05 2016 +0100

    Merge branch 'mysql-5.5' into mysql-5.6

commit c15900f266a3ccd2bb3738edee6d182ac70a8efb
Author: Knut Anders Hatlen <knut.hatlen@oracle.com>
Date:   Thu Jan 7 12:53:18 2016 +0100

    Bug#21682356: STOP INJECTING DATA ITEMS IN AN ERROR MESSAGE
                  GENERATED BY THE EXP() FUNCTION
    
    When generating the error message for numeric overflow, pass a flag to
    Item::print() that prevents it from expanding constant expressions and
    parameters to the values they evaluate to.
    
    For consistency, also pass the flag to Item::print() when
    Item_func_spatial_collection::fix_length_and_dec() generates an error
    message. It doesn't make any difference at the moment, since constant
    expressions haven't been evaluated yet when this function is called.

commit b77636769f88d8902dd83edfcb18c88d480abeec
Author: Shaohua Wang <shaohua.wang@oracle.com>
Date:   Fri Jan 15 10:26:08 2016 +0800

    BUG#22530768 Innodb freeze running REPLACE statements
    
    we can see from the hang stacktrace, srv_monitor_thread is blocked
    when getting log_sys::mutex, so that sync_arr_wake_threads_if_sema_free
    cannot get a change to break the mutex deadlock.
    
    The fix is simply removing any mutex wait in srv_monitor_thread.
    
    Patch is reviewed by Sunny over IM.

commit e527ef11be64c12a4edfdbae458b647dddff8336
Merge: 4bd772f 0517474
Author: Shaohua Wang <shaohua.wang@oracle.com>
Date:   Tue Jan 12 15:33:54 2016 +0800

    Merge branch 'mysql-5.5' into mysql-5.6

commit 0517474ea43d517a50f11ebe85ec1f04160603a7
Author: Shaohua Wang <shaohua.wang@oracle.com>
Date:   Tue Jan 12 15:08:09 2016 +0800

    BUG#22530768 Innodb freeze running REPLACE statements
    
    we can see from the hang stacktrace, srv_monitor_thread is blocked
    when getting log_sys::mutex, so that sync_arr_wake_threads_if_sema_free
    cannot get a change to break the mutex deadlock.
    
    The fix is simply removing any mutex wait in srv_monitor_thread.
    
    Patch is reviewed by Sunny over IM.

commit 4bd772f378b6604e9b008cff5300cfd48fbc6725
Merge: 0f5490c e54f6f2
Author: Bjorn Munch <bjorn.munch@oracle.com>
Date:   Mon Jan 11 15:07:33 2016 +0100

    Raise version number after cloning 5.6.29

commit e54f6f28be35242322f42150f05dcd31c7a25f2b
Author: Bjorn Munch <bjorn.munch@oracle.com>
Date:   Mon Jan 11 15:00:44 2016 +0100

    Raise version number after cloning 5.5.48
