1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Bug#11151: LOAD DATA INFILE commits transaction in 5.0

No longer create or commit transactions within the loading of files.


mysql-test/r/loaddata.result:
  Add test result.
mysql-test/t/loaddata.test:
  Add test case.
sql/sql_load.cc:
  Loading data from a table should neither create new transactions nor destroy
  (by committing or rolling-back) existing transactions.
This commit is contained in:
unknown
2006-03-28 17:15:45 -05:00
parent e4e2e5024a
commit e0a48a8c40
3 changed files with 38 additions and 6 deletions

View File

@ -139,3 +139,18 @@ a b c
10 NULL Ten
15 NULL Fifteen
drop table t1, t2;
create table bug11151 (a int, b int) engine=InnoDB;
start transaction;
insert into bug11151 values (0, 0);
rollback;
select a, b from bug11151;
a b
delete from bug11151;
start transaction;
insert into bug11151 values (42, 0);
load data infile '../std_data_ln/loaddata5.dat' into table bug11151 fields terminated by '' enclosed by '' (a, b);
insert into bug11151 values (42, 99);
rollback;
select a, b from bug11151;
a b
drop table bug11151;

View File

@ -113,4 +113,26 @@ select * from t1;
# cleanup
drop table t1, t2;
#
# Bug#11151: LOAD DATA INFILE commits transaction in 5.0
#
create table bug11151 (a int, b int) engine=InnoDB;
start transaction;
insert into bug11151 values (0, 0);
rollback;
select a, b from bug11151;
delete from bug11151;
start transaction;
insert into bug11151 values (42, 0);
load data infile '../std_data_ln/loaddata5.dat' into table bug11151 fields terminated by '' enclosed by '' (a, b);
insert into bug11151 values (42, 99);
rollback;
select a, b from bug11151;
drop table bug11151;
# End of 5.0 tests