1. 31 Aug, 2010 2 commits
    • Alexander Nozdrin's avatar
      99c7536c
    • Alexander Nozdrin's avatar
      Bug#55980 Character sets: supplementary character _bin ordering is wrong · 9e4928af
      Alexander Nozdrin authored
      Problem:
      - ORDER BY for utf8mb4_bin, utf16_bin and utf32_bin returned
        results in a wrong order, because old functions
        (supporting only BMP range) were used to handle these collations.
      - Additionally, utf16_bin did not sort supplementary characters
        between U+D700 and U+E000, as WL#1213 specification specified.
      
      include/m_ctype.h:
        Adding prototypes.
      mysql-test/include/ctype_filesort2.inc:
        Adding a new shared test file.
      mysql-test/t/ctype_utf8mb4.test:
        Adding tests.
      strings/ctype-ucs2.c:
        - Fixing my_strncoll[sp]_utf16_bin to compare
          binary representation instead of code points,
          to make columns with indexes sort correct.
        - Fixing my_collation_handler_utf32_bin and
          my_collation_handler_utf16_bin to use new
          functions.
      strings/ctype-utf8.c:
        - Adding my_strnxfrm[len]_unicode_fill_bin()
          to handle utf8mb4_bin, utf16_bin and utf32_bin,
          using 3 bytes per weight.
          This function also performs special reordering in case of utf16_bin.
        - Fixing my_collation_utf8mb4_bin handler to use the
          new function.
      9e4928af
  2. 30 Aug, 2010 2 commits
    • Magnus Blåudd's avatar
      Bug#56117 ha_ndbcluster_tables.h included by mysqldump but not used · 8c8080ad
      Magnus Blåudd authored
       - Remove include of ha_ndbcluster_tables.h from mysqldump.c
      8c8080ad
    • unknown's avatar
      Bug #54579 Wrong unsafe warning for INSERT DELAYED in SBR · 89f3fec1
      unknown authored
            
      The lock_type is upgrade to TL_WRITE from TL_WRITE_DELAYED for
      INSERT DELAYED when inserting multi values in one statement.
      It's safe. But it causes an unsafe warning in SBR.
            
      Make INSERT DELAYED safe by logging it as INSERT without DELAYED.
      
      
      mysql-test/extra/binlog_tests/binlog_insert_delayed.test:
        Updated the test file to test multi INSERT DELAYED statement
        is no longer causes an unsafe warning and binlogged as INSERT
        without DELAYED.
      mysql-test/extra/rpl_tests/create_recursive_construct.inc:
        Updated for the patch of bug#54579.
      mysql-test/suite/binlog/r/binlog_row_binlog.result:
        Updated for the patch of bug#54579.
      mysql-test/suite/binlog/r/binlog_statement_insert_delayed.result:
        Test result for BUG#54579.
      mysql-test/suite/binlog/r/binlog_stm_binlog.result:
        Updated for the patch of bug#54579.
      mysql-test/suite/binlog/r/binlog_unsafe.result:
        Updated for the patch of bug#54579.
      mysql-test/suite/binlog/t/binlog_unsafe.test:
        Updated for the patch of bug#54579.
      sql/sql_insert.cc:
        Added code to genetate a new query string for removing
        DELAYED keyword for multi INSERT DEALAYED statement.
      sql/sql_yacc.yy:
        Added code to record the DELAYED keyword position and remove the setting
        of unsafe statement for INSERT DELAYED statement
      89f3fec1
  3. 28 Aug, 2010 1 commit
  4. 27 Aug, 2010 3 commits
    • Marc Alff's avatar
      local merge · a5aad2e7
      Marc Alff authored
      a5aad2e7
    • Sergey Vojtovich's avatar
      7e4625d1
    • Sergey Vojtovich's avatar
      BUG#52821 - plugin_ftparser.h and plugin_audit.h are · 8c05b085
      Sergey Vojtovich authored
                  not tested by ABI check
      
      plugin_audit.h and plugin_ftparser.h are now subject
      for ABI check. plugin.h is now tested implicitly.
      
      Also fixed broken ABI check cmake rules.
      
      Makefile.am:
        plugin_audit.h and plugin_ftparser.h are now subject
        for ABI check. plugin.h is now tested implicitly.
      cmake/abi_check.cmake:
        plugin_audit.h and plugin_ftparser.h are now subject
        for ABI check. plugin.h is now tested implicitly.
        
        Also fixed broken ABI check rules: -DMYSQL_ABI_CHECK is
        compiler (not cmake) definition, incorrect definitions
        were passed to do_abi_check.cmake for abi_check_all rule.
      cmake/do_abi_check.cmake:
        Inform sources that we do ABI check.
      include/mysql/plugin.h.pp:
        plugin.h is now tested implicitly.
      include/mysql/plugin_audit.h.pp:
        plugin_audit.h is now subject for ABI check.
      include/mysql/plugin_ftparser.h.pp:
        plugin_ftparser.h is now subject for ABI check.
      8c05b085
  5. 26 Aug, 2010 6 commits
    • Marc Alff's avatar
      local merge · 54db3cb6
      Marc Alff authored
      54db3cb6
    • Christopher Powers's avatar
      Bug# 53874 "SETUP_INSTRUMENTS.TIMED='NO' should not change TIMER_WAIT · 7e0cc48e
      Christopher Powers authored
      Handle combined instrument states of ENABLED and/or TIMED:
      
      ENABLED TIMED
      1 1 Aggregate stats, increment counter
      1 0 Increment counter
      0 1 Do nothing
      0 0 Do nothing 
      
      storage/perfschema/pfs.cc:
        Aggregate stats only if state is both ENABLED and TIMED. If ENABLED
        but not TIMED, only increment the value counter.
      storage/perfschema/pfs_stat.h:
        Split aggregate and counter increment into separate
        methods for performance.
      7e0cc48e
    • Marc Alff's avatar
      local merge · 88341f72
      Marc Alff authored
      88341f72
    • Marc Alff's avatar
      Implemented code review comments · 1d0d4716
      Marc Alff authored
      1d0d4716
    • Alexander Barkov's avatar
      Bug#42511 mysqld: ctype-ucs2.c:2044: my_strnncollsp_utf32: Assertion (tlen % 4) == 0' fai · 22d6e099
      Alexander Barkov authored
      Problem: trailing spaces were stripped using 8-bit code,
      so the truncation result length was incorrect, which led
      to an assertion failure.
      Fix: using multi-byte safe code.
      22d6e099
    • Marc Alff's avatar
      Bug#55873 short startup options do not work in 5.5 · 47c6b6a6
      Marc Alff authored
      Before this fix, the server did not recognize 'short' (as in -a)
      options but only 'long' (as in --ansi) options
      in the startup command line, due to earlier changes in 5.5
      introduced for the performance schema.
      
      The root cause is that handle_options() did not honor the
      my_getopt_skip_unknown flag when parsing 'short' options.
      
      The fix changes handle_options(), so that my_getopt_skip_unknown is
      honored in all cases.
      
      Note that there are limitations to this,
      see the added doxygen documentation in handle_options().
      
      The current usage of handle_options() by the server to
      parse early performance schema options fits within the limitations.
      This has been enforced by an assert for PARSE_EARLY options, for safety.
      47c6b6a6
  6. 25 Aug, 2010 9 commits
  7. 24 Aug, 2010 4 commits
  8. 23 Aug, 2010 7 commits
    • Alfranio Correia's avatar
      Post-fix push for BUG#53452. · ee07ed22
      Alfranio Correia authored
      ee07ed22
    • Evgeny Potemkin's avatar
      Bug#56120: Failed assertion on MIX/MAX on negative time value · dd1890f4
      Evgeny Potemkin authored
      The Item_cache_datetime::val_str function wasn't taking into account that time
      could be negative. This led to failed assertion.
      Now Item_cache_datetime::val_str correctly converts negative time values
      from integer to string representation.
      
      mysql-test/r/func_group.result:
        Added a test case for the bug#56120.
      mysql-test/t/func_group.test:
        Added a test case for the bug#56120.
      sql/item.cc:
        Bug#56120: Failed assertion on MIX/MAX on negative time value
        Now Item_cache_datetime::val_str correctly converts negative time values
        from integer to string representation.
      dd1890f4
    • Jon Olav Hauglid's avatar
      Bug #54332 Deadlock with two connections doing LOCK TABLE+INSERT DELAYED · 3592489c
      Jon Olav Hauglid authored
      The problem was that deadlocks involving INSERT DELAYED were not detected.
      
      The reason for this is that two threads are involved in INSERT DELAYED:
      the connection thread and the handler thread. The connection thread would
      wait while the handler thread acquired locks and opened the table.
      In essence, this adds an edge to the wait-for-graph between the 
      connection thread and the handler thread that the deadlock detector is
      unaware of. Therefore many deadlocks involving INSERT DELAYED were not 
      detected.
      
      This patch fixes the problem by having the connection thread acquire the
      metadata lock the table before starting the handler thread. This allows the
      deadlock detector to detect any possible deadlocks resulting from trying to
      acquire a metadata lock the table. If a metadata lock is successfully acquired,
      the handler thread is started and given a copy of the ticket representing the
      metadata lock. When the handler thread then tries to lock and open the table,
      it will find that it already has the metadata lock and therefore not acquire
      any new metadata locks.
      
      Test cases added to delayed.test.
      3592489c
    • Christopher Powers's avatar
      merge · 258d8928
      Christopher Powers authored
      258d8928
    • Alexander Barkov's avatar
      Bug#52121 partition by key on utf32 enum field cause debug assertion: (length % 4) == 0 · 1ed02dee
      Alexander Barkov authored
            
      Problem: ENUM columns are sorted and distributed according to their
      numeric value, but Field::hash() incorrectly passed string character set
      (utf32) in combination with numeric value to the hash function,
      which made assertion fail.
      
      Fix: pass "binary" character set in combination with numeric value
      to the hash function.
      
        mysql-test/suite/parts/r/part_ctype_utf32.result
        Adding tests
      
        mysql-test/suite/parts/t/part_ctype_utf32.test
        Adding test
      
        sql/field.cc
        Pass correct character set pointer to the hash function.
      1ed02dee
    • Sergey Vojtovich's avatar
      508104d7
    • Alexey Botchkov's avatar
      mysqlhotcopy tests fixed. · c83ff21e
      Alexey Botchkov authored
      The include/mysqlhotcopy.inc had an error in the 'if' condition, so it failed
      if the mysqlhotcopy tool was found.
      
      per-file comments:
        mysql-test/include/mysqlhotcopy.inc
              test should proceed exactly if the mysqlhotcopy was set.
        mysql-test/mysql-test-run.pl
              don't set the MYSQL_HOTCOPY variable if no mysqlhotcopy was found.
      c83ff21e
  9. 24 Aug, 2010 1 commit
  10. 23 Aug, 2010 2 commits
  11. 20 Aug, 2010 3 commits
    • Mattias Jonsson's avatar
      Bug#54747: Deadlock between REORGANIZE PARTITION and SELECT is not detected · 8df0bf13
      Mattias Jonsson authored
      The ALTER PARTITION and SELECT seemed to be deadlocked
      when having innodb_thread_concurrency = 1.
      
      Problem was that there was unreleased latches
      in the ALTER PARTITION thread which was needed
      by the SELECT thread to be able to continue.
      
      Solution was to release the latches by commit 
      before requesting upgrade to exclusive MDL lock.
      
      Updated according to reviewers comments (3).
      
      mysql-test/r/partition_innodb.result:
        updated test result
      mysql-test/t/partition_innodb.test:
        added test
      sql/sql_partition.cc:
        Moved implicit commit into mysql_change_partition
        so that if latches are taken, they are always released
        before waiting on exclusive lock.
      sql/sql_table.cc:
        refactored the code to prepare and commit
        around copy_data_between_tables, to be able
        to reuse it in mysql_change_partitions
      sql/sql_table.h:
        exporting mysql_trans_prepare/commit_alter_copy_data
      8df0bf13
    • Christopher Powers's avatar
      merge · f4cef8d3
      Christopher Powers authored
      f4cef8d3
    • Sergey Vojtovich's avatar
      BUG#54989 - With null_audit installed, server hangs on an · b51c8cab
      Sergey Vojtovich authored
                  attempt to install a plugin twice
      
      Server crashes when [UN]INSTALL PLUGIN fails (returns an
      error) and general log is disabled and there are audit
      plugins interested in MYSQL_AUDIT_GENERAL_CLASS. 
      
      When audit event is triggered, audit subsystem acquires interested
      plugins by walking through plugin list. Evidently plugin list
      iterator protects plugin list by acquiring LOCK_plugin, see
      plugin_foreach_with_mask().
      
      On the other hand [UN]INSTALL PLUGIN is acquiring LOCK_plugin
      rather for a long time.
      
      When audit event is triggered during [UN]INSTALL PLUGIN, plugin
      list iterator acquires the same lock (within the same thread)
      second time.
      
      Repeatable only with general_log disabled, because general_log
      triggers MYSQL_AUDIT_GENERAL_LOG event, which acquires audit
      plugins before [UN]INSTALL PLUGIN acquired LOCK_plugin.
      
      With this fix we pre-acquire audit plugins for events that
      may potentially occur during [UN]INSTALL PLUGIN.
      
      This hack should be removed when LOCK_plugin is fixed so it
      protects only what it supposed to protect.
      
      No test case for this fix - we do not have facility to test
      audit plugins yet.
      
      sql/sql_audit.cc:
        Move "acquire audit plugin" logics to a separate
        function.
      sql/sql_audit.h:
        Move "acquire audit plugin" logics to a separate
        function.
      sql/sql_plugin.cc:
        Pre-acquire audit plugins for events that may potentially occur
        during [UN]INSTALL PLUGIN.
      b51c8cab