func checkApplyCreateNonExistsTableDoesNotPanic(c *C, txn kv.Transaction, builder *infoschema.Builder, dbID int64) { m := meta.NewMeta(txn) err := builder.ApplyDiff(m, &model.SchemaDiff{Type: model.ActionCreateTable, SchemaID: dbID, TableID: 999}) c.Assert(infoschema.ErrTableNotExists.Equal(err), IsTrue) }
func checkApplyCreateNonExistsSchemaDoesNotPanic(c *C, txn kv.Transaction, builder *infoschema.Builder) { m := meta.NewMeta(txn) err := builder.ApplyDiff(m, &model.SchemaDiff{Type: model.ActionCreateSchema, SchemaID: 999}) c.Assert(infoschema.ErrDatabaseNotExists.Equal(err), IsTrue) }