1
0
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:
tomas@poseidon.ndb.mysql.com
2006-03-23 22:49:02 +01:00
parent 6a3b28c25e
commit 57198f85d6
5 changed files with 32 additions and 7 deletions

View File

@@ -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,