~drizzle-trunk/drizzle/development

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
drop table if exists t1,t2,t3,t4,t5,t6;
drop database if exists mysqltest;
CREATE TABLE t1 (a varbinary(30) NOT NULL DEFAULT ' ',
b varbinary(1) NOT NULL DEFAULT ' ',
c varbinary(4) NOT NULL DEFAULT '0000',
d blob NULL,
e blob NULL,
f blob NULL,
g blob NULL,
h blob NULL,
i blob NULL,
j blob NULL,
k blob NULL,
l blob NULL,
m blob NULL,
n blob NULL,
o blob NULL,
p blob NULL,
q varbinary(30) NOT NULL DEFAULT ' ',
r varbinary(30) NOT NULL DEFAULT ' ',
s blob NULL,
t varbinary(4) NOT NULL DEFAULT ' ',
u varbinary(1) NOT NULL DEFAULT ' ',
v varbinary(30) NOT NULL DEFAULT ' ',
w varbinary(30) NOT NULL DEFAULT ' ',
x blob NULL,
y varbinary(5) NOT NULL DEFAULT ' ',
z varbinary(20) NOT NULL DEFAULT ' ',
a1 varbinary(30) NOT NULL DEFAULT ' ',
b1 blob NULL)
ENGINE=InnoDB DEFAULT COLLATE=utf8_bin;
INSERT into t1 (b) values ('1');
SHOW WARNINGS;
Level	Code	Message
SELECT * from t1;
a	b	c	d	e	f	g	h	i	j	k	l	m	n	o	p	q	r	s	t	u	v	w	x	y	z	a1	b1
 	1	0000	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	 	 	NULL	 	 	 	 	NULL	 	 	 	NULL
CREATE TEMPORARY TABLE t2 (a varbinary(30) NOT NULL DEFAULT ' ',
b varbinary(1) NOT NULL DEFAULT ' ',
c varbinary(4) NOT NULL DEFAULT '0000',
d blob NULL,
e blob NULL,
f blob NULL,
g blob NULL,
h blob NULL,
i blob NULL,
j blob NULL,
k blob NULL,
l blob NULL,
m blob NULL,
n blob NULL,
o blob NULL,
p blob NULL,
q varbinary(30) NOT NULL DEFAULT ' ',
r varbinary(30) NOT NULL DEFAULT ' ',
s blob NULL,
t varbinary(4) NOT NULL DEFAULT ' ',
u varbinary(1) NOT NULL DEFAULT ' ',
v varbinary(30) NOT NULL DEFAULT ' ',
w varbinary(30) NOT NULL DEFAULT ' ',
x blob NULL,
y varbinary(5) NOT NULL DEFAULT ' ',
z varbinary(20) NOT NULL DEFAULT ' ',
a1 varbinary(30) NOT NULL DEFAULT ' ',
b1 blob NULL)
ENGINE=MyISAM DEFAULT COLLATE=utf8_bin;
SHOW CREATE TABLE t2;
Table	Create Table
t2	CREATE TEMPORARY TABLE `t2` (
  `a` VARBINARY(30) NOT NULL DEFAULT 0x20,
  `b` VARBINARY(1) NOT NULL DEFAULT 0x20,
  `c` VARBINARY(4) NOT NULL DEFAULT 0x30303030,
  `d` BLOB,
  `e` BLOB,
  `f` BLOB,
  `g` BLOB,
  `h` BLOB,
  `i` BLOB,
  `j` BLOB,
  `k` BLOB,
  `l` BLOB,
  `m` BLOB,
  `n` BLOB,
  `o` BLOB,
  `p` BLOB,
  `q` VARBINARY(30) NOT NULL DEFAULT 0x20,
  `r` VARBINARY(30) NOT NULL DEFAULT 0x20,
  `s` BLOB,
  `t` VARBINARY(4) NOT NULL DEFAULT 0x20,
  `u` VARBINARY(1) NOT NULL DEFAULT 0x20,
  `v` VARBINARY(30) NOT NULL DEFAULT 0x20,
  `w` VARBINARY(30) NOT NULL DEFAULT 0x20,
  `x` BLOB,
  `y` VARBINARY(5) NOT NULL DEFAULT 0x20,
  `z` VARBINARY(20) NOT NULL DEFAULT 0x20,
  `a1` VARBINARY(30) NOT NULL DEFAULT 0x20,
  `b1` BLOB
) ENGINE=MyISAM COLLATE = utf8_bin
INSERT into t2 (b) values ('1');
SHOW WARNINGS;
Level	Code	Message
SELECT * from t2;
a	b	c	d	e	f	g	h	i	j	k	l	m	n	o	p	q	r	s	t	u	v	w	x	y	z	a1	b1
 	1	0000	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	 	 	NULL	 	 	 	 	NULL	 	 	 	NULL
drop table t1;
drop table t2;
create table bug20691 (i int, d datetime NOT NULL, dn datetime NULL);
insert into bug20691 values (7, DEFAULT, DEFAULT), (7, '1975-07-10 07:10:03', '1978-01-13 14:08:51'), (7, DEFAULT, DEFAULT);
ERROR HY000: Field 'd' doesn't have a default value
insert into bug20691 values (7, '1975-07-10 07:10:03', DEFAULT);
select * from bug20691 order by i asc;
i	d	dn
7	1975-07-10 07:10:03	NULL
drop table bug20691;
create table bug20691 (
b enum('small', 'medium', 'large', 'enormous', 'ellisonego') not null,
d date not null,
e int not null,
g blob not null,
h datetime not null,
i decimal not null,
x int);
insert into bug20691 values (3, '0007-01-01', 11, 17, '0019-01-01 00:00:00', 23, 1);
insert into bug20691 (x) values (2);
ERROR HY000: Field 'd' doesn't have a default value
insert into bug20691 values (3, '0007-01-01', 11, 17, '0019-01-01 00:00:00', 23, 3);
insert into bug20691 values (DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, 4);
ERROR HY000: Field 'b' doesn't have a default value
select * from bug20691 order by x asc;
b	d	e	g	h	i	x
large	0007-01-01	11	17	0019-01-01 00:00:00	23	1
large	0007-01-01	11	17	0019-01-01 00:00:00	23	3
drop table bug20691;
create table t1 (id int not null default 1);
insert into t1 values(default);
drop table t1;