1. 23 May, 2010 1 commit
    • Alexey Kopytov's avatar
      Manual merge of mysql-5.1-bugteam to mysql-trunk-merge. · 598cf5ae
      Alexey Kopytov authored
      Conflicts:
      
         conflict      Makefile.am
         conflict      mysql-test/suite/rpl/r/rpl_stm_mixing_engines.result
         conflict      mysql-test/suite/rpl/t/rpl_tmp_table_and_DDL.test
         conflict      sql/opt_sum.cc
         conflict      sql/set_var.cc
         conflict      sql/sql_base.cc
         conflict      sql/sql_priv.h
         conflict      sql/sql_show.cc
      598cf5ae
  2. 21 May, 2010 1 commit
    • Gleb Shchepa's avatar
      Bug #53804: serious flaws in the alter database .. upgrade · d72a4710
      Gleb Shchepa authored
                  data directory name command
      
      The check_db_name function has been modified to validate tails of
      #mysql50#-prefixed database names for compliance with MySQL 5.0
      database name encoding rules (the check_table_name function call
      has been reused).
      
      
      mysql-test/r/renamedb.result:
        Updated test case.
      mysql-test/r/upgrade.result:
        Test case for bug #53804.
      mysql-test/t/renamedb.test:
        Updated test case.
      mysql-test/t/upgrade.test:
        Test case for bug #53804.
      sql/mysql_priv.h:
        Bug #53804: serious flaws in the alter database .. upgrade
                    data directory name command
        
        The check_mysql50_prefix has been added.
      sql/sql_table.cc:
        Bug #53804: serious flaws in the alter database .. upgrade
                    data directory name command
        
        - The check_mysql50_prefix has been added.
        - The check_n_cut_mysql50_prefix function has been refactored
        to share code with new check_mysql50_prefix function.
      sql/table.cc:
        Bug #53804: serious flaws in the alter database .. upgrade
                    data directory name command
        
        The check_db_name function has been modified to validate tails of
        #mysql50#-prefixed database names for compliance with MySQL 5.0
        database name encoding rules.
      d72a4710
  3. 20 May, 2010 4 commits
    • Sven Sandberg's avatar
      BUG#52987: mysqldump fails if umask=0077 · 37b02cd7
      Sven Sandberg authored
      Problem: The test case mysqldump reads a file that must
      be world-readable. The test did not force the file to be
      world-readable, so if the tree was branched with a umask
      of 0077, the test would fail.
      Fix: chmod the file.
      
      
      mysql-test/t/mysqldump.test:
        Added chmod so that the file is guaranteed to be world-readable.
      37b02cd7
    • Alexander Nozdrin's avatar
      Manual merge from mysql-trunk. · dabd4a1c
      Alexander Nozdrin authored
      Conflicts:
        - mysql-test/r/partition.result
        - mysql-test/r/variables_debug.result
        - mysql-test/t/partition.test
        - mysql-test/t/variables_debug.test
      dabd4a1c
    • Alexander Nozdrin's avatar
      Auto-merge from mysql-trunk-bugfixing. · a18861e4
      Alexander Nozdrin authored
      a18861e4
    • Sergey Glukhov's avatar
      Bug#52884 mysql-test-run does not work with --debug option · b8af4ab2
      Sergey Glukhov authored
      Server crashes on 64bit linux with 'double free or corruption'
      message, on 32bit mysql-test-run silently fails on bootstrap
      stage. The problem is that FreeState() is called twice
      for init_settings struct in _db_end_ function.
      The fix is to remove superfluous FreeState() call.
      Additional fix:
      fixed discrepancy of result file when
      debug & valgrind options are enabled
      for MTR.
      
      dbug/dbug.c:
        The problem is that FreeState() is called twice
        for init_settings struct in _db_end_ function.
        The fix is to remove superfluous FreeState() call.
      mysql-test/r/variables_debug.result:
        fixed discrepancy of result file when
        debug & valgrind options are enabled
        for MTR.
      mysql-test/t/variables_debug.test:
        fixed discrepancy of result file when
        debug & valgrind options are enabled
        for MTR.
      sql/set_var.cc:
        fixed discrepancy of result file when
        debug & valgrind options are enabled
        for MTR.
      b8af4ab2
  4. 19 May, 2010 7 commits
  5. 18 May, 2010 4 commits
  6. 17 May, 2010 2 commits
  7. 16 May, 2010 5 commits
  8. 14 May, 2010 3 commits
    • Alexander Nozdrin's avatar
      Patch for Bug#27863 (excessive memory usage for many small queries in a · 6facd4cb
      Alexander Nozdrin authored
      multiquery packet).
      
      Background:
      
        - a query can contain multiple SQL statements;
      
        - the server frees resources allocated to process a query when the
          whole query is handled. In other words, resources allocated to process
          one SQL statement from a multi-statement query are freed when all SQL
          statements are handled.
      
      The problem was that the parser allocated a buffer of size of the whole
      query for each SQL statement in a multi-statement query. Thus, if a query
      had many SQL-statements (so, the query was long), but each SQL statement
      was short, ther parser tried to allocate huge amount of memory (number of
      small SQL statements * length of the whole query).
      
      The memory was allocated for a so-called "cpp buffer", which is intended to
      store pre-processed SQL statement -- SQL text without version specific
      comments.
      
      The fix is to allocate memory for the "cpp buffer" once for all SQL
      statements (once for a query).
      6facd4cb
    • Gleb Shchepa's avatar
      Bug #53450: Crash / assertion "virtual int · 9cbb009b
      Gleb Shchepa authored
                  ha_myisam::index_first(uchar*)") at assert.c:81
      
      Single-table DELETE crash/assertion similar to single-table
      UPDATE bug 14272.
      
      Same resolution as for the bug 14272:
      Don't run index scan when we should use quick select.
      This could cause failures because there are table handlers (like federated)
      that support quick select scanning but do not support index scanning.
      
      
      mysql-test/r/delete.result:
        Test case for bug #53450.
      mysql-test/t/delete.test:
        Test case for bug #53450.
      sql/sql_delete.cc:
        Bug #53450: Crash / assertion "virtual int
                    ha_myisam::index_first(uchar*)") at assert.c:81
        
        The mysql_delete function has been modified to not to use
        init_read_record_idx instead of init_read_record for the
        quick select.
      9cbb009b
    • Alexander Nozdrin's avatar
      Patch for Bug#21818 (Return value of ROW_COUNT() is incorrect · 4333980a
      Alexander Nozdrin authored
      for ALTER TABLE, LOAD DATA).
      
      ROW_COUNT is now assigned according to the following rules:
      
        - In my_ok():
          - for DML statements: to the number of affected rows;
          - for DDL statements: to 0.
      
        - In my_eof(): to -1 to indicate that there was a result set.
      
          We derive this semantics from the JDBC specification, where int
          java.sql.Statement.getUpdateCount() is defined to (sic) "return the
          current result as an update count; if the result is a ResultSet
          object or there are no more results, -1 is returned".
      
        - In my_error(): to -1 to be compatible with the MySQL C API and
          MySQL ODBC driver.
      
        - For SIGNAL statements: to 0 per WL#2110 specification. Zero is used
          since that's the "default" value of ROW_COUNT in the diagnostics area.
      
      sql/protocol.cc:
        Fix a typo.
      sql/sql_class.h:
        - Introduce THD::get_row_count_func() / THD::set_row_count_func();
        - Remove the CF_HAS_ROW_COUNT define
      sql/sql_parse.cc:
        CF_HAS_ROW_COUNT was eliminated.
      4333980a
  9. 13 May, 2010 1 commit
  10. 12 May, 2010 9 commits
    • Ramil Kalimullin's avatar
      Fix for bug#52051: Aggregate functions incorrectly returns · feb03a82
      Ramil Kalimullin authored
            NULL from outer join query
            
            Problem: optimising MIN/MAX() queries without GROUP BY clause
            by replacing the aggregate expression with a constant, we may set it
            to NULL disregarding the fact that there may be outer joins involved.
            
            Fix: don't replace MIN/MAX() with NULL if there're outer joins.
            
            Note: the fix itself is just
            - if (!count)
            + if (!count && !outer_tables)
                set to NULL
            
            The rest of the patch eliminates repeated code to improve speed
            and for easy maintenance of the code.
      
      
      mysql-test/r/group_by.result:
                Fix for bug#52051: Aggregate functions incorrectly returns
                NULL from outer join query
                  - test result.
      mysql-test/t/group_by.test:
                Fix for bug#52051: Aggregate functions incorrectly returns
                NULL from outer join query
                  - test case.
      sql/opt_sum.cc:
                Fix for bug#52051: Aggregate functions incorrectly returns
                NULL from outer join query
                  - optimising MIN/MAX() queries without GROUP BY clause by
                replacing them with a constant, take into account that
                there're may be outer joins involved.
                  - repeated code for MIN/MAX optimization in the opt_sum_query()
                eliminated by introducing new functions that read MIN/MAX values
                using index and combining MIN/MAX cases to one.
      feb03a82
    • Jonathan Perkin's avatar
    • Jonathan Perkin's avatar
      Remove comments. · 31f5867f
      Jonathan Perkin authored
      31f5867f
    • Jonathan Perkin's avatar
      Changes to build using CMake according to existing release packages: · ce2aabb7
      Jonathan Perkin authored
       - Update/fix file layouts for each package type, add new types for
         native package formats including deb, rpm and svr4.
      
       - Build all plugins, including debug versions
      
       - Update compiler flags to match current release
      
       - Add missing @VAR@ expansions
      
       - Install correct mysqclient library symlinks
      
       - Fix icc/ia64 builds
      
       - Fix install of libmysqld-debug
      
       - Don't include mysql_embedded
      
       - Remove unpackaged manual pages to avoid missing files warnings
      
       - Don't install mtr's test suite
      ce2aabb7
    • Jonathan Perkin's avatar
      Large number of changes to support building RPMs using CMake, along · 240176bf
      Jonathan Perkin authored
      with other merges from the old distribution-specific spec file.
      
       - update copyright notices
      
       - remove __os_install_post override, it was only necessary as a
         hack to build debuginfo packages - now that we no longer make
         them we can revert to the distribution macro which likely has
         other useful bits we might want
      
       - remove _unpackaged_files_terminate_build override, we want to
         know of any orphaned files
      
       - include native distribution support
      
       - no longer build separate debuginfo RPMs, instead just include
         debug/symbols in all binaries, which is more useful for support
      
       - include support for building commercial RPMs, requires a
         commercial source tree
      
       - remove cluster RPM support, we don't build them from this
         source tree
      
       - use CMake for building, and update package lists to match the
         new install layout/files.  Remove any options which were only
         useful for automake builds (e.g. yassl/zlib).
      
       - other minor cleanups
      240176bf
    • Staale Smedseng's avatar
      Bug #49756 Rows_examined is always 0 in the slow query log for · 330864fc
      Staale Smedseng authored
      update statements
            
      Only SELECT statements report any examined rows in the slow
      log. Slow UPDATE, DELETE and INSERT statements report 0 rows
      examined, unless the statement has a condition including a
      SELECT substatement.
            
      This patch adds counting of examined rows for the UPDATE and
      DELETE statements. An INSERT ... VALUES statement will still 
      not report any rows as examined.
      
      
      
      sql/sql_class.h:
        Added more docs for THD::examined_row_count.
      sql/sql_delete.cc:
        Add incrementing thd->examined_row_count.
      sql/sql_update.cc:
        Add incrementing thd->examined_row_count.
      330864fc
    • Alexander Nozdrin's avatar
    • Alexander Nozdrin's avatar
      Post-fix for Bug#50373: sys_vars.secure_file_priv_basic can not be run · 332c0024
      Alexander Nozdrin authored
      with mysql-test/var as a symlink any longer.
      332c0024
    • Sven Sandberg's avatar
      BUG#50410: rpl_ndb tests should run with binlog_format=row · 29c8c152
      Sven Sandberg authored
      Problem: The rpl_ndb did not set binlog_format explicitly. Since
      the default is binlog_format=statement, it means that the suite
      ran with that. ndb does not support binlog_format=statement,
      and many tests were skipped because they sourced
      include/have_binlog_format_row_or_mixed.inc
      Fix: set binlog_format=row explicitly in the configuration file
      for the rpl_ndb suite.
      
      
      Makefile.am:
        Removed duplicate run of rpl_ndb suite with binlog_format=row.
        Now that rpl_ndb is run with binlog_format=row by default, this
        run that explicitly changes to binlog_format=row is not needed,
        because it is covered by the following run.
      mysql-test/suite/rpl_ndb/my.cnf:
        cluster only supports binlog_format=row.
      mysql-test/suite/rpl_ndb/r/rpl_ndb_stm_innodb.result:
        updated result file
      mysql-test/suite/rpl_ndb/t/rpl_ndb_stm_innodb.test:
        This test is supposed to use binlog_format=STATEMENT on
        master. It uses innodb on master, so statement format is
        supported.
      29c8c152
  11. 11 May, 2010 3 commits