summaryrefslogtreecommitdiff
path: root/mysql-test/r/merge.result
diff options
context:
space:
mode:
authoringo@mysql.com <>2005-12-07 19:52:26 +0100
committeringo@mysql.com <>2005-12-07 19:52:26 +0100
commit5aa315e23a86dc5d376df09a11654799a7a80843 (patch)
tree08b2239db39cadbbb81f584e0abeac0bf7993598 /mysql-test/r/merge.result
parent7ce92291f039f6ebec328205701da59603c21c69 (diff)
downloadmariadb-git-5aa315e23a86dc5d376df09a11654799a7a80843.tar.gz
BUG#5390 - problems with merge tables
Problem #1: INSERT...SELECT, Version for 4.1. INSERT ... SELECT with the same table on both sides (hidden below a MERGE table) does now work by buffering the select result. The duplicate detection works now after open_and_lock_tables() on the locks. I did not find a test case that failed without the change in sql_update.cc. I made the change anyway as it should in theory fix a possible MERGE table problem with multi-table update.
Diffstat (limited to 'mysql-test/r/merge.result')
-rw-r--r--mysql-test/r/merge.result49
1 files changed, 49 insertions, 0 deletions
diff --git a/mysql-test/r/merge.result b/mysql-test/r/merge.result
index 3035908688a..038ea43cabc 100644
--- a/mysql-test/r/merge.result
+++ b/mysql-test/r/merge.result
@@ -717,3 +717,52 @@ SELECT b FROM t2;
b
3
DROP TABLE t1, t2;
+create table t1(a int);
+create table t2(a int);
+insert into t1 values (1);
+insert into t2 values (2);
+create table t3 (a int) engine=merge union=(t1, t2) insert_method=first;
+select * from t3;
+a
+1
+2
+insert t2 select * from t2;
+select * from t2;
+a
+2
+2
+insert t3 select * from t1;
+select * from t3;
+a
+1
+1
+2
+2
+insert t1 select * from t3;
+select * from t1;
+a
+1
+1
+1
+1
+2
+2
+select * from t2;
+a
+2
+2
+select * from t3;
+a
+1
+1
+1
+1
+2
+2
+2
+2
+check table t1, t2;
+Table Op Msg_type Msg_text
+test.t1 check status OK
+test.t2 check status OK
+drop table t1, t2, t3;