1. 19 Apr, 2006 5 commits
    • unknown's avatar
      Merge rurik.mysql.com:/home/igor/mysql-4.1 · 34efb701
      unknown authored
      into  rurik.mysql.com:/home/igor/dev/mysql-4.1-2
      
      
      34efb701
    • unknown's avatar
      Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-4.1 · 08e52679
      unknown authored
      into moonbone.local:/work/14169-bug-4.1-mysql
      
      
      08e52679
    • unknown's avatar
      func_gconcat.result: · 913c8fa1
      unknown authored
        Corrected test case for the bug#14169 to make it pass in --ps-protocol mode.
      
      
      mysql-test/r/func_gconcat.result:
        Corrected test case for the bug#14169 to make it pass in --ps-protocol mode.
      913c8fa1
    • unknown's avatar
      Bug#18544 - LOCK TABLES timeout causes MyISAM table corruption · c0887e54
      unknown authored
      After a locking error the open table(s) were not fully
      cleaned up for reuse. But they were put into the open table
      cache even before the lock was tried. The next statement
      reused the table(s) with a wrong lock type set up. This
      tricked MyISAM into believing that it don't need to update
      the table statistics. Hence CHECK TABLE reported a mismatch
      of record count and table size.
      
      Fortunately nothing worse has been detected yet. The effect
      of the test case was that the insert worked on a read locked
      table. (!)
      
      I added a new function that clears the lock type from all
      tables that were prepared for a lock. I call this function
      when a lock failes.
      
      No test case. One test would add 50 seconds to the
      test suite. Another test requires file mode modifications.
      I added a test script to the bug report. It contains three
      cases for failing locks. All could reproduce a table
      corruption. All are fixed by this patch.
      
      This bug was not lock timeout specific.
      
      
      sql/lock.cc:
        Bug#18544 - LOCK TABLES timeout causes MyISAM table corruption
        Resetting the lock type in the open table(s) lock data
        after a locking error.
      c0887e54
    • unknown's avatar
      Fixed bug #19079. · b97e48a9
      unknown authored
      The bug caused a reported index corruption in the cases when
      key_cache_block_size was not a multiple of myisam_block_size,
      e.g. when key_cache_block_size=1536 while myisam_block_size=1024.
      
      
      mysql-test/r/key_cache.result:
        Added a test case for bug #19079.
      mysql-test/t/key_cache.test:
        Added a test case for bug #19079.
      b97e48a9
  2. 18 Apr, 2006 2 commits
  3. 14 Apr, 2006 2 commits
  4. 13 Apr, 2006 5 commits
    • unknown's avatar
      Merge svojtovich@bk-internal.mysql.com:/home/bk/mysql-4.1 · a875afd6
      unknown authored
      into  april.(none):/home/svoj/devel/mysql/BUG17917/mysql-4.1
      
      
      a875afd6
    • unknown's avatar
      Fix a typo in the help message. · 403e6783
      unknown authored
      
      sql/mysqld.cc:
        Fix a typo.
      403e6783
    • unknown's avatar
      Merge svojtovich@bk-internal.mysql.com:/home/bk/mysql-4.1 · 970d28ef
      unknown authored
      into  april.(none):/home/svoj/devel/mysql/BUG17917/mysql-4.1
      
      
      970d28ef
    • unknown's avatar
      BUG#17917 - SELECT from compressed MyISAM table crashes MySQL server · d316b8b1
      unknown authored
      Retrieving data from compressed MyISAM table which is bigger than 4G on 32-bit box
      with mmap() support results in server crash.
      
      mmap() accepts length of bytes to be mapped in second param, which is 32-bit
      size_t. But we pass data_file_length, which is 64-bit my_off_t. As a result only
      first data_file_length % 4G were mapped.
      
      This fix adds additional condition for mmap() usage, that is use mmap() for
      compressed table which size is no more than 4G on 32-bit platform.
      
      
      myisam/mi_packrec.c:
        Use mmap() for compressed table which size is no more than 4G on 32-bit platform.
      d316b8b1
    • unknown's avatar
      Bug#18691: Converting number to UNICODE string returns invalid result. · 5c0c1dcc
      unknown authored
      Conversion from int and real numbers to UCS2 didn't work fine: 
      CONVERT(100, CHAR(50) UNICODE)
      CONVERT(103.9, CHAR(50) UNICODE)
      
      The problem appeared because numbers have binary charset, so,
      simple charset recast binary->ucs2 was performed
      instead of real conversion.
      
      Fixed to make numbers pretend to be non-binary.
      
      
      mysql-test/r/ctype_ucs.result:
        Adding test case
      mysql-test/t/ctype_ucs.test:
        Adding test case
      sql/item_timefunc.cc:
        Adding new member from_cs, to replace my_charset_bin
        to a non-binary charset when converting from numbers to UCS2
      sql/item_timefunc.h:
        Adding new member from_cs, to replace my_charset_bin
        to a non-binary charset when converting from numbers to UCS2
      5c0c1dcc
  5. 12 Apr, 2006 1 commit
    • unknown's avatar
      Fixed bug#14169: type of group_concat() result changed to blob if tmp_table was · a2066982
      unknown authored
      used
      
      In a simple queries a result of the GROUP_CONCAT() function was always of 
      varchar type.
      But if length of GROUP_CONCAT() result is greater than 512 chars and temporary
      table is used during select then the result is converted to blob, due to
      policy to not to store fields longer than 512 chars in tmp table as varchar
      fields.
      
      In order to provide consistent behaviour, result of GROUP_CONCAT() now
      will always be converted to blob if it is longer than 512 chars.
      Item_func_group_concat::field_type() is modified accordingly.
      
      
      mysql-test/t/func_gconcat.test:
        Added test case for bug#14169: type of group_concat() result changed to blob if tmp_table was used
      mysql-test/r/func_gconcat.result:
        Added test case for bug#14169: type of group_concat() result changed to blob if tmp_table was used
      sql/unireg.h:
        Added the CONVERT_IF_BIGGER_TO_BLOB constant
      sql/sql_select.cc:
        Fixed bug#14169: type of group_concat() result changed to blob if tmp_table was used
        The unnamed constant 255 in the create_tmp_field() and create_tmp_field_from_item() functions now defined as the CONVERT_IF_BIGGER_TO_BLOB constant.
        The create_tmp_field() function now converts the Item_sum string result to a blob field based on its char length.
      sql/item_sum.h:
        Fixed bug#14169: type of group_concat() result changed to blob if tmp_table was used
        To the Item_func_group_concat calls added the member function field_type() which returns the BLOB or VAR_STRING type based on the items length.
      sql/item_func.cc:
        Fixed bug#14169: type of group_concat() result changed to blob if tmp_table was used
        In the Item_func::tmp_table_field() function the unnamed constant 255 is changed to the CONVERT_IF_BIGGER_TO_BLOB constant.
        The Item_func::tmp_table_field() function now measures the result length in chars rather than bytes when converting string result to a blob.
      a2066982
  6. 11 Apr, 2006 7 commits
  7. 10 Apr, 2006 4 commits
  8. 08 Apr, 2006 3 commits
  9. 07 Apr, 2006 10 commits
    • unknown's avatar
      Merge bk-internal.mysql.com:/home/bk/mysql-4.1 · f37d6101
      unknown authored
      into  mysql.com:/opt/local/work/mysql-4.1-16365
      
      
      sql/mysql_priv.h:
        Auto merged
      sql/sql_class.h:
        Auto merged
      mysql-test/r/ps.result:
        Manual merge
      mysql-test/t/ps.test:
        Manual merge
      f37d6101
    • unknown's avatar
      A fix and a test case for Bug#16365 "Prepared Statements: DoS with · 5b5530da
      unknown authored
      too many open statements". The patch adds a new global variable
      @@max_prepared_stmt_count. This variable limits the total number
      of prepared statements in the server. The default value of
      @@max_prepared_stmt_count is 16382. 16382 small statements
      (a select against 3 tables with GROUP, ORDER and LIMIT) consume 
      100MB of RAM. Once this limit has been reached, the server will 
      refuse to prepare a new statement and return ER_UNKNOWN_ERROR 
      (unfortunately, we can't add new errors to 4.1 without breaking 5.0). The limit is changeable after startup
      and can accept any value from 0 to 1 million. In case
      the new value of the limit is less than the current
      statement count, no new statements can be added, while the old
      still can be used. Additionally, the current count of prepared 
      statements is now available through a global read-only variable 
      @@prepared_stmt_count.
      
      
      mysql-test/r/ps.result:
        Test results fixed (a test case for Bug#16365)
      mysql-test/t/ps.test:
        A test case for Bug#16365 "Prepared Statements: DoS with too many 
        open statements". Also fix statement leaks in other tests.
      sql/mysql_priv.h:
        Add declarations for new global variables.
      sql/mysqld.cc:
        Add definitions of max_prepared_stmt_count, prepared_stmt_count.
      sql/set_var.cc:
        Implement support for @@prepared_stmt_count and 
        @@max_prepared_stmt_count. Currently these variables are queried
        without acquiring LOCK_prepared_stmt_count due to limitations of
        the set_var/sys_var class design. Updates are, however, protected 
        with a lock.
      sql/set_var.h:
        New declarations to add support for @@max_prepared_stmt_count.
        Implement a new class, where the lock to be used when updating
        a variable is a parameter.
      sql/sql_class.cc:
        Add accounting of the total number of prepared statements in the
        server to the methods of Statement_map.
      sql/sql_class.h:
        Add accounting of the total number of prepared statements in the
        server to the methods of Statement_map.
      sql/sql_prepare.cc:
        Statement_map::insert will now send a message in case of an
        error.
      5b5530da
    • unknown's avatar
      Merge jbruehe@bk-internal.mysql.com:/home/bk/mysql-4.1 · e4e37ae5
      unknown authored
      into mysql.com:/M41/mtr-4.1
      
      
      e4e37ae5
    • unknown's avatar
      A fix and a test case for Bug#16248 "WHERE (col1,col2) IN ((?,?)) · 9b6e83f4
      unknown authored
      gives wrong results". Implement previously missing 
      Item_row::cleanup. The bug is not repeatable in 5.0, probably 
      due to a coincidence: the problem is present in 5.0 as well.
      
      
      mysql-test/r/ps.result:
        Update the result file (Bug#16248)
      mysql-test/t/ps.test:
        Add a test case for Bug#16248 "WHERE (col1,col2) IN ((?,?)) gives 
        wrong results"
      sql/item_row.cc:
        Implement Item_row::cleanup(): we should reset used_tables_cache
        before reexecution of a prepared statement. In case ROW
        arguments contain a placeholder, used_tables_cache has PARAM_TABLE
        bit set in statement prepare. As a result, when executing a statement,
        the condition push down algorithm (make_cond_for_table) would think
        that the WHERE clause belongs to the non-existent PARAM_TABLE and
        wouldn't attach the WHERE clause to any of the real tables, 
        effectively optimizing the clause away.
      sql/item_row.h:
        Remove a never used member 'array_holder'. Add declaration for
        Item_row::cleanup.
      9b6e83f4
    • unknown's avatar
      Manual merge. · a024fd69
      unknown authored
      a024fd69
    • unknown's avatar
      mysql-test/mysql-test-run.sh : Provide info about the options used. · 747f81c2
      unknown authored
      
      mysql-test/mysql-test-run.sh:
        Provide info about the options used for this run to any evaluation tool.
      747f81c2
    • unknown's avatar
      mysql-test/mysql-test-run.pl : Add option "with-ndbcluster-only" (ignored). · 7bb18828
      unknown authored
      
      mysql-test/mysql-test-run.pl:
        Add option "with-ndbcluster-only" (ignored) for compatibility with newer "Do-compile".
      7bb18828
    • unknown's avatar
      Perl test script: Avoid some aborts, which made the whole build/test process terminate. · 8fc0c48d
      unknown authored
      
      mysql-test/lib/mtr_process.pl:
        Change from "mtr_error()" to "mtr_warning()" on some problems,
        because "error" makes the whole suite abort which then makes "Do-compile" terminate,
        so none of the following steps (including other etst suites) will be done.
      8fc0c48d
    • unknown's avatar
      mysql-test/mysql-test-run.sh : Add option "--with-ndbcluster-only" (backport from 5.1) · 6206e7c2
      unknown authored
      
      mysql-test/mysql-test-run.sh:
        Manual merge from 4.0 (which was a 5.1 backport):
        "--with-ndbcluster" is already present,
        "--with-ndbcluster-only" is really usable here.
      6206e7c2
    • unknown's avatar
      Merge perch.ndb.mysql.com:/home/jonas/src/mysql-4.1 · 6caa2495
      unknown authored
      into  perch.ndb.mysql.com:/home/jonas/src/41-work
      
      
      6caa2495
  10. 06 Apr, 2006 1 commit