summaryrefslogtreecommitdiff
path: root/client/mysqldump.c
diff options
context:
space:
mode:
authorunknown <peter@linux.local>2002-06-14 15:14:30 +0400
committerunknown <peter@linux.local>2002-06-14 15:14:30 +0400
commit0342d6a72b2783cbbaeaf6f5ae1bf8f7bd7d2cd7 (patch)
treef47e08fb9e4c935c0c094ada6d7b5861615d6609 /client/mysqldump.c
parent03b09fb09ee32c19c0e0626eaec0371918cee9a4 (diff)
downloadmariadb-git-0342d6a72b2783cbbaeaf6f5ae1bf8f7bd7d2cd7.tar.gz
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
Diffstat (limited to 'client/mysqldump.c')
-rw-r--r--client/mysqldump.c26
1 files changed, 13 insertions, 13 deletions
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"))
{