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
98ecd742
Commit
98ecd742
authored
Oct 19, 2004
by
jan@hundin.mysql.fi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed bug #5835 load data infile...replace error with InnoDB table.
parent
f8c7a60c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
sql/ha_innodb.cc
sql/ha_innodb.cc
+7
-3
No files found.
sql/ha_innodb.cc
View file @
98ecd742
...
...
@@ -2445,9 +2445,10 @@ ha_innobase::write_row(
/* If the insert did not succeed we restore the value of
the auto-inc counter we used; note that this behavior was
introduced only in version 4.0.4.
NOTE that a REPLACE command handles a duplicate key error
NOTE that a REPLACE command and LOAD DATA INFILE REPLACE
handles a duplicate key error
itself, and we must not decrement the autoinc counter
if we are performing a
REPLACE statement
.
if we are performing a
those statements
.
NOTE 2: if there was an error, for example a deadlock,
which caused InnoDB to roll back the whole transaction
already in the call of row_insert_for_mysql(), we may no
...
...
@@ -2459,7 +2460,9 @@ ha_innobase::write_row(
if
(
error
==
DB_DUPLICATE_KEY
&&
(
user_thd
->
lex
->
sql_command
==
SQLCOM_REPLACE
||
user_thd
->
lex
->
sql_command
==
SQLCOM_REPLACE_SELECT
))
{
==
SQLCOM_REPLACE_SELECT
||
(
user_thd
->
lex
->
sql_command
==
SQLCOM_LOAD
&&
user_thd
->
lex
->
duplicates
==
DUP_REPLACE
)))
{
skip_auto_inc_decr
=
TRUE
;
}
...
...
@@ -5484,6 +5487,7 @@ innobase_query_is_replace(void)
thd
=
(
THD
*
)
innobase_current_thd
();
if
(
thd
->
lex
->
sql_command
==
SQLCOM_REPLACE
||
thd
->
lex
->
sql_command
==
SQLCOM_REPLACE_SELECT
||
(
thd
->
lex
->
sql_command
==
SQLCOM_LOAD
&&
thd
->
lex
->
duplicates
==
DUP_REPLACE
))
{
return
true
;
...
...
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