List:Commits« Previous MessageNext Message »
From:vasil.dimov Date:February 8 2012 12:56pm
Subject:bzr push into mysql-trunk branch (vasil.dimov:3709 to 3861)
View as plain text  
 3861 Vasil Dimov	2012-02-08
      Fix compilation warning with GCC 4.6:
      
      sql_show.cc: In function 'int store_create_info(THD*, TABLE_LIST*, String*, HA_CREATE_INFO*, bool)':
      sql_show.cc:1429:8: error: variable 'show_table_options' set but not used [-Werror=unused-but-set-variable]

    modified:
      sql/sql_show.cc
 3860 Roy Lyseng	2012-02-08
      Refactoring: Remove member and_tables_cache of Item_cond.
      
      The Item_cond class maintains both not_null_tables_cache
      and and_tables_cache to implement the not_null_tables()
      interface. and_tables_cache is only used for conditions of
      type AND, but it is simple to replace its use with
      not_null_tables_cache.
      
      sql/item.h:
        Deleted Item_name_const::const_item() and
        Item_sp_variable::const_item(), as they are the same as for the
        base class.
      
      sql/item_cmpfunc.cc:
        Maintain not_null_tables_cache instead of and_tables_cache.
      
      sql/item_cmpfunc.h:
        Remove member and_tables_cache, remove function not_null_tables()
        for class Item_cond.

    modified:
      sql/item.h
      sql/item_cmpfunc.cc
      sql/item_cmpfunc.h
 3859 Vasil Dimov	2012-02-08
      Fix compilation failure when compiling with partitioning disabled.
      partition_names is not defined in this case.
      
      Reviewed by:	mattiasj (via IM)

    modified:
      sql/sql_lex.cc
 3858 Rohit Kalhans	2012-02-08 [merge]
      null merge from mysql-5.5 -> mysql-trunk

 3857 Rohit Kalhans	2012-02-08
      reverting changes for the last push for bug#11758263 and the followup patch for the same.

    modified:
      mysql-test/extra/rpl_tests/rpl_insert_id_pk.test
      mysql-test/extra/rpl_tests/rpl_multi_update.test
      mysql-test/extra/rpl_tests/rpl_multi_update2.test
      mysql-test/extra/rpl_tests/rpl_multi_update3.test
      mysql-test/r/ps.result
      mysql-test/suite/binlog/r/binlog_unsafe.result
      mysql-test/suite/binlog/t/binlog_unsafe.test
      mysql-test/suite/rpl/r/rpl_auto_increment_11932.result
      mysql-test/suite/rpl/r/rpl_insert_id_pk.result
      mysql-test/suite/rpl/r/rpl_multi_update.result
      mysql-test/suite/rpl/r/rpl_multi_update2.result
      mysql-test/suite/rpl/r/rpl_multi_update3.result
      mysql-test/suite/rpl/r/rpl_rotate_logs.result
      mysql-test/suite/rpl/t/rpl_auto_increment_11932.test
      mysql-test/suite/rpl/t/rpl_multi_update2.test
      mysql-test/suite/rpl/t/rpl_multi_update3.test
      mysql-test/suite/rpl/t/rpl_optimize.test
      mysql-test/suite/rpl/t/rpl_rotate_logs.test
      mysql-test/suite/rpl/t/rpl_semi_sync_event.test
      mysql-test/suite/rpl/t/rpl_timezone.test
      mysql-test/t/multi_update.test
      mysql-test/t/ps.test
      sql/share/errmsg-utf8.txt
      sql/sql_base.cc
      sql/sql_lex.cc
      sql/sql_lex.h
      sql/sql_parse.cc
 3856 kevin.lewis@oracle.com	2012-02-07
      WL#6145 - This patch moves to the storage engine the code that
      determines whether DATA DIRECTORY and INDEX DIRECTORY on a
      CREATE TABLE command is ignored.  It affects Archive and MyISAM
      storage engines where these clauses are used, and it affects the
      Partition engine where these clauses are passed through to the
      lower engine.  In the future, WL5980, InnoDB will also use these
      clauses.

    modified:
      mysql-test/r/partition_windows.result
      sql/log_event.cc
      sql/partition_info.cc
      sql/sql_parse.cc
      sql/sql_table.cc
      storage/archive/ha_archive.cc
      storage/myisam/ha_myisam.cc
 3855 Guilhem Bichot	2012-02-07 [merge]
      merge from trunk

    modified:
      mysql-test/r/ps.result
      mysql-test/t/ps.test
 3854 Guilhem Bichot	2012-02-07
      Temporarily revert fix for
      Bug#13623473 MISSING ROWS ON SELECT AND JOIN WITH TIME/DATETIME COMPARE
      until the failure of ps_2myisam on Windows non-debug builds
      in pb2 is fixed.

    modified:
      mysql-test/r/ps_2myisam.result
      mysql-test/r/ps_3innodb.result
      mysql-test/r/ps_4heap.result
      mysql-test/r/ps_5merge.result
      mysql-test/r/type_temporal_fractional.result
      mysql-test/r/type_time.result
      mysql-test/t/type_time.test
      sql/field.cc
      sql/opt_range.cc
      sql/sql_optimizer.cc
      sql/sql_optimizer.h
 3853 Rohit Kalhans	2012-02-08 [merge]
      merge from mysql-5.5 to trunk after the patch for bug#11758263.

    modified:
      mysql-test/extra/rpl_tests/rpl_insert_id_pk.test
      mysql-test/extra/rpl_tests/rpl_multi_update.test
      mysql-test/extra/rpl_tests/rpl_multi_update2.test
      mysql-test/extra/rpl_tests/rpl_multi_update3.test
      mysql-test/r/ps.result
      mysql-test/suite/binlog/r/binlog_unsafe.result
      mysql-test/suite/binlog/t/binlog_unsafe.test
      mysql-test/suite/rpl/r/rpl_auto_increment_11932.result
      mysql-test/suite/rpl/r/rpl_insert_id_pk.result
      mysql-test/suite/rpl/r/rpl_multi_update.result
      mysql-test/suite/rpl/r/rpl_multi_update2.result
      mysql-test/suite/rpl/r/rpl_multi_update3.result
      mysql-test/suite/rpl/r/rpl_rotate_logs.result
      mysql-test/suite/rpl/t/rpl_auto_increment_11932.test
      mysql-test/suite/rpl/t/rpl_multi_update2.test
      mysql-test/suite/rpl/t/rpl_multi_update3.test
      mysql-test/suite/rpl/t/rpl_optimize.test
      mysql-test/suite/rpl/t/rpl_rotate_logs.test
      mysql-test/suite/rpl/t/rpl_semi_sync_event.test
      mysql-test/suite/rpl/t/rpl_timezone.test
      mysql-test/t/multi_update.test
      mysql-test/t/ps.test
      sql/share/errmsg-utf8.txt
      sql/sql_base.cc
      sql/sql_lex.cc
      sql/sql_lex.h
      sql/sql_parse.cc
 3852 Guilhem Bichot	2012-02-07
      Fix for Bug#13651009 WRONG RESULT FROM DERIVED TABLE IF THE SUBQUERY HAS AN EMPTY RESULT
      Empty const table didn't cause the query to have an empty result set.
     @ mysql-test/include/subquery.inc
        Though the bug isn't exactly about subqueries (does not require
        a subquery, only a derived table), I put the testcase here
        because I want it tested with subquery materialization when
        merged in the wl6095 tree - it used to cause an assert in
        the wl6095 code).
        Without the code fix, both SELECTs using derived tables
        would return a row full of zeroes ("0" for int,
        "00:00:00" for time...), and "SELECT @var3" would
        return 12.
     @ sql/sql_executor.cc
        comments
     @ sql/sql_optimizer.cc
        Scenario of the bug follows (for the queries in subquery.inc).
        All tables are one-or-zero-row MyISAM tables.
        $subq is of the form:
          SELECT ... FROM t1 WHERE ... ,
        When run as a standalone query, it returns zero rows (because t1 is
        empty).
        But when $subq is put inside the definition of a derived table:
          SELECT ... FROM ($subq) AS alias3;
        then one row is returned, wrongly. Here is how it happens.
        * When we are materializing alias3, we start evaluating $subq; this
        finds that t1 is "an empty const table".
        * We thus come to this place in JOIN::optimize():
          if (const_table_map != found_const_table_map &&
              !(select_options & SELECT_DESCRIBE) &&
              (!conds ||
               !(conds->used_tables() & RAND_TABLE_BIT) ||
               select_lex->master_unit() == &thd->lex->unit))
          {
            zero_result_cause= "no matching row in const table";
            DBUG_PRINT("error",("Error: %s", zero_result_cause));
            goto setup_subq_exit;
          }
        * const_table_map != found_const_table_map (because there is an empty
        const table, which is in const_table_map and not in
        found_const_table_map)
        * this isn't EXPLAIN
        * this isn't the top query (we are inside a derived table)
        * the WHERE clause has RAND_TABLE_BIT because it uses a "random"
        construct, indeed:
        ** in the first testcase of subquery.inc, the trick of writing and
        reading @var3 in the same statement makes the optimizer correctly
        believe that @var3 is a changing value (thus, "random" - unpredictable
        for the optimizer)
        ** in the second testcase, both user variables and "NOT IN
        (inner subquery)" do the same trick.
        So, we don't enter the if() block. No short-circuit. Query is not
        marked as "empty result" in the optimization phase. t1's record buffer
        has been filled with NULLs (see mark_as_null_row() in
        join_read_system()).
        We then reach this place in do_select():
          if (join->tables == join->const_tables)
          {
            if (!join->conds || join->conds->val_int())
        We evaluate the WHERE (remember: on a pseudo-row of t1 filled with
        NULLs). In the first testcase, the WHERE is satisfied by the NULL
        row, so this row is written into the materialized derived temporary
        table. In the second testcase, in all logic the WHERE should not be
        satisfied (NULLs NOT IN (non-empty-inner-subq) should be UNKNOWN), but
        because columns of t1 are not NULLable, triggered conditions are not
        created in the inner subquery (see
        Item_in_subselect::row_value_transformer()), so things go further
        wrong.
        
        Afterwards, this temporary one-NULL-row table is read, and bad data is
        output (zeroes: there is conversion from NULL to zeroes at some stage,
        because columns of t1 are not NULLable; if I declare columns as
        NULLable I get NULLs in the output).
        
        The bugfix: in this code
          if (const_table_map != found_const_table_map &&
              !(select_options & SELECT_DESCRIBE) &&
              (!conds ||
               !(conds->used_tables() & RAND_TABLE_BIT) ||
               select_lex->master_unit() == &thd->lex->unit))
          {
            zero_result_cause= "no matching row in const table";
            DBUG_PRINT("error",("Error: %s", zero_result_cause));
            goto setup_subq_exit;
          }
        the two last conditions are wrong.
        If "const_table_map != found_const_table_map" it means that one empty
        const table has been found. It may have been found in two ways:
        * join_read_system() i.e. it's a table which has really zero rows
        (case of t1, in our scenario). In that case, the result of this query
        specification is guaranteed empty, no matter the WHERE condition, no
        matter if this query specification is a subquery or a top query.
        * join_read_const() i.e. it's a table which has a unique index, and we
        have in the WHERE something like unique_index=constant, and there is
        no match for "constant" in the index. Again, there is no need to check
        any other condition in the if(). make_join_statistics(), which
        extracts const tables, takes proper precautions to detect that "we
        have all information" to mark a table const. For example, if we have
        "unique_index=outer_table.column", where outer_table is outer to this
        query specification, then we won't mark as constant because we know
        that this equality depends on OUTER_REF_TABLE_BIT, which is "not an
        available table" at this stage (search for "// Found everything for
         ref"). Same for "unique_index=RAND()": RAND_TABLE_BIT is not
        available. So there is no need for the test on RAND_TABLE_BIT and
        on the placement of the query specification. By the way, those two
        conditions were added in 2004 with commit comment "af"...
        
        By deleting those wrong extra conditions, we don't let the NULL row go
        out.
        It would also be possible to delete '!(select_options &
        SELECT_DESCRIBE)' but it has been found that this condition
        - causes no wrong query result (it's only in EXPLAIN)
        - leads to a clearer EXPLAIN output: indeed, if we shortcut at this
        stage, EXPLAIN does not contain information about what table was found
        constant.
        - so it was decided to not touch this condition.

    modified:
      mysql-test/include/subquery.inc
      mysql-test/r/subquery_all.result
      mysql-test/r/subquery_all_bka.result
      mysql-test/r/subquery_all_bka_nixbnl.result
      mysql-test/r/subquery_nomat_nosj.result
      mysql-test/r/subquery_nomat_nosj_bka.result
      mysql-test/r/subquery_nomat_nosj_bka_nixbnl.result
      mysql-test/r/subquery_none.result
      mysql-test/r/subquery_none_bka.result
      mysql-test/r/subquery_none_bka_nixbnl.result
      sql/sql_executor.cc
      sql/sql_optimizer.cc
 3851 Guilhem Bichot	2012-02-07 [merge]
      merge from trunk

    modified:
      storage/myisam/mi_dbug.c
 3850 Guilhem Bichot	2012-02-07
      Bug #13623473 	MISSING ROWS ON SELECT AND JOIN WITH TIME/DATETIME COMPARE
      Cannot use index for indexed_time=datetime.
     @ mysql-test/r/ps_2myisam.result
        We are inserting @arg00 (this string: '1991-01-01 01:01:01') into a TIME
        so we now get a warning that the date part is lost.
     @ mysql-test/r/type_temporal_fractional.result
        when inserting '20020323065409.039577' the TIME column gets
        06:54:09 so we warn that the date part is lost.
     @ mysql-test/r/type_time.result
        Warn that the date part of "1999-02-03 20:33:34" is lost.
        
        Without the code fix in add_key_field(), all ref access on
        t1.col_time_key would return only 2012-01-31 00:00:00 and
        miss rows. You can see the new warning "Cannot use ref access".
        
        Without the code fix in get_mm_leaf(), queries with
        "range checked for each record" used the index on t1.col_time_key
        and missed rows. For example:
        SELECT * FROM
        t2 ignore INDEX (col_datetime_key)
        STRAIGHT_JOIN
        t1 force INDEX (col_time_key)
        WHERE col_time_key <= col_datetime_key;
        missed:
        2012-02-01 00:00:00	24:00:00
        2012-02-02 00:00:00	24:00:00
        2012-02-02 00:00:00	48:00:00
        And:
        SELECT * FROM t2 STRAIGHT_JOIN t3 FORCE INDEX (col_time_key)
        ON t3.col_time_key > t2.col_datetime_key;
        returned only:
        1	2001-11-04 19:07:55	k	19:22:21
        1	2001-11-04 19:07:55	k	19:47:59
        1	2001-11-04 19:07:55	k	21:22:34
        You cannot see the new warning "Cannot use range access" because:
        * when the range optimizer is tried for indexed_time=datetime_column,
        it is the "range checked for each record" case: range optimizer
        is called for each outer row during execution; that does not happen
        in EXPLAIN, and the warning may be raised only in EXPLAIN.
        * To see the warning in EXPLAIN, range optimizer would have
        to be called during optimization, which would require
        indexed_time=datetime_constant, in which case we are
        not in the same conversion rules...
     @ mysql-test/t/type_time.test
        test of col_time_key OP col_datetime_key, where OP is =,>=,>,<=,<,
        and index is forced/ignored. Exercises ref access and range scan.
        Plus the original testcase of the bug report.
     @ sql/field.cc
        When inserting a date/datetime/timestamp into a TIME column,
        warn that the date part is lost.
        We already did so when inserting datetime/timestamp
        into a DATE column.
        Note that we fix Field_timef but not Field_time:
        - Field_time is used only when reading a pre-5.6 table
        - so making Field_time raise a warning when the date
        part is chopped, is not worth it.
     @ sql/opt_range.cc
        "indexed_time OP temporal_expression_with_date"
        does not use index anymore (OP = any comparison operator)
     @ sql/sql_optimizer.cc
        "indexed_time = temporal_expression_with_date"
        does not use index anymore.
        A comment in code explains why "ref" access is impossible.

    modified:
      mysql-test/r/ps_2myisam.result
      mysql-test/r/ps_3innodb.result
      mysql-test/r/ps_4heap.result
      mysql-test/r/ps_5merge.result
      mysql-test/r/type_temporal_fractional.result
      mysql-test/r/type_time.result
      mysql-test/t/type_time.test
      sql/field.cc
      sql/opt_range.cc
      sql/sql_optimizer.cc
      sql/sql_optimizer.h
 3849 Guilhem Bichot	2012-02-07
      fix for pb2 failure: use lowercase table names and aliases, or EXPLAIN output differs per platform.

    modified:
      mysql-test/include/subquery.inc
      mysql-test/r/subquery_all.result
      mysql-test/r/subquery_all_bka.result
      mysql-test/r/subquery_all_bka_nixbnl.result
      mysql-test/r/subquery_nomat_nosj.result
      mysql-test/r/subquery_nomat_nosj_bka.result
      mysql-test/r/subquery_nomat_nosj_bka_nixbnl.result
      mysql-test/r/subquery_none.result
      mysql-test/r/subquery_none_bka.result
      mysql-test/r/subquery_none_bka_nixbnl.result
 3848 Tor Didriksen	2012-02-07
      WL#6160 filesort optimization: use std::stable_sort rather than quicksort
      
      Filesort currently uses either radixsort or quicksort when sorting records.
      Radixsort is very fast, but only for certain data sets (short keys).
      For *most* cases when my_qsort2() is used, it turns out that std::stable_sort()
      is faster.
      
      This worklog will extend the choice of sorting algorithms, preferring
      std::stable_sort() when that is assumed to be better than the other two.
     @ include/my_sys.h
        Declare my_bool radixsort_is_appliccable()
     @ mysql-test/r/ctype_many.result
        Replace result set: it depended on myisam/qsort output.
     @ mysql-test/r/mix2_myisam.result
        Replace result set: it depended on myisam/qsort output.
     @ mysql-test/r/myisam.result
        Replace result set: it depended on myisam/qsort output.
     @ mysql-test/r/type_temporal_fractional.result
        stable_sort produced a slightly different permutation
        (note that we're sorting on the second column, and the two permuted rows
        have equal value for this field)
     @ mysql-test/suite/funcs_1/r/innodb_views.result
        Extend the query to be deterministic: sort on all columns.
     @ mysql-test/suite/funcs_1/r/memory_views.result
        Extend the query to be deterministic: sort on all columns.
     @ mysql-test/suite/funcs_1/views/views_master.inc
        Extend the query to be deterministic: sort on all columns.
     @ mysql-test/suite/innodb/r/innodb.result
        Replace result set: it depended on myisam/qsort output.
     @ mysql-test/valgrind.supp
        New function signature for write_keys()
     @ mysys/mf_radix.c
        Add my_bool radixsort_is_appliccable()
     @ mysys/mf_sort.c
        Use my_bool radixsort_is_appliccable()
     @ sql/filesort.cc
        Let Filesort_buffer determine how to do the sorting,
        rather than calling a global function my_string_ptr_sort()
     @ sql/filesort_utils.cc
        Add Filesort_buffer::sort_buffer() which determines the best sorting strategy.
     @ sql/filesort_utils.h
        Add Filesort_buffer::sort_buffer() which determines the best sorting strategy.
     @ unittest/gunit/CMakeLists.txt
        New unit/benchmarking test.
     @ unittest/gunit/dynarray-t.cc
        Reduce num_iterations when not doing actual benchmarking.
     @ unittest/gunit/filesort_compare-t.cc
        New unit test.

    added:
      unittest/gunit/filesort_compare-t.cc
    modified:
      include/my_sys.h
      mysql-test/r/ctype_many.result
      mysql-test/r/mix2_myisam.result
      mysql-test/r/myisam.result
      mysql-test/r/type_temporal_fractional.result
      mysql-test/suite/funcs_1/r/innodb_views.result
      mysql-test/suite/funcs_1/r/memory_views.result
      mysql-test/suite/funcs_1/views/views_master.inc
      mysql-test/suite/innodb/r/innodb.result
      mysql-test/valgrind.supp
      mysys/mf_radix.c
      mysys/mf_sort.c
      sql/filesort.cc
      sql/filesort_utils.cc
      sql/filesort_utils.h
      sql/table.h
      unittest/gunit/CMakeLists.txt
      unittest/gunit/dynarray-t.cc
 3847 Ashish Agarwal	2012-02-07
      BUG#11748748: Failing testcase on mysql-trunk. Patch to correct it.

    modified:
      storage/archive/ha_archive.cc
 3846 Guilhem Bichot	2012-02-07
      Fix for Bug #13595212 	EXTRA ROWS RETURNED ON RIGHT JOIN WITH VIEW AND IN-SUBQUERY IN WHERE:
      LEFT JOIN was wrongly converted to inner join because table maps were
      used incorrectly.
     @ mysql-test/r/subquery_all.result
        without the code fix, the last two SELECTs would return only 'j'.
     @ sql/item.h
        Scenario of the bug follows.
        Query is:
        SELECT alias2.col_varchar_nokey
        FROM t1 AS alias2
          LEFT JOIN view_D AS alias1 ON 1
        WHERE alias2.col_varchar_key IN (
          SELECT SQ2_alias1.col_varchar_nokey
          FROM view_D AS SQ2_alias1
            LEFT JOIN t1 AS SQ2_alias2
            ON (SQ2_alias2.col_int_key = SQ2_alias1.pk)
          WHERE SQ2_alias1.pk != alias1.col_int_key
            AND SQ2_alias1.col_varchar_key > alias1.col_varchar_key
        ) /* LEFT JOIN variant */;
        We merge the view. Then the subquery's LEFT JOIN is wrongly
        converted to inner join, leading to a wrong result.
        
        Why this conversion?
        
        simplify_joins() analyzes this subquery's LEFT JOIN,
        looks at its WHERE, for example at this piece of WHERE:
        "SQ2_alias1.pk != alias1.col_int_key".
        not_null_tables() is called on the left and right
        members of the "!=" (Item_func_ne)
        (not_null_tables() is defined as a map: if a table is
        in this map and has a NULL row then the item is surely
        false/unknown and thus the WHERE won't be satisfied)
        
        The left member is Item_field for SQL2_alias1.pk, i.e.
        a column of a table in the subquery's FROM clause;
        if it's NULL, the WHERE will be false; so
        not_null_tables() should return the map of "SQ2_alias1";
        and that's what it does, in this code:
        table_map Item_field::used_tables() const
        {
          if (field->table->const_table)
            return 0;					// const item
          return (depended_from ? OUTER_REF_TABLE_BIT : field->table->map);
        }
        
        The right member is, due to view merging, an Item_direct_view_ref
        wrapping an Item_field for alias1.col_int_key; the Item_direct_view_ref
        has 'depended_from'!=NULL (it belongs to a table which is "external
        to the subquery": "alias1"). But the Item_field has depended_from==NULL.
        Item_direct_view_ref::not_null_tables() is
        Item_ref::not_null_tables(), and this function calls
        not_null_tables() on the wrapped (a.k.a. "referenced")
        Item_field; and Item_field::not_null_tables() (see code copied above)
        returns the map of alias1.col_int_key because Item_field::depended_from
        is NULL.
        Returning this map is wrong: "alias1" is outside of the subquery's
        JOIN; OUTER_REF_TABLE_BIT should have been returned.
        Returning the map of alias1 confuses the code in simplify_joins(),
        which, in this test:
            if (!table->outer_join || (used_tables & not_null_tables))
        ends up comparing subquery's maps (used_tables)
        with outer query's maps (not_null_tables)! As "alias1"
        (in the outer JOIN) and "SQ2_alias2" (in the subquery) happen
        to have the same map (maps are unique *only inside the same JOIN*),
        simplify_joins() works as if the subquery's WHERE had
        SQ2_alias1.pk != SQ2_alias2.col_int_key
        and, "logically", concludes that a NULL-complemented row
        of SQ2_alias2 cannot match this, so the LEFT JOIN can be changed to an
        inner join.
        The fix is to make Item_ref::not_null_tables() work like
        its twin Item_ref::used_tables() already does (since 2004): test
        the Item_ref's depended_from too.
        
        Why did this bug happen for LEFT JOIN, and not with RIGHT JOIN?
        Maps are assigned based on the order in TABLE_LIST, and this order
        is the "parse order". Thus, with RIGHT JOIN, alias1 didn't have the
        same map as SQ2_alias2, thus the outer join was not converted;
        but it was pure luck.
        Same when the SELECT RIGHT JOIN was wrapped into a view: during parsing
        we convert RIGHT JOIN to LEFT JOIN (in the JOIN's FROM clause,
        not in TABLE_LIST) and write LEFT JOIN to the view's definition
        file, hitting the "LEFT JOIN" case.

    modified:
      mysql-test/include/subquery.inc
      mysql-test/r/subquery_all.result
      mysql-test/r/subquery_all_bka.result
      mysql-test/r/subquery_all_bka_nixbnl.result
      mysql-test/r/subquery_nomat_nosj.result
      mysql-test/r/subquery_nomat_nosj_bka.result
      mysql-test/r/subquery_nomat_nosj_bka_nixbnl.result
      mysql-test/r/subquery_none.result
      mysql-test/r/subquery_none_bka.result
      mysql-test/r/subquery_none_bka_nixbnl.result
      sql/item.h
 3845 Roy Lyseng	2012-02-07
      Bug #11829691: Pure virtual method called in Item_bool_func2::fix...()
      
      Added a test that used to crash the server.
      
      mysql-test/include/subquery.inc
        New test case for bug#11829691.
      
      mysql-test/r/subquery_all.result
      mysql-test/r/subquery_all_bka.result
      mysql-test/r/subquery_all_bka_nixbnl.result
      mysql-test/r/subquery_nomat_nosj.result
      mysql-test/r/subquery_nomat_nosj_bka.result
      mysql-test/r/subquery_nomat_nosj_bka_nixbnl.result
      mysql-test/r/subquery_none.result
      mysql-test/r/subquery_none_bka.result
      mysql-test/r/subquery_none_bka_nixbnl.result
        New test case results for bug#11829691.

    modified:
      mysql-test/include/subquery.inc
      mysql-test/r/subquery_all.result
      mysql-test/r/subquery_all_bka.result
      mysql-test/r/subquery_all_bka_nixbnl.result
      mysql-test/r/subquery_nomat_nosj.result
      mysql-test/r/subquery_nomat_nosj_bka.result
      mysql-test/r/subquery_nomat_nosj_bka_nixbnl.result
      mysql-test/r/subquery_none.result
      mysql-test/r/subquery_none_bka.result
      mysql-test/r/subquery_none_bka_nixbnl.result
 3844 Norvald H. Ryeng	2012-02-06
      Bug#13464334 SAME QUERY PRODUCES DIFFERENT RESULTS WHEN USED WITH AND
      WITHOUT UNION ALL
      
      Problem: Some outer join queries using views as inner tables do not
      evaluate conditions correctly.
      
      Inner tables of outer joins are tagged by setting the outer_join flag
      in the TABLE_LIST structure for the table. However, if the inner table
      is a view, the tables of the view are not tagged unless they are inner
      tables of a view defined as an outer join query. This means that
      tables referenced by views should some times be treated as inner
      tables of an outer join even if they are not tagged as such.
      
      In JOIN::optimize(), calls to list_contains_unique_index(), are used
      to check if GROUP BY or DISTINCT can be skipped. The function checks
      that enough columns to make it a unique key are mentioned and that
      none of the columns can return NULL. The check for NULL fails since it
      only checks the outer_join flag, which may not be set because of view
      usage. The result is the erroneous conclusion that GROUP BY or
      DISTINCT can be skipped, which in the end causes the query to return
      too many or too few rows.
      
      Fix: In list_contains_unique_index(), check if the table in question
      is in the inner part of an outer join (directly or nested) and
      therefore may return NULL values.
      
      This patch also adds checks for nested outer joins in
      Item_field::is_outer_field() and internal_remove_eq_conds().
     @ mysql-test/r/group_by.result
        Fix erroneous result.
     @ mysql-test/r/join_outer.result
        Add test case for bug #13464334.
     @ mysql-test/r/join_outer_bka.result
        Add test case for bug #13464334.
     @ mysql-test/r/join_outer_bka_nixbnl.result
        Add test case for bug #13464334.
     @ mysql-test/t/join_outer.test
        Add test case for bug #13464334.
     @ sql/item.h
        Include nested outer joins in check for outer join.
     @ sql/sql_optimizer.cc
        Include nested outer joins in checks for outer join.

    modified:
      mysql-test/r/group_by.result
      mysql-test/r/join_outer.result
      mysql-test/r/join_outer_bka.result
      mysql-test/r/join_outer_bka_nixbnl.result
      mysql-test/t/join_outer.test
      sql/item.h
      sql/sql_optimizer.cc
 3843 Vasil Dimov	2012-02-06 [merge]
      Merge mysql-5.5 -> mysql-trunk

    added:
      mysql-test/suite/innodb/r/innodb_bug11754376.result
      mysql-test/suite/innodb/t/innodb_bug11754376.test
    modified:
      storage/innobase/handler/ha_innodb.cc
 3842 Ashish Agarwal	2012-02-05 [merge]
      BUG#11754145: Merge from mysql-5.5 to mysql-trunk

    modified:
      mysql-test/include/have_64bit.inc
 3841 Nuno Carvalho	2012-02-03
      BUG#11758581 - 50801: CHANGE MASTER ACCEPTS BOGUS VARIABLES
            
      CHANGE MASTER command did not check invalid characters on its
      parameters. Also on server restart, invalid values were trimmed causing
      the loss of part of the variables value.
      
      Ensure that servers have a clean state before bogus variables tests.

    modified:
      mysql-test/suite/rpl/r/rpl_change_master.result
      mysql-test/suite/rpl/t/rpl_change_master.test
 3840 Nuno Carvalho	2012-02-03
      BUG#11758581 - 50801: CHANGE MASTER ACCEPTS BOGUS VARIABLES
      
      CHANGE MASTER command did not check invalid characters on its
      parameters. Also on server restart, invalid values were trimmed causing
      the loss of part of the variables value.
      
      SQL parser was improved to prohibit the use of new line characters on 
      CHANGE MASTER variables, throwing a ER_WRONG_VALUE error when such 
      character is used.

    modified:
      mysql-test/suite/rpl/r/rpl_change_master.result
      mysql-test/suite/rpl/t/rpl_change_master.test
      sql/sql_yacc.yy
 3839 Tor Didriksen	2012-02-03
      All the subquery_sj_xxx tests can get thread stack overrun on solaris

    modified:
      mysql-test/collections/default.experimental
 3838 Ashish Agarwal	2012-02-03
      BUG#11748748 - 37280: CHECK AND REPAIR TABLE REPORT TABLE
                            CORRUPTED WHEN RUN CONCURRENTLY WITH
      
      ISSUE: Concurrent queries in archive causes table
             corruption. Running repair and check query
             concurrently with insert query causes table
             corruption. Improper locking.
      
      SOLUTION: Locks are properly aquired.
                Initial lock is aquired and number of
                rows are remembered. Inserting
                remembered rows to new file. Locks
                are again aquired to process the
                remaining rows. Concurrent optimization
                on a same table not allowed.

    modified:
      storage/archive/ha_archive.cc
      storage/archive/ha_archive.h
 3837 Nuno Carvalho	2012-02-03 [merge]
      Merge from mysql-5.5 to mysql-trunk.
      
      Conflicts:
       mysql-test/collections/default.experimental

    modified:
      mysql-test/collections/default.experimental
 3836 Ashish Agarwal	2012-02-03 [merge]
      BUG#11748748: Null merge from mysql-5.5 to mysql-trunk

 3835 Ashish Agarwal	2012-02-03 [merge]
      BUG#11754145: Merge from mysql-5.5 to mysql-trunk

    modified:
      mysql-test/include/have_32bit.inc
      mysql-test/include/have_64bit.inc
 3834 Jorgen Loland	2012-02-03
      Assertion that selectivity does not increase by adding another 
      scan to a ROR intersect triggers. Temporarily remove it.

    modified:
      sql/opt_range.cc
 3833 Jorgen Loland	2012-02-03
      opt_trace.eq_range_statistics must only be run in debug builds.

    modified:
      mysql-test/suite/opt_trace/t/eq_range_statistics.test
 3832 Jorgen Loland	2012-02-02
      WL#5957 followup: use index statistics in ror_scan_selectivity()
                        as well if the optimizer requests it.
     @ mysql-test/r/eq_range_idx_stat.result
        Add test file for WL#5957
     @ mysql-test/r/mysqld--help-notwin.result
        Better description of eq-range-index-dive-limit
     @ mysql-test/r/mysqld--help-win.result
        Better description of eq-range-index-dive-limit
     @ mysql-test/suite/opt_trace/r/eq_range_statistics.result
        Added more checks that records_in_range is not called
     @ mysql-test/suite/opt_trace/t/eq_range_statistics.test
        Added more checks that records_in_range is not called
     @ mysql-test/t/eq_range_idx_stat.test
        Add test file for WL#5957
     @ sql/handler.cc
        Added DBUG_EXECUTE_IF that crashes server if records_in_range
        is called
     @ sql/opt_range.cc
        Use index statistics in ror_scan_selectivity() if the optimizer
        requests it.
        Added DBUG_EXECUTE_IF that crashes server if records_in_range
        is called
     @ sql/sys_vars.cc
        Better description of eq-range-index-dive-limit

    added:
      mysql-test/r/eq_range_idx_stat.result
      mysql-test/t/eq_range_idx_stat.test
    modified:
      mysql-test/r/mysqld--help-notwin.result
      mysql-test/r/mysqld--help-win.result
      mysql-test/suite/opt_trace/r/eq_range_statistics.result
      mysql-test/suite/opt_trace/t/eq_range_statistics.test
      sql/handler.cc
      sql/opt_range.cc
      sql/sys_vars.cc
 3831 Ashish Agarwal	2012-02-02 [merge]
      BUG#11754145: merge from mysql-5.5 to mysql-trunk

    modified:
      include/myisam.h
      storage/myisam/ha_myisam.cc
      storage/myisam/ha_myisam.h
      storage/myisam/mi_check.c
      storage/myisam/myisamchk.c
      storage/myisam/myisamdef.h
      storage/myisam/sort.c
 3830 Alexander Barkov	2012-02-02
      Post-fix for BUG#13458237.
      Recording correct test results.

    modified:
      mysql-test/suite/engines/funcs/r/date_function.result
 3829 Alexander Barkov	2012-02-02 [merge]
      Merging from mysql-trunk

    modified:
      mysql-test/suite/sys_vars/r/innodb_monitor_disable_basic.result
      mysql-test/suite/sys_vars/r/innodb_monitor_enable_basic.result
      mysql-test/suite/sys_vars/r/innodb_monitor_reset_all_basic.result
      mysql-test/suite/sys_vars/r/innodb_monitor_reset_basic.result
 3828 Alexander Barkov	2012-02-02 [merge]
      Merging from 5.5

    modified:
      mysql-test/suite/engines/funcs/r/db_alter_collate_ascii.result
      mysql-test/suite/engines/funcs/r/db_alter_collate_utf8.result
 3827 Marko Mäkelä	2012-02-02 [merge]
      Merge mysql-5.5 to mysql-trunk.

    modified:
      mysql-test/suite/innodb/r/innodb-index.result
      mysql-test/suite/innodb/t/innodb-index.test
      storage/innobase/row/row0merge.cc
 3826 Alexander Barkov	2012-02-02
       Bug#13616434 ASSERTION FAILED: NANOSECONDS<  1000000000
      
       Problem:
      
       negative lldiv_t values with zero integer part and non-zero fractional part
       (e.g. -0.1111)  were not detected, so negative fractional part was
       later casted to a big unsigned number, which made the assertion crash.
      
       Fix:
      
       Return error if lld.rem is negative.
      
       modified:
        mysql-test/r/type_temporal_fractional.result
        mysql-test/t/type_temporal_fractional.test
        sql/sql_time.cc 

    modified:
      mysql-test/r/type_temporal_fractional.result
      mysql-test/t/type_temporal_fractional.test
      sql/sql_time.cc
 3825 Marko Mäkelä	2012-02-02
      Fix results after fixing typo in trx_rseg_current_size.

    modified:
      mysql-test/suite/innodb/r/innodb_monitor.result
 3824 Marko Mäkelä	2012-02-02 [merge]
      Merge mysql-5.5 to mysql-trunk.

    modified:
      storage/innobase/btr/btr0btr.cc
      storage/innobase/btr/btr0sea.cc
      storage/innobase/buf/buf0buf.cc
      storage/innobase/buf/buf0dblwr.cc
      storage/innobase/ibuf/ibuf0ibuf.cc
      storage/innobase/include/btr0btr.ic
      storage/innobase/include/buf0buf.h
      storage/innobase/include/page0page.ic
      storage/innobase/lock/lock0lock.cc
      storage/innobase/page/page0cur.cc
      storage/innobase/page/page0page.cc
      storage/innobase/row/row0sel.cc
 3823 Marko Mäkelä	2012-02-02 [merge]
      Merge mysql-5.5 to mysql-trunk.

    modified:
      mysql-test/suite/innodb/t/innodb_bug34300.test
 3822 Jimmy Yang	2012-02-02
      Nonfunctional fix for a typo on a monitor counter name.
      
      Approved by Sunny Bains

    modified:
      storage/innobase/srv/srv0mon.cc
 3821 Ashish Agarwal	2012-02-02 [merge]
      BUG#11756869: Merge from mysql-5.5 to mysql-trunk

    modified:
      mysql-test/r/myisam.result
      mysql-test/t/myisam.test
      storage/myisam/mi_check.c
 3820 Hemant Kumar	2012-02-02
      Adding remaining Engine related tests to daily-trunk run.

    modified:
      mysql-test/collections/default.daily
 3819 Marko Mäkel
    modified:
      storage/innobase/ibuf/ibuf0ibuf.cc
      storage/innobase/include/univ.i
 3818 Ole John Aske	2012-02-01
      Fix for bug#13528826  TEST_IF_CHEAPER_ORDERING(): CALCULATES INCORRECT 'SELECT_LIMIT
      
      An incorrect 'adjusted select_limit' was returned from test_if_cheaper_ordering()
      if no excplicit limit-clause was specified in the query.
      
      This fix detect when a limit-clause was not specified, and returns the
      full 'table_records' when no limit-clause was used.
      
      Furthermore, this fix caused the testcase for bug #12838420 
      to change beyond what was required as a testcase for that bug.
            
      Fixed that by forcing correct query plan for testcase by
      introducing 'USE INDEX' and 'STRAIGHT_JOIN'.
     @ mysql-test/include/icp_tests.inc
        Slightly changed syntax of testcase in order to force required query plan
        for this testcase.
     @ mysql-test/include/order_by.inc
        New testcase for this bug
     @ mysql-test/r/innodb_icp.result
        Result should report the full number of records in table wo/ any limit clause.
        Also slightly changed syntax of testcase in order to force required query plan
        for this testcase.
     @ mysql-test/r/innodb_icp_all.result
        Result should report the full number of records in table wo/ any limit clause.
        Also slightly changed syntax of testcase in order to force required query plan
        for this testcase.
     @ mysql-test/r/innodb_icp_none.result
        Result should report the full number of records in table wo/ any limit clause.
        Also slightly changed syntax of testcase in order to force required query plan
        for this testcase.
     @ mysql-test/r/join_cache_nojb.result
        Result should report the full number of records in table wo/ any limit clause.
     @ mysql-test/r/myisam_icp.result
        Slightly changed syntax of testcase in order to force required query plan
        for this testcase.
     @ mysql-test/r/myisam_icp_all.result
        Slightly changed syntax of testcase in order to force required query plan
        for this testcase.
     @ mysql-test/r/myisam_icp_none.result
        Slightly changed syntax of testcase in order to force required query plan
        for this testcase.
     @ mysql-test/r/order_by_all.result
        Accept result for new testcase
     @ mysql-test/r/order_by_icp_mrr.result
        Accept result for new testcase
     @ mysql-test/r/order_by_none.result
        Accept result for new testcase

    modified:
      mysql-test/include/icp_tests.inc
      mysql-test/include/order_by.inc
      mysql-test/r/innodb_icp.result
      mysql-test/r/innodb_icp_all.result
      mysql-test/r/innodb_icp_none.result
      mysql-test/r/join_cache_nojb.result
      mysql-test/r/myisam_icp.result
      mysql-test/r/myisam_icp_all.result
      mysql-test/r/myisam_icp_none.result
      mysql-test/r/order_by_all.result
      mysql-test/r/order_by_icp_mrr.result
      mysql-test/r/order_by_none.result
      sql/sql_select.cc
 3817 Tor Didriksen	2012-02-01
      All the subquery_sj_xxx tests can get thread stack overrun on solaris

    modified:
      mysql-test/collections/default.experimental
 3816 Tor Didriksen	2012-02-01
      re-enable test for Bug#13536661, but not for embedded

    modified:
      mysql-test/r/optimizer_debug_sync.result
      mysql-test/t/optimizer_debug_sync.test
 3815 Tor Didriksen	2012-02-01
      WL#6159 post-push fix: adding a new directory was not such a good idea

    removed:
      include/byteorder/
    renamed:
      include/byteorder/big_endian.h => include/big_endian.h
      include/byteorder/byte_order_generic.h => include/byte_order_generic.h
      include/byteorder/byte_order_generic_x86.h => include/byte_order_generic_x86.h
      include/byteorder/byte_order_generic_x86_64.h => include/byte_order_generic_x86_64.h
      include/byteorder/little_endian.h => include/little_endian.h
    modified:
      include/CMakeLists.txt
      include/my_byteorder.h
 3814 Hemant Kumar	2012-02-01
      Added engine independent tests to default.daily collection.

    modified:
      mysql-test/collections/default.daily
 3813 Hemant Kumar	2012-02-01
      Update collection for default.weekly.Update the vardir name for 4K page size and 8K page size.

    modified:
      mysql-test/collections/default.weekly
 3812 Andrei Elkin	2012-01-31 [merge]
      merge from 5.5.

    added:
      mysql-test/include/libdaemon_example.ini
    modified:
      client/mysql_plugin.c
      mysql-test/r/mysql_plugin.result
      mysql-test/t/mysql_plugin.test
      storage/innobase/fil/fil0fil.cc
 3811 Martin Hansson	2012-01-31
      WL#5874: CURRENT_TIMESTAMP as DEFAULT for DATETIME columns.

    added:
      mysql-test/include/function_defaults.inc
      mysql-test/include/function_defaults_notembedded.inc
      mysql-test/r/function_defaults.result
      mysql-test/r/function_defaults_notembedded.result
      mysql-test/std_data/onerow.xml
      mysql-test/suite/rpl/r/rpl_function_defaults.result
      mysql-test/suite/rpl/t/rpl_function_defaults.test
      mysql-test/t/function_defaults.test
      mysql-test/t/function_defaults_notembedded.test
      mysql-test/wl5874_updown
      sql/delayable_insert_operation.h
      unittest/gunit/copy_info-t.cc
      unittest/gunit/create_field-t.cc
      unittest/gunit/delayable_insert_operation-t.cc
      unittest/gunit/fake_table.h
      unittest/gunit/field_timestamp-t.cc
      unittest/gunit/item_func_now_local-t.cc
      unittest/gunit/mock_create_field.h
      unittest/gunit/mock_field_datetime.h
      unittest/gunit/mock_field_timestamp.h
      unittest/gunit/mock_field_timestampf.h
      unittest/gunit/sql_table-t.cc
    modified:
      include/my_bitmap.h
      mysql-test/r/create.result
      mysql-test/r/mysqldump.result
      mysql-test/r/type_temporal_fractional.result
      mysql-test/r/type_timestamp.result
      mysql-test/t/create.test
      mysql-test/t/mysqldump.test
      mysql-test/t/type_temporal_fractional.test
      mysql-test/t/type_timestamp.test
      mysys/my_bitmap.c
      sql/event_db_repository.cc
      sql/field.cc
      sql/field.h
      sql/field_conv.cc
      sql/ha_ndbcluster.cc
      sql/ha_partition.cc
      sql/item.cc
      sql/item.h
      sql/item_timefunc.cc
      sql/item_timefunc.h
      sql/log_event.cc
      sql/log_event_old.cc
      sql/rpl_info_table.cc
      sql/sp.cc
      sql/sp_head.cc
      sql/sql_base.cc
      sql/sql_class.cc
      sql/sql_class.h
      sql/sql_insert.cc
      sql/sql_insert.h
      sql/sql_load.cc
      sql/sql_parse.cc
      sql/sql_partition.cc
      sql/sql_show.cc
      sql/sql_table.cc
      sql/sql_table.h
      sql/sql_update.cc
      sql/table.cc
      sql/table.h
      sql/unireg.cc
      storage/archive/ha_archive.cc
      storage/csv/ha_tina.cc
      storage/example/ha_example.cc
      storage/federated/ha_federated.cc
      storage/heap/ha_heap.cc
      storage/innobase/handler/ha_innodb.cc
      storage/myisam/ha_myisam.cc
      storage/myisammrg/ha_myisammrg.cc
      unittest/gunit/CMakeLists.txt
 3810 Jorgen Loland	2012-01-31
      BUG#13599013 - MAX/MIN + SUBQUERY IN WHERE CLAUSE MATCHING NO
                     ROWS + INDEX DOES NOT RETURN NULL
      
      An aggregated expression of type MIN or MAX shall return NULL
      if the query is implicitly grouped and there is no HAVING 
      clause that evaluates to FALSE.  In this bug we had a query 
      of the form
      
        SELECT MIN(indexed_column) FROM t1 WHERE (4) IN (SELECT 1)
      
      No row can satisfy the WHERE condition but there is no HAVING
      clause, so the query should have returned NULL (but did
      return an empty set).
      
      The problem was that when a query only selects aggregate
      functions that are optimized away, JOIN::exec() goes into an
      early-exit branch. This branch did not honor the requirement
      stated by the definition above. The fix is to call
      return_zero_rows() instead of send_eof() in this branch. If
      the query selects aggregates and does not have a HAVING
      clause that evaluates to false, return_zero_rows() returns
      a NULL-based row before calling send_eof().
     @ mysql-test/include/subquery_sj.inc
        Add test for BUG#13599013
     @ mysql-test/r/subquery_mat.result
        Updated result of test that used to be incorrect
     @ mysql-test/r/subquery_mat_none.result
        Updated result of test that used to be incorrect
     @ mysql-test/r/subquery_sj_all.result
        Add test for BUG#13599013
     @ mysql-test/r/subquery_sj_all_bka.result
        Add test for BUG#13599013
     @ mysql-test/r/subquery_sj_all_bka_nixbnl.result
        Add test for BUG#13599013
     @ mysql-test/r/subquery_sj_all_bkaunique.result
        Add test for BUG#13599013
     @ mysql-test/r/subquery_sj_dupsweed.result
        Add test for BUG#13599013
     @ mysql-test/r/subquery_sj_dupsweed_bka.result
        Add test for BUG#13599013
     @ mysql-test/r/subquery_sj_dupsweed_bka_nixbnl.result
        Add test for BUG#13599013
     @ mysql-test/r/subquery_sj_dupsweed_bkaunique.result
        Add test for BUG#13599013
     @ mysql-test/r/subquery_sj_firstmatch.result
        Add test for BUG#13599013
     @ mysql-test/r/subquery_sj_firstmatch_bka.result
        Add test for BUG#13599013
     @ mysql-test/r/subquery_sj_firstmatch_bka_nixbnl.result
        Add test for BUG#13599013
     @ mysql-test/r/subquery_sj_firstmatch_bkaunique.result
        Add test for BUG#13599013
     @ mysql-test/r/subquery_sj_loosescan.result
        Add test for BUG#13599013
     @ mysql-test/r/subquery_sj_loosescan_bka.result
        Add test for BUG#13599013
     @ mysql-test/r/subquery_sj_loosescan_bka_nixbnl.result
        Add test for BUG#13599013
     @ mysql-test/r/subquery_sj_loosescan_bkaunique.result
        Add test for BUG#13599013
     @ mysql-test/r/subquery_sj_mat.result
        Add test for BUG#13599013
     @ mysql-test/r/subquery_sj_mat_bka.result
        Add test for BUG#13599013
     @ mysql-test/r/subquery_sj_mat_bka_nixbnl.result
        Add test for BUG#13599013
     @ mysql-test/r/subquery_sj_mat_bkaunique.result
        Add test for BUG#13599013
     @ mysql-test/r/subquery_sj_mat_nosj.result
        Add test for BUG#13599013
     @ mysql-test/r/subquery_sj_none.result
        Add test for BUG#13599013
     @ mysql-test/r/subquery_sj_none_bka.result
        Add test for BUG#13599013
     @ mysql-test/r/subquery_sj_none_bka_nixbnl.result
        Add test for BUG#13599013
     @ mysql-test/r/subquery_sj_none_bkaunique.result
        Add test for BUG#13599013
     @ sql/sql_executor.cc
        Call return_zero_rows() instead of send_eof() if all tables have
        been optimized away and there are no matching rows.

    modified:
      mysql-test/include/subquery_sj.inc
      mysql-test/r/subquery_mat.result
      mysql-test/r/subquery_mat_none.result
      mysql-test/r/subquery_sj_all.result
      mysql-test/r/subquery_sj_all_bka.result
      mysql-test/r/subquery_sj_all_bka_nixbnl.result
      mysql-test/r/subquery_sj_all_bkaunique.result
      mysql-test/r/subquery_sj_dupsweed.result
      mysql-test/r/subquery_sj_dupsweed_bka.result
      mysql-test/r/subquery_sj_dupsweed_bka_nixbnl.result
      mysql-test/r/subquery_sj_dupsweed_bkaunique.result
      mysql-test/r/subquery_sj_firstmatch.result
      mysql-test/r/subquery_sj_firstmatch_bka.result
      mysql-test/r/subquery_sj_firstmatch_bka_nixbnl.result
      mysql-test/r/subquery_sj_firstmatch_bkaunique.result
      mysql-test/r/subquery_sj_loosescan.result
      mysql-test/r/subquery_sj_loosescan_bka.result
      mysql-test/r/subquery_sj_loosescan_bka_nixbnl.result
      mysql-test/r/subquery_sj_loosescan_bkaunique.result
      mysql-test/r/subquery_sj_mat.result
      mysql-test/r/subquery_sj_mat_bka.result
      mysql-test/r/subquery_sj_mat_bka_nixbnl.result
      mysql-test/r/subquery_sj_mat_bkaunique.result
      mysql-test/r/subquery_sj_mat_nosj.result
      mysql-test/r/subquery_sj_none.result
      mysql-test/r/subquery_sj_none_bka.result
      mysql-test/r/subquery_sj_none_bka_nixbnl.result
      mysql-test/r/subquery_sj_none_bkaunique.result
      sql/sql_executor.cc
 3809 Georgi Kodinov	2012-01-31
      Addendum to the fix for bug #13586336
      Suppressed the warnings in the pre-existing test change_user 
      because this test is also run in embedded where the 
      authentication checks are not compiled, so no warnings are 
      emitted.

    modified:
      mysql-test/r/change_user.result
      mysql-test/t/change_user.test
 3808 Tor Didriksen	2012-01-31 [merge]
      merge opt-team => trunk

    modified:
      mysql-test/r/derived.result
      mysql-test/r/func_in_all.result
      mysql-test/r/group_by.result
      mysql-test/r/group_min_max.result
      mysql-test/r/index_merge_myisam.result
      mysql-test/r/innodb_icp_all.result
      mysql-test/r/innodb_mrr_all.result
      mysql-test/r/innodb_mrr_cost_all.result
      mysql-test/r/join_cache_bka.result
      mysql-test/r/join_cache_bka_nixbnl.result
      mysql-test/r/join_cache_bkaunique.result
      mysql-test/r/join_cache_bnl.result
      mysql-test/r/join_cache_nojb.result
      mysql-test/r/myisam_explain_non_select_all.result
      mysql-test/r/mysqld--help-notwin.result
      mysql-test/r/mysqld--help-win.result
      mysql-test/r/optimizer_debug_sync.result
      mysql-test/r/order_by_all.result
      mysql-test/r/subquery_all.result
      mysql-test/r/subquery_all_bka.result
      mysql-test/r/subselect_innodb.result
      mysql-test/suite/innodb/r/innodb_mysql.result
      mysql-test/suite/opt_trace/r/bugs_no_prot_all.result
      mysql-test/suite/opt_trace/r/bugs_ps_prot_all.result
      mysql-test/suite/sys_vars/r/optimizer_switch_basic.result
      mysql-test/t/group_by.test
      mysql-test/t/optimizer_debug_sync.test
      sql/item.cc
      sql/sql_priv.h
 3807 Georgi Kodinov	2012-01-30
      Bug #13586336: SRVGEN - HIBISCUS: ISSUE DEPRECATION WARNING FOR 
      LEGACY AUTHENTICATION METHOD
      
      Added warnings as follows : 
      1) Make the server option secure_auth ON per default and issue a warning
      stating that legacy passwords are deprecated if it is ever overridden.
      2) Issue a deprecation warning if a new user account ever is created or
      otherwise configured to use the mysql_old_password plugin.
      3) When upgrading an old system, issue deprecation warnings if an old
      password hash digest is found in the password field.
      
      Added tests for the new warnings and updated existing tests to
      either set secure_auth back to FALSE or adjust the result where this is not
      possible.

    modified:
      mysql-test/r/change_user.result
      mysql-test/r/connect.result
      mysql-test/r/mysql_upgrade.result
      mysql-test/r/mysqld--help-notwin.result
      mysql-test/r/mysqld--help-win.result
      mysql-test/suite/sys_vars/r/old_passwords_func.result
      mysql-test/suite/sys_vars/r/secure_auth_basic.result
      mysql-test/suite/sys_vars/r/secure_auth_func.result
      mysql-test/suite/sys_vars/t/secure_auth_basic.test
      mysql-test/t/change_user.test
      mysql-test/t/connect.test
      mysql-test/t/mysql_upgrade.test
      scripts/mysql_system_tables_fix.sql
      sql/sql_acl.cc
      sql/sys_vars.cc
 3806 Nuno Carvalho	2012-01-30
      BUG#13613270 - INCLUDE/WAIT_FOR_SLAVE_IO_ERROR.INC IS NOT USING INCLUDE/SHOW_SLAVE_STATUS.INC
      
      Unlike in previous versions, include/wait_for_slave_io_error.inc is not 
      using include/show_slave_status.inc duplicating test code lines and not
      taking advantage of include/show_slave_status.inc features.
      
      Changed include/wait_for_slave_io_error.inc to use 
      include/show_slave_status.inc. 
      Updated tests results that use include/wait_for_slave_io_error.inc.

    modified:
      mysql-test/include/wait_for_slave_io_error.inc
      mysql-test/suite/rpl/r/rpl_checksum.result
      mysql-test/suite/rpl/r/rpl_log_pos.result
      mysql-test/suite/rpl/r/rpl_manual_change_index_file.result
      mysql-test/suite/rpl/r/rpl_packet.result
      mysql-test/suite/rpl/r/rpl_row_event_max_size.result
      mysql-test/suite/rpl/t/rpl_checksum.test
      mysql-test/suite/rpl/t/rpl_log_pos.test
      mysql-test/suite/rpl/t/rpl_manual_change_index_file.test
      mysql-test/suite/rpl/t/rpl_packet.test
      mysql-test/suite/rpl/t/rpl_row_event_max_size.test
 3805 Inaam Rana	2012-01-30 [merge]
      Merge from 5.5

    modified:
      storage/innobase/os/os0file.cc
 3804 Tor Didriksen	2012-01-30 [merge]
      merge opt-team => trunk

    added:
      mysql-test/suite/opt_trace/r/eq_range_statistics.result
      mysql-test/suite/opt_trace/t/eq_range_statistics.test
      mysql-test/suite/sys_vars/r/eq_range_index_dive_limit_basic.result
      mysql-test/suite/sys_vars/t/eq_range_index_dive_limit_basic.test
    modified:
      include/my_base.h
      mysql-test/include/join_cache.inc
      mysql-test/include/subquery_mat.inc
      mysql-test/include/subquery_sj.inc
      mysql-test/r/derived.result
      mysql-test/r/greedy_optimizer.result
      mysql-test/r/join_cache_bka.result
      mysql-test/r/join_cache_bka_nixbnl.result
      mysql-test/r/join_cache_bkaunique.result
      mysql-test/r/join_cache_bnl.result
      mysql-test/r/join_cache_nojb.result
      mysql-test/r/join_nested.result
      mysql-test/r/join_nested_bka.result
      mysql-test/r/join_nested_bka_nixbnl.result
      mysql-test/r/mysqld--help-notwin.result
      mysql-test/r/mysqld--help-win.result
      mysql-test/r/subquery_mat.result
      mysql-test/r/subquery_mat_all.result
      mysql-test/r/subquery_mat_none.result
      mysql-test/r/subquery_sj_all.result
      mysql-test/r/subquery_sj_all_bka.result
      mysql-test/r/subquery_sj_all_bka_nixbnl.result
      mysql-test/r/subquery_sj_all_bkaunique.result
      mysql-test/r/subquery_sj_dupsweed.result
      mysql-test/r/subquery_sj_dupsweed_bka.result
      mysql-test/r/subquery_sj_dupsweed_bka_nixbnl.result
      mysql-test/r/subquery_sj_dupsweed_bkaunique.result
      mysql-test/r/subquery_sj_firstmatch.result
      mysql-test/r/subquery_sj_firstmatch_bka.result
      mysql-test/r/subquery_sj_firstmatch_bka_nixbnl.result
      mysql-test/r/subquery_sj_firstmatch_bkaunique.result
      mysql-test/r/subquery_sj_loosescan.result
      mysql-test/r/subquery_sj_loosescan_bka.result
      mysql-test/r/subquery_sj_loosescan_bka_nixbnl.result
      mysql-test/r/subquery_sj_loosescan_bkaunique.result
      mysql-test/r/subquery_sj_mat.result
      mysql-test/r/subquery_sj_mat_bka.result
      mysql-test/r/subquery_sj_mat_bka_nixbnl.result
      mysql-test/r/subquery_sj_mat_bkaunique.result
      mysql-test/r/subquery_sj_mat_nosj.result
      mysql-test/r/subquery_sj_none.result
      mysql-test/r/subquery_sj_none_bka.result
      mysql-test/r/subquery_sj_none_bka_nixbnl.result
      mysql-test/r/subquery_sj_none_bkaunique.result
      mysql-test/suite/opt_trace/r/bugs_no_prot_all.result
      mysql-test/suite/opt_trace/r/bugs_no_prot_none.result
      mysql-test/suite/opt_trace/r/bugs_ps_prot_all.result
      mysql-test/suite/opt_trace/r/bugs_ps_prot_none.result
      mysql-test/suite/opt_trace/r/charset.result
      mysql-test/suite/opt_trace/r/general2_no_prot.result
      mysql-test/suite/opt_trace/r/general2_ps_prot.result
      mysql-test/suite/opt_trace/r/general_no_prot_all.result
      mysql-test/suite/opt_trace/r/general_no_prot_none.result
      mysql-test/suite/opt_trace/r/general_ps_prot_all.result
      mysql-test/suite/opt_trace/r/general_ps_prot_none.result
      mysql-test/suite/opt_trace/r/range_no_prot.result
      mysql-test/suite/opt_trace/r/range_ps_prot.result
      mysql-test/suite/opt_trace/r/subquery_no_prot.result
      mysql-test/suite/opt_trace/r/subquery_ps_prot.result
      sql/filesort.cc
      sql/filesort_utils.h
      sql/handler.cc
      sql/opt_range.cc
      sql/sql_class.h
      sql/sql_join_buffer.cc
      sql/sql_join_buffer.h
      sql/sql_optimizer.cc
      sql/sql_optimizer.h
      sql/sql_select.cc
      sql/structs.h
      sql/sys_vars.cc
      sql/table.h
      unittest/gunit/filesort_buffer-t.cc
 3803 Tor Didriksen	2012-01-30 [merge]
      merge 5.5 => trunk

    modified:
      libmysql/CMakeLists.txt
 3802 Praveenkumar Hulakund	2012-01-30
      BUG#12602983 - USER WITHOUT PRIVILEGE ON ROUTINE CAN DISCOVER ITS EXISTENCE
                       (TAKE #2)
        
        Description:
        ------------------------------------------------
        User which doesn't have any privileges on the routine or on mysql.proc table 
        still is able to discover its existence. This is wrong as one should not know 
        anything about a database object unless one has privileges on it.
        
        Analysis:
        ------------------------------------------------
        The problem was, user without any privileges on routine was able to find
        out whether it existed or not. "select <func_name>" and "call <proc_name>" 
        were checking for the existence of the <func_name> or <proc_name>" before 
        checking whether user has enough privileges to execute function or not. 
        Error "<func_name> doesn't exists" or "<proc_name> doesn't exists" was 
        reported.
        
        For CREATE, ALTER, DROP we are already providing proper error
            DROP:
            ---------
            mysql> drop function mysqltest.f1;
            ERROR 1370 (42000): alter routine command denied to user ''@'localhost' for
                                routine 'mysqltest.f1'
            mysql> drop procedure  mysqltest.f1;
            ERROR 1370 (42000): alter routine command denied to user ''@'localhost' for
                                routine 'mysqltest.f1'
            
            CREATE:
            ----------
            mysql> create function mysqltest.f1() returns int return 0; 
            ERROR 1044 (42000): Access denied for user ''@'localhost' to database 
                                'mysqltest'
            mysql> create procedure mysqltest.p1() begin end; 
            ERROR 1044 (42000): Access denied for user ''@'localhost' to database 
                                'mysqltest'
            
            ALTER:
            ---------
            mysql> alter function mysqltest.f1 comment "TESTING";
            ERROR 1370 (42000): alter routine command denied to user ''@'localhost' for
                                routine 'mysqltest.f1'
            mysql> alter procedure  mysqltest.f1 comment "TESTING";
            ERROR 1370 (42000): alter routine command denied to user ''@'localhost' for 
                                routine 'mysqltest.f1'
        
        For "SELECT <function_name>" and "CALL <procedure_name>" we were 
        providing "doesn't exists" error.  Also when non existing function is used while
        creating the views we see same issue.
        
        Fix:
        ------------------------------------------------
        SELECT and CALL didn't have the logic to check execute privilege on routine for
        the user. This patch solves problem by checking the privileges to user before 
        checking the existence of the function.
     @ mysql-test/r/lowercase_fs_off.result
            Permission to execute procedure is verified before searching the procedure.
            Since, procedure name printed from the name specified in query now, new o/p
            has capital P in  db1.P1 (for the statement "call db1.P1")
     @ sql/item_func.cc
            For stored functions call in select and create view, checking the privilege to
            execute stored function before checking the existence of it by calling
            "check_routine_access".
     @ sql/sql_parse.cc
            Checking the privilege to execute stored procedure before checking the existence
            of it by calling "check_routine_access".

    modified:
      mysql-test/r/lowercase_fs_off.result
      mysql-test/r/sp-security.result
      mysql-test/t/sp-security.test
      sql/item_func.cc
      sql/sql_parse.cc
 3801 Chaithra Gopalareddy	2012-01-30
      Bug#11764651-57510:Comparing uninitialized values in CTYPE-BIN.c
      
      The first part of the problem reported in the bug, is  fixed in the patch for 
      Bug#11766212.This fix is for the second part of the problem reported.
      
      PROBLEM:
      
      The following query results in an invalid read when run with valgrind
      
      select left(geomfromtext("point(0 0)"),1) not in ( @@global.query_cache_type,1 not between -1 and "a", elt(1,'',1,1,1), geomfromtext("point(1 -1)") in ("bbbbbbbbb"),1);
      
      5.5.8-debug valgrind output:
      Invalid read of size 1
      at: my_strnncollsp_utf8 (ctype-utf8.c:2590)
      by: sortcmp (sql_string.cc:668)
      by: cmp_item_sort_string::cmp (item_cmpfunc.h:1019)
      by: Item_func_in::val_int (item_cmpfunc.cc:4130)
      by: Item::send (item.cc:5864)
      by: Protocol::send_result_set_row (protocol.cc:848)
      by: select_send::send_data (sql_class.cc:1789)
      by: JOIN::exec (sql_select.cc:1857)
      by: mysql_select (sql_select.cc:2568)
      by: handle_select (sql_select.cc:296)
      by: execute_sqlcom_select (sql_parse.cc:4464)
      by: mysql_execute_command (sql_parse.cc:2066)
      by: mysql_parse (sql_parse.cc:5500)
      by: dispatch_command (sql_parse.cc:1030)
      by: do_command (sql_parse.cc:770)
      by: do_handle_one_connection (sql_connect.cc:745)
      by: handle_one_connection (sql_connect.cc:684)
      by: start_thread (pthread_create.c:301)
      
      Problem Analysis:
      The above mentioned invalid read can be reproduced using a simplified query like this one:
      select left(geomfromtext("point(0 0)"),1) in (@@global.query_cache_type,1,"");
      
      Problem is present in cmp_item_sort_string::store_value, because it does not make 
      its own copy of the value evaluated. Instead tries to refer to a temporary value 
      that could be changed or deleted by other functions. Hence while reusing the 
      evaluated value in case of Item_func_in::val_int, we get a valgrind error saying 
      Invalid read. 
      
      With respect to the above query, this is what happens:
      
      a) To be compared with @@global.query_cache_type, function left() is evaluated in 
      "string" context. This evaluation modifies Item_func_left::tmp_value, and returns 
      a pointer to this tmp_value. 
      The "comparator object" (cmp_item) stores the returned pointer in 
      cmp_item::value_res and then the comparison is done. 
      
      b) To be compared with 1, left() is evaluated in "real number" context, which 
      modifies Item_func_left::tmp_value again. Comparison is done with the real value.
      
      c) To be compared with "", left() is NOT evaluated again because cmp_item already 
      has a pointer to the value of left() in string context (from (a)). However, this 
      value was a pointer to Item_func_left::tmp_value, and (b) has modified this String. So we would be  looking at out-of-date data. 
      Hence while reusing the evaluated value in case of Item_func_in::val_int, we get 
      a valgrind error saying Invalid read. 
      
      Solution:
      The fix it to make a copy of the value retured from val_str() in 
      cmp_item_sort_string::store_value().
     @ mysql-test/include/func_in.inc
        Added test case for Bug#11764651
     @ mysql-test/r/func_in_all.result
        Result file changes for the test case added
     @ mysql-test/r/func_in_icp.result
        Result file changes for the test case added
     @ mysql-test/r/func_in_icp_mrr.result
        Result file changes for the test case added
     @ mysql-test/r/func_in_mrr.result
        Result file changes for the test case added
     @ mysql-test/r/func_in_mrr_cost.result
        Result file changes for the test case added
     @ mysql-test/r/func_in_none.result
        Result file changes for the test case added
     @ sql/item_cmpfunc.h
        Changed cmp_item_sort_string::store_value() to make a copy of the evaluated result

    modified:
      mysql-test/include/func_in.inc
      mysql-test/r/func_in_all.result
      mysql-test/r/func_in_icp.result
      mysql-test/r/func_in_icp_mrr.result
      mysql-test/r/func_in_mrr.result
      mysql-test/r/func_in_mrr_cost.result
      mysql-test/r/func_in_none.result
      sql/item_cmpfunc.h
 3800 Dmitry Shulga	2012-01-30
      This patch fixes bug#13608371 (formerly known as bug 62311):
      segfault in mysqld during early SIGHUP handling.
      
      If during server start up some signals like SIGHUP are caught before full
      server initialization has been done then server may crash.
      
      The reason for this bug is that there was a race condition between signal
      handler thread and main thread that was doing server initialization.
      For example, if SIGHUP signal was delivered to server and caught by signal
      handler thread before server had completed initialization of Event_scheduler
      then server crashed when try to access to uninitialized event_scheduler
      instance during signal handling.
      
      To avoid such race condition we suspend signal processing before full
      initialization of all server components has been completed successfully.
      It's achieved by waiting for on COND_server_started conditional variable
      until a flag mysqld_server_started is true.
      
      Moreover superfluous call of pthread_sigmask() to set thread signal mask
      was removed since all signal have been already blocked during execution
      of my_init_signal().
      
      Also call of mysql_cond_broadcast(&COND_thread_count) at signal_hand()
      was moved under protection of mutex LOCK_thread_count to provide deterministic
      schedule behaviour.

    modified:
      sql/mysqld.cc
 3799 Christopher Powers	2012-01-28
      Bug#13440472 MANY VALGRIND FAILURES ON DAILY-TRUNK
        
      Added Valgrind suppression case for add_pfs_instr_to_array().

    modified:
      mysql-test/valgrind.supp
 3798 Ole John Aske	2012-01-27
      Followup fix for bug#13330645.
      
      As we now don't request HA_MRR_SORTED when there are no sort requirements, we have
      to add some '--sorted_result' to the tests in order to get the expected row order
      in the results.

    modified:
      mysql-test/suite/parts/inc/partition-dml-1-7.inc
      mysql-test/suite/parts/inc/partition-dml-1-8.inc
      mysql-test/suite/parts/inc/partition_key_16col.inc
      mysql-test/suite/parts/inc/partition_key_32col.inc
      mysql-test/suite/parts/inc/partition_key_4col.inc
      mysql-test/suite/parts/inc/partition_key_8col.inc
      mysql-test/suite/parts/r/partition_special_myisam.result
 3797 Guilhem Bichot	2012-01-27
      Now that pb2 has a daily run with non-default innodb page size,
      we get test failures because page size influences cost 
      and thus influences the trace. Solution: disable the failing
      test if page size is non-default.

    modified:
      mysql-test/suite/opt_trace/include/range.inc
 3796 Praveenkumar Hulakund	2012-01-27
      BUG#11764786: 57657: TEMPORARY MERGE TABLE WITH TEMPORARY UNDERLYING IS BROKEN BY ALTER
            
            Analysis:
            --------------------------------------------
            When merge table is created, then MyISAM MERGE creates a file .MRG. Engine adds
            names of the tables (children tables) and insert method in this file. So, if we
            consider the tables listed in "HOW TO REPEAT" section then content of .MRG file 
            of "tm_temp_temp"table  will be as below
            
                    >cat #<tmp_file_name>.MRG
                    -----------------------
                    ./test/t1_temp
                    #INSERT_METHOD=FIRST
                    -----------------------
            
            So for both, temporary and non-temporary children table "table name" is added in
            .MRG file in "./<db_name>/<table_name>" format. So that the table can be opened
            using <db_name>.<table_name> [from comments written in function 
            "ha_myisammrg::create"].
            
            When sql query to alter merge table "tm_temp_temp" is called then "mysql_alter_table"
            function calls "open_and_lock_tables" which in turn call the table open function of 
            MyISAM MERGE storage. MyISAM MERGE storage handler, holds all the open table 
            information in open_tables of type MYRG_TABLE.So, in open function of MyISAM Merge 
            handler, table "tm_temp_temp" is opened and held with the open_tables.
            
            Since, this merge table contains child_table (t1_temp). All the child table are 
            opened and TABLE_LIST of child table will be "children_l" member of MyISAM Merge handler.
            children_l is doubly linked list of all child tables.
            
                children_l -> TABLE_LIST::next_global -> TABLE_LIST::next_global
                #             #               ^          #               ^
                #             #               |          #               |
                #             #               +--------- TABLE_LIST::prev_global
                #             #                                          |
                #       |<--- TABLE_LIST::prev_global                    |
                #                                                        |
                children_last_l -----------------------------------------+
            
            
            And information of all child tables are also held in the open_tables of MyISAM merge 
            handler.
            
            The name of the table file for each table opened is held in the "filename" of 
            open_tables->table (type is struct st_myisam_info). 
            
            * Why merge table is getting corrupted in "alter table"?
              Alter table calls function "update_create_info" function. In "update_create_info"
              function of MyISAM Merge Handler, merge list (TABLE_LIST of child tables) is 
              populated in create_info object of type HA_CREATE_INFO. And this list is then used 
              to create new .MRG file to reflect the alter operations.
            
              In function, "update_create_info" of MyISAM MERGE, the DB name and the TABLE name
              are extracted from the filename stored in the member "open_tables->table->filename"
              as below,
            
                split_file_name(open_table->table->filename, &db_name, &file_name);
            
              This db name and file name are stored in the create_info object. And while creating
              the .MRG file, table name of the child table is written into it in the 
              "./<db_name>/<table_name> format.
            
              When merge table has non-temporary child tables then "filename" contains proper db 
              name and file name.
            
              But when merge table has temporary tables then "filename" has a temporary filename
              created in "/tmp" directory (for eg: /tmp/#sql7a3b_2_1). So when "split_file_name"
              function is called with this value, "tmp" is stored in the db name "#sql7a3b_2_1"
              is stored in the file name. So here while creating new .MRG file, "./tmp/#sql7a3b_2_1"
              written as a child entry. 
            
                    >cat #<tmp_file_name>.MRG
                    -----------------------
                    "./tmp/#sql7a3b_2_1"
                    #INSERT_METHOD=LAST
                    -----------------------
            
              After this, any operation on merge table gives error as its fails to find "tmp" DB 
              and table name "#sql7a3b_2_1". And because of the same reason "check table" also
              reported the "table corruption" error.
            
            *. Why we wont see this issue while creating merge table?
               While creating merge table, "create_info" object of type HA_CREATE_INFO is formed by 
               parser with valid "merge_list" (with proper DB name and table name for temporary
               and non-temporary tables). So, create table function of MyISAM MERGE creates .MRG file.
               So, .MRG contains proper entry for table after creating a table.
            
                    >cat #<tmp_file_name>.MRG
                    -----------------------
                    ./test/t1_temp
                    #INSERT_METHOD=FIRST
                    -----------------------
            
               Since, create_info populated with merge_list by parser itself, function "update_create_info"
               is not called.
            
            Possible Fix:
            --------------------------------------------
            Instead of getting db name and table name from "open_tables->table->filename" in 
            update_create_info function, the db name and table name can be obtained from
            the TABLE_LIST of each child table stored in the "children_l" of MyISAM MERGE
            handler. For both the temporary and non-temporary child table the TABLE_LIST 
            is propogated with proper DB name and table name in members "db" and "table_name".
            
            So as a, logic of the "update_create_info" MyISAM MERGE handler is
            changed so that it gets db name and table from TABLE_LIST stored in "children_l".

    modified:
      mysql-test/r/merge.result
      mysql-test/t/merge.test
      storage/myisammrg/ha_myisammrg.cc
 3795 Dmitry Shulga	2012-01-27
      Patch for bug#12872824 (formerly known as 62125): testing stored function
      result for null incorrectly yields 1292 warning.
      
      The reason for this bug was that when server executed expression 'IS NULL'
      for return value of some stored function it calculated the return
      value before checking it for NULL. During return value calculation
      it's assumed that a value has INTEGER type that is not true in general.
      
      The solution is to evaluate return value for NULL without its calculation.
     @ mysql-test/r/sp.result
        Added results of test for bug#12872824.
     @ mysql-test/t/sp.test
        Added test for bug#12872824.
     @ sql/item_func.cc
        Added implementation for virtual method update_null_value into
        Item_func_sp. Implementation for this method doesn't call 
        Item::update_null_value() in order to get null flag for
        return value. Instead we call private method execute() that
        check return value for null and set null flag.

    modified:
      mysql-test/r/sp.result
      mysql-test/t/sp.test
      sql/item_func.cc
      sql/item_func.h
 3794 Yasufumi Kinoshita	2012-01-27 [merge]
      Fix for build break introduced at fix for Bug #13413535
      asked by Calvin

    modified:
      storage/innobase/lock/lock0lock.cc
 3793 Christopher Powers	2012-01-26
      Bug#13440472 MANY VALGRIND FAILURES ON DAILY-TRUNK
      
      Added one more suppression

    modified:
      mysql-test/valgrind.supp
 3792 Christopher Powers	2012-01-26
      Bug#13440472 MANY VALGRIND FAILURES ON DAILY-TRUNK
        
      Deallocate the array of PFS instrument configuration values during
      server shutdown to avoid Valgrind errors.

    modified:
      sql/mysqld.cc
      storage/perfschema/pfs_server.cc
 3791 Christopher Powers	2012-01-26 [merge]
      local merge

    renamed:
      mysql-test/suite/sys_vars/r/innodb_sort_buf_size_basic.result => mysql-test/suite/sys_vars/r/innodb_sort_buffer_size_basic.result
      mysql-test/suite/sys_vars/t/innodb_sort_buf_size_basic.test => mysql-test/suite/sys_vars/t/innodb_sort_buffer_size_basic.test
    modified:
      mysql-test/include/range.inc
      mysql-test/r/mysqld--help-win.result
      mysql-test/r/optimizer_debug_sync.result
      mysql-test/r/plugin.result
      mysql-test/r/range_all.result
      mysql-test/r/range_icp.result
      mysql-test/r/range_icp_mrr.result
      mysql-test/r/range_mrr.result
      mysql-test/r/range_mrr_cost.result
      mysql-test/r/range_none.result
      mysql-test/t/optimizer_debug_sync.test
      mysql-test/t/plugin.test
      mysql-test/t/temp_table.test
      sql/handler.cc
      sql/handler.h
      sql/item.cc
      sql/opt_explain.cc
      sql/opt_range.cc
      storage/example/ha_example.cc
      storage/innobase/btr/btr0btr.cc
      storage/innobase/btr/btr0cur.cc
      storage/innobase/buf/buf0buf.cc
      storage/innobase/handler/ha_innodb.cc
      storage/innobase/ibuf/ibuf0ibuf.cc
      storage/innobase/include/btr0btr.h
      storage/innobase/include/mtr0log.ic
      storage/innobase/lock/lock0lock.cc
      storage/innobase/page/page0page.cc
      storage/innobase/row/row0ins.cc
      storage/innobase/row/row0sel.cc
      storage/innobase/row/row0umod.cc
      storage/innobase/row/row0upd.cc
      storage/innobase/srv/srv0srv.cc
      storage/innobase/trx/trx0purge.cc
      storage/innobase/trx/trx0rec.cc
      mysql-test/suite/sys_vars/r/innodb_sort_buffer_size_basic.result
      mysql-test/suite/sys_vars/t/innodb_sort_buffer_size_basic.test
 3790 Christopher Powers	2012-01-26 [merge]
      local merge

    modified:
      mysql-test/suite/rpl/r/rpl_heartbeat_basic.result
      mysql-test/suite/rpl/t/rpl_heartbeat_basic.test
      storage/innobase/handler/ha_innodb.cc
 3789 Christopher Powers	2012-01-25
      Bug#13440472 MANY VALGRIND FAILURES ON DAILY-TRUNK
      
      Deallocate the array of PFS instrument configuration values during
      server shutdown to avoid Valgrind errors.

    modified:
      sql/mysqld.cc
      storage/perfschema/pfs_instr_class.cc
      storage/perfschema/pfs_instr_class.h
      storage/perfschema/pfs_server.cc
 3788 Tor Didriksen	2012-01-25 [merge]
      merge 5.5 => trunk

    modified:
      mysql-test/r/func_str.result
      mysql-test/t/func_str.test
      strings/dtoa.c
 3787 Inaam Rana	2012-01-25 [merge]
      merge from parent

    modified:
      sql/item.cc
 3786 Inaam Rana	2012-01-25
      Bug#13619598	HANG IN IO HELPER THREAD WHEN USING SIMULATED AIO
      
      rb://910
      approved by: Marko Makela
      
      When:
      
      * single page flush is performed
      * dblwr is disabled
      * simulated aio is used
      
      There is a possibility of hang in IO helper thread because we miss to
      wake up handler threads. This does not happen with native aio because
      IO threads in that case wait on io_getevents() call and need not to be
      woken up. 

    modified:
      storage/innobase/buf/buf0dblwr.cc
      storage/innobase/buf/buf0flu.cc
      storage/innobase/include/buf0flu.h
 3785 Ole John Aske	2012-01-25
      Fix for bug#13531865 TEST_IF_SKIP_SORT_ORDER() INCORRECTLY SKIP FILESORT IF 'TYPE' IS REF_OR_NULL
            
      Introduce the function is_ref_or_null_optimized() which is used by test_if_subkey()
      in order to avoid changing to an index requiring 'ref_or_null' access as we can
      never skip sort order for such an index. 
     @ mysql-test/include/order_by.inc
        Added testcase: REF_OR_NULL should never be selected as access 'type' when filesort is skipped by an ordered index.
     @ mysql-test/r/order_by_icp_mrr.result
        corrected testcase: As 'ref_or_null' can't skip filesort, use 'ref' access as choosen by condition optimizer.
     @ mysql-test/r/order_by_none.result
        corrected testcase: As 'ref_or_null' can't skip filesort, use 'ref' access as choosen by condition optimizer.

    modified:
      mysql-test/include/order_by.inc
      mysql-test/r/order_by_icp_mrr.result
      mysql-test/r/order_by_none.result
      sql/sql_select.cc
 3784 Ole John Aske	2012-01-25
      Fix for bug#13529048 TEST_IF_SKIP_SORT_ORDER() DON'T HAVE TO FILESORT A SINGLE ROW.
      
      test_if_skip_sort_order() should catch the jointypes
      JT_EQ_REF, JT_CONST and JT_SYSTEM and skip sort order for these.
      
      Didn't add a specific testcase for this bug as it should be
      covered by existing testcases which now will skip 'Using filesort'

    modified:
      mysql-test/r/innodb_mrr.result
      mysql-test/r/innodb_mrr_cost.result
      mysql-test/r/innodb_mrr_cost_icp.result
      mysql-test/r/innodb_mrr_icp.result
      mysql-test/r/innodb_mrr_none.result
      sql/sql_select.cc
 3783 Ole John Aske	2012-01-25
      Fix for Bug#13514959 QUERY PLAN FAILS TO 'USING INDEX' WHERE IT SHOULD
      
      Fix two issues related to 'keyread' from covering indexes (Explain: 'Using index')
      
      1)
         Recalculate (and set) keyread in test_if_skip_sort_order() whenever
         the best_key is changed (Optimizer may have changed its mind)
      
      2) If we during cleanup in test_if_skip_sort_order() decides
         to delete the 'save_quick' we had when entering
         test_if_skip_sort_order(), the ::~QUICK_RANGE_SELECT
         d'tor will set_keyread(FALSE)' even if another quick was
         set up to be used in 1) above.
     @ mysql-test/r/innodb_icp.result
        Updated resultfile where 'Using index' is expected
     @ mysql-test/r/innodb_icp_none.result
        Updated resultfile where 'Using index' is expected
     @ sql/opt_range.cc
        ::~QUICK_RANGE_SELECT Should not 'set_keyread(FALSE)' as that
        has nothing to do with destruction of the QUICK_RANGE_SELECT.
        ('head' might actually use another 'quick')
     @ sql/records.cc
        If 'keyread' is used, ut should be cleared when we clean up
        after have read this table. (Instead of doing it as a 
        side effect in QUICK_RANGE_SELECT d'tor)
     @ sql/sql_select.cc
        Fix code for setting of set_keyread() in test_if_skip_sort_order().
        Always recalculate it if 'best_key' is changed.
        ******
        Don't apply join-fanout and predicate selctivite if there was no
        limit-clause
        ******
        Fix up EXPLAIN to use the 'ordered_index_usage' as 
        calculated by ::optimize() instead of calling
        test_if_skip_sort_order()

    modified:
      mysql-test/r/innodb_icp.result
      mysql-test/r/innodb_icp_none.result
      sql/opt_range.cc
      sql/records.cc
      sql/sql_select.cc
 3782 Martin Hansson	2012-01-25
      Bug#13536661: Deactivates the test case until a better place for it is found.

    modified:
      mysql-test/r/temp_table.result
      mysql-test/t/temp_table.test
 3781 Mayank Prasad	2012-01-25
      Bug#13570079: - MAIN.MYSQL_EMBEDDED TEST FAILS ON WINDOWS-X86-64BIT ON DAILY-TRUNK
      
      Description: 
      -This test case (mysql_embedded) was failing on WINODWS 64 only.
      
      Issue:
      -In mysql_embedded test case, queries was wrappen in single
       quote ('), which was not treated as string delimiter. 
      
      Solution:
      -Changed single quote (') to double quote (") and test case
       is passing now.

    modified:
      mysql-test/mysql-test-run.pl
      mysql-test/t/mysql_embedded.test
 3780 Tor Didriksen	2012-01-25 [merge]
      merge 5.5 => trunk

    modified:
      mysql-test/r/bigint.result
      mysql-test/r/func_in_icp.result
      mysql-test/r/func_in_icp_mrr.result
      mysql-test/r/func_in_mrr.result
      mysql-test/r/func_in_mrr_cost.result
      mysql-test/r/func_in_none.result
      mysql-test/t/bigint.test
      sql/item.cc
      sql/item_cmpfunc.cc
 3779 Dmitry Shulga	2012-01-25 [merge]
      Manual merge of patch for bug#11753187 from mysql-5.5 tree.

    added:
      mysql-test/suite/sys_vars/r/stored_program_cache_basic.result
      mysql-test/suite/sys_vars/t/stored_program_cache_basic.test
    modified:
      mysql-test/r/mysqld--help-notwin.result
      mysql-test/r/mysqld--help-win.result
      sql/mysqld.cc
      sql/mysqld.h
      sql/sp_cache.cc
      sql/sp_cache.h
      sql/sql_parse.cc
      sql/sql_prepare.cc
      sql/sys_vars.cc
 3778 Martin Hansson	2012-01-25
      Bug#13536661: VALGRIND: DEFINITELY LOST: 552 BYTES IN 1 BLOCKS IN
      CREATE_TMP_TABLE AND HIGHER
      
      A remnant from refactoring: When creating a temporary table we no
      longer keep a pointer to it in the JOIN structure, hence in case of
      subsequent errors inside JOIN::create_intermediate_table() there was a
      memory leak.
      
      Fixed by adding a goto label err: that does the cleanup.
      
      Made testable by adding the debug sync point tmp_table_created.

    modified:
      mysql-test/r/temp_table.result
      mysql-test/t/temp_table.test
      sql/sql_executor.cc
      sql/sql_tmp_table.cc
 3777 Marko Mäkelä	2012-01-25 [merge]
      Merge mysql-5.5 to mysql-trunk.

    modified:
      storage/innobase/btr/btr0cur.cc
 3776 Annamalai Gurusami	2012-01-25
      Bug #13604034 SET GLOBAL INNODB_UNDO_LOGS=0 SUCCEEDS BUT LEADS TO 
      AN ASSERT MAX_UNDO_LOGS > 0
      
      The min value was not checked, while setting the value of innodb_undo_logs config
      value.  This was fixed.  Also, the max value and the default value is not fixed in
      the case of innodb_undo_logs.  So after starting innodb, the max and default value
      of the innodb_undo_logs config will be reset to the proper value based on the 
      srv_available_undo_logs variable.  
      
      This system variable framework does not support doing the validation for default
      value (because the boundaries min and max is not fixed).  Because of this limitation
      of the framework, we needed to adjust the max and default value of the config object.

    modified:
      mysql-test/suite/sys_vars/r/innodb_undo_logs_basic.result
      mysql-test/suite/sys_vars/t/innodb_undo_logs_basic.test
      storage/innobase/handler/ha_innodb.cc
 3775 Christopher Powers	2012-01-24
      Bug 13018537 - TIMER NORMALIZATION FOR IDLE EVENTS
      
      PFS tables now uses the IDLE timer to normalize IDLE event times.
      Related changes:
       - Moved global class registration to a separate function
       - Added missing PFS class type enums
       - Created array of class-timer mapping
       - For all tables, cache timer normalizer in table class
       - For tables where timer normalizer changes row-to-row, get a new normalizer when the view (event type) changes
       - For tables where timer normalizer does not change, initialize normalizer once in rnd_init()

    modified:
      storage/perfschema/ha_perfschema.cc
      storage/perfschema/pfs_engine_table.cc
      storage/perfschema/pfs_engine_table.h
      storage/perfschema/pfs_instr_class.cc
      storage/perfschema/pfs_instr_class.h
      storage/perfschema/pfs_server.cc
      storage/perfschema/table_esgs_by_account_by_event_name.cc
      storage/perfschema/table_esgs_by_account_by_event_name.h
      storage/perfschema/table_esgs_by_host_by_event_name.cc
      storage/perfschema/table_esgs_by_host_by_event_name.h
      storage/perfschema/table_esgs_by_thread_by_event_name.cc
      storage/perfschema/table_esgs_by_thread_by_event_name.h
      storage/perfschema/table_esgs_by_user_by_event_name.cc
      storage/perfschema/table_esgs_by_user_by_event_name.h
      storage/perfschema/table_esgs_global_by_event_name.cc
      storage/perfschema/table_esgs_global_by_event_name.h
      storage/perfschema/table_esms_by_account_by_event_name.cc
      storage/perfschema/table_esms_by_account_by_event_name.h
      storage/perfschema/table_esms_by_host_by_event_name.cc
      storage/perfschema/table_esms_by_host_by_event_name.h
      storage/perfschema/table_esms_by_thread_by_event_name.cc
      storage/perfschema/table_esms_by_thread_by_event_name.h
      storage/perfschema/table_esms_by_user_by_event_name.cc
      storage/perfschema/table_esms_by_user_by_event_name.h
      storage/perfschema/table_esms_global_by_event_name.cc
      storage/perfschema/table_esms_global_by_event_name.h
      storage/perfschema/table_events_stages.cc
      storage/perfschema/table_events_stages.h
      storage/perfschema/table_events_statements.cc
      storage/perfschema/table_events_statements.h
      storage/perfschema/table_events_waits.cc
      storage/perfschema/table_events_waits_summary.cc
      storage/perfschema/table_ews_by_account_by_event_name.cc
      storage/perfschema/table_ews_by_host_by_event_name.cc
      storage/perfschema/table_ews_by_thread_by_event_name.cc
      storage/perfschema/table_ews_by_user_by_event_name.cc
      storage/perfschema/table_ews_global_by_event_name.cc
      storage/perfschema/table_tiws_by_index_usage.cc
      storage/perfschema/table_tiws_by_index_usage.h
      storage/perfschema/table_tiws_by_table.cc
      storage/perfschema/table_tiws_by_table.h
      storage/perfschema/table_tlws_by_table.cc
      storage/perfschema/table_tlws_by_table.h
 3774 Alexander Barkov	2012-01-24
      Better GCOV coverage for WL#946

    modified:
      mysql-test/r/date_formats.result
      mysql-test/r/temporal_literal.result
      mysql-test/r/type_date.result
      mysql-test/r/type_temporal_fractional.result
      mysql-test/r/type_temporal_upgrade.result
      mysql-test/r/type_time.result
      mysql-test/t/date_formats.test
      mysql-test/t/temporal_literal.test
      mysql-test/t/type_date.test
      mysql-test/t/type_temporal_fractional.test
      mysql-test/t/type_temporal_upgrade.test
      mysql-test/t/type_time.test
 3773 Alexander Barkov	2012-01-24 [merge]
      Merging from mysql-5.5

 3772 Alexander Barkov	2012-01-24 [merge]
      Merging from mysql-trunk

    modified:
      sql/debug_sync.cc
      sql/sql_select.cc
      storage/innobase/data/data0data.cc
      storage/innobase/include/data0data.h
      storage/innobase/include/data0data.ic
 3771 Alexander Barkov	2012-01-24 [merge]
      Merging from 5.5, with additional 5.6 changes:
      
      Now LAST_DAY('YYYY-MM-DD') does not require non-zero DD value
      to return a non-NULL result.

    modified:
      mysql-test/r/func_time.result
      mysql-test/t/func_time.test
      sql/item_timefunc.cc
 3770 Nuno Carvalho	2012-01-23 [merge]
      Automerge from mysql-5.5 into mysql-trunk.

    modified:
      mysql-test/include/wait_for_ndb_to_binlog.inc
 3769 Vasil Dimov	2012-01-23
      In fts_get_total_document_count() the stats of a table should have
      been initialized when the table was opened. This convert a conditional
      stats recalc (if not initialized) to an assert.
      
      Discussed with:	Jimmy (via IM)

    modified:
      storage/innobase/fts/fts0fts.cc
 3768 Vasil Dimov	2012-01-23
      Non-functional change: whitespace fixups in printout messages

    modified:
      storage/innobase/dict/dict0stats.cc
 3767 Manish Kumar	2012-01-23 [merge]
      BUG#11752315 
      Null merge from mysql-5.5 to mysql-trunk.

 3766 Raghav Kapoor	2012-01-23
      BUG#13601606 - FAILED VIEW CREATION ERROR MESSAGE (FOR DB NOT PRESENT) 
                     NEEDS BIG IMPROVEMENT
      
      BACKGROUND:
      Trying to create a view in a non-existent database gave the 
      error "Can't create/write to file ..." which does not really 
      describe the reason for the failure and is also different 
      from how the similar problem is reported for CREATE TABLE. 
      
      FIX:
      This bug is fixed by reporting ER_BAD_DB_ERROR "Unknown 
      database ..." when trying to create a view in a non-existent
      database.This is the same error already reported by CREATE 
      TABLE. A test case has been written and corresponding result 
      file has been updated.

    modified:
      mysql-test/r/view.result
      mysql-test/t/view.test
      sql/sql_view.cc
 3765 Alexander Barkov	2012-01-23 [merge]
      Merging from mysql-trunk

    modified:
      storage/innobase/dict/dict0load.cc
      storage/innobase/handler/ha_innodb.cc
 3764 Alexander Barkov	2012-01-23 [merge]
      Merging Bug#11752408 from mysql-5.5

    modified:
      include/m_ctype.h
      mysql-test/r/ctype_utf8.result
      mysql-test/t/ctype_utf8.test
      mysys/charset-def.c
      strings/ctype-ucs2.c
      strings/ctype-utf8.c
 3763 Andrei Elkin	2012-01-22
      merging the final part of post-fixes from 5.5 bug13593869-64035 branch.

    modified:
      mysql-test/suite/rpl/r/rpl_log_pos.result
      mysql-test/suite/rpl/r/rpl_manual_change_index_file.result
      mysql-test/suite/rpl/r/rpl_packet.result
      mysql-test/suite/rpl/r/rpl_stm_start_stop_slave.result
      sql/rpl_master.cc
 3762 Sunny Bains	2012-01-21
      Remove extra new line.

    modified:
      storage/innobase/trx/trx0trx.cc
 3761 Mattias Jonsson	2012-01-21
      post-push fix of Bug#13559657.
      
      main.partition_explicit_prune fails on embedded builds
      due to different default engine (MyISAM instead of InnoDB).
      
      Fixed by setting the engine to InnoDB.

    modified:
      mysql-test/r/partition_explicit_prune.result
      mysql-test/t/partition_explicit_prune.test
 3760 Christopher Powers	2012-01-20
      Bug#13440472 - MANY VALGRIND FAILURES ON DAILY-TRUNK
        
      Disable inline optimizations for valgrind builds to avoid false positives.

    modified:
      cmake/build_configurations/mysql_release.cmake
 3759 Inaam Rana	2012-01-20 [merge]
      merge from mysql-5.5

    modified:
      storage/innobase/os/os0file.cc
 3758 Mattias Jonsson	2012-01-20 [merge]
      merge of bug#13559657 into -trunk
      
      Also updated two result files.

    modified:
      mysql-test/r/partition_explicit_prune.result
      mysql-test/suite/parts/r/partition-dml-1-9-innodb.result
      mysql-test/suite/parts/r/partition-dml-1-9-myisam.result
      mysql-test/t/partition_explicit_prune.test
      sql/sql_lex.cc
 3757 Mattias Jonsson	2012-01-20 [merge]
      merge

    modified:
      mysql-test/r/partition_binlog_stmt.result
      mysql-test/t/partition_binlog_stmt.test
 3756 Georgi Kodinov	2012-01-20 [merge]
      merge

    modified:
      mysql-test/include/have_example_plugin.inc
      mysql-test/include/have_semisync_plugin.inc
      mysql-test/include/have_simple_parser.inc
      mysql-test/include/have_udf.inc
      mysql-test/t/udf_skip_grants-master.opt
 3755 Dmitry Shulga	2012-01-20 [merge]
      Auto-merge of patch for bug#13070308 from mysql-5.5 tree.

    modified:
      mysql-test/r/xa.result
      mysql-test/t/xa.test
 3754 Vasil Dimov	2012-01-18
      Revert sunny.bains@oracle.com-20111103014755-9zzp2oscgvem35th
      
      The asm code that was introduced in that revision causes a crash in
      ut_cpuid() when that function is not inlined, e.g. compiled with an
      attribute ``__attribute__((noinline))'' or with gcc's -fno-inline.
      The crash only happens on some 64 bit platforms, fimafeng09.no.oracle.com
      for example.
      
      It is not clear what sunny.bains@stripped
      was trying to address, but the old code (before that changeset) does pass all
      tests currently.
      
      Should any problems arise later (the ones that the reverted changeset was
      addressing) and if they are due to C vs. C++ difference we could add
      ``extern "C"'' to the function ut_cpuid().
      
      Discussed with:	Marko and Sunny (via IM)

    modified:
      storage/innobase/ut/ut0crc32.cc
 3753 Nuno Carvalho	2012-01-19 [merge]
      Merge from mysql-5.5 into mysql-trunk.
      
      Conflicts:
       mysql-test/include/show_slave_status.inc

    modified:
      mysql-test/extra/rpl_tests/rpl_start_stop_slave.test
      mysql-test/include/show_slave_status.inc
      mysql-test/suite/rpl/r/rpl_stm_start_stop_slave.result
 3752 Andrei Elkin	2012-01-19 [merge]
      merging from repo.

    modified:
      storage/innobase/os/os0file.cc
 3751 Andrei Elkin	2012-01-19 [merge]
      merge from 5.5.

    modified:
      mysql-test/extra/rpl_tests/rpl_start_stop_slave.test
      sql/share/errmsg-utf8.txt
 3750 Jimmy Yang	2012-01-19
      Fix Bug #13552359, SOME INFORMATION SCHEMA TABLE FOR FTS SHOULD RESTRICT
      ACCESSIBILIY TO SUPER USER
      
      rb://881 Approved by Inaam

    modified:
      storage/innobase/handler/i_s.cc
 3749 Norvald H. Ryeng	2012-01-19
      Bug#13500371 63704: CONVERSION OF '1.' TO A NUMBER GIVES ERROR 1265
      (WARN_DATA_TRUNCATED)
      
      Problem: Converting strings ending with a decimal point (such as '1.')
      to floating point numbers causes a truncation warning to be emitted.
      
      Field_float::store() and Field_double::store() calls my_strtod_int()
      to convert strings to floating point numbers. Function my_strtod_int()
      doesn't consume the decimal point if it is the last character of the
      string, and this leads to Field_float::store() and
      Field_double::store() reporting unconsumed character as truncated
      data.
      
      Fix: Let my_strtod_int() consume the decimal point also if it is the
      last character of the string. This behavior is consistent with that of
      scanf().
     @ mysql-test/r/type_float.result
        Test case for bug #13500371.
     @ mysql-test/t/type_float.test
        Test case for bug #13500371.
     @ strings/dtoa.c
        Consume decimal point also at end of string.

    modified:
      mysql-test/r/type_float.result
      mysql-test/t/type_float.test
      strings/dtoa.c
 3748 kevin.lewis@stripped	2012-01-18
      Fix a UNIV_DEBUG compile error.

    modified:
      storage/innobase/dict/dict0boot.cc
 3747 kevin.lewis@stripped	2012-01-18
      The primary change is to use macro constants for system table field
      and column numbers more consistently.  The code uses hard coded
      numbers for both column numbers and cluster index field numbers.
      Contants are used very inconsistently.  This patch uses the
      convention DICT_COL__{table_name}__{column_name) for the columns
      of the table and of DICT_FLD__{table_name}__{column_name) for the
      field numbers in the indexes.  Instead of using precompiled macros,
      these constants are declared as enum values which the debugger can
      interpret.  The preprocessor macros that tested the consistency of
      these constants are converted to debug runtime asserts.
      
      Some included files are deleted from ha_innodb.cc since they no
      longer need to be included directly.  All other changes are just
      code cleanup.
      
      Patch approved by Marko in http://bur03.no.oracle.com/rb/r/877.

    modified:
      storage/innobase/dict/dict0boot.cc
      storage/innobase/dict/dict0crea.cc
      storage/innobase/dict/dict0dict.cc
      storage/innobase/dict/dict0load.cc
      storage/innobase/dict/dict0mem.cc
      storage/innobase/fil/fil0fil.cc
      storage/innobase/handler/ha_innodb.cc
      storage/innobase/handler/i_s.cc
      storage/innobase/include/dict0boot.h
      storage/innobase/include/dict0mem.h
      storage/innobase/include/dict0types.h
      storage/innobase/include/fil0fil.h
      storage/innobase/pars/pars0pars.cc
      storage/innobase/row/row0merge.cc
      storage/innobase/row/row0mysql.cc
      storage/innobase/srv/srv0start.cc
 3746 Tor Didriksen	2012-01-18
      Bug#13580775 ASSERTION FAILED: RECORD_LENGTH == M_RECORD_LENGTH
      
      filesort tries to re-use the sort buffer between invocations in order to save
      malloc/free overhead.
      The fix for Bug 11748783 - 37359: FILESORT CAN BE MORE EFFICIENT.
      added an assert that buffer properties (num_records, record_length) are
      consistent between invocations. Indeed, they are not necessarily consistent.
      
      Fix: re-allocate the sort buffer if properties change.
     @ mysql-test/r/partition.result
        New test case.
     @ mysql-test/t/partition.test
        New test case.
     @ sql/filesort.cc
        If we already have allocated a sort buffer, then verify that the same properties
        (keys, rec_length) that we need for this invocation.
     @ sql/filesort_utils.h
        Add sort_buffer_properties
     @ sql/table.h
        Add sort_buffer_properties
     @ unittest/gunit/filesort_buffer-t.cc
        Test new member funciton.

    modified:
      mysql-test/r/partition.result
      mysql-test/t/partition.test
      sql/filesort.cc
      sql/filesort_utils.h
      sql/table.h
      unittest/gunit/filesort_buffer-t.cc
 3745 Praveenkumar Hulakund	2012-01-18
      BUG#11764724 - 57586: UNKNOWN TABLE WHEN TRYING TO DROP A TABLE AND NO AVAILABLE UNDO 
      SLOTS LEFT
      
      Modified changes made as part of fix for this bug to  fix Perf regression.
      FIX for perf regression:
      -------------------------------
      Current fix had a if condition to check whether return value of function "ha_delete_table"
      is "HA_ERR_TOO_MANY_CONCURRENT_TRXS". If yes then I used to "goto err" and in "err:" check
      whether error is "HA_ERR_TOO_MANY_CONCURRENT_TRXS" and print error message. So there were 
      TWO if conditions added to check whether error is "HA_ERR_TOO_MANY_CONCURRENT_TRXS" or not.
      These conditions were getting evaluated every time, this caused perf regression.
      
      As a fix, removed both the if conditions and added only one if condition in "if (error)" block.
      This condition is added to check whether error is "HA_ERR_TOO_MANY_CONCURRENT_TRXS". If yes 
      then print error and then "goto err". Now, this condition is checked only if there is any error.
      Otherwise it will not be evaluated and so performance should not be affected.
      
      Actual Issue Description:
      -------------------------------
      If you attempt to drop an existing InnoDB table, but you do not have any 
      available undo slots open, then you will receive an "unknown table" error. 
      
      mysql> DROP TABLE test.innodb_table_monitor; 
      ERROR 1051 (42S02): Unknown table 'innodb_table_monitor' 
      
      Actual issue Analysis:
      -------------------------------
      Here, max number of concurrent transactions/connections are started and then the
      next transaction to drop a table is initiated. Since, system has already max number
      of transactions running, next transaction to "drop table" was not started and innodb
      returned error "DB_TOO_MANY_CONCURRENT_TRXS". But this error was not handled properly 
      in sql layer because of which "drop table" operation was throwing wrong error message. 
      
      Fix:
      -------------------------------
      As a fix, I have added check in sql (in function "mysql_rm_table_part2") to handle error 
      code "HA_ERR_TOO_MANY_CONCURRENT_TRXS" and throw proper error message.
      
      Ouput of drop command after fix (with max number of concurrent transaction running)
      
      mysql> drop table test;
      ERROR 177 (HY000): Too many active concurrent transactions

    modified:
      sql/sql_table.cc
 3744 Andrei Elkin	2012-01-18 [merge]
      merging from local branch to mysql-trunk.

 3743 Andrei Elkin	2012-01-18 [merge]
      manual merge due to bug3593869-64035 from 5.5 to mysql-trunk.

    modified:
      mysql-test/extra/rpl_tests/rpl_start_stop_slave.test
      mysql-test/suite/rpl/r/rpl_log_pos.result
      mysql-test/suite/rpl/r/rpl_manual_change_index_file.result
      mysql-test/suite/rpl/r/rpl_packet.result
      mysql-test/suite/rpl/r/rpl_stm_start_stop_slave.result
      mysql-test/suite/rpl/t/rpl_stm_start_stop_slave.test
      sql/rpl_master.cc
      sql/share/errmsg-utf8.txt
 3742 Tor Didriksen	2012-01-17 [merge]
      merge opt-team => trunk

    modified:
      mysql-test/include/subquery_mat.inc
      mysql-test/include/subquery_sj.inc
      mysql-test/r/group_by.result
      mysql-test/r/subquery_mat.result
      mysql-test/r/subquery_mat_all.result
      mysql-test/r/subquery_mat_none.result
      mysql-test/r/subquery_sj_all.result
      mysql-test/r/subquery_sj_all_bka.result
      mysql-test/r/subquery_sj_all_bka_nixbnl.result
      mysql-test/r/subquery_sj_all_bkaunique.result
      mysql-test/r/subquery_sj_dupsweed.result
      mysql-test/r/subquery_sj_dupsweed_bka.result
      mysql-test/r/subquery_sj_dupsweed_bka_nixbnl.result
      mysql-test/r/subquery_sj_dupsweed_bkaunique.result
      mysql-test/r/subquery_sj_firstmatch.result
      mysql-test/r/subquery_sj_firstmatch_bka.result
      mysql-test/r/subquery_sj_firstmatch_bka_nixbnl.result
      mysql-test/r/subquery_sj_firstmatch_bkaunique.result
      mysql-test/r/subquery_sj_loosescan.result
      mysql-test/r/subquery_sj_loosescan_bka.result
      mysql-test/r/subquery_sj_loosescan_bka_nixbnl.result
      mysql-test/r/subquery_sj_loosescan_bkaunique.result
      mysql-test/r/subquery_sj_mat.result
      mysql-test/r/subquery_sj_mat_bka.result
      mysql-test/r/subquery_sj_mat_bka_nixbnl.result
      mysql-test/r/subquery_sj_mat_bkaunique.result
      mysql-test/r/subquery_sj_mat_nosj.result
      mysql-test/r/subquery_sj_none.result
      mysql-test/r/subquery_sj_none_bka.result
      mysql-test/r/subquery_sj_none_bka_nixbnl.result
      mysql-test/r/subquery_sj_none_bkaunique.result
      mysql-test/t/group_by.test
      sql/item_subselect.cc
      sql/sql_base.cc
      sql/sql_executor.cc
      sql/sql_optimizer.cc
      sql/sql_planner.cc
      sql/sql_select.h
 3741 Norvald H. Ryeng	2012-01-17
      Bug#11764371 57196: MORE FUN WITH ASSERTION: !TABLE->FILE ||
      TABLE->FILE->INITED == HANDLER::
      
      Problem: An assertion is triggered by queries that assign the result
      of a subquery to a user variable when the outer query is doing
      DISTINCT and GROUP BY.
      
      Because of the DISTINCT and GROUP BY, the query is executed using two
      temporary tables. The first temporary table is filled by executing the
      query over the base tables. The subquery is also executed, and the
      result is stored in the user variable. After this execution,
      join_free() is called to free data from the old join and release all
      read locks since the next execution is based on the temporary table.
      
      The second round of execution is over the first temporary table, but
      because of the user variable assignment, the subquery is re-executed
      over the base tables. Since these tables are now unlocked, an
      assertion guarding handler::ha_rnd_next() against reading from
      unlocked tables is triggered.
      
      Fix: In change_to_use_tmp_field(), if the item is an
      Item_func_set_user_var that stores the value of a subquery, replace it
      with a cloned Item_func_set_user_var that stores the result of an
      Item_field that contains the result of the subquery. This makes the
      next execution round use the stored value instead of re-executing the
      subquery.
      
      This patch also fixes bug #13260504. No additional testcase required.
     @ mysql-test/r/user_var.result
        Test case for bug #11764371.
     @ mysql-test/t/user_var.test
        Test case for bug #11764371.
     @ sql/item_func.h
        Add constructors.
     @ sql/sql_executor.cc
        Change user variable assignment functions to read from fields after
        tables have been unlocked.

    modified:
      mysql-test/r/user_var.result
      mysql-test/t/user_var.test
      sql/item_func.h
      sql/sql_executor.cc
 3740 Vasil Dimov	2012-01-17
      Adjust mtr .result files after
      vasil.dimov@oracle.com-20120117090419-4sjlh72v00w0chv4

    modified:
      mysql-test/suite/funcs_1/r/is_columns_mysql.result
      mysql-test/suite/funcs_1/r/is_columns_mysql_embedded.result
      mysql-test/suite/funcs_1/r/is_tables_mysql.result
      mysql-test/suite/funcs_1/r/is_tables_mysql_embedded.result
 3739 Georgi Kodinov	2012-01-17 [merge]
      merge

    modified:
      mysql-test/r/func_time.result
      mysql-test/t/func_time.test
      scripts/mysql_system_tables.sql
      sql/item.cc
      storage/innobase/dict/dict0stats.cc
 3738 Georgi Kodinov	2012-01-17 [merge]
      merge mysql-5.5->mysql-trunk

    modified:
      include/my_global.h
      mysql-test/suite/sys_vars/r/character_sets_dir_basic.result
      mysql-test/suite/sys_vars/r/plugin_dir_basic.result
      mysql-test/suite/sys_vars/t/character_sets_dir_basic.test
      scripts/mysqld_safe.sh
      sql/mysqld.cc
      sql/sql_plugin.cc
      sql/sql_udf.cc
 3737 Nirbhay Choubey	2012-01-17 [merge]
      Null-merge from mysql-5.5.

 3736 Nirbhay Choubey	2012-01-17
      Bug#13006947 62472: MYSQLHOTCOPY ERRORS ON DATABASES
                          CONTAINING MYISAM VIEWS
      
      mysqlhotcopy failed when 'views' were involved. This
      happened as it tried to lock the views (along with the
      base tables) using 'FLUSH TABLES <table_name> .. WITH
      READ LOCK' command, which is invalid.
      
      Fixed by dividing the table list into views & base tables,
      and then locking the views separately.
     @ scripts/mysqlhotcopy.sh
        Bug#13006947 62472: MYSQLHOTCOPY ERRORS ON DATABASES
                            CONTAINING MYISAM VIEWS
        
        Views will now be locked separately (from base tables)
        as they cannot be flushed/locked using 'FLUSH TABLE ..
        WITH READ LOCK'.

    modified:
      scripts/mysqlhotcopy.sh
 3735 Marko Mäkelä	2012-01-16 [merge]
      Merge mysql-5.5 to mysql-trunk.

    added:
      mysql-test/suite/sys_vars/r/innodb_change_buffering_debug_basic.result
      mysql-test/suite/sys_vars/r/innodb_doublewrite_batch_size_basic.result
      mysql-test/suite/sys_vars/r/innodb_page_hash_locks_basic.result
      mysql-test/suite/sys_vars/r/innodb_trx_rseg_n_slots_debug_basic.result
      mysql-test/suite/sys_vars/t/innodb_change_buffering_debug_basic.test
      mysql-test/suite/sys_vars/t/innodb_doublewrite_batch_size_basic.test
      mysql-test/suite/sys_vars/t/innodb_page_hash_locks_basic.test
      mysql-test/suite/sys_vars/t/innodb_trx_rseg_n_slots_debug_basic.test
    modified:
      mysql-test/suite/sys_vars/r/all_vars.result
      mysql-test/suite/sys_vars/t/all_vars.test
 3734 Marko Mäkelä	2012-01-16 [merge]
      Merge mysql-5.5 to mysql-trunk.

    modified:
      storage/innobase/ibuf/ibuf0ibuf.cc
 3733 Tor Didriksen	2012-01-16 [merge]
      merge 5.5 => trunk

    modified:
      CMakeLists.txt
 3732 Nuno Carvalho	2012-01-16 [merge]
      Automerge from mysql-5.5 to mysql-trunk.

    modified:
      mysql-test/extra/rpl_tests/rpl_extra_col_master.test
 3731 Norvald H. Ryeng	2012-01-16
      Bug#11766143 59185: ASSERTION FAILED: (FIXED == 1), FILE
      ITEM_STRFUNC.CC, LINE 2760
      
      Problem: The server crashes when a subquery that is involved in a
      comparison requiring a character set conversion causes an error.
      
      During optimization, predicates are combined into multiple equality
      predicates by a call to optimize_cond(). As part of this,
      Item_equal::compare_const() is called to evaluate the comparison. Part
      of this evaluation is to set the comparison function by a call to
      Item_func_eq::set_cmp_func(), which calls
      Arg_comparator::set_cmp_func(). Since the character sets of the two
      arguments differ, it needs to call agg_item_set_converter() to set up
      a conversion. There, a new Item_func_conv_charset is constructed, and
      the constructor calls val_str() on its argument (the subquery). The
      subquery is evaluated and stores an error in the diagnostics
      area.
      
      Later, agg_item_set_converter() calls fix_fields() on the character
      set converter. Item_func::fix_fields() checks for thd->is_error() and
      misinterprets the error as if it occurred in
      Item_func::fix_length_and_dec(). This error is propagated by return
      values back to Arg_comparator::set_cmp_func(), which therefore skips
      setting the func attribute of the comparator.
      
      After the error occurs, Item_equal::compare_const() does not do any
      error checking before calling Item_func_eq::val_int(), where the crash
      occurs when Arg_comparator::compare() tries to call the function
      pointed to by the func attribute, which is a null pointer.
      
      Fix: Skip the call to Item_func_eq::val_int() in
      Item_equal::compare_const() if an error has been stored in the
      diagnostics area. The diagnostics area is checked and the error is
      caught in JOIN::optimize() right after the call to optimize_cond()
      returns.
      
      This patch also fixes bug #11765734.
     @ mysql-test/r/ctype_many.result
        Add test for bug #11766143.
     @ mysql-test/t/ctype_many.test
        Add test for bug #11766143.
     @ sql/item_cmpfunc.cc
        Skip condition evaluation if an error has occurred.
     @ sql/item_cmpfunc.h
        Add return value to Item_bool_func2::set_cmp_func().
     @ sql/sql_optimizer.cc
        Add error handling.

    modified:
      mysql-test/r/ctype_many.result
      mysql-test/t/ctype_many.test
      sql/item_cmpfunc.cc
      sql/item_cmpfunc.h
      sql/sql_optimizer.cc
 3730 Marko Mäkelä	2012-01-16 [merge]
      Merge mysql-5.5 to mysql-trunk.

    modified:
      storage/innobase/buf/buf0buf.cc
 3729 Annamalai Gurusami	2012-01-16 [merge]
      Null merge from mysql-5.5 to mysql-trunk. 

 3728 Tor Didriksen	2012-01-13 [merge]
      merge opt-team => trunk

    modified:
      mysql-test/include/subquery_mat.inc
      mysql-test/include/subquery_sj.inc
      mysql-test/r/archive_gis.result
      mysql-test/r/case.result
      mysql-test/r/func_if.result
      mysql-test/r/gis.result
      mysql-test/r/group_by.result
      mysql-test/r/subquery_mat.result
      mysql-test/r/subquery_mat_all.result
      mysql-test/r/subquery_mat_none.result
      mysql-test/r/subquery_sj_all.result
      mysql-test/r/subquery_sj_all_bka.result
      mysql-test/r/subquery_sj_all_bka_nixbnl.result
      mysql-test/r/subquery_sj_all_bkaunique.result
      mysql-test/r/subquery_sj_dupsweed.result
      mysql-test/r/subquery_sj_dupsweed_bka.result
      mysql-test/r/subquery_sj_dupsweed_bka_nixbnl.result
      mysql-test/r/subquery_sj_dupsweed_bkaunique.result
      mysql-test/r/subquery_sj_firstmatch.result
      mysql-test/r/subquery_sj_firstmatch_bka.result
      mysql-test/r/subquery_sj_firstmatch_bka_nixbnl.result
      mysql-test/r/subquery_sj_firstmatch_bkaunique.result
      mysql-test/r/subquery_sj_loosescan.result
      mysql-test/r/subquery_sj_loosescan_bka.result
      mysql-test/r/subquery_sj_loosescan_bka_nixbnl.result
      mysql-test/r/subquery_sj_loosescan_bkaunique.result
      mysql-test/r/subquery_sj_mat.result
      mysql-test/r/subquery_sj_mat_bka.result
      mysql-test/r/subquery_sj_mat_bka_nixbnl.result
      mysql-test/r/subquery_sj_mat_bkaunique.result
      mysql-test/r/subquery_sj_mat_nosj.result
      mysql-test/r/subquery_sj_none.result
      mysql-test/r/subquery_sj_none_bka.result
      mysql-test/r/subquery_sj_none_bka_nixbnl.result
      mysql-test/r/subquery_sj_none_bkaunique.result
      mysql-test/r/view.result
      mysql-test/r/view_alias.result
      mysql-test/suite/innodb/r/innodb_gis.result
      mysql-test/suite/opt_trace/r/filesort_pq.result
      mysql-test/suite/opt_trace/r/general2_no_prot.result
      mysql-test/suite/opt_trace/r/general2_ps_prot.result
      mysql-test/suite/opt_trace/r/subquery_no_prot.result
      mysql-test/suite/opt_trace/r/subquery_ps_prot.result
      mysql-test/t/group_by.test
      sql/filesort.cc
      sql/item.cc
      sql/item.h
      sql/sql_executor.cc
      sql/sql_lex.cc
      sql/sql_optimizer.cc
      sql/sql_parse.cc
      sql/sql_planner.cc
      sql/sql_resolver.cc
      sql/sql_select.cc
      sql/sql_select.h
      sql/sql_tmp_table.cc
      sql/table.h
 3727 Alexander Barkov	2012-01-13
      BUG#13354387 - CRASH IN IN MY_DECIMAL::OPERATOR FOR VIEW AND FUNCTION UNIX_TIME
      Fixing the 5.6 part (the 5.5 was earlier committed in a separate commit).
      
      Problem:
      UNIX_TIMESTAMP() could return NULL in case of maybe_null==0.
      
      Fix:
      
      Moving NULL/0 decision logic from 
      Item_func_unix_timestamp::val_timeval()
      to
      Item::get_timeval()
      Item_field::get_timeval()

    modified:
      mysql-test/r/func_time.result
      mysql-test/t/func_time.test
      sql/item.cc
      sql/item_timefunc.cc
 3726 Tor Didriksen	2012-01-12 [merge]
      empty merge 5.5 => trunk

 3725 Georgi Kodinov	2012-01-12
      fixed a test case result after a merge.

    modified:
      mysql-test/r/mysqldump.result
 3724 Georgi Kodinov	2012-01-12 [merge]
      merge mysql-5.5->mysql-trunk

    modified:
      cmd-line-utils/libedit/chartype.h
      cmd-line-utils/libedit/eln.c
      cmd-line-utils/libedit/readline.c
      mysql-test/r/func_time.result
      mysql-test/r/mysqlcheck.result
      mysql-test/t/func_time.test
      mysql-test/t/mysqlcheck.test
      sql/item.cc
 3723 Georgi Kodinov	2012-01-12 [merge]
      merge mysql-trunk-security-fixed->mysql-trunk

    added:
      mysql-test/r/mysqlimport.result
      mysql-test/t/mysqlimport.test
    modified:
      client/mysql.cc
      client/mysql_upgrade.c
      client/mysqladmin.cc
      client/mysqlbinlog.cc
      client/mysqlcheck.c
      client/mysqldump.c
      client/mysqlimport.c
      client/mysqlshow.c
      client/mysqlslap.c
      include/my_getopt.h
      mysql-test/r/key_cache.result
      mysql-test/r/log_tables_upgrade.result
      mysql-test/r/mysql.result
      mysql-test/r/mysql_upgrade.result
      mysql-test/r/mysql_upgrade_ssl.result
      mysql-test/r/mysqladmin.result
      mysql-test/r/mysqlbinlog.result
      mysql-test/r/mysqlcheck.result
      mysql-test/r/mysqldump.result
      mysql-test/r/mysqlshow.result
      mysql-test/r/mysqlslap.result
      mysql-test/r/partition_key_cache.result
      mysql-test/r/plugin_auth.result
      mysql-test/r/plugin_auth_qa_1.result
      mysql-test/r/plugin_auth_qa_2.result
      mysql-test/r/plugin_auth_qa_3.result
      mysql-test/suite/federated/federated_debug.result
      mysql-test/suite/perfschema/r/pfs_upgrade.result
      mysql-test/t/key_cache.test
      mysql-test/t/mysql.test
      mysql-test/t/mysql_upgrade.test
      mysql-test/t/mysqladmin.test
      mysql-test/t/mysqlbinlog.test
      mysql-test/t/mysqlcheck.test
      mysql-test/t/mysqldump.test
      mysql-test/t/mysqlshow.test
      mysql-test/t/mysqlslap.test
      mysql-test/t/partition_key_cache.test
      mysys/default.c
      mysys/my_getopt.c
      sql/sql_admin.cc
      storage/myisam/mi_preload.c
 3722 Tor Didriksen	2012-01-11
      WL#6159 Refactoring of my_global.h post-push fixes for sparc64
      Use the uintXkorr macros rather than uXXXget macros.

    modified:
      libmysqld/emb_qcache.cc
      sql/binlog.cc
      sql/ha_partition.cc
      sql/spatial.cc
      sql/unireg.cc
      storage/archive/ha_archive.cc
 3721 Tor Didriksen	2012-01-11
      need HAVE_purify

    modified:
      include/byteorder/byte_order_generic_x86_64.h
 3720 Tor Didriksen	2012-01-11
      fix compile warning: may be used uninitialized

    modified:
      client/mysqldump.c
 3719 Tor Didriksen	2012-01-11
      Cleanup of byteorder store/get #ifdef stuff.
      Add new optimized macros for __x86_64__ 
     @ config.h.cmake
        #define NOMINMAX to avoid getting min/max macros on windows.
     @ include/CMakeLists.txt
        New header files, containing code that used to be in my_global.h
     @ libmysqld/emb_qcache.cc
        Avoid type-punning warning.
     @ sql/binlog.cc
        Avoid type-punning warning.
     @ sql/ha_partition.cc
        Avoid type-punning warning.
     @ sql/log_event.cc
        Avoid type-punning warning.
     @ sql/rpl_slave.cc
        Avoid type-punning warning.
     @ sql/spatial.cc
        Avoid type-punning warning.
     @ sql/sql_join_buffer.h
        Fix compile error in visual studio.
     @ sql/unireg.cc
        Avoid type-punning warning.
     @ storage/archive/ha_archive.cc
        Avoid type-punning warning.
     @ unittest/gunit/CMakeLists.txt
        New unit tests

    added:
      include/byteorder/
      include/byteorder/big_endian.h
      include/byteorder/byte_order_generic.h
      include/byteorder/byte_order_generic_x86.h
      include/byteorder/byte_order_generic_x86_64.h
      include/byteorder/little_endian.h
      include/my_byteorder.h
      unittest/gunit/alignment-t.cc
      unittest/gunit/byteorder-t.cc
    modified:
      config.h.cmake
      include/CMakeLists.txt
      include/my_global.h
      libmysqld/emb_qcache.cc
      sql/binlog.cc
      sql/ha_partition.cc
      sql/log_event.cc
      sql/rpl_slave.cc
      sql/spatial.cc
      sql/sql_join_buffer.h
      sql/unireg.cc
      storage/archive/ha_archive.cc
      unittest/gunit/CMakeLists.txt
 3718 Nirbhay Choubey	2012-01-10 [merge]
      Merge of fix for bug#11760384 from mysql-5.5.

    modified:
      client/mysqldump.c
      mysql-test/r/mysqldump.result
      mysql-test/t/mysqldump.test
 3717 Chaithra Gopalareddy	2012-01-10
      Bug#12911480: GROUP BY MAKE SET WITH EMPTY SET VALUES CRASH IN MY_HASH_SORT_SIMPLE
      
      Problem Description:
      While executing a make_set funtion in a group by clause with null output,
       we see problems like, accessing uninitialized area.
      
      Problem Analysis:
      While deducing the nullability of make_set function 
      (in Item_func_make_set::fix_fields), we do not take into consideration that the 
      first argument can be null and as a result the overall function result could be 
      null. 
      
      In the scenario presented, the first argument is null. So the result of 
      make_set will be null and therefor while accessing the keys in "hp_hashnr" 
      function, it tries to access an uninitialized area (as null bit is not set) 
      and hence the valgrind error. 
      
      While we do consider that the result set can be null when one of the arguments 
      (starting from the second) can be null in a make_set function. 
      
      In the current scenario, which is "select count(*) from t1 group by make_set(a,b)", 
      we do not consider field "a"s nullability. We only consider the rest of the 
      argument list which is "b" here.  As "b" is defined as not null while creating the 
      table, we are seeing the problem. 
      
      Solution:
      In Item_func_make_set::fix_fields(), we take into consideration even the first 
      argument's nullability.
     @ mysql-test/r/func_set.result
        Add test for Bug#12911480
     @ mysql-test/t/func_set.test
        Add test for Bug#12911480
     @ sql/item_strfunc.h
        Changed Item_func_make_set::fix_fields( ) function to calculate maybe_null variable.

    modified:
      mysql-test/r/func_set.result
      mysql-test/t/func_set.test
      sql/item_strfunc.h
 3716 Manish Kumar	2012-01-10
      BUG#11746146 - 23894: MYSQLBINLOG OUTPUTS SET INSERT_ID=N STATEMENTS UNNECESARILY WITH --DATABA
      
      This is a post-push fix that addresses review comments. In particular, improves coding style 
      and ensures that all memory is freed.
     @ client/mysqlbinlog.cc
        Modified the file with improved coding style.

    modified:
      client/mysqlbinlog.cc
 3715 Sneha Modi	2012-01-10 [merge]
      Bug#11748572:
      
      Merging from mysql-5.5 -> mysql-trunk

    modified:
      mysql-test/collections/default.experimental
      mysql-test/suite/sys_vars/t/disabled.def
 3714 Yasufumi Kinoshita	2012-01-10 [merge]
      Bug#12400341 INNODB CAN LEAVE ORPHAN IBD FILES AROUND
      
      If we meet DB_TOO_MANY_CONCURRENT_TRXS during the execution tab_create_graph from row_create_table_for_mysql(), .ibd file for the table should be created already but was not deleted for the error handling.
      
      rb:875 approved by Jimmy Yang

    added:
      mysql-test/suite/innodb/r/innodb_bug12400341.result
      mysql-test/suite/innodb/t/innodb_bug12400341-master.opt
      mysql-test/suite/innodb/t/innodb_bug12400341.test
    modified:
      mysql-test/suite/sys_vars/r/all_vars.result
      mysql-test/suite/sys_vars/t/all_vars.test
      storage/innobase/handler/ha_innodb.cc
      storage/innobase/include/trx0rseg.ic
      storage/innobase/include/trx0sys.h
      storage/innobase/row/row0mysql.cc
      storage/innobase/trx/trx0sys.cc
 3713 Vinay Fisrekar	2012-01-09
      bug#13555970 - INNODB_FTS.INNODB_FTS_LARGE_RECORDS TIMEOUT FOR SOLARIS ON PB2
      
      Test Fix : Reducing the test run time by lowering the number of records.

    modified:
      mysql-test/suite/innodb_fts/r/innodb_fts_large_records.result
      mysql-test/suite/innodb_fts/t/disabled.def
      mysql-test/suite/innodb_fts/t/innodb_fts_large_records.test
 3712 Vasil Dimov	2012-01-09
      Fix some whitespace

    modified:
      storage/innobase/fts/fts0fts.cc
 3711 Raghav Kapoor	2012-01-09
      BUG#11751736 - 42708: DROP DATABASE STATEMENT SHOULD REMOVE .OLD SUFFIX FROM 
      		      DATABASE DIRECTORY
      
      BACKGROUND:
      Create database, tables and load data.Execute myisampack to
      compress the tables, also use -b option to have backup of 
      datafile.Try dropping the database, will fail because of 
      .OLD file that is created in database directory.
      	
      FIX:
      DROP DATABASE will fail with the error described in the bug report
      if an unknown file is found while trying to delete the database
      directory. This bug is fixed by adding ".OLD" to the list of known file
      extensions that DROP DATABASE uses when checking if a file can be
      silently deleted. 

    modified:
      mysql-test/r/myisampack.result
      mysql-test/t/myisampack.test
      sql/sql_db.cc
 3710 Christopher Powers	2012-01-06
      Bug#12790483 - OBJECTS_SUMMARY_GLOBAL_BY_TYPE AND RENAME TABLE
        
      Further updates to perfschema.misc.test to verify PFS table shares.

    modified:
      mysql-test/suite/perfschema/r/misc.result
      mysql-test/suite/perfschema/t/misc.test
 3709 Christopher Powers	2012-01-06 [merge]
      local merge

    modified:
      include/mysql/psi/mysql_socket.h
      include/mysql/psi/mysql_table.h
      include/mysql/psi/mysql_thread.h
      include/mysql/psi/psi.h
      include/mysql/psi/psi_abi_v0.h.pp
      include/mysql/psi/psi_abi_v1.h.pp
      include/mysql/psi/psi_abi_v2.h.pp
      mysql-test/include/show_slave_status.inc
      mysql-test/suite/binlog/r/binlog_stm_unsafe_warning.result
      mysql-test/suite/binlog/t/binlog_stm_unsafe_warning.test
      mysql-test/suite/engines/funcs/r/tc_rename_error.result
      mysql-test/suite/rpl/r/rpl_log_pos.result
      mysql-test/suite/rpl/r/rpl_manual_change_index_file.result
      mysql-test/suite/rpl/t/rpl_log_pos.test
      mysql-test/suite/rpl/t/rpl_manual_change_index_file.test
      mysys/psi_noop.c
      sql/handler.cc
      storage/innobase/include/os0sync.ic
      storage/innobase/include/sync0rw.ic
      storage/innobase/include/sync0sync.ic
      storage/perfschema/pfs.cc
      storage/perfschema/pfs_instr.cc
      storage/perfschema/pfs_instr.h
      storage/perfschema/pfs_instr_class.cc
      storage/perfschema/pfs_server.cc
      storage/perfschema/pfs_stat.h
      storage/perfschema/table_events_waits.cc
      storage/perfschema/unittest/pfs-t.cc

Diff too large for email (57888 lines, the limit is 10000).
No bundle (reason: useless for push emails).
Thread
bzr push into mysql-trunk branch (vasil.dimov:3709 to 3861) vasil.dimov8 Feb