summaryrefslogtreecommitdiff
path: root/sql/sql_table.cc
diff options
context:
space:
mode:
authorunknown <jimw@mysql.com>2004-12-03 00:05:11 +0100
committerunknown <jimw@mysql.com>2004-12-03 00:05:11 +0100
commit9286d1c1452d53dd36c94fbe94a3f99be7b1dfb2 (patch)
treec6630df438ab32a1664bb54903e60729d5755629 /sql/sql_table.cc
parenta845e882fd31c1b6e52d2a19017c8a2bd6f9c66c (diff)
downloadmariadb-git-9286d1c1452d53dd36c94fbe94a3f99be7b1dfb2.tar.gz
Prevent adding 'CREATE TABLE .. SELECT' query to the binary log when the
insertion of new records partially failed. It would get logged because of the logic to log a partially-failed 'INSERT ... SELECT' (which can't be rolled back in non-transactional tables), but 'CREATE TABLE ... SELECT' is always rolled back on failure, even for non-transactional tables. (Bug #6682) (Original fix reimplemented after review by Serg and Guilhem.) mysql-test/t/insert_select.test: Add test case for Bug #6682 mysql-test/r/insert_select.result: Add results for test case for Bug #6682 sql/sql_table.cc: moved tmp_disable_binlog() and reenable_binlog macros to sql/sql_class.h sql/sql_insert.cc: disable binlog during call to super's ::send_error in select_create class sql/sql_class.h: add select_create::send_error() BitKeeper/etc/logging_ok: Logging to logging@openlogging.org accepted
Diffstat (limited to 'sql/sql_table.cc')
-rw-r--r--sql/sql_table.cc8
1 files changed, 0 insertions, 8 deletions
diff --git a/sql/sql_table.cc b/sql/sql_table.cc
index 1e5237b1428..33bdd992efb 100644
--- a/sql/sql_table.cc
+++ b/sql/sql_table.cc
@@ -31,14 +31,6 @@
#endif
#include "sql_acl.h" // for SUPER_ACL
-# define tmp_disable_binlog(A) \
- ulong save_options= (A)->options, save_master_access= (A)->master_access; \
- (A)->options&= ~OPTION_BIN_LOG; \
- (A)->master_access|= SUPER_ACL; /* unneeded in 4.1 */
-
-#define reenable_binlog(A) \
- (A)->options= save_options; \
- (A)->master_access= save_master_access;
extern HASH open_cache;
static const char *primary_key_name="PRIMARY";