1. 01 Apr, 2011 2 commits
    • unknown's avatar
      MWL#89 · 72f3363b
      unknown authored
      - Auto-merge with 5.3 main.
      - Changed the test for LP BUG#719198 so that
        an two more queries were added, and removed a
        query that produces a wrong result due to an
        unrelated problem. The wrong result is submitted
        as a separate bug.
      72f3363b
    • Michael Widenius's avatar
      Fixed compiler warnings · 876e8d60
      Michael Widenius authored
      sql/key.cc:
        Fixed compiler warnings about not initialized variables
      876e8d60
  2. 31 Mar, 2011 3 commits
    • Michael Widenius's avatar
      Automatic merge · 8383a000
      Michael Widenius authored
      8383a000
    • Michael Widenius's avatar
      Fixed unlikely reference to freed memory in item->print(). · 25f78956
      Michael Widenius authored
      
      sql/item.cc:
        If a item_ref is referenced by name, we have to reset it's ref in item_ref::cleanup() as the reference may be to a memory that is freed.
        This happens at least when you have 'HAVING MAX()' in a sub query and you execute 'cond_having->print()' which tries to access items before fix fields.
      sql/item.h:
        Added 'reference_trough_name' as a marker for Item_ref that needs to have ref reset during cleanup
      25f78956
    • Michael Widenius's avatar
      Fixed all BUILD scripts to use g++ instead of gcc for linking · 33ec8526
      Michael Widenius authored
      Fixed memory leak from HEAP tables that was not deleted properly
      
      
      BUILD/compile-alpha-ccc:
        Use g++ instead of gcc for linking
      BUILD/compile-alpha-debug:
        Use g++ instead of gcc for linking
      BUILD/compile-pentium-pgcc:
        Use g++ instead of gcc for linking
      BUILD/compile-solaris-sparc:
        Use g++ instead of gcc for linking
      BUILD/compile-solaris-sparc-debug:
        Use g++ instead of gcc for linking
      BUILD/compile-solaris-sparc-purify:
        Use g++ instead of gcc for linking
      sql/item.cc:
        Safety fixes for expr_cache
        Call Item_result:field::cleanup() in Item_cache_wrapper::cleanup()
        More DBUG_PRINT
      sql/sql_base.cc:
        Simple optimization for setup_wild
        More DBUG_PRINT
      sql/sql_expression_cache.cc:
        Added header
        Removed not needed initialization
      sql/sql_lex.cc:
        More DBUG_PRINT
      sql/sql_select.cc:
        More DBUG_PRINT
        Fixed memory leak from HEAP tables that was not deleted properly
      storage/heap/hp_create.c:
        More DBUG_PRINT
      33ec8526
  3. 30 Mar, 2011 6 commits
    • Vladislav Vaintroub's avatar
      merge LP BUG#68606 · e61eed60
      Vladislav Vaintroub authored
      e61eed60
    • Vladislav Vaintroub's avatar
      LP686006 : maria recovery tests fail. · f1976319
      Vladislav Vaintroub authored
      All failing cases were attempts to use connection after
      the server was brought down and restarted. Connections 
      used client reconnect option.
      
      The reason for failures is the behavior of sockets on Windows:
      for a short period after crash (short enough to make the error 
      not reproducible under debugger), write to socket on client
      side would succeed but subsequent read would fail. 
      
      MYSQL_OPT_RECONNECT does not really help in this case ,
      because  in the case given here ,as  mysql_real_query() 
      (which can handle reconnect option)  succeeds and 
      mysql_read_results() (can't handle reconnect) fails.
      
      The fix is adding --include wait_until_connected_again.inc to 
      appropriate places in test. This ensures that read errors are 
      caught and connection is recreated.
      f1976319
    • Michael Widenius's avatar
      Fixed problem that fill_record() allocated memory for every call. This could... · 73344a9b
      Michael Widenius authored
      Fixed problem that fill_record() allocated memory for every call. This could be a problem when doing big unions as memory could be filled up.
      
      sql/sql_base.cc:
        Don't allocate memory in fill_record().
        Fix was to remove the list of tables. This was not necessary as this call is only used with one table.
      73344a9b
    • Michael Widenius's avatar
      Fixes to get more information about random bind failure in pushbuild for windows hosts. · cad9e54d
      Michael Widenius authored
      mysql-test/mysql-test-run.pl:
        Set port-open-timeout to 10 to retry binds
      sql/mysqld.cc:
        Write error number for bind failure. (perror can't do that on windows as errno dosn't contain error code)
      cad9e54d
    • unknown's avatar
      MWL#89 · d7020ee4
      unknown authored
        
        Merge 5.3 with 5.3-mwl89.
      d7020ee4
    • unknown's avatar
      MWL#89 · 5ad019d2
      unknown authored
      Merge 5.3 with 5.3-mwl89.
      5ad019d2
  4. 29 Mar, 2011 6 commits
  5. 28 Mar, 2011 11 commits
    • Vladislav Vaintroub's avatar
      null merge · 2e4fcc84
      Vladislav Vaintroub authored
      2e4fcc84
    • Vladislav Vaintroub's avatar
      merge · ebcbdc01
      Vladislav Vaintroub authored
      ebcbdc01
    • Vladislav Vaintroub's avatar
      merge · a7c67a42
      Vladislav Vaintroub authored
      a7c67a42
    • Vladislav Vaintroub's avatar
      CMake/code signing: · c28b9b7a
      Vladislav Vaintroub authored
      Use MYSQL_INSTALL_TARGETS() macro for DLLs 
      (libmysql and libmysqld) to ensure that libraries
      are signed, if signing is requested.
      c28b9b7a
    • Sergei Golubchik's avatar
      lp:702084 - myisam_block_size is not reported in SHOW GLOBAL VARIABLES · 702a1b9e
      Sergei Golubchik authored
      add a read-only server variable @@myisam_block_size
      702a1b9e
    • Vladislav Vaintroub's avatar
      merge · b225cc1e
      Vladislav Vaintroub authored
      b225cc1e
    • Vladislav Vaintroub's avatar
      Sign MSI if code signing is requested. · 2c424591
      Vladislav Vaintroub authored
      Remove SIGNCODE_ENABLED variable from create_msi.cmake.in,
      it was already removed from other places.
      2c424591
    • unknown's avatar
      Fix LP BUG#613029 · fef6682b
      unknown authored
      Analysis:
      There are two code paths through which JOIN::exec may produce
      an all-NULL row for an empty result set. One goes via the
      function return_zero_rows(), when query processing detectes
      early that the where clause is false, the other one is via
      do_select() in the case of join execution.
      
      In the case of do_select(), the problem was that the executioner
      didn't set TABLE::null_row to 1. As result when sending the only
      result row, the evaluation of each field didn't detect that all
      non-aggregated fields are NULL, because Field::is_null returned
      true, after checking that field->table->null_row was false.
      
      Given that the each non-aggregated field was not considered NULL,
      select_result::send_data sent whatever was in the buffer of each
      field. However, since there was no actual data in the field buffer,
      send_data() accessed and sent whatever junk was in the field's
      data buffer.
      
      Solution:
      Similar to the analogous case in return_zero_rows() mark all
      tables that their current row is NULL before sending the
      artificailly created NULL row.
      fef6682b
    • Michael Widenius's avatar
      Fixed test failures with embedded server · ff9a6359
      Michael Widenius authored
      mysql-test/mysql-test-run.pl:
        Don't set --log-error when running embedded server as we don't want the mysqltest output into mysqld.1.err
      sql/mysqld.cc:
        Allow one to disable --log-error
      ff9a6359
    • Vladislav Vaintroub's avatar
      merge · d1f96feb
      Vladislav Vaintroub authored
      d1f96feb
    • Vladislav Vaintroub's avatar
      87096f06
  6. 27 Mar, 2011 2 commits
    • Vladislav Vaintroub's avatar
      merge · fff85155
      Vladislav Vaintroub authored
      fff85155
    • Vladislav Vaintroub's avatar
      CMake fixes for buildbot/MSI package building and signing: · ab7ada17
      Vladislav Vaintroub authored
      - FIND_PROGRAM (signtool) will now get a hint about location of signtool.exe (Windows SDK)
      - Targets "package" or "msi" will now fail, l if signing is requested but does not work
        (e.g invalid certificate)
      - During install, do not re-sign binaries, if they are already signed.
      - Preserve mysqld_error.h timestamp whenever possible. This helps avoiding situations 
      where the whole server is rebuilt, whenever comp_err.exe changes (for example after code 
      signing, or also after a minor fix in mysys)
      - Fix Wix error in UpgradeVersion, if patch part of the version is 0.
      ab7ada17
  7. 25 Mar, 2011 4 commits
  8. 24 Mar, 2011 1 commit
    • unknown's avatar
      Fix LP BUG#715738 · dc9ba672
      unknown authored
      Analysis:
      A query with implicit grouping is one with aggregate functions and
      no GROUP BY clause. MariaDB inherits from MySQL an SQL extenstion
      that allows mixing aggregate functions with non-aggregate fields.
      If a query with such mixed select clause produces an empty result
      set, the meaning of aggregate functions is well defined - either
      NULL (MIN, MAX, etc.), or 0 (count(*)). However the non-aggregated
      fields must also have some value, and the only reasonable value in
      the case of empty result is NULL.
      
      The cause of the many wrong results was that if a field is declared
      as non-nullable (e.g. because it is a PK or NOT NULL), the semantic
      analysis and the optimization phases treat this field as non-nullable,
      and generate all related query plan elements based on this assumption.
      
      Later during execution, these incorrectly configured/generated query
      plan elements result in a wrong result because the selected fields
      are not null due to the not-null assumption during optimization.
      
      Solution:
      Detect before the context analysys phase that a query uses implicit
      grouping with mixed aggregates/non-aggregates, and set all fields
      as nullable. The parser already walks the SELECT clause, and
      already sets Item::with_sum_func for Items that reference aggreagate
      functions. The patch adds a symmetric Item::with_field so that all
      Items that reference an Item_field are marked during their
      construction at parse time in the same way as with aggregate function
      use.
      dc9ba672
  9. 23 Mar, 2011 2 commits
    • Michael Widenius's avatar
      Merge with base 5.2 · e81fbf92
      Michael Widenius authored
      e81fbf92
    • Michael Widenius's avatar
      Added --log-basename to mysqld to allow one to set the prefix for all logs with one command · 2c9854a9
      Michael Widenius authored
      Changed test suite to use --log-basename (to get the code tested)
      Added --sync-sys=1 to test suite to speed it up.
      Better error messages if something goes wrong with mysql_install_db
      
      
      mysql-test/Makefile.am:
        Removed not existing directory
      mysql-test/lib/My/ConfigFactory.pm:
        Use log-basename
        We had to also set 'log_error' as some test was explicitely using the old name
        Added 'sync-sys=1' to speed up test suite
      mysql-test/r/variables-notembedded.result:
        Updated test results (variable relay_log is now set)
      mysql-test/suite/binlog/t/binlog_delete_and_flush_index-master.opt:
        Force specific names for some log files.
      mysql-test/suite/binlog/t/binlog_index-master.opt:
        Force specific names for some log files.
      mysql-test/suite/binlog/t/binlog_stm_unsafe_warning-master.opt:
        Force specific names for some log files.
      mysql-test/suite/binlog/t/binlog_stm_unsafe_warning.test:
        Better error message if something goes wrong
      mysql-test/suite/rpl/r/rpl_flushlog_loop.result:
        Updated results
      mysql-test/suite/rpl/rpl_1slave_base.cnf:
        Use --log-basename
      scripts/mysql_install_db.sh:
        More information to --help
        Write url to knowledge base if something goes wrong
        Fail at once if we can't create a database directory (no reason to continue and write a screenful of not related text)
      scripts/mysqld_safe.sh:
        Also allow one to use --data for --datadir (common shortening)
        Added support for --log-basename
        Fail at once if we can't create a log directory
        Fixed bug where we used a pid file name without '.pid' extension
      sql/log.cc:
        Create a log file name trough my_once_alloc()  (To get it automaticly freed at exit)
      sql/mysql_priv.h:
        Added new prototype
      sql/mysqld.cc:
        Added support for --log-basename
        Better help for a lot of log-filename related variables.
      sql/rpl_rli.cc:
        Write information that one can use --log-basename
      sql/set_var.cc:
        Add log_basename as a readonly variable
      2c9854a9
  10. 18 Mar, 2011 1 commit
    • Michael Widenius's avatar
      Ensure that all clients reads the appropriate 'client', client-mariadb and... · 39c004f7
      Michael Widenius authored
      Ensure that all clients reads the appropriate 'client', client-mariadb and 'mariadb' sections from my.cnf
      The mysqld server and all clients now reads the new client-server section
      Fixed that mysqldumpslow supports new slow log formats and new mysqld --slow- options
      
      
      client/mysql.cc:
        Read also client-server and client-mariadb sections.
      client/mysql_upgrade.c:
        Read also client-server and client-mariadb sections.
      client/mysqladmin.cc:
        Read also client-server and client-mariadb sections.
      client/mysqlbinlog.cc:
        Read also client-server and client-mariadb sections.
      client/mysqlcheck.c:
        Read also client-server and client-mariadb sections.
      client/mysqldump.c:
        Read also client-server and client-mariadb sections.
      client/mysqlimport.c:
        Read also client-server and client-mariadb sections.
      client/mysqlshow.c:
        Read also client-server and client-mariadb sections.
      client/mysqltest.cc:
        Read also client-server and client-mariadb sections.
      extra/my_print_defaults.c:
        Updated help text
      scripts/mysql_fix_privilege_tables.sh:
        Read also sections client client-server client-mariadb
      scripts/mysql_install_db.pl.in:
        Also allow --data=* option
        Read also groups mariadb, server and client-server.
      scripts/mysql_install_db.sh:
        Also allow --data=* option
        Read also groups mariadb, server and client-server.
        Added --lose-skip-pbxt to bootstrap
      scripts/mysql_secure_installation.sh:
        Read also groups client-server and client-mariadb
      scripts/mysqld_multi.sh:
        Read also group mariadb
      scripts/mysqld_safe.sh:
        Read also groups mariadb server and client-server
      scripts/mysqldumpslow.sh:
        Fixed to support new slow log formats
        Added sorting on -ae (aggregated number of retreived rows) and e (retrieved rows)
        Read also group 'mariadb'
        If there is many instances of same option, use last one.
        Get slow log file from options log-slow-queries=filename or query-log-file=filename
        Added support for future --log-basename option
      sql-common/client.c:
        Read also groups 'client-server' and 'client-mariadb'
      tests/mysql_client_test.c:
        Read also groups 'client-server' and 'client-mariadb'
      tests/thread_test.c:
        Read also groups 'client-server' and 'client-mariadb'
      39c004f7
  11. 15 Mar, 2011 1 commit
  12. 13 Mar, 2011 1 commit