summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authormats@mysql.com <>2004-12-03 12:15:31 +0100
committermats@mysql.com <>2004-12-03 12:15:31 +0100
commitfe70f8c747d62b9345144a6561d37fc9bd0f34fa (patch)
treee181392e2780f5b458aec25c1834612a39b95cde /sql
parenteb6c38fe9c129c238fbfc2defbcd832284c0d7b8 (diff)
parent2bbdf2403dc9b6b8b4d4803c5e81b05958ea2890 (diff)
downloadmariadb-git-fe70f8c747d62b9345144a6561d37fc9bd0f34fa.tar.gz
Merge mysql.com:/space/bkroot/mysql-4.1
into mysql.com:/space/bk/b6391-mysql-4.1
Diffstat (limited to 'sql')
-rw-r--r--sql/handler.cc4
-rw-r--r--sql/item_func.cc2
-rw-r--r--sql/log.cc14
-rw-r--r--sql/log_event.cc30
-rw-r--r--sql/log_event.h20
-rw-r--r--sql/sql_acl.cc2
-rw-r--r--sql/sql_base.cc4
-rw-r--r--sql/sql_db.cc44
-rw-r--r--sql/sql_delete.cc6
-rw-r--r--sql/sql_insert.cc8
-rw-r--r--sql/sql_parse.cc16
-rw-r--r--sql/sql_rename.cc2
-rw-r--r--sql/sql_table.cc17
-rw-r--r--sql/sql_update.cc4
14 files changed, 119 insertions, 54 deletions
diff --git a/sql/handler.cc b/sql/handler.cc
index 7ddd7b80a34..530c5f137ec 100644
--- a/sql/handler.cc
+++ b/sql/handler.cc
@@ -723,7 +723,7 @@ int ha_rollback_to_savepoint(THD *thd, char *savepoint_name)
if (unlikely((thd->options & OPTION_STATUS_NO_TRANS_UPDATE) &&
my_b_tell(&thd->transaction.trans_log)))
{
- Query_log_event qinfo(thd, thd->query, thd->query_length, TRUE);
+ Query_log_event qinfo(thd, thd->query, thd->query_length, TRUE, FALSE);
if (mysql_bin_log.write(&qinfo))
error= 1;
}
@@ -761,7 +761,7 @@ int ha_savepoint(THD *thd, char *savepoint_name)
innobase_savepoint(thd,savepoint_name,
my_b_tell(&thd->transaction.trans_log));
#endif
- Query_log_event qinfo(thd, thd->query, thd->query_length, TRUE);
+ Query_log_event qinfo(thd, thd->query, thd->query_length, TRUE, FALSE);
if (mysql_bin_log.write(&qinfo))
error= 1;
}
diff --git a/sql/item_func.cc b/sql/item_func.cc
index 5ed543efbc7..98b204d1809 100644
--- a/sql/item_func.cc
+++ b/sql/item_func.cc
@@ -2010,7 +2010,7 @@ void item_user_lock_release(User_level_lock *ull)
tmp.copy(command, strlen(command), tmp.charset());
tmp.append(ull->key,ull->key_length);
tmp.append("\")", 2);
- Query_log_event qev(current_thd, tmp.ptr(), tmp.length(),1);
+ Query_log_event qev(current_thd, tmp.ptr(), tmp.length(),1, FALSE);
qev.error_code=0; // this query is always safe to run on slave
mysql_bin_log.write(&qev);
}
diff --git a/sql/log.cc b/sql/log.cc
index 460910fcee8..6c3ba68165c 100644
--- a/sql/log.cc
+++ b/sql/log.cc
@@ -1274,7 +1274,7 @@ bool MYSQL_LOG::write(Log_event* event_info)
(local_db && !db_ok(local_db, binlog_do_db, binlog_ignore_db)))
{
VOID(pthread_mutex_unlock(&LOCK_log));
- DBUG_PRINT("error",("!db_ok"));
+ DBUG_PRINT("error",("!db_ok('%s')", local_db));
DBUG_RETURN(0);
}
#endif /* HAVE_REPLICATION */
@@ -1317,7 +1317,7 @@ COLLATION_CONNECTION=%u,COLLATION_DATABASE=%u,COLLATION_SERVER=%u",
(uint) thd->variables.collation_connection->number,
(uint) thd->variables.collation_database->number,
(uint) thd->variables.collation_server->number);
- Query_log_event e(thd, buf, written, 0);
+ Query_log_event e(thd, buf, written, 0, FALSE);
e.set_log_pos(this);
if (e.write(file))
goto err;
@@ -1333,7 +1333,7 @@ COLLATION_CONNECTION=%u,COLLATION_DATABASE=%u,COLLATION_SERVER=%u",
char *buf_end= strxmov(buf, "SET ONE_SHOT TIME_ZONE='",
thd->variables.time_zone->get_name()->ptr(),
"'", NullS);
- Query_log_event e(thd, buf, buf_end - buf, 0);
+ Query_log_event e(thd, buf, buf_end - buf, 0, FALSE);
e.set_log_pos(this);
if (e.write(file))
goto err;
@@ -1402,7 +1402,7 @@ COLLATION_CONNECTION=%u,COLLATION_DATABASE=%u,COLLATION_SERVER=%u",
if (thd->options & OPTION_NO_FOREIGN_KEY_CHECKS)
{
- Query_log_event e(thd, "SET FOREIGN_KEY_CHECKS=0", 24, 0);
+ Query_log_event e(thd, "SET FOREIGN_KEY_CHECKS=0", 24, 0, FALSE);
e.set_log_pos(this);
if (e.write(file))
goto err;
@@ -1421,7 +1421,7 @@ COLLATION_CONNECTION=%u,COLLATION_DATABASE=%u,COLLATION_SERVER=%u",
{
if (thd->options & OPTION_NO_FOREIGN_KEY_CHECKS)
{
- Query_log_event e(thd, "SET FOREIGN_KEY_CHECKS=1", 24, 0);
+ Query_log_event e(thd, "SET FOREIGN_KEY_CHECKS=1", 24, 0, FALSE);
e.set_log_pos(this);
if (e.write(file))
goto err;
@@ -1597,7 +1597,7 @@ bool MYSQL_LOG::write(THD *thd, IO_CACHE *cache, bool commit_or_rollback)
we will add the "COMMIT mark and write the buffer to the binlog.
*/
{
- Query_log_event qinfo(thd, "BEGIN", 5, TRUE);
+ Query_log_event qinfo(thd, "BEGIN", 5, TRUE, FALSE);
/*
Imagine this is rollback due to net timeout, after all statements of
the transaction succeeded. Then we want a zero-error code in BEGIN.
@@ -1638,7 +1638,7 @@ bool MYSQL_LOG::write(THD *thd, IO_CACHE *cache, bool commit_or_rollback)
Query_log_event qinfo(thd,
commit_or_rollback ? "COMMIT" : "ROLLBACK",
commit_or_rollback ? 6 : 8,
- TRUE);
+ TRUE, FALSE);
qinfo.error_code= 0;
qinfo.set_log_pos(this);
if (qinfo.write(&log_file) || flush_io_cache(&log_file) ||
diff --git a/sql/log_event.cc b/sql/log_event.cc
index 2fdc89504d7..7a4d14d101a 100644
--- a/sql/log_event.cc
+++ b/sql/log_event.cc
@@ -780,7 +780,8 @@ void Query_log_event::pack_info(Protocol *protocol)
if (!(buf= my_malloc(9 + db_len + q_len, MYF(MY_WME))))
return;
pos= buf;
- if (db && db_len)
+ if (!(flags & LOG_EVENT_SUPPRESS_USE_F)
+ && db && db_len)
{
pos= strmov(buf, "use `");
memcpy(pos, db, db_len);
@@ -872,9 +873,12 @@ int Query_log_event::write_data(IO_CACHE* file)
#ifndef MYSQL_CLIENT
Query_log_event::Query_log_event(THD* thd_arg, const char* query_arg,
- ulong query_length, bool using_trans)
- :Log_event(thd_arg, !thd_arg->tmp_table_used ?
- 0 : LOG_EVENT_THREAD_SPECIFIC_F, using_trans),
+ ulong query_length, bool using_trans,
+ bool suppress_use)
+ :Log_event(thd_arg,
+ ((thd_arg->tmp_table_used ? LOG_EVENT_THREAD_SPECIFIC_F : 0)
+ | (suppress_use ? LOG_EVENT_SUPPRESS_USE_F : 0)),
+ using_trans),
data_buf(0), query(query_arg),
db(thd_arg->db), q_len((uint32) query_length),
error_code(thd_arg->killed ?
@@ -949,14 +953,20 @@ void Query_log_event::print(FILE* file, bool short_form, char* last_db)
bool different_db= 1;
- if (db && last_db)
+ if (!(flags & LOG_EVENT_SUPPRESS_USE_F))
{
- if (different_db= memcmp(last_db, db, db_len + 1))
- memcpy(last_db, db, db_len + 1);
+ if (db && last_db)
+ {
+ if (different_db= memcmp(last_db, db, db_len + 1))
+ memcpy(last_db, db, db_len + 1);
+ }
+
+ if (db && db[0] && different_db)
+ {
+ fprintf(file, "use %s;\n", db);
+ }
}
-
- if (db && db[0] && different_db)
- fprintf(file, "use %s;\n", db);
+
end=int10_to_str((long) when, strmov(buff,"SET TIMESTAMP="),10);
*end++=';';
*end++='\n';
diff --git a/sql/log_event.h b/sql/log_event.h
index 1606659e21e..8a2334e8574 100644
--- a/sql/log_event.h
+++ b/sql/log_event.h
@@ -264,6 +264,19 @@ struct sql_ex_info
*/
#define LOG_EVENT_THREAD_SPECIFIC_F 0x4
+/*
+ Suppress the generation of 'USE' statements before the actual
+ statement. This flag should be set for any events that does not need
+ the current database set to function correctly. Most notable cases
+ are 'CREATE DATABASE' and 'DROP DATABASE'.
+
+ This flags should only be used in exceptional circumstances, since
+ it introduce a significant change in behaviour regarding the
+ replication logic together with the flags --binlog-do-db and
+ --replicated-do-db.
+ */
+#define LOG_EVENT_SUPPRESS_USE_F 0x8
+
enum Log_event_type
{
UNKNOWN_EVENT= 0, START_EVENT= 1, QUERY_EVENT= 2, STOP_EVENT= 3,
@@ -331,8 +344,9 @@ public:
/*
Some 16 flags. Only one is really used now; look above for
- LOG_EVENT_TIME_F, LOG_EVENT_FORCED_ROTATE_F, LOG_EVENT_THREAD_SPECIFIC_F
- for notes.
+ LOG_EVENT_TIME_F, LOG_EVENT_FORCED_ROTATE_F,
+ LOG_EVENT_THREAD_SPECIFIC_F, and LOG_EVENT_SUPPRESS_USE_F for
+ notes.
*/
uint16 flags;
@@ -465,7 +479,7 @@ public:
#ifndef MYSQL_CLIENT
Query_log_event(THD* thd_arg, const char* query_arg, ulong query_length,
- bool using_trans);
+ bool using_trans, bool suppress_use);
const char* get_db() { return db; }
#ifdef HAVE_REPLICATION
void pack_info(Protocol* protocol);
diff --git a/sql/sql_acl.cc b/sql/sql_acl.cc
index f1698dcc911..8cc4bf7ea43 100644
--- a/sql/sql_acl.cc
+++ b/sql/sql_acl.cc
@@ -1230,7 +1230,7 @@ bool change_password(THD *thd, const char *host, const char *user,
new_password));
thd->clear_error();
mysql_update_log.write(thd, buff, query_length);
- Query_log_event qinfo(thd, buff, query_length, 0);
+ Query_log_event qinfo(thd, buff, query_length, 0, FALSE);
mysql_bin_log.write(&qinfo);
DBUG_RETURN(0);
}
diff --git a/sql/sql_base.cc b/sql/sql_base.cc
index a5db02478ac..64e616e872f 100644
--- a/sql/sql_base.cc
+++ b/sql/sql_base.cc
@@ -524,7 +524,7 @@ void close_temporary_tables(THD *thd)
{
/* The -1 is to remove last ',' */
thd->clear_error();
- Query_log_event qinfo(thd, query, (ulong)(end-query)-1, 0);
+ Query_log_event qinfo(thd, query, (ulong)(end-query)-1, 0, FALSE);
/*
Imagine the thread had created a temp table, then was doing a SELECT, and
the SELECT was killed. Then it's not clever to mark the statement above as
@@ -1441,7 +1441,7 @@ static int open_unireg_entry(THD *thd, TABLE *entry, const char *db,
{
end = strxmov(strmov(query, "DELETE FROM `"),
db,"`.`",name,"`", NullS);
- Query_log_event qinfo(thd, query, (ulong)(end-query), 0);
+ Query_log_event qinfo(thd, query, (ulong)(end-query), 0, FALSE);
mysql_bin_log.write(&qinfo);
my_free(query, MYF(0));
}
diff --git a/sql/sql_db.cc b/sql/sql_db.cc
index 350a7432990..e3ca0328382 100644
--- a/sql/sql_db.cc
+++ b/sql/sql_db.cc
@@ -467,7 +467,29 @@ int mysql_create_db(THD *thd, char *db, HA_CREATE_INFO *create_info,
mysql_update_log.write(thd, query, query_length);
if (mysql_bin_log.is_open())
{
- Query_log_event qinfo(thd, query, query_length, 0);
+ Query_log_event qinfo(thd, query, query_length, 0,
+ /* suppress_use */ TRUE);
+
+ /*
+ Write should use the database being created as the "current
+ database" and not the threads current database, which is the
+ default. If we do not change the "current database" to the
+ database being created, the CREATE statement will not be
+ replicated when using --binlog-do-db to select databases to be
+ replicated.
+
+ An example (--binlog-do-db=sisyfos):
+
+ CREATE DATABASE bob; # Not replicated
+ USE bob; # 'bob' is the current database
+ CREATE DATABASE sisyfos; # Not replicated since 'bob' is
+ # current database.
+ USE sisyfos; # Will give error on slave since
+ # database does not exist.
+ */
+ qinfo.db = db;
+ qinfo.db_len = strlen(db);
+
mysql_bin_log.write(&qinfo);
}
send_ok(thd, result);
@@ -517,7 +539,15 @@ int mysql_alter_db(THD *thd, const char *db, HA_CREATE_INFO *create_info)
mysql_update_log.write(thd,thd->query, thd->query_length);
if (mysql_bin_log.is_open())
{
- Query_log_event qinfo(thd, thd->query, thd->query_length, 0);
+ Query_log_event qinfo(thd, thd->query, thd->query_length, 0,
+ /* suppress_use */ TRUE);
+
+ // Write should use the database being created as the "current
+ // database" and not the threads current database, which is the
+ // default.
+ qinfo.db = db;
+ qinfo.db_len = strlen(db);
+
thd->clear_error();
mysql_bin_log.write(&qinfo);
}
@@ -625,7 +655,15 @@ int mysql_rm_db(THD *thd,char *db,bool if_exists, bool silent)
mysql_update_log.write(thd, query, query_length);
if (mysql_bin_log.is_open())
{
- Query_log_event qinfo(thd, query, query_length, 0);
+ Query_log_event qinfo(thd, query, query_length, 0,
+ /* suppress_use */ TRUE);
+
+ // Write should use the database being created as the "current
+ // database" and not the threads current database, which is the
+ // default.
+ qinfo.db = db;
+ qinfo.db_len = strlen(db);
+
thd->clear_error();
mysql_bin_log.write(&qinfo);
}
diff --git a/sql/sql_delete.cc b/sql/sql_delete.cc
index 09893970803..29d86a99ff3 100644
--- a/sql/sql_delete.cc
+++ b/sql/sql_delete.cc
@@ -216,7 +216,7 @@ cleanup:
if (error <= 0)
thd->clear_error();
Query_log_event qinfo(thd, thd->query, thd->query_length,
- log_delayed);
+ log_delayed, FALSE);
if (mysql_bin_log.write(&qinfo) && transactional_table)
error=1;
}
@@ -565,7 +565,7 @@ bool multi_delete::send_eof()
if (error <= 0)
thd->clear_error();
Query_log_event qinfo(thd, thd->query, thd->query_length,
- log_delayed);
+ log_delayed, FALSE);
if (mysql_bin_log.write(&qinfo) && !normal_tables)
local_error=1; // Log write failed: roll back the SQL statement
}
@@ -674,7 +674,7 @@ end:
{
thd->clear_error();
Query_log_event qinfo(thd, thd->query, thd->query_length,
- thd->tmp_table);
+ thd->tmp_table, FALSE);
mysql_bin_log.write(&qinfo);
}
send_ok(thd); // This should return record count
diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc
index d590d3b5093..3a2721e658d 100644
--- a/sql/sql_insert.cc
+++ b/sql/sql_insert.cc
@@ -368,7 +368,7 @@ int mysql_insert(THD *thd,TABLE_LIST *table_list,
if (error <= 0)
thd->clear_error();
Query_log_event qinfo(thd, thd->query, thd->query_length,
- log_delayed);
+ log_delayed, FALSE);
if (mysql_bin_log.write(&qinfo) && transactional_table)
error=1;
}
@@ -1364,7 +1364,7 @@ bool delayed_insert::handle_inserts(void)
mysql_update_log.write(&thd,row->query, row->query_length);
if (row->log_query & DELAYED_LOG_BIN && using_bin_log)
{
- Query_log_event qinfo(&thd, row->query, row->query_length,0);
+ Query_log_event qinfo(&thd, row->query, row->query_length,0, FALSE);
mysql_bin_log.write(&qinfo);
}
}
@@ -1539,7 +1539,7 @@ void select_insert::send_error(uint errcode,const char *err)
if (mysql_bin_log.is_open())
{
Query_log_event qinfo(thd, thd->query, thd->query_length,
- table->file->has_transactions());
+ table->file->has_transactions(), FALSE);
mysql_bin_log.write(&qinfo);
}
if (!table->tmp_table)
@@ -1581,7 +1581,7 @@ bool select_insert::send_eof()
if (!error)
thd->clear_error();
Query_log_event qinfo(thd, thd->query, thd->query_length,
- table->file->has_transactions());
+ table->file->has_transactions(), FALSE);
mysql_bin_log.write(&qinfo);
}
if ((error2=ha_autocommit_or_rollback(thd,error)) && ! error)
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc
index 990e52d05ce..7d1798e751e 100644
--- a/sql/sql_parse.cc
+++ b/sql/sql_parse.cc
@@ -2614,7 +2614,7 @@ unsent_create_error:
if (mysql_bin_log.is_open())
{
thd->clear_error(); // No binlog error generated
- Query_log_event qinfo(thd, thd->query, thd->query_length, 0);
+ Query_log_event qinfo(thd, thd->query, thd->query_length, 0, FALSE);
mysql_bin_log.write(&qinfo);
}
}
@@ -2643,7 +2643,7 @@ unsent_create_error:
if (mysql_bin_log.is_open())
{
thd->clear_error(); // No binlog error generated
- Query_log_event qinfo(thd, thd->query, thd->query_length, 0);
+ Query_log_event qinfo(thd, thd->query, thd->query_length, 0, FALSE);
mysql_bin_log.write(&qinfo);
}
}
@@ -2666,7 +2666,7 @@ unsent_create_error:
if (mysql_bin_log.is_open())
{
thd->clear_error(); // No binlog error generated
- Query_log_event qinfo(thd, thd->query, thd->query_length, 0);
+ Query_log_event qinfo(thd, thd->query, thd->query_length, 0, FALSE);
mysql_bin_log.write(&qinfo);
}
}
@@ -3262,7 +3262,7 @@ purposes internal to the MySQL server", MYF(0));
mysql_update_log.write(thd, thd->query, thd->query_length);
if (mysql_bin_log.is_open())
{
- Query_log_event qinfo(thd, thd->query, thd->query_length, 0);
+ Query_log_event qinfo(thd, thd->query, thd->query_length, 0, FALSE);
mysql_bin_log.write(&qinfo);
}
send_ok(thd);
@@ -3278,7 +3278,7 @@ purposes internal to the MySQL server", MYF(0));
mysql_update_log.write(thd, thd->query, thd->query_length);
if (mysql_bin_log.is_open())
{
- Query_log_event qinfo(thd, thd->query, thd->query_length, 0);
+ Query_log_event qinfo(thd, thd->query, thd->query_length, 0, FALSE);
mysql_bin_log.write(&qinfo);
}
send_ok(thd);
@@ -3345,7 +3345,7 @@ purposes internal to the MySQL server", MYF(0));
if (mysql_bin_log.is_open())
{
thd->clear_error();
- Query_log_event qinfo(thd, thd->query, thd->query_length, 0);
+ Query_log_event qinfo(thd, thd->query, thd->query_length, 0, FALSE);
mysql_bin_log.write(&qinfo);
}
}
@@ -3366,7 +3366,7 @@ purposes internal to the MySQL server", MYF(0));
if (mysql_bin_log.is_open())
{
thd->clear_error();
- Query_log_event qinfo(thd, thd->query, thd->query_length, 0);
+ Query_log_event qinfo(thd, thd->query, thd->query_length, 0, FALSE);
mysql_bin_log.write(&qinfo);
}
if (mqh_used && lex->sql_command == SQLCOM_GRANT)
@@ -3409,7 +3409,7 @@ purposes internal to the MySQL server", MYF(0));
mysql_update_log.write(thd, thd->query, thd->query_length);
if (mysql_bin_log.is_open())
{
- Query_log_event qinfo(thd, thd->query, thd->query_length, 0);
+ Query_log_event qinfo(thd, thd->query, thd->query_length, 0, FALSE);
mysql_bin_log.write(&qinfo);
}
}
diff --git a/sql/sql_rename.cc b/sql/sql_rename.cc
index afaf2ed0923..388034e0f1a 100644
--- a/sql/sql_rename.cc
+++ b/sql/sql_rename.cc
@@ -84,7 +84,7 @@ bool mysql_rename_tables(THD *thd, TABLE_LIST *table_list)
if (mysql_bin_log.is_open())
{
thd->clear_error();
- Query_log_event qinfo(thd, thd->query, thd->query_length, 0);
+ Query_log_event qinfo(thd, thd->query, thd->query_length, 0, FALSE);
mysql_bin_log.write(&qinfo);
}
send_ok(thd);
diff --git a/sql/sql_table.cc b/sql/sql_table.cc
index 71ce9102fbb..febd4091277 100644
--- a/sql/sql_table.cc
+++ b/sql/sql_table.cc
@@ -282,7 +282,8 @@ int mysql_rm_table_part2(THD *thd, TABLE_LIST *tables, bool if_exists,
if (!error)
thd->clear_error();
Query_log_event qinfo(thd, thd->query, thd->query_length,
- tmp_table_deleted && !some_tables_deleted);
+ tmp_table_deleted && !some_tables_deleted,
+ FALSE);
mysql_bin_log.write(&qinfo);
}
}
@@ -1419,7 +1420,8 @@ int mysql_create_table(THD *thd,const char *db, const char *table_name,
thd->clear_error();
Query_log_event qinfo(thd, thd->query, thd->query_length,
test(create_info->options &
- HA_LEX_CREATE_TMP_TABLE));
+ HA_LEX_CREATE_TMP_TABLE),
+ FALSE);
mysql_bin_log.write(&qinfo);
}
}
@@ -2344,7 +2346,8 @@ int mysql_create_like_table(THD* thd, TABLE_LIST* table,
thd->clear_error();
Query_log_event qinfo(thd, thd->query, thd->query_length,
test(create_info->options &
- HA_LEX_CREATE_TMP_TABLE));
+ HA_LEX_CREATE_TMP_TABLE),
+ FALSE);
mysql_bin_log.write(&qinfo);
}
res= 0;
@@ -2455,7 +2458,7 @@ mysql_discard_or_import_tablespace(THD *thd,
mysql_update_log.write(thd, thd->query,thd->query_length);
if (mysql_bin_log.is_open())
{
- Query_log_event qinfo(thd, thd->query, thd->query_length, 0);
+ Query_log_event qinfo(thd, thd->query, thd->query_length, 0, FALSE);
mysql_bin_log.write(&qinfo);
}
err:
@@ -2842,7 +2845,7 @@ int mysql_alter_table(THD *thd,char *new_db, char *new_name,
if (mysql_bin_log.is_open())
{
thd->clear_error();
- Query_log_event qinfo(thd, thd->query, thd->query_length, 0);
+ Query_log_event qinfo(thd, thd->query, thd->query_length, 0, FALSE);
mysql_bin_log.write(&qinfo);
}
if (do_send_ok)
@@ -3237,7 +3240,7 @@ int mysql_alter_table(THD *thd,char *new_db, char *new_name,
if (mysql_bin_log.is_open())
{
thd->clear_error();
- Query_log_event qinfo(thd, thd->query, thd->query_length, 0);
+ Query_log_event qinfo(thd, thd->query, thd->query_length, 0, FALSE);
mysql_bin_log.write(&qinfo);
}
goto end_temporary;
@@ -3372,7 +3375,7 @@ int mysql_alter_table(THD *thd,char *new_db, char *new_name,
if (mysql_bin_log.is_open())
{
thd->clear_error();
- Query_log_event qinfo(thd, thd->query, thd->query_length, 0);
+ Query_log_event qinfo(thd, thd->query, thd->query_length, 0, FALSE);
mysql_bin_log.write(&qinfo);
}
VOID(pthread_cond_broadcast(&COND_refresh));
diff --git a/sql/sql_update.cc b/sql/sql_update.cc
index d3597f274dc..21fcac34070 100644
--- a/sql/sql_update.cc
+++ b/sql/sql_update.cc
@@ -344,7 +344,7 @@ int mysql_update(THD *thd,
if (error <= 0)
thd->clear_error();
Query_log_event qinfo(thd, thd->query, thd->query_length,
- log_delayed);
+ log_delayed, FALSE);
if (mysql_bin_log.write(&qinfo) && transactional_table)
error=1; // Rollback update
}
@@ -1221,7 +1221,7 @@ bool multi_update::send_eof()
if (local_error <= 0)
thd->clear_error();
Query_log_event qinfo(thd, thd->query, thd->query_length,
- log_delayed);
+ log_delayed, FALSE);
if (mysql_bin_log.write(&qinfo) && trans_safe)
local_error= 1; // Rollback update
}