Commit graph

20244 commits

Author SHA1 Message Date
unknown
5b5530daa5 A fix and a test case for Bug#16365 "Prepared Statements: DoS with
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.
2006-04-07 23:37:06 +04:00
unknown
5aa14b9832 config-win.h:
If CYBOZU defined, set character sets etc


include/config-win.h:
  If CYBOZU defined, set character sets etc
2006-03-23 17:25:49 +01:00
unknown
278b83a84d Merge abarkov@bk-internal.mysql.com:/home/bk/mysql-4.1
into  mysql.com:/usr/home/bar/mysql-4.1.b15376


include/m_ctype.h:
  Auto merged
strings/ctype-bin.c:
  Auto merged
strings/ctype-euc_kr.c:
  Auto merged
strings/ctype-gb2312.c:
  Auto merged
strings/ctype-ucs2.c:
  Auto merged
2006-03-23 14:29:43 +04:00
unknown
49d2b4f061 Merge abarkov@bk-internal.mysql.com:/home/bk/mysql-4.1
into  mysql.com:/usr/home/bar/mysql-4.1.b17374
2006-03-23 11:51:46 +04:00
unknown
83bc8c4e38 Bug#17374: select ... like 'A%' operator fails to find value on columuns with key
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''
2006-03-20 16:28:25 +04:00
unknown
7913527eb8 Bug#18004 Connecting crashes server when default charset is UCS2
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).
2006-03-20 14:43:02 +04:00
unknown
367442f754 BUG#18283 When InnoDB returns error 'lock table full', MySQL can write
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.
2006-03-17 10:25:29 +01:00
unknown
fd6d45f0b0 Fix bug in mysql-test-run.pl in ^C signal handler.
mysql-test/lib/mtr_timer.pl:
  Fix bug where ^C would trigger cleanup handler in both parent and
  timeout child processes, causing duplicated messages and potential
  conflicts.
2006-03-16 11:21:18 +01:00
unknown
b0a73946dc Merge perch.ndb.mysql.com:/home/jonas/src/41-work
into  perch.ndb.mysql.com:/home/jonas/src/mysql-4.1


ndb/src/kernel/blocks/backup/Backup.cpp:
  Auto merged
2006-03-13 14:43:58 +01:00
unknown
99824b4e4e Merge joreland@bk-internal.mysql.com:/home/bk/mysql-4.1
into  perch.ndb.mysql.com:/home/jonas/src/mysql-4.1
2006-03-13 14:43:07 +01:00
unknown
9d8992f7f8 bug#14028 -
ndb crash if trigger record get to big, fix incorrect max size of trigger record


ndb/src/kernel/blocks/backup/Backup.cpp:
  Increase size of max trigger record
2006-03-13 14:42:16 +01:00
unknown
0085230782 Merge mysql.com:/home/mydev/mysql-4.1
into  mysql.com:/home/mydev/mysql-4.1-bug14980
2006-03-10 22:32:37 +01:00
unknown
fbe17c2a36 Bug#14980 - COUNT(*) incorrect on MyISAM table with certain INDEX
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.
2006-03-10 15:03:04 +01:00
unknown
bf8fdd382e Merge mysql.com:/M41/comment-4.1 into mysql.com:/M41/mysql-4.1
scripts/make_binary_distribution.sh:
  Auto merged
2006-03-10 11:37:28 +01:00
unknown
17bd0beb33 bug#18040 - ndb online index build
(not possible from SQL in 4.1 & 5.0)


ndb/src/kernel/blocks/suma/Suma.hpp:
  fix incorrect union
2006-03-09 11:10:24 +01:00
unknown
a3208c0f1f mysql-test-run.pl, mtr_cases.pl
- 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
2006-03-08 19:15:56 +01:00
unknown
3c83b827be Merge neptunus.(none):/home/msvensson/mysql/mysql-4.1
into  neptunus.(none):/home/msvensson/mysql/bug17137/my41-bug17137
2006-03-08 11:20:12 +01:00
unknown
f491db2119 Bug#17137 Running "truncate table" on temporary table leaves the table open on a slave
- 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''
2006-03-08 10:15:48 +01:00
unknown
cf11f78a66 mysql-test-run.pl:
Allow space in base directory path, bug#15736


