1. 31 Mar, 2010 3 commits
    • Alfranio Correia's avatar
    • Alfranio Correia's avatar
      BUG#51291 Unfortunate effect around variable binlog_direct_non_transactional_updates · 7827688f
      Alfranio Correia authored
      BUG#46364 introduced the flag binlog_direct_non_transactional_updates which
      would make N-changes to be written to the binary log upon committing the
      statement when "ON". On the other hand, when "OFF" the option was supposed
      to mimic the behavior in 5.1. However, the implementation was not mimicking
      the behavior correctly and the following bugs popped up:
      
        Case #1: N-changes executed within a transaction would go into
                 the S-cache. When later in the same transaction a
                 T-change occurs, N-changes following it were written
                 to the T-cache instead of the S-cache. In some cases,
                 this raises problems. For example, a
                 Table_map_log_event being written initially into the
                 S-cache, together with the initial N-changes, would be
                 absent from the T-cache. This would log N-changes
                 orphaned from a Table_map_log_event (thence discarded
                 at the slave). (MIXED and ROW)
      
         Case #2: When rolling back a transaction, the N-changes that
                  might be in the T-cache were disregarded and
                  truncated along with the T-changes. (MIXED and ROW)
      
         Case #3: When a MIXED statement (TN) is ahead of any other
                  T-changes in the transaction and it fails, it is kept
                  in the T-cache until the transaction ends. This is
                  not the case in 5.1 or Betony (5.5.2). In these, the
                  failed TN statement would be written to the binlog at
                  the same instant it had failed and not deferred until
                  transaction end. (SBR)
      
      To fix these problems, we have decided to do what follows:
      
         For Case #1 and #2, we circumvent them:
      
            1. by not letting binlog_direct_non_transactional_updates
               affect MIXED and RBR. These modes will keep the behavior
               provided by WL#2687. Although this will make Celosia to
               behave differently from 5.1, an execution will be always
               safe under such modes in the sense that slaves will never
               go out sync. In 5.1, using either MIXED or ROW while
               mixing N-statements and T-statements was not safe.
      
         For Case #3, we don't actually fix it. We:
      
            1. keep it and make all MIXED statements whether they end
               up failing or not or whether they are up front in the
               transaction or after some transactional change to always
               be stored in the T-cache. This means that it is written
               to the binary log on transaction commit/rollback only.
      
            2. We make the warning message even more specific about the
               MIXED statement and SBR.
      7827688f
    • Alfranio Correia's avatar
  2. 24 Mar, 2010 2 commits
  3. 22 Mar, 2010 1 commit
  4. 21 Mar, 2010 2 commits
  5. 20 Mar, 2010 2 commits
  6. 19 Mar, 2010 2 commits
    • Vladislav Vaintroub's avatar
      Fix errors when building release · 4a39f83f
      Vladislav Vaintroub authored
      - package some more perl scripts on Windows (mysqlhotcopy and mysqldumpslow)
      - do not try to pack .map files (no more produced)
      - (CMake-unrelated) fix debug build on FreeBSD, trying to use uninitialized attribute
      MY_MUTEX_INIT_FAST
      4a39f83f
    • Alexey Kopytov's avatar
      Manual merge. · 53afccc8
      Alexey Kopytov authored
      53afccc8
  7. 18 Mar, 2010 1 commit
    • Alexey Kopytov's avatar
      Bug #8433: Overflow must be an error · aef97cad
      Alexey Kopytov authored
       
      All numeric operators and functions on integer, floating point 
      and DECIMAL values now throw an 'out of range' error rather 
      than returning an incorrect value or NULL,  when the result is 
      out of supported range for the corresponding data type. 
       
      Some test cases in the test suite had to be updated 
      accordingly either because the test case itself relied on a 
      value returned in case of a numeric overflow, or because a 
      numeric overflow was the root cause of the corresponding bugs. 
      The latter tests are no longer relevant, since the expressions 
      used to trigger the corresponding bugs are not valid anymore. 
      However, such test cases have been adjusted and kept "for the 
      record". 
      aef97cad
  8. 17 Mar, 2010 4 commits
    • Vladislav Vaintroub's avatar
      Bug #52149 - packaging differences in CMake build · 78a96586
      Vladislav Vaintroub authored
      Corrected some packaging bugs:
      - install mysqlservices library
      - install libmysqlclient_r.so.{16,16.0.0} as links
        to libmysqlclient.so
      - install libmysqld-debug.a
      - install my_safe_process, my_safe_kill and
        symlinks to mysql-test-run.pl (mtr, mysql-test-run)
        into correct place ${INSTALL_MYSQLTESTDIR}
      78a96586
    • Luis Soares's avatar
      Merged bundle from bug report. · 148c2c31
      Luis Soares authored
      148c2c31
    • Luis Soares's avatar
      Merge bundle from bug report. · 3356ce98
      Luis Soares authored
      3356ce98
    • Luis Soares's avatar
      BUG#51426: overflow for auto_increment column causes slave to stop · 229da7c0
      Luis Soares authored
      In BUG#49562 we fixed the case where numeric user var events
      would not serialize the flag stating whether the value was signed
      or unsigned (unsigned_flag). This fixed the case that the slave
      would get an overflow while treating the unsigned values as
      signed.
            
      In this bug, we find that the unsigned_flag can sometimes change
      between the moment that the user value is recorded for binlogging
      purposes and the actual binlogging time. Since we take the
      unsigned_flag from the runtime variable data, at binlogging time,
      and the variable value is comes from the copy taken earlier in
      the execution, there may be inconsistency in the
      User_var_log_event between the variable value and its
      unsigned_flag.
            
      We fix this by also copying the unsigned_flag of the
      user_var_entry when its value is copied, for binlogging
      purposes. Later, at binlogging time, we use the copied
      unsigned_flag and not the one in the runtime user_var_entry
      instance.
      229da7c0
  9. 16 Mar, 2010 3 commits
    • Andrei Elkin's avatar
      Bug #51398 Test "rpl_heartbeat_basic" fails "while waiting for slave_received_heartbeats" · cf206a57
      Andrei Elkin authored
      Non-determinism of the test was caused by lack of setting a proper value to hb period,
      actually fixed by BUG@50767.
      
      These fixes aim at possible non-determinism in comparison of received
      hb events by master and slave in the circular part of the test.
      Even though the HB periods ratio was choosen to be as high as 10, it's still incorrect 
      to compare number of hb-events basing only a relation between their periods.
      
      Yet another issue is relatively short 60 secs timeout of wait_for_status_var.inc
      makes valgrind runs to fail. 
      Fixed with deploying wait_for_slave_io_to_start afront of calling wait_for_status_var.
      
      The test is made runnable only with MIXED binlog-format as it has close to 1 min
      total exec time and there is nothing format specific in it.
      cf206a57
    • Mattias Jonsson's avatar
      merge · 26a8eda4
      Mattias Jonsson authored
      26a8eda4
    • Alexander Nozdrin's avatar
  10. 15 Mar, 2010 11 commits
    • Mats Kindahl's avatar
      Merging with mysql-trunk-bugfixing · a9d145ac
      Mats Kindahl authored
      a9d145ac
    • Mats Kindahl's avatar
      Merging with mysql-trunk-bugfixing · dc35b61f
      Mats Kindahl authored
      dc35b61f
    • Konstantin Osipov's avatar
      A post-review fix for type-aware metadata locks. · a9520bcf
      Konstantin Osipov authored
      DDL no longer aborts mysql_lock_tables(), and hence
      we no longer need to support need_reopen flag of this
      call. 
      Remove the flag, and all the code in the server
      that was responsible for handling the case when
      it was set. This allowed to simplify: 
      open_and_lock_tables_derived(), the delayed thread,
      multi-update.
      
      Rename MYSQL_LOCK_IGNORE_FLUSH to MYSQL_OPEN_IGNORE_FLUSH,
      since we now only support this flag in open_table().
      
      Rename MYSQL_LOCK_PERF_SCHEMA to MYSQL_LOCK_LOG_TABLE,
      to avoid confusion.
      
      Move the wait for the global read lock for cases
      when we do updates in SELECT f1() or DO (UPDATE) to 
      open_table() from mysql_lock_tables(). When waiting
      for the read lock, we could raise need_reopen flag,
      which is no longer present in mysql_lock_tables().
      Since the block responsible for waiting for GRL
      was moved, MYSQL_LOCK_IGNORE_GLOBAL_READ_LOCK
      was renamed to MYSQL_OPEN_IGNORE_GLOBAL_READ_LOCK.
      a9520bcf
    • Vladislav Vaintroub's avatar
      merge · 74211ed9
      Vladislav Vaintroub authored
      74211ed9
    • Alexander Nozdrin's avatar
      Auto-merge from mysql-trunk. · 9cc2d776
      Alexander Nozdrin authored
      9cc2d776
    • Alexander Nozdrin's avatar
      A patch for Bug#52071 (rpl_ndb.rpl_ndb_ctype_ucs2_def fails). · fa2d2c18
      Alexander Nozdrin authored
      Use new command line options instead of deprecated and removed ones.
      fa2d2c18
    • Alexander Nozdrin's avatar
      d9a074e1
    • Magnus Blåudd's avatar
      Merge · a9541803
      Magnus Blåudd authored
      a9541803
    • Magnus Blåudd's avatar
      Merge in fix for bug#42589 · fda5004d
      Magnus Blåudd authored
      fda5004d
    • Jon Olav Hauglid's avatar
      Bug #51160 Deadlock around SET GLOBAL EVENT_SCHEDULER = ON|OFF · dd69b281
      Jon Olav Hauglid authored
      This deadlock could occour betweeen one connection executing
      SET GLOBAL EVENT_SCHEDULER= ON and another executing SET GLOBAL
      EVENT_SCHEDULER= OFF. The bug was introduced by WL#4738.
      
      The first connection would hold LOCK_event_metadata (protecting
      the global variable) while trying to lock LOCK_global_system_variables
      starting the event scheduler thread (in THD:init()).
      
      The second connection would hold LOCK_global_system_variables
      while trying to get LOCK_event_scheduler after stopping the event
      scheduler inside event_scheduler_update().
      
      This patch fixes the problem by not using LOCK_event_metadata to
      protect the event_scheduler variable. It is still protected using
      LOCK_global_system_variables. This fixes the deadlock as it removes 
      one of the two mutexes used to produce it.
      
      However, this patch opens up the possibility that the event_scheduler
      variable and the real event_scheduler state can become out of sync
      (e.g. variable = OFF, but scheduler running). But this can only
      happen under very unlikely conditions - two concurrent SET GLOBAL
      statments, with one thread interrupted at the exact wrong moment.
      This is preferable to having the possibility of a deadlock.
      
      This patch also fixes a bug where it was possible to exit create_event()
      without releasing LOCK_event_metadata if running out of memory during
      its exection.
      
      No test case added since a repeatable test case would have required
      excessive use of new sync points. Instead we rely on the fact that
      this bug was easily reproduceable using RGQ tests.
      dd69b281
    • Alexander Nozdrin's avatar
      Auto-merge from mysql-trunk. · 27bb4377
      Alexander Nozdrin authored
      27bb4377
  11. 14 Mar, 2010 1 commit
    • Mats Kindahl's avatar
      Bug #51938 plugin_dir gets bad default value · d21fa142
      Mats Kindahl authored
      When building the script directory using a CMake-based build, both the
      variables in config.h.cmake (including PLUGINDIR) and the variables in
      CMakeList.txt (which includes pkgplugindir).
      
      However, for autotools-based builds, only pkgplugindir is substituted,
      which means that the plugin-path is not substituted.
      
      This patch solves the problem by using pkgplugindir, which works on both
      CMake-based and autotools-based builds, instead of PLUGINDIR.
      d21fa142
  12. 13 Mar, 2010 1 commit
  13. 12 Mar, 2010 7 commits