summaryrefslogtreecommitdiff
path: root/sql/wsrep_mysqld.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/wsrep_mysqld.cc')
-rw-r--r--sql/wsrep_mysqld.cc37
1 files changed, 19 insertions, 18 deletions
diff --git a/sql/wsrep_mysqld.cc b/sql/wsrep_mysqld.cc
index 9a99dffc724..87eb97e4fec 100644
--- a/sql/wsrep_mysqld.cc
+++ b/sql/wsrep_mysqld.cc
@@ -1245,7 +1245,7 @@ int wsrep_to_buf_helper(
THD* thd, const char *query, uint query_len, uchar** buf, size_t* buf_len)
{
IO_CACHE tmp_io_cache;
- Log_event_writer writer(&tmp_io_cache);
+ Log_event_writer writer(&tmp_io_cache,0);
if (open_cached_file(&tmp_io_cache, mysql_tmpdir, TEMP_PREFIX,
65536, MYF(MY_WME)))
return 1;
@@ -1331,8 +1331,8 @@ create_view_query(THD *thd, uchar** buf, size_t* buf_len)
{ C_STRING_WITH_LEN("ALTER ") },
{ C_STRING_WITH_LEN("CREATE OR REPLACE ") }};
- buff.append(command[thd->lex->create_view_mode].str,
- command[thd->lex->create_view_mode].length);
+ buff.append(command[thd->lex->create_view->mode].str,
+ command[thd->lex->create_view->mode].length);
LEX_USER *definer;
@@ -1360,9 +1360,9 @@ create_view_query(THD *thd, uchar** buf, size_t* buf_len)
return 1;
}
- views->algorithm = lex->create_view_algorithm;
- views->view_suid = lex->create_view_suid;
- views->with_check = lex->create_view_check;
+ views->algorithm = lex->create_view->algorithm;
+ views->view_suid = lex->create_view->suid;
+ views->with_check = lex->create_view->check;
view_store_options(thd, views, &buff);
buff.append(STRING_WITH_LEN("VIEW "));
@@ -1391,8 +1391,8 @@ create_view_query(THD *thd, uchar** buf, size_t* buf_len)
}
buff.append(STRING_WITH_LEN(" AS "));
//buff.append(views->source.str, views->source.length);
- buff.append(thd->lex->create_view_select.str,
- thd->lex->create_view_select.length);
+ buff.append(thd->lex->create_view->select.str,
+ thd->lex->create_view->select.length);
//int errcode= query_error_code(thd, TRUE);
//if (thd->binlog_query(THD::STMT_QUERY_TYPE,
// buff.ptr(), buff.length(), FALSE, FALSE, FALSE, errcod
@@ -1409,7 +1409,7 @@ static int wsrep_create_trigger_query(THD *thd, uchar** buf, size_t* buf_len);
1: TOI replication was skipped
-1: TOI replication failed
*/
-static int wsrep_TOI_begin(THD *thd, char *db_, char *table_,
+static int wsrep_TOI_begin(THD *thd, const char *db_, const char *table_,
const TABLE_LIST* table_list)
{
wsrep_status_t ret(WSREP_WARNING);
@@ -1473,8 +1473,8 @@ static int wsrep_TOI_begin(THD *thd, char *db_, char *table_,
ret,
(thd->db ? thd->db : "(null)"),
(thd->query()) ? thd->query() : "void");
- my_error(ER_LOCK_DEADLOCK, MYF(0), "WSREP replication failed. Check "
- "your wsrep connection state and retry the query.");
+ my_message(ER_LOCK_DEADLOCK, "WSREP replication failed. Check "
+ "your wsrep connection state and retry the query.", MYF(0));
wsrep_keys_free(&key_arr);
rc= -1;
}
@@ -1512,7 +1512,7 @@ static void wsrep_TOI_end(THD *thd) {
}
}
-static int wsrep_RSU_begin(THD *thd, char *db_, char *table_)
+static int wsrep_RSU_begin(THD *thd, const char *db_, const char *table_)
{
wsrep_status_t ret(WSREP_WARNING);
WSREP_DEBUG("RSU BEGIN: %lld, %d : %s", (long long)wsrep_thd_trx_seqno(thd),
@@ -1595,7 +1595,7 @@ static void wsrep_RSU_end(THD *thd)
thd->variables.wsrep_on = 1;
}
-int wsrep_to_isolation_begin(THD *thd, char *db_, char *table_,
+int wsrep_to_isolation_begin(THD *thd, const char *db_, const char *table_,
const TABLE_LIST* table_list)
{
int ret= 0;
@@ -1781,7 +1781,8 @@ bool wsrep_grant_mdl_exception(MDL_context *requestor_ctx,
/* Print some debug information. */
if (wsrep_debug)
{
- if (request_thd->lex->sql_command == SQLCOM_DROP_TABLE)
+ if (request_thd->lex->sql_command == SQLCOM_DROP_TABLE ||
+ request_thd->lex->sql_command == SQLCOM_DROP_SEQUENCE)
{
WSREP_DEBUG("DROP caused BF abort");
}
@@ -2252,7 +2253,7 @@ static int wsrep_create_sp(THD *thd, uchar** buf, size_t* buf_len)
sp->m_params.str, sp->m_params.length,
retstr.c_ptr(), retstr.length(),
sp->m_body.str, sp->m_body.length,
- sp->m_chistics, &(thd->lex->definer->user),
+ sp->chistics(), &(thd->lex->definer->user),
&(thd->lex->definer->host),
saved_mode))
{
@@ -2548,8 +2549,8 @@ static int wsrep_create_trigger_query(THD *thd, uchar** buf, size_t* buf_len)
LEX *lex= thd->lex;
String stmt_query;
- LEX_STRING definer_user;
- LEX_STRING definer_host;
+ LEX_CSTRING definer_user;
+ LEX_CSTRING definer_host;
if (!lex->definer)
{
@@ -2586,7 +2587,7 @@ static int wsrep_create_trigger_query(THD *thd, uchar** buf, size_t* buf_len)
append_definer(thd, &stmt_query, &definer_user, &definer_host);
- LEX_STRING stmt_definition;
+ LEX_CSTRING stmt_definition;
uint not_used;
stmt_definition.str= (char*) thd->lex->stmt_definition_begin;
stmt_definition.length= thd->lex->stmt_definition_end