4805 magnus.blaudd@stripped 2012-12-19
Merge Bug#15953730 into 5.6
modified:
include/mysql/plugin.h
include/mysql/plugin_audit.h.pp
include/mysql/plugin_auth.h.pp
include/mysql/plugin_ftparser.h.pp
sql/ha_ndbcluster.cc
sql/log_event.cc
sql/sql_class.cc
4804 Vasil Dimov 2012-12-18 [merge]
Merge mysql-5.5 -> mysql-5.6
modified:
storage/innobase/handler/ha_innodb.cc
=== modified file 'include/mysql/plugin.h'
--- a/include/mysql/plugin.h revid:vasil.dimov@stripped
+++ b/include/mysql/plugin.h revid:magnus.blaudd@stripped
@@ -551,6 +551,7 @@ char *thd_security_context(MYSQL_THD thd
unsigned int max_query_len);
/* Increments the row counter, see THD::row_count */
void thd_inc_row_count(MYSQL_THD thd);
+int thd_allow_batch(MYSQL_THD thd);
/**
Create a temporary file.
=== modified file 'include/mysql/plugin_audit.h.pp'
--- a/include/mysql/plugin_audit.h.pp revid:vasil.dimov@stripped
+++ b/include/mysql/plugin_audit.h.pp revid:magnus.blaudd@stripped
@@ -233,6 +233,7 @@ int thd_tx_is_read_only(const void* thd)
char *thd_security_context(void* thd, char *buffer, unsigned int length,
unsigned int max_query_len);
void thd_inc_row_count(void* thd);
+int thd_allow_batch(void* thd);
int mysql_tmpfile(const char *prefix);
int thd_killed(const void* thd);
void thd_binlog_pos(const void* thd,
=== modified file 'include/mysql/plugin_auth.h.pp'
--- a/include/mysql/plugin_auth.h.pp revid:vasil.dimov@stripped
+++ b/include/mysql/plugin_auth.h.pp revid:magnus.blaudd@stripped
@@ -233,6 +233,7 @@ int thd_tx_is_read_only(const void* thd)
char *thd_security_context(void* thd, char *buffer, unsigned int length,
unsigned int max_query_len);
void thd_inc_row_count(void* thd);
+int thd_allow_batch(void* thd);
int mysql_tmpfile(const char *prefix);
int thd_killed(const void* thd);
void thd_binlog_pos(const void* thd,
=== modified file 'include/mysql/plugin_ftparser.h.pp'
--- a/include/mysql/plugin_ftparser.h.pp revid:vasil.dimov@stripped
+++ b/include/mysql/plugin_ftparser.h.pp revid:magnus.blaudd@stripped
@@ -186,6 +186,7 @@ int thd_tx_is_read_only(const void* thd)
char *thd_security_context(void* thd, char *buffer, unsigned int length,
unsigned int max_query_len);
void thd_inc_row_count(void* thd);
+int thd_allow_batch(void* thd);
int mysql_tmpfile(const char *prefix);
int thd_killed(const void* thd);
void thd_binlog_pos(const void* thd,
=== modified file 'sql/ha_ndbcluster.cc'
--- a/sql/ha_ndbcluster.cc revid:vasil.dimov@stripped
+++ b/sql/ha_ndbcluster.cc revid:magnus.blaudd@stripped
@@ -4596,37 +4596,6 @@ ha_ndbcluster::eventSetAnyValue(THD *thd
#endif
}
-bool ha_ndbcluster::isManualBinlogExec(THD *thd)
-{
- /* Are we executing handler methods as part of
- * a mysql client BINLOG statement?
- */
-#ifndef EMBEDDED_LIBRARY
- return thd ?
- ( thd->rli_fake?
- ndb_mi_get_in_relay_log_statement(thd->rli_fake) : false)
- : false;
-#else
- /* For Embedded library, we can't determine if we're
- * executing Binlog manually
- * TODO : Find better way to determine whether to use
- * SQL REPLACE or Write_row semantics
- */
- return false;
-#endif
-
-}
-
-static inline bool
-thd_allow_batch(const THD* thd)
-{
-#ifndef OPTION_ALLOW_BATCH
- return false;
-#else
- return (thd_options(thd) & OPTION_ALLOW_BATCH);
-#endif
-}
-
#ifdef HAVE_NDB_BINLOG
/**
prepare_conflict_detection
=== modified file 'sql/log_event.cc'
--- a/sql/log_event.cc revid:vasil.dimov@stripped
+++ b/sql/log_event.cc revid:magnus.blaudd@stripped
@@ -10827,15 +10827,6 @@ int Rows_log_event::do_apply_event(Relay
else
thd->variables.option_bits&= ~OPTION_RELAXED_UNIQUE_CHECKS;
- /*
- Note that unlike the other thd options set here, this one
- comes from a global, and not from the incoming event.
- */
- if (opt_slave_allow_batching)
- thd->variables.option_bits|= OPTION_ALLOW_BATCH;
- else
- thd->variables.option_bits&= ~OPTION_ALLOW_BATCH;
-
thd->binlog_row_event_extra_data = m_extra_row_data;
/* A small test to verify that objects have consistent types */
@@ -11141,9 +11132,6 @@ AFTER_MAIN_EXEC_ROW_LOOP:
}
} // if (table)
- /* reset OPTION_ALLOW_BATCH as not affect later events */
- thd->variables.option_bits&= ~OPTION_ALLOW_BATCH;
-
if (error)
{
slave_rows_error_report(ERROR_LEVEL, error, rli, thd, table,
=== modified file 'sql/sql_class.cc'
--- a/sql/sql_class.cc revid:vasil.dimov@stripped
+++ b/sql/sql_class.cc revid:magnus.blaudd@stripped
@@ -4038,6 +4038,19 @@ extern "C" unsigned long thd_get_thread_
return((unsigned long)thd->thread_id);
}
+/**
+ Check if batching is allowed for the thread
+ @param thd user thread
+ @retval 1 batching allowed
+ @retval 0 batching not allowed
+*/
+extern "C" int thd_allow_batch(MYSQL_THD thd)
+{
+ if ((thd->variables.option_bits & OPTION_ALLOW_BATCH) ||
+ (thd->slave_thread && opt_slave_allow_batching))
+ return 1;
+ return 0;
+}
#ifdef INNODB_COMPATIBILITY_HOOKS
extern "C" const struct charset_info_st *thd_charset(MYSQL_THD thd)
No bundle (reason: useless for push emails).
| Thread |
|---|
| • bzr push into mysql-5.6 branch (magnus.blaudd:4804 to 4805) Bug#15953730 | magnus.blaudd | 19 Dec |