mirror of
https://github.com/MariaDB/server.git
synced 2025-09-02 09:41:40 +03:00
Bug #18472 race condition between multiple mysqld's when setting up cluster/schema
- check that event is the correct one, and only delete if wrong version
This commit is contained in:
@@ -2192,10 +2192,20 @@ ndbcluster_create_event(Ndb *ndb, const NDBTAB *ndbtab,
|
||||
DBUG_RETURN(-1);
|
||||
}
|
||||
|
||||
/*
|
||||
try retrieving the event, if table version/id matches, we will get
|
||||
a valid event. Otherwise we have a trailing event from before
|
||||
*/
|
||||
if (dict->getEvent(event_name))
|
||||
{
|
||||
DBUG_RETURN(0);
|
||||
}
|
||||
|
||||
/*
|
||||
trailing event from before; an error, but try to correct it
|
||||
*/
|
||||
if (dict->dropEvent(my_event.getName()))
|
||||
if (dict->getNdbError().code == NDB_INVALID_SCHEMA_OBJECT &&
|
||||
dict->dropEvent(my_event.getName()))
|
||||
{
|
||||
if (push_warning)
|
||||
push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_ERROR,
|
||||
|
Reference in New Issue
Block a user