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
8c5eebfc
Commit
8c5eebfc
authored
Mar 28, 2008
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge witty.:/Users/mattiasj/clones/bug21413-51-engines
into witty.:/Users/mattiasj/clones/bug21413-51-bugteam
parents
9d0385d6
d0b5b3fa
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
7 deletions
+18
-7
sql/sql_insert.cc
sql/sql_insert.cc
+18
-7
No files found.
sql/sql_insert.cc
View file @
8c5eebfc
...
...
@@ -701,8 +701,6 @@ bool mysql_insert(THD *thd,TABLE_LIST *table_list,
error
=
0
;
thd_proc_info
(
thd
,
"update"
);
if
(
duplic
!=
DUP_ERROR
||
ignore
)
table
->
file
->
extra
(
HA_EXTRA_IGNORE_DUP_KEY
);
if
(
duplic
==
DUP_REPLACE
&&
(
!
table
->
triggers
||
!
table
->
triggers
->
has_delete_triggers
()))
table
->
file
->
extra
(
HA_EXTRA_WRITE_CAN_REPLACE
);
...
...
@@ -720,8 +718,15 @@ bool mysql_insert(THD *thd,TABLE_LIST *table_list,
values_list.elements, and - if nothing else - to initialize
the code to make the call of end_bulk_insert() below safe.
*/
if
(
lock_type
!=
TL_WRITE_DELAYED
&&
!
thd
->
prelocked_mode
)
table
->
file
->
ha_start_bulk_insert
(
values_list
.
elements
);
#ifndef EMBEDDED_LIBRARY
if
(
lock_type
!=
TL_WRITE_DELAYED
)
#endif
/* EMBEDDED_LIBRARY */
{
if
(
duplic
!=
DUP_ERROR
||
ignore
)
table
->
file
->
extra
(
HA_EXTRA_IGNORE_DUP_KEY
);
if
(
!
thd
->
prelocked_mode
)
table
->
file
->
ha_start_bulk_insert
(
values_list
.
elements
);
}
thd
->
abort_on_warning
=
(
!
ignore
&&
(
thd
->
variables
.
sql_mode
&
(
MODE_STRICT_TRANS_TABLES
|
...
...
@@ -840,6 +845,9 @@ bool mysql_insert(THD *thd,TABLE_LIST *table_list,
table
->
file
->
print_error
(
my_errno
,
MYF
(
0
));
error
=
1
;
}
if
(
duplic
!=
DUP_ERROR
||
ignore
)
table
->
file
->
extra
(
HA_EXTRA_NO_IGNORE_DUP_KEY
);
transactional_table
=
table
->
file
->
has_transactions
();
if
((
changed
=
(
info
.
copied
||
info
.
deleted
||
info
.
updated
)))
...
...
@@ -932,8 +940,6 @@ bool mysql_insert(THD *thd,TABLE_LIST *table_list,
table
->
next_number_field
=
0
;
thd
->
count_cuted_fields
=
CHECK_FIELD_IGNORE
;
table
->
auto_increment_field_not_null
=
FALSE
;
if
(
duplic
!=
DUP_ERROR
||
ignore
)
table
->
file
->
extra
(
HA_EXTRA_NO_IGNORE_DUP_KEY
);
if
(
duplic
==
DUP_REPLACE
&&
(
!
table
->
triggers
||
!
table
->
triggers
->
has_delete_triggers
()))
table
->
file
->
extra
(
HA_EXTRA_WRITE_CANNOT_REPLACE
);
...
...
@@ -1267,7 +1273,12 @@ bool mysql_prepare_insert(THD *thd, TABLE_LIST *table_list,
select_lex
->
fix_prepare_information
(
thd
,
&
fake_conds
,
&
fake_conds
);
select_lex
->
first_execution
=
0
;
}
if
(
duplic
==
DUP_UPDATE
||
duplic
==
DUP_REPLACE
)
/*
Only call prepare_for_posistion() if we are not performing a DELAYED
operation. It will instead be executed by delayed insert thread.
*/
if
((
duplic
==
DUP_UPDATE
||
duplic
==
DUP_REPLACE
)
&&
(
table
->
reginfo
.
lock_type
!=
TL_WRITE_DELAYED
))
table
->
prepare_for_position
();
DBUG_RETURN
(
FALSE
);
}
...
...
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