Commit f07a80f7 authored by jmiller@mysql.com's avatar jmiller@mysql.com

Updated with feedback omer provided

parent 8e5e0afa
DROP TABLE IF EXISTS t1; DROP TABLE IF EXISTS t1;
DROP DATABASE IF EXISTS mysqltest;
CREATE DATABASE mysqltest;
**** Begin Duplicate Statement Testing **** **** Begin Duplicate Statement Testing ****
CREATE LOGFILE GROUP lg1 CREATE LOGFILE GROUP lg1
ADD UNDOFILE 'undofile.dat' ADD UNDOFILE 'undofile.dat'
...@@ -38,16 +40,20 @@ ADD DATAFILE 'datafile2.dat' ...@@ -38,16 +40,20 @@ ADD DATAFILE 'datafile2.dat'
INITIAL_SIZE 12M INITIAL_SIZE 12M
ENGINE=NDB; ENGINE=NDB;
ERROR HY000: Failed to alter: CREATE DATAFILE ERROR HY000: Failed to alter: CREATE DATAFILE
CREATE TABLE t1 CREATE TABLE mysqltest.t1
(pk1 int not null primary key, b int not null, c int not null) (pk1 INT NOT NULL PRIMARY KEY, b INT NOT NULL, c INT NOT NULL)
tablespace ts1 storage disk TABLESPACE ts1 STORAGE DISK
engine ndb; ENGINE=NDB;
CREATE TABLE t1 CREATE TABLE mysqltest.t1
(pk1 int not null primary key, b int not null, c int not null) (pk1 INT NOT NULL PRIMARY KEY, b INT NOT NULL, c INT NOT NULL)
tablespace ts1 storage disk TABLESPACE ts1 STORAGE DISK
engine ndb; ENGINE=NDB;
ERROR 42S01: Table 't1' already exists 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 ALTER TABLESPACE ts1
DROP DATAFILE 'datafile2.dat' DROP DATAFILE 'datafile2.dat'
ENGINE=NDB; ENGINE=NDB;
...@@ -72,6 +78,7 @@ ENGINE=NDB; ...@@ -72,6 +78,7 @@ ENGINE=NDB;
DROP LOGFILE GROUP lg1 DROP LOGFILE GROUP lg1
ENGINE=NDB; ENGINE=NDB;
ERROR HY000: Failed to drop LOGFILE GROUP ERROR HY000: Failed to drop LOGFILE GROUP
DROP DATABASE IF EXISTS mysqltest;
**** End Duplicate Statement Testing **** **** End Duplicate Statement Testing ****
**** Begin Statment CaSe Testing **** **** Begin Statment CaSe Testing ****
...@@ -81,7 +88,7 @@ initiAL_siZE 16M ...@@ -81,7 +88,7 @@ initiAL_siZE 16M
UnDo_BuFfEr_SiZe = 1M UnDo_BuFfEr_SiZe = 1M
ENGInE=NDb; ENGInE=NDb;
altER LOgFiLE GrOUp lg1 altER LOgFiLE GrOUp lg1
AdD UnDOfILe 'undofile02.dat' AdD UnDOfILe 'uNdOfiLe02.daT'
INItIAl_SIzE 4M ENgINE nDB; INItIAl_SIzE 4M ENgINE nDB;
CrEAtE TABLEspaCE ts1 CrEAtE TABLEspaCE ts1
ADD DATAfilE 'datafile.dat' ADD DATAfilE 'datafile.dat'
...@@ -89,7 +96,7 @@ UsE LoGFiLE GRoUP lg1 ...@@ -89,7 +96,7 @@ UsE LoGFiLE GRoUP lg1
INITiaL_SizE 12M INITiaL_SizE 12M
ENGiNe NDb; ENGiNe NDb;
AlTeR tAbLeSpAcE ts1 AlTeR tAbLeSpAcE ts1
AdD DaTaFiLe 'datafile2.dat' AdD DaTaFiLe 'dAtAfiLe2.daT'
InItIaL_SiZe 12M InItIaL_SiZe 12M
EnGiNe=NDB; EnGiNe=NDB;
CREATE TABLE t1 CREATE TABLE t1
...@@ -98,7 +105,7 @@ TABLEspace ts1 storAGE dISk ...@@ -98,7 +105,7 @@ TABLEspace ts1 storAGE dISk
ENGine nDb; ENGine nDb;
DROP TABLE t1; DROP TABLE t1;
AlteR TAblespaCE ts1 AlteR TAblespaCE ts1
droP DATAfile 'datafile2.dat' droP DATAfile 'dAtAfiLe2.daT'
ENGINE=NDB; ENGINE=NDB;
ALter tablesPACE ts1 ALter tablesPACE ts1
dROp dAtAfIlE 'datafile.dat' dROp dAtAfIlE 'datafile.dat'
......
...@@ -5,10 +5,30 @@ ...@@ -5,10 +5,30 @@
# Table spaces and log groups. Also to test # Table spaces and log groups. Also to test
# Statement mixed case. # 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 -- source include/have_ndb.inc
--disable_warnings --disable_warnings
DROP TABLE IF EXISTS t1; DROP TABLE IF EXISTS t1;
DROP DATABASE IF EXISTS mysqltest;
CREATE DATABASE mysqltest;
--enable_warnings --enable_warnings
############## Duplcate Statement Testing ######### ############## Duplcate Statement Testing #########
...@@ -62,18 +82,24 @@ ADD DATAFILE 'datafile2.dat' ...@@ -62,18 +82,24 @@ ADD DATAFILE 'datafile2.dat'
INITIAL_SIZE 12M INITIAL_SIZE 12M
ENGINE=NDB; ENGINE=NDB;
CREATE TABLE t1 CREATE TABLE mysqltest.t1
(pk1 int not null primary key, b int not null, c int not null) (pk1 INT NOT NULL PRIMARY KEY, b INT NOT NULL, c INT NOT NULL)
tablespace ts1 storage disk TABLESPACE ts1 STORAGE DISK
engine ndb; ENGINE=NDB;
--error ER_TABLE_EXISTS_ERROR --error ER_TABLE_EXISTS_ERROR
CREATE TABLE t1 CREATE TABLE mysqltest.t1
(pk1 int not null primary key, b int not null, c int not null) (pk1 INT NOT NULL PRIMARY KEY, b INT NOT NULL, c INT NOT NULL)
tablespace ts1 storage disk TABLESPACE ts1 STORAGE DISK
engine ndb; 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 ALTER TABLESPACE ts1
DROP DATAFILE 'datafile2.dat' DROP DATAFILE 'datafile2.dat'
...@@ -106,6 +132,9 @@ ENGINE=NDB; ...@@ -106,6 +132,9 @@ ENGINE=NDB;
--error ER_DROP_TABLESPACE_FAILED --error ER_DROP_TABLESPACE_FAILED
DROP LOGFILE GROUP lg1 DROP LOGFILE GROUP lg1
ENGINE=NDB; ENGINE=NDB;
DROP DATABASE IF EXISTS mysqltest;
--echo **** End Duplicate Statement Testing **** --echo **** End Duplicate Statement Testing ****
############# End Duplicate Statments ############ ############# End Duplicate Statments ############
--echo --echo
...@@ -119,7 +148,7 @@ UnDo_BuFfEr_SiZe = 1M ...@@ -119,7 +148,7 @@ UnDo_BuFfEr_SiZe = 1M
ENGInE=NDb; ENGInE=NDb;
altER LOgFiLE GrOUp lg1 altER LOgFiLE GrOUp lg1
AdD UnDOfILe 'undofile02.dat' AdD UnDOfILe 'uNdOfiLe02.daT'
INItIAl_SIzE 4M ENgINE nDB; INItIAl_SIzE 4M ENgINE nDB;
CrEAtE TABLEspaCE ts1 CrEAtE TABLEspaCE ts1
...@@ -129,7 +158,7 @@ INITiaL_SizE 12M ...@@ -129,7 +158,7 @@ INITiaL_SizE 12M
ENGiNe NDb; ENGiNe NDb;
AlTeR tAbLeSpAcE ts1 AlTeR tAbLeSpAcE ts1
AdD DaTaFiLe 'datafile2.dat' AdD DaTaFiLe 'dAtAfiLe2.daT'
InItIaL_SiZe 12M InItIaL_SiZe 12M
EnGiNe=NDB; EnGiNe=NDB;
...@@ -141,7 +170,7 @@ ENGine nDb; ...@@ -141,7 +170,7 @@ ENGine nDb;
DROP TABLE t1; DROP TABLE t1;
AlteR TAblespaCE ts1 AlteR TAblespaCE ts1
droP DATAfile 'datafile2.dat' droP DATAfile 'dAtAfiLe2.daT'
ENGINE=NDB; ENGINE=NDB;
ALter tablesPACE ts1 ALter tablesPACE ts1
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment