1. 10 Mar, 2010 1 commit
    • Luis Soares's avatar
      Fix for BUG#51716 and BUG#51787. · 496562f1
      Luis Soares authored
      In BUG#51787 we were using the wrong charset to print out the
      data. We were using the field charset for the string that would
      hold the information. This caused the assertion, because the
      string length was not aligned with UTF32 bytes requirements for
      storage.
      
      We fix this by using &my_charset_latin1 in the string object
      instead of the field->charset(). As a side-effect, we needed to
      extend the show_sql_type interface so that it took the field
      charset is now passed as a parameter, so that one is able to
      calculate the correct field size.
      
      In BUG#51716 we had issues with Field_string::pack and
      Field_string::unpack. When packing, the length was incorrectly
      calculated. When unpacking, the padding the string would be
      padded with the wrong bytes (a few bytes less than it should).
      
      We fix this by resorting to charset abstractions (functions) that
      calculate the correct length when packing and pad correctly the
      string when unpacking.
      496562f1
  2. 09 Mar, 2010 6 commits
  3. 07 Mar, 2010 6 commits
  4. 06 Mar, 2010 11 commits
  5. 05 Mar, 2010 6 commits
    • Marc Alff's avatar
      Bug#45194 mysql_upgrade deletes existing data in performance_schema database/schema · 0cb4857b
      Marc Alff authored
      Before this fix, mysql_upgrade would always drop and re create
      the performance_schema database.
      This in theory could destroy user data created using 5.1 or older versions.
      
      With this fix, mysql_upgrade checks the content of the
      performance_schema database before droping it.
      0cb4857b
    • Guilhem Bichot's avatar
      Fix for BUG#51215 "log-error partially works with version 5.5": WL 4738... · f0ce188d
      Guilhem Bichot authored
      Fix for BUG#51215 "log-error partially works with version 5.5": WL 4738 (reengineering of server variables)
      had broken the 5.1 behaviour of --log-error: --log-error without argument sent to stderr instead of writing
      to a file with an autogenerated name.
      
      mysql-test/suite/sys_vars/t/log_error_func.test:
        test that error log is created and shown in SHOW VARIABLES.
        Interestingly the error log's path is apparently relative if --log-error=argument is used, but
        may be absolute or relative if --log-error(no argument) is used (because then the path is derived from
        that of pidfile_name, which can be absolute or relative, depending on if autogenerated or not).
      mysql-test/suite/sys_vars/t/log_error_func2.test:
        test that error log is created and shown in SHOW VARIABLES
      mysql-test/suite/sys_vars/t/log_error_func3.test:
        test that error log is empty in SHOW VARIABLES
      sql/mysql_priv.h:
        id for option --log-error
      sql/mysqld.cc:
        No --log-error means "write errors to stderr", whereas --log-error
        without argument means "write errors to a file". So we cannot use the default logic
        of class sys_var_charptr, which treats "option not used" the same as "option used
        without argument" and uses the same default for both. We need to catch "option used",
        in mysqld_get_one_option(), and then "without argument". Setting to "" makes sure
        that init_server_components() will create the log, with an autogenerated name.
      sql/sys_vars.cc:
        need to give the option a numeric id so that we can catch it in mysqld_get_one_option()
      f0ce188d
    • Alexander Nozdrin's avatar
    • Alexander Barkov's avatar
      Fixing non-determenistic results. · c523820d
      Alexander Barkov authored
      c523820d
    • Marc Alff's avatar
      Bug#51738 Unit test pfs_instr-t crashes · b96d38c5
      Marc Alff authored
      The unit test pfs_instr-t:
      - generates a very long (10,000) bytes file name
      - calls find_or_create_file.
      
      This leads to a buffer overflow in mysys in my_realpath(),
      because my_realpath and mysys file APIs in general do not
      test for input parameters: mysys assumes every file name
      is less that FN_REFLEN in length.
      
      Calling find_or_create_file with a very long file name is likely
      to happen when instrumenting third party code that does not use mysys,
      so this test is legitimate.
      
      The fix is to make find_or_create_file in the performance schema
      more robust in this case.
      b96d38c5
    • Marc Alff's avatar
      Bug#51741 Unit test pfs-t failing in mysql-next-mr-bugfixing · 4708b8df
      Marc Alff authored
      The root cause of the failure is that when
      Bug#51447 performance schema evil twin files
      was fixed, instrumented file names got normalized.
      
      The pfs-t unit test depends on this file normalization,
      but it was not updated.
      
      This fix aligns pfs-t.cc lookup_file_by_name()
      with the logic in pfs_instr.cc find_or_create_file().
      4708b8df
  6. 04 Mar, 2010 10 commits