1. 06 Jun, 2010 1 commit
    • Jon Olav Hauglid's avatar
      manual merge from mysql-trunk-bugfixing · 142a162c
      Jon Olav Hauglid authored
      Conflicts:
      Text conflict in mysql-test/r/archive.result
      Contents conflict in mysql-test/r/innodb_bug38231.result
      Text conflict in mysql-test/r/mdl_sync.result
      Text conflict in mysql-test/suite/binlog/t/disabled.def
      Text conflict in mysql-test/suite/rpl_ndb/r/rpl_ndb_binlog_format_errors.result
      Text conflict in mysql-test/t/archive.test
      Contents conflict in mysql-test/t/innodb_bug38231.test
      Text conflict in mysql-test/t/mdl_sync.test
      Text conflict in sql/sp_head.cc
      Text conflict in sql/sql_show.cc
      Text conflict in sql/table.cc
      Text conflict in sql/table.h
      142a162c
  2. 05 Jun, 2010 1 commit
  3. 03 Jun, 2010 2 commits
    • Konstantin Osipov's avatar
      A follow up for the previous patch, titled: · cbf4019a
      Konstantin Osipov authored
      A code review comment for Bug#52289.
      Encapsulate the deadlock detection functionality into
      a visitor class...
      
      Remove a race introduced by omission: 
      initialize iterators under a read lock on the object.
      
      sql/mdl.cc:
        Initialize iterators under a read lock on the object.
      cbf4019a
    • Konstantin Osipov's avatar
      A code review comment for Bug#52289. · e7854c86
      Konstantin Osipov authored
      Encapsulate the deadlock detection functionality into 
      a visitor class, and separate it from the wait-for graph
      traversal code.
      
      Use "Internal iterator" and "Visitor" patterns to 
      achieve the desired separation of responsibilities.
      
      Add comments.
      
      sql/mdl.cc:
        Encapsulate deadlock detection into a class.
      sql/mdl.h:
        Adjust for a rename of a class.
      e7854c86
  4. 02 Jun, 2010 1 commit
  5. 01 Jun, 2010 3 commits
    • Konstantin Osipov's avatar
      A follow up patch for the fix for Bug#51263 "Deadlock between · 5fa66315
      Konstantin Osipov authored
      transactional SELECT and ALTER TABLE ...  REBUILD PARTITION".
      
      Make open flags part of Open_table_context.
      This allows to simplify some code and (in future)
      enforce the invariant that we don't, say, request a back 
      off on the table when there is MYSQL_OPEN_IGNORE_FLUSH 
      flag.
      
      
      
      sql/sql_base.cc:
        open_table() flags are part of Open_table_context.
        Remove dead code that would check for OPEN_VIEW_NO_PARSE,
        which is not an open table flag.
      sql/sql_base.h:
        Move flags to Open_table_context. Reorder Open_table_context
        members to compact the structure footprint.
      sql/sql_insert.cc:
        Update with a new calling signature of open_table().
      sql/sql_table.cc:
        Update with a new calling signature of open_table().
      5fa66315
    • Konstantin Osipov's avatar
      A follow up patch for the fix for Bug#51263 "Deadlock between · a96d23a5
      Konstantin Osipov authored
       transactional SELECT and ALTER TABLE ...  REBUILD PARTITION".
      
      Move declarations of sql_base.cc classes to sql_base.h
      (previously declared in sql_class.h).
      Became possible after a header file split.
      
      
      
      
      
      sql/sql_base.cc:
        Make sql_base.h the first include in sql_base.cc.
      sql/sql_base.h:
        Add declarations of Prelocking_strategy and Open_table_context.
      sql/sql_class.h:
        Remove declarations of Prelocking_strategy and Open_table_context
        (moved).
      a96d23a5
    • Konstantin Osipov's avatar
      A follow up patch for the fix for Bug#51263 "Deadlock between · b9aa51e2
      Konstantin Osipov authored
      transactional SELECT and ALTER TABLE ...  REBUILD PARTITION".
      
      Remove unused code - TL_WRITE_ALLOW_READ thr_lock.c lock.
      
      
      
      
      
      
      include/thr_lock.h:
        Remove TL_WRITE_ALLOW_READ.
      mysys/CMakeLists.txt:
        Add thr_lock test to the list of CMake executables to build.
      mysys/thr_lock.c:
        Remove TL_WRITE_ALLOW_READ thr_lock.c lock.
        Consequently, simplify lock compatibility rules.
        Remove unused code.
      sql/sql_test.cc:
        Remove TL_WRITE_ALLOW_READ lock.
      b9aa51e2
  6. 31 May, 2010 1 commit
    • Davi Arnaut's avatar
      Bug#53445: Build with -Wall and fix warnings that it generates · a8c28805
      Davi Arnaut authored
      Fix various mismatches between function's language linkage. Any
      particular function that is declared in C++ but should be callable
      from C must have C linkage. Note that function types with different
      linkages are also distinct. Thus, if a function type is declared in
      C code, it will have C linkage (same if declared in a extern "C"
      block).
      
      client/mysql.cc:
        Mismatch between prototype and declaration.
      client/mysqltest.cc:
        mysqltest used to be C code. Use C linkage where appropriate.
      cmd-line-utils/readline/input.c:
        Isolate unreachable code.
      include/my_alloc.h:
        Function type must have C linkage.
      include/my_base.h:
        Function type must have C linkage.
      include/my_global.h:
        Add helper macros to avoid spurious namespace indentation.
      include/mysql.h.pp:
        Update ABI file.
      mysys/my_gethwaddr.c:
        Remove stray carriage return and fix coding style.
      plugin/semisync/semisync_master_plugin.cc:
        Callback function types have C linkage.
      plugin/semisync/semisync_slave_plugin.cc:
        Callback function types have C linkage.
      sql/derror.cc:
        Expected function type has C linkage.
      sql/field.cc:
        Use helper macro and fix indentation.
      sql/handler.cc:
        Expected function type has C linkage.
      sql/item_sum.cc:
        Correct function linkages. Remove now unnecessary cast.
      sql/item_sum.h:
        Add prototypes with the appropriate linkage as otherwise they
        are distinct.
      sql/mysqld.cc:
        Wrap functions in C linkage mode.
      sql/opt_range.cc:
        C language linkage is ignored for class member functions.
      sql/partition_info.cc:
        Add wrapper functions with C linkage for class member functions.
      sql/rpl_utility.h:
        Use helper macro and fix indentation.
      sql/sql_class.cc:
        Change type of thd argument -- THD is a class.
        Use helper macro and fix indentation.
      sql/sql_class.h:
        Change type of thd argument -- THD is a class.
      sql/sql_select.cc:
        Expected function type has C linkage.
      sql/sql_select.h:
        Move prototype to sql_test.h
      sql/sql_show.cc:
        Expected function type has C linkage.
      sql/sql_test.cc:
        Fix required function prototype and fix coding style.
      sql/sql_test.h:
        Removed unnecessary export and add another.
      storage/myisammrg/ha_myisammrg.cc:
        Expected function type has C linkage.
      storage/perfschema/pfs.cc:
        PSI headers are declared with C language linkage, which also
        applies to function types.
      a8c28805
  7. 04 Jun, 2010 1 commit
  8. 03 Jun, 2010 4 commits
  9. 02 Jun, 2010 15 commits
    • He Zhenxing's avatar
      Auto merge · fa71264e
      He Zhenxing authored
      fa71264e
    • He Zhenxing's avatar
      Auto merge from 5.1-rep-semisync · c5425944
      He Zhenxing authored
      c5425944
    • Vasil Dimov's avatar
    • Vasil Dimov's avatar
      ee07d639
    • Alexander Barkov's avatar
      Bug#52520 Difference in tinytext utf column metadata · eed26e92
      Alexander Barkov authored
            Problems:
            - regression (compating to version 5.1) in metadata for BLOB types
            - inconsistency between length metadata in server and embedded for BLOB types
            - wrong max_length calculation in items derived from BLOB columns
           @ libmysqld/lib_sql.cc
              Calculating length metadata in embedded similary to server version,
              using new function char_to_byte_length_safe().
           @ mysql-test/r/ctype_utf16.result
              Adding tests
           @ mysql-test/r/ctype_utf32.result
              Adding tests
           @ mysql-test/r/ctype_utf8.result
              Adding tests
           @ mysql-test/r/ctype_utf8mb4.result
              Adding tests
           @ mysql-test/t/ctype_utf16.test
              Adding tests
           @ mysql-test/t/ctype_utf32.test
              Adding tests
           @ mysql-test/t/ctype_utf8.test
              Adding tests
           @ mysql-test/t/ctype_utf8mb4.test
              Adding tests
           @ sql/field.cc
              Overriding char_length() for Field_blob:
              unlike in generic Item::char_length() we don't
              divide to mbmaxlen for BLOBs.
           @ sql/field.h
              - Making Field::char_length() virtual
              - Adding prototype for Field_blob::char_length()
           @ sql/item.h
              - Adding new helper function char_to_byte_length_safe()
              - Using new function
           @ sql/protocol.cc
              Using new function char_to_byte_length_safe().
      
          modified:
            libmysqld/lib_sql.cc
            mysql-test/r/ctype_utf16.result
            mysql-test/r/ctype_utf32.result
            mysql-test/r/ctype_utf8.result
            mysql-test/r/ctype_utf8mb4.result
            mysql-test/t/ctype_utf16.test
            mysql-test/t/ctype_utf32.test
            mysql-test/t/ctype_utf8.test
            mysql-test/t/ctype_utf8mb4.test
            sql/field.cc
            sql/field.h
            sql/item.h
            sql/protocol.cc
      eed26e92
    • Vasil Dimov's avatar
      Fix the failing innodb.innodb test: · 4c1fe7eb
      Vasil Dimov authored
        innodb.innodb                            [ fail ]
                Test ended at 2010-06-02 15:04:06
        
        CURRENT_TEST: innodb.innodb
        --- /usr/w/mysql-trunk-innodb/mysql-test/suite/innodb/r/innodb.result	2010-05-23 23:10:26.576407000 +0300
        +++ /usr/w/mysql-trunk-innodb/mysql-test/suite/innodb/r/innodb.reject	2010-06-02 15:04:05.000000000 +0300
        @@ -2648,7 +2648,7 @@
         create table t4 (s1 char(2) binary,primary key (s1)) engine=innodb;
         insert into t1 values (0x41),(0x4120),(0x4100);
         insert into t2 values (0x41),(0x4120),(0x4100);
        -ERROR 23000: Duplicate entry 'A\x00' for key 'PRIMARY'
        +ERROR 23000: Duplicate entry 'A' for key 'PRIMARY'
         insert into t2 values (0x41),(0x4120);
      
      The change in the printout was introduced in:
      
        ------------------------------------------------------------
        revno: 3008.6.2
        revision-id: sergey.glukhov@sun.com-20100527160143-57nas8nplzpj26dz
        parent: sergey.glukhov@sun.com-20100527155443-24vqi9o8rpnkyci7
        committer: Sergey Glukhov <Sergey.Glukhov@sun.com>
        branch nick: mysql-trunk-bugfixing
        timestamp: Thu 2010-05-27 20:01:43 +0400
        message:
          Bug#52430 Incorrect key in the error message for duplicate key error involving BINARY type
          For BINARY(N) strip trailing zeroes to make the error message nice-looking
        
         @ mysql-test/r/errors.result
            test case
        
         @ mysql-test/r/type_binary.result
            result fix
        
         @ mysql-test/t/errors.test
            test case
        
         @ sql/key.cc
            For BINARY(N) strip trailing zeroes to make the error message nice-looking
      
      and its author (Sergey) did not notice the test failure because that test
      has been disabled in his tree.
      4c1fe7eb
    • Marko Mäkelä's avatar
      eaf7013d
    • Marko Mäkelä's avatar
      Merge from mysql-5.1-innodb: · a2b95321
      Marko Mäkelä authored
      ------------------------------------------------------------
      revno: 3495
      committer: Marko Mäkelä <marko.makela@oracle.com>
      branch nick: 5.1-innodb
      timestamp: Wed 2010-06-02 13:37:14 +0300
      message:
        Bug#53674: InnoDB: Error: unlock row could not find a 4 mode lock on the record
      
        In semi-consistent read, only unlock freshly locked non-matching records.
      
        lock_rec_lock_fast(): Return LOCK_REC_SUCCESS,
        LOCK_REC_SUCCESS_CREATED, or LOCK_REC_FAIL instead of TRUE/FALSE.
      
        enum db_err: Add DB_SUCCESS_LOCKED_REC for indicating a successful
        operation where a record lock was created.
      
        lock_sec_rec_read_check_and_lock(),
        lock_clust_rec_read_check_and_lock(), lock_rec_enqueue_waiting(),
        lock_rec_lock_slow(), lock_rec_lock(), row_ins_set_shared_rec_lock(),
        row_ins_set_exclusive_rec_lock(), sel_set_rec_lock(),
        row_sel_get_clust_rec_for_mysql(): Return DB_SUCCESS_LOCKED_REC if a
        new record lock was created. Adjust callers.
      
        row_unlock_for_mysql(): Correct the function documentation.
      
        row_prebuilt_t::new_rec_locks: Correct the documentation.
      a2b95321
    • Marko Mäkelä's avatar
      Merge from mysql-5.1-innodb: · 8f5d78c2
      Marko Mäkelä authored
      ------------------------------------------------------------
      revno: 3493
      revision-id: marko.makela@oracle.com-20100602101940-60x32xiivtqj9va1
      parent: marko.makela@oracle.com-20100601135802-hgplcpr8089ura8g
      committer: Marko Mäkelä <marko.makela@oracle.com>
      branch nick: 5.1-innodb
      timestamp: Wed 2010-06-02 13:19:40 +0300
      message:
        fil_print_orphaned_tablespaces(): Unused function, remove.
      8f5d78c2
    • Jimmy Yang's avatar
    • He Zhenxing's avatar
      Post fix for bug#52748 · e0042460
      He Zhenxing authored
      e0042460
    • Jonathan Perkin's avatar
      Revert Oracle Enterprise Linux changes. · e0111753
      Jonathan Perkin authored
      e0111753
    • Magnus Blåudd's avatar
      Merge trunk-bug53983 -> trunk-bugfixing · 1d451c9f
      Magnus Blåudd authored
      1d451c9f
    • Magnus Blåudd's avatar
      Bug#53983 Placeholder for MASTER_BIND in master.info · 36f4d92c
      Magnus Blåudd authored
       - Reserve line 17 in master.info for master_bind which has been
         added in MySQL Cluster 6.3
       - move the line for "list of server id for ignorable servers" to line 18
      36f4d92c
    • Jimmy Yang's avatar
      Fix bug #54159 InnoDB: New warnings on Windows. Provide "signed/unsigned" · ee9ce546
      Jimmy Yang authored
      parameter to virtual function store() for longlong data type.
      
      rb://371 approved by Sunny.
      ee9ce546
  10. 01 Jun, 2010 11 commits
    • Alfranio Correia's avatar
      BUG#50479 DDL stmt on row-only/stmt-only tables generate spurious binlog_format · 2fb387b0
      Alfranio Correia authored
      errors
                  
      In the fix of BUG#39934 in 5.1-rep+3, errors are generated when
      binlog_format=row and a statement modifies a table restricted to
      statement-logging (ER_BINLOG_ROW_MODE_AND_STMT_ENGINE); or if
      binlog_format=statement and a statement modifies a table restricted to
      row-logging (ER_BINLOG_STMT_MODE_AND_ROW_ENGINE).
                  
      However, some DDL statements that lock tables (e.g. ALTER TABLE,
      CREATE INDEX and CREATE TRIGGER) were causing spurious errors,
      although no row might be inserted into the binary log.
                  
      To fix the problem, we tagged statements that may generate
      rows into the binary log and thence the warning messages are
      only printed out when the appropriate conditions hold and rows
      might be changed.
      
      sql/log_event.cc:
        Reorganized the Query_log_event's constructor based on the
        CF_CAN_GENERATE_ROW_EVENTS flag and as such any statement
        that has the associated flag should go through a cache
        before being written to the binary log.
      sql/share/errmsg-utf8.txt:
        Improved the error message ER_BINLOG_UNSAFE_MIXED_STATEMENT according to Paul's
        suggestion.
      sql/sql_class.cc:
        Created a hook to be used by innodb that checks if a statement
        may write rows to the binary log. In other words, if it has
        the CF_CAN_GENERATE_ROW_EVENTS flag associated.
      sql/sql_class.h:
        Defined the CF_CAN_GENERATE_ROW_EVENTS flag.
      sql/sql_parse.cc:
        Updated the sql_command_flags and added a function to check the 
        CF_CAN_GENERATE_ROW_EVENTS.
      sql/sql_parse.h:
        Added a function to check the CF_CAN_GENERATE_ROW_EVENTS.
      storage/innobase/handler/ha_innodb.cc:
        Added a call to the hook thd_generates_rows().
      storage/innobase/handler/ha_innodb.h:
        Defined an external reference to the hook thd_generates_rows().
      2fb387b0
    • Alfranio Correia's avatar
    • Alfranio Correia's avatar
      Post-merge fix for BUG#53421. · 29c7acd6
      Alfranio Correia authored
      29c7acd6
    • Alexey Kopytov's avatar
      Bug #45882: dtoa.c might not work with gcc 4.4.0 · 3e1a792c
      Alexey Kopytov authored
      - Ported relevant changes from the upstream version to not
      break strict-aliasing rules and to fix compiler warnings and
      and infinite loops caused by that issue.
      
      - Fixed compilation with Honor_FLT_ROUNDS defined.
      
      - Fixed an unused variable warning.
      3e1a792c
    • Alfranio Correia's avatar
    • Alfranio Correia's avatar
      BUG#53421 Part of transaction not written in binlog after deadlock, replication · ebde6f6d
      Alfranio Correia authored
      breaks
            
      When a "CREATE TEMPORARY TABLE SELECT * FROM" was executed the OPTION_KEEP_LOG was
      not set into the thd->variables.option_bits. For that reason, if the transaction
      had updated only transactional engines and was rolled back at the end (.e.g due to
      a deadlock) the changes were not written to the binary log, including the creation
      of the temporary table.
            
      To fix the problem, we have set the OPTION_KEEP_LOG into the
      thd->variables.option_bits when a "CREATE TEMPORARY TABLE
      SELECT * FROM" is executed.
      ebde6f6d
    • Marko Mäkelä's avatar
      Merge a change from mysql-5.1-innodb: · 7d5e4446
      Marko Mäkelä authored
        ------------------------------------------------------------
        revno: 3491
        revision-id: marko.makela@oracle.com-20100601134335-ccthwwru23kn09qw
        parent: marko.makela@oracle.com-20100601120751-1uq7bbta5n7ts0qr
        committer: Marko Mäkelä <marko.makela@oracle.com>
        branch nick: 5.1-innodb
        timestamp: Tue 2010-06-01 16:43:35 +0300
        message:
          Bug#48197: Concurrent rw_lock_free may cause assertion failure
      
          rw_lock_t: Remove magic_n unless UNIV_DEBUG is defined.
          rw_lock_free(): Invalidate magic_n only after removing from rw_lock_list.
      7d5e4446
    • Alfranio Correia's avatar
    • Alexander Nozdrin's avatar
      Auto-merge from mysql-trunk-innodb. · ff6cf4bb
      Alexander Nozdrin authored
      ff6cf4bb
    • Alexander Nozdrin's avatar
      Auto-merge from mysql-trunk-bugfixing. · bf158eed
      Alexander Nozdrin authored
      Due to a BZR bug, that merge was done by the following command:
      bzr merge -r 'revid:tor.didriksen@sun.com-20100527074248-6qtv0p1ugy6o1hjo..' <mysql-trunk-bugfixing path>
      bf158eed
    • Marko Mäkelä's avatar
      Merge a change from mysql-5.1-innodb: · ab6a5b47
      Marko Mäkelä authored
        ------------------------------------------------------------
        revno: 3490
        revision-id: marko.makela@oracle.com-20100601120751-1uq7bbta5n7ts0qr
        parent: marko.makela@oracle.com-20100601120521-q48hk05ne4j1s2o0
        committer: Marko Mäkelä <marko.makela@oracle.com>
        branch nick: 5.1-innodb
        timestamp: Tue 2010-06-01 15:07:51 +0300
        message:
          Minor cleanup.
      
          lock_rec_unlock(): Cache first_lock and rewrite while() loops as for().
      
          btr_cur_optimistic_update(): Use common error handling return.
      
          row_create_prebuilt(): Add Valgrind instrumentation.
      ab6a5b47