summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorunknown <magnus@neptunus.(none)>2004-09-20 12:40:53 +0200
committerunknown <magnus@neptunus.(none)>2004-09-20 12:40:53 +0200
commit812a07490b13da30b001f30aeae65e88db02fbc3 (patch)
tree0c91e4991d248b62cfd62eacbeda2f0b1735e86c /mysql-test
parentc06c007818d9456d65e8b05c14d966ce9d7a9a4d (diff)
downloadmariadb-git-812a07490b13da30b001f30aeae65e88db02fbc3.tar.gz
Ues buf pointer in get_ndb_value
Merge fixes mysql-test/r/ndb_insert.result: Correct test cases and result after merge mysql-test/t/ndb_insert.test: Correct test cases and result after merge sql/ha_ndbcluster.cc: Correct get_error_message after merge Use buf pointer in get_ndb_value
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/ndb_insert.result5
-rw-r--r--mysql-test/t/ndb_insert.test11
2 files changed, 12 insertions, 4 deletions
diff --git a/mysql-test/r/ndb_insert.result b/mysql-test/r/ndb_insert.result
index 3ee6780cc46..cdc445558b9 100644
--- a/mysql-test/r/ndb_insert.result
+++ b/mysql-test/r/ndb_insert.result
@@ -432,13 +432,12 @@ INSERT INTO t1 VALUES
SELECT COUNT(*) FROM t1;
COUNT(*)
2005
+rollback;
+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 COUNT(*) FROM t1;
-COUNT(*)
-2000
commit;
ERROR HY000: Got error 4350 'Transaction already aborted' from ndbcluster
select * from t1 where pk1=1;
diff --git a/mysql-test/t/ndb_insert.test b/mysql-test/t/ndb_insert.test
index 7ea25554ce3..310c16de3d8 100644
--- a/mysql-test/t/ndb_insert.test
+++ b/mysql-test/t/ndb_insert.test
@@ -441,6 +441,16 @@ select count(*) from t1;
#
+# Test that select count(*) can see inserts made in the same transaction
+#
+begin;
+SELECT COUNT(*) FROM t1;
+INSERT INTO t1 VALUES
+(2001,2001,2001),(2002,2002,2002),(2003,2003,2003),(2004,2004,2004),(2005,2005,2005);
+SELECT COUNT(*) FROM t1;
+rollback;
+
+#
# Insert duplicate rows, inside transaction
# try to commit
#
@@ -519,7 +529,6 @@ SELECT * FROM t1 WHERE pk1=10;
--error 1296
commit;
-SELECT COUNT(*) FROM t1;
select * from t1 where pk1=1;
select * from t1 where pk1=10;