~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/suite/regression/r/686197.result

  • Committer: lbieber
  • Date: 2010-10-06 16:34:16 UTC
  • mfrom: (1816.1.3 build)
  • Revision ID: lbieber@orisndriz08-20101006163416-ea0sl59qgpglk21y
Merge Monty - Change the requirement from either libinnodb to libhaildb. Also, tied it to version 2.2
Merge Andrew - fix bug 650935: remove --compress from all clients
Merge Andrew - fix bug 653471: Add -A to drizzle client
Merge Travis - 621861 = To change C structs to C++ classes in Drizzle

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
CREATE TABLE t1 (A SERIAL);
2
 
INSERT INTO t1 VALUES (), (), ();
3
 
SELECT A from t1 ORDER BY A;
4
 
A
5
 
1
6
 
2
7
 
3
8
 
ALTER TABLE t1 ADD COLUMN b INT NOT NULL;
9
 
ERROR HY000: Either a DEFAULt value or NULL NULL description is required for a new column if table is not empty
10
 
SELECT A from t1 ORDER BY A;
11
 
A
12
 
1
13
 
2
14
 
3
15
 
SHOW CREATE TABLE t1;
16
 
Table   Create Table
17
 
t1      CREATE TABLE `t1` (
18
 
  `A` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT,
19
 
  UNIQUE KEY `A` (`A`)
20
 
) ENGINE=InnoDB COLLATE = utf8_general_ci
21
 
ALTER TABLE t1 ADD COLUMN b INT DEFAULT 1 NOT NULL;
22
 
SELECT A,B from t1 ORDER BY A;
23
 
A       B
24
 
1       1
25
 
2       1
26
 
3       1
27
 
DROP TABLE t1;
28
 
CREATE TABLE t1 (A SERIAL, b int);
29
 
INSERT INTO t1 VALUES (), (), ();
30
 
SELECT A,B from t1 ORDER BY A;
31
 
A       B
32
 
1       NULL
33
 
2       NULL
34
 
3       NULL
35
 
ALTER TABLE t1 MODIFY COLUMN b int not null;
36
 
ERROR 01000: Data truncated for column 'b' at row 1
37
 
SELECT A,B from t1 ORDER BY A;
38
 
A       B
39
 
1       NULL
40
 
2       NULL
41
 
3       NULL
42
 
SHOW CREATE TABLE t1;
43
 
Table   Create Table
44
 
t1      CREATE TABLE `t1` (
45
 
  `A` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT,
46
 
  `b` INT DEFAULT NULL,
47
 
  UNIQUE KEY `A` (`A`)
48
 
) ENGINE=InnoDB COLLATE = utf8_general_ci
49
 
ALTER TABLE t1 MODIFY COLUMN b int DEFAULT 42 NOT NULL;
50
 
SELECT A,B from t1 ORDER BY A;
51
 
A       B
52
 
1       42
53
 
2       42
54
 
3       42
55
 
DROP TABLE t1;
56
 
CREATE TABLE t1 (col6 int not null);
57
 
INSERT INTO t1 VALUES (2);
58
 
SELECT * FROM t1;
59
 
col6
60
 
2
61
 
alter table t1 modify column col6 int not null;
62
 
select * from t1;
63
 
col6
64
 
2
65
 
drop table t1;