From ba3179710b253c1ea0a4adef4639455a2c4811fc Mon Sep 17 00:00:00 2001 From: Sears Russell Date: Wed, 17 Feb 2010 05:10:30 +0000 Subject: [PATCH] Suppress shutdown warning when empty transactions are automatically rolled back. --- src/stasis/transactional2.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/stasis/transactional2.c b/src/stasis/transactional2.c index c33b966..97c9412 100644 --- a/src/stasis/transactional2.c +++ b/src/stasis/transactional2.c @@ -332,8 +332,11 @@ int Tdeinit() { int * active = stasis_transaction_table_list_active(stasis_transaction_table, &count); for(int i = 0; i < count; i++) { - if(!stasis_suppress_unclean_shutdown_warnings) { - fprintf(stderr, "WARNING: Tdeinit() is aborting transaction %d\n", active[i]); + if(stasis_transaction_table_get(stasis_transaction_table, + active[i])->prevLSN != INVALID_LSN) { + if(!stasis_suppress_unclean_shutdown_warnings) { + fprintf(stderr, "WARNING: Tdeinit() is aborting transaction %d\n", active[i]); + } } Tabort(active[i]); }