diff options
author | mskold@mysql.com <> | 2004-07-02 11:50:28 +0200 |
---|---|---|
committer | mskold@mysql.com <> | 2004-07-02 11:50:28 +0200 |
commit | c708619d0b4a3faa58504c3509c69d6390a80361 (patch) | |
tree | a0d229445eaa6ae09d57d783d579df95695049bf /mysql-test/t/ndb_basic.test | |
parent | 5e6a1a89ef679a241616d28413fa09808577db11 (diff) | |
download | mariadb-git-c708619d0b4a3faa58504c3509c69d6390a80361.tar.gz |
Added support for update of pk
Diffstat (limited to 'mysql-test/t/ndb_basic.test')
-rw-r--r-- | mysql-test/t/ndb_basic.test | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/mysql-test/t/ndb_basic.test b/mysql-test/t/ndb_basic.test index 271357ed561..ed13b36bf16 100644 --- a/mysql-test/t/ndb_basic.test +++ b/mysql-test/t/ndb_basic.test @@ -17,7 +17,7 @@ CREATE TABLE t1 ( attr1 INT NOT NULL ) ENGINE=ndbcluster; -INSERT INTO t1 VALUES (9410,9412); +INSERT INTO t1 VALUES (9410,9412),(9411,9413); SELECT pk1 FROM t1; SELECT * FROM t1; @@ -27,11 +27,16 @@ SELECT t1.* FROM t1; UPDATE t1 SET attr1=1 WHERE pk1=9410; SELECT * FROM t1; -# Can't UPDATE PK! Test that correct error is returned --- error 1112 +# Update pk UPDATE t1 SET pk1=2 WHERE attr1=1; SELECT * FROM t1; +# Try to set same pk +# 1022: Can't write; duplicate key in table 't1' +-- error 1022 +UPDATE t1 SET pk1=2 WHERE attr1=9413; +SELECT * FROM t1; + # Delete the record DELETE FROM t1; SELECT * FROM t1; |