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);
291
323
CREATE TABLE t1 (
292
request_id int NOT NULL auto_increment,
324
request_id int unsigned NOT NULL auto_increment,
293
325
user_id varchar(12) default NULL,
294
326
time_stamp datetime NOT NULL default '0000-00-00 00:00:00',
295
327
ip_address varchar(15) default NULL,
357
389
# Create the test tables
358
390
create table t1 (id int, a int, key idx(a));
359
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);
360
392
insert into t2(a) values(1),(2),(3),(4),(5),(6),(7),(8);
361
393
insert into t2(a) select a from t2;
362
394
insert into t2(a) select a from t2;