1. 28 May, 2009 2 commits
  2. 27 May, 2009 2 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
  3. 26 May, 2009 1 commit
  4. 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
  5. 21 May, 2009 6 commits
  6. 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
  7. 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
  8. 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
  9. 15 May, 2009 10 commits
    • Matthias Leich's avatar
      Merge of fix into GCA tree, no conflicts · 355c28a5
      Matthias Leich authored
      355c28a5
    • Georgi Kodinov's avatar
      backported a change from 5.1 · c6ee9304
      Georgi Kodinov authored
      c6ee9304
    • Georgi Kodinov's avatar
      merged · a6c66929
      Georgi Kodinov authored
      a6c66929
    • Georgi Kodinov's avatar
      fixed a win32 compile error · dd9be1cd
      Georgi Kodinov authored
      dd9be1cd
    • Philip Stoev's avatar
      Bug #32651 grant_cache.test fails · 5afb285e
      Philip Stoev authored
        It turns out that this test case no longer fails with the discrepancy
        in numbers that was the original cause for disabling this test (and showed
        potential genuine issues with the query cache). Therefore
        this test is being enabled after some minor adjustment of error codes and
        messages.
      5afb285e
    • Matthias Leich's avatar
      Fix for Bug#44826 main.information_schema_db could harm succeeding tests · 1b903660
      Matthias Leich authored
      Details:
      1. Add missing "disconnect <session>"
      2. Take care that the disconnects are finished when the test terminates
      3. Replace error names by error numbers
      4. Minor beautifying of script code
      1b903660
    • Georgi Kodinov's avatar
      merged 5.0-main -> 5.0-bugteam · 0a57cd13
      Georgi Kodinov authored
      0a57cd13
    • Alexey Kopytov's avatar
      Automerge. · 5b1ba507
      Alexey Kopytov authored
      5b1ba507
    • Alexey Kopytov's avatar
      Bug #44792: valgrind warning when casting from time to time · 81f2782b
      Alexey Kopytov authored
       
      Field_time::get_time() did not initialize some members of 
      MYSQL_TIME which led to valgrind warnings when those members 
      were accessed in Protocol_simple::store_time(). 
       
      It is unlikely that this bug could result in wrong data 
      being returned, since Field_time::get_time() initializes the 
      'day' member of MYSQL_TIME to 0, so the value of 'day' 
      in Protocol_simple::store_time() would be 0 regardless 
      of the values for 'year' and 'month'.
      
      mysql-test/r/type_time.result:
        Added a test case for bug #44792.
      mysql-test/t/type_time.test:
        Added a test case for bug #44792.
      sql/field.cc:
        Field_time::get_time() did not initialize some members of 
        MYSQL_TIME which led to valgrind warnings when those members 
        were accessed in Protocol_simple::store_time().
      81f2782b
    • Sergey Glukhov's avatar
      Bug#43612 crash with explain extended, union, order by · e5a22cc2
      Sergey Glukhov authored
      In UNION if we use last SELECT without braces and this
      SELECT have ORDER BY clause, such clause belongs to
      global UNION. It is parsed like last SELECT
      part and used further as 'unit->global_parameters->order_list' value.
      During DESCRIBE EXTENDED we call select_lex->print_order() for
      last SELECT where order fields refer to tmp table 
      which already freed. It leads to crash.
      The fix is clean up global_parameters->order_list
      instead of fake_select_lex->order_list.
      
      
      mysql-test/r/union.result:
        test result
      mysql-test/t/union.test:
        test case
      sql/sql_union.cc:
        In UNION if we use last SELECT without braces and this
        SELECT have ORDER BY clause, such clause belongs to
        global UNION. It is parsed like last SELECT
        part and used further as 'unit->global_parameters->order_list' value.
        During DESCRIBE EXTENDED we call select_lex->print_order() for
        last SELECT where order fields refer to tmp table 
        which already freed. It leads to crash.
        The fix is clean up global_parameters->order_list
        instead of fake_select_lex->order_list.
      e5a22cc2
  10. 14 May, 2009 2 commits
    • Philip Stoev's avatar
      Bugs #44871 and #43894: · fef1dbe8
      Philip Stoev authored
        UNIX sockets need to be on a path shorter than 70 characters on some older platofrms.
        MTRv1 tries to fix this by moving the socket to the $TMPDIR, however this causes
        issues with certain tests on Windows.
      
        Fixed by not applying any hacks on Windows - Windows does not need them.
      fef1dbe8
    • Philip Stoev's avatar
      Bugs #44871 and #43894: · 724dc27b
      Philip Stoev authored
      UNIX sockets need to be on a path shorter than 70 characters on some older platofrms.
      MTRv1 tries to fix this by moving the socket to the $TMPDIR, however this causes
      issues with certain tests on Windows.
      
      Fixed by not applying any hacks on Windows - Windows does not need them.
      724dc27b
  11. 13 May, 2009 1 commit
  12. 12 May, 2009 3 commits
    • Jim Winstead's avatar
      Merge from 5.0-bugteam · 0acb89dd
      Jim Winstead authored
      0acb89dd
    • Chad MILLER's avatar
      Remove community-server only feature and place in its own test · e8f67477
      Chad MILLER authored
      with appropriate condition.
      e8f67477
    • Ramil Kalimullin's avatar
      Fix for bug#44774: load_file function produces valgrind warnings · 9a3cf78b
      Ramil Kalimullin authored
      Problem: using LOAD_FILE() in some cases we pass a file name string
      without a trailing '\0' to fn_format() which relies on that however.
      That may lead to valgrind warnings.
      
      Fix: add a trailing '\0' to the file name passed to fn_format().
      
      
      mysql-test/r/func_str.result:
        Fix for bug#44774: load_file function produces valgrind warnings
          - test result.
      mysql-test/t/func_str.test:
        Fix for bug#44774: load_file function produces valgrind warnings
          - test case.
      sql/item_strfunc.cc:
        Fix for bug#44774: load_file function produces valgrind warnings
          - passing a file name to fn_format(), file_name->c_ptr() replaced
            with file_name->c_ptr_safe() to ensure we have a trailing '\0'.
      9a3cf78b
  13. 11 May, 2009 2 commits
  14. 10 May, 2009 1 commit
    • Ramil Kalimullin's avatar
      Fix for bug#42009: SELECT into variable gives different results to direct SELECT · 000049f0
      Ramil Kalimullin authored
      Problem: storing "SELECT ... INTO @var ..." results in variables we used val_xxx()
      methods which returned results of the current row. 
      So, in some cases (e.g. SELECT DISTINCT, GROUP BY or HAVING) we got data
      from the first row of a new group (where we evaluate a clause) instead of
      data from the last row of the previous group.
      
      Fix: use val_xxx_result() counterparts to get proper results.
      
      
      mysql-test/r/distinct.result:
        Fix for bug#42009: SELECT into variable gives different results to direct SELECT
          - results adjusted.
      mysql-test/r/user_var.result:
        Fix for bug#42009: SELECT into variable gives different results to direct SELECT
          - test result.
      mysql-test/t/user_var.test:
        Fix for bug#42009: SELECT into variable gives different results to direct SELECT
          - test case.
      sql/item_func.cc:
        Fix for bug#42009: SELECT into variable gives different results to direct SELECT
          - Item_func_set_user_var::save_item_result() added to evaluate and store 
            an item's result into a user variable.
      sql/item_func.h:
        Fix for bug#42009: SELECT into variable gives different results to direct SELECT
          - Item_func_set_user_var::save_item_result() added to evaluate and store 
            an item's result into a user variable.
      sql/sql_class.cc:
        Fix for bug#42009: SELECT into variable gives different results to direct SELECT
          - use Item_func_set_user_var::save_item_result() to store results into user 
            variables.
      000049f0
  15. 08 May, 2009 3 commits