- 24 Aug, 2006 1 commit
-
-
unknown authored
Changes in an item tree done by optimizer weren't properly registered and went unnoticed, which resulted in preliminary freeing of used memory. mysql-test/r/ps.result: Add result for bug#21166: Prepared statement causes signal 11 on second execution. mysql-test/t/ps.test: Add test case for bug#21166: Prepared statement causes signal 11 on second execution. sql/item.cc: Move Item::transform() and Item_default_value::transform() from item.h here and use THD::change_item_tree() instead of plain assignment. Change Item_field::set_no_const_sub() to be used with Item::walk() instead of Item::transform(). sql/item.h: Move definition of Item::transform() and Item_default_value::transform() to item.cc. Change Item::set_no_const_sub() to be used with Item::walk() instead of Item::transform(). sql/item_cmpfunc.cc: Use Item::walk() to execute Item::set_no_const_sub(). Use THD::change_item_tree() instead of plain assignment. sql/item_func.cc: Add assert and comment to Item_func::traverse_cond(). sql/item_row.cc: Use THD::change_item_tree() instead of plain assignment. sql/item_strfunc.cc: Move Item_func_make_set::transform() from item_strfunc.h here and use THD::change_item_tree() instead of plain assignment. sql/item_strfunc.h: Move definition of Item_func_make_set::transform() to item_strfunc.cc.
-
- 23 Aug, 2006 2 commits
-
-
unknown authored
User name (host name) has limit on length. The server code relies on these limits when storing the names. The problem was that sometimes these limits were not checked properly, so that could lead to buffer overflow. The fix is to check length of user/host name in parser and if string is too long, throw an error. mysql-test/r/grant.result: Updated result file. mysql-test/r/sp.result: Updated result file. mysql-test/r/trigger.result: Updated result file. mysql-test/r/view.result: Updated result file. mysql-test/t/grant.test: Added test for BUG#16899. mysql-test/t/sp.test: Added test for BUG#16899. mysql-test/t/trigger.test: Added test for BUG#16899. mysql-test/t/view.test: Added test for BUG#16899. sql/mysql_priv.h: Added prototype for new function. sql/share/errmsg.txt: Added new resources. sql/sql_acl.cc: Remove outdated checks. sql/sql_parse.cc: Add a new function for checking string length. sql/sql_yacc.yy: Check length of user/host name.
-
unknown authored
Implemented code review comments Test cleanup sql/protocol.cc: Bug#8153 (Stored procedure with subquery and continue handler, wrong result) Implemented code review comments
-
- 22 Aug, 2006 3 commits
-
-
unknown authored
into weblab.(none):/home/marcsql/TREE/mysql-5.0-8153 mysql-test/r/sp.result: Auto merged mysql-test/t/sp.test: Auto merged sql/mysqld.cc: Auto merged
-
unknown authored
into moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.0-bug21051-2 include/mysql_com.h: Auto merged sql/sql_class.cc: Auto merged
-
unknown authored
There were two problems: RESET QUERY CACHE took a long time to complete and other threads were blocked during this time. The patch does three things: 1 fixes a bug with improper use of test-lock-test_again technique. AKA Double-Checked Locking is applicable here only in few places. 2 Somewhat improves performance of RESET QUERY CACHE. Do my_hash_reset() instead of deleting elements one by one. Note however that the slowdown also happens when inserting into sorted list of free blocks, should be rewritten using balanced tree. 3 Makes RESET QUERY CACHE non-blocking. The patch adjusts the locking protocol of the query cache in the following way: it introduces a flag flush_in_progress, which is set when Query_cache::flush_cache() is in progress. This call sets the flag on enter, and then releases the lock. Every other call is able to acquire the lock, but does nothing if flush_in_progress is set (as if the query cache is disabled). The only exception is the concurrent calls to Query_cache::flush_cache(), that are blocked until the flush is over. When leaving Query_cache::flush_cache(), the lock is acquired and the flag is reset, and one thread waiting on Query_cache::flush_cache() (if any) is notified that it may proceed. include/mysql_com.h: Add comment for NET::query_cache_query. sql/net_serv.cc: Use query_cache_init_query() for initialization of NET::query_cache_query if query cache is used. Do not access net->query_cache_query without a lock. sql/sql_cache.cc: Fix bug with accessing query_cache_size, Query_cache_query::wri and thd->net.query_cache_query before acquiring the lock---leave double-check locking only in safe places. Wherever we check that cache is usable (query_cache_size > 0) we now also check that flush_in_progress is false, i.e. we are not in the middle of cache flush. Add Query_cache::not_in_flush_or_wait() method and use it in Query_cache::flush_cache(), so that threads doing cache flush will wait it to finish, while other threads will bypass the cache as if it is disabled. Extract Query_cache::free_query_internal() from Query_cache::free_query(), which does not removes elements from the hash, and use it together with my_hash_reset() in Query_cache::flush_cache(). sql/sql_cache.h: Add declarations for new members and methods. Make is_cacheable() a static method. Add query_cache_init_query() function. sql/sql_class.cc: Use query_cache_init_query() for initialization of NET::query_cache_query.
-
- 21 Aug, 2006 2 commits
-
-
unknown authored
into mockturtle.local:/home/dlenev/src/mysql-5.0-bg21216-2
-
unknown authored
server to crash". Crash caused by assertion failure happened when one ran SHOW OPEN TABLES while concurrently doing DROP TABLE (or RENAME TABLE, CREATE TABLE LIKE or any other command that takes name-lock) in other connection. For non-debug version of server problem exposed itself as wrong output of SHOW OPEN TABLES statement (it was missing name-locked tables). Finally in 5.1 both debug and non-debug versions simply crashed in this situation due to NULL-pointer dereference. This problem was caused by the fact that table placeholders which were added to table cache in order to obtain name-lock had TABLE_SHARE::table_name set to 0. Therefore they broke assumption that this member is non-0 for all tables in table cache which was checked by assert in list_open_tables() (in 5.1 this function simply relies on it). The fix simply sets this member for such placeholders to appropriate value making this assumption true again. This patch also includes test for similar bug 12212 "Crash that happens during removing of database name from cache" reappeared in 5.1 as bug 19403. mysql-test/r/drop.result: Added test for bug#21216 "Simultaneous DROP TABLE and SHOW OPEN TABLES causes server to crash" and bug#12212/19403 "Crash that happens during removing of database name from cache". mysql-test/t/drop.test: Added test for bug#21216 "Simultaneous DROP TABLE and SHOW OPEN TABLES causes server to crash" and bug#12212/19403 "Crash that happens during removing of database name from cache". sql/lock.cc: lock_table_name(): Our code assumes that TABLE_SHARE::table_name for objects in table cache is non-NULL (for example look at assertion in list_open_tables()). This was not true for table placeholders that were added to table cache for name-locking. So let us set this member for such placeholders.
-
- 19 Aug, 2006 1 commit
-
-
unknown authored
Corrected build issues : the build can not be conditional. to keep a unique source .tar.gz distribution. configure.in: Rolling back previous change sql/Makefile.am: Partially rolling back previous change. The build has to be unconditional, for the source .tar.gz distribution sql/mysql_priv.h: WL#3432 (Compile the Parser with a --debug --verbose option) sql/sql_parse.cc: WL#3432 (Compile the Parser with a --debug --verbose option) Moved turn_parser_debug_on to sql_yacc.yy sql/sql_yacc.yy: WL#3432 (Compile the Parser with a --debug --verbose option) Moved turn_parser_debug_on to sql_yacc.yy
-
- 17 Aug, 2006 1 commit
-
-
unknown authored
Changed the automake build process : - ./configure.in - ./sql/Makefile.am to compile an instrumented parser for debug=yes or debug=full builds Changed the (primary) runtime invocation of the parser : - sql/sql_parse.cc to generate bison traces in stderr when the DBUG "parser_debug" flag is set. configure.in: WL#3432 (Compile the Parser with a --debug --verbose option) New Automake condition : MYSQL_CONF_DEBUG sql/Makefile.am: WL#3432 (Compile the Parser with a --debug --verbose option) In Debug mode, compile sql_yacc.yy with --debug --verbose sql/sql_parse.cc: WL#3432 (Compile the Parser with a --debug --verbose option) Conditionally turn the bison parser debug on at runtime.
-
- 15 Aug, 2006 1 commit
-
-
unknown authored
into mysql.com:/home/cps/mysql/trees/mysql-5.0-virgin
-
- 03 Aug, 2006 1 commit
-
-
unknown authored
Before this fix, - a runtime error in a statement in a stored procedure with no error handlers was properly detected (as expected) - a runtime error in a statement with an error handler inherited from a non local runtime context (i.e., proc a with a handler, calling proc b) was properly detected (as expected) - a runtime error in a statement with a *local* error handler was executed as follows : a) the statement would succeed, regardless of the error condition, (bug) b) the error handler would be called (as expected). The root cause is that functions like my_messqge_sql would "forget" to set the thread flag thd->net.report_error to 1, because of the check involving sp_rcontext::found_handler_here(). Failure to set this flag would cause, later in the call stack, in Item_func::fix_fields() at line 190, the code to return FALSE and consider that executing the statement was successful. With this fix : - error handling code, that was duplicated in different places in the code, is now implemented in sp_rcontext::handle_error(), - handle_error() correctly sets thd->net.report_error when a handler is present, regardless of the handler location (local, or in the call stack). A test case, bug8153_subselect, has been written to demonstrate the change of behavior before and after the fix. Another test case, bug8153_function_a, as also been writen. This test has the same behavior before and after the fix. This test has been written to demonstrate that the previous expected result of procedure bug18787, was incorrect, since select no_such_function() should fail and therefore not produce a result. The incorrect result for bug18787 has the same root cause as Bug#8153, and the expected result has been adjusted. sql/mysqld.cc: Bug#8153, use sp_rcontext::handle_error() to handle errors. sql/sql_error.cc: Bug#8153, use sp_rcontext::handle_error() to handle errors. sql/protocol.cc: Bug#8153, use sp_rcontext::handle_error() to handle errors. sql/sp_rcontext.h: Bug#8153, created helper sp_rcontext::handle_error() to handle errors. sql/sp_rcontext.cc: Bug#8153, created helper sp_rcontext::handle_error() to handle errors. mysql-test/t/sp.test: Bug#8153, added test cases. mysql-test/r/sp.result: Bug#8153, added test cases, fixed expected result of bug18787.
-
- 02 Aug, 2006 15 commits
-
-
unknown authored
-
unknown authored
into bodhi.local:/opt/local/work/mysql-5.0-runtime-merge sql/item.cc: Auto merged sql/item_func.cc: Auto merged sql/item_func.h: Auto merged sql/mysql_priv.h: Auto merged sql/sql_lex.h: Auto merged sql/sql_parse.cc: Auto merged sql/sql_show.cc: Auto merged sql/sql_view.cc: Auto merged sql/sql_yacc.yy: Auto merged sql/table.h: Auto merged mysql-test/r/sp.result: Manual merge. mysql-test/r/udf.result: Manual merge. mysql-test/t/sp.test: Manual merge. mysql-test/t/udf.test: Manual merge.
-
unknown authored
-
unknown authored
into moonbone.local:/work/tmp_merge-5.0-opt-mysql client/mysql.cc: Auto merged
-
unknown authored
into moonbone.local:/work/tmp_merge-5.0-opt-mysql mysql-test/r/ps_1general.result: Auto merged mysql-test/t/ps_1general.test: Auto merged
-
unknown authored
into moonbone.local:/work/tmp_merge-5.0-opt-mysql mysql-test/Makefile.am: Auto merged scripts/make_win_src_distribution.sh: Auto merged sql/item_strfunc.cc: Auto merged sql/mysql_priv.h: Auto merged sql/sql_parse.cc: Auto merged sql/sql_select.cc: Auto merged client/mysqltest.c: Manual merge
-
unknown authored
into moonbone.local:/work/tmp_merge-5.0-opt-mysql client/mysql.cc: Auto merged mysql-test/r/date_formats.result: Auto merged mysql-test/r/func_str.result: Auto merged mysql-test/t/date_formats.test: Auto merged mysql-test/t/func_str.test: Auto merged mysql-test/t/udf.test: Auto merged sql/field.cc: Auto merged sql/field.h: Auto merged sql/item_strfunc.cc: Auto merged sql/mysql_priv.h: Auto merged sql/sql_class.cc: Auto merged sql/sql_parse.cc: Auto merged sql/sql_select.cc: Auto merged sql/time.cc: Auto merged mysql-test/r/sp.result: Manual merge mysql-test/t/sp.test: Manual merge
-
unknown authored
into moonbone.local:/work/tmp_merge-4.1-opt-mysql
-
unknown authored
into moonbone.local:/work/tmp_merge-4.1-opt-mysql sql/item_strfunc.cc: Auto merged sql/mysql_priv.h: Auto merged sql/sql_parse.cc: Auto merged sql/sql_select.cc: Auto merged
-
unknown authored
into mysql.com:/home/hf/work/mysql-4.1.20317
-
unknown authored
into bodhi.local:/opt/local/work/mysql-5.0-runtime-merge include/mysql.h: Auto merged include/sql_common.h: Auto merged libmysql/libmysql.c: Auto merged mysql-test/mysql-test-run.pl: Auto merged mysql-test/r/mysqldump.result: Auto merged mysql-test/t/udf.test: Auto merged ndb/src/mgmsrv/ConfigInfo.cpp: Auto merged sql/item.cc: Auto merged sql/item_func.h: Auto merged sql/mysql_priv.h: Auto merged sql/slave.cc: Auto merged sql/sp.cc: Auto merged sql/sql_lex.cc: Auto merged sql/sql_parse.cc: Auto merged sql-common/client.c: Auto merged sql/sql_yacc.yy: Auto merged sql/table.h: Auto merged mysql-test/r/ps.result: Manual merge. mysql-test/r/sp.result: Manual merge. mysql-test/t/ps.test: Manual merge. mysql-test/t/sp.test: Manual merge. sql/sql_prepare.cc: Manual merge. sql/table.cc: Manual merge. tests/mysql_client_test.c: Manual merge.
-
unknown authored
into lmy002.wdf.sap.corp:/home/georg/work/mysql/prod/mysql-5.0
-
unknown authored
sql/udf_example.c: Declare tmp_error at the beginning of the block (this is C now)
-
unknown authored
BitKeeper/etc/collapsed: BitKeeper file /home/georg/work/mysql/prod/mysql-5.0/BitKeeper/etc/collapsed mysys/my_open.c: Win64 bit fix: Replacing 32-bit value (0xFFFFFFFF) by a generic error constant.
-
unknown authored
Delete: mysql-test/t/sp.test.orig BitKeeper/deleted/.del-sp.test.orig: Delete: mysql-test/t/sp.test.orig
-
- 01 Aug, 2006 9 commits
-
-
unknown authored
Fixes: - bug #19834: Using cursors when running in READ-COMMITTED can cause InnoDB to crash - bug #21112: InnoDB slow with > 100,000 .ibd files - bug #21113: Duplicate printout in SHOW INNODB STATUS innobase/fil/fil0fil.c: Applied innodb-5.0-ss677 snapshot. Make the tablespace cache hash size 100 or 1000 times bigger. Fixes bug #21112. innobase/ibuf/ibuf0ibuf.c: Applied innodb-5.0-ss677 snapshot. ibuf_print(): Don't print redundant information. Fixes bug #21113. sql/ha_innodb.cc: Applied innodb-5.0-ss677 snapshot. ha_innobase::start_stmt(): patch from Heikki: Do not call read_view_close_for_mysql(). (Bug #19834)
-
unknown authored
into neptunus.(none):/home/msvensson/mysql/mysql-4.1
-
unknown authored
into rakia.(none):/home/kgeorge/mysql/autopush/B20103-5.0-opt
-
unknown authored
- make the client to respect the server-side no_backslash_escapes option and disable the special meaning of backslash also at client side. mysql-test/r/mysql_client.result: Bug #20103: Escaping with backslash does not work - test case mysql-test/t/mysql_client.test: Bug #20103: Escaping with backslash does not work - test case
-
unknown authored
into mysql.com:/users/lthalmann/bk/MERGE/mysql-5.0-merge
-
unknown authored
into mysql.com:/users/lthalmann/bk/MERGE/mysql-4.1-merge
-
unknown authored
into rakia.(none):/home/kgeorge/mysql/autopush/B11551-5.0-opt
-
unknown authored
into sunlight.local:/local_work/tmp_merge-5.0-opt-mysql
-
unknown authored
into mysql.com:/users/lthalmann/bk/MERGE/mysql-5.0-merge
-
- 31 Jul, 2006 4 commits
-
-
unknown authored
into mysql.com:/users/lthalmann/bk/MERGE/mysql-5.0-merge extra/yassl/src/ssl.cpp: Auto merged
-
unknown authored
into mysql.com:/users/lthalmann/bk/MERGE/mysql-4.1-merge
-
unknown authored
into weblab.(none):/home/marcsql/TREE/mysql-5.0-21269
-
unknown authored
After merge fix mysql-test/r/select.result: After merge fix mysql-test/r/func_group.result: After merge fix sql/sql_select.cc: After merge fix
-