1. 12 Jun, 2009 2 commits
    • Georgi Kodinov's avatar
      fixed the build-tags command · dfb06c38
      Georgi Kodinov authored
      dfb06c38
    • Georgi Kodinov's avatar
      Bug #45386: Wrong query result with MIN function in field list, · 3e82a86e
      Georgi Kodinov authored
      WHERE and GROUP BY clause
      
      Loose index scan may use range conditions on the argument of 
      the MIN/MAX aggregate functions to find the beginning/end of 
      the interval that satisfies the range conditions in a single go.
      These range conditions may have open or closed minimum/maximum 
      values. When the comparison returns 0 (equal) the code should 
      check the type of the min/max values of the current interval 
      and accept or reject the row based on whether the limit is 
      open or not.
      There was a wrong composite condition on checking this and it was
      not working in all cases.
      Fixed by simplifying the conditions and reversing the logic.
      
      mysql-test/r/group_min_max.result:
        Bug #45386: test case
      mysql-test/t/group_min_max.test:
        Bug #45386: test case
      sql/opt_range.cc:
        Bug #45386: fix the check whether to use the value if on the
        interval boundry
      3e82a86e
  2. 10 Jun, 2009 1 commit
    • Davi Arnaut's avatar
      Bug#41190: shared memory connections do not work in Vista, if server started from cmdline · afacea4d
      Davi Arnaut authored
      Backport to MySQL 5.0/1 fix by Vladislav Vaintroub:
      
      In Vista and later and also in when using terminal services, when
      server is started from  command line, client cannot connect to it
      via shared memory protocol.
      
      This is a regression introduced when  Bug#24731 was fixed.  The
      reason is that client is trying to attach to shared memory using
      global kernel object  namespace (all kernel objects are prefixed
      with Global\). However, server started from the command line in
      Vista and later will create shared memory and events using current
      session namespace. Thus, client is unable to find the server and
      connection fails.
      
      The fix for the client is to first try to find server using "local"
      names  (omitting Global\  prefix) and only if server is not found,
      trying global namespace.
      afacea4d
  3. 09 Jun, 2009 1 commit
    • Staale Smedseng's avatar
      Bug #43414 Parenthesis (and other) warnings compiling MySQL · a073ee45
      Staale Smedseng authored
      with gcc 4.3.2
            
      Compiling MySQL with gcc 4.3.2 and later produces a number of 
      warnings, many of which are new with the recent compiler
      versions.
            
      This bug will be resolved in more than one patch to limit the
      size of changesets. This is the first patch, fixing a number 
      of the warnings, predominantly "suggest using parentheses 
      around && in ||", and empty for and while bodies.
      a073ee45
  4. 06 Jun, 2009 2 commits
  5. 05 Jun, 2009 6 commits
  6. 04 Jun, 2009 5 commits
    • Tatiana A. Nurnberg's avatar
      Bug#32149: Long semaphore wait for adaptive hash latch · e34085fe
      Tatiana A. Nurnberg authored
      Holding on to the temporary inno hash index latch is an optimization in
      many cases, but a pessimization in some others.
      
      Release temporary latches for those corner cases we (or rather, or customers,
      thanks!) have identified, that is, when we are about to do something that
      might take a really long time, like REPAIR or filesort.
      
      sql/ha_myisam.cc:
        Let go of (inno, for now) latch when doing MyISAM-repair.
        (optimize passes through repair.) ("Stuck" in "Repair with
        keycache".)
      sql/sql_insert.cc:
        Let go of (inno, for now) latch when doing CREATE...SELECT
        in select_insert::send_data() -- it might take a while.
        ("stuck" in "Sending data")
      sql/sql_select.cc:
        Release temporary (inno, for now) latch on
        - free_tmp_table() (this can take surprisingly long, "removing tmp table")
        - create_myisam_from_heap() (HEAP table overflowing onto disk as MyISAM,
          "converting HEAP to MyISAM")
      e34085fe
    • Bernt M. Johnsen's avatar
    • Bernt M. Johnsen's avatar
      a3ac1f7e
    • 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
    • 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
  7. 02 Jun, 2009 1 commit
    • 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
  8. 01 Jun, 2009 1 commit
  9. 31 May, 2009 3 commits
  10. 30 May, 2009 1 commit
    • 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
  11. 28 May, 2009 2 commits
  12. 27 May, 2009 3 commits
    • Georgi Kodinov's avatar
      automerge · f1463061
      Georgi Kodinov authored
      f1463061
    • Sergey Glukhov's avatar
      Bug#41212 crash after race condition between merge table and table_cache evictions · f54beb2d
      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).
      f54beb2d
    • Alexey Kopytov's avatar
      Bug #44767: invalid memory reads in password() and · 1b8322c3
      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.
      1b8322c3
  13. 26 May, 2009 1 commit
  14. 22 May, 2009 3 commits
    • Luis Soares's avatar
      BUG#41725: slave crashes when inserting into temporary table after · 8e589d1d
      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.
      8e589d1d
    • Patrick Crews's avatar
      merge · a41d2daf
      Patrick Crews authored
      a41d2daf
    • Patrick Crews's avatar
      Bug#40465 - mysqldump.test does no checking of dump or restore · e42f2819
      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!)
      e42f2819
  15. 21 May, 2009 6 commits
  16. 20 May, 2009 2 commits
    • MySQL Build Team's avatar
    • Alexey Kopytov's avatar
      Bug #44796: valgrind: too many my_longlong10_to_str_8bit · 0b62b7f2
      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()).
      0b62b7f2