~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/include/mix2.inc

Merged in changes from Andrey.

Show diffs side-by-side

added added

removed removed

Lines of Context:
66
66
drop database if exists mysqltest;
67
67
--enable_warnings
68
68
 
69
 
eval create table t1 (id int unsigned not null auto_increment, code tinyint unsigned not null, name char(20) not null, primary key (id), key (code), unique (name)) engine=$engine_type;
 
69
eval create table t1 (id int not null auto_increment, code tinyint not null, name char(20) not null, primary key (id), key (code), unique (name)) engine=$engine_type;
70
70
 
71
71
insert into t1 (code, name) values (1, 'Tim'), (1, 'Monty'), (2, 'David'), (2, 'Erik'), (3, 'Sasha'), (3, 'Jeremy'), (4, 'Matt');
72
72
select id, code, name from t1 order by id;
534
534
#
535
535
 
536
536
eval CREATE TABLE t1 (
537
 
  a int3 unsigned NOT NULL,
538
 
  b int1 unsigned NOT NULL,
 
537
  a int3 NOT NULL,
 
538
  b int1 NOT NULL,
539
539
  UNIQUE (a, b)
540
540
) ENGINE = $engine_type;
541
541
 
547
547
# Test INSERT DELAYED
548
548
#
549
549
 
550
 
eval CREATE TABLE t1 (a int unsigned NOT NULL) engine=$engine_type;
 
550
eval CREATE TABLE t1 (a int NOT NULL) engine=$engine_type;
551
551
# Can't test this in 3.23
552
552
# INSERT DELAYED INTO t1 VALUES (1);
553
553
INSERT INTO t1 VALUES (1);
772
772
# this works.
773
773
#
774
774
 
775
 
eval create table t1 (id int unsigned not null auto_increment, code tinyint unsigned not null, name char(20) not null, primary key (id), key (code), unique (name)) engine=$engine_type;
 
775
eval create table t1 (id int not null auto_increment, code tinyint not null, name char(20) not null, primary key (id), key (code), unique (name)) engine=$engine_type;
776
776
 
777
777
BEGIN;
778
778
SET SESSION TRANSACTION ISOLATION LEVEL SERIALIZABLE;
1099
1099
#
1100
1100
 
1101
1101
eval CREATE TABLE t1 (
1102
 
  `id` int(10) unsigned NOT NULL auto_increment,
1103
 
  `id_object` int(10) unsigned default '0',
1104
 
  `id_version` int(10) unsigned NOT NULL default '1',
 
1102
  `id` int(10) NOT NULL auto_increment,
 
1103
  `id_object` int(10) default '0',
 
1104
  `id_version` int(10) NOT NULL default '1',
1105
1105
  `label` varchar(100) NOT NULL default '',
1106
1106
  `description` text,
1107
1107
  PRIMARY KEY  (`id`),
1112
1112
INSERT INTO t1 VALUES("6", "3382", "9", "Test", NULL), ("7", "102", "5", "Le Pekin (Test)", NULL),("584", "1794", "4", "Test de resto", NULL),("837", "1822", "6", "Test 3", NULL),("1119", "3524", "1", "Societe Test", NULL),("1122", "3525", "1", "Fournisseur Test", NULL);
1113
1113
 
1114
1114
eval CREATE TABLE t2 (
1115
 
  `id` int(10) unsigned NOT NULL auto_increment,
1116
 
  `id_version` int(10) unsigned NOT NULL default '1',
 
1115
  `id` int(10) NOT NULL auto_increment,
 
1116
  `id_version` int(10) NOT NULL default '1',
1117
1117
  PRIMARY KEY  (`id`),
1118
1118
  KEY `id_version` (`id_version`)
1119
1119
) ENGINE=$engine_type;
1379
1379
# range optimizer problem
1380
1380
#
1381
1381
 
1382
 
eval create table t1 (x bigint unsigned not null primary key) engine=$engine_type;
 
1382
eval create table t1 (x bigint not null primary key) engine=$engine_type;
1383
1383
insert into t1(x) values (0xfffffffffffffff0),(0xfffffffffffffff1);
1384
1384
select * from t1;
1385
1385
select count(*) from t1 where x>0;