mirror of
https://github.com/MariaDB/server.git
synced 2025-03-08 04:03:30 +01:00

except c2932. Bug#37232 and bug#31183 were fixed in the 6.0 branch only. They should be fixed in the plugin too, specially MySQL 6.0 is discontinued at this point. ------------------------------------------------------------------------ r2604 | inaam | 2008-08-21 09:37:06 -0500 (Thu, 21 Aug 2008) | 8 lines branches/6.0 bug#37232 Relax locking behaviour for REPLACE INTO t SELECT ... FROM t1. Now SELECT on t1 is performed as a consistent read when the isolation level is set to READ COMMITTED. Reviewed by: Heikki ------------------------------------------------------------------------ r2605 | inaam | 2008-08-21 09:59:33 -0500 (Thu, 21 Aug 2008) | 7 lines branches/6.0 Added a comment to clarify why distinct calls to read MySQL binary log file name and log position do not entail any race condition. Suggested by: Heikki ------------------------------------------------------------------------ r2956 | inaam | 2008-11-04 04:47:30 -0600 (Tue, 04 Nov 2008) | 11 lines branches/6.0 bug#31183 If the system tablespace runs out of space because 'autoextend' is not specified with innodb_data_file_path there was no error message printed to the error log. The client would get 'table full' error. This patch prints an appropriate error message to the error log. rb://43 Approved by: Marko ------------------------------------------------------------------------
58 lines
1.3 KiB
Text
58 lines
1.3 KiB
Text
-- source include/not_embedded.inc
|
|
-- source include/have_innodb.inc
|
|
|
|
--disable_warnings
|
|
drop table if exists t1;
|
|
--enable_warnings
|
|
|
|
# REPLACE INTO ... SELECT and INSERT INTO ... SELECT should do
|
|
# a consistent read of the source table.
|
|
|
|
connect (a,localhost,root,,);
|
|
connect (b,localhost,root,,);
|
|
connection a;
|
|
set session transaction isolation level read committed;
|
|
create table t1(a int not null) engine=innodb DEFAULT CHARSET=latin1;
|
|
create table t2 like t1;
|
|
insert into t2 values (1),(2),(3),(4),(5),(6),(7);
|
|
set autocommit=0;
|
|
|
|
# REPLACE INTO ... SELECT case
|
|
begin;
|
|
# this should not result in any locks on t2.
|
|
replace into t1 select * from t2;
|
|
|
|
connection b;
|
|
set session transaction isolation level read committed;
|
|
set autocommit=0;
|
|
# should not cuase a lock wait.
|
|
delete from t2 where a=5;
|
|
commit;
|
|
delete from t2;
|
|
commit;
|
|
connection a;
|
|
commit;
|
|
|
|
# INSERT INTO ... SELECT case
|
|
begin;
|
|
# this should not result in any locks on t2.
|
|
insert into t1 select * from t2;
|
|
|
|
connection b;
|
|
set session transaction isolation level read committed;
|
|
set autocommit=0;
|
|
# should not cuase a lock wait.
|
|
delete from t2 where a=5;
|
|
commit;
|
|
delete from t2;
|
|
commit;
|
|
connection a;
|
|
commit;
|
|
|
|
select * from t1;
|
|
drop table t1;
|
|
drop table t2;
|
|
|
|
connection default;
|
|
disconnect a;
|
|
disconnect b;
|