~ubuntu-branches/ubuntu/precise/mysql-5.1/precise

« back to all changes in this revision

Viewing changes to mysql-test/suite/engines/funcs/t/in_multicolumn_string_unique_constraint_error.test

  • Committer: Bazaar Package Importer
  • Author(s): Norbert Tretkowski
  • Date: 2010-05-11 18:47:32 UTC
  • mto: (2.1.2 sid) (1.2.1 upstream)
  • mto: This revision was merged to the branch mainline in revision 4.
  • Revision ID: james.westby@ubuntu.com-20100511184732-jhn055kfhxze24kt
Tags: upstream-5.1.46
ImportĀ upstreamĀ versionĀ 5.1.46

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
--disable_warnings
 
2
DROP TABLE IF EXISTS t1;
 
3
--enable_warnings
 
4
CREATE TABLE t1(c1 CHAR(10) NULL, c2 CHAR(10) NULL, c3 CHAR(10) NULL, UNIQUE(c1,c2,c3));
 
5
INSERT INTO t1 (c1,c2,c3) VALUES('abc','abc','abc');
 
6
INSERT INTO t1 (c1,c2,c3) VALUES('abc','abc','def');
 
7
INSERT INTO t1 (c1,c2,c3) VALUES('abc','def','abc');
 
8
INSERT INTO t1 (c1,c2,c3) VALUES('def','abc','abc');
 
9
INSERT INTO t1 (c1,c2,c3) VALUES('def','def','abc');
 
10
INSERT INTO t1 (c1,c2,c3) VALUES('def','abc','def');
 
11
INSERT INTO t1 (c1,c2,c3) VALUES('abc','def','def');
 
12
--error ER_DUP_ENTRY
 
13
INSERT INTO t1 (c1,c2,c3) VALUES('abc','abc','abc');
 
14
--error ER_DUP_ENTRY
 
15
INSERT INTO t1 (c1,c2,c3) VALUES('abc','abc','def');
 
16
--error ER_DUP_ENTRY
 
17
INSERT INTO t1 (c1,c2,c3) VALUES('abc','def','def');
 
18
--sorted_result
 
19
SELECT * FROM t1;
 
20
DROP TABLE t1;
 
21
CREATE TABLE t1(c1 VARCHAR(10) NULL, c2 VARCHAR(10) NULL, c3 VARCHAR(10) NULL, UNIQUE(c1,c2,c3));
 
22
INSERT INTO t1 (c1,c2,c3) VALUES('abc','abc','abc');
 
23
INSERT INTO t1 (c1,c2,c3) VALUES('abc','abc','def');
 
24
INSERT INTO t1 (c1,c2,c3) VALUES('abc','def','abc');
 
25
INSERT INTO t1 (c1,c2,c3) VALUES('def','abc','abc');
 
26
INSERT INTO t1 (c1,c2,c3) VALUES('def','def','abc');
 
27
INSERT INTO t1 (c1,c2,c3) VALUES('def','abc','def');
 
28
INSERT INTO t1 (c1,c2,c3) VALUES('abc','def','def');
 
29
--error ER_DUP_ENTRY
 
30
INSERT INTO t1 (c1,c2,c3) VALUES('abc','abc','abc');
 
31
--error ER_DUP_ENTRY
 
32
INSERT INTO t1 (c1,c2,c3) VALUES('abc','abc','def');
 
33
--error ER_DUP_ENTRY
 
34
INSERT INTO t1 (c1,c2,c3) VALUES('abc','def','def');
 
35
--sorted_result
 
36
SELECT * FROM t1;
 
37
DROP TABLE t1;
 
38
CREATE TABLE t1(c1 BINARY(10) NULL, c2 BINARY(10) NULL, c3 BINARY(10) NULL, UNIQUE(c1,c2,c3));
 
39
INSERT INTO t1 (c1,c2,c3) VALUES('abc','abc','abc');
 
40
INSERT INTO t1 (c1,c2,c3) VALUES('abc','abc','def');
 
41
INSERT INTO t1 (c1,c2,c3) VALUES('abc','def','abc');
 
42
INSERT INTO t1 (c1,c2,c3) VALUES('def','abc','abc');
 
43
INSERT INTO t1 (c1,c2,c3) VALUES('def','def','abc');
 
44
INSERT INTO t1 (c1,c2,c3) VALUES('def','abc','def');
 
45
INSERT INTO t1 (c1,c2,c3) VALUES('abc','def','def');
 
46
--error ER_DUP_ENTRY
 
47
INSERT INTO t1 (c1,c2,c3) VALUES('abc','abc','abc');
 
48
--error ER_DUP_ENTRY
 
49
INSERT INTO t1 (c1,c2,c3) VALUES('abc','abc','def');
 
50
--error ER_DUP_ENTRY
 
51
INSERT INTO t1 (c1,c2,c3) VALUES('abc','def','def');
 
52
--sorted_result
 
53
SELECT * FROM t1;
 
54
DROP TABLE t1;
 
55
CREATE TABLE t1(c1 VARBINARY(10) NULL, c2 VARBINARY(10) NULL, c3 VARBINARY(10) NULL, UNIQUE(c1,c2,c3));
 
56
INSERT INTO t1 (c1,c2,c3) VALUES('abc','abc','abc');
 
57
INSERT INTO t1 (c1,c2,c3) VALUES('abc','abc','def');
 
58
INSERT INTO t1 (c1,c2,c3) VALUES('abc','def','abc');
 
59
INSERT INTO t1 (c1,c2,c3) VALUES('def','abc','abc');
 
60
INSERT INTO t1 (c1,c2,c3) VALUES('def','def','abc');
 
61
INSERT INTO t1 (c1,c2,c3) VALUES('def','abc','def');
 
62
INSERT INTO t1 (c1,c2,c3) VALUES('abc','def','def');
 
63
--error ER_DUP_ENTRY
 
64
INSERT INTO t1 (c1,c2,c3) VALUES('abc','abc','abc');
 
65
--error ER_DUP_ENTRY
 
66
INSERT INTO t1 (c1,c2,c3) VALUES('abc','abc','def');
 
67
--error ER_DUP_ENTRY
 
68
INSERT INTO t1 (c1,c2,c3) VALUES('abc','def','def');
 
69
--sorted_result
 
70
SELECT * FROM t1;
 
71
DROP TABLE t1;
 
72