1. 05 Jun, 2009 3 commits
  2. 04 Jun, 2009 4 commits
  3. 02 Jun, 2009 1 commit
    • Sergey Glukhov's avatar
      Bug#45152 crash with round() function on longtext column in a derived table · f2910f08
      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.
      f2910f08
  4. 01 Jun, 2009 1 commit
  5. 31 May, 2009 3 commits
  6. 30 May, 2009 1 commit
    • Davi Arnaut's avatar
      MySQL 5.0 backport of Chad Miller's patch for Bug#34309: · 2898505b
      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.
      2898505b
  7. 28 May, 2009 2 commits
  8. 27 May, 2009 3 commits
    • Georgi Kodinov's avatar
      automerge · 3b44d552
      Georgi Kodinov authored
      3b44d552
    • Sergey Glukhov's avatar
      Bug#41212 crash after race condition between merge table and table_cache evictions · 2dc982e0
      Sergey Glukhov authored
      On 64-bit Windows: querying MERGE table with keys may cause
      server crash.The problem is generic and may affect any statement
      accessing MERGE table cardinality values.
      When MERGE engine was copying cardinality statistics, it was
      using incorrect size of element in cardinality statistics array
      (sizeof(ptr)==8 instead of sizeof(ulong)==4), causing access
      of memory beyond of the allocated bounds.
      
      
      sql/ha_myisam.cc:
        When copying rec_per_key array (an array of ulong) use proper
        size of element, that is sizeof(ulong).
      sql/ha_myisammrg.cc:
        When copying rec_per_key array (an array of ulong) use proper
        size of element, that is sizeof(ulong).
      sql/table.cc:
        When allocating rec_per_key array (an array of ulong) use proper
        size of element, that is sizeof(ulong).
      2dc982e0
    • Alexey Kopytov's avatar
      Bug #44767: invalid memory reads in password() and · 877d60a2
      Alexey Kopytov authored
                  old_password() functions   
      The PASSWORD() and OLD_PASSWORD() functions could lead to   
      memory reads outside of an internal buffer when used with BLOB   
      arguments.   
        
      String::c_ptr() assumes there is at least one extra byte  
      in the internally allocated buffer when adding the trailing  
      '\0'.  This, however, may not be the case when a String object  
      was initialized with externally allocated buffer.  
        
      The bug was fixed by adding an additional "length" argument to  
      make_scrambled_password_323() and make_scrambled_password() in  
      order to avoid String::c_ptr() calls for  
      PASSWORD()/OLD_PASSWORD().  
        
      However, since the make_scrambled_password[_323] functions are  
      a part of the client library ABI, the functions with the new  
      interfaces were implemented with the 'my_' prefix in their  
      names, with the old functions changed to be wrappers around  
      the new ones to maintain interface compatibility.  
      
      mysql-test/r/func_crypt.result:
        Added a test case for bug #44767.
      mysql-test/t/func_crypt.test:
        Added a test case for bug #44767.
      sql/item_strfunc.cc:
        Use the new my_make_scrambled_password*() to avoid 
        String::c_ptr().
      sql/item_strfunc.h:
        Changed Item_func[_old]_password::alloc() interfaces so that
        we can use the new my_make_scrambled_password*() functions.
      sql/mysql_priv.h:
        Added declarations for the new my_make_scrambled_password*() 
        functions.
      sql/password.c:
        Added new my_make_scrambled_password*() functions with an
        additional "length" argument. Changed ones to be wrappers
        around the new ones to maintain interface compatibility.
      sql/sql_yacc.yy:
        Utilize the new password hashing functions with additional length
        argument.
      877d60a2
  9. 26 May, 2009 1 commit
  10. 22 May, 2009 3 commits
    • Luis Soares's avatar
      BUG#41725: slave crashes when inserting into temporary table after · a393195c
      Luis Soares authored
      stop/start slave
            
      When stopping and restarting the slave while it is replicating
      temporary tables, the server would crash or raise an assertion
      failure. This was due to the fact that although temporary tables are
      saved between slave threads restart, the reference to the thread in
      use (table->in_use) was not being properly updated when the restart
      happened (it would still reference the old/invalid thread instead of
      the new one).
            
      This patch addresses this issue by resetting the reference to the new
      slave thread on slave thread restart.
      
      mysql-test/r/rpl_temporary.result:
        Result file.
      mysql-test/t/rpl_temporary.test:
        Test case that checks that both failures go away.
      sql/slave.cc:
        Changed slave.cc to reset sql_thd reference in temporary tables.
      a393195c
    • Patrick Crews's avatar
      merge · 47ec7237
      Patrick Crews authored
      47ec7237
    • Patrick Crews's avatar
      Bug#40465 - mysqldump.test does no checking of dump or restore · f6755d15
      Patrick Crews authored
      Created new .test file - mysqldump_restore that does test restore from mysqldump
      output for a limited number of basic cases.
      Create new .inc file - mysqldump.inc - renames original table and uses mysqldump
      output to recreate the table, then uses diff_tables.inc to compare the two tables.
      Backported include/diff_tables.inc to facilitate this testing.
      New patch incorporating review feedback prior to push.
      
      mysqldump.test - removed redundant call to include/have_log_bin.inc (was used twice in the test!)
      f6755d15
  11. 21 May, 2009 6 commits
  12. 20 May, 2009 2 commits
    • MySQL Build Team's avatar
    • Alexey Kopytov's avatar
      Bug #44796: valgrind: too many my_longlong10_to_str_8bit · 2e5f1d0f
      Alexey Kopytov authored
                   warnings after uncompressed_length 
       
      UNCOMPRESSED_LENGTH() did not validate its argument. In 
      particular, if the argument length was less than 4 bytes, 
      an uninitialized memory value was returned as a result. 
       
      Since the result of COMPRESS() is either an empty string or 
      a 4-byte length prefix followed by compressed data, the bug was 
      fixed by ensuring that the argument of UNCOMPRESSED_LENGTH() is 
      either an empty string or contains at least 5 bytes (as done in 
      UNCOMPRESS()). This is the best we can do to validate input 
      without decompressing. 
      
      mysql-test/r/func_compress.result:
        Added a test case for bug #44796.
      mysql-test/t/func_compress.test:
        Added a test case for bug #44796.
      sql/item_strfunc.cc:
        Make sure that the argument of UNCOMPRESSED_LENGTH() contains 
        at least 5 bytes (as done in UNCOMPRESS()).
      2e5f1d0f
  13. 19 May, 2009 1 commit
    • Sergey Glukhov's avatar
      Bug#39793 Foreign keys not constructed when column has a '#' in a comment or default value · b51ebe25
      Sergey Glukhov authored
      Internal InnoDN FK parser does not recognize '\'' as quotation symbol.
      Suggested fix is to add '\'' symbol check for quotation condition
      (dict_strip_comments() function).
      
      
      innobase/dict/dict0dict.c:
        Internal InnoDN FK parser does not recognize '\'' as quotation symbol.
        Suggested fix is to add '\'' symbol check for quotation condition
        (dict_strip_comments() function).
      mysql-test/r/innodb_mysql.result:
        test result
      mysql-test/t/innodb_mysql.test:
        test case
      b51ebe25
  14. 18 May, 2009 1 commit
    • Gleb Shchepa's avatar
      Bug#40825: Error 1356 while selecting from a view · 2d55cc51
      Gleb Shchepa authored
                 with a "HAVING" clause though query works
      
      SELECT from views defined like:
      
        CREATE VIEW v1 (view_column)
          AS SELECT c AS alias FROM t1 HAVING alias
      
      fails with an error 1356:
        View '...' references invalid table(s) or column(s)
        or function(s) or definer/invoker of view lack rights
        to use them
      
      
      CREATE VIEW form with a (column list) substitutes
      SELECT column names/aliases with names from a
      view column list.
      However, alias references in HAVING clause was
      not substituted.
      
      
      The Item_ref::print function has been modified
      to write correct aliased names of underlying
      items into VIEW definition generation/.frm file.
      
      
      mysql-test/r/view.result:
        Added test file for bug #40825.
      mysql-test/t/view.test:
        Added test file for bug #40825.
      sql/item.cc:
        Bug#40825: Error 1356 while selecting from a view
                   with a "HAVING" clause though query works
        
        The Item_ref::print function has been modified
        to write correct aliased names of underlying
        items into VIEW definition generation/.frm file.
      2d55cc51
  15. 15 May, 2009 8 commits