~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to mysql-test/t/multi_update.test

  • Committer: Monty Taylor
  • Date: 2008-07-01 14:33:36 UTC
  • mto: (28.1.12 backport_patch)
  • mto: This revision was merged to the branch mainline in revision 34.
  • Revision ID: monty@inaugust.com-20080701143336-8uihm7dhpu92rt0q
Somehow missed moving password.c. Duh.

Show diffs side-by-side

added added

removed removed

Lines of Context:
230
230
select * from t2;
231
231
drop table t1,t2;
232
232
 
233
 
CREATE TABLE t1 ( broj int(4) NOT NULL default '0',  naziv char(25) NOT NULL default 'NEPOZNAT',  PRIMARY KEY  (broj)) ENGINE=MyISAM;
 
233
CREATE TABLE t1 ( broj int(4) unsigned NOT NULL default '0',  naziv char(25) NOT NULL default 'NEPOZNAT',  PRIMARY KEY  (broj)) ENGINE=MyISAM;
234
234
INSERT INTO t1 VALUES (1,'jedan'),(2,'dva'),(3,'tri'),(4,'xxxxxxxxxx'),(5,'a'),(10,''),(11,''),(12,''),(13,'');
235
 
CREATE TABLE t2 ( broj int(4) NOT NULL default '0',  naziv char(25) NOT NULL default 'NEPOZNAT',  PRIMARY KEY  (broj)) ENGINE=MyISAM;
 
235
CREATE TABLE t2 ( broj int(4) unsigned NOT NULL default '0',  naziv char(25) NOT NULL default 'NEPOZNAT',  PRIMARY KEY  (broj)) ENGINE=MyISAM;
236
236
INSERT INTO t2 VALUES (1,'jedan'),(2,'dva'),(3,'tri'),(4,'xxxxxxxxxx'),(5,'a');
237
 
CREATE TABLE t3 ( broj int(4) NOT NULL default '0',  naziv char(25) NOT NULL default 'NEPOZNAT',  PRIMARY KEY  (broj)) ENGINE=MyISAM;
 
237
CREATE TABLE t3 ( broj int(4) unsigned NOT NULL default '0',  naziv char(25) NOT NULL default 'NEPOZNAT',  PRIMARY KEY  (broj)) ENGINE=MyISAM;
238
238
INSERT INTO t3 VALUES (1,'jedan'),(2,'dva');
239
239
update t1,t2 set t1.naziv="aaaa" where t1.broj=t2.broj;
240
240
update t1,t2,t3 set t1.naziv="bbbb", t2.naziv="aaaa" where t1.broj=t2.broj and t2.broj=t3.broj;
299
299
 
300
300
# Test multi-update and multi-delete with impossible where
301
301
 
302
 
create table t1(id1 int(5), field char(5));
303
 
create table t2(id2 int(5), field char(5));
 
302
create table t1(id1 smallint(5), field char(5));
 
303
create table t2(id2 smallint(5), field char(5));
304
304
 
305
305
insert into t1 values (1, 'a'), (2, 'aa');
306
306
insert into t2 values (1, 'b'), (2, 'bb');
380
380
#
381
381
# Test update with const tables
382
382
#
383
 
create table `t1` (`p_id` int(10) NOT NULL auto_increment, `p_code` varchar(20) NOT NULL default '', `p_active` int(1) NOT NULL default '1', PRIMARY KEY (`p_id`) );
384
 
create table `t2` (`c2_id` int(10) NULL auto_increment, `c2_p_id` int(10) NOT NULL default '0', `c2_note` text NOT NULL, `c2_active` int(1) NOT NULL default '1', PRIMARY KEY (`c2_id`), KEY `c2_p_id` (`c2_p_id`) );
 
383
create table `t1` (`p_id` int(10) unsigned NOT NULL auto_increment, `p_code` varchar(20) NOT NULL default '', `p_active` tinyint(1) unsigned NOT NULL default '1', PRIMARY KEY (`p_id`) );
 
384
create table `t2` (`c2_id` int(10) unsigned NULL auto_increment, `c2_p_id` int(10) unsigned NOT NULL default '0', `c2_note` text NOT NULL, `c2_active` tinyint(1) unsigned NOT NULL default '1', PRIMARY KEY (`c2_id`), KEY `c2_p_id` (`c2_p_id`) );
385
385
insert into t1 values (0,'A01-Comp',1);
386
386
insert into t1 values (0,'B01-Comp',1);
387
387
insert into t2 values (0,1,'A Note',1);
439
439
--disable_warnings
440
440
create table t1 (
441
441
  aclid bigint not null primary key, 
442
 
  status int(1) not null 
 
442
  status tinyint(1) not null 
443
443
) engine = innodb;
444
444
 
445
445
create table t2 (