~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/r/update.result

  • Committer: Monty Taylor
  • Date: 2008-08-02 01:03:15 UTC
  • mto: (236.1.42 codestyle)
  • mto: This revision was merged to the branch mainline in revision 261.
  • Revision ID: monty@inaugust.com-20080802010315-65h5938pymg9d99z
Moved m4 macros to top-level m4 dir, per GNU standards (and where gettext wanted it :)

Show diffs side-by-side

added added

removed removed

Lines of Context:
51
51
drop table t1;
52
52
CREATE TABLE t1
53
53
(
54
 
place_id int (10) unsigned NOT NULL,
55
 
shows int(10) unsigned DEFAULT '0' NOT NULL,
56
 
ishows int(10) unsigned DEFAULT '0' NOT NULL,
57
 
ushows int(10) unsigned DEFAULT '0' NOT NULL,
58
 
clicks int(10) unsigned DEFAULT '0' NOT NULL,
59
 
iclicks int(10) unsigned DEFAULT '0' NOT NULL,
60
 
uclicks int(10) unsigned DEFAULT '0' NOT NULL,
 
54
place_id int unsigned NOT NULL,
 
55
shows int unsigned DEFAULT '0' NOT NULL,
 
56
ishows int unsigned DEFAULT '0' NOT NULL,
 
57
ushows int unsigned DEFAULT '0' NOT NULL,
 
58
clicks int unsigned DEFAULT '0' NOT NULL,
 
59
iclicks int unsigned DEFAULT '0' NOT NULL,
 
60
uclicks int unsigned DEFAULT '0' NOT NULL,
61
61
ts timestamp,
62
62
PRIMARY KEY (place_id,ts)
63
63
);
69
69
1       1
70
70
drop table t1;
71
71
CREATE TABLE t1 (
72
 
lfdnr int(10) unsigned NOT NULL default '0',
73
 
ticket int(10) unsigned NOT NULL default '0',
 
72
lfdnr int unsigned NOT NULL default '0',
 
73
ticket int unsigned NOT NULL default '0',
74
74
client varchar(255) NOT NULL default '',
75
75
replyto varchar(255) NOT NULL default '',
76
76
subject varchar(100) NOT NULL default '',
77
 
timestamp int(10) unsigned NOT NULL default '0',
 
77
timestamp int unsigned NOT NULL default '0',
78
78
tstamp timestamp NOT NULL,
79
 
status int(3) NOT NULL default '0',
 
79
status int NOT NULL default '0',
80
80
type varchar(15) NOT NULL default '',
81
 
assignment int(10) unsigned NOT NULL default '0',
82
 
fupcount int(4) unsigned NOT NULL default '0',
83
 
parent int(10) unsigned NOT NULL default '0',
84
 
activity int(10) unsigned NOT NULL default '0',
85
 
priority tinyint(1) unsigned NOT NULL default '1',
 
81
assignment int unsigned NOT NULL default '0',
 
82
fupcount int unsigned NOT NULL default '0',
 
83
parent int unsigned NOT NULL default '0',
 
84
activity int unsigned NOT NULL default '0',
 
85
priority tinyint unsigned NOT NULL default '1',
86
86
cc varchar(255) NOT NULL default '',
87
87
bcc varchar(255) NOT NULL default '',
88
88
body text NOT NULL,
96
96
KEY ticket (ticket)
97
97
) ENGINE=MyISAM;
98
98
INSERT INTO t1 VALUES (773,773,'','','',980257344,20010318180652,0,'Open',10,0,0,0,1,'','','','','');
99
 
alter table t1 change lfdnr lfdnr int(10) unsigned not null auto_increment;
 
99
alter table t1 change lfdnr lfdnr int unsigned not null auto_increment;
100
100
update t1 set status=1 where type='Open';
101
101
select status from t1;
102
102
status
142
142
update t1 set b=(select distinct 1 from (select * from t2) a);
143
143
drop table t1,t2;
144
144
CREATE TABLE t1 (
145
 
`id_param` smallint(3) unsigned NOT NULL default '0',
 
145
`id_param` smallint unsigned NOT NULL default '0',
146
146
`nom_option` char(40) NOT NULL default '',
147
 
`valid` tinyint(1) NOT NULL default '0',
 
147
`valid` tinyint NOT NULL default '0',
148
148
KEY `id_param` (`id_param`,`nom_option`)
149
149
) ENGINE=MyISAM;
150
150
INSERT INTO t1 (id_param,nom_option,valid) VALUES (185,'600x1200',1);
169
169
2       0       1       2       4
170
170
2       2       0       1       7
171
171
drop table t1;
172
 
CREATE TABLE t1 ( 
173
 
`colA` int(10) unsigned NOT NULL auto_increment,
174
 
`colB` int(11) NOT NULL default '0',
175
 
PRIMARY KEY  (`colA`)
176
 
);
177
 
INSERT INTO t1 VALUES (4433,5424);
178
 
CREATE TABLE t2 (
179
 
`colC` int(10) unsigned NOT NULL default '0',
180
 
`colA` int(10) unsigned NOT NULL default '0',
181
 
`colD` int(10) unsigned NOT NULL default '0',
182
 
`colE` int(10) unsigned NOT NULL default '0',
183
 
`colF` int(10) unsigned NOT NULL default '0',
184
 
PRIMARY KEY  (`colC`,`colA`,`colD`,`colE`)
185
 
);
186
 
INSERT INTO t2 VALUES (3,4433,10005,495,500);
187
 
INSERT INTO t2 VALUES (3,4433,10005,496,500);
188
 
INSERT INTO t2 VALUES (3,4433,10009,494,500);
189
 
INSERT INTO t2 VALUES (3,4433,10011,494,500);
190
 
INSERT INTO t2 VALUES (3,4433,10005,497,500);
191
 
INSERT INTO t2 VALUES (3,4433,10013,489,500);
192
 
INSERT INTO t2 VALUES (3,4433,10005,494,500);
193
 
INSERT INTO t2 VALUES (3,4433,10005,493,500);
194
 
INSERT INTO t2 VALUES (3,4433,10005,492,500);
195
 
UPDATE IGNORE t2,t1 set t2.colE = t2.colE + 1,colF=0 WHERE t1.colA = t2.colA AND (t1.colB & 4096) > 0 AND (colE + 1) < colF;
196
 
SELECT * FROM t2;
197
 
colC    colA    colD    colE    colF
198
 
3       4433    10005   492     500
199
 
3       4433    10005   493     500
200
 
3       4433    10005   494     500
201
 
3       4433    10005   495     500
202
 
3       4433    10005   496     500
203
 
3       4433    10005   498     0
204
 
3       4433    10009   495     0
205
 
3       4433    10011   495     0
206
 
3       4433    10013   490     0
207
 
DROP TABLE t1;
208
 
DROP TABLE t2;
209
172
create table t1 (c1 int, c2 char(6), c3 int);
210
173
create table t2 (c1 int, c2 char(6));
211
174
insert into t1 values (1, "t1c2-1", 10), (2, "t1c2-2", 20);
441
404
Handler_read_rnd_next   0
442
405
DROP TABLE t1;
443
406
CREATE TABLE t1 (
444
 
a INT(11),
 
407
a int,
445
408
quux decimal( 31, 30 ),
446
409
UNIQUE KEY bar (a),
447
410
KEY quux (quux)