summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorunknown <monty@mysql.com>2005-08-09 11:21:45 +0300
committerunknown <monty@mysql.com>2005-08-09 11:21:45 +0300
commitc4228519a663869ab3ab3d969890e4c6f5831e0f (patch)
tree0978309486eacab28b3d59db151c9119ba7ff8ec /sql
parent807a9c8dffa784557e0ed4dcd72175d44e1af917 (diff)
downloadmariadb-git-c4228519a663869ab3ab3d969890e4c6f5831e0f.tar.gz
Fixed test that failed on 32 bit systems
sql/ha_innodb.cc: Don't print not critical warning if log_warnings is not set Use sql_print_warning() instead of fprintf(). (We should not use fprintf() as this causes problems on windows and with the embedded server)
Diffstat (limited to 'sql')
-rw-r--r--sql/ha_innodb.cc15
1 files changed, 6 insertions, 9 deletions
diff --git a/sql/ha_innodb.cc b/sql/ha_innodb.cc
index d5d79b51f60..d98222975c5 100644
--- a/sql/ha_innodb.cc
+++ b/sql/ha_innodb.cc
@@ -2146,15 +2146,12 @@ innobase_close_connection(
ut_a(trx);
- if (trx->conc_state != TRX_NOT_STARTED) {
- ut_print_timestamp(stderr);
-
- fprintf(stderr,
-" InnoDB: Warning: MySQL is closing a connection\n"
-"InnoDB: that has an active InnoDB transaction. We roll back that\n"
-"InnoDB: transaction. %lu row modifications to roll back.\n",
- (ulong)trx->undo_no.low);
- }
+ if (trx->conc_state != TRX_NOT_STARTED &&
+ global_system_variables.log_warnings)
+ sql_print_warning("MySQL is closing a connection that has an active "
+ "InnoDB transaction. %lu row modifications will "
+ "roll back.",
+ (ulong)trx->undo_no.low);
innobase_rollback_trx(trx);