If I lock the meta before check exists, will work this out.

Like

db.lockMeta(session);
if (getSchema().findTableOrView(session, data.tableName) != null) {
    if (ifNotExists) {
        return 0;
    }
    throw DbException.get(ErrorCode.TABLE_OR_VIEW_ALREADY_EXISTS_1, 
data.tableName);
}


SO, here is a problem, should this part multi-thread-able ?
This affect all H2 create dml, maybe we should check if multi-thread is 
enabled, we should lock the exists check.make the whole dml update is 
single threaded.

-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.

Reply via email to