1. 04 Jun, 2009 5 commits
    • Georgi Kodinov's avatar
      merged 36995 to 5.1-bugteam · 8c18db4c
      Georgi Kodinov authored
      8c18db4c
    • Georgi Kodinov's avatar
      Bug #36995: valgrind error in remove_const during subquery executions · a037071a
      Georgi Kodinov authored
      When copying the Item class one must copy its attributes as well.
      
      mysql-test/r/innodb_mysql.result:
        Bug #36995: test case
      mysql-test/t/innodb_mysql.test:
        Bug #36995: test case
      sql/item.cc:
        Bug #36995: copy attributes in the copy constructor
      a037071a
    • Alexander Barkov's avatar
      Bug#43827 Server closes connections and restarts · d7bfc76d
      Alexander Barkov authored
      Problem:
        Crash happened with a user-defined utf8 collation,
        on attempt to insert a value longer than the column
        to store.
      Reason:
        The "ctype" member was not initialized (NULL) when
        allocating a user-defined utf8 collation, so an attempt
        to call my_ctype(cs, *str) to check if we loose any important
        data when truncating the value made the server crash.
      Fix:
        Initializing tge "ctype" member to a proper value.
      
      
      mysql-test/r/ctype_ldml.result
        Adding tests
      
      mysql-test/t/ctype_ldml.test
        Adding tests
      
      strings/ctype-uca.c
        Adding initialization of "ctype" member.
      
      modified:
        mysql-test/r/ctype_ldml.result
        mysql-test/t/ctype_ldml.test
        strings/ctype-uca.c
      d7bfc76d
    • Sergey Glukhov's avatar
      5.0-bugteam->5.1-bugteam merge · 5fb8b93e
      Sergey Glukhov authored
      5fb8b93e
    • Sergey Glukhov's avatar
      Bug#44798 MySQL engine crashes when creating stored procedures with execute_priv=N · 8041311e
      Sergey Glukhov authored
      The crash happens because of uninitialized
      lex->ssl_cipher, lex->x509_subject, lex->x509_issuer variables.
      The fix is to add initialization of these variables for
      stored procedures&functions.
      
      
      mysql-test/r/sp_notembedded.result:
        test result
      mysql-test/t/sp_notembedded.test:
        test case
      sql/sql_acl.cc:
        The crash happens because of uninitialized
        lex->ssl_cipher, lex->x509_subject, lex->x509_issuer variables.
        The fix is to add initialization of these variables for
        stored procedures&functions.
      8041311e
  2. 03 Jun, 2009 1 commit
  3. 02 Jun, 2009 8 commits
    • Satya B's avatar
      merge to 5.1-bugteam branch · 5341c4bd
      Satya B authored
      5341c4bd
    • Satya B's avatar
      Followup Fix for BUG#10206 - InnoDB: Transaction requiring Max_BinLog_Cache_size > 4GB · d9332562
      Satya B authored
                                   always rollsback.
      
      There is failure on pushbuild machines which are using old compilers complaining about
      ULLONG_MAX declaration. Changing this to ULONGLONG_MAX to solve the problem.
      
      sql/mysqld.cc:
        Change ULLONG_MAX to ULONGLONG_MAX for the max_binlog_cache_size option
      d9332562
    • Mattias Jonsson's avatar
      merge into mysql-5.1-bugteam · 8941fa12
      Mattias Jonsson authored
      8941fa12
    • Mattias Jonsson's avatar
      Bug#32430:'show innodb status' causes errors Invalid (old?) table · 4fb78ee4
      Mattias Jonsson authored
      or database name in logs
      
      Problem was that InnoDB used filenam_to_tablename,
      which do not handle partitions (due to the '#' in
      the filename).
      
      Solution is to add a new function for explaining
      what the filename means: explain_filename.
      It expands the database, table, partition and subpartition
      parts and uses errmsg.txt for localization.
      It also converts from my_charset_filename to system_charset_info
      (i.e. human readable form for non ascii characters).
        http://lists.mysql.com/commits/70370
      
      2773 Mattias Jonsson	2009-03-25
      
      It has three different output styles.
      
      NOTE: This is the server side ONLY part (introducing the explain_filename
      function). There will be a patch for InnoDB using this function to solve
      the bug.
      
      sql/mysql_priv.h:
        Bug#32430:'show innodb status' causes errors Invalid (old?) table
        or database name in logs
        
        Added EXPLAIN_FILENAME_MAX_EXTRA_LENGTH, enum_explain_filename_mode
        and explain_filename.
      sql/share/errmsg.txt:
        Bug#32430:'show innodb status' causes errors Invalid (old?) table
        or database name in logs
        
        Added localization names for Database, Table, Partition, Subpartition
        Temporary and Renamed.
      sql/sql_table.cc:
        Bug#32430:'show innodb status' causes errors Invalid (old?) table
        or database name in logs
        
        Added explain_filename function for giving better information
        to the user about a specific table/partitions file.
      4fb78ee4
    • Satya B's avatar
      merge to 5.1-bugteam · ac8e02d5
      Satya B authored
      ac8e02d5
    • Satya B's avatar
      merge to 5.1-bugteam tree · 8bd3383f
      Satya B authored
      8bd3383f
    • Sergey Glukhov's avatar
      5.0-bugteam->5.1-bugteam merge · 86e425fe
      Sergey Glukhov authored
      86e425fe
    • Sergey Glukhov's avatar
      Bug#45152 crash with round() function on longtext column in a derived table · 33734e95
      Sergey Glukhov authored
      The crash happens due to wrong max_length value which is set on
      Item_func_round::fix_length_and_dec() stage. The value is set to
      args[0]->max_length which is too big in case of LONGTEXT(LONGBLOB) fields.
      The fix is to set max_length using float_length() function.
      
      
      
      mysql-test/r/func_math.result:
        test result
      mysql-test/t/func_math.test:
        test case
      sql/item_func.cc:
        The crash happens due to wrong max_length value which is set on
        Item_func_round::fix_length_and_dec() stage. The value is set to
        args[0]->max_length which is too big in case of LONGTEXT(LONGBLOB) fields.
        The fix is to set max_length using float_length() function.
      33734e95
  4. 01 Jun, 2009 5 commits
    • Alexey Kopytov's avatar
      Automerge. · 39d0b1bd
      Alexey Kopytov authored
      39d0b1bd
    • Alexey Kopytov's avatar
      Automerge. · aef45b47
      Alexey Kopytov authored
      aef45b47
    • Alexey Kopytov's avatar
      Automerge. · 47b334a6
      Alexey Kopytov authored
      47b334a6
    • Alexey Kopytov's avatar
      Manual merge. · 7561bc92
      Alexey Kopytov authored
      7561bc92
    • Narayanan V's avatar
      Bug#45197 cp1250 character set with IBMDB2I generates 2027 error · 094ddf22
      Narayanan V authored
      Running a SELECT query over an IBMDB2I table with a cp1250 character set
      was producing an error 2027 (ibmdb2i error 2027: Error converting single-byte
      sort sequence to UCS-2).
      
      The QMY_DESCRIBE_RANGE API was returning error 2027 to the storage engine
      because the CCSID used for a cp1250 column (870) does not match the CCSID
      used by the DB2 sort sequences associated with cp1250_* collations (1153).
      This was because the storage engine relies on a set of system APIs to
      determine which CCSID value most closely matches a particular MySQL
      character set. However, in the case of cp1250, the system is returning
      CCSID 870, which does not have a codepoint for the euro symbol, making it
      an incorrect match.
      
      This patch overrides the selection of a compatible CCSID to always return
      1153 for cp1250.
      
      storage/ibmdb2i/db2i_charsetSupport.cc:
        Bug#45197 cp1250 character set with IBMDB2I generates 2027 error
        
        override the selection of a compatible CCSID to
        always return 1153 for cp1250.
      094ddf22
  5. 31 May, 2009 6 commits
  6. 30 May, 2009 2 commits
    • Davi Arnaut's avatar
      MySQL 5.0 backport of Chad Miller's patch for Bug#34309: · 92e2fa7f
      Davi Arnaut authored
      Bug#34309: '_PC' macro redefinition
      
      For reasons that are now a mystery, we had defined a CPP symbol to
      help ancient compilers work better (in some way that's lost to history).
      This interferes with at least one modern compiler.
      
      Now, don't define the _PC symbol.  Those other underscore-leading
      symbols are suspect also, but at least the names aren't inscrutable.
      Let's leave them for now.
      92e2fa7f
    • He Zhenxing's avatar
      BUG#41948 Query_log_event constructor needlessly contorted · abf5f8da
      He Zhenxing authored
      Make the caller of Query_log_event, Execute_load_log_event
      constructors and THD::binlog_query to provide the error code
      instead of having the constructors to figure out the error code.
      
      sql/log_event.cc:
        Changed constructors of Query_log_event and Execute_load_log_event to accept the error code argument instead of figuring it out by itself
      sql/log_event.h:
        Changed constructors of Query_log_event and Execute_load_log_event to accept the error code argument
      abf5f8da
  7. 29 May, 2009 10 commits
    • Tatiana A. Nurnberg's avatar
      auto-merge · 88e84c1f
      Tatiana A. Nurnberg authored
      88e84c1f
    • Tatiana A. Nurnberg's avatar
      auto-merge · 5aee5bb2
      Tatiana A. Nurnberg authored
      5aee5bb2
    • Tatiana A. Nurnberg's avatar
      auto-merge · 88a1c9c9
      Tatiana A. Nurnberg authored
      88a1c9c9
    • Kristofer Pettersson's avatar
      Automerge · e9a3b649
      Kristofer Pettersson authored
      e9a3b649
    • Kristofer Pettersson's avatar
      Automerge · b34227ce
      Kristofer Pettersson authored
      b34227ce
    • Tatiana A. Nurnberg's avatar
      Bug#39200: optimize table does not recognize ROW_FORMAT=COMPRESSED · 2ba60c19
      Tatiana A. Nurnberg authored
      When doing ALTER TABLE, we forgot to point out that we actually have
      ROW_FORMAT information (from the original table), so we dropped to
      "sensible defaults". This affects both ALTER TABLE and OPTIMIZE TABLE
      which may fall back on ALTER TABLE for InnoDB.
      
      We now flag that we do indeed know the row-type, thereby preserving
      compression-type etc.
      
      No .test in 5.1 since we'd need a reasonable new plugin from InnoDB to
      show this properly; in higher versions, maria can demonstrate this.
      
      sql/sql_table.cc:
        In mysql_alter_table() flag that we have row-type info
        from old table. In compare_tables(), we must explicitly
        check whether row-type has changed (rather than rely on
        the flag which will always be set at this point now).
      2ba60c19
    • Alexey Kopytov's avatar
      Automerge · ca7a17dc
      Alexey Kopytov authored
      ca7a17dc
    • Kristofer Pettersson's avatar
      Bug#44658 Create procedure makes server crash when user does not have ALL privilege · 66e0ee66
      Kristofer Pettersson authored
      MySQL crashes if a user without proper privileges attempts to create a procedure.
      
      The crash happens because more than one error state is pushed onto the Diagnostic
      area. In this particular case the user is denied to implicitly create a new user
      account with the implicitly granted privileges ALTER- and EXECUTE ROUTINE.
      
      The new account is needed if the original user account contained a host mask.
      A user account with a host mask is a distinct user account in this context.
      An alternative would be to first get the most permissive user account which
      include the current user connection and then assign privileges to that
      account. This behavior change is considered out of scope for this bug patch.
      
      The implicit assignment of privileges when a user creates a stored routine is a
      considered to be a feature for user convenience and as such it is not
      a critical operation. Any failure to complete this operation is thus considered
      non-fatal (an error becomes a warning).
      
      The patch back ports a stack implementation of the internal error handler interface.
      This enables the use of multiple error handlers so that it is possible to intercept
      and cancel errors thrown by lower layers. This is needed as a error handler already
      is used in the call stack emitting the errors which needs to be converted.
      
      
      mysql-test/r/grant.result:
        * Added test case for bug44658
      mysql-test/t/grant.test:
        * Added test case for bug44658
      sql/sp.cc:
        * Removed non functional parameter no_error and my_error calls as all errors
          from this function will be converted to a warning anyway.
        * Change function return type from int to bool.
      sql/sp.h:
        * Removed non functional parameter no_error and my_error calls as all errors
          from this function will be converted to a warning anyway.
        * Changed function return value from int to bool
      sql/sql_acl.cc:
        * Removed the non functional no_error parameter from the function prototype.
          The function is called from two places and in one of the places we now 
          ignore errors through error handlers.
        * Introduced the parameter write_to_binlog
        * Introduced an error handler to cancel any error state from mysql_routine_grant.
        * Moved my_ok() signal from mysql_routine_grant to make it easier to avoid
          setting the wrong state in the Diagnostic area.
        * Changed the broken error state in sp_grant_privileges() to a warning
          so that if "CREATE PROCEDURE" fails because "Password hash isn't a hexidecimal
          number" it is still clear what happened.
      sql/sql_acl.h:
        * Removed the non functional no_error parameter from the function prototype.
          The function is called from two places and in one of the places we now 
          ignore errors through error handlers.
        * Introduced the parameter write_to_binlog
        * Changed return type for sp_grant_privileges() from int to bool
      sql/sql_class.cc:
        * Back ported implementation of internal error handler from 6.0 branch
      sql/sql_class.h:
        * Back ported implementation of internal error handler from 6.0 branch
      sql/sql_parse.cc:
        * Moved my_ok() signal from mysql_routine_grant() to make it easier to avoid
          setting the wrong state in the Diagnostic area.
      66e0ee66
    • Narayanan V's avatar
      merging with mysql-5.1-bugteam tree · b674d2c9
      Narayanan V authored
      b674d2c9
    • Narayanan V's avatar
      Bug#44811 Tests with utf8 charset fail with ibmdb2i on 64bit MySQL · 858e118a
      Narayanan V authored
      wmemset was being used to fill the row buffers.
      wmemset was intended  to  fill the buffer with
      16-bit UCS2 pad values.  However,  the  64-bit
      version of wmemset uses 32-bit wide characters
      and thus filled the buffer incorrectly. In some
      cases, the null  byte  map would be overwritten,
      causing ctype_utf8.test and ibmdb2i_rir.test to
      fail, giving the error message CPF5035.
      
      This patch eliminates the use of wmemset to fill
      the row buffer. wmemset has  been  replaced with
      memset16, which always  fills  memory with 16-bit
      values.
      
      storage/ibmdb2i/db2i_conversion.cc:
        Bug#44811 Tests with utf8 charset fail with ibmdb2i on 64bit MySQL
        
        Eliminate the use of wmemset to fill
        the row buffer. Replace wmemset with
        memset16, which always  fills  memory
        with 16-bit values.
      storage/ibmdb2i/db2i_misc.h:
        Bug#44811 Tests with utf8 charset fail with ibmdb2i on 64bit MySQL
        
        Eliminate the use of wmemset to fill
        the row buffer. Replace wmemset with
        memset16, which always  fills  memory
        with 16-bit values.
      858e118a
  8. 28 May, 2009 3 commits