From 0342d6a72b2783cbbaeaf6f5ae1bf8f7bd7d2cd7 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 14 Jun 2002 15:14:30 +0400 Subject: This is just code style/minor optimizations cleanup changeset client/mysqldump.c: Changes adviced by Monty include/my_aes.h: Changes adviced by Monty include/rijndael.h: Changes adviced by Monty include/sha1.h: Changes adviced by Monty mysys/my_aes.c: Changes adviced by Monty mysys/rijndael.c: Changes adviced by Monty mysys/sha1.c: Changes adviced by Monty sql/item_strfunc.cc: Changes adviced by Monty --- client/mysqldump.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'client/mysqldump.c') diff --git a/client/mysqldump.c b/client/mysqldump.c index 19eb2460f23..a805d1c63d9 100644 --- a/client/mysqldump.c +++ b/client/mysqldump.c @@ -1384,18 +1384,17 @@ int main(int argc, char **argv) return(first_error); } } - /* There is no sense to start transaction if all tables are locked */ else if (opt_single_transaction) + { + /* There is no sense to start transaction if all tables are locked */ + if (mysql_query(sock, "BEGIN")) { - if (mysql_query(sock, "BEGIN")) - { - my_printf_error(0, "Error: Couldn't execute 'BEGIN': %s", + my_printf_error(0, "Error: Couldn't execute 'BEGIN': %s", MYF(0), mysql_error(sock)); - my_end(0); - return(first_error); - } - - } + my_end(0); + return(first_error); + } + } if (opt_alldbs) dump_all_databases(); /* Only one database and selected table(s) */ @@ -1440,12 +1439,13 @@ int main(int argc, char **argv) MYF(0), mysql_error(sock)); } } - /* - In case we were locking all tables, we did not start transaction - so there is no need to commit it. - */ else if (opt_single_transaction) /* Just to make it beautiful enough */ { + /* + In case we were locking all tables, we did not start transaction + so there is no need to commit it. + */ + /* This should just free locks as we did not change anything */ if (mysql_query(sock, "COMMIT")) { -- cgit v1.2.1