1. 19 Mar, 2010 1 commit
    • Andrei Elkin's avatar
      Bug #51648 DBUG_SYNC_POINT is not defined on all platforms and mtr cant pre-check that · c3cd608a
      Andrei Elkin authored
      
      DBUG_SYNC_POINT has at least one strong limitation that it's not defined
      on all platforms. It has issues cooperating with @@debug.
      All in all its functionality is superseded by DEBUG_SYNC facility and
      there is no reason to maintain the old less flexible one.
      
      Fixed with adding debug_sync_set_action() function as a facility to set up
      a sync-action in the server sources code and re-writing existing simulations
      (found 3) to use it.
      Couple of tests have been reworked as well.
      
      The patch offers a pattern for setting sync-points in replication threads
      where the standard DEBUG_SYNC does not suffice to reach goals.
      
      
      
      
      
      mysql-test/extra/rpl_tests/rpl_get_master_version_and_clock.test:
        rewriting the test from GET_LOCK()-based to DEBUG_SYNC-based;
        a pattern of usage DEBUG_SYNC for replication testing is provided.
      mysql-test/suite/rpl/r/rpl_get_master_version_and_clock.result:
        results are changed.
      mysql-test/suite/rpl/t/rpl_get_master_version_and_clock.test:
        rewriting the test from GET_LOCK()-based to DEBUG_SYNC-based;
        limiting the test to run only with MIXED binlog-format as the test last
        some 10 secs sensitively contributing to the total of tests run.
      mysql-test/suite/rpl/t/rpl_show_slave_running.test:
        rewriting the test from GET_LOCK()-based to DEBUG_SYNC-based.
      sql/debug_sync.cc:
        adding debug_sync_set_action() function as a facility to set up
        a sync-action in the server sources code.
      sql/debug_sync.h:
        externalizing debug_sync_set_action().
      sql/item_func.cc:
        purging sources from DBUG_SYNC_POINT.
      sql/mysql_priv.h:
        purging sources from DBUG_SYNC_POINT.
      sql/slave.cc:
        rewriting failure simulations to base on DEBUG_SYNC rather than GET_LOCK()-based DBUG_SYNC_POINT.
      sql/sql_repl.cc:
        removing an orphan failure simulation line because no counterpart in tests existing.
      c3cd608a
  2. 14 Mar, 2010 2 commits
    • Staale Smedseng's avatar
      Bug #49829 Many "hides virtual function" warnings with · c7fad393
      Staale Smedseng authored
      SunStudio
            
      SunStudio compilers of late warn about methods that might hide
      methods in base classes due to the use of overloading combined
      with overriding. SunStudio also warns about variables defined
      in local socpe or method arguments that have the same name as
      a member attribute of the class.
            
      This patch renames methods that might hide base class methods,
      to make it easier both for humans and compilers to see what is
      actually called. It also renames variables in local scope.
      
      
      sql/field.cc:
        Local scope variable or method argument same as class 
        attribute.
      sql/item_cmpfunc.cc:
        Local scope variable or method argument same as class 
        attribute.
      sql/item_create.cc:
        Renaming base class create() to create_func().
      sql/item_create.h:
        Renaming base class create() to create_func().
      sql/protocol.cc:
        Local scope variable or method argument same as class 
        attribute.
      sql/sql_profile.cc:
        Local scope variable or method argument same as class 
        attribute.
      sql/sql_select.cc:
        Local scope variable or method argument same as class 
        attribute.
      sql/sql_yacc.yy:
        Renaming base class create() to create_func().
      storage/federated/ha_federated.cc:
        Local scope variable or method argument same as class 
        attribute.
      storage/myisammrg/ha_myisammrg.cc:
        Local scope variable or method argument same as class 
        attribute.
      c7fad393
    • Davi Arnaut's avatar
      57a96c77
  3. 13 Mar, 2010 1 commit
  4. 09 Mar, 2010 1 commit
    • Davi Arnaut's avatar
      Bug#51770: UNINSTALL PLUGIN requires no privileges · 81ffd72a
      Davi Arnaut authored
      The problem was that UNINSTALL PLUGIN wasn't performing privilege
      checks before removing a plugin. Any user (including users without 
      any kind of privileges) could uninstall any plugin.
      
      The solution is to verify if the user has the DELETE privilege for
      the mysql.plugin table before uninstalling a plugin.
      
      mysql-test/r/plugin_not_embedded.result:
        Add test case result for Bug#51770.
      mysql-test/t/plugin_not_embedded-master.opt:
        Add example plugin path.
      mysql-test/t/plugin_not_embedded.test:
        Add test case for Bug#51770.
        Skip embedded as test relies on privileges checks.
      81ffd72a
  5. 12 Mar, 2010 1 commit
    • Sergey Glukhov's avatar
      Bug#41788 mysql_fetch_field returns org_table == table by a view · b8132a8d
      Sergey Glukhov authored
      The problem is that Item_direct_view_ref which is inherited
      from Item_ident updates orig_table_name and table_name with
      the same values. The fix is introduction of new constructor
      into Item_ident and up which updates orig_table_name and
      table_name separately.
      
      
      mysql-test/r/metadata.result:
        test case
      mysql-test/t/metadata.test:
        test case
      sql/item.cc:
        new constructor which updates
        orig_table_name and table_name
        separately.
      sql/item.h:
        new constructor which updates
        orig_table_name and table_name
        separately.
      sql/table.cc:
        used new constructor
      b8132a8d
  6. 11 Mar, 2010 3 commits
  7. 10 Mar, 2010 10 commits
  8. 09 Mar, 2010 1 commit
    • Georgi Kodinov's avatar
      Bug #35250: readline check breaks when doing vpath build · d63b0a5c
      Georgi Kodinov authored
      MySQL uses two source layouts when building : the bzr 
      layout and the source package layout.
      The previous fix for bug 35250 contained 1 change that is
      valid for both modes and a number of changes that are valid
      only for the bzr source layout.
      The important thing was to fix the source package layout.
      And for this the change in configure.in was sufficient.
      It's not trivial (and not requested by this bug) to support 
      VPATH builds from the bzr trees.
      This is why the other changes are reverted and the change to
      fix the VPATH build for source distributions is left intact.
      d63b0a5c
  9. 10 Mar, 2010 1 commit
  10. 09 Mar, 2010 5 commits
  11. 08 Mar, 2010 3 commits
  12. 09 Mar, 2010 3 commits
    • Davi Arnaut's avatar
      Bug#40277: SHOW CREATE VIEW returns invalid SQL · f502deac
      Davi Arnaut authored
      The problem is that not all column names retrieved from a SELECT
      statement can be used as view column names due to length and format
      restrictions. The server failed to properly check the conformity
      of those automatically generated column names before storing the
      final view definition on disk.
      
      Since columns retrieved from a SELECT statement can be anything
      ranging from functions to constants values of any format and length,
      the solution is to rewrite to a pre-defined format any names that
      are not acceptable as a view column name.
      
      The name is rewritten to "Name_exp_%u" where %u translates to the
      position of the column. To avoid this conversion scheme, define
      explict names for the view columns via the column_list clause.
      Also, aliases are now only generated for top level statements.
      
      mysql-test/include/view_alias.inc:
        Add test case for Bug#40277
      mysql-test/r/compare.result:
        Bug#40277: SHOW CREATE VIEW returns invalid SQL
      mysql-test/r/group_by.result:
        Bug#40277: SHOW CREATE VIEW returns invalid SQL
      mysql-test/r/ps.result:
        Bug#40277: SHOW CREATE VIEW returns invalid SQL
      mysql-test/r/subselect.result:
        Bug#40277: SHOW CREATE VIEW returns invalid SQL
      mysql-test/r/subselect3.result:
        Bug#40277: SHOW CREATE VIEW returns invalid SQL
      mysql-test/r/type_datetime.result:
        Bug#40277: SHOW CREATE VIEW returns invalid SQL
      mysql-test/r/union.result:
        Bug#40277: SHOW CREATE VIEW returns invalid SQL
      mysql-test/r/view.result:
        Add test case result for Bug#40277
      mysql-test/r/view_alias.result:
        Add test case result for Bug#40277
      mysql-test/t/view_alias.test:
        Add test case for Bug#40277
      sql/sql_view.cc:
        Check if auto generated column names are conforming. Also, the
        make_unique_view_field_name function is not used as it uses the
        original name to construct a new one, which does not work if the
        name is invalid.
      f502deac
    • Davi Arnaut's avatar
      Bug#51650: crash with user variables and triggers · 02ac873c
      Davi Arnaut authored
      The problem was that bits of the destructive equality propagation
      optimization weren't being undone after the execution of a stored
      program. Modifications to the parse tree that are based on transient
      properties must be undone to enable the re-execution of stored
      programs.
      
      The solution is to cleanup any references to predicates generated
      by the equality propagation during the execution of a stored program.
      
      mysql-test/r/trigger.result:
        Add test case result for Bug#51650.
      mysql-test/t/trigger.test:
        Add test case for Bug#51650.
      sql/item.cc:
        Remove reference to a equality predicate.
      02ac873c
    • Georgi Kodinov's avatar
  13. 08 Mar, 2010 2 commits
    • Georgi Kodinov's avatar
      null merge · 25a9f5e0
      Georgi Kodinov authored
      25a9f5e0
    • Georgi Kodinov's avatar
      Backport of the fix for bug #51357 to 5.0-bugteam.: · 2ba46ad4
      Georgi Kodinov authored
      Spatial indexes were not checking for out-of-record condition in
      the handler next command when the previous command didn't found
      rows.
      
      Fixed by making the rtree index to check for end of rows condition
      before re-using the key from the previous search.
      
      Fixed another crash if the tree has changed since the last search.
      Added a test case for the other error.
      2ba46ad4
  14. 04 Mar, 2010 1 commit
    • Georgi Kodinov's avatar
      Bug #51357: crash when using handler commands on spatial indexes · d934426f
      Georgi Kodinov authored
      Spatial indexes were not checking for out-of-record condition in
      the handler next command when the previous command didn't found
      rows.
      
      Fixed by making the rtree index to check for end of rows condition
      before re-using the key from the previous search.
      
      Fixed another crash if the tree has changed since the last search.
      Added a test case for the other error.
      d934426f
  15. 05 Mar, 2010 4 commits
    • Gleb Shchepa's avatar
      Bug #39653: find_shortest_key in sql_select.cc does not · 63a88e13
      Gleb Shchepa authored
                  consider clustered primary keys
      
      Choosing a shortest index for the covering index scan,
      the optimizer ignored the fact, that the clustered primary
      key read involves whole table data.
      
      The find_shortest_key function has been modified to
      take into account that fact that a clustered PK has a
      longest key of possible covering indices.
      
      
      mysql-test/r/innodb_mysql.result:
        Test case for bug #39653.
      mysql-test/t/innodb_mysql.test:
        Test case for bug #39653.
      sql/sql_select.cc:
        Bug #39653: find_shortest_key in sql_select.cc does not
                    consider clustered primary keys
        
        The find_shortest_key function has been modified to
        take into account that fact that a clustered PK has a
        longest key of possible covering indices.
      63a88e13
    • Tatiana A. Nurnberg's avatar
      auto-merge · fbad82de
      Tatiana A. Nurnberg authored
      fbad82de
    • Tatiana A. Nurnberg's avatar
      manual merge · 823661bd
      Tatiana A. Nurnberg authored
      823661bd
    • Ramil Kalimullin's avatar
      Fix for bug#32426: "FEDERATED query returns corrupt results · 2eb9d388
      Ramil Kalimullin authored
       for ORDER BY on a TEXT or VARCHAR field" backported to 5.1.
      2eb9d388
  16. 04 Mar, 2010 1 commit