mysql-test/mysql-test-run.pl:
  Allow space in base directory path, bug#15736
2006-03-08 03:51:59 +01:00
unknown
19a1f488a8 merged 2006-03-06 18:34:38 +01:00
unknown
a127344a6c kill (subquery) - three years old bugfix that never worked 2006-03-06 18:26:39 +01:00
unknown
d86a66d483 Merge abarkov@bk-internal.mysql.com:/home/bk/mysql-4.1
into  mysql.com:/usr/home/bar/mysql-4.1.b15949
2006-03-06 14:50:34 +04:00
unknown
3ecf9f040a Fix for bug#14385 GRANT and mapping to correct user account problems
Check if the host of table hash record exactly matches host from GRANT command


mysql-test/r/grant.result:
  Fix for bug#14385 GRANT and mapping to correct user account problems
    test case
mysql-test/t/grant.test:
  Fix for bug#14385 GRANT and mapping to correct user account problems
    test case
2006-03-06 14:03:40 +04:00
unknown
4391f93892 Revert the changeset for Bug#16144 "mysql_stmt_attr_get type error":
it breaks binary compatibility. The patch will be left intact
in 5.1.


libmysql/libmysql.c:
  Revert the changeset for Bug#16144: it breaks binary compatibility.
tests/mysql_client_test.c:
  Revert the changeset for Bug#16144: it breaks binary compatibility.
2006-03-05 00:38:54 +03:00
unknown
2fe8095662 Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into  mysql.com:/opt/local/work/mysql-4.1-root


mysql-test/r/heap.result:
  Auto merged
mysql-test/t/heap.test:
  Auto merged
2006-03-04 22:33:19 +03:00
unknown
93b7fe4d7d Merge mysql.com:/home/mydev/mysql-4.1
into  mysql.com:/home/mydev/mysql-4.1-bug11527
2006-03-04 14:06:52 +01:00
unknown
82840877e9 Merge paul@bk-internal.mysql.com:/home/bk/mysql-4.1
into  snake-hub.snake.net:/src/extern/MySQL/bk/mysql-4.1
2006-03-03 14:50:41 -06:00
unknown
3d997647aa mysqltest.c:
Better fix for do_sleep().


client/mysqltest.c:
  Better fix for do_sleep().
2006-03-03 13:57:49 -06:00
unknown
a63df041da Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-4.1
into  mysql.com:/usr/home/ram/work/4.1.b13659
2006-03-03 09:34:40 +04:00
unknown
fde8433937 Merge mysql.com:/M40/comment-4.0 into mysql.com:/M41/comment-4.1
scripts/make_binary_distribution.sh:
  Auto merged
2006-03-02 18:15:42 +01:00
unknown
b7ca534215 Merge mysql.com:/M40/mysql-4.0 into mysql.com:/M41/merge-4.1
scripts/make_binary_distribution.sh:
  Auto merged
2006-03-02 10:48:46 +01:00
unknown
ffa7f9439a Merge snake-hub.snake.net:/src/extern/MySQL/bk/mysql-4.1
into  snake-hub.snake.net:/src/extern/MySQL/bk/mysql-4.1-r1.2478


mysql-test/README:
  SCCS merged
2006-03-01 18:51:33 -06:00
unknown
35bb42d315 Merge snake-hub.snake.net:/src/extern/MySQL/bk/mysql-4.0
into  snake-hub.snake.net:/src/extern/MySQL/bk/mysql-4.0-r1.2173
2006-03-01 18:44:44 -06:00
unknown
5f95aa48d9 Merge snake-hub.snake.net:/src/extern/MySQL/bk/mysql-4.0-r1.2173
into  snake-hub.snake.net:/src/extern/MySQL/bk/mysql-4.1-r1.2478


mysql-test/README:
  Auto merged
2006-03-01 18:38:19 -06:00
unknown
aa9a497d7a README:
revise README.


mysql-test/README:
  revise README.
2006-03-01 18:37:41 -06:00
unknown
5b9669ccda Merge snake-hub.snake.net:/src/extern/MySQL/bk/mysql-4.0-r1.2173
into  snake-hub.snake.net:/src/extern/MySQL/bk/mysql-4.1-r1.2478
2006-03-01 17:55:41 -06:00
unknown
79faaddce7 README.gcov:
Revise README.gcov.


