~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/t/csv_alter_table.test

  • Committer: Monty Taylor
  • Date: 2008-08-16 21:06:22 UTC
  • Revision ID: monty@inaugust.com-20080816210622-zpnn13unyinqzn72
Updated po files.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#-----------------------------------------------------------------------------
2
 
# csv_alter_table.test - .test file for MySQL regression suite
3
 
# Purpose:  To test the behavior of the CSV engine
4
 
#           Bug#31473 resulted in strict enforcement of non-nullable
5
 
#           columns in CSV engine.
6
 
#           Tests code for Bug#33696 - CSV engine allows NULLable
7
 
#           Columns via ALTER TABLE statements
8
 
#        
9
 
# Author pcrews
10
 
# Last modified:  2008-01-06
11
 
#-----------------------------------------------------------------------------
12
 
 
13
 
--source include/have_csv.inc
14
 
 
15
 
#############################################################################
16
 
# Testcase csv_alter_table.1: Positive test for ALTER table 
17
 
#                             
18
 
#############################################################################
19
 
DROP TABLE IF EXISTS t1;
20
 
 
21
 
CREATE TABLE t1 (a int NOT NULL) ENGINE = CSV;
22
 
ALTER TABLE t1 ADD COLUMN b CHAR(5) NOT NULL;
23
 
DESC t1;
24
 
ALTER TABLE t1 DROP COLUMN b;
25
 
DESC t1;
26
 
ALTER TABLE t1 MODIFY a BIGINT NOT NULL;
27
 
DESC t1;
28
 
ALTER TABLE t1 CHANGE a a INT NOT NULL;
29
 
DESC t1;
30
 
 
31
 
DROP TABLE t1;
32
 
 
33
 
#############################################################################
34
 
# Testcase csv_alter_table.2: Negative test for ALTER table
35
 
# These queries should not succeed / should throw errors
36
 
#############################################################################
37
 
DROP TABLE IF EXISTS t1;
38
 
 
39
 
CREATE TABLE t1 (a int NOT NULL) ENGINE = CSV;
40
 
--error ER_CHECK_NOT_IMPLEMENTED
41
 
ALTER TABLE t1 ADD COLUMN b CHAR(5);
42
 
DESC t1;
43
 
--error ER_CHECK_NOT_IMPLEMENTED
44
 
ALTER TABLE t1 MODIFY a BIGINT;
45
 
DESC t1;
46
 
--error ER_CHECK_NOT_IMPLEMENTED
47
 
ALTER TABLE t1 CHANGE a a INT;
48
 
DESC t1;
49
 
 
50
 
DROP TABLE t1;