summaryrefslogtreecommitdiff
path: root/mysql-test
Commit message (Collapse)AuthorAgeFilesLines
* Bug#19025 4.1 mysqldump doesn't correctly dump "auto_increment = [int]"unknown2006-05-046-5/+116
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | mysqldump / SHOW CREATE TABLE will show the NEXT available value for the PK, rather than the *first* one that was available (that named in the original CREATE TABLE ... AUTO_INCREMENT = ... statement). This should produce correct and robust behaviour for the obvious use cases -- when no data were inserted, then we'll produce a statement featuring the same value the original CREATE TABLE had; if we dump with values, INSERTing the values on the target machine should set the correct next_ID anyway (and if not, we'll still have our AUTO_INCREMENT = ... to do that). Lastly, just the CREATE statement (with no data) for a table that saw inserts would still result in a table that new values could safely be inserted to). There seems to be no robust way however to see whether the next_ID field is > 1 because it was set to something else with CREATE TABLE ... AUTO_INCREMENT = ..., or because there is an AUTO_INCREMENT column in the table (but no initial value was set with AUTO_INCREMENT = ...) and then one or more rows were INSERTed, counting up next_ID. This means that in both cases, we'll generate an AUTO_INCREMENT = ... clause in SHOW CREATE TABLE / mysqldump. As we also show info on, say, charsets even if the user did not explicitly give that info in their own CREATE TABLE, this shouldn't be an issue. As per above, the next_ID will be affected by any INSERTs that have taken place, though. This /should/ result in correct and robust behaviour, but it may look non-intuitive to some users if they CREATE TABLE ... AUTO_INCREMENT = 1000 and later (after some INSERTs) have SHOW CREATE TABLE give them a different value (say, CREATE TABLE ... AUTO_INCREMENT = 1006), so the docs should possibly feature a caveat to that effect. It's not very intuitive the way it works now (with the fix), but it's *correct*. We're not storing the original value anyway, if we wanted that, we'd have to change on-disk representation? If we do dump/load cycles with empty DBs, nothing will change. This changeset includes an additional test case that proves that tables with rows will create the same next_ID for AUTO_INCREMENT = ... across dump/restore cycles. Confirmed by support as likely solution for client's problem. mysql-test/r/auto_increment.result: test for creation of AUTO_INCREMENT=... clause mysql-test/r/gis-rtree.result: Add AUTO_INCREMENT=... clauses where appropriate mysql-test/r/mysqldump.result: show that AUTO_INCREMENT=... will survive dump/restore cycles mysql-test/r/symlink.result: Add AUTO_INCREMENT=... clauses where appropriate mysql-test/t/auto_increment.test: test for creation of AUTO_INCREMENT=... clause mysql-test/t/mysqldump.test: show that AUTO_INCREMENT=... will survive dump/restore cycles sql/sql_show.cc: Add AUTO_INCREMENT=... to output of SHOW CREATE TABLE if there is an AUTO_INCREMENT column, and NEXT_ID > 1 (the default). We must not print the clause for engines that do not support this as it would break the import of dumps, but as of this writing, the test for whether AUTO_INCREMENT columns are allowed and wether AUTO_INCREMENT=... is supported is identical, !(file->table_flags() & HA_NO_AUTO_INCREMENT)) Because of that, we do not explicitly test for the feature, but may extrapolate its existence from that of an AUTO_INCREMENT column.
* ndb - bug#19201 (4.1), see comment in NdbBlob.cppunknown2006-05-022-8/+35
| | | | | | | | | | | | | | | | | ndb/test/ndbapi/testBlobs.cpp: option -fac (fetch across commit) ndb/tools/delete_all.cpp: option --transactional (default remains truncate) mysql-test/r/ndb_blob.result: bug#19201 mysql-test/t/ndb_blob.test: bug#19201 ndb/include/kernel/signaldata/TcKeyReq.hpp: bug#19201 ndb/include/ndbapi/NdbBlob.hpp: bug#19201 ndb/src/ndbapi/NdbBlob.cpp: bug#19201
* BUG#19145: mysqld crashes if you set the default value of an enum field to NULLunknown2006-04-282-0/+83
| | | | | | | | | | | | | | | | | | | Now test for NULLness the pointers returned from objects created from the default value. Pushing patch on behalf of cmiller. mysql-test/r/null.result: Add test case mysql-test/t/null.test: Add test case sql/sql_table.cc: No longer blindly dereference pointer of the string representation of the values, where "NULL" is NUL. Raise INVALID DEFAULT error messages where appropriate. Note that the -O1 optimization flag made debugging this extremely tricky, with misleading results, and that removing it from the Makefile during debugging can be invaluable.
* BUG#18492: mysqld reports ER_ILLEGAL_REFERENCE in --ps-protocolunknown2006-04-283-1/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the code that converts IN predicates to EXISTS predicates it is changing the select list elements to constant 1. Example : SELECT ... FROM ... WHERE a IN (SELECT c FROM ...) is transformed to : SELECT ... FROM ... WHERE EXISTS (SELECT 1 FROM ... HAVING a = c) However there can be no FROM clause in the IN subquery and it may not be a simple select : SELECT ... FROM ... WHERE a IN (SELECT f(..) AS c UNION SELECT ...) This query is transformed to : SELECT ... FROM ... WHERE EXISTS (SELECT 1 FROM (SELECT f(..) AS c UNION SELECT ...) x HAVING a = c) In the above query c in the HAVING clause is made to be an Item_null_helper (a subclass of Item_ref) pointing to the real Item_field (which is not referenced anywhere else in the query anymore). This is done because Item_ref_null_helper collects information whether there are NULL values in the result. This is OK for directly executed statements, because the Item_field pointed by the Item_null_helper is already fixed when the transformation is done. But when executed as a prepared statement all the Item instances are "un-fixed" before the recompilation of the prepared statement. So when the Item_null_helper gets fixed it discovers that the Item_field it points to is not fixed and issues an error. The remedy is to keep the original select list references when there are no tables in the FROM clause. So the above becomes : SELECT ... FROM ... WHERE EXISTS (SELECT c FROM (SELECT f(..) AS c UNION SELECT ...) x HAVING a = c) In this way c is referenced directly in the select list as well as by reference in the HAVING clause. So it gets correctly fixed even with prepared statements. And since the Item_null_helper subclass of Item_ref_null_helper is not used anywhere else it's taken out. mysql-test/r/ps_11bugs.result: Test case for the bug mysql-test/r/subselect.result: Explain updated because of the tranformation mysql-test/t/ps_11bugs.test: Testcase for the bug sql/item.cc: Taking out Item_null_helper as it's no longer needed sql/item.h: Taking out Item_null_helper as it's no longer needed sql/item_subselect.cc: The described change to the IN->EXISTS transformation
* Merge aivanov@bk-internal.mysql.com:/home/bk/mysql-4.1unknown2006-04-263-0/+19
|\ | | | | | | | | | | | | into mysql.com:/home/alexi/innodb/mysql-4.1-innodb
| * Make innodb_mysql produce a non-empty output.unknown2006-04-262-1/+5
| | | | | | | | | | mysql-test/r/innodb_mysql.result: Fix result.
| * Files innodb.[test|result] are to be used by Innobase only.unknown2006-04-263-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Use files innodb_mysql.[test|result] instead. mysql-test/t/innodb.test: This file is to be used by Innobase only. mysql-test/r/innodb_mysql.result: New BitKeeper file ``mysql-test/r/innodb_mysql.result'' Use this file instead of innodb.result. mysql-test/t/innodb_mysql.test: New BitKeeper file ``mysql-test/t/innodb_mysql.test'' Use this file instead of innodb.test.
* | Fix typo in mysql-test-run.pl (not caught by aotupush since it uses ↵unknown2006-04-241-1/+1
| | | | | | | | | | | | | | mysql-test-run.sh). mysql-test/mysql-test-run.pl: Fix typo.
* | Merge knielsen@10.100.52.19:/usr/local/mysql/mysql-4.1-mtr-fixunknown2006-04-2420-26/+364
|\ \ | | | | | | | | | | | | | | | | | | into mysql.com:/data0/knielsen/mysql-4.1-mtr-fix
| * \ Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-4.1unknown2006-04-242-0/+19
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | into production.mysql.com:/usersnfs/rkalimullin/4.1.b17896
| | * | Fix for bug #17896: MIN of CASE WHEN returns non-minimum value!unknown2006-03-062-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | sql/item_cmpfunc.cc: Fix for bug #17896: MIN of CASE WHEN returns non-minimum value! - NULL items should not affect the result type.
| * | | Bug#17263 temporary tables and replicationunknown2006-04-232-1/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Backporting a changeset made for 5.0. Comments from there: The fix refines the algorithm of generating DROPs for binlog. Temp tables with common pseudo_thread_id are clustered into one query. Consequently one replication event per pseudo_thread_id is generated. mysql-test/r/rpl_temporary.result: results changed mysql-test/t/rpl_temporary.test: test to generate problematic drop in binlog to feed it to restarting slave to see no stop. sql/sql_base.cc: change in drop temprorary tables alg in close_temporary_tables.
| * | | Merge ibabaev@bk-internal.mysql.com:/home/bk/mysql-4.1unknown2006-04-212-0/+16
| |\ \ \ | | |_|/ | |/| | | | | | | | | | | | | | | | | | into rurik.mysql.com:/home/igor/mysql-4.1
| | * | Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-4.1unknown2006-04-212-0/+16
| | |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into production.mysql.com:/usersnfs/rkalimullin/4.1.b18643
| | | * | Fix for bug #18643: crazy UNCOMPRESS().unknown2006-04-132-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | mysql-test/r/func_compress.result: Fix for bug #18643: crazy UNCOMPRESS(). - test-case mysql-test/t/func_compress.test: Fix for bug #18643: crazy UNCOMPRESS(). - test-case sql/item_strfunc.cc: Fix for bug #18643: crazy UNCOMPRESS(). - set null_value.
| * | | | Merge rurik.mysql.com:/home/igor/mysql-4.1unknown2006-04-202-0/+46
| |\ \ \ \ | | |/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | into rurik.mysql.com:/home/igor/dev/mysql-4.1-0
| | * | | Fixed bug #18767.unknown2006-04-202-0/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The bug caused wrong result sets for union constructs of the form (SELECT ... ORDER BY order_list1 [LIMIT n]) ORDER BY order_list2. For such queries order lists were concatenated and limit clause was completely neglected. mysql-test/r/order_by.result: Added a test case for bug #18767. mysql-test/t/order_by.test: Added a test case for bug #18767. sql/sql_lex.h: Fixed bug #18767. Placed the code the created a fake SELECT_LEX into a separate function. sql/sql_parse.cc: Fixed bug #18767. Placed the code the created a fake SELECT_LEX into a separate function. sql/sql_select.cc: Fixed bug #18767. Changed the condition on which a SELECT is treated as part of a UNION. The SELECT in (SELECT ... ORDER BY order_list1 [LIMIT n]) ORDER BY order_list2 now is handled in the same way as the first SELECT in a UNION sequence. sql/sql_union.cc: Fixed bug #18767. Changed the condition at which a SELECT is treated as part of a UNION. The SELECT in (SELECT ... ORDER BY order_list1 [LIMIT n]) ORDER BY order_list2 now is handled in the same way as the first SELECT in a UNION sequence. sql/sql_yacc.yy: Fixed bug #18767. Changed the condition at which a SELECT is treated as part of a UNION. The SELECT in (SELECT ... ORDER BY order_list1 [LIMIT n]) ORDER BY order_list2 now is handled in the same way as the first SELECT in a UNION sequence. In the same way is handled the SELECT in (SELECT ... LIMIT n) ORDER BY order list. Yet if there is neither ORDER BY nor LIMIT in the single-select union construct (SELECT ...) ORDER BY order_list then it is still handled as simple select with an order clause.
| * | | | Merge mleich@bk-internal.mysql.com:/home/bk/mysql-4.1unknown2006-04-204-9/+85
| |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into production.mysql.com:/usersnfs/mleich/src
| | * | | | func_gconcat.test:unknown2006-04-201-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Clean up test case for bug#14169 mysql-test/t/func_gconcat.test: Clean up test case for bug#14169
| | * | | | Temporarily commented out a query from the test case for bug 14169 to make ↵unknown2006-04-192-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | it pass with --ps-protocol. mysql-test/r/func_gconcat.result: Added DROP TABLE command to the test case for bug 14169.
| | * | | | Merge rurik.mysql.com:/home/igor/mysql-4.1unknown2006-04-191-7/+0
| | |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into rurik.mysql.com:/home/igor/dev/mysql-4.1-2
| | | * | | | func_gconcat.result:unknown2006-04-201-7/+0
| | | |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| | * | | | Fixed bug #19079.unknown2006-04-182-1/+82
| | |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | | | Merge mysql.com:/home/matthias/Arbeit/mysql-4.1/srcunknown2006-04-186-24/+119
| |\ \ \ \ | | |/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | into mysql.com:/home/matthias/Arbeit/mysql-4.1/src-1
| | * | | Fixes for Bug#12429: Replication tests fail: "Slave_IO_Running" (?) differs ↵unknown2006-04-136-24/+119
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | related to MySQL 4.1 and Bug#16920 rpl_deadlock_innodb fails in show slave status (reported for MySQL 5.1) - backport of several fixes done in MySQL 5.0 to 4.1 - fix for new discovered instability (see comment on Bug#12429 + Bug#16920) - reenabling of testcases mysql-test/r/rpl_deadlock.result: Updated results mysql-test/r/rpl_relayrotate.result: Updated results mysql-test/t/disabled.def: Reenabling of tests mysql-test/t/rpl_deadlock.test: - replace sleep with real_sleep (backport fix for Bug#15624 MySQL 5.0) - egalized value for Slave_IO_Running - line 105 (backport fix for Bug#12429 MySQL 5.0) - line 85 (see comment in Bug#12429 + Bug#16920 rpl_deadlock_innodb fails in show slave status) - improve readability of show slave status output (--vertical_results) mysql-test/t/rpl_relayrotate.test: - Replace select ... with select max(a) - add sync_with_master (backport fix done by Kristian in MySQL 5.0 because of timing problems similar to Bug#15624) mysql-test/t/rpl_until.test: Add wait_for_slave_to_stop like in the current MySQL 5.0 version of this test. I assume this makes the test results more predictable.
| * | | | Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-4.1unknown2006-04-142-0/+26
| |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into moonbone.local:/work/14169-bug-4.1-mysql
| | * | | | Fixed bug#14169: type of group_concat() result changed to blob if tmp_table was unknown2006-04-122-0/+26
| | | |/ / | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | | | Bug#18691: Converting number to UNICODE string returns invalid result.unknown2006-04-132-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | | | Fix broken --valgrind-options option.unknown2006-04-121-1/+1
|/ / / /
* | | | Merge mysql.com:/home/mydev/mysql-4.1unknown2006-04-1173-104/+1679
|\ \ \ \ | |/ / / | | | | | | | | | | | | | | | | | | | | into mysql.com:/home/mydev/mysql-4.1-bug5390
| * | | after merge fix.unknown2006-04-111-0/+2
| | | |
| * | | Merge mysql.com:/usr/home/ram/work/mysql-4.0unknown2006-04-112-0/+23
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into mysql.com:/usr/home/ram/work/mysql-4.1 mysql-test/r/func_op.result: Auto merged sql/item_func.cc: Auto merged mysql-test/t/func_op.test: SCCS merged
| | * \ \ Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-4.0unknown2006-04-112-0/+23
| | |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into mysql.com:/usr/home/ram/work/mysql-4.0
| | | * | | Fix for bug #13044: BIT_COUNT with NULL values.unknown2005-11-062-0/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | sql/item_func.cc: Fix for bug #13044: BIT_COUNT with NULL values. Always set null_value.
| * | | | | Merge mysql.com:/usr/local/mysql/mysql-4.1-vgfixunknown2006-04-091-5/+11
| |\ \ \ \ \ | | | |_|/ / | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | into mysql.com:/usr/local/mysql/mysql-4.1
| | * | | | $MYSQL_TEST was broken with --valgrind.unknown2006-04-081-5/+11
| | | | | |
| * | | | | Merge bk-internal.mysql.com:/home/bk/mysql-4.1unknown2006-04-072-0/+231
| |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| | * | | | | A fix and a test case for Bug#16365 "Prepared Statements: DoS with unknown2006-04-072-0/+231
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | | | | | Merge jbruehe@bk-internal.mysql.com:/home/bk/mysql-4.1unknown2006-04-072-0/+38
| |\ \ \ \ \ \ | | |_|/ / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into mysql.com:/M41/mtr-4.1
| | * | | | | A fix and a test case for Bug#16248 "WHERE (col1,col2) IN ((?,?)) unknown2006-04-072-0/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | | | | | Manual merge.unknown2006-04-071-0/+2
| |\ \ \ \ \ \ | | | |_|/ / / | | |/| | | |
| | * | | | | mysql-test/mysql-test-run.sh : Provide info about the options used.unknown2006-04-071-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | mysql-test/mysql-test-run.sh: Provide info about the options used for this run to any evaluation tool.
| * | | | | | mysql-test/mysql-test-run.pl : Add option "with-ndbcluster-only" (ignored).unknown2006-04-071-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | mysql-test/mysql-test-run.pl: Add option "with-ndbcluster-only" (ignored) for compatibility with newer "Do-compile".
| * | | | | | Perl test script: Avoid some aborts, which made the whole build/test ↵unknown2006-04-071-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | process terminate. 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.
| * | | | | | mysql-test/mysql-test-run.sh : Add option "--with-ndbcluster-only" ↵unknown2006-04-071-0/+10
| |\ \ \ \ \ \ | | |/ / / / / | | | / / / / | | |/ / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | (backport from 5.1) 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.
| | * | | | Backport of 5.1 test options "--with-ndbcluster" and ↵unknown2006-04-061-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "--with-ndbcluster-only" as dummies (ignored). mysql-test/mysql-test-run.sh: Make "mysql-test-run.sh" accept (and ignore) the options "--with-ndbcluster" and "--with-ndbcluster-only". This is necessary because newer build tools will issue them, and the test script should tolerate that. Backport from 5.1 (Tomas Ulin, 2006-01-17)
| | * | | | Merge snake-hub.snake.net:/src/extern/MySQL/bk/mysql-4.0unknown2006-03-012-25/+45
| | |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into snake-hub.snake.net:/src/extern/MySQL/bk/mysql-4.0-r1.2173
| * | | | | | This problem has already been fixed by one of the previous changes.unknown2006-04-062-0/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adding test case to cover queries which worked incorrectly earlier: Bug#18321: Can't store EuroSign with latin1_german1_ci and latin1_general_ci mysql-test/r/ctype_latin1.result: Adding test case for Bug#18321: Can't store EuroSign with latin1_german1_ci and latin1_general_ci mysql-test/t/ctype_latin1.test: Adding test case for Bug#18321: Can't store EuroSign with latin1_german1_ci and latin1_general_ci
| * | | | | | Makefile.am:unknown2006-04-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Distribute mysql-test-run.pl mysql-test/Makefile.am: Distribute mysql-test-run.pl
| * | | | | | Makefile.am:unknown2006-04-021-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Install Perl mysql-test-run into test directory mysql-test/Makefile.am: Install Perl mysql-test-run into test directory