- 02 Aug, 2007 4 commits
-
-
unknown authored
Moved duplicated code to inline function store_timestamp() Save thd->time_zone_used when logging to table as CSV internally cases it to be changed Added MYSQL_LOCK_IGNORE_FLUSH to log tables to avoid deadlock in case of flush tables. Mark log tables with TIMESTAMP_NO_AUTO_SET to avoid automatic timestamping Set TABLE->no_replicate on open client/mysqlbinlog.cc: Fixed several memory leaks (most in case of error situations) mysql-test/r/events_logs_tests.result: Made long_query_timeout smaller to ensure next query comes into log mysql-test/r/variables.result: Make it safe to run test with --log mysql-test/t/events_logs_tests.test: Made long_query_timeout smaller to ensure next query comes into log mysql-test/t/variables.test: Make it safe to run test with --log sql/field.cc: Moved duplicated code to inline function store_timestamp() sql/field.h: Moved duplicated code to inline function store_timestamp() sql/handler.cc: Reorder checks in likely order Simplify checks if we should do binary logging (no_replicate is set once and for all when table is opened) sql/log.cc: Save thd->time_zone_used as CVS internally cases it to be changed Use Field_timestamp->store_timestamp instead of automatic timestamps. This gives us correct timestamp even if thd->set_time() is not called (in case of connect) and we don't have to store thd->query_start_used anymore. sql/sql_base.cc: Removed not needed comment Moved LINT_INIT() to after declaration Renamed temporary variable to avoid compiler warning Added MYSQL_LOCK_IGNORE_FLUSH to log tables to avoid deadlock in case of flush tables. Mark log tables with TIMESTAMP_NO_AUTO_SET to avoid automatic timestamping sql/table.cc: Set TABLE->no_replicate on open
-
unknown authored
Added back setting of 'some_tables_deleted' to not cause deadlocks in mysql_lock_table() BitKeeper/etc/ignore: added tests/bug25714 sql/lock.cc: Added comment sql/log.cc: Don't save & restore time fields from thd when it's not needed. Fix that we properly detect if open table failed sql/sql_base.cc: Added back setting of 'some_tables_deleted' to not cause deadlocks in mysql_lock_table()
-
unknown authored
into mysql.com:/home/my/mysql-5.1 client/client_priv.h: Auto merged client/mysqldump.c: Auto merged client/mysqlslap.c: Auto merged mysql-test/mysql-test-run.pl: Auto merged mysql-test/lib/mtr_report.pl: Auto merged mysql-test/t/disabled.def: Auto merged sql/event_data_objects.cc: Auto merged sql/event_queue.cc: Auto merged sql/ha_partition.cc: Auto merged sql/lock.cc: Auto merged sql/log.cc: Auto merged sql/log.h: Auto merged sql/mysql_priv.h: Auto merged sql/set_var.cc: Auto merged sql/slave.cc: Auto merged sql/sql_class.cc: Auto merged sql/sql_class.h: Auto merged sql/sql_insert.cc: Auto merged sql/sql_parse.cc: Auto merged sql/sql_plugin.cc: Auto merged sql/sql_select.cc: Auto merged sql-common/client.c: Auto merged sql/sql_show.cc: Auto merged sql/sql_table.cc: Auto merged sql/sql_cache.cc: Manual merge Removed comment about bug in old code (not relevant)
-
unknown authored
Fixed bug in query cache that made it impossible to run mysqld with --debug Fixed memory leaks in mysqldump and mysqltest Memory leaks associated with wrong usage of mysqltest is not fixed. To find these, run mysql-test-run --debug mysqltest client/mysql_upgrade.c: Set --debug-check if one uses DBUG_PUSH client/mysqlcheck.c: Set --debug-check if one uses DBUG_PUSH client/mysqldump.c: Set --debug-check if one uses DBUG_PUSH Fixed several memory leaks client/mysqlimport.c: Set --debug-check if one uses DBUG_PUSH client/mysqlshow.c: Set --debug-check if one uses DBUG_PUSH client/mysqlslap.c: Set --debug-check if one uses DBUG_PUSH client/mysqltest.c: Set --debug-check if one uses DBUG_PUSH Fixed some memory leaks Removed MY_CHECK_ERROR argument to my_end() as mysqltest.test otherwise shows MANY memory leaks dbug/dbug.c: Fixed compiler warning Force flush of out_file on end Removed some wrong dbug_flush(0) commands that could cause crashes mysys/my_init.c: Don't write memory usage if MY_GIVE_INFO is not given sql/sql_cache.cc: Fixed bug in query cache that made it impossible to run mysqld with --debug
-
- 01 Aug, 2007 5 commits
-
-
unknown authored
Fixed compiler warnings, errors and link errors Fixed new bug on Solaris with gethrtime() Added --debug-check option to all mysql clients to print errors and memory leaks Added --debug-info to all clients. This now works as --debug-check but also prints memory and cpu usage BUILD/compile-solaris-sparc-debug: Remove old cpu options client/client_priv.h: Added OPT_DBUG_CHECK client/mysql.cc: --debug-info now prints memory usage Added --debug-check client/mysql_upgrade.c: --debug-info now prints memory usage Added --debug-check client/mysqladmin.cc: --debug-info now prints memory usage Added --debug-check client/mysqlbinlog.cc: --debug-info now prints memory usage Added --debug-check client/mysqlcheck.c: --debug-info now prints memory usage Added --debug-check client/mysqldump.c: --debug-info now prints memory usage Added --debug-check client/mysqlimport.c: --debug-info now prints memory usage Added --debug-check client/mysqlshow.c: --debug-info now prints memory usage Added --debug-check client/mysqlslap.c: --debug-info now prints memory usage Added --debug-check client/mysqltest.c: --debug-info now prints memory usage Added --debug-check include/my_sys.h: Added extra option to TERMINATE to not print statistics libmysql/libmysql.c: Fixed compiler warning mysql-test/mysql-test-run.pl: --debug-info -> --debug-check to not print memory usage mysys/my_getsystime.c: Moved fast time calculation to my_micro_time_and_time() Fixed bug in previous push related to HAVE_GETHRTIME mysys/my_init.c: Print not freed memory in my_end() if MY_CHECK_ERROR is given mysys/my_static.c: Cleanup mysys/safemalloc.c: Added extra option to TERMINATE to not print statistics sql/item_xmlfunc.cc: Fixed compiler warning sql/sql_test.cc: Fixed TERMINATE() call unittest/mysys/base64-t.c: Fixed link error unittest/mysys/bitmap-t.c: Fixed link error unittest/mysys/my_atomic-t.c: Fixed link error
-
unknown authored
sql/sql_class.cc: Fix a valgrind warning (row_count_func is used before it was initialized in SQLCOM_CALL)
-
unknown authored
mysql-test/r/log_tables.result: Update results. mysql-test/t/log_tables.test: Silence a race condition: TRUNCATE code issues mysql_frm_type without a metadata lock, and finds no table if hits the moment when ALTER is swapping two tables.
-
unknown authored
into bodhi.(none):/opt/local/work/mysql-5.1-runtime client/mysqldump.c: Auto merged mysql-test/r/func_time.result: Auto merged mysql-test/r/mysqldump.result: Auto merged mysql-test/t/func_time.test: Auto merged sql/sql_base.cc: Auto merged sql/sql_table.cc: Auto merged sql/table.cc: Auto merged mysql-test/include/mix1.inc: Manual merge. mysql-test/r/innodb_mysql.result: Manual merge.
-
unknown authored
mysql-test/r/func_time.result: Update results (use fixed datetime values instead of NOW()). mysql-test/t/func_time.test: Use fixed datetime values instead of NOW(): the test would have a sporadic failure when current day changed between two consequtive calls to NOW(). The test actually tests FROM_DAYS/TO_DAYS functions, so use of NOW() is not necessary.
-
- 31 Jul, 2007 6 commits
-
-
unknown authored
into bodhi.(none):/opt/local/work/mysql-5.1-runtime client/mysqldump.c: Auto merged mysql-test/r/mysqldump.result: Auto merged mysql-test/t/disabled.def: Auto merged mysql-test/t/mysqldump.test: Auto merged sql/handler.cc: Auto merged sql/lock.cc: Auto merged sql/sql_base.cc: Auto merged sql/sql_lex.cc: Auto merged sql/sql_parse.cc: Auto merged sql/sql_table.cc: Auto merged sql/table.cc: Auto merged sql/table.h: Auto merged mysql-test/include/mix1.inc: Manual merge. mysql-test/r/innodb_mysql.result: Manual merge.
-
unknown authored
sql/sql_base.cc: Fix an incorrect manual merge.
-
unknown authored
into bodhi.(none):/opt/local/work/mysql-5.0-runtime client/mysqldump.c: Auto merged mysql-test/r/mysqldump.result: Auto merged sql/sql_base.cc: Auto merged sql/table.cc: Auto merged mysql-test/r/innodb_mysql.result: Manual merge. mysql-test/t/innodb_mysql.test: Manual merge. sql/sql_table.cc: Manual merge.
-
unknown authored
into bodhi.(none):/opt/local/work/mysql-5.1-runtime sql/mysql_priv.h: Auto merged sql/sql_class.h: Auto merged sql/sql_lex.cc: Auto merged mysql-test/include/mix1.inc: Manual merge. mysql-test/r/innodb_mysql.result: Manual merge. sql/handler.h: Manual merge. sql/lock.cc: Manual merge. sql/opt_range.cc: Manual merge. sql/sql_base.cc: Manual merge. sql/sql_table.cc: Manual merge.
-
unknown authored
into weblab.(none):/home/marcsql/TREE/mysql-5.1-cleanup sql/log.cc: Auto merged
-
unknown authored
-
- 30 Jul, 2007 7 commits
-
-
unknown authored
into janus.mylan:/usr/home/serg/Abk/mysql-5.1
-
unknown authored
existing table->no_replicate code is used instead
-
unknown authored
-
unknown authored
sql/handler.h: Fix a warning.
-
unknown authored
mysql-test/r/ddl_i18n_koi8r.result: Update result file. mysql-test/r/ddl_i18n_utf8.result: Update result file.
-
unknown authored
--long-query-time is now given in seconds with microseconds as decimals --min_examined_row_limit added for slow query log long_query_time user variable is now double with 6 decimals Added functions to get time in microseconds Added faster time() functions for system that has gethrtime() (Solaris) We now do less time() calls. Added field->in_read_set() and field->in_write_set() for easier field manipulation by handlers set_var.cc and my_getopt() can now handle DOUBLE variables. All time() calls changed to my_time() my_time() now does retry's if time() call fails. Added debug function for stopping in mysql_admin_table() when tables are locked Some trivial function and struct variable renames to avoid merge errors. Fixed compiler warnings Initialization of some time variables on windows moved to my_init() include/my_getopt.h: Added support for double arguments include/my_sys.h: Fixed wrong type to packfrm() Added new my_time functions include/mysql/plugin.h: Added support for DOUBLE libmysql/CMakeLists.txt: Added new time functions libmysql/Makefile.shared: Added new time functions mysql-test/r/variables.result: Testing of long_query_time mysql-test/t/variables.test: Testing of long_query_time mysys/charset.c: Fixed compiler warnings mysys/default_modify.c: Fixed compiler warnings mysys/hash.c: Fixed compiler warnings mysys/mf_getdate.c: Use my_time() mysys/mf_iocache2.c: Fixed compiler warnings mysys/mf_pack.c: Fixed compiler warnings mysys/mf_path.c: Fixed compiler warnings mysys/my_append.c: Fixed compiler warnings mysys/my_compress.c: Fixed compiler warnings mysys/my_copy.c: Fixed compiler warnings mysys/my_gethwaddr.c: Fixed compiler warnings mysys/my_getopt.c: Added support for double arguments mysys/my_getsystime.c: Added functions to get time in microseconds. Added faster time() functions for system that has gethrtime() (Solaris) Moved windows initialization code to my_init() mysys/my_init.c: Added initializing of variables needed for windows time functions mysys/my_static.c: Added variables needed for windows time functions mysys/my_static.h: Added variables needed for windows time functions mysys/my_thr_init.c: Added THR_LOCK_time, used for faster my_time() mysys/mysys_priv.h: Added THR_LOCK_time, used for faster my_time() mysys/thr_alarm.c: time() -> my_time() sql/event_data_objects.cc: end_time() -> set_current_time() sql/event_queue.cc: end_time() -> set_current_time() sql/event_scheduler.cc: Fixed compiler warnings sql/field.h: Added field->in_read_set() and field->in_write_set() for easier field manipulation by handlers sql/item.h: Added decimal to Item_float(double) sql/item_cmpfunc.h: Added decimal to Item_float(double) sql/item_timefunc.cc: time() -> my_time() sql/item_xmlfunc.cc: Fixed compiler warning sql/lock.cc: lock_time() -> set_time_after_lock() sql/log.cc: Timing in slow query log to file is now done in microseconds Changed some while() loops to for() loops. Fixed indentation time() -> my_time() sql/log.h: Slow query logging is now done based on microseconds sql/log_event.cc: time() -> my_time() Fixed arguments to new Item_float() sql/mysql_priv.h: Fixed compiler warnings Added opt_log_slow_slave_statements sql/mysqld.cc: Added --log_slow_slave_statements and --min_examined_row_limit --long-query-time now takes a double argument with microsecond resolution Don't write shutdown message when using --help Removed not needed \n Thread create time and connect time is now done in microseconds time() -> my_time() Avoid some time() calls sql/net_serv.cc: Fixed compiler warnings sql/parse_file.cc: time() -> my_time() sql/set_var.cc: Added support for DOUBLE variables Added support for variables that are given in seconds with microsecond resolution sql/set_var.h: Added support for variables that are given in seconds with microsecond resolution sql/slave.cc: Allow logging of slave queries to slow query log if 'opt_log_slow_slave_statements' is given time() -> my_time() sql/sql_cache.h: Fixed compiler warning() sql/sql_class.cc: Initialize new THD variables sql/sql_class.h: long_query_time is now in microseconds Added min_examined_row_limit Reordered some THD elements for higher efficency Added timers in microseconds (connect_utime, thr_create_utime, start_utime and utime_after_lock) Start of query is now recorded both in seconds and in microseconds. Following renames was made for more clarity and avoid merge problems from earlier versions: connect_time -> connect_utime thr_create_time -> thr_create_utime end_time() -> set_current_time() lock_time() -> set_time_after_lock() Added THD::start_utime, which is start of query in microseconds from some arbitary time Added function THD::current_utime() Removed safe_time() as retry's are handled in my_time() sql/sql_connect.cc: User resources are now using microsecond resolution sql/sql_insert.cc: end_time() -> set_current_time() sql-common/client.c: time() -> my_time() sql/sql_parse.cc: Testing if we should print to slow_query_log() is now done with microsecond precission. If min_examined_row_limit is given, only log queries to slow query log that has examined more rows than this. sql/sql_select.cc: Simplify code now that Item_float() takes decimals as argument sql/sql_show.cc: time() -> my_time() Added support for SYS_DOUBLE sql/sql_table.cc: Added debug function for stopping in mysql_admin_table() when tables are locked sql/structs.h: intime -> reset_utime
-
unknown authored
Reorder structure elements to make structures smaller and faster on 64 bit systems This is a first step in cleaning up the client include files (but should be enough to allow us to do future fixes without breaking the library) This change is part of WL#2872, Make client library extensible. configure.in: Increased shared library version of client library Detect gethrtime (for future) include/mysql.h: Add 'extension' field to all structures to make them extensible Reorder structure elements to make structures smaller and faster on 64 bit systems Removed an old define that is not needed for MySQL 5.1 include/mysql_com.h: Add 'extension' field to all structures to make them extensible Reorder structure elements to make structures smaller and faster on 64 bit systems
-
- 29 Jul, 2007 3 commits
-
-
unknown authored
- Removed unused variable. sql/sql_lex.cc: - Removed unused variable
-
unknown authored
- Removed unused variable. sql/sql_lex.cc: - Removed unused variable
-
unknown authored
into adventure.(none):/home/thek/Development/cpp/mysql-5.1-runtime sql/table.cc: Auto merged sql/table.h: Auto merged
-
- 28 Jul, 2007 1 commit
-
-
unknown authored
into bk-internal.mysql.com:/data0/bk/mysql-5.1-arch
-
- 27 Jul, 2007 14 commits
-
-
unknown authored
-
unknown authored
into weblab.(none):/home/marcsql/TREE/mysql-5.1-25422-d client/mysqldump.c: Auto merged mysql-test/r/log_state.result: Auto merged mysql-test/r/show_check.result: Auto merged mysql-test/t/show_check.test: Auto merged sql/mysql_priv.h: Auto merged sql/share/errmsg.txt: Auto merged sql/sp.cc: Auto merged
-
unknown authored
-
unknown authored
-
unknown authored
into ibm.:/home/alik/Documents/MySQL/devel/5.1-rt-merge mysql-test/r/mysqldump-max.result: Auto merged mysql-test/r/openssl_1.result: Auto merged mysql-test/t/show_check.test: Auto merged sql/sp.cc: Auto merged sql/sql_yacc.yy: Auto merged client/mysqldump.c: Manual merge. mysql-test/r/mysqldump.result: Manual merge + use local.
-
unknown authored
mysql-test/r/mysqldump.result: Update result file.
-
unknown authored
into janus.mylan:/usr/home/serg/Abk/mysql-5.1
-
unknown authored
into adventure.(none):/home/thek/Development/cpp/mysql-5.0-runtime
-
unknown authored
into adventure.(none):/home/thek/Development/cpp/bug29929/my51-bug29929 mysql-test/r/sp-prelocking.result: Auto merged mysql-test/t/sp-prelocking.test: Auto merged sql/sql_lex.cc: Auto merged sql/table.cc: Auto merged sql/table.h: SCCS merged
-
unknown authored
When a table was explicitly locked with LOCK TABLES no associated tables from any related trigger on the subject table were locked. As a result of this the user could experience unexpected locking behavior and statement failures similar to "failed: 1100: Table'xx' was not locked with LOCK TABLES". This patch fixes this problem by making sure triggers are pre-loaded on any statement if the subject table was explicitly locked with LOCK TABLES. mysql-test/r/sp-prelocking.result: Added test case mysql-test/t/sp-prelocking.test: Added test case sql/sql_lex.cc: - Moved some conditional logic out of the table iteration. - Added event map values for LOCK TABLE command. sql/table.cc: - Refactored set_trg_event_tpye into the two simpler functions set_trg_event_map and set_trg_event_map as methods for manipulating the table event map. The original function was only called from st_lex::set_trg_event_type_for_tables so it was possible to move the event map creation logic to this function as a loop optimization. sql/table.h: - Refactored set_trg_event_tpye into the two simpler functions set_trg_event_map and set_trg_event_map as methods for manipulating the table event map. The original function was only called from st_lex::set_trg_event_type_for_tables so it was possible to move the event map creation logic to this function as a loop optimization.
-
unknown authored
mysqldump generates view defitions in two stages: - dump CREATE TABLE statements for the temporary tables. For each view a temporary table, that has the same structure as the view is created. - dump DROP TABLE statements for the temporary tables and CREATE VIEW statements for the view. This approach is required because views can have dependencies on each other (a view can use other views). So, they should be created in the particular order. mysqldump however is not smart enough, so in order to resolve dependencies it creates temporary tables first of all. The problem was that mysqldump might have generated incorrect dump for the temporary table when a view has non-ASCII column name. That happened when default-character-set is not utf8. The fix is to: 1. Switch character_set_client for the mysqldump's connection to binary before issuing SHOW FIELDS statement in order to avoid conversion. 2. Dump switch character_set_client statements to UTF8 and back for CREATE TABLE statement that is issued to create temporary table. client/mysqldump.c: 1. Switch character_set_results for mysqldump's connection to binary before SHOW FIELDS in order to avoid conversion to client character set. 2. Dump switch character_set_client statements to UTF8 and back for CREATE TABLE statement. mysql-test/r/mysqldump.result: Update result file. mysql-test/t/mysqldump.test: Test case for BUG#30027.
-
unknown authored
The problem was a race condition on shutdown -- when IM got shutdown request while a guarded mysqld is starting. In this case the Guardian thread tried to stop the mysqld, but might fail if the mysqld hadn't created pid-file so far. When this happened, the mysqld-monitor thread didn't stop, so the assert in Thread_registry happened. The fix is to make several attempts to stop mysqld if it is active. server-tools/instance-manager/guardian.cc: Try to stop mysqld several times if it is still active. server-tools/instance-manager/instance.cc: Make Instance::kill_mysqld() to return operation status. server-tools/instance-manager/instance.h: Make Instance::kill_mysqld() to return operation status. server-tools/instance-manager/thread_registry.cc: Log unregistered thread ids.
-
unknown authored
updated to keypart_map api storage/myisam/mi_test2.c: Bug #30094 mi_test_all: assertion failure updated to keypart_map api prefix char keys are not supported anymore
-
unknown authored
between perm and temp tables. Review fixes. The original bug report complains that if we locked a temporary table with LOCK TABLES statement, we would not leave LOCK TABLES mode when this temporary table is dropped. Additionally, the bug was escalated when it was discovered than when a temporary transactional table that was previously locked with LOCK TABLES statement was dropped, futher actions with this table, such as UNLOCK TABLES, would lead to a crash. The problem originates from incomplete support of transactional temporary tables. When we added calls to handler::store_lock()/handler::external_lock() to operations that work with such tables, we only covered the normal server code flow and did not cover LOCK TABLES mode. In LOCK TABLES mode, ::external_lock(LOCK) would sometimes be called without matching ::external_lock(UNLOCK), e.g. when a transactional temporary table was dropped. Additionally, this table would be left in the list of LOCKed TABLES. The patch aims to address this inadequacy. Now, whenever an instance of 'handler' is destroyed, we assert that it was priorly external_lock(UNLOCK)-ed. All the places that violate this assert were fixed. This patch introduces no changes in behavior -- the discrepancy in behavior will be fixed when we start calling ::store_lock()/::external_lock() for all tables, regardless whether they are transactional or not, temporary or not. mysql-test/r/innodb_mysql.result: Update test results (Bug#24918) mysql-test/t/innodb_mysql.test: Add a test case for Bug#24918 sql/handler.h: Make handler::external_lock() a protected method. Backport from 5.1 its public wrapper handler::ha_external_lock(). Assert that the handler is not closed if it is still locked. sql/lock.cc: In mysql_lock_tables only call lock_external() for the list of tables that we called store_lock() for. E.g. get_lock_data() does not add non-transactional temporary tables to the lock list, so lock_external() should not be called for them. Use handler::ha_external_lock() instead of handler::external_lock(). Add comments for mysql_lock_remove(), parameterize one strange side effect that it has. At least in one place where mysql_lock_remove is used, this side effect is not desired (DROP TABLE). The parameter will be dropped in 5.1, along with the side effect. sql/mysql_priv.h: Update declaration of mysql_lock_remove(). sql/opt_range.cc: Deploy handler::ha_external_lock() instead of handler::external_lock() sql/sql_base.cc: When closing a temporary table, remove the table from the list of LOCKed TABLES of this thread, in case it's there. It's there if it is a transactional temporary table. Use a new declaration of mysql_lock_remove(). sql/sql_class.h: Extend the comment for THD::temporary_tables. sql/sql_table.cc: Deploy handler::ha_external_lock() instead of handler::external_lock()
-