101 lines
3.0 KiB
Plaintext
101 lines
3.0 KiB
Plaintext
-- source include/have_multi_ndb.inc
|
|
|
|
#
|
|
# Check that all tables in a database are dropped when database is dropped
|
|
#
|
|
|
|
create database mysqltest;
|
|
create table mysqltest.t1 (a int primary key, b int) engine=ndb;
|
|
use mysqltest;
|
|
show tables;
|
|
|
|
drop database mysqltest;
|
|
create database mysqltest;
|
|
use mysqltest;
|
|
show tables;
|
|
|
|
drop database mysqltest;
|
|
|
|
# End of 4.1 tests
|
|
|
|
#
|
|
# bug#52225 - special characters in database name
|
|
#
|
|
create database `mysqltest.db`;
|
|
create table `mysqltest.db`.t1 (a int primary key, b int) engine=ndb;
|
|
alter table `mysqltest.db`.t1 algorithm=copy, add column c int;
|
|
alter table `mysqltest.db`.t1 algorithm=inplace, add column d int column_format dynamic;
|
|
drop table `mysqltest.db`.t1;
|
|
drop database `mysqltest.db`;
|
|
#
|
|
# bug# 54788 DROP DATABASE can remove hidden blob tables without removing parent tables
|
|
#
|
|
# Dropping a database on a server where Ndb tables with Blobs were
|
|
# 'shadowed' by a local table can result in Blob part tables being
|
|
# deleted, but the main table not being deleted.
|
|
#
|
|
|
|
--connection server1
|
|
# Create database with occluding table t1
|
|
create database newdb;
|
|
create table newdb.t1 (a int primary key) engine=innodb;
|
|
|
|
# Supress errors provoked by the "shadow table"
|
|
--disable_query_log
|
|
call mtr.add_suppression("Local table 'newdb.t1' .* shadows");
|
|
call mtr.add_suppression("Failed to update table definition");
|
|
call mtr.add_suppression("Distribution of CREATE TABLE");
|
|
--enable_query_log
|
|
|
|
--connection server2
|
|
# Create NDB table with blobs, lots of blobs to increase the probability that
|
|
# Ndb-list-objects returns a blob part table before the main table.
|
|
# NOTE! The create table works on this mysqld but fails on first mysqld which
|
|
# has a "shadow table"
|
|
--replace_regex /Node [0-9]+:/Node <nodeid>/
|
|
create table newdb.t1 (a int primary key,
|
|
b1 blob,
|
|
b2 blob,
|
|
b3 blob,
|
|
b4 blob,
|
|
b5 blob,
|
|
b6 blob,
|
|
b7 blob,
|
|
b8 blob,
|
|
b9 blob,
|
|
b10 blob,
|
|
b11 blob,
|
|
b12 blob,
|
|
b13 blob,
|
|
b14 blob,
|
|
b15 blob,
|
|
b16 blob,
|
|
b17 blob,
|
|
b18 blob,
|
|
b19 blob,
|
|
b20 blob,
|
|
b21 blob,
|
|
b22 blob,
|
|
b23 blob,
|
|
b24 blob,
|
|
b25 blob,
|
|
b26 blob,
|
|
b27 blob,
|
|
b28 blob,
|
|
b29 blob) engine = ndb;
|
|
|
|
--connection server1
|
|
drop database newdb;
|
|
|
|
--connection server2
|
|
# Now check that the table is gone
|
|
create database newdb;
|
|
use newdb;
|
|
show tables;
|
|
|
|
# Check that we can reuse the table name etc.
|
|
create table newdb.t1(a int primary key) engine=ndb;
|
|
show tables;
|
|
drop table t1;
|
|
drop database newdb;
|