summaryrefslogtreecommitdiff
path: root/mysys/my_uuid.c
diff options
context:
space:
mode:
authorMichael Widenius <monty@mysql.com>2008-10-12 13:09:52 +0300
committerMichael Widenius <monty@mysql.com>2008-10-12 13:09:52 +0300
commit058916ae024baaf8a092e0130654f67ef7b9bcf1 (patch)
tree4bc329a5cbca9236a982a8faebb345264ed3c12a /mysys/my_uuid.c
parent0e43d765573ececac5c0b013235f11aa3c66fbda (diff)
downloadmariadb-git-058916ae024baaf8a092e0130654f67ef7b9bcf1.tar.gz
Fix for bug#39226 Maria: crash with FLUSH TABLES WITH READ LOCK after LOCK TABLES
- The problem was that we didn't inform the handler that we are going to close tables that are locked and may have (at least in Maria) be part of an active transaction. Fix for Bug#39227 Maria: crash with ALTER TABLE PARTITION Fix for Bug #39987 main.partition_not_windows fails under debug build Fixed some compiler errors & warnings found by pushbuild include/my_base.h: Added HA_EXTRA_PREPARE_FOR_FORCED_CLOSE for signaling the handler that the file will be forced closed include/my_global.h: Removed 'register' from 'swap_variables' as this gives a warnings when the variables are structs. Compilers should also now be smart enough to figure out this themselves mysql-test/r/subselect_debug.result: Reset value of the debug variable; Without setting this the subselect_innodb test will fail when run after this one mysql-test/suite/maria/r/maria.result: Merged test with myisam.test Added tests for new fixed bugs mysql-test/suite/maria/t/maria.test: Merged test with myisam.test Added tests for new fixed bugs mysql-test/t/subselect_debug.test: Reset value of the debug variable; Without setting this the subselect_innodb test will fail when run after this one mysys/my_uuid.c: Fixed compiler error on windows sql/ha_partition.cc: Added support for the new extra flag: HA_EXTRA_PREPARE_FOR_FORCED_CLOSE (Bug #39226) Ensure that we call extra() for HA_EXTRA_PREPARE_FOR_DROP (Bug#39227) sql/mysqld.cc: Fix for Bug #39987 main.partition_not_windows fails under debug build The problem was that when compiling for purify/valgrind realpath() is not used, which causes test_if_data_home_dir to fail when it shouldn't sql/sql_base.cc: Call HA_EXTRA_PREPARE_FOR_FORCED_CLOSE for tables that are locked but we are going to force close without doing a commit sql/sql_parse.cc: More DBUG_PRINT. Fixed comments storage/maria/ma_extra.c: If HA_EXTRA_PREPARE_FOR_FORCED_CLOSE is called and the table is part of a transaction, remove the table from beeing part of a transaction. This is safe as this is only used as part of flush tables or when the table is not part of a transaction storage/myisam/mi_open.c: Indentation fix unittest/mysys/waiting_threads-t.c: Remove not needed 'volatile' to get rid of compiler warnings on windows
Diffstat (limited to 'mysys/my_uuid.c')
-rw-r--r--mysys/my_uuid.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/mysys/my_uuid.c b/mysys/my_uuid.c
index 36f1d2227f0..ca5e94c4754 100644
--- a/mysys/my_uuid.c
+++ b/mysys/my_uuid.c
@@ -145,11 +145,12 @@ void my_uuid(uchar *to)
*/
if (nanoseq)
{
+ long delta;
DBUG_ASSERT((tv > uuid_time) && (nanoseq > 0));
/*
-1 so we won't make tv= uuid_time for nanoseq >= (tv - uuid_time)
*/
- long delta= min(nanoseq, tv - uuid_time -1);
+ delta= min(nanoseq, tv - uuid_time -1);
tv-= delta;
nanoseq-= delta;
}