An error occurred fetching the project authors.
- 19 Apr, 2006 1 commit
-
-
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.
-
- 05 Apr, 2006 1 commit
-
-
unknown authored
Additional fix for INSERT DELAYED with subselect. Originally detected in 5.1, but 5.0 could also be affected. The user thread creates a dummy table object, which is not included in the lock. The 'real' table is opened and locked by the 'delayed' system thread. The dummy object is now marked as not locked and this is tested in mysql_lock_have_duplicate(). sql/lock.cc: BUG#5390 - problems with merge tables Additional fix for INSERT DELAYED with subselect. The user thread creates a dummy table object, which is not included in the lock. Changed to safer asserts. sql/sql_insert.cc: BUG#5390 - problems with merge tables Marked the dummy table object as not being included in the lock.
-
- 29 Mar, 2006 1 commit
-
-
unknown authored
Added missing DBUG_xxx_RETURN statements Fixed some usage of not initialized variables (as found by valgrind) Ensure that we don't remove locked tables used as name locks from open table cache until unlock_table_names() are called. This was fixed by having drop_locked_name() returning any table used as a name lock so that we can free it in unlock_table_names() This will allow Tomas to continue with his work to use namelocks to syncronize things. Note: valgrind still produces a lot of warnings about using not initialized code and shows memory loss errors when running the ndb tests BitKeeper/etc/ignore: added mysql-test/r/*.log client/mysqltest.c: Change type of variables to get rid of compiler warnings More debugging Fix memory leak mysql-test/mysql-test-run.sh: Collect warnings about missing DBUG_RETURN statements mysql-test/r/lock_multi.result: Add test of new code mysql-test/r/ndb_condition_pushdown.result: Drop used tables before test mysql-test/t/lock_multi.test: Add test of new code mysql-test/t/ndb_condition_pushdown.test: Drop used tables before test mysql-test/valgrind.supp: Ignore 'safe' warnings from libz (when used with archive) sql/event.cc: More comments Simplify code Fixed memory leak found by valgrind sql/ha_archive.cc: Remove compiler warnings (Wrong handlerton structure and signed/unsigned comparison) sql/ha_berkeley.cc: Fixed compiler warning sql/ha_blackhole.cc: Fixed compiler warning sql/ha_federated.cc: Fixed compiler warning sql/ha_heap.cc: Fixed compiler warning sql/ha_myisam.cc: Fixed compiler warning sql/ha_myisammrg.cc: Fixed compiler warning sql/ha_ndbcluster.cc: Fixed compiler warnings sql/ha_partition.cc: Fixed compiler warning Fixed error noticed by valgrind in ha_partition::rnd_init() sql/handler.cc: Fixed compiler warning sql/handler.h: Fixed compiler warning sql/item.cc: Fixed compiler warning sql/item_xmlfunc.cc: Fixed warning from valgrind when calling memcpy with wrong address sql/lock.cc: More debugging sql/log.cc: Fixed compiler warning Indentation fixes sql/log.h: Fixed compiler warning sql/mysql_priv.h: Changed prototype for 'drop_locked_tables' sql/opt_range.cc: Indentation fix sql/password.c: Removed compiler warnings sql/set_var.cc: Fixed compiler warning sql/slave.cc: Fixed compiler warning sql/sp_head.cc: Fixed compiler warning sql/sql_acl.cc: Fixed compiler warning sql/sql_analyse.cc: Added missing DBUG_RETURN statements sql/sql_base.cc: Removed de-reference of not initialized pointer More comments drop_locked_tables() changed to not delete tables used for name locking Fixed compiler warnings sql/sql_delete.cc: Fixed usage of not initialized variable (deleted could be referenced in some not common error conditions) sql/sql_parse.cc: Added missing DBUG_VOID_RETURN Simplify code sql/sql_partition.cc: Fixed usage of wrong variable (noticed by valgrind) sql/sql_plugin.cc: Removed compiler warning sql/sql_show.cc: Removed compiler warning sql/sql_table.cc: Ensure that we don't remove locked tables used as name locks from open table cache until unlock_table_names() are called. This was fixed by having drop_locked_name() returning any table used as a name lock so that we can free it in unlock_table_names() This will allow Tomas to continue with his work to use namelocks to syncronize things. Fixed wrong test of 'table_type' (path_length could otherwise be accessed uninitialized) Remove compile warnings about not initialized variables. sql/sql_yacc.yy: Ensure that no_write_to_binlog is properly initialized (Was accessed uninitialized by partition code) sql/table.cc: Removed valgrind warnings (not fatal) Removed compiler warnings sql/tztime.cc: Removed valgrind warning storage/ndb/include/ndbapi/NdbIndexStat.hpp: Removed compiler warning
-
- 20 Feb, 2006 3 commits
- 14 Feb, 2006 1 commit
-
-
unknown authored
1. dbug state is now local to a thread 2. new macros: DBUG_EXPLAIN, DBUG_EXPLAIN_INITIAL, DBUG_SET, DBUG_SET_INITIAL, DBUG_EVALUATE, DBUG_EVALUATE_IF 3. macros are do{}while(0) wrapped 4. incremental modifications to the dbug state (e.g. "+d,info:-t") 5. dbug code cleanup, style fixes 6. _db_on_ and DEBUGGER_ON/OFF removed 7. rest of MySQL code fixed because of 3 (missing ;) and 6 8. dbug manual updated 9. server variable @@debug (global and local) to control dbug from SQL! a. -#T to print timestamps in the log BitKeeper/deleted/.del-readme.prof~2f3bae1550a0038d: Delete: dbug/readme.prof client/mysqlslap.c: typo fixed configure.in: test for sleep() too dbug/dbug.c: thread local dbug settings DBUG_EXPLAIN,DBUG_EXPLAIN_INITIAL,DBUG_SET,DBUG_SET_INITIAL style changes to be more in line with MySQL code cleanup (many mallocs removed) incremental modification of dbug state (e.g. DBUG_PUSH("+t:-d,info")) DBUG_SET, _db_explain_ -#T dbug/monty.doc: obsolete and duplicate docs removed dbug/user.r: new features documented include/my_dbug.h: correct do{}while wrapping thread local dbug settings DBUG_EXPLAIN,DBUG_EXPLAIN_INITIAL,DBUG_SET,DBUG_SET_INITIAL DBUG_EVALUATE,DBUG_EVALUATE_IF libmysql/libmysql.c: remove _db_on_ and DEBUGGER_ON/OFF mysys/my_init.c: missed DBUG_RETURN mysys/my_thr_init.c: bugfix - transaction id's are unsigned mysys/testhash.c: remove _db_on_ and DEBUGGER_ON/OFF sql/ha_myisammrg.cc: missed ; sql/ha_ndbcluster.cc: remove _db_on_ and DEBUGGER_ON/OFF missed ; sql/ha_ndbcluster_binlog.cc: remove _db_on_ and DEBUGGER_ON/OFF missed ; sql/item_cmpfunc.cc: missed ; sql/lock.cc: missed DBUG_RETURN sql/log_event.cc: missed ; sql/mysqld.cc: remove _db_on_ and DEBUGGER_ON/OFF missed ; DBUG_SET_INITIAL sql/opt_range.cc: remove _db_on_ and DEBUGGER_ON/OFF sql/set_var.cc: class sys_var_thd_dbug and "debug" server variable sql/set_var.h: class sys_var_thd_dbug and "debug" server variable sql/slave.cc: missed ; sql/sql_cache.cc: missed ; sql/sql_plugin.cc: missed ; sql/sql_select.cc: remove _db_on_ and DEBUGGER_ON/OFF storage/heap/hp_test2.c: remove _db_on_ and DEBUGGER_ON/OFF storage/myisam/ft_eval.c: remove _db_on_ and DEBUGGER_ON/OFF storage/myisam/ft_test1.c: remove _db_on_ and DEBUGGER_ON/OFF storage/myisam/mi_open.c: remove _db_on_ and DEBUGGER_ON/OFF missed ; storage/myisam/mi_test1.c: remove _db_on_ and DEBUGGER_ON/OFF storage/myisam/mi_test2.c: remove _db_on_ and DEBUGGER_ON/OFF storage/myisam/mi_test3.c: remove _db_on_ and DEBUGGER_ON/OFF storage/ndb/src/ndbapi/DictCache.cpp: missed ; storage/ndb/src/ndbapi/NdbTransaction.cpp: missed ; tests/mysql_client_test.c: remove _db_on_ and DEBUGGER_ON/OFF
-
- 26 Jan, 2006 1 commit
-
-
unknown authored
Interface changes pushed early. Separation of public and implementation interface for external_lock() in preparation for implementation. sql/handler.cc: Separating public virtual external_lock() into public non-virtual ha_external_lock() and private virtual external_lock(). Some minor changes to ha_*_row() function. sql/handler.h: Separating public virtual external_lock() into public non-virtual ha_external_lock() and private virtual external_lock(). sql/lock.cc: Using new public ha_external_lock instead of internal external_lock. sql/opt_range.cc: Using new public ha_external_lock instead of internal external_lock. sql/sql_table.cc: Using new public ha_external_lock instead of internal external_lock.
-
- 23 Jan, 2006 1 commit
-
-
unknown authored
After-fix optimizations proposed and finally implemented by Monty. mysql-test/r/lock.result: BUG#5390 - problems with merge tables After-fix optimizations proposed and finally implemented by Monty. Additional test results. mysql-test/t/lock.test: BUG#5390 - problems with merge tables After-fix optimizations proposed and finally implemented by Monty. Additional tests. sql/lock.cc: BUG#5390 - problems with merge tables After-fix optimizations proposed and finally implemented by Monty. get_lock_data() gets a flag for storing the lock positions in the new TABLE elements. mysql_lock_remove() can now remove a lock faster and more precisely as it has needed info in TABLE now. mysql_unlock_read_tables() and mysql_lock_merge() must now adjust the new elements of TABLE when modifying locks. mysql_lock_have_duplicate() can now work faster on the existing lock as the positions in the lock arrays are known for each table. get_lock_data() assigns the new TABLE elements on request of the new flag. sql/table.h: BUG#5390 - problems with merge tables After-fix optimizations proposed and finally implemented by Monty. Additional elements of TABLE.
-
- 19 Jan, 2006 2 commits
-
-
unknown authored
CSV storage engine to be statically compiled. Derived from antony's patch. config/ac-macros/storage.m4: don't add objects to the object list if we don't have them configure.in: compile CSV statically sql/ha_myisam.cc: fix prototype to get rid of THD sql/ha_myisam.h: fix prototype to get rid of THD sql/handler.cc: new function for plugins sql/handler.h: fix prototype to get rid of THD declare functions used by plugins sql/item.h: Don't include all the types and files when not building mysqld sql/lock.cc: don's assume that handler knows about THD sql/mysql_priv.h: Don't include all the types and files when not building mysqld declare new plugin functions sql/sql_class.cc: New plugin functions sql/sql_class.h: Don't include all the types and files when not building mysqld sql/sql_lex.h: Don't include all the types and files when not building mysqld storage/csv/Makefile.am: compile CSV into a static lib to be linked into mysqld storage/csv/ha_tina.cc: fix ha_tina to be able to build it static storage/csv/ha_tina.h: fix prototype to get rid of THD
-
unknown authored
tree to get rid of multiple typos in CS comments and unify the patch. configure.in: CSV is compiled in by default now include/my_base.h: add new ha_extra flag for the log tables mysql-test/include/im_check_os.inc: we should only run im tests if csv is on for now: im relies on mysqld options available only in csv build. mysql-test/include/system_db_struct.inc: check log tables structure mysql-test/lib/init_db.sql: create log tables when running tests. mysql-test/mysql-test-run.pl: Add old logs flag to IM tests. As IM could only deal with old logs (this feature is not needed with log tables) mysql-test/r/connect.result: update result mysql-test/r/csv.result: update result mysql-test/r/im_utils.result: update result mysql-test/r/information_schema.result: update result mysql-test/r/mysqlcheck.result: update result mysql-test/r/show_check.result: update result mysql-test/r/system_mysql_db.result: update result mysql-test/t/connect.test: disable test if CSV engine is not in: result depends on the presence of CSV-based log tables mysql-test/t/csv.test: add tests for concurrent insert (the functionality is added to CSV in this patch) mysql-test/t/information_schema.test: disable test if CSV engine is not in: result depends on the presence of CSV-based log tables mysql-test/t/mysqlcheck.test: disable test if CSV engine is not in: result depends on the presence of CSV-based log tables mysql-test/t/show_check.test: disable test if CSV engine is not in: result depends on the presence of CSV-based log tables mysql-test/t/system_mysql_db.test: disable test if CSV engine is not in: result depends on the presence of CSV-based log tables mysql-test/t/system_mysql_db_fix.test: disable test if CSV engine is not in: result depends on the presence of CSV-based log tables scripts/mysql_create_system_tables.sh: new system tables: slow_log and general_log scripts/mysql_fix_privilege_tables.sql: add new log tables: use an SP to create them for non-csv build to work fine. sql/ha_myisam.cc: move locking-related checks to the hanlder sql/ha_myisam.h: new function declared sql/handler.h: new virtual function is added: we should check for handler-related locking issues in the handler sql/lock.cc: from now on we check for handler-related locking issues in the handler itself rather then in lock.cc sql/log.cc: Add log tables support, refactoring: there are log event handlers with common interface. They are used by the LOGGER class, which is responsible for their initialization, cleanup and managment. Logging to the tables provided by one of the log event handler types. sql/log.h: declare new log classes sql/log_event.cc: convert old logging routines calls to use new API sql/mysql_priv.h: define common log routines and objects sql/mysqld.cc: Add support for the log tables. Their initalization, cleanup and specific options. sql/share/errmsg.txt: add new error messages for the log tables sql/slave.cc: convert old logging routines calls to use new API sql/sql_base.cc: TABLE objects used by the logger should be skipped during refreshes (as log tables are always opened and locked). fix table_is_used to skip them. This is needed for FLUSH LOGS to work sql/sql_db.cc: convert old logging routines calls to use new API sql/sql_delete.cc: fix TRUNCATE to work with log tables sql/sql_parse.cc: command_name is now an array of LEX_STRINGs sql/sql_prepare.cc: convert old logging routines calls to use new API sql/sql_show.cc: convert old logging routines calls to use new API sql/sql_table.cc: don't reoped the log tables for admin purposes sql/table.cc: mark log tables as such during the open sql/table.h: add log-related info storage/csv/ha_tina.cc: add support for concurrent insert (see bk commit - 5.1 tree (petr:1.1910) for standalone patch), add log tables-specific csv table handling. storage/csv/ha_tina.h: enable concurrent insert for CSV, add log table flag mysql-test/r/log_tables.result: New BitKeeper file ``mysql-test/r/log_tables.result'' mysql-test/t/log_tables.test: New BitKeeper file ``mysql-test/t/log_tables.test''
-
- 17 Jan, 2006 1 commit
-
-
unknown authored
Optimised version of ADD/DROP/REORGANIZE partitions for non-NDB storage engines. New syntax to handle REBUILD/OPTIMIZE/ANALYZE/CHECK/REPAIR partitions Quite a few bug fixes include/thr_lock.h: New method to downgrade locks from TL_WRITE_ONLY Possibility to upgrade lock while aborting locks mysql-test/r/ndb_autodiscover.result: Fix for lowercase and that all NDB tables are now partitioned mysql-test/r/ndb_bitfield.result: Fix for lowercase and that all NDB tables are now partitioned mysql-test/r/ndb_gis.result: Fix for lowercase and that all NDB tables are now partitioned mysql-test/r/ndb_partition_key.result: New test case mysql-test/r/partition.result: New test case mysql-test/r/partition_error.result: New test case mysql-test/r/partition_mgm_err.result: Fix of test case results mysql-test/t/disabled.def: partition_03ndb still has bug mysql-test/t/ndb_partition_key.test: New test cases for new functionality and bugs mysql-test/t/partition.test: New test cases for new functionality and bugs mysql-test/t/partition_error.test: New test cases for new functionality and bugs mysql-test/t/partition_mgm_err.test: New test cases for new functionality and bugs mysys/thr_lock.c: New method to downgrade TL_WRITE_ONLY locks Possibility to specify if locks are to be upgraded at abort locks sql/ha_archive.cc: New handlerton methods sql/ha_berkeley.cc: New handlerton methods sql/ha_blackhole.cc: New handlerton methods sql/ha_federated.cc: New handlerton methods sql/ha_heap.cc: New handlerton methods sql/ha_innodb.cc: New handlerton methods sql/ha_myisam.cc: New handlerton methods sql/ha_myisammrg.cc: New handlerton methods sql/ha_ndbcluster.cc: New handlerton methods Moved out packfrm and unpackfrm methods Adapted many parts to use table_share instead of table->s Ensured that .ndb file uses filename and not tablename according to new encoding of names (WL 1324) All NDB tables are partitioned and set up partition info Fixed such that tablenames use tablenames and not filenames in NDB NDB uses auto partitioning for ENGINE=NDB tables Warning for very large tables Set RANGE data Set LIST data New method to set-up partition info Set Default number of partitions flag Set linear hash flag Set node group array Set number of fragments Set max rows Set tablespace names New method to get number of partitions of table to use at open table sql/ha_ndbcluster.h: Removed partition_flags and alter_table_flags from handler class A couple of new and changed method headers sql/ha_ndbcluster_binlog.cc: Use new method headers sql/ha_partition.cc: New handlerton methods Lots of new function headers Use #P# as separator between table name and partition name and #SP# as separator between partition name and subpartition name Use filename encoding for files both of table name part and of partition name parts New method to drop partitions based on partition state New method to rename partitions based on partition state New methods to optimize, analyze, check and repair partitions New methods to optimize, analyze, check and repair table Helper method to create new partition, open it and external lock it, not needed to lock it internally since no one else knows about it yet. Cleanup method at error for new partitions New methods to perform bulk of work at ADD/REORGANIZE partitions (change_partitions, copy_partitions) sql/ha_partition.h: New methods and variables A few dropped ones and a few changed ones sql/handler.cc: Handlerton interface changes New flag to open_table_from_share sql/handler.h: New alter_table_flags New partition flags New partition states More states for default handling Lots of new, dropped and changed interfaces sql/lex.h: Added REBUILD and changed name of REORGANISE to REORGANIZE sql/lock.cc: Method to downgrade locks Able to specify if locks upgraded on abort locks sql/log.cc: New handlerton methods sql/mysql_priv.h: Lots of new interfaces sql/share/errmsg.txt: Lots of new, dropped and changed error messages sql/sql_base.cc: Adapted to new method headers New method to abort and upgrade lock New method to close open tables and downgrade lock New method to wait for completed table sql/sql_lex.h: New flags sql/sql_partition.cc: Return int instead of bool in get_partition_id More defaults handling Make use of new mem_alloc_error method More work on function headers Changes to generate partition syntax to cater for intermediate partition states Lots of new code with large comments describing new features for Partition Management: ADD/DROP/REORGANIZE/OPTIMIZE/ANALYZE/CHECK/REPAIR partitions sql/sql_show.cc: Minors sql/sql_table.cc: Moved a couple of methods New methods to copy create lists and key lists for use with mysql_prepare_table New method to write frm file New handling of handlers with auto partitioning Fix CREATE TABLE LIKE Moved code for ADD/DROP/REORGANIZE partitions Use handlerton method for alter_table_flags sql/sql_yacc.yy: More memory alloc error checks New syntax for REBUILD, ANALYZE, CHECK, OPTIMIZE, REPAIR partitions sql/table.cc: Fix length of extra part to be 4 bytes Partition state introduced in frm file sql/table.h: Partition state introduced sql/unireg.cc: Partition state introduced Default partition storage/csv/ha_tina.cc: New handlerton methods storage/example/ha_example.cc: New handlerton methods storage/ndb/include/kernel/ndb_limits.h: RANGE DATA storage/ndb/include/kernel/signaldata/AlterTable.hpp: New interfaces in ALTER TABLE towards NDB kernel storage/ndb/include/kernel/signaldata/DiAddTab.hpp: New section storage/ndb/include/kernel/signaldata/DictTabInfo.hpp: Lots of new parts of table description storage/ndb/include/kernel/signaldata/LqhFrag.hpp: tablespace id specified in LQHFRAGREQ storage/ndb/include/ndbapi/NdbDictionary.hpp: Lots of new methods in NDB dictionary storage/ndb/src/common/debugger/signaldata/DictTabInfo.cpp: Lots of new variables in table description storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp: Lots of new variables in table description storage/ndb/src/kernel/blocks/dbdict/Dbdict.hpp: Lots of new variables in table description storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp: New error insertion storage/ndb/src/kernel/blocks/dbtup/DbtupMeta.cpp: a few extra jam's storage/ndb/src/ndbapi/NdbBlob.cpp: Changes to definition of blob tables storage/ndb/src/ndbapi/NdbDictionary.cpp: Lots of new stuff in NDB dictionary storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp: Lots of new stuff in NDB dictionary storage/ndb/src/ndbapi/NdbDictionaryImpl.hpp: Lots of new stuff in NDB dictionary storage/ndb/test/ndbapi/test_event.cpp: removed use of methods no longer in existence storage/ndb/tools/restore/Restore.cpp: Renamed variable
-
- 04 Jan, 2006 1 commit
-
-
unknown authored
when high concurrency": remove HASH::current_record and make it an external search parameter, so that it can not be the cause of a race condition under high concurrent load. The bug was in a race condition in table_hash_search, when column_priv_hash.current_record was overwritten simultaneously by multiple threads, causing the search for a suitable grant record to fail. No test case as the bug is repeatable only under concurrent load. include/hash.h: - remove current_record from HASH, instead modify hash_first, hash_next to accept HASH_SEARCH_STATE as an IN/OUT parameter mysys/hash.c: - remove HASH::current_record - change declarations of functions that use HASH in read-only mode to accept const HASH * instead of HASH *. - implement hash_search; move the old implementation of hash_search to hash_first mysys/testhash.c: - adjust the test case to changed function declarations sql/lock.cc: - adjust to changed declarations of hash_search, hash_next sql/sql_acl.cc: - adjust to changed declarations of hash_search, hash_next sql/sql_base.cc: - adjust to changed declarations of hash_search, hash_nex sql/sql_cache.cc: - adjust to a changed declaration of hash_replace
-
- 22 Dec, 2005 1 commit
-
-
unknown authored
Problem #1: INSERT...SELECT, Version for 5.1. Extended the unique table check by a check of lock data. Merge sub-tables cannot be detected by doing name checks only. mysql-test/r/create.result: BUG#5390 - problems with merge tables Removed a duplicate test. mysql-test/r/merge.result: BUG#5390 - problems with merge tables Problem #1: INSERT...SELECT Added test results. mysql-test/t/create.test: BUG#5390 - problems with merge tables Removed a duplicate test. mysql-test/t/merge.test: BUG#5390 - problems with merge tables Problem #1: INSERT...SELECT Added tests. sql/lock.cc: BUG#5390 - problems with merge tables Problem #1: INSERT...SELECT, Version for 5.1. Added a new function to find a duplicate lock in a list of tables. sql/mysql_priv.h: Problem #1: INSERT...SELECT, Version for 5.1. Added the thread handle to unique_table(). Added a declaration for the new function. sql/sql_base.cc: BUG#5390 - problems with merge tables Problem #1: INSERT...SELECT, Version for 5.1. Added the thread handle to unique_table(). Added a call to the new mysql_lock_have_duplicate(), which needs the thread handle, to unique_table(). sql/sql_delete.cc: BUG#5390 - problems with merge tables Problem #1: INSERT...SELECT, Version for 5.1. Added the thread handle to unique_table(). sql/sql_insert.cc: BUG#5390 - problems with merge tables Problem #1: INSERT...SELECT, Version for 5.1. Added the thread handle to unique_table(). sql/sql_load.cc: BUG#5390 - problems with merge tables Problem #1: INSERT...SELECT, Version for 5.1. Added the thread handle to unique_table(). sql/sql_parse.cc: BUG#5390 - problems with merge tables Problem #1: INSERT...SELECT, Version for 5.1. Added the thread handle to unique_table(). sql/sql_update.cc: BUG#5390 - problems with merge tables Problem #1: INSERT...SELECT, Version for 5.1. Added the thread handle to unique_table(). Replaced a call to find_table_in_local_list() by the newly extended unique_table().
-
- 20 Dec, 2005 1 commit
-
-
unknown authored
Problem #1: INSERT...SELECT, Version for 5.0. Extended the unique table check by a check of lock data. Merge sub-tables cannot be detected by doing name checks only. mysql-test/r/create.result: BUG#5390 - problems with merge tables Removed a duplicate test. mysql-test/r/merge.result: BUG#5390 - problems with merge tables Problem #1: INSERT...SELECT Added test results. mysql-test/t/create.test: BUG#5390 - problems with merge tables Removed a duplicate test. mysql-test/t/merge.test: BUG#5390 - problems with merge tables Problem #1: INSERT...SELECT Added tests. sql/lock.cc: BUG#5390 - problems with merge tables Problem #1: INSERT...SELECT, Version for 5.0. Added a new function to find a duplicate lock in a list of tables. sql/mysql_priv.h: BUG#5390 - problems with merge tables Problem #1: INSERT...SELECT, Version for 5.0. Added the thread handle to unique_table(). Added a declaration for the new function. sql/sql_base.cc: BUG#5390 - problems with merge tables Problem #1: INSERT...SELECT, Version for 5.0. Added the thread handle to unique_table(). Added a call to the new mysql_lock_have_duplicate(), which needs the thread handle, to unique_table(). sql/sql_delete.cc: BUG#5390 - problems with merge tables Problem #1: INSERT...SELECT, Version for 5.0. Added the thread handle to unique_table(). sql/sql_insert.cc: BUG#5390 - problems with merge tables Problem #1: INSERT...SELECT, Version for 5.0. Added the thread handle to unique_table(). sql/sql_load.cc: BUG#5390 - problems with merge tables Problem #1: INSERT...SELECT, Version for 5.0. Added the thread handle to unique_table(). sql/sql_parse.cc: BUG#5390 - problems with merge tables Problem #1: INSERT...SELECT, Version for 5.0. Added the thread handle to unique_table(). sql/sql_update.cc: BUG#5390 - problems with merge tables Problem #1: INSERT...SELECT, Version for 5.0. Added the thread handle to unique_table(). Replaced a call to find_table_in_local_list() by the newly extended unique_table().
-
- 07 Dec, 2005 1 commit
-
-
unknown authored
Problem #1: INSERT...SELECT, Version for 4.1. INSERT ... SELECT with the same table on both sides (hidden below a MERGE table) does now work by buffering the select result. The duplicate detection works now after open_and_lock_tables() on the locks. I did not find a test case that failed without the change in sql_update.cc. I made the change anyway as it should in theory fix a possible MERGE table problem with multi-table update. libmysqld/ha_blackhole.cc: BUG#5390 - problems with merge tables No idea, how the symlink change made it into my patch. mysql-test/r/create.result: BUG#5390 - problems with merge tables Removed a duplicate test. mysql-test/r/merge.result: BUG#5390 - problems with merge tables Problem #1: INSERT...SELECT, Version for 4.1. Added test results. mysql-test/t/create.test: BUG#5390 - problems with merge tables Removed a duplicate test. mysql-test/t/merge.test: BUG#5390 - problems with merge tables Problem #1: INSERT...SELECT, Version for 4.1. Added tests. sql/lock.cc: BUG#5390 - problems with merge tables Problem #1: INSERT...SELECT, Version for 4.1. Added a new function to find a duplicate lock in a list of tables. sql/mysql_priv.h: BUG#5390 - problems with merge tables Problem #1: INSERT...SELECT, Version for 4.1. Added a declaration for the new function. sql/sql_parse.cc: BUG#5390 - problems with merge tables Problem #1: INSERT...SELECT, Version for 4.1. Changed the duplicate tables detection for INSERT ... SELECT to use the new function, which does also work for MERGE tables. sql/sql_update.cc: BUG#5390 - problems with merge tables Problem #1: INSERT...SELECT, Version for 4.1. Changed the duplicate tables detection for UPDATE to use the new function, which does also work for MERGE tables.
-
- 29 Nov, 2005 1 commit
-
-
unknown authored
Problem #1: INSERT...SELECT INSERT ... SELECT with the same table on both sides (hidden below a MERGE table) does now work by buffering the select result. The duplicate detection works now after open_and_lock_tables() on the locks. I did not find a test case that failed without the change in sql_update.cc. I made the change anyway as it should in theory fix a possible MERGE table problem with multi-table update. mysql-test/r/create.result: BUG#5390 - problems with merge tables Removed a duplicate test. mysql-test/r/merge.result: BUG#5390 - problems with merge tables Problem #1: INSERT...SELECT Added test results. mysql-test/t/create.test: BUG#5390 - problems with merge tables Removed a duplicate test. mysql-test/t/merge.test: BUG#5390 - problems with merge tables Problem #1: INSERT...SELECT Added tests. sql/lock.cc: BUG#5390 - problems with merge tables Problem #1: INSERT...SELECT Added a new function to find a duplicate lock in a list of tables. sql/mysql_priv.h: BUG#5390 - problems with merge tables Problem #1: INSERT...SELECT Added a declaration for the new function. sql/sql_parse.cc: BUG#5390 - problems with merge tables Problem #1: INSERT...SELECT Changed the duplicate tables detection for INSERT ... SELECT to use the new function, which does also work for MERGE tables. sql/sql_update.cc: BUG#5390 - problems with merge tables Changed the duplicate tables detection for UPDATE to use the new function, which does also work for MERGE tables.
-
- 23 Nov, 2005 1 commit
-
-
unknown authored
The table opening process now works the following way: - Create common TABLE_SHARE object - Read the .frm file and unpack it into the TABLE_SHARE object - Create a TABLE object based on the information in the TABLE_SHARE object and open a handler to the table object Other noteworthy changes: - In TABLE_SHARE the most common strings are now LEX_STRING's - Better error message when table is not found - Variable table_cache is now renamed 'table_open_cache' - New variable 'table_definition_cache' that is the number of table defintions that will be cached - strxnmov() calls are now fixed to avoid overflows - strxnmov() will now always add one end \0 to result - engine objects are now created with a TABLE_SHARE object instead of a TABLE object. - After creating a field object one must call field->init(table) before using it - For a busy system this change will give you: - Less memory usage for table object - Faster opening of tables (if it's has been in use or is in table definition cache) - Allow you to cache many table definitions objects - Faster drop of table mysql-test/mysql-test-run.sh: Fixed some problems with --gdb option Test both with socket and tcp/ip port that all old servers are killed mysql-test/r/flush_table.result: More tests with lock table with 2 threads + flush table mysql-test/r/information_schema.result: Removed old (now wrong) result mysql-test/r/innodb.result: Better error messages (thanks to TDC patch) mysql-test/r/merge.result: Extra flush table test mysql-test/r/ndb_bitfield.result: Better error messages (thanks to TDC patch) mysql-test/r/ndb_partition_error.result: Better error messages (thanks to TDC patch) mysql-test/r/query_cache.result: Remove tables left from old tests mysql-test/r/temp_table.result: Test truncate with temporary tables mysql-test/r/variables.result: Table_cache -> Table_open_cache mysql-test/t/flush_table.test: More tests with lock table with 2 threads + flush table mysql-test/t/merge.test: Extra flush table test mysql-test/t/multi_update.test: Added 'sleep' to make test predictable mysql-test/t/query_cache.test: Remove tables left from old tests mysql-test/t/temp_table.test: Test truncate with temporary tables mysql-test/t/variables.test: Table_cache -> Table_open_cache mysql-test/valgrind.supp: Remove warning that may happens becasue threads dies in different order mysys/hash.c: Fixed wrong DBUG_PRINT mysys/mf_dirname.c: More DBUG mysys/mf_pack.c: Better comment mysys/mf_tempdir.c: More DBUG Ensure that we call cleanup_dirname() on all temporary directory paths. If we don't do this, we will get a failure when comparing temporary table names as in some cases the temporary table name is run through convert_dirname()) mysys/my_alloc.c: Indentation fix sql/examples/ha_example.cc: We new use TABLE_SHARE instead of TABLE when creating engine handlers sql/examples/ha_example.h: We new use TABLE_SHARE instead of TABLE when creating engine handlers sql/examples/ha_tina.cc: We new use TABLE_SHARE instead of TABLE when creating engine handlers sql/examples/ha_tina.h: We new use TABLE_SHARE instead of TABLE when creating engine handlers sql/field.cc: Update for table definition cache: - Field creation now takes TABLE_SHARE instead of TABLE as argument (This is becasue field definitions are now cached in TABLE_SHARE) When a field is created, one now must call field->init(TABLE) before using it - Use s->db instead of s->table_cache_key - Added Field::clone() to create a field in TABLE from a field in TABLE_SHARE - make_field() takes TABLE_SHARE as argument instead of TABLE - move_field() -> move_field_offset() sql/field.h: Update for table definition cache: - Field creation now takes TABLE_SHARE instead of TABLE as argument (This is becasue field definitions are now cached in TABLE_SHARE) When a field is created, one now must call field->init(TABLE) before using it - Added Field::clone() to create a field in TABLE from a field in TABLE_SHARE - make_field() takes TABLE_SHARE as argument instead of TABLE - move_field() -> move_field_offset() sql/ha_archive.cc: We new use TABLE_SHARE instead of TABLE when creating engine handlers sql/ha_archive.h: We new use TABLE_SHARE instead of TABLE when creating engine handlers sql/ha_berkeley.cc: We new use TABLE_SHARE instead of TABLE when creating engine handlers Changed name of argument create() to not hide internal 'table' variable. table->s -> table_share sql/ha_berkeley.h: We new use TABLE_SHARE instead of TABLE when creating engine handlers sql/ha_blackhole.cc: We new use TABLE_SHARE instead of TABLE when creating engine handlers sql/ha_blackhole.h: We new use TABLE_SHARE instead of TABLE when creating engine handlers sql/ha_federated.cc: We new use TABLE_SHARE instead of TABLE when creating engine handlers Fixed comments Remove index variable and replace with pointers (simple optimization) move_field() -> move_field_offset() Removed some strlen() calls sql/ha_federated.h: We new use TABLE_SHARE instead of TABLE when creating engine handlers sql/ha_heap.cc: We new use TABLE_SHARE instead of TABLE when creating engine handlers Simplify delete_table() and create() as the given file names are now without extension sql/ha_heap.h: We new use TABLE_SHARE instead of TABLE when creating engine handlers sql/ha_innodb.cc: We new use TABLE_SHARE instead of TABLE when creating engine handlers sql/ha_innodb.h: We new use TABLE_SHARE instead of TABLE when creating engine handlers sql/ha_myisam.cc: We new use TABLE_SHARE instead of TABLE when creating engine handlers Remove not needed fn_format() Fixed for new table->s structure sql/ha_myisam.h: We new use TABLE_SHARE instead of TABLE when creating engine handlers sql/ha_myisammrg.cc: We new use TABLE_SHARE instead of TABLE when creating engine handlers Don't set 'is_view' for MERGE tables Use new interface to find_temporary_table() sql/ha_myisammrg.h: We new use TABLE_SHARE instead of TABLE when creating engine handlers Added flag HA_NO_COPY_ON_ALTER sql/ha_ndbcluster.cc: We new use TABLE_SHARE instead of TABLE when creating engine handlers Fixed wrong calls to strxnmov() Give error HA_ERR_TABLE_DEF_CHANGED if table definition has changed drop_table -> intern_drop_table() table->s -> table_share Move part_info to TABLE Fixed comments & DBUG print's New arguments to print_error() sql/ha_ndbcluster.h: We new use TABLE_SHARE instead of TABLE when creating engine handlers sql/ha_partition.cc: We new use TABLE_SHARE instead of TABLE when creating engine handlers We can't set up or use part_info when creating handler as there is not yet any table object New ha_intialise() to work with TDC (Done by Mikael) sql/ha_partition.h: We new use TABLE_SHARE instead of TABLE when creating engine handlers Got set_part_info() from Mikael sql/handler.cc: We new use TABLE_SHARE instead of TABLE when creating engine handlers ha_delete_table() now also takes database as an argument handler::ha_open() now takes TABLE as argument ha_open() now calls ha_allocate_read_write_set() Simplify ha_allocate_read_write_set() Remove ha_deallocate_read_write_set() Use table_share (Cached by table definition cache) sql/handler.h: New table flag: HA_NO_COPY_ON_ALTER (used by merge tables) Remove ha_deallocate_read_write_set() get_new_handler() now takes TABLE_SHARE as argument ha_delete_table() now gets database as argument sql/item.cc: table_name and db are now LEX_STRING objects When creating fields, we have now have to call field->init(table) move_field -> move_field_offset() sql/item.h: tmp_table_field_from_field_type() now takes an extra paramenter 'fixed_length' to allow one to force usage of CHAR instead of BLOB sql/item_cmpfunc.cc: Fixed call to tmp_table_field_from_field_type() sql/item_create.cc: Assert if new not handled cast type sql/item_func.cc: When creating fields, we have now have to call field->init(table) dummy_table used by 'sp' now needs a TABLE_SHARE object sql/item_subselect.cc: Trivial code cleanups sql/item_sum.cc: When creating fields, we have now have to call field->init(table) sql/item_timefunc.cc: Item_func_str_to_date::tmp_table_field() now replaced by call to tmp_table_field_from_field_type() (see item_timefunc.h) sql/item_timefunc.h: Simply tmp_table_field() sql/item_uniq.cc: When creating fields, we have now have to call field->init(table) sql/key.cc: Added 'KEY' argument to 'find_ref_key' to simplify code sql/lock.cc: More debugging Use create_table_def_key() to create key for table cache Allocate TABLE_SHARE properly when creating name lock Fix that locked_table_name doesn't test same table twice sql/mysql_priv.h: New functions for table definition cache New interfaces to a lot of functions. New faster interface to find_temporary_table() and close_temporary_table() sql/mysqld.cc: Added support for table definition cache of size 'table_def_size' Fixed som calls to strnmov() Changed name of 'table_cache' to 'table_open_cache' sql/opt_range.cc: Use new interfaces Fixed warnings from valgrind sql/parse_file.cc: Safer calls to strxnmov() Fixed typo sql/set_var.cc: Added variable 'table_definition_cache' Variable table_cache renamed to 'table_open_cache' sql/slave.cc: Use new interface sql/sp.cc: Proper use of TABLE_SHARE sql/sp_head.cc: Remove compiler warnings We have now to call field->init(table) sql/sp_head.h: Pointers to parsed strings are now const sql/sql_acl.cc: table_name is now a LEX_STRING sql/sql_base.cc: Main implementation of table definition cache (The #ifdef's are there for the future when table definition cache will replace open table cache) Now table definitions are cached indepndent of open tables, which will speed up things when a table is in use at once from several places Views are not yet cached; For the moment we only cache if a table is a view or not. Faster implementation of find_temorary_table() Replace 'wait_for_refresh()' with the more general function 'wait_for_condition()' Drop table is slightly faster as we can use the table definition cache to know the type of the table sql/sql_cache.cc: table_cache_key and table_name are now LEX_STRING 'sDBUG print fixes sql/sql_class.cc: table_cache_key is now a LEX_STRING safer strxnmov() sql/sql_class.h: Added number of open table shares (table definitions) sql/sql_db.cc: safer strxnmov() sql/sql_delete.cc: Use new interface to find_temporary_table() sql/sql_derived.cc: table_name is now a LEX_STRING sql/sql_handler.cc: TABLE_SHARE->db and TABLE_SHARE->table_name are now LEX_STRING's sql/sql_insert.cc: TABLE_SHARE->db and TABLE_SHARE->table_name are now LEX_STRING's sql/sql_lex.cc: Make parsed string a const (to quickly find out if anything is trying to change the query string) sql/sql_lex.h: Make parsed string a const (to quickly find out if anything is trying to change the query string) sql/sql_load.cc: Safer strxnmov() sql/sql_parse.cc: Better error if wrong DB name sql/sql_partition.cc: part_info moved to TABLE from TABLE_SHARE Indentation changes sql/sql_select.cc: Indentation fixes Call field->init(TABLE) for new created fields Update create_tmp_table() to use TABLE_SHARE properly sql/sql_select.h: Call field->init(TABLE) for new created fields sql/sql_show.cc: table_name is now a LEX_STRING part_info moved to TABLE sql/sql_table.cc: Use table definition cache to speed up delete of tables Fixed calls to functions with new interfaces Don't use 'share_not_to_be_used' Instead of doing openfrm() when doing repair, we now have to call get_table_share() followed by open_table_from_share(). Replace some fn_format() with faster unpack_filename(). Safer strxnmov() part_info is now in TABLE Added Mikaels patch for partition and ALTER TABLE Instead of using 'TABLE_SHARE->is_view' use 'table_flags() & HA_NO_COPY_ON_ALTER sql/sql_test.cc: table_name and table_cache_key are now LEX_STRING's sql/sql_trigger.cc: TABLE_SHARE->db and TABLE_SHARE->table_name are now LEX_STRING's safer strxnmov() Removed compiler warnings sql/sql_update.cc: Call field->init(TABLE) after field is created sql/sql_view.cc: safer strxnmov() Create common TABLE_SHARE object for views to allow us to cache if table is a view sql/structs.h: Added SHOW_TABLE_DEFINITIONS sql/table.cc: Creation and destruct of TABLE_SHARE objects that are common for many TABLE objects The table opening process now works the following way: - Create common TABLE_SHARE object - Read the .frm file and unpack it into the TABLE_SHARE object - Create a TABLE object based on the information in the TABLE_SHARE object and open a handler to the table object open_table_def() is written in such a way that it should be trival to add parsing of the .frm files in new formats sql/table.h: TABLE objects for the same database table now share a common TABLE_SHARE object In TABLE_SHARE the most common strings are now LEX_STRING's sql/unireg.cc: Changed arguments to rea_create_table() to have same order as other functions Call field->init(table) for new created fields sql/unireg.h: Added OPEN_VIEW strings/strxnmov.c: Change strxnmov() to always add end \0 This makes usage of strxnmov() safer as most of MySQL code assumes that strxnmov() will create a null terminated string
-
- 19 Nov, 2005 1 commit
-
-
unknown authored
Patch that fixes crashing when partition uses blackole for underlying tables. mysql-test/r/partition.result: BUG #14524 New test result mysql-test/t/partition.test: BUG #14524 New test sql/ha_partition.cc: BUG# 14524 Added new class var m_no_locks to keep track of the absense of locks. If '0', then lock_count returns 0, which keeps thr_multi_lock from crashing in the case of the underlying table being ha_blackhole. sql/ha_partition.h: BUG #14524 Added new class var m_no_locks to keep track of lock count sql/lock.cc: BUG #14524 DBUG PRINTs and ENTERs to make tracking the bug easier. I think these are useful regardless of this bug. sql/sql_partition.cc: BUG #14524 Changed umlaut o to allow fixing bug 14524 using DDD (file would not display in DDD)
-
- 15 Nov, 2005 1 commit
-
-
unknown authored
Version for 5.0. It fixes three problems: 1. The cause of the bug was that we did not check the table version for the HANDLER ... READ commands. We did not notice when a table was replaced by a new one. This can happen during ALTER TABLE, REPAIR TABLE, and OPTIMIZE TABLE (there might be more cases). I call the fix for this problem "the primary bug fix". 2. mysql_ha_flush() was not always called with a locked LOCK_open. Though the function comment clearly said it must. I changed the code so that the locking is done when required. I call the fix for this problem "the secondary fix". 3. In 5.0 (not in 4.1 or 4.0) DROP TABLE had a possible deadlock flaw in concur with FLUSH TABLES WITH READ LOCK. I call the fix for this problem "the 5.0 addendum fix". include/my_pthread.h: Bug#14397 - OPTIMIZE TABLE with an open HANDLER causes a crash Added a new macro for the 5.0 addendum fix. mysql-test/r/handler.result: Bug#14397 - OPTIMIZE TABLE with an open HANDLER causes a crash The test result. mysql-test/t/handler.test: Bug#14397 - OPTIMIZE TABLE with an open HANDLER causes a crash The test case. sql/lock.cc: Bug#14397 - OPTIMIZE TABLE with an open HANDLER causes a crash Changed a comment which did confuse me and which is not fully correct anymore after the 5.0 addendum fix. Added an assertion which would fire without the 5.0 addendum fix. sql/mysql_priv.h: Bug#14397 - OPTIMIZE TABLE with an open HANDLER causes a crash Changed a definition for the secondary fix. sql/sql_base.cc: Bug#14397 - OPTIMIZE TABLE with an open HANDLER causes a crash Changed function calls for the secondary fix. sql/sql_class.cc: Bug#14397 - OPTIMIZE TABLE with an open HANDLER causes a crash Changed a function call for the secondary fix. sql/sql_handler.cc: Bug#14397 - OPTIMIZE TABLE with an open HANDLER causes a crash The first two diffs make the primary bug fix. The rest is for the secondary fix. sql/sql_table.cc: Bug#14397 - OPTIMIZE TABLE with an open HANDLER causes a crash The first diff (four changed places) make the 5.0 addendum fix. The other three are changed function calls for the secondary fix.
-
- 14 Sep, 2005 1 commit
-
-
unknown authored
This bug occurs when some trigger for table used by DML statement is created or changed while statement was waiting in lock_tables(). In this situation prelocking set which we have calculated becames invalid which can easily lead to errors and even in some cases to crashes. With proposed patch we no longer silently reopen tables in lock_tables(), instead caller of lock_tables() becomes responsible for reopening tables and recalculation of prelocking set. mysql-test/t/trigger.test: Added tests for bug #12704 "Server crashes during trigger execution". Unfortunately these tests rely on the order in which tables are locked by statement so they are non-determenistic and therefore should be disabled. sql/lock.cc: mysql_lock_tables(): Now instead of always reopening altered or dropped tables by itself mysql_lock_tables() can notify upper level and rely on caller doing this. sql/mysql_priv.h: Now mysql_lock_tables() can either reopen deleted or altered tables by itself or notify caller about such situation through 'need_reopen' argument and rely on it in this. Also lock_tables() has new 'need_reopen' out parameter through which it notifies caller that some tables were altered or dropped so he needs to reopen them (and rebuild prelocking set some triggers may change or simply appear). sql/sp.cc: sp_add_used_routine(): To be able to restore LEX::sroutines_list to its state right after parsing we now adjust LEX::sroutines_list_own_last/sroutines_list_own_elements when we add directly used routine. sp_remove_not_own_routines(): Added procedure for restoring LEX::sroutines/sroutines_list to their state right after parsing (by throwing out non-directly used routines). sp_cache_routines_and_add_tables_for_view()/sp_update_stmt_used_routines(): We should use LEX::sroutines_list instead of LEX::sroutines as source of routines used by view, since LEX::sroutines is not availiable for view on second attempt to open it (see comment in open_tables() about it). sql/sp.h: sp_remove_not_own_routines(): Added procedure for restoring LEX::sroutines/sroutines_list to their state right after parsing (by throwing out non-directly used routines). sql/sp_head.cc: Removed assert which is no longer always true. sql/sql_base.cc: reopen_table(): When we re-open table and do shallow copy of TABLE object we should adjust pointers to it in associated Table_triggers_list object. Removed nil operation. open_tables(): Now this function is able to rebuild prelocking set for statement if it is needed. It also correctly handles FLUSH TABLES which may occur during its execution. lock_tables(): Instead of allowing mysql_lock_tables() to silently reopen altered or dropped tables let us notify caller and rely on that it will do reopen itself. This solves the problem when trigger suddenly appears or changed during mysq_lock_tables(). close_tables_for_reopen(): Added routine for properly preparing for reopening of tables and recalculation of set of prelocked tables. sql/sql_handler.cc: Here we let mysql_lock_tables() to reopen dropped or altered tables by itself. sql/sql_insert.cc: Here we let mysql_lock_tables() to reopen dropped or altered tables by itself. sql/sql_lex.cc: LEX: Added 'sroutines_list_own_last' and 'sroutines_list_own_elements' members which are used for keeping state in which 'sroutines_list' was right after statement parsing (and for restoring of this list to this state). sql/sql_lex.h: LEX: Added 'sroutines_list_own_last' and 'sroutines_list_own_elements' members which are used for keeping state in which 'sroutines_list' was right after statement parsing (and for restoring of this list to this state). Added chop_off_not_own_tables() method to simplify throwing away list of implicitly used (prelocked) tables. sql/sql_prepare.cc: Now instead of silently reopening altered or dropped tables in lock_tables() we notify caller and rely on that the caller will reopen tables. sql/sql_table.cc: Here we let mysql_lock_tables() to reopen dropped or altered tables by itself. sql/sql_trigger.cc: Added Table_triggers_list::set_table() method to adjust Table_triggers_list to new pointer to TABLE instance. sql/sql_trigger.h: Added Table_triggers_list::set_table() method to adjust Table_triggers_list to new pointer to TABLE instance. sql/sql_update.cc: Now instead of silently reopening altered or dropped tables in lock_tables() we notify caller and rely on that the caller will reopen tables.
-
- 11 Aug, 2005 1 commit
-
-
unknown authored
mysql-test/t/sp.test: Use --disable_parsing instead of comments sql/lock.cc: Remove compiler warning sql/mysqld.cc: Always send valid flag argument to reload_acl_and_cache() sql/sp_cache.cc: Simple optimization Don't use mutex to read 'long' variable Indentation fixes sql/sp_head.cc: Fix comments to use /* */ Set proc_info to 0 after close_thread_tables() sql/sql_base.cc: remove not needed test sql/sql_parse.cc: Always send valid flag argument to reload_acl_and_cache() Fixed indentation Ensure we get an error if reset_master() fails.
-
- 02 Aug, 2005 1 commit
-
-
unknown authored
Bug was introduced by cset 1.1659.14.1. Before it server was silently ignoring that lock can't be acquired because it already acquired. This patch makes make_global_read_lock_block_commit() return without error if lock already acquired. mysql-test/t/flush_table.test: Test case for bug#11934 FLUSH TABLES WITH READ LOCK hangs client. mysql-test/r/flush_table.result: Test case for bug#11934 FLUSH TABLES WITH READ LOCK hangs client. sql/lock.cc: Fix bug #11934 Two sequential FLUSH TABLES WITH READ LOCK hangs client. Make make_global_read_lock_block_commit() return without error if lock already acquired.
-
- 28 Jul, 2005 1 commit
-
-
unknown authored
mysql-test/r/func_group.result: Update results after merge (things moved around when aligning 4.1 and 5.0 tests) mysql-test/r/mysqldump.result: Update results after merge (things moved around when aligning 4.1 and 5.0 tests) mysql-test/r/ps_grant.result: Update results after merge (test moved to another file) mysql-test/t/mysqldump.test: Align with other lines sql/lock.cc: Removed compiler warning Fixed typo during merge
-
- 27 Jul, 2005 2 commits
-
-
unknown authored
Bug #12112
-
unknown authored
Change argument order to be database, tablename for some functions sql/lock.cc: Remove not needed block sql/mysql_priv.h: Change argument order to be database, tablename (like in most other functions) sql/sql_table.cc: Change argument order to be database, tablename (like in most other functions) Make 'flags' inline sql/table.cc: Change argument order to be database, tablename (like in most other functions) sql/unireg.cc: Change argument order to be database, tablename (like in most other functions)
-
- 26 Jul, 2005 1 commit
-
-
unknown authored
Fixed portability problem with bool in C programs Moved close_thread_tables out from LOCK_thread_count mutex (safety fix) my_sleep() -> pthread_cond_timedwait() include/thr_lock.h: bool -> my_bool (bool is not portable in C programs) mysys/thr_lock.c: bool -> my_bool (bool is not portable in C programs) sql/lock.cc: Added comment Don't use | on bool variable sql/mysql_priv.h: Added comment sql/slave.cc: Moved close_thread_tables out from LOCK_thread_count mutex (safety fix) sql/sql_base.cc: Added comments my_sleep() -> pthread_cond_timedwait() to get less code and potentitally faster loop BitKeeper/etc/ignore: added ac_available_languages_fragment
-
- 20 Jul, 2005 1 commit
-
-
unknown authored
sql/lock.cc: Used flags immediately in call sql/mysql_priv.h: Added RTFC (short for remove_table_from_cache) for constants and used hex syntax to clarify it is bits in the flags sql/sql_base.cc: Use flags parameter immediately and use flags immediately in call Change to other variant of eternal loop variant sql/sql_table.cc: Use flags immediately in call
-
- 19 Jul, 2005 1 commit
-
-
unknown authored
The idea of the patch is that every cursor gets its own lock id for table level locking. Thus cursors are protected from updates performed within the same connection. Additionally a list of transient (must be closed at commit) cursors is maintained and all transient cursors are closed when necessary. Lastly, this patch adds support for deadlock timeouts to TLL locking when using cursors. + post-review fixes. include/thr_lock.h: - add a notion of lock owner to table level locking. When using cursors, lock owner can not be identified by a thread id any more, as we must protect cursors from updates issued within the same connection (thread). So, each cursor has its own lock identifier to use with table level locking. - extend return values of thr_lock and thr_multi_lock with THR_LOCK_TIMEOUT and THR_LOCK_DEADLOCK, since these conditions are now possible (see comments to thr_lock.c) mysys/thr_lock.c: Better support for cursors: - use THR_LOCK_OWNER * as lock identifier, not pthread_t. - check and return an error for a trivial deadlock case, when an update statement is issued to a table locked by a cursor which has been previously opened in the same connection. - add support for locking timeouts: with use of cursors, trivial deadlocks can occur. For now the only remedy is the lock wait timeout, which is initialized from a new global variable 'table_lock_wait_timeout' Example of a deadlock (assuming the storage engine does not downgrade locks): con1: open cursor for select * from t1; con2: open cursor for select * from t2; con1: update t2 set id=id*2; -- blocked con2: update t1 set id=id*2; -- deadlock Lock timeouts are active only if a connection is using cursors. - the check in the wait_for_lock loop has been changed from data->cond != cond to data->cond != 0. data->cond is zeroed in every place it's changed. - added comments sql/examples/ha_archive.cc: - extend the handlerton with the info about cursor behaviour at commit. sql/examples/ha_archive.h: - ctor moved to .cc to make use of archive handlerton sql/examples/ha_example.cc: - add handlerton instance, init handler::ht with it sql/examples/ha_example.h: - ctor moved to .cc to make use of ha_example handlerton sql/examples/ha_tina.cc: - add handlerton instance, init handler::ht with it sql/examples/ha_tina.h: - ctor moved to .cc to make use of CSV handlerton sql/ha_berkeley.cc: - init handlerton::flags and handler::ht sql/ha_berkeley.h: - ctor moved to .cc to make use of BerkeleyDB handlerton sql/ha_blackhole.cc: - add handlerton instance, init handler::ht with it sql/ha_blackhole.h: - ctor moved to .cc to make use of blackhole handlerton sql/ha_federated.cc: - add handlerton instance, init handler::ht with it sql/ha_federated.h: - ctor moved to .cc to make use of federated handlerton sql/ha_heap.cc: - add handlerton instance, init handler::ht with it sql/ha_heap.h: - ctor moved to .cc to make use of ha_heap handlerton sql/ha_innodb.cc: - init handlerton::flags and handler::ht of innobase storage engine sql/ha_innodb.h: - ctor moved to .cc to make use of archive handlerton sql/ha_myisam.cc: - add handlerton instance, init handler::ht with it sql/ha_myisam.h: - ctor moved to .cc to make use of MyISAM handlerton sql/ha_myisammrg.cc: - init handler::ht in the ctor sql/ha_myisammrg.h: - ctor moved to .cc to make use of MyISAM MERGE handlerton sql/ha_ndbcluster.cc: - init handlerton::flags and handler::ht sql/handler.cc: - drop support for ISAM storage engine, which was removed from 5.0 - close all "transient" cursors at COMMIT/ROLLBACK. A "transient" SQL level cursor is a cursor that uses tables that have a transaction- specific state. sql/handler.h: - extend struct handlerton with flags, add handlerton *ht to every handler instance. sql/lock.cc: - extend mysql_lock_tables to send error to the client if thr_multi_lock returns a timeout or a deadlock error. sql/mysqld.cc: - add server option --table_lock_wait_timeout (in seconds) sql/set_var.cc: - add new global variable 'table_lock_wait_timeout' to specify a wait timeout for table-level locks of MySQL (in seconds). The default timeout is 50 seconds. The timeout is active only if the connection has open cursors. sql/sql_class.cc: - implement Statement_map::close_transient_cursors - safety suggests that we need an assert ensuring llock_info->n_cursors is functioning properly, adjust destruction of the Statement_map to allow such assert in THD::~THD sql/sql_class.h: - add support for Cursors registry to Statement map. sql/sql_prepare.cc: - maintain a list of cursors that must be closed at commit/rollback. sql/sql_select.cc: - extend class Cursor to support specific at-COMMIT/ROLLBACK behavior. If a cursor uses tables of a storage engine that invalidates all open tables at COMMIT/ROLLBACK, it must be closed before COMMIT/ROLLBACK is executed. sql/sql_select.h: - add an own lock_id and commit/rollback status flag to class Cursor tests/mysql_client_test.c: A test case for Bug#10760 and complementary issues: test a simple deadlock case too. mysql-test/var: New BitKeeper file ``mysql-test/var''
-
- 18 Jul, 2005 1 commit
-
-
unknown authored
remove_table_from_cache fails to signal other thread and gets blocked when other thread also gets blocked include/thr_lock.h: Report if any threads was signalled mysys/thr_lock.c: Report if any threads was signalled sql/lock.cc: Report if any threads was signalled Use new interface for remove_table_from_cache sql/mysql_priv.h: New interface for remove_table_from_cache + mysql_lock_abort_for_thread sql/sql_base.cc: Use new interface of remove_table_cache Rewrote remove_table_from_cache to fix bug sql/sql_table.cc: Use new interface of remove_table_from_cache
-
- 13 Jul, 2005 1 commit
-
-
unknown authored
of stored routines definitions even if we already have some tables open and locked. To avoid deadlocks in this case we have to put certain restrictions on locking of mysql.proc table. This allows to use stored routines safely under LOCK TABLES without explicitly mentioning mysql.proc in the list of locked tables. It also fixes bug #11554 "Server crashes on statement indirectly using non-cached function". mysql-test/r/sp-error.result: Added test which checks that now we can read stored routines definitions under LOCK TABLES even if we have not locked mysql.proc explicitly. Also added check for restrictions which this ability puts on mysql.proc locking. Updated test for bug #9566 to correspond this new situation. mysql-test/r/sp-threads.result: Added test for bug #11554 "Server crashes on statement indirectly using non-cached function". mysql-test/t/sp-error.test: Added test which checks that now we can read stored routines definitions under LOCK TABLES even if we have not locked mysql.proc explicitly. Also added check for restrictions which this ability puts on mysql.proc locking. Updated test for bug #9566 to correspond this new situation. mysql-test/t/sp-threads.test: Added test for bug #11554 "Server crashes on statement indirectly using non-cached function". sql/lock.cc: get_lock_data(): To be able to open and lock for reading system tables like 'mysql.proc', when we already have some tables opened and locked, and avoid deadlocks we have to disallow write-locking of these tables with any other tables. sql/mysql_priv.h: open_table() has new parameter which allows to open table even if some-one has done a flush or holding namelock on it. sql/share/errmsg.txt: Added error message saying that one cannot write-lock some of system tables with any other tables. sql/sp.cc: open_proc_table_for_read()/close_proc_table(): Added functions to be able open and close mysql.proc table when we already have some tables open and locked. open_proc_table_for_update(): Added function to simplify opening of mysql.proc for updates. db_find_routine_aux()/db_find_routine()/db_update_routine()/... Moved responsibility for opening mysql.proc table from db_find_routine_aux() one level up, since this level knows better which type of table access for reading of for update it needs. sp_function_exists(): Removed unused function. sql/sp.h: sp_function_exists(): Removed unused function. sql/sql_base.cc: open_table(): Added new parameter which allows to open table even if some-one has done a flush or holding namelock on it. open_unireg_entry(): Mark 'mysql.proc' as a system table which has special restrictions on its locking, but thanks to them can be open and locked even if we already have some open and locked. sql/sql_class.cc: Moved THD members holding information about open and locked tables to separate Open_tables_state class to be able to save/restore this state easier. Added THD::push_open_tables_state()/pop_open_tables_state() methods for saving/restoring this state. sql/sql_class.h: Moved THD members holding information about open and locked tables to separate Open_tables_state class to be able to save/restore this state easier. Added THD::push_open_tables_state()/pop_open_tables_state() methods for saving/restoring this state. sql/sql_lex.cc: Removed LEX::proc_table member which was not really used. sql/sql_lex.h: Removed LEX::proc_table member which was not really used. sql/sql_table.cc: open_table() has new parameter which allows to open table even if some-one has done a flush or holding namelock on it. sql/table.h: Added TABLE_SHARE::system_table indicating that this table is system table like 'mysql.proc' and we want to be able to open and read-lock it even when we already have some tables open and locked (and because of this we have to put some restrictions on write locking it).
-
- 31 May, 2005 1 commit
-
-
unknown authored
1.) Added a new option to mysql_lock_tables() for ignoring FLUSH TABLES. Used the new option in create_table_from_items(). It is necessary to prevent the SELECT table from being reopend. It would get new storage assigned for its fields, while the SELECT part of the command would still use the old (freed) storage. 2.) Protected the CREATE TABLE and CREATE TABLE ... SELECT commands against a global read lock. This prevents a deadlock in CREATE TABLE ... SELECT in conjunction with FLUSH TABLES WITH READ LOCK and avoids the creation of new tables during a global read lock. 3.) Replaced set_protect_against_global_read_lock() and unset_protect_against_global_read_lock() by wait_if_global_read_lock() and start_waiting_global_read_lock() in the INSERT DELAYED handling. mysql-test/r/create.result: Bug#10224 - ANALYZE TABLE crashing with simultaneous CREATE ... SELECT statement. Added test results. mysql-test/t/create.test: Bug#10224 - ANALYZE TABLE crashing with simultaneous CREATE ... SELECT statement. Added tests which do not require concurrency. sql/lock.cc: Bug#10224 - ANALYZE TABLE crashing with simultaneous CREATE ... SELECT statement. Added a new option to mysql_lock_tables() for ignoring FLUSH TABLES. Changed the parameter list. Removed two unnecessary functions. Their functionality is included in wait_if_global_read_lock() and start_waiting_global_read_lock(). sql/mysql_priv.h: Bug#10224 - ANALYZE TABLE crashing with simultaneous CREATE ... SELECT statement. Changed the declaration of mysql_lock_tables(). Added definitions for the new options. sql/sql_acl.cc: Bug#10224 - ANALYZE TABLE crashing with simultaneous CREATE ... SELECT statement. Adjusted mysql_lock_tables() calls to the new argument list. sql/sql_base.cc: Bug#10224 - ANALYZE TABLE crashing with simultaneous CREATE ... SELECT statement. Adjusted mysql_lock_tables() calls to the new argument list. sql/sql_handler.cc: Bug#10224 - ANALYZE TABLE crashing with simultaneous CREATE ... SELECT statement. Adjusted mysql_lock_tables() calls to the new argument list. sql/sql_insert.cc: Bug#10224 - ANALYZE TABLE crashing with simultaneous CREATE ... SELECT statement. Replaced set_protect_against_global_read_lock() and unset_protect_against_global_read_lock() by wait_if_global_read_lock() and start_waiting_global_read_lock() in the INSERT DELAYED handling. Adjusted mysql_lock_tables() calls to the new argument list. sql/sql_parse.cc: Bug#10224 - ANALYZE TABLE crashing with simultaneous CREATE ... SELECT statement. Protected the CREATE TABLE and CREATE TABLE ... SELECT commands against a global read lock. This prevents a deadlock in CREATE TABLE ... SELECT in conjunction with FLUSH TABLES WITH READ LOCK and avoids the creation of new tables during a global read lock. sql/sql_table.cc: Bug#10224 - ANALYZE TABLE crashing with simultaneous CREATE ... SELECT statement. Adjusted mysql_lock_tables() calls to the new argument list. Used the new option in create_table_from_items().
-
- 07 May, 2005 1 commit
-
-
unknown authored
Fixed clear issues of bitvector and memory allocation issues sql/bitvector.cc: Made bitvector memroot class sql/bitvector.h: Made bitvector memroot class sql/handler.cc: Need to add updated fields to read set to ensure that they are updated since the update code doesn't update if records haven't changed Added DBUG printout's sql/handler.h: Moved clear of bitvector's to reset function Introduced ha_reset for this purpose to ensure that it isn't necessary to perform this clear in all handlers. sql/lock.cc: Removed clear that has been moved to ha_reset sql/opt_range.cc: Changed reset to ha_reset Added delete file sql/sql_base.cc: Removed clear and changed reset to ha_reset sql/sql_insert.cc: Removed clear and changed reset to ha_reset sql/sql_select.cc: Made sure delete file is done if needed sql/sql_table.cc: Added delete file in another place needed sql/sql_update.cc: Bug for multi-update fixed
-
- 28 Apr, 2005 1 commit
-
-
unknown authored
to read and write Changed Server code, added new interface to handler and changed the NDB handler, InnoDB handler and Federated handler that previously used query_id Bug#10202 fix (one-liner fix for memory leak) mysys/my_bitmap.c: Debug code sql/field.cc: Initialise fieldnr to 0 if not set anywhere else sql/field.h: Introduce a fieldnr (first field = 1 and last = table->s->fields in field object to be able to quickly set appropriate bit in read/write set sql/ha_federated.cc: Changed federated handler to use write set instead of query_id sql/ha_innodb.cc: Changed InnoDB handler to use write set instead of query_id sql/ha_ndbcluster.cc: Changed NDB handler to use write set instead of query_id sql/ha_ndbcluster.h: Changed NDB handler to use write set instead of query_id sql/handler.cc: Allocate read_set and write_set either in get_new_handler or in special routine Routines used at destruction of handler object plus routine to set all primary key fields in read_set sql/handler.h: bool to keep track if read/write set allocated or not in handler Deallocate read/write set at delete of handler object New bitmap's for read/write set sql/item.cc: Set bits in read or write set (set_query_id = 2 => write_set set_query_id = 1 => read_set sql/lock.cc: Clear bit set when starting a new statement in external lock sql/mysql_priv.h: changed set_query_id from bool to ulong sql/opt_range.cc: Set primary key read set in all places where HA_EXTRA_RETRIEVE_PRIMARY_KEY is used sql/sql_acl.cc: set all bits in read set all places where HA_EXTRA_RETRIEVE_ALL_COLS are used sql/sql_base.cc: Clear all bits before start new statement when table locked already Set bit in read/write set dependent on set_query_id and fieldnr bool -> ulong for set_query_id set all bits in read set for SELECT * queries where table is not view sql/sql_class.h: Added comments + changed type of set_query_id sql/sql_insert.cc: Use 2 when setup_fields called for fields to updated in UPDATE and INSERT statements set primary key fields when EXTRA param used sql/sql_load.cc: Set all bits in write set if no fields specified in LOAD DATA FROM INFILE Otherwise use 2 to set specific fields to be updated by LOAD DATA... sql/sql_select.cc: Set primary key read set when EXTRA param specified Set fieldnr for temporary tables Set number of fields before calling get_new_handler and only set all bits if there at least one field in table sql/sql_table.cc: Set all bits in read set for old table and all bits in write set for new table for ALTER TABLE copy method Set all bits in read set when EXTRA param used sql/sql_udf.cc: Set all bits in read set when EXTRA param used sql/sql_update.cc: Set fields to UPDATE to use 2 for set_query_id Set all bits in read set when EXTRA param used sql/table.cc: Set fieldnr in openfrm Reallocate read/write set in openfrm since table->s->fields==0 at call to get_new_handler sql/unireg.cc: Fix Bug #10202
-
- 27 Apr, 2005 3 commits
-
-
unknown authored
After merge fix.
-
unknown authored
Added protection against global read lock while creating and initializing a delayed insert handler. Allowed to ignore a global read lock when locking the table inside the delayed insert handler. Added some minor improvements. sql/lock.cc: Bug#7823 - FLUSH TABLES WITH READ LOCK + INSERT DELAYED = deadlock Changed mysql_lock_tables() to allow for ignoring global read lock. Added functions to set/unset protection against global read lock. sql/mysql_priv.h: Bug#7823 - FLUSH TABLES WITH READ LOCK + INSERT DELAYED = deadlock Changed existing and added new function declarations. sql/sql_insert.cc: Bug#7823 - FLUSH TABLES WITH READ LOCK + INSERT DELAYED = deadlock Added and extended some comments. Added a protection against global read lock while a handler is created and initialized. Moved the unlock of the delayed insert object past its last usage in delayed_get_table(). Changed the table locking in handle_delayed_insert() so that it does not wait for global read lock.
-
unknown authored
config/ac-macros/ha_berkeley.m4: change for stroage config/ac-macros/ha_innodb.m4: change for storage config/ac-macros/ha_ndbcluster.m4: change for storage configure.in: change for storage extra/perror.c: change for storage libmysqld/Makefile.am: change for storage mysql-test/mysql-test-run.sh: change for storage sql/Makefile.am: change for storage sql/ha_innodb.cc: change storage sql/ha_myisam.cc: change for storage sql/ha_myisammrg.cc: change for storage sql/lock.cc: change for storage sql/sql_cache.cc: change for storage storage/heap/Makefile.am: change for storage storage/innobase/include/Makefile.i: change for storage storage/myisammrg/myrg_def.h: change for storage storage/ndb/Makefile.am: change for storage storage/ndb/config/common.mk.am: change for storage storage/ndb/config/type_kernel.mk.am: change for storage storage/ndb/config/type_mgmapiclient.mk.am: change for storage storage/ndb/config/type_ndbapi.mk.am: change for storage storage/ndb/config/type_ndbapiclient.mk.am: change for storage storage/ndb/config/type_ndbapitest.mk.am: change for storage storage/ndb/config/type_ndbapitools.mk.am: change for storage storage/ndb/config/type_util.mk.am: change for storage storage/ndb/docs/Makefile.am: change for storage storage/ndb/include/Makefile.am: change for storage storage/ndb/src/Makefile.am: change for storage storage/ndb/src/common/debugger/Makefile.am: change for storage storage/ndb/src/common/debugger/signaldata/Makefile.am: change for storage storage/ndb/src/common/logger/Makefile.am: change for storage storage/ndb/src/common/mgmcommon/Makefile.am: change for storage storage/ndb/src/common/portlib/Makefile.am: change for storage storage/ndb/src/common/transporter/Makefile.am: change for storage storage/ndb/src/common/util/Makefile.am: change for storage storage/ndb/src/cw/cpcd/Makefile.am: change for storage storage/ndb/src/kernel/Makefile.am: change for storage storage/ndb/src/kernel/blocks/backup/Makefile.am: change for storage storage/ndb/src/kernel/blocks/cmvmi/Makefile.am: change for storage storage/ndb/src/kernel/blocks/dbacc/Makefile.am: change for storage storage/ndb/src/kernel/blocks/dbdict/Makefile.am: change for storage storage/ndb/src/kernel/blocks/dbdih/Makefile.am: change for storage storage/ndb/src/kernel/blocks/dblqh/Makefile.am: change for storage storage/ndb/src/kernel/blocks/dbtc/Makefile.am: change for storage storage/ndb/src/kernel/blocks/dbtup/Makefile.am: change for storage storage/ndb/src/kernel/blocks/dbtux/Makefile.am: change for storage storage/ndb/src/kernel/blocks/dbutil/Makefile.am: change for storage storage/ndb/src/kernel/blocks/grep/Makefile.am: change for storage storage/ndb/src/kernel/blocks/ndbcntr/Makefile.am: change for storage storage/ndb/src/kernel/blocks/ndbfs/Makefile.am: change for storage storage/ndb/src/kernel/blocks/qmgr/Makefile.am: change for storage storage/ndb/src/kernel/blocks/suma/Makefile.am: change for storage storage/ndb/src/kernel/blocks/trix/Makefile.am: change for storage storage/ndb/src/kernel/error/Makefile.am: change for storage storage/ndb/src/kernel/vm/Makefile.am: change for storage storage/ndb/src/mgmapi/Makefile.am: change for storage storage/ndb/src/mgmclient/Makefile.am: change for storage storage/ndb/src/mgmsrv/Makefile.am: change for storage storage/ndb/src/ndbapi/Makefile.am: change for storage storage/ndb/test/ndbapi/Makefile.am: change for storage storage/ndb/test/ndbapi/bank/Makefile.am: change for storage storage/ndb/test/run-test/Makefile.am: change for storage storage/ndb/test/src/Makefile.am: Change for storage storage/ndb/test/tools/Makefile.am: Change for storage storage/ndb/tools/Makefile.am: Change for storage
-
- 03 Apr, 2005 1 commit
-
-
unknown authored
minor cleanups XA tests include/m_ctype.h: minor cleanup sql/field.cc: minor cleanup sql/handler.cc: XID SQL syntax sql/handler.h: XID SQL syntax sql/item_sum.h: minor cleanup sql/lock.cc: comments sql/sql_class.cc: minor cleanup sql/sql_lex.h: XID SQL syntax sql/sql_parse.cc: XID SQL syntax sql/sql_yacc.yy: XID SQL syntax cleanups
-
- 16 Mar, 2005 2 commits
-
-
unknown authored
Removed some optional arguments Fixed portability problem in federated tests client/sql_string.cc: update from sql/sql_string.cc client/sql_string.h: update from sql/sql_string.h mysql-test/r/federated.result: Fixed error message sql/field.cc: Cleanup during review Remove const in 'const unsigned int' sql/field.h: Remove const in 'const unsigned int' sql/ha_federated.cc: Better error string. Add missing argument to error (before 'errno' was picked up from stack) sql/handler.cc: Removed compiler warning sql/item_func.cc: Cleanup during review sql/item_sum.cc: Cleanup during review sql/lock.cc: Remove optional arguments sql/log_event.cc: Remove optional arguments sql/mysql_priv.h: Remove optional arguments cahnge preapre_create_fields to use pointers instead of references sql/opt_range.cc: Fix arguments so that return value is last sql/sql_base.cc: Remove optional arguments sql/sql_delete.cc: Remove optional arguments sql/sql_error.cc: Remove optional arguments sql/sql_help.cc: Remove optional arguments sql/sql_parse.cc: Remove optional arguments sql/sql_prepare.cc: Remove optional arguments sql/sql_rename.cc: Remove optional arguments sql/sql_select.cc: Remove optional arguments sql/sql_show.cc: Cleanup during review sql/sql_string.cc: Simple optimization sql/sql_table.cc: Remove optional arguments Fixed indentation sql/sql_update.cc: Remove optional arguments sql/sql_yacc.yy: Change references to pointers
-
unknown authored
(otherwise a deadlock when ALTER writes to binlog holding LOCK_open, it causes binlog rotation, binlog waits for prepared transactions to commit, and commit needs LOCK_open to check for global read lock) mysql-test/r/flush.result: global read lock code now uses a dedicated mutex mysql-test/t/flush.test: global read lock code now uses a dedicated mutex sql/lock.cc: global read lock code now uses a dedicated mutex sql/mysql_priv.h: global read lock code now uses a dedicated mutex sql/mysqld.cc: global read lock code now uses a dedicated mutex sql/sql_table.cc: global read lock code now uses a dedicated mutex
-