1. 04 Mar, 2010 1 commit
    • Luis Soares's avatar
      BUG#51055: Replication failure on duplicate key + traditional SQL · e831e729
      Luis Soares authored
      mode
      
      When the master was executing in sql_mode='traditional' (which
      implies that really_abort_on_warning returns TRUE - because of
      MODE_STRICT_ALL_TABLES), the error code (ER_DUP_ENTRY in the
      reported case) was not being set in the
      Query_log_event. Therefore, even if a failure was to be expected
      when replaying the statement on the slave, a failure would occur,
      because the Query_log_event was not transporting the expected
      error code, but 0 instead.
      
      This was because when the master was getting the error code to
      set it in the Query_log_event, the executing thread would be
      assumed to have been killed:
      THD::killed==THD::KILL_BAD_DATA. This would make the error code
      fetch routine not to check thd->main_da.sql_errno(), but instead
      the thd->killed value. What's more, is that the server would
      thd->killed value if thd->killed == THD::KILL_BAD_DATA and return
      0 instead. So this is a double inconsistency, as the we should
      not even check thd->killed but rather thd->main_da.sql_errno().
      
      We fix this by extending the condition used to choose whether to
      check the thd->main_da.sql_errno() or thd->killed, so that it
      takes into consideration the case when:
      thd->killed==THD::KILL_BAD_DATA.
      e831e729
  2. 22 Feb, 2010 8 commits
  3. 20 Feb, 2010 2 commits
  4. 19 Feb, 2010 3 commits
  5. 18 Feb, 2010 2 commits
  6. 17 Feb, 2010 9 commits
  7. 16 Feb, 2010 4 commits
  8. 15 Feb, 2010 1 commit
  9. 14 Feb, 2010 1 commit
  10. 13 Feb, 2010 1 commit
    • Davi Arnaut's avatar
      Bug#50624: crash in check_table_access during call procedure · a4dd7f95
      Davi Arnaut authored
      This bug is just one facet of stored routines not being able to
      detect changes in meta-data (WL#4179). This particular problem
      can be triggered within a single session due to the improper
      management of the pre-locking list if the view is expanded after
      the pre-locking list is calculated.
      
      Since the overall solution for the meta-data detection issue is
      planned for a later release, for now a workaround is used to
      fix this particular aspect that only involves a single session.
      The workaround is to flush the thread-local stored routine cache
      every time a view is created or modified, causing locally cached
      routines to be re-evaluated upon invocation.
      a4dd7f95
  11. 12 Feb, 2010 2 commits
  12. 11 Feb, 2010 4 commits
  13. 10 Feb, 2010 2 commits
    • Luis Soares's avatar
      9b0a91c1
    • Sergey Glukhov's avatar
      Bug#45195 valgrind warnings about uninitialized values in store_record_in_cache() · e5a38da7
      Sergey Glukhov authored
      The problem becomes apparent only if HAVE_purify is undefined.
      It related to the part of code placed in open_table_from_share() fuction
      where we initialize record buffer only if HAVE_purify is enabled.
      So in case of HAVE_purify=OFF record buffer is not initialized
      on open table stage.
      Next we read key, find NULL value and update appropriate null bit
      but do not update record buffer. After that the record is stored
      in the join cache(store_record_in_cache). For CHAR fields we
      strip trailing spaces and in our case this procedure uses
      uninitialized record buffer.
      The fix is to skip stripping space procedure in case of null values
      for CHAR fields(partially based on 6.0 JOIN_CACHE implementation).
      e5a38da7