1. 19 Feb, 2009 1 commit
    • Georgi Kodinov's avatar
      Bug #42419: Server crash with "Pure virtual method called" on two concurrent · 29476d87
      Georgi Kodinov authored
      connections
      The problem is that tables can enter open table cache for a thread without 
      being properly cleaned up. This can happen if make_join_statistics() fails 
      to read a const table because of e.g. a deadlock. It does set a member of 
      TABLE structure to a value it allocates, but doesn't clean-up this setting 
      on error nor does it set the rest of the members in JOIN to allow for 
      automatic cleanup.
      As a result when such an error occurs and the next statement depends re-uses 
      the table from the open tables cache it will get it with this 
      TABLE::reginfo.join_tab pointing to a memory area that's freed.
      Fixed by making sure make_join_statistics() cleans up TABLE::reginfo.join_tab 
      on error.
      
      mysql-test/r/innodb_mysql.result:
        Bug #42419: test case
      mysql-test/t/innodb_mysql-master.opt:
        Bug #42419: increase the timeout so it covers te conservative 
        sleep 3 in the test
      mysql-test/t/innodb_mysql.test:
        Bug #42419: test case
      sql/sql_select.cc:
        Bug #42419: clean up the members of TABLE on failure in 
                make_join_statisitcs()
      29476d87
  2. 13 Feb, 2009 1 commit
  3. 12 Feb, 2009 4 commits
    • Georgi Kodinov's avatar
      merged 5.0-bugteam to a working tree · 47c53135
      Georgi Kodinov authored
      47c53135
    • Georgi Kodinov's avatar
      Bug #33813: Schema names are case-sensitive in DROP FUNCTION · 1c5fa3b6
      Georgi Kodinov authored
            
      Additional fix:
       1. Revert the unification of DROP FUNCTION
      and DROP PROCEDURE, because DROP FUNCTION can be used to
      drop UDFs (that have a non-qualified name and don't require
      database name to be present and valid).
       2. Fixed the case sensitivity problem by adding a call to 
      check_db_name() (similar to the sp_name production).
      1c5fa3b6
    • Sergey Vojtovich's avatar
      BUG#36737 - having + full text operator crashes mysql · 5803e106
      Sergey Vojtovich authored
            
      MATCH() function accepts column list as an argument. It was possible to override
      this requirement with aliased non-column select expression. Which results in
      server crash.
      
      With this fix aliased non-column select expressions are not accepted by MATCH()
      function, returning an error.
      
      mysql-test/r/fulltext.result:
        A test case for BUG#36737.
      mysql-test/t/fulltext.test:
        A test case for BUG#36737.
      sql/item_func.cc:
        Only accept fields as arguments to MATCH().
      5803e106
    • Georgi Kodinov's avatar
      merged bug 33813 to 5.0-bugteam · 7df0e72c
      Georgi Kodinov authored
      7df0e72c
  4. 10 Feb, 2009 3 commits
  5. 09 Feb, 2009 2 commits
    • Matthias Leich's avatar
      This belongs to the fix for · 0fab1a85
      Matthias Leich authored
      Bug#42003 tests missing the disconnect of connections <> default
      second slice
      Content:
      1. wait_until_count_sessions.inc
         - One PB run of a test using this routine failed because
           5 seconds timeout were exceeded. Although I have some doubts
           if the assigned timeout was really too small, I increase the
           value to 10. We waste the additional 5 seconds only if the
           tests fails anyway.
         - Print the content of the PROCESSLIST if the poll routine fails
      2. minor improvements of formatting
      3. query_cache_notembedded:
         Activate the wait_until_count_sessions.inc routine which was
         unfortunately forgotten in the changeset before.
      0fab1a85
    • Matthias Leich's avatar
      Merge of ifx into GCA tree · 4c0dd2a7
      Matthias Leich authored
      no conflicts
      4c0dd2a7
  6. 07 Feb, 2009 3 commits
  7. 06 Feb, 2009 9 commits
  8. 05 Feb, 2009 5 commits
    • Matthias Leich's avatar
      2. Slice of fix for Bug#42003 tests missing the disconnect of connections <> default · 41e6a1f8
      Matthias Leich authored
         - If missing: add "disconnect <session>"
         - If physical disconnect of non "default" sessions is not finished
           at test end: add routine which waits till this happened
      + additional improvements
        - remove superfluous files created by the test
        - replace error numbers by error names
        - remove trailing spaces, replace tabs by spaces
        - unify writing of bugs within comments
        - correct comments
        - minor changes of formatting
      Fixed tests:
        backup
        check
        compress
        grant
        information_schema
        multi_update
        overflow
        packet
        query_cache_not_embedded
        sp-threads
        subselect
        synchronization
        timezone_grant
      41e6a1f8
    • Alexey Kopytov's avatar
      Merge to team tree. · 759b626d
      Alexey Kopytov authored
      759b626d
    • Alexey Kopytov's avatar
      Merge from team tree. · 20cdcaa3
      Alexey Kopytov authored
      20cdcaa3
    • Gleb Shchepa's avatar
      Bug #42037: Queries containing a subquery with DISTINCT and · 061bf717
      Gleb Shchepa authored
                  ORDER BY could cause a server crash
      
      Dependent subqueries like
      
        SELECT COUNT(*) FROM t1, t2 WHERE t2.b
         IN (SELECT DISTINCT t2.b FROM t2 WHERE t2.b = t1.a)
      
      caused a memory leak proportional to the
      number of outer rows.
      
      
      The make_simple_join() function has been modified to
      JOIN class method to store join_tab_reexec and
      table_reexec values in the parent join only
      (make_simple_join of tmp_join may access these values
      via 'this' pointer of the parent JOIN).
      
      NOTE: this patch doesn't include standard test case (this is
      "out of memory" bug). See bug #42037 page for test cases.
      
      
      sql/sql_select.cc:
        Bug #42037: Queries containing a subquery with DISTINCT and
                    ORDER BY could cause a server crash
        
        The make_simple_join() function has been modified to
        JOIN class method to store join_tab_reexec and
        table_reexec values in the parent join only.
      sql/sql_select.h:
        Bug #42037: Queries containing a subquery with DISTINCT and
                    ORDER BY could cause a server crash
        
        1. The make_simple_join() function has been modified to
           JOIN class method.
        
        2. Type of JOIN::table_reexec field has been changed from
           TABLE** to TABLE *table_reexec[1]: this field always was
           NULL or a pointer to one-element array of pointers, so
           a pointer to a pointer has been replaced with one pointer
           and unnecessary memory allocation has been eliminated.
      061bf717
    • Ramil Kalimullin's avatar
      Fix for bug#42014: Crash, name_const with collate · 31d908d7
      Ramil Kalimullin authored
      Problem: some queries using NAME_CONST(.. COLLATE ...)
      lead to server crash due to failed type cast.
      
      Fix: return the underlying item's type in case of
      NAME_CONST(.. COLLATE ...) to avoid wrong casting.
      
      
      mysql-test/r/func_misc.result:
        Fix for bug#42014: Crash, name_const with coll
          - test result.
      mysql-test/t/func_misc.test:
        Fix for bug#42014: Crash, name_const with coll
          - test case.
      sql/item.cc:
        Fix for bug#42014: Crash, name_const with coll
          - in case of NAME_CONST('name', 'value' COLLATE collation)
        Item_name_const::type() returns type of 'value' argument 
        to awoid wrong type casting of the Item_name_const items.
      31d908d7
  9. 04 Feb, 2009 4 commits
    • Chad MILLER's avatar
      Merge from bug tree. · 243b2639
      Chad MILLER authored
      243b2639
    • Matthias Leich's avatar
      6f19c0fc
    • Sergey Vojtovich's avatar
      BUG#32047 - 'Spurious' errors while opening MERGE tables · 97bd7635
      Sergey Vojtovich authored
      Accessing well defined MERGE table may return an error
      stating that the merge table is incorrectly defined. This
      happens if MERGE child tables were accessed before and we
      failed to open another incorrectly defined MERGE table in
      this connection.
      
      myrg_open() internally used my_errno as a variable for determining
      failure, and thus could be tricked into a wrong decision by other
      uses of my_errno.
      
      With this fix we use function local boolean flag instead of my_errno
      to determine failure.
      
      myisammrg/myrg_open.c:
        There are two requirement for accessing/setting my_errno variable,
        which were not followed by myrg_open():
        - it must be checked immediately after a function returned an error. There
          must be no calls to other functions that may change it's value between.
        - my_errno value must be set right before a function is going to return an
          error. There must be no calls to other functions that may change it's
          value between (that's why we have these tricks with save_errno at the
          bottom of myrg_open()).
        
        myrg_open() internally used my_errno as a variable for determining
        failure, and thus could be tricked into a wrong decision by other
        uses of my_errno.
      mysql-test/r/merge.result:
        A test case for BUG#32047.
      mysql-test/t/merge.test:
        A test case for BUG#32047.
      97bd7635
    • Timothy Smith's avatar
      The nwbootstrap script depended on BitKeeper, and was fairly complicated. It's much · 1b557a2c
      Timothy Smith authored
      simpler to just use the source .tar.gz to do a build.  So the script has been renamed
      to nwbuild, and simplified.
      1b557a2c
  10. 03 Feb, 2009 2 commits
    • Alexey Kopytov's avatar
      Fix for bug #41868: crash or memory overrun with concat + upper, date_format · dfbba6e7
      Alexey Kopytov authored
                          functions
            
      String::realloc() did not check whether the existing string data fits in the newly
      allocated buffer for cases when reallocating a String object with external buffer
      (i.e.alloced == FALSE).  This could lead to memory overruns in some cases.
      
      
      mysql-test/r/func_str.result:
        Added a test case for bug #41868.
      mysql-test/t/func_str.test:
        Added a test case for bug #41868.
      sql/sql_class.cc:
        After each call to Item::send() in select_send::send_data() reset buffer to its
        original state to reduce unnecessary malloc() calls. See comments for bug #41868
        for detailed analysis.
      sql/sql_string.cc:
        Fixed String::realloc() to check whether the existing string data fits in the newly allocated buffer for cases when reallocating a String object with external buffer.
      dfbba6e7
    • Georgi Kodinov's avatar
      83ff1b96
  11. 02 Feb, 2009 2 commits
    • Patrick Crews's avatar
      Bug#39369: execution of "variables.test" with "check-testcases" show differences. · 9a3afd1a
      Patrick Crews authored
      The original symptoms of this bug have been fixed as a consequence of other bug fixes.
      Taking this time to correct some formatting, such as replacing error numbers with names.
      Beginning this with 5.0
      9a3afd1a
    • Matthias Leich's avatar
      1. Slice of fix for Bug#42003 tests missing the disconnect of connections <> default · 1a04fc03
      Matthias Leich authored
         - If missing: add "disconnect <session>"
         - If physical disconnect of non "default" sessions is not finished
           at test end: add routine which waits till this happened
      + additional improvements like
        - remove superfluous files created by the test
        - replace error numbers by error names
        - remove trailing spaces, replace tabs by spaces
        - unify writing of bugs within comments
        - correct comments
        - minor changes of formatting
      Modifications according to the code review are included.
      Fixed tests:
      grant2
      grant3
      lock_tables_lost_commit
      mysqldump
      openssl_1
      outfile
      1a04fc03
  12. 31 Jan, 2009 1 commit
  13. 30 Jan, 2009 2 commits
    • Tatiana A. Nurnberg's avatar
      Bug#41370: TIMESTAMP field does not accepts NULL from FROM_UNIXTIME() · ce563480
      Tatiana A. Nurnberg authored
      When storing a NULL to a TIMESTAMP NOT NULL DEFAULT ...,
      NULL returned from some functions threw a 'cannot be NULL error.'
      
      NULL-returns now correctly result in the timestamp-field being
      assigned its default value.
      
      mysql-test/r/type_timestamp.result:
        Show that for TIMESTAMP NOT NULL DEFAULT, NULL function returns
        set default now.
      mysql-test/t/type_timestamp.test:
        Show that for TIMESTAMP NOT NULL DEFAULT, NULL function returns
        set default now.
      sql/item.cc:
        When storing a returned NULL (from a time- or date-related
        function), make sure to apply NULL-means-DEFAULT magic where
        applicable.
      ce563480
    • Georgi Kodinov's avatar
      merged 5.0-main -> 5.0-bugteam · bb31fd59
      Georgi Kodinov authored
      bb31fd59
  14. 29 Jan, 2009 1 commit