mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
BUG#5390 - problems with merge tables
Problem #1: INSERT...SELECT, Version for 5.1. Extended the unique table check by a check of lock data. Merge sub-tables cannot be detected by doing name checks only. mysql-test/r/create.result: BUG#5390 - problems with merge tables Removed a duplicate test. mysql-test/r/merge.result: BUG#5390 - problems with merge tables Problem #1: INSERT...SELECT Added test results. mysql-test/t/create.test: BUG#5390 - problems with merge tables Removed a duplicate test. mysql-test/t/merge.test: BUG#5390 - problems with merge tables Problem #1: INSERT...SELECT Added tests. sql/lock.cc: BUG#5390 - problems with merge tables Problem #1: INSERT...SELECT, Version for 5.1. Added a new function to find a duplicate lock in a list of tables. sql/mysql_priv.h: Problem #1: INSERT...SELECT, Version for 5.1. Added the thread handle to unique_table(). Added a declaration for the new function. sql/sql_base.cc: BUG#5390 - problems with merge tables Problem #1: INSERT...SELECT, Version for 5.1. Added the thread handle to unique_table(). Added a call to the new mysql_lock_have_duplicate(), which needs the thread handle, to unique_table(). sql/sql_delete.cc: BUG#5390 - problems with merge tables Problem #1: INSERT...SELECT, Version for 5.1. Added the thread handle to unique_table(). sql/sql_insert.cc: BUG#5390 - problems with merge tables Problem #1: INSERT...SELECT, Version for 5.1. Added the thread handle to unique_table(). sql/sql_load.cc: BUG#5390 - problems with merge tables Problem #1: INSERT...SELECT, Version for 5.1. Added the thread handle to unique_table(). sql/sql_parse.cc: BUG#5390 - problems with merge tables Problem #1: INSERT...SELECT, Version for 5.1. Added the thread handle to unique_table(). sql/sql_update.cc: BUG#5390 - problems with merge tables Problem #1: INSERT...SELECT, Version for 5.1. Added the thread handle to unique_table(). Replaced a call to find_table_in_local_list() by the newly extended unique_table().
This commit is contained in:
@ -722,3 +722,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;
|
||||
|
Reference in New Issue
Block a user