RenameTable implements sql.TableRenamer.
(ctx *sql.Context, oldName string, newName string)
| 311 | _, vv, ok := sql.SystemVariables.GetGlobal("replica_is_loading_snapshot") |
| 312 | if !ok { |
| 313 | return false |
| 314 | } |
| 315 | if b, ok := vv.(int8); ok { |
| 316 | return b != 0 |
| 317 | } |
| 318 | return false |
| 319 | } |
| 320 | |
| 321 | // CreateTable implements sql.TableCreator. |
| 322 | func (d *Database) CreateTable(ctx *sql.Context, name string, schema sql.PrimaryKeySchema, collation sql.CollationID, comment string) error { |
| 323 | d.mu.Lock() |
| 324 | defer d.mu.Unlock() |
| 325 | return d.createAllTable(ctx, name, schema, collation, comment, false) |
| 326 | } |
| 327 | |
| 328 | // CreateTemporaryTable implements sql.CreateTemporaryTable. |
| 329 | func (d *Database) CreateTemporaryTable(ctx *sql.Context, name string, schema sql.PrimaryKeySchema, collation sql.CollationID) error { |
| 330 | d.mu.Lock() |
| 331 | defer d.mu.Unlock() |
nothing calls this directly
no test coverage detected