summaryrefslogtreecommitdiff
path: root/mysql-test/r/ndb_insert.result
diff options
context:
space:
mode:
authorunknown <magnus@neptunus.(none)>2004-09-20 11:14:31 +0200
committerunknown <magnus@neptunus.(none)>2004-09-20 11:14:31 +0200
commitc06c007818d9456d65e8b05c14d966ce9d7a9a4d (patch)
tree59ea66791f538e967ab76f7581720025507db61b /mysql-test/r/ndb_insert.result
parent8b79d2b502455f604c80180e342920b16ed149fd (diff)
parent38238355c2acb7c64a653db2756856475dc04026 (diff)
downloadmariadb-git-c06c007818d9456d65e8b05c14d966ce9d7a9a4d.tar.gz
Merged new ndb_insert.test and .result
sql/ha_ndbcluster.cc: Auto merged sql/ha_ndbcluster.h: Auto merged mysql-test/r/ndb_insert.result: Merge new test cases mysql-test/t/ndb_insert.test: Merge new test cases
Diffstat (limited to 'mysql-test/r/ndb_insert.result')
-rw-r--r--mysql-test/r/ndb_insert.result119
1 files changed, 117 insertions, 2 deletions
diff --git a/mysql-test/r/ndb_insert.result b/mysql-test/r/ndb_insert.result
index 2944230deef..3ee6780cc46 100644
--- a/mysql-test/r/ndb_insert.result
+++ b/mysql-test/r/ndb_insert.result
@@ -420,6 +420,9 @@ INSERT INTO t1 VALUES
(1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5),
(6,6,6),(7,7,7),(8,8,8),(9,9,9),(10,10,10);
ERROR 23000: Duplicate entry '10' for key 1
+select count(*) from t1;
+count(*)
+2000
begin;
SELECT COUNT(*) FROM t1;
COUNT(*)
@@ -437,9 +440,121 @@ SELECT COUNT(*) FROM t1;
COUNT(*)
2000
commit;
-SELECT COUNT(*) FROM t1;
-COUNT(*)
+ERROR HY000: Got error 4350 'Transaction already aborted' from ndbcluster
+select * from t1 where pk1=1;
+pk1 b c
+1 1 1
+select * from t1 where pk1=10;
+pk1 b c
+10 10 10
+select count(*) from t1 where pk1 <= 10 order by pk1;
+count(*)
+11
+select count(*) from t1;
+count(*)
+2000
+begin;
+INSERT INTO t1 VALUES
+(1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5),
+(6,6,6),(7,7,7),(8,8,8),(9,9,9),(10,10,10);
+ERROR 23000: Duplicate entry '10' for key 1
+rollback;
+select * from t1 where pk1=1;
+pk1 b c
+1 1 1
+select * from t1 where pk1=10;
+pk1 b c
+10 10 10
+select count(*) from t1 where pk1 <= 10 order by pk1;
+count(*)
+11
+select count(*) from t1;
+count(*)
+2000
+begin;
+INSERT INTO t1 VALUES
+(1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5),
+(6,6,6),(7,7,7),(8,8,8),(9,9,9),(10,10,10);
+ERROR 23000: Duplicate entry '10' for key 1
+SELECT * FROM t1 WHERE pk1=10;
+ERROR HY000: Got error 4350 'Transaction already aborted' from ndbcluster
+rollback;
+select * from t1 where pk1=1;
+pk1 b c
+1 1 1
+select * from t1 where pk1=10;
+pk1 b c
+10 10 10
+select count(*) from t1 where pk1 <= 10 order by pk1;
+count(*)
+11
+select count(*) from t1;
+count(*)
+2000
+begin;
+INSERT INTO t1 VALUES
+(1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5),
+(6,6,6),(7,7,7),(8,8,8),(9,9,9),(10,10,10);
+ERROR 23000: Duplicate entry '10' for key 1
+SELECT * FROM t1 WHERE pk1=10;
+ERROR HY000: Got error 4350 'Transaction already aborted' from ndbcluster
+SELECT * FROM t1 WHERE pk1=10;
+ERROR HY000: Got error 4350 'Transaction already aborted' from ndbcluster
+commit;
+ERROR HY000: Got error 4350 'Transaction already aborted' from ndbcluster
+select * from t1 where pk1=1;
+pk1 b c
+1 1 1
+select * from t1 where pk1=10;
+pk1 b c
+10 10 10
+select count(*) from t1 where pk1 <= 10 order by pk1;
+count(*)
+11
+select count(*) from t1;
+count(*)
+2000
+begin;
+INSERT INTO t1 VALUES
+(1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5),
+(6,6,6),(7,7,7),(8,8,8),(9,9,9),(10,10,10);
+ERROR 23000: Duplicate entry '10' for key 1
+INSERT INTO t1 values (4000, 40, 44);
+ERROR HY000: Got error 4350 'Transaction already aborted' from ndbcluster
+rollback;
+select * from t1 where pk1=1;
+pk1 b c
+1 1 1
+select * from t1 where pk1=10;
+pk1 b c
+10 10 10
+select count(*) from t1 where pk1 <= 10 order by pk1;
+count(*)
+11
+select count(*) from t1;
+count(*)
2000
insert into t1 select * from t1 where b < 10 order by pk1;
ERROR 23000: Duplicate entry '9' for key 1
+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;
+pk1 b c
+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;
+pk1 b c
+1 1 1
+REPLACE INTO t1 values(1, 2, 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;
+pk1 b c
+1 2 3
DROP TABLE t1;