27
place_id int NOT NULL,
28
shows int DEFAULT '0' NOT NULL,
29
ishows int DEFAULT '0' NOT NULL,
30
ushows int DEFAULT '0' NOT NULL,
31
clicks int DEFAULT '0' NOT NULL,
32
iclicks int DEFAULT '0' NOT NULL,
33
uclicks int DEFAULT '0' NOT NULL,
27
place_id int (10) unsigned NOT NULL,
28
shows int(10) unsigned DEFAULT '0' NOT NULL,
29
ishows int(10) unsigned DEFAULT '0' NOT NULL,
30
ushows int(10) unsigned DEFAULT '0' NOT NULL,
31
clicks int(10) unsigned DEFAULT '0' NOT NULL,
32
iclicks int(10) unsigned DEFAULT '0' NOT NULL,
33
uclicks int(10) unsigned DEFAULT '0' NOT NULL,
35
35
PRIMARY KEY (place_id,ts)
49
lfdnr int NOT NULL default '0',
50
ticket int NOT NULL default '0',
49
lfdnr int(10) unsigned NOT NULL default '0',
50
ticket int(10) unsigned NOT NULL default '0',
51
51
client varchar(255) NOT NULL default '',
52
52
replyto varchar(255) NOT NULL default '',
53
53
subject varchar(100) NOT NULL default '',
54
timestamp int NOT NULL default '0',
54
timestamp int(10) unsigned NOT NULL default '0',
55
55
tstamp timestamp NOT NULL,
56
status int NOT NULL default '0',
56
status int(3) NOT NULL default '0',
57
57
type varchar(15) NOT NULL default '',
58
assignment int NOT NULL default '0',
59
fupcount int NOT NULL default '0',
60
parent int NOT NULL default '0',
61
activity int NOT NULL default '0',
62
priority int NOT NULL default '1',
58
assignment int(10) unsigned NOT NULL default '0',
59
fupcount int(4) unsigned NOT NULL default '0',
60
parent int(10) unsigned NOT NULL default '0',
61
activity int(10) unsigned NOT NULL default '0',
62
priority tinyint(1) unsigned NOT NULL default '1',
63
63
cc varchar(255) NOT NULL default '',
64
64
bcc varchar(255) NOT NULL default '',
65
65
body text NOT NULL,
76
76
INSERT INTO t1 VALUES (773,773,'','','',980257344,20010318180652,0,'Open',10,0,0,0,1,'','','','','');
78
alter table t1 change lfdnr lfdnr int not null auto_increment;
78
alter table t1 change lfdnr lfdnr int(10) unsigned not null auto_increment;
79
79
update t1 set status=1 where type='Open';
80
80
select status from t1;
105
105
CREATE TABLE t1 (
106
`id_param` int NOT NULL default '0',
106
`id_param` smallint(3) unsigned NOT NULL default '0',
107
107
`nom_option` char(40) NOT NULL default '',
108
`valid` int NOT NULL default '0',
108
`valid` tinyint(1) NOT NULL default '0',
109
109
KEY `id_param` (`id_param`,`nom_option`)
133
# Bug#5553 - Multi table UPDATE IGNORE fails on duplicate keys
137
`colA` int(10) unsigned NOT NULL auto_increment,
138
`colB` int(11) NOT NULL default '0',
141
INSERT INTO t1 VALUES (4433,5424);
143
`colC` int(10) unsigned NOT NULL default '0',
144
`colA` int(10) unsigned NOT NULL default '0',
145
`colD` int(10) unsigned NOT NULL default '0',
146
`colE` int(10) unsigned NOT NULL default '0',
147
`colF` int(10) unsigned NOT NULL default '0',
148
PRIMARY KEY (`colC`,`colA`,`colD`,`colE`)
150
INSERT INTO t2 VALUES (3,4433,10005,495,500);
151
INSERT INTO t2 VALUES (3,4433,10005,496,500);
152
INSERT INTO t2 VALUES (3,4433,10009,494,500);
153
INSERT INTO t2 VALUES (3,4433,10011,494,500);
154
INSERT INTO t2 VALUES (3,4433,10005,497,500);
155
INSERT INTO t2 VALUES (3,4433,10013,489,500);
156
INSERT INTO t2 VALUES (3,4433,10005,494,500);
157
INSERT INTO t2 VALUES (3,4433,10005,493,500);
158
INSERT INTO t2 VALUES (3,4433,10005,492,500);
159
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;
135
167
create table t1 (c1 int, c2 char(6), c3 int);
222
254
delete from t1 order by a limit 1;
223
255
show status like 'handler_read%';
225
# PBXT: this select returns a different result to
226
# innodb because the 2 updates above change different rows
227
257
select * from t1;
228
258
update t1 set a=a+10,b=1 order by a limit 3;
229
259
update t1 set a=a+11,b=2 order by a limit 3;
293
323
CREATE TABLE t1 (
294
request_id int NOT NULL auto_increment,
324
request_id int unsigned NOT NULL auto_increment,
295
325
user_id varchar(12) default NULL,
296
326
time_stamp datetime NOT NULL default '0000-00-00 00:00:00',
297
327
ip_address varchar(15) default NULL,
359
389
# Create the test tables
360
390
create table t1 (id int, a int, key idx(a));
361
create table t2 (id int not null auto_increment primary key, a int);
391
create table t2 (id int unsigned not null auto_increment primary key, a int);
362
392
insert into t2(a) values(1),(2),(3),(4),(5),(6),(7),(8);
363
393
insert into t2(a) select a from t2;
364
394
insert into t2(a) select a from t2;
366
396
update t2 set a=id;
367
397
insert into t1 select * from t2;
369
# PBXT: Rows changed are different here between InnoDB and PBXT
370
# because PBXT does not update the rows that are not modified!
371
# InnoDB seems to do this....
372
399
# Check that the number of matched rows is correct when the temporary
373
400
# table is small enough to not be converted to MyISAM
374
401
select count(*) from t1 join t2 on (t1.a=t2.a);