1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Merge branch '10.1' into 10.2

This commit is contained in:
Sergei Golubchik
2016-02-25 18:19:55 +01:00
372 changed files with 10986 additions and 4523 deletions

View File

@ -4518,6 +4518,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);
@ -4571,6 +4576,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;
@ -4799,16 +4807,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*/
@ -4842,11 +4863,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 */
@ -5451,12 +5472,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;
@ -5469,6 +5496,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))
@ -5493,6 +5523,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. */
@ -7339,6 +7372,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;
}