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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
f360ee77
Commit
f360ee77
authored
Jan 10, 2005
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix for failing INSERT IGNORE
parent
0b7895b9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
sql/sql_insert.cc
sql/sql_insert.cc
+5
-5
No files found.
sql/sql_insert.cc
View file @
f360ee77
...
...
@@ -292,7 +292,7 @@ bool mysql_insert(THD *thd,TABLE_LIST *table_list,
error
=
0
;
id
=
0
;
thd
->
proc_info
=
"update"
;
if
(
duplic
!=
DUP_ERROR
)
if
(
duplic
!=
DUP_ERROR
||
ignore
)
table
->
file
->
extra
(
HA_EXTRA_IGNORE_DUP_KEY
);
/*
let's *try* to start bulk inserts. It won't necessary
...
...
@@ -471,7 +471,7 @@ bool mysql_insert(THD *thd,TABLE_LIST *table_list,
table
->
next_number_field
=
0
;
thd
->
count_cuted_fields
=
CHECK_FIELD_IGNORE
;
thd
->
next_insert_id
=
0
;
// Reset this if wrongly used
if
(
duplic
!=
DUP_ERROR
)
if
(
duplic
!=
DUP_ERROR
||
ignore
)
table
->
file
->
extra
(
HA_EXTRA_NO_IGNORE_DUP_KEY
);
/* Reset value of LAST_INSERT_ID if no rows where inserted */
...
...
@@ -1606,7 +1606,7 @@ bool delayed_insert::handle_inserts(void)
info
.
ignore
=
row
->
ignore
;
info
.
handle_duplicates
=
row
->
dup
;
if
(
info
.
ignore
||
info
.
handle_duplicates
==
DUP_REPLACE
)
info
.
handle_duplicates
!=
DUP_ERROR
)
{
table
->
file
->
extra
(
HA_EXTRA_IGNORE_DUP_KEY
);
using_ignore
=
1
;
...
...
@@ -1806,7 +1806,7 @@ select_insert::prepare(List<Item> &values, SELECT_LEX_UNIT *u)
restore_record
(
table
,
s
->
default_values
);
// Get empty record
table
->
next_number_field
=
table
->
found_next_number_field
;
thd
->
cuted_fields
=
0
;
if
(
info
.
ignore
||
info
.
handle_duplicates
==
DUP_REPLACE
)
if
(
info
.
ignore
||
info
.
handle_duplicates
!=
DUP_ERROR
)
table
->
file
->
extra
(
HA_EXTRA_IGNORE_DUP_KEY
);
table
->
file
->
start_bulk_insert
((
ha_rows
)
0
);
thd
->
no_trans_update
=
0
;
...
...
@@ -2008,7 +2008,7 @@ select_create::prepare(List<Item> &values, SELECT_LEX_UNIT *u)
restore_record
(
table
,
s
->
default_values
);
// Get empty record
thd
->
cuted_fields
=
0
;
if
(
info
.
ignore
||
info
.
handle_duplicates
==
DUP_REPLACE
)
if
(
info
.
ignore
||
info
.
handle_duplicates
!=
DUP_ERROR
)
table
->
file
->
extra
(
HA_EXTRA_IGNORE_DUP_KEY
);
table
->
file
->
start_bulk_insert
((
ha_rows
)
0
);
thd
->
no_trans_update
=
0
;
...
...
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