1. 07 Apr, 2006 1 commit
    • 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
  2. 23 Mar, 2006 3 commits
  3. 20 Mar, 2006 2 commits
    • unknown's avatar
      Bug#17374: select ... like 'A%' operator fails to find value on columuns with key · 83bc8c4e
      unknown authored
      Fixed that LIKE worked case insensitively for latin2_czech_cs,
      which was wrong for a case sensitive collation.
      
      
      include/m_ctype.h:
        Making my_wildcmp_bin public instead of static
      strings/ctype-bin.c:
        Making my_wildcmp_bin public instead of static
      strings/ctype-czech.c:
        Use my_wildcmp_bin instead of case insensitive my_wildcmp_8bit
      mysql-test/include/have_latin2_ch.inc:
        New BitKeeper file ``mysql-test/include/have_latin2_ch.inc''
      mysql-test/r/ctype_latin2_ch.result:
        New BitKeeper file ``mysql-test/r/ctype_latin2_ch.result''
      mysql-test/r/have_latin2_ch.require:
        New BitKeeper file ``mysql-test/r/have_latin2_ch.require''
      mysql-test/t/ctype_latin2_ch.test:
        New BitKeeper file ``mysql-test/t/ctype_latin2_ch.test''
      83bc8c4e
    • unknown's avatar
      Bug#18004 Connecting crashes server when default charset is UCS2 · 7913527e
      unknown authored
      table.cc:
        Fixing to use system_charset_info instead of default_charset_info.
        Crash happened because the "ctype" array is empty in UCS2,
        and thus cannot be used with my_isspace().
        The reason why UCS2 appeared in this context was because of
        of default_charset_info variable incorrectly substituted to my_isspace().
        As functions check_db_name(), check_table_name() and check_column_name()
        always get values in utf8, system_charset_info must be used instead.
      ctype_ucs2_def.test, ctype_ucs2_def-master.opt, ctype_ucs2_def.result:
        new file
      
      
      sql/table.cc:
        Bug#18004 Connecting crashes server when default charset is UCS2
        Use of default_charset_info was wrong.
        Functions check_db_name, check_table_name and check_column_name
        get values of system_charset_info character set (utf8).
      7913527e
  4. 17 Mar, 2006 1 commit
    • unknown's avatar
      BUG#18283 When InnoDB returns error 'lock table full', MySQL can write · 367442f7
      unknown authored
      to binlog too much.
      
      When InnoDB has to rollback a transaction because the lock table has
      filled up, it also needs to inform the upper layer that the transaction
      was rolled back so that the cached transaction is not written to the
      binary log.
      
      
      sql/ha_innodb.cc:
        When InnoDB rolls back a transaction in HA_ERR_LOCK_TABLE_FULL, it
        needs to inform the upper layer to rollback the transaction also.
      367442f7
  5. 16 Mar, 2006 1 commit
  6. 13 Mar, 2006 3 commits
  7. 10 Mar, 2006 3 commits
    • unknown's avatar
      Merge mysql.com:/home/mydev/mysql-4.1 · 00852307
      unknown authored
      into  mysql.com:/home/mydev/mysql-4.1-bug14980
      
      
      00852307
    • unknown's avatar
      Bug#14980 - COUNT(*) incorrect on MyISAM table with certain INDEX · fbe17c2a
      unknown authored
      For "count(*) while index_column = value" an index read
      is done. It consists of an index scan and retrieval of
      each key.
      
      For efficiency reasons the index scan stores the key in
      the special buffer 'lastkey2' once only. At the first 
      iteration it notes this fact with the flag 
      HA_STATE_RNEXT_SAME in 'info->update'.
      
      For efficiency reasons, the key retrieval for blobs
      does not allocate a new buffer, but uses 'lastkey2'...
      
      Now I clear the HA_STATE_RNEXT_SAME flag whenever the 
      buffer has been polluted. In this case, the index scan
      copies the key value again (and sets the flag again).
      
      
      include/my_base.h:
        Bug#14980 - COUNT(*) incorrect on MyISAM table with certain INDEX
        Changed the comment for HA_STATE_RNEXT_SAME as a warning
        for future uses.
      myisam/mi_delete.c:
        Bug#14980 - COUNT(*) incorrect on MyISAM table with certain INDEX
        Removing the flag HA_STATE_RNEXT_SAME from info->update
        if info->lastkey2 was reused for another purpose than
        index scanning.
      myisam/mi_key.c:
        Bug#14980 - COUNT(*) incorrect on MyISAM table with certain INDEX
        Removing the flag HA_STATE_RNEXT_SAME from info->update
        if info->lastkey2 was reused for another purpose than
        index scanning.
      myisam/mi_rnext_same.c:
        Bug#14980 - COUNT(*) incorrect on MyISAM table with certain INDEX
        Removed trailing space and fixed a comment.
      myisam/mi_unique.c:
        Bug#14980 - COUNT(*) incorrect on MyISAM table with certain INDEX
        Removing the flag HA_STATE_RNEXT_SAME from info->update
        if info->lastkey2 was reused for another purpose than
        index scanning.
      myisam/mi_update.c:
        Bug#14980 - COUNT(*) incorrect on MyISAM table with certain INDEX
        Removing the flag HA_STATE_RNEXT_SAME from info->update
        if info->lastkey2 was reused for another purpose than
        index scanning.
      myisam/mi_write.c:
        Bug#14980 - COUNT(*) incorrect on MyISAM table with certain INDEX
        Removing the flag HA_STATE_RNEXT_SAME from info->update
        if info->lastkey2 was reused for another purpose than
        index scanning.
      mysql-test/r/myisam.result:
        Bug#14980 - COUNT(*) incorrect on MyISAM table with certain INDEX
        Added test result.
      mysql-test/t/myisam.test:
        Bug#14980 - COUNT(*) incorrect on MyISAM table with certain INDEX
        Added test.
      fbe17c2a
    • unknown's avatar
      Merge mysql.com:/M41/comment-4.1 into mysql.com:/M41/mysql-4.1 · bf8fdd38
      unknown authored
      
      scripts/make_binary_distribution.sh:
        Auto merged
      bf8fdd38
  8. 09 Mar, 2006 1 commit
  9. 08 Mar, 2006 4 commits
    • unknown's avatar
      mysql-test-run.pl, mtr_cases.pl · a3208c0f
      unknown authored
        - Back porting of some changes in later releases
        - Corrected valgrind support
        - Removed work around for TZ needed in VisualStudio 6
        - Don't restart master to add special settings from "<testcase>-master.opt",
          if same settngs as running master, feature request in bug#12433
        - With --reorder, keep tests with same *-master.opt content together,
          to save even more master restarts
      
      
      mysql-test/lib/mtr_misc.pl:
        Added functions to compare lists of options
      mysql-test/lib/mtr_cases.pl:
        Removed special code for Windows as in VC6 we unset
        TZ to avoid library bug
      mysql-test/mysql-test-run.pl:
        Handle pseudo option --timezone=<spec> that sets TZ
      a3208c0f
    • unknown's avatar
      Merge neptunus.(none):/home/msvensson/mysql/mysql-4.1 · 3c83b827
      unknown authored
      into  neptunus.(none):/home/msvensson/mysql/bug17137/my41-bug17137
      
      
      3c83b827
    • unknown's avatar
      Bug#17137 Running "truncate table" on temporary table leaves the table open on a slave · f491db21
      unknown authored
       - Decrease "slave_open_temp_tables" during reopen of truncated table.
       - Add test "rpl_trunc_temp" 
      
      
      sql/sql_delete.cc:
        Decrease "slave_open_temp_tables" after temporary table has been closed, it will be
        increased again when the temp table is reopened after it's been truncated.
      mysql-test/r/rpl_trunc_temp.result:
        New BitKeeper file ``mysql-test/r/rpl_trunc_temp.result''
      mysql-test/t/rpl_trunc_temp.test:
        New BitKeeper file ``mysql-test/t/rpl_trunc_temp.test''
      f491db21
    • unknown's avatar
      mysql-test-run.pl: · cf11f78a
      unknown authored
        Allow space in base directory path, bug#15736
      
      
      mysql-test/mysql-test-run.pl:
        Allow space in base directory path, bug#15736
      cf11f78a
  10. 06 Mar, 2006 4 commits
  11. 04 Mar, 2006 3 commits
  12. 03 Mar, 2006 3 commits
  13. 02 Mar, 2006 6 commits
  14. 01 Mar, 2006 5 commits