summaryrefslogtreecommitdiff
path: root/mysql-test/t/ndb_replace.test
diff options
context:
space:
mode:
authorunknown <mskold@mysql.com>2006-06-21 09:36:50 +0200
committerunknown <mskold@mysql.com>2006-06-21 09:36:50 +0200
commit296ab8a890d04cb60b126af2835b9c9cc62e09b5 (patch)
tree0d04d914a5045446ce185cfc302111c974d1c7c0 /mysql-test/t/ndb_replace.test
parent51934f6d70ab642daaffdb237bb5471e703dde3d (diff)
downloadmariadb-git-296ab8a890d04cb60b126af2835b9c9cc62e09b5.tar.gz
Fix for Bug #19906 REPLACE doesn't update TEXT fields correctly
Diffstat (limited to 'mysql-test/t/ndb_replace.test')
-rw-r--r--mysql-test/t/ndb_replace.test30
1 files changed, 28 insertions, 2 deletions
diff --git a/mysql-test/t/ndb_replace.test b/mysql-test/t/ndb_replace.test
index 6cad80ef8ea..94a11f7dfb2 100644
--- a/mysql-test/t/ndb_replace.test
+++ b/mysql-test/t/ndb_replace.test
@@ -6,7 +6,7 @@
#
--disable_warnings
-drop table if exists t1;
+drop table if exists t1,t2;
--enable_warnings
CREATE TABLE t1 (
@@ -27,6 +27,8 @@ replace into t1 (gesuchnr,benutzer_id) values (1,1);
select * from t1 order by gesuchnr;
drop table t1;
+# End of 4.1 tests
+
# bug#17431
CREATE TABLE t1(i INT PRIMARY KEY AUTO_INCREMENT,
j INT,
@@ -38,4 +40,28 @@ REPLACE INTO t1 (j,k) VALUES (1,42);
REPLACE INTO t1 (i,j) VALUES (17,2);
SELECT * from t1 ORDER BY i;
-# End of 4.1 tests
+# bug#19906
+CREATE TABLE t2 (a INT(11) NOT NULL,
+ b INT(11) NOT NULL,
+ c INT(11) NOT NULL,
+ x TEXT,
+ y TEXT,
+ z TEXT,
+ id INT(10) unsigned NOT NULL AUTO_INCREMENT,
+ i INT(11) DEFAULT NULL,
+ PRIMARY KEY (id),
+ UNIQUE KEY a (a,b,c)
+) ENGINE=ndbcluster;
+
+REPLACE INTO t2 (a,b,c,x,y,z,i) VALUES (1,1,1,'a','a','a',1),(1,1,1,'b','b','b',2), (1,1,1,'c','c','c',3);
+
+SELECT * FROM t2 ORDER BY id;
+
+REPLACE INTO t2(a,b,c,x,y,z,i) values (1,1,1,'a','a','a',1);
+REPLACE INTO t2(a,b,c,x,y,z,i) values (1,1,1,'b','b','b',2);
+
+SELECT * FROM t2 ORDER BY id;
+
+DROP TABLE t2;
+
+