Commit 9e59b396 authored by unknown's avatar unknown
Browse files

Updated with feedback omer provided


mysql-test/t/ndb_dd_ddl.test:
  Updated test case with suggestions from omer
mysql-test/r/ndb_dd_ddl.result:
  Updated test case with suggestions from omer
parent 8adce14f
Loading
Loading
Loading
Loading
+19 −12
Original line number Diff line number Diff line
DROP TABLE IF EXISTS t1;
DROP DATABASE IF EXISTS mysqltest;
CREATE DATABASE mysqltest;
**** Begin Duplicate Statement Testing ****
CREATE LOGFILE GROUP lg1
ADD UNDOFILE 'undofile.dat'
@@ -38,16 +40,20 @@ ADD DATAFILE 'datafile2.dat'
INITIAL_SIZE 12M
ENGINE=NDB;
ERROR HY000: Failed to alter:  CREATE DATAFILE
CREATE TABLE t1
(pk1 int not null primary key, b int not null, c int not null)
tablespace ts1 storage disk
engine ndb;
CREATE TABLE t1
(pk1 int not null primary key, b int not null, c int not null)
tablespace ts1 storage disk
engine ndb;
CREATE TABLE mysqltest.t1
(pk1 INT NOT NULL PRIMARY KEY, b INT NOT NULL, c INT NOT NULL)
TABLESPACE ts1 STORAGE DISK
ENGINE=NDB;
CREATE TABLE mysqltest.t1
(pk1 INT NOT NULL PRIMARY KEY, b INT NOT NULL, c INT NOT NULL)
TABLESPACE ts1 STORAGE DISK
ENGINE=NDB;
ERROR 42S01: Table 't1' already exists
DROP TABLE t1;
CREATE TABLE mysqltest.t1
(pk1 INT NOT NULL PRIMARY KEY, b INT NOT NULL, c INT NOT NULL)
ENGINE=NDB;
ERROR 42S01: Table 't1' already exists
DROP TABLE mysqltest.t1;
ALTER TABLESPACE ts1
DROP DATAFILE 'datafile2.dat' 
ENGINE=NDB;
@@ -72,6 +78,7 @@ ENGINE=NDB;
DROP LOGFILE GROUP lg1 
ENGINE=NDB;
ERROR HY000: Failed to drop LOGFILE GROUP
DROP DATABASE IF EXISTS mysqltest;
**** End Duplicate Statement Testing ****

**** Begin Statment CaSe Testing ****
@@ -81,7 +88,7 @@ initiAL_siZE 16M
UnDo_BuFfEr_SiZe = 1M
ENGInE=NDb;
altER LOgFiLE GrOUp lg1
AdD UnDOfILe 'undofile02.dat'
AdD UnDOfILe 'uNdOfiLe02.daT'
INItIAl_SIzE 4M ENgINE nDB;
CrEAtE TABLEspaCE ts1
ADD DATAfilE 'datafile.dat'
@@ -89,7 +96,7 @@ UsE LoGFiLE GRoUP lg1
INITiaL_SizE 12M
ENGiNe NDb;
AlTeR tAbLeSpAcE ts1
AdD DaTaFiLe 'datafile2.dat'
AdD DaTaFiLe 'dAtAfiLe2.daT'
InItIaL_SiZe 12M
EnGiNe=NDB;
CREATE TABLE t1
@@ -98,7 +105,7 @@ TABLEspace ts1 storAGE dISk
ENGine nDb;
DROP TABLE t1;
AlteR TAblespaCE ts1
droP DATAfile 'datafile2.dat' 
droP DATAfile 'dAtAfiLe2.daT' 
ENGINE=NDB;
ALter tablesPACE ts1
dROp dAtAfIlE 'datafile.dat' 
+41 −12
Original line number Diff line number Diff line
@@ -5,10 +5,30 @@
#          Table spaces and log groups. Also to test 
#          Statement mixed case.
############################################
# Change Author:JBM
# Change Date 2006-01-19
# Change: Adding to test cases feedback from OB
# 1) The 'duplicate' tests.
#    a) The test is using the default (test) database and is not
#       attempting to create databases (only logs, table spaces and
#       tables). Is this intentional?
#    b) What about a duplication of table name when one exists on disk and
#       you are trying to create it again in memory?
#
#2) 'CaSE SensiTiVE' tests
#    a) Suggest you include a test case where the case difference is in
#       the file name. I know this is not an issue for *nix systems but
#       will be when we expand to Windows and Mac. Better put it in now.
############################################



-- source include/have_ndb.inc

--disable_warnings
DROP TABLE IF EXISTS t1;
DROP DATABASE IF EXISTS mysqltest;
CREATE DATABASE mysqltest;
--enable_warnings

############## Duplcate Statement Testing #########
@@ -62,18 +82,24 @@ ADD DATAFILE 'datafile2.dat'
INITIAL_SIZE 12M
ENGINE=NDB;

CREATE TABLE t1
(pk1 int not null primary key, b int not null, c int not null)
tablespace ts1 storage disk
engine ndb;
CREATE TABLE mysqltest.t1
(pk1 INT NOT NULL PRIMARY KEY, b INT NOT NULL, c INT NOT NULL)
TABLESPACE ts1 STORAGE DISK
ENGINE=NDB;

--error ER_TABLE_EXISTS_ERROR
CREATE TABLE t1
(pk1 int not null primary key, b int not null, c int not null)
tablespace ts1 storage disk
engine ndb;
CREATE TABLE mysqltest.t1
(pk1 INT NOT NULL PRIMARY KEY, b INT NOT NULL, c INT NOT NULL)
TABLESPACE ts1 STORAGE DISK
ENGINE=NDB;

DROP TABLE t1;
--error ER_TABLE_EXISTS_ERROR
CREATE TABLE mysqltest.t1
(pk1 INT NOT NULL PRIMARY KEY, b INT NOT NULL, c INT NOT NULL)
ENGINE=NDB;


DROP TABLE mysqltest.t1;

ALTER TABLESPACE ts1
DROP DATAFILE 'datafile2.dat' 
@@ -106,6 +132,9 @@ ENGINE=NDB;
--error ER_DROP_TABLESPACE_FAILED
DROP LOGFILE GROUP lg1 
ENGINE=NDB;

DROP DATABASE IF EXISTS mysqltest;

--echo **** End Duplicate Statement Testing ****
############# End Duplicate Statments ############
--echo
@@ -119,7 +148,7 @@ UnDo_BuFfEr_SiZe = 1M
ENGInE=NDb;

altER LOgFiLE GrOUp lg1
AdD UnDOfILe 'undofile02.dat'
AdD UnDOfILe 'uNdOfiLe02.daT'
INItIAl_SIzE 4M ENgINE nDB;

CrEAtE TABLEspaCE ts1
@@ -129,7 +158,7 @@ INITiaL_SizE 12M
ENGiNe NDb;

AlTeR tAbLeSpAcE ts1
AdD DaTaFiLe 'datafile2.dat'
AdD DaTaFiLe 'dAtAfiLe2.daT'
InItIaL_SiZe 12M
EnGiNe=NDB;

@@ -141,7 +170,7 @@ ENGine nDb;
DROP TABLE t1;

AlteR TAblespaCE ts1
droP DATAfile 'datafile2.dat' 
droP DATAfile 'dAtAfiLe2.daT' 
ENGINE=NDB;

ALter tablesPACE ts1