diff options
author | unknown <gni@dev3-221.dev.cn.tlan> | 2008-01-09 11:17:50 +0800 |
---|---|---|
committer | unknown <gni@dev3-221.dev.cn.tlan> | 2008-01-09 11:17:50 +0800 |
commit | 64f02f7db49aa2b4fdf5db1fea27d1c213bfd2d5 (patch) | |
tree | e46bebbe4833c6dbef2abb1ac5010ab823817ec6 /mysql-test/t | |
parent | c503cf69ab739b5dea1961c338c7e1fdaeb727e0 (diff) | |
parent | bafa5fe8aa6a79ab5f28a9275d71647049709863 (diff) | |
download | mariadb-git-64f02f7db49aa2b4fdf5db1fea27d1c213bfd2d5.tar.gz |
Merge gni@bk-internal.mysql.com:/home/bk/mysql-5.0-ndb-bj
into dev3-221.dev.cn.tlan:/home/ngb/mysql/mysql-5.0/bug29851
sql/ha_ndbcluster.cc:
Auto merged
Diffstat (limited to 'mysql-test/t')
-rw-r--r-- | mysql-test/t/ndb_alter_table2.test | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/mysql-test/t/ndb_alter_table2.test b/mysql-test/t/ndb_alter_table2.test index 3861fcc6c9d..99c201f7370 100644 --- a/mysql-test/t/ndb_alter_table2.test +++ b/mysql-test/t/ndb_alter_table2.test @@ -81,3 +81,34 @@ select * from t1; select * from t1; drop table t1; + +#For BUG#29851 TRUNCATE causes error 4350 from cluster in INSERT... ON DUPLICATE KEY UPDATE + +connection con1; + +--disable_warnings +DROP TABLE IF EXISTS truncate_test; +--enable_warnings + +CREATE TABLE truncate_test ( + i INT PRIMARY KEY, + a INT, + b VARCHAR(11), + UNIQUE KEY (a) +) ENGINE = NDB; + +INSERT INTO truncate_test VALUES (1, 1, 'test') ON DUPLICATE KEY UPDATE b = 'new'; +INSERT INTO truncate_test VALUES (1, 1, 'test') ON DUPLICATE KEY UPDATE b = 'new'; + +connection con2; +TRUNCATE truncate_test; + +connection con1; +INSERT INTO truncate_test VALUES (1, 1, 'test') ON DUPLICATE KEY UPDATE b = 'new'; +SELECT * FROM truncate_test; + +connection con2; +INSERT INTO truncate_test VALUES (1, 1, 'test') ON DUPLICATE KEY UPDATE b = 'new'; +SELECT * FROM truncate_test; + +DROP TABLE truncate_test; |