1. 28 Jul, 2010 1 commit
  2. 27 Jul, 2010 1 commit
  3. 26 Jul, 2010 4 commits
  4. 25 Jul, 2010 1 commit
    • Vladislav Vaintroub's avatar
      Cleanup after bild team push. · 5defb074
      Vladislav Vaintroub authored
      * Fixed obvious errors (HAVE_BROKEN_PREAD is not true for on any
      of systems we use, definitely not on HPUX)
      
      * Remove other junk flags for OSX and HPUX
      
      * Avoid checking type sizes in universal builds on OSX, again 
      (CMake2.8.0 fails is different architectures return different results)
      
      * Do not compile template instantiation stuff unless 
      EXPLICIT_TEMPLATE_INSTANTIATION is used.
      
      * Some cleanup (make gen_lex_hash simpler, avoid dependencies)
      
      * Exclude some unused files from compilation (strtol.c etc)
      5defb074
  5. 24 Jul, 2010 4 commits
    • Vladislav Vaintroub's avatar
      Bug#55169: Installer does not preserve user's settings in custom mode · d6b93c73
      Vladislav Vaintroub authored
      Fix some issues with WiX packaging, particularly 
      major upgrade and change scenarios.
      
      * remember binary location and data location
      (for major upgrade)
      
      * use custom UI, which is WiX Mondo extended 
      for major upgrade dialog (no feature selection
      screen shown on major upgrade, only upgrade
      confirmation). This is necessary to prevent
      changing installation path during upgrade
      (services are not reregistered, so they would 
      have invalid binary path is it is changed)
      
      * Hide datafiles that are installed into 
      ProgramFiles, show ones that are installed
      in ProgramData
      
      * Make MSI buildable with nmake
      
      * Fix autotools "make dist"
      
      
      
      
      Makefile.am:
        Fix autotools "make dist"
      configure.in:
        Fix autotools "make dist"
      packaging/Makefile.am:
        Fix autotools "make dist"
      packaging/WiX/CMakeLists.txt:
        Use custom UI, for major upgrades
      packaging/WiX/CPackWixConfig.cmake:
        Show user editable datafiles in feature selection dialog, 
        not datafiles installed into ProgramFiles directory
      packaging/WiX/create_msi.cmake.in:
        Use custom UI, fix nmake build for installer
      packaging/WiX/custom_ui.wxs:
        Use custom UI
      packaging/WiX/extra.wxs.in:
        Show user editable datafiles in feature selection dialog, 
        not datafiles installed into ProgramFiles directory
      packaging/WiX/mysql_server.wxs.in:
        Remember install locations of binaries and 
        user editable datafiles.
      d6b93c73
    • Davi Arnaut's avatar
      Add a maintainer target to the warning-mode of the build scripts. · f740fbdc
      Davi Arnaut authored
      Fix assorted warnings in order for the warning-mode to be effective.
      f740fbdc
    • Davi Arnaut's avatar
    • Davi Arnaut's avatar
      Bug#42733: Type-punning warnings when compiling MySQL · c2ea5b31
      Davi Arnaut authored
      Post-merge fix: remove remaining casts which are now
      unnecessary and are actually causing warnings.
      c2ea5b31
  6. 23 Jul, 2010 10 commits
  7. 22 Jul, 2010 1 commit
    • Luis Soares's avatar
      BUG#55387: binlog.binlog_tmp_table crashes the server · 65357cd8
      Luis Soares authored
                 sporadically
      
      There are two problems:
      
      1. When closing temporary tables, during the THD clean up - and
         after the session connection was already closed, there is a
         chance we can push an error into the THD diagnostics area, if
         the writing of the implicit DROP event to the binary log fails
         for some reason. As a consequence an assertion can be
         triggered, because at that point the diagnostics area is
         already set.
      
      2. Using push_warning with MYSQL_ERROR::WARN_LEVEL_ERROR is a 
         bug.
      
      Given that close_temporary_tables is mostly called from
      THD::cleanup - ie, with the session already closed, we fix
      problem #1 by allowing the diagnostics area to be
      overwritten. There is one other place in the code that calls
      close_temporary_tables - while applying Start_log_event_v3. To
      cover that case, we make close_temporary_tables to return the
      error, thus, propagating upwards in the stack.
      
      To fix problem #2, we replace push_warning with sql_print_error.
      
      sql/log_event.cc:
        Added handling of error returned by close_temporary_tables to
        Start_log_event_v3::do_apply_event.
      sql/sql_base.cc:
        Three changes to close_temporary_tables:
        1. it returns a boolean now (instead of void)
        2. it uses sql_print_error instead of push_warning when writing to
           binary log fails
        3. we set can_overwrite_status before writing to the binary log,
           thence not risking triggering an assertion by any other push
           into diagnostics area happening inside mysql_bin_log.write.
      sql/sql_base.h:
        Changed the interface of close_temporary_tables so that it returns
        bool instead of void.
      65357cd8
  8. 20 Jul, 2010 2 commits
    • Matthias Leich's avatar
      Bug#53102 perfschema.pfs_upgrade fails on sol10 sparc64 max in parallel mode · 42f8ab67
      Matthias Leich authored
      The reason for the bug above is unclear but
      - Modify pfs_upgrade so that it's result is easier to analyze in case something fails
      - Fix several minor weaknesses which could cause that a successing test (either an
        already existing or a to be developed one) fails because of imperfect cleanup,
        too slow disconnected sessions etc.
      should either fix the bug or reduce it's probability or at least
      make the analysis of failures easier.
      
      mysql-test/suite/perfschema/include/upgrade_check.inc:
        New include file which contains redundant stuff taken from pfs_upgrade.test.
        Remove any file which might harm analysis of suspicious results.
      mysql-test/suite/perfschema/r/query_cache.result:
        Updated results
      mysql-test/suite/perfschema/r/selects.result:
        Updated results
      mysql-test/suite/perfschema/t/bad_option_1.test:
        Add the missing remove_file at beginning and end of test.
      mysql-test/suite/perfschema/t/bad_option_2.test:
        Add the missing remove_file at beginning and end of test.
      mysql-test/suite/perfschema/t/global_read_lock.test:
        Add a wait routine which ensures that the disconnect is really completed when the test ends.
      mysql-test/suite/perfschema/t/pfs_upgrade.test:
        - Move redundant actions to include/upgrade_check.inc
        - Add preemptive removal of files
      mysql-test/suite/perfschema/t/privilege.test:
        Add a wait routine which ensures that the disconnect is really completed when the test ends.
      mysql-test/suite/perfschema/t/query_cache.test:
        Add "flush status" so that counters are reset. (./mtr --repeat=2 perfschema.query_cache failed)
      mysql-test/suite/perfschema/t/read_only.test:
        Add a wait routine which ensures that the disconnect is really completed when the test ends.
      mysql-test/suite/perfschema/t/selects-master.opt:
        Needed for running with enabled event-scheduler
      mysql-test/suite/perfschema/t/selects.test:
        - Correct the sub test for the EVENT scheduler
        - Replace "sleep" by wait_routine
        - Add premptive cleanups like "DROP ... IF EXISTS ..."
      42f8ab67
    • Davi Arnaut's avatar
      5617671f
  9. 23 Jul, 2010 3 commits
    • Davi Arnaut's avatar
      Bug#22320: my_atomic-t unit test fails · 1303ce95
      Davi Arnaut authored
      Bug#52261: 64 bit atomic operations do not work on Solaris i386
                 gcc in debug compilation
      
      One of the various problems was that the source operand to
      CMPXCHG8b was marked as a input/output operand, causing GCC
      to use the EBX register as the destination register for the
      CMPXCHG8b instruction. This could lead to crashes as the EBX
      register is also implicitly used by the instruction, causing
      the value to be potentially garbaged and a protection fault
      once the value is used to access a position in memory.
      
      Another problem was the lack of proper clobbers for the atomic
      operations and, also, a discrepancy between the implementations
      for the Compare and Set operation. The specific problems are
      described and fixed by Kristian Nielsen patches:
      
      Patch: 1
      
      Fix bugs in my_atomic_cas*(val,cmp,new) that *cmp is accessed
      after CAS succeds.
      
      In the gcc builtin implementation, problem was that *cmp was
      read again after atomic CAS to check if old *val == *cmp;
      this fails if CAS is successful and another thread modifies
      *cmp in-between.
      
      In the x86-gcc implementation, problem was that *cmp was set
      also in the case of successful CAS; this means there is a
      window where it can clobber a value written by another thread
      after successful CAS.
      
      Patch 2:
      
      Add a GCC asm "memory" clobber to primitives that imply a
      memory barrier.
      
      This signifies to GCC that any potentially aliased memory
      must be flushed before the operation, and re-read after the
      operation, so that read or modification in other threads of
      such memory values will work as intended.
      
      In effect, it makes these primitives work as memory barriers
      for the compiler as well as the CPU. This is better and more
      correct than adding "volatile" to variables.
      
      include/atomic/gcc_builtins.h:
        Do not read from *cmp after the operation as it might be
        already gone if the operation was successful.
      include/atomic/nolock.h:
        Prefer system provided atomics over the broken x86 asm.
      include/atomic/x86-gcc.h:
        Do not mark source operands as input/output operands.
        Add proper memory clobbers.
      include/my_atomic.h:
        Add notes about my_atomic_add and my_atomic_cas behaviors.
      unittest/mysys/my_atomic-t.c:
        Remove work around, if it fails, there is either a problem
        with the atomic operations code or the specific compiler
        version should be black-listed.
      1303ce95
    • Alexander Nozdrin's avatar
      Auto-merge (empty) from mysql-trunk. · df3934a9
      Alexander Nozdrin authored
      df3934a9
    • Alexander Nozdrin's avatar
      Auto-merge from mysql-trunk-bugfixing. · 2a6ae8ec
      Alexander Nozdrin authored
      2a6ae8ec
  10. 20 Jul, 2010 2 commits
  11. 19 Jul, 2010 7 commits
    • Davi Arnaut's avatar
      Merge into mysql-trunk-merge.. · 547673cb
      Davi Arnaut authored
      547673cb
    • Evgeny Potemkin's avatar
      Bug#49771: Incorrect MIN/MAX for date/time values. · 2c1df29f
      Evgeny Potemkin authored
      This bug is a design flaw of the fix for the bug#33546. It assumed that an
      item can be used only in one comparison context, but actually it isn't the
      case. Item_cache_datetime is used to store result for MIX/MAX aggregate
      functions. Because Arg_comparator always compares datetime values as INTs when
      possible the Item_cache_datetime most time caches only INT value. But
      since all datetime values has STRING result type MIN/MAX functions are asked
      for a STRING value when the result is being sent to a client. The
      Item_cache_datetime was designed to avoid conversions and get INT/STRING
      values from an underlying item, but at the moment the values is asked
      underlying item doesn't hold it anymore thus wrong result is returned.
      Beside that MIN/MAX aggregate functions was wrongly initializing cached result
      and this led to a wrong result.
      
      The Item::has_compatible_context helper function is added. It checks whether
      this and given items has the same comparison context or can be compared as
      DATETIME values by Arg_comparator. The equality propagation optimization is
      adjusted to take into account that items which being compared as DATETIME
      can have different comparison contexts.
      The Item_cache_datetime now converts cached INT value to a correct STRING
      DATETIME value by means of number_to_datetime & my_TIME_to_str functions.
      The Arg_comparator::set_cmp_context_for_datetime helper function is added. 
      It sets comparison context of items being compared as DATETIMEs to INT if
      items will be compared as longlong.
      The Item_sum_hybrid::setup function now correctly initializes its result
      value.
      In order to avoid unnecessary conversions Item_sum_hybrid now states that it
      can provide correct longlong value if the item being aggregated can do it
      too.
      
      mysql-test/r/group_by.result:
        Added a test case for the bug#49771.
      sql/item.cc:
        Bug#49771: Incorrect MIN/MAX for date/time values.
        The equality propagation mechanism is adjusted to take into account that
        items which being compared as DATETIME can have different comparison
        contexts.
        The Item_cache_datetime now converts cached INT value to a correct STRING
        DATETIME/TIME value.
      sql/item.h:
        Bug#49771: Incorrect MIN/MAX for date/time values.
        The Item::has_compatible_context helper function is added. It checks whether
        this and given items has the same comparison context or can be compared as
        DATETIME values by Arg_comparator.
        Added Item_cache::clear helper function.
      sql/item_cmpfunc.cc:
        Bug#49771: Incorrect MIN/MAX for date/time values.
        The Arg_comparator::set_cmp_func now sets the correct comparison context
        for items being compared as DATETIME values.
      sql/item_cmpfunc.h:
        Bug#49771: Incorrect MIN/MAX for date/time values.
        The Arg_comparator::set_cmp_context_for_datetime helper function is added. 
        It sets comparison context of items being compared as DATETIMEs to INT if
        items will be compared as longlong.
      sql/item_sum.cc:
        Bug#49771: Incorrect MIN/MAX for date/time values.
        The Item_sum_hybrid::setup function now correctly initializes its result
        value.
      sql/item_sum.h:
        Bug#49771: Incorrect MIN/MAX for date/time values.
        In order to avoid unnecessary conversions Item_sum_hybrid now states that it
        can provide correct longlong value if the item being aggregated can do it
        too.
      2c1df29f
    • Jonathan Perkin's avatar
      bug#55250: 5.5.5-m3 incorrectly compiled with exceptions on Solaris/x86 · 02621002
      Jonathan Perkin authored
      Put '-features=no%except' back into Solaris/x86 CXXFLAGS.
      02621002
    • Alexander Nozdrin's avatar
      Manual merge from mysql-trunk. · f7ffa473
      Alexander Nozdrin authored
      Conflicts:
        - scripts/CMakeLists.txt
      f7ffa473
    • unknown's avatar
      Merge from mysql-5.5.5-m3-release · 7117c3f3
      unknown authored
      7117c3f3
    • Jon Olav Hauglid's avatar
      manual merge from mysql-5.1-bugteam · cc48ff50
      Jon Olav Hauglid authored
      cc48ff50
    • Jon Olav Hauglid's avatar
      Bug #54734 assert in Diagnostics_area::set_ok_status · b10bd9b9
      Jon Olav Hauglid authored
      This assert checks that the server does not try to send OK to the
      client if there has been some error during processing. This is done
      to make sure that the error is in fact sent to the client.
      
      The problem was that view errors during processing of WHERE conditions
      in UPDATE statements where not detected by the update code. It therefore
      tried to send OK to the client, triggering the assert.
      The bug was only noticeable in debug builds.
      
      This patch fixes the problem by making sure that the update code
      checks for errors during condition processing and acts accordingly.
      b10bd9b9
  12. 17 Jul, 2010 2 commits
  13. 16 Jul, 2010 2 commits