1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

Merge branch '10.0-galera' into bb-10.1-serg

This commit is contained in:
Nirbhay Choubey
2016-02-24 01:21:40 -05:00
71 changed files with 1574 additions and 127 deletions

View File

@ -4517,6 +4517,11 @@ end_with_restore_list:
db_name.str= db_name_buff;
db_name.length= lex->name.length;
strmov(db_name.str, lex->name.str);
#ifdef WITH_WSREP
if (WSREP_CLIENT(thd) && wsrep_sync_wait(thd)) goto error;
#endif /* WITH_WSREP */
if (check_db_name(&db_name))
{
my_error(ER_WRONG_DB_NAME, MYF(0), db_name.str);
@ -4570,6 +4575,9 @@ end_with_restore_list:
/* lex->unit.cleanup() is called outside, no need to call it here */
break;
case SQLCOM_SHOW_CREATE_EVENT:
#ifdef WITH_WSREP
if (WSREP_CLIENT(thd) && wsrep_sync_wait(thd)) goto error;
#endif /* WITH_WSREP */
res= Events::show_create_event(thd, lex->spname->m_db,
lex->spname->m_name);
break;
@ -4798,16 +4806,29 @@ end_with_restore_list:
#ifdef WITH_WSREP
if (lex->type & (
REFRESH_GRANT |
REFRESH_HOSTS |
REFRESH_DES_KEY_FILE |
REFRESH_GRANT |
REFRESH_HOSTS |
#ifdef HAVE_OPENSSL
REFRESH_DES_KEY_FILE |
#endif
/*
Write all flush log statements except
FLUSH LOGS
FLUSH BINARY LOGS
Check reload_acl_and_cache for why.
*/
REFRESH_RELAY_LOG |
REFRESH_SLOW_LOG |
REFRESH_GENERAL_LOG |
REFRESH_ENGINE_LOG |
REFRESH_ERROR_LOG |
#ifdef HAVE_QUERY_CACHE
REFRESH_QUERY_CACHE_FREE |
REFRESH_QUERY_CACHE_FREE |
#endif /* HAVE_QUERY_CACHE */
REFRESH_STATUS |
REFRESH_USER_RESOURCES))
REFRESH_STATUS |
REFRESH_USER_RESOURCES))
{
WSREP_TO_ISOLATION_BEGIN(WSREP_MYSQL_DB, NULL, NULL)
WSREP_TO_ISOLATION_BEGIN_WRTCHK(WSREP_MYSQL_DB, NULL, NULL)
}
#endif /* WITH_WSREP*/
@ -4841,11 +4862,11 @@ end_with_restore_list:
*/
if (first_table)
{
WSREP_TO_ISOLATION_BEGIN(NULL, NULL, first_table);
WSREP_TO_ISOLATION_BEGIN_WRTCHK(NULL, NULL, first_table);
}
else
{
WSREP_TO_ISOLATION_BEGIN(WSREP_MYSQL_DB, NULL, NULL);
WSREP_TO_ISOLATION_BEGIN_WRTCHK(WSREP_MYSQL_DB, NULL, NULL);
}
}
#endif /* WITH_WSREP */
@ -5447,12 +5468,18 @@ create_sp_error:
}
case SQLCOM_SHOW_CREATE_PROC:
{
#ifdef WITH_WSREP
if (WSREP_CLIENT(thd) && wsrep_sync_wait(thd)) goto error;
#endif /* WITH_WSREP */
if (sp_show_create_routine(thd, TYPE_ENUM_PROCEDURE, lex->spname))
goto error;
break;
}
case SQLCOM_SHOW_CREATE_FUNC:
{
#ifdef WITH_WSREP
if (WSREP_CLIENT(thd) && wsrep_sync_wait(thd)) goto error;
#endif /* WITH_WSREP */
if (sp_show_create_routine(thd, TYPE_ENUM_FUNCTION, lex->spname))
goto error;
break;
@ -5465,6 +5492,9 @@ create_sp_error:
stored_procedure_type type= (lex->sql_command == SQLCOM_SHOW_PROC_CODE ?
TYPE_ENUM_PROCEDURE : TYPE_ENUM_FUNCTION);
#ifdef WITH_WSREP
if (WSREP_CLIENT(thd) && wsrep_sync_wait(thd)) goto error;
#endif /* WITH_WSREP */
if (sp_cache_routine(thd, type, lex->spname, FALSE, &sp))
goto error;
if (!sp || sp->show_routine_code(thd))
@ -5489,6 +5519,9 @@ create_sp_error:
goto error;
}
#ifdef WITH_WSREP
if (WSREP_CLIENT(thd) && wsrep_sync_wait(thd)) goto error;
#endif /* WITH_WSREP */
if (show_create_trigger(thd, lex->spname))
goto error; /* Error has been already logged. */
@ -7333,6 +7366,12 @@ void mysql_parse(THD *thd, char *rawbuf, uint length,
sql_statement_info[SQLCOM_SELECT].m_key);
status_var_increment(thd->status_var.com_stat[SQLCOM_SELECT]);
thd->update_stats();
#ifdef WITH_WSREP
if (WSREP_CLIENT(thd))
{
thd->wsrep_sync_wait_gtid= WSREP_GTID_UNDEFINED;
}
#endif /* WITH_WSREP */
}
DBUG_VOID_RETURN;
}