mysql-test/README.gcov:
  Revise README.gcov.
2006-03-01 17:55:10 -06:00
unknown
6f6205287d Merge snake-hub.snake.net:/src/extern/MySQL/bk/mysql-4.0-r1.2173
into  snake-hub.snake.net:/src/extern/MySQL/bk/mysql-4.1-r1.2478


mysql-test/README:
  Auto merged
2006-03-01 17:41:34 -06:00
unknown
10f230539f Merge snake-hub.snake.net:/src/extern/MySQL/bk/mysql-4.0-r1.2173
into  snake-hub.snake.net:/src/extern/MySQL/bk/mysql-4.1


mysql-test/README:
  Auto merged
2006-03-01 17:37:49 -06:00
unknown
7526342706 README:
Revise mysql-test README.


mysql-test/README:
  Revise mysql-test README.
2006-03-01 17:37:07 -06:00
unknown
720e13d665 Merge jbruehe@bk-internal.mysql.com:/home/bk/mysql-4.0
into mysql.com:/M40/comment-4.0
2006-03-01 20:13:23 +01:00
unknown
eaaaa760e6 Merge jbruehe@bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/M41/comment-4.1


mysql-test/mysql-test-run.sh:
  Auto merged
2006-03-01 17:43:16 +01:00
unknown
c64c108eda Bug#15949 union + illegal mix of collations (IMPLICIT + COERCIBLE)
union.result, union.test:
  Adding test case.
item.cc:
  Allow safe character set conversion in UNION
  - string constant to column's charset
  - to unicode
  Thus, UNION now works the same with CONCAT (and other string functions)
  in respect of aggregating arguments with different character sets.


sql/item.cc:
  Allow character set conversion in UNION
  - string to column's charset
  - to unicode
  Bug#15949 union + illegal mix of collations (IMPLICIT + COERCIBLE)
mysql-test/t/union.test:
  Adding test case.
mysql-test/r/union.result:
  Adding test case.
2006-03-01 17:58:01 +04:00
unknown
ca3dd7f01a mysql-test/mysql-test-run.pl : Add a "--comment=<string>" option (backport from 5.1).
mysql-test/mysql-test-run.pl:
  Add a "--comment=<string>" option (backport from 5.1).
  Its sole purpose is to get logged, so that test evaluation gets easier.
  See "Do-compile" for how it is called, and "gen-build-status-page" for its effect.
2006-03-01 13:15:37 +01:00
unknown
dfbbcd2767 Merge mysql.com:/M40/comment-4.0 into mysql.com:/M41/comment-4.1
mysql-test/mysql-test-run.sh:
  Auto merged
2006-03-01 13:10:59 +01:00
unknown
6e0d2e41cc mysql-test/mysql-test-run.sh : Add a "--comment=<string>" option, to get it logged when the test is run.
mysql-test/mysql-test-run.sh:
  Add a "--comment=<string>" option, to get it logged when the test is run.
  The purpose is to allow a better analysis when generating the status page 
  ("gen-build-status-page").
  See "Do-compile" for how it is used.
2006-03-01 12:21:44 +01:00
unknown
bf912125a3 mysqltest.test:
Add real_sleep tests.


mysql-test/t/mysqltest.test:
  Add real_sleep tests.
2006-02-28 17:54:11 -06:00
unknown
8d5f0fcddc mysql-test-run.sh:
Fix URLs.
README:
  Fix URL.
mysqltest.result:
  Update test result for real_sleep error message.
mysqltest.c:
  Fix do_sleep() to print correct command name for real_sleep.


client/mysqltest.c:
  Fix do_sleep() to print correct command name for real_sleep.
mysql-test/r/mysqltest.result:
  Update test result for real_sleep error message.
mysql-test/README:
  Fix URL.
mysql-test/mysql-test-run.sh:
  Fix URLs.
2006-02-28 15:08:16 -06:00
unknown
9099fb2d06 mysqltest.c:
Correct/clarify comments.


client/mysqltest.c:
  Correct/clarify comments.
2006-02-28 14:00:17 -06:00
unknown
46c82ab153 mysqltest.c:
Fix typos.


client/mysqltest.c:
  Fix typos.
2006-02-28 12:01:24 -06:00