1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

Manual merge of mysql-5.1-bugteam into mysql-trunk-merge.

Conflicts:

Text conflict in mysql-test/suite/rpl/t/rpl_get_master_version_and_clock.test
Text conflict in sql/item_func.cc
This commit is contained in:
Alexey Kopytov
2010-03-22 16:28:51 +03:00
20 changed files with 260 additions and 168 deletions

View File

@ -1905,4 +1905,42 @@ void debug_sync(THD *thd, const char *sync_point_name, size_t name_len)
DBUG_VOID_RETURN;
}
/**
Define debug sync action.
@param[in] thd thread handle
@param[in] action_str action string
@return status
@retval FALSE ok
@retval TRUE error
@description
The function is similar to @c debug_sync_eval_action but is
to be called immediately from the server code rather than
to be triggered by setting a value to DEBUG_SYNC system variable.
@note
The input string is copied prior to be fed to
@c debug_sync_eval_action to let the latter modify it.
Caution.
The function allocates in THD::mem_root and therefore
is not recommended to be deployed inside big loops.
*/
bool debug_sync_set_action(THD *thd, const char *action_str, size_t len)
{
bool rc;
char *value;
DBUG_ENTER("debug_sync_set_action");
DBUG_ASSERT(thd);
DBUG_ASSERT(action_str);
value= strmake_root(thd->mem_root, action_str, len);
rc= debug_sync_eval_action(thd, value);
DBUG_RETURN(rc);
}
#endif /* defined(ENABLED_DEBUG_SYNC) */