diff options
author | unknown <monty@mysql.com/nosik.monty.fi> | 2007-08-03 01:14:27 +0300 |
---|---|---|
committer | unknown <monty@mysql.com/nosik.monty.fi> | 2007-08-03 01:14:27 +0300 |
commit | 68a7f757df0f513d4ef489217b3d0199c7c3c0ce (patch) | |
tree | e484df98228dddbe77df4c8040131f1c053dc6f9 /mysql-test | |
parent | a640d3408810afdaf77eb6a5fb39274a70302401 (diff) | |
download | mariadb-git-68a7f757df0f513d4ef489217b3d0199c7c3c0ce.tar.gz |
Simplify logging code a bit (to make code smaller and faster)
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
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/r/events_logs_tests.result | 2 | ||||
-rw-r--r-- | mysql-test/r/variables.result | 1 | ||||
-rw-r--r-- | mysql-test/t/events_logs_tests.test | 2 | ||||
-rw-r--r-- | mysql-test/t/variables.test | 1 |
4 files changed, 4 insertions, 2 deletions
diff --git a/mysql-test/r/events_logs_tests.result b/mysql-test/r/events_logs_tests.result index 0d49060f4a9..b69a02c9819 100644 --- a/mysql-test/r/events_logs_tests.result +++ b/mysql-test/r/events_logs_tests.result @@ -41,7 +41,7 @@ SELECT user_host, query_time, db, sql_text FROM mysql.slow_log; user_host query_time db sql_text "Set new values" SET GLOBAL long_query_time=4; -SET SESSION long_query_time=1; +SET SESSION long_query_time=0.5; "Check that logging is working" SELECT SLEEP(2); SLEEP(2) diff --git a/mysql-test/r/variables.result b/mysql-test/r/variables.result index e6d09306fcb..19b48efe6b4 100644 --- a/mysql-test/r/variables.result +++ b/mysql-test/r/variables.result @@ -523,6 +523,7 @@ set tmp_table_size=100; set tx_isolation="READ-COMMITTED"; set wait_timeout=100; set log_warnings=1; +set global log_warnings=1; select @@session.insert_id; @@session.insert_id 1 diff --git a/mysql-test/t/events_logs_tests.test b/mysql-test/t/events_logs_tests.test index 0c56f32beff..8617129b90c 100644 --- a/mysql-test/t/events_logs_tests.test +++ b/mysql-test/t/events_logs_tests.test @@ -58,7 +58,7 @@ TRUNCATE mysql.slow_log; SELECT user_host, query_time, db, sql_text FROM mysql.slow_log; --echo "Set new values" SET GLOBAL long_query_time=4; -SET SESSION long_query_time=1; +SET SESSION long_query_time=0.5; --echo "Check that logging is working" SELECT SLEEP(2); --replace_column 1 USER_HOST 2 SLEEPVAL diff --git a/mysql-test/t/variables.test b/mysql-test/t/variables.test index 8f55d83c3de..81db143b518 100644 --- a/mysql-test/t/variables.test +++ b/mysql-test/t/variables.test @@ -330,6 +330,7 @@ set tmp_table_size=100; set tx_isolation="READ-COMMITTED"; set wait_timeout=100; set log_warnings=1; +set global log_warnings=1; # # Bugs: #20392: INSERT_ID session variable has weird value |