~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/r/update.result

  • Committer: Monty Taylor
  • Date: 2008-09-15 17:24:04 UTC
  • Revision ID: monty@inaugust.com-20080915172404-ygh6hiyu0q7qpa9x
Removed strndup calls.

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 NOT NULL,
55
 
shows int DEFAULT '0' NOT NULL,
56
 
ishows int DEFAULT '0' NOT NULL,
57
 
ushows int DEFAULT '0' NOT NULL,
58
 
clicks int DEFAULT '0' NOT NULL,
59
 
iclicks int DEFAULT '0' NOT NULL,
60
 
uclicks int 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 NOT NULL default '0',
73
 
ticket int 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 NOT NULL default '0',
 
77
timestamp int unsigned NOT NULL default '0',
78
78
tstamp timestamp NOT NULL,
79
79
status int NOT NULL default '0',
80
80
type varchar(15) NOT NULL default '',
81
 
assignment int NOT NULL default '0',
82
 
fupcount int NOT NULL default '0',
83
 
parent int NOT NULL default '0',
84
 
activity int NOT NULL default '0',
85
 
priority int 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 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` int NOT NULL default '0',
 
145
`id_param` smallint unsigned NOT NULL default '0',
146
146
`nom_option` char(40) NOT NULL default '',
147
 
`valid` int 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);
246
246
show status like 'handler_read%';
247
247
Variable_name   Value
248
248
Handler_read_first      2
249
 
Handler_read_key        12
 
249
Handler_read_key        8
250
250
Handler_read_next       0
251
251
Handler_read_prev       0
252
252
Handler_read_rnd        2
256
256
show status like 'handler_read%';
257
257
Variable_name   Value
258
258
Handler_read_first      1
259
 
Handler_read_key        6
 
259
Handler_read_key        4
260
260
Handler_read_next       0
261
261
Handler_read_prev       0
262
262
Handler_read_rnd        1
266
266
show status like 'handler_read%';
267
267
Variable_name   Value
268
268
Handler_read_first      1
269
 
Handler_read_key        6
 
269
Handler_read_key        4
270
270
Handler_read_next       0
271
271
Handler_read_prev       0
272
272
Handler_read_rnd        1
279
279
show status like 'handler_read%';
280
280
Variable_name   Value
281
281
Handler_read_first      1
282
 
Handler_read_key        6
 
282
Handler_read_key        4
283
283
Handler_read_next       0
284
284
Handler_read_prev       0
285
285
Handler_read_rnd        1
332
332
show status like 'handler_read%';
333
333
Variable_name   Value
334
334
Handler_read_first      0
335
 
Handler_read_key        6
 
335
Handler_read_key        4
336
336
Handler_read_next       1
337
337
Handler_read_prev       0
338
338
Handler_read_rnd        1
347
347
ERROR 42S22: Unknown column 'f2' in 'order clause'
348
348
drop table t1;
349
349
CREATE TABLE t1 (
350
 
request_id int NOT NULL auto_increment,
 
350
request_id int unsigned NOT NULL auto_increment,
351
351
user_id varchar(12) default NULL,
352
352
time_stamp datetime NOT NULL default '0000-00-00 00:00:00',
353
353
ip_address varchar(15) default NULL,
424
424
DROP TABLE t1;
425
425
set tmp_table_size=1024;
426
426
create table t1 (id int, a int, key idx(a));
427
 
create table t2 (id int not null auto_increment primary key, a int);
 
427
create table t2 (id int unsigned not null auto_increment primary key, a int);
428
428
insert into t2(a) values(1),(2),(3),(4),(5),(6),(7),(8);
429
429
insert into t2(a) select a from t2;
430
430
insert into t2(a) select a from t2;
435
435
count(*)
436
436
64
437
437
update t1 join t2 on (t1.a=t2.a) set t1.id=t2.id;
438
 
affected rows: 0
439
 
info: Rows matched: 64  Changed: 0  Warnings: 0
 
438
affected rows: 64
 
439
info: Rows matched: 64  Changed: 64  Warnings: 0
440
440
insert into t2(a) select a from t2;
441
441
update t2 set a=id;
442
442
truncate t1;
445
445
count(*)
446
446
128
447
447
update t1 join t2 on (t1.a=t2.a) set t1.id=t2.id;
448
 
affected rows: 0
449
 
info: Rows matched: 128  Changed: 0  Warnings: 0
 
448
affected rows: 128
 
449
info: Rows matched: 128  Changed: 128  Warnings: 0
450
450
update t1 set a=1;
451
451
update t2 set a=1;
452
452
select count(*) from t1 join t2 on (t1.a=t2.a);
453
453
count(*)
454
454
16384
455
455
update t1 join t2 on (t1.a=t2.a) set t1.id=t2.id;
456
 
affected rows: 127
457
 
info: Rows matched: 128  Changed: 127  Warnings: 0
 
456
affected rows: 128
 
457
info: Rows matched: 128  Changed: 128  Warnings: 0
458
458
drop table t1,t2;
459
459
End of 5.0 tests