Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
de5eea6d
Commit
de5eea6d
authored
Mar 28, 2006
by
cmiller@zippy.(none)
Browse files
Options
Browse Files
Download
Plain Diff
Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into zippy.(none):/home/cmiller/work/mysql/mysql-5.0__bug11151
parents
a586f5a1
d51158fd
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
38 additions
and
6 deletions
+38
-6
mysql-test/r/loaddata.result
mysql-test/r/loaddata.result
+15
-0
mysql-test/t/loaddata.test
mysql-test/t/loaddata.test
+22
-0
sql/sql_load.cc
sql/sql_load.cc
+1
-6
No files found.
mysql-test/r/loaddata.result
View file @
de5eea6d
...
@@ -139,3 +139,18 @@ a b c
...
@@ -139,3 +139,18 @@ a b c
10 NULL Ten
10 NULL Ten
15 NULL Fifteen
15 NULL Fifteen
drop table t1, t2;
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;
mysql-test/t/loaddata.test
View file @
de5eea6d
...
@@ -113,4 +113,26 @@ select * from t1;
...
@@ -113,4 +113,26 @@ select * from t1;
# cleanup
# cleanup
drop
table
t1
,
t2
;
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
# End of 5.0 tests
sql/sql_load.cc
View file @
de5eea6d
...
@@ -381,7 +381,7 @@ bool mysql_load(THD *thd,sql_exchange *ex,TABLE_LIST *table_list,
...
@@ -381,7 +381,7 @@ bool mysql_load(THD *thd,sql_exchange *ex,TABLE_LIST *table_list,
table
->
file
->
extra
(
HA_EXTRA_NO_IGNORE_DUP_KEY
);
table
->
file
->
extra
(
HA_EXTRA_NO_IGNORE_DUP_KEY
);
table
->
next_number_field
=
0
;
table
->
next_number_field
=
0
;
}
}
ha_enable_transaction
(
thd
,
TRUE
);
if
(
file
>=
0
)
if
(
file
>=
0
)
my_close
(
file
,
MYF
(
0
));
my_close
(
file
,
MYF
(
0
));
free_blobs
(
table
);
/* if pack_blob was used */
free_blobs
(
table
);
/* if pack_blob was used */
...
@@ -396,9 +396,6 @@ bool mysql_load(THD *thd,sql_exchange *ex,TABLE_LIST *table_list,
...
@@ -396,9 +396,6 @@ bool mysql_load(THD *thd,sql_exchange *ex,TABLE_LIST *table_list,
if
(
error
)
if
(
error
)
{
{
if
(
transactional_table
)
ha_autocommit_or_rollback
(
thd
,
error
);
if
(
read_file_from_client
)
if
(
read_file_from_client
)
while
(
!
read_info
.
next_line
())
while
(
!
read_info
.
next_line
())
;
;
...
@@ -465,8 +462,6 @@ bool mysql_load(THD *thd,sql_exchange *ex,TABLE_LIST *table_list,
...
@@ -465,8 +462,6 @@ bool mysql_load(THD *thd,sql_exchange *ex,TABLE_LIST *table_list,
ignore
,
transactional_table
);
ignore
,
transactional_table
);
}
}
#endif
/*!EMBEDDED_LIBRARY*/
#endif
/*!EMBEDDED_LIBRARY*/
if
(
transactional_table
)
error
=
ha_autocommit_or_rollback
(
thd
,
error
);
err:
err:
if
(
thd
->
lock
)
if
(
thd
->
lock
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment