Commit 29d84f73 authored by unknown's avatar unknown
Browse files

Merge mskold@bk-internal.mysql.com:/home/bk/mysql-4.1

into mysql.com:/usr/local/home/marty/MySQL/test/mysql-4.1


sql/ha_ndbcluster.cc:
  Auto merged
parents 1faf1d23 be5b6f4d
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -78,9 +78,9 @@ unique key(a)
) engine=ndb;
insert into t1 values(1, 'aAa');
insert into t1 values(2, 'aaa');
ERROR 23000: Can't write, because of unique constraint, to table 't1'
ERROR 23000: Duplicate entry '2' for key 1
insert into t1 values(3, 'AAA');
ERROR 23000: Can't write, because of unique constraint, to table 't1'
ERROR 23000: Duplicate entry '3' for key 1
select * from t1 order by p;
p	a
1	aAa
+4 −4
Original line number Diff line number Diff line
@@ -22,7 +22,7 @@ select * from t1 where b = 4 order by a;
a	b	c
3	4	6
insert into t1 values(8, 2, 3);
ERROR 23000: Can't write, because of unique constraint, to table 't1'
ERROR 23000: Duplicate entry '8' for key 1
select * from t1 order by a;
a	b	c
1	2	3
@@ -65,7 +65,7 @@ select * from t2 where b = 4 order by a;
a	b	c
3	4	6
insert into t2 values(8, 2, 3);
ERROR 23000: Can't write, because of unique constraint, to table 't2'
ERROR 23000: Duplicate entry '8' for key 1
select * from t2 order by a;
a	b	c
1	2	3
@@ -123,7 +123,7 @@ pk a
3	NULL
4	4
insert into t1 values (5,0);
ERROR 23000: Can't write, because of unique constraint, to table 't1'
ERROR 23000: Duplicate entry '5' for key 1
select * from t1 order by pk;
pk	a
-1	NULL
@@ -156,7 +156,7 @@ pk a b c
0	NULL	18	NULL
1	3	19	abc
insert into t2 values(2,3,19,'abc');
ERROR 23000: Can't write, because of unique constraint, to table 't2'
ERROR 23000: Duplicate entry '2' for key 1
select * from t2 order by pk;
pk	a	b	c
-1	1	17	NULL
+32 −13
Original line number Diff line number Diff line
@@ -535,27 +535,46 @@ count(*)
2000
insert into t1 select * from t1 where b < 10 order by pk1;
ERROR 23000: Duplicate entry '9' for key 1
DELETE FROM t1 WHERE pk1=2;
begin;
INSERT IGNORE INTO t1 VALUES(1,2,3);
ERROR HY000: Table storage engine for 't1' doesn't have this option
commit;
select * from t1 where pk1=1;
INSERT IGNORE INTO t1 VALUES(1,2,3),(2,3,4);
select * from t1 where pk1 < 3 order by pk1;
pk1	b	c
0	0	0
1	1	1
INSERT IGNORE INTO t1 VALUES(1,2,3);
ERROR HY000: Table storage engine for 't1' doesn't have this option
select * from t1 where pk1=1;
2	3	4
rollback;
INSERT IGNORE INTO t1 VALUES(1,2,3),(2,3,4);
select * from t1 where pk1 < 3 order by pk1;
pk1	b	c
0	0	0
1	1	1
REPLACE INTO t1 values(1, 2, 3);
2	3	4
REPLACE INTO t1 values(1, 78, 3);
select * from t1 where pk1=1;
pk1	b	c
1	2	3
INSERT INTO t1 VALUES(1,1,1) ON DUPLICATE KEY UPDATE b=79;
ERROR HY000: Table storage engine for 't1' doesn't have this option
select * from t1 where pk1=1;
1	78	3
INSERT INTO t1 VALUES(1,1,1),(3,4,5) ON DUPLICATE KEY UPDATE b=79;
select * from t1 where pk1 < 4 order by pk1;
pk1	b	c
0	0	0
1	79	3
2	3	4
3	79	3
INSERT INTO t1 VALUES(1,1,1),(3,4,5) ON DUPLICATE KEY UPDATE b=pk1+c;
select * from t1 where pk1 < 4 order by pk1;
pk1	b	c
0	0	0
1	4	3
2	3	4
3	6	3
DELETE FROM t1 WHERE pk1 = 2 OR pk1 = 4 OR pk1 = 6;
INSERT INTO t1 VALUES(1,1,1),(2,2,17),(3,4,5) ON DUPLICATE KEY UPDATE pk1=b;
select * from t1 where pk1 = b and b != c order by pk1;
pk1	b	c
1	2	3
2	2	17
4	4	3
6	6	3
DROP TABLE t1;
CREATE TABLE t1(a INT) ENGINE=ndb;
INSERT IGNORE INTO t1 VALUES (1);
+2 −2
Original line number Diff line number Diff line
@@ -86,9 +86,9 @@ create table t1 (
# ok
insert into t1 values(1, 'aAa');
# fail
--error 1169
--error 1062
insert into t1 values(2, 'aaa');
--error 1169
--error 1062
insert into t1 values(3, 'AAA');
# 1
select * from t1 order by p;
+4 −4
Original line number Diff line number Diff line
@@ -21,7 +21,7 @@ select * from t1 where b = 4 order by b;
insert into t1 values(7,8,3);
select * from t1 where b = 4 order by a;

-- error 1169
-- error 1062
insert into t1 values(8, 2, 3);
select * from t1 order by a;
delete from t1 where a = 1;
@@ -49,7 +49,7 @@ select * from t2 where c = 6;
insert into t2 values(7,8,3);
select * from t2 where b = 4 order by a;

-- error 1169
-- error 1062
insert into t2 values(8, 2, 3);
select * from t2 order by a;
delete from t2 where a = 1;
@@ -92,7 +92,7 @@ insert into t1 values (-1,NULL), (0,0), (1,NULL),(2,2),(3,NULL),(4,4);

select * from t1 order by pk;

--error 1169
--error 1062
insert into t1 values (5,0);
select * from t1 order by pk;
delete from t1 where a = 0;
@@ -111,7 +111,7 @@ insert into t2 values (-1,1,17,NULL),(0,NULL,18,NULL),(1,3,19,'abc');

select * from t2 order by pk;

--error 1169
--error 1062
insert into t2 values(2,3,19,'abc');
select * from t2 order by pk;
delete from t2 where c IS NOT NULL;
Loading