~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/t/regression_385808.test

  • Committer: Brian Aker
  • Date: 2009-02-21 00:18:15 UTC
  • Revision ID: brian@tangent.org-20090221001815-x20e8h71e984lvs1
Completion (?) of uint conversion.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
2
 
# https://bugs.launchpad.net/drizzle/+bug/385808
3
 
4
 
 
5
 
create temporary table t1 (v varchar(32) not null);
6
 
insert into t1 values ('def'),('abc'),('hij'),('3r4f');
7
 
select * from t1;
8
 
# Fast alter, no copy performed
9
 
alter table t1 change v v2 varchar(32);
10
 
select * from t1;
11
 
# Fast alter, no copy performed
12
 
alter table t1 change v2 v varchar(64);
13
 
select * from t1;
14
 
update t1 set v = 'lmn' where v = 'hij';
15
 
select * from t1;
16
 
# Regular alter table
17
 
alter table t1 add i int auto_increment not null primary key first;
18
 
select * from t1;
19
 
update t1 set i=5 where i=3;
20
 
select * from t1;
21
 
alter table t1 change i i bigint;
22
 
select * from t1;
23
 
alter table t1 add unique key (i, v);
24
 
select * from t1 where i between 2 and 4 and v in ('def','3r4f','lmn');
25
 
drop table t1;
26
 
 
27
 
# (Pulled from MySQL, it had a similar issue)
28
 
# Bug#38821: Assert table->auto_increment_field_not_null failed in open_table()
29
 
#
30
 
CREATE TABLE t1 (a INTEGER AUTO_INCREMENT PRIMARY KEY, b INTEGER NOT NULL);
31
 
INSERT IGNORE INTO t1 (b) VALUES (5);
32
 
 
33
 
CREATE TABLE IF NOT EXISTS t2 (a INTEGER NOT NULL AUTO_INCREMENT PRIMARY KEY)
34
 
  SELECT a FROM t1;
35
 
--error ER_DUP_ENTRY
36
 
CREATE TABLE IF NOT EXISTS t2 (a INTEGER NOT NULL AUTO_INCREMENT PRIMARY KEY)
37
 
  SELECT a FROM t1;
38
 
--error ER_DUP_ENTRY
39
 
CREATE TABLE IF NOT EXISTS t2 (a INTEGER NOT NULL AUTO_INCREMENT PRIMARY KEY)
40
 
  SELECT a FROM t1;
41
 
 
42
 
DROP TABLE t1, t2;