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
23113169
Commit
23113169
authored
Nov 30, 2006
by
mskold/marty@mysql.com/linux.site
Browse files
Options
Browse Files
Download
Plain Diff
Merge mysql.com:/windows/Linux_space/MySQL/mysql-5.0
into mysql.com:/windows/Linux_space/MySQL/mysql-5.0-ndb
parents
a172df24
aa03fbca
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
9 deletions
+11
-9
sql/ha_ndbcluster.cc
sql/ha_ndbcluster.cc
+10
-8
sql/ha_ndbcluster.h
sql/ha_ndbcluster.h
+1
-1
No files found.
sql/ha_ndbcluster.cc
View file @
23113169
...
...
@@ -1610,7 +1610,7 @@ bool ha_ndbcluster::check_all_operations_for_error(NdbTransaction *trans,
* primary key or unique index values
*/
int
ha_ndbcluster
::
peek_indexed_rows
(
const
byte
*
record
)
int
ha_ndbcluster
::
peek_indexed_rows
(
const
byte
*
record
,
bool
check_pk
)
{
NdbTransaction
*
trans
=
m_active_trans
;
NdbOperation
*
op
;
...
...
@@ -1623,7 +1623,7 @@ int ha_ndbcluster::peek_indexed_rows(const byte *record)
(
NdbOperation
::
LockMode
)
get_ndb_lock_type
(
m_lock
.
type
);
first
=
NULL
;
if
(
table
->
s
->
primary_key
!=
MAX_KEY
)
if
(
check_pk
&&
table
->
s
->
primary_key
!=
MAX_KEY
)
{
/*
* Fetch any row with colliding primary key
...
...
@@ -2216,7 +2216,7 @@ int ha_ndbcluster::write_row(byte *record)
start_bulk_insert will set parameters to ensure that each
write_row is committed individually
*/
int
peek_res
=
peek_indexed_rows
(
record
);
int
peek_res
=
peek_indexed_rows
(
record
,
true
);
if
(
!
peek_res
)
{
...
...
@@ -2385,14 +2385,17 @@ int ha_ndbcluster::update_row(const byte *old_data, byte *new_data)
NdbScanOperation
*
cursor
=
m_active_cursor
;
NdbOperation
*
op
;
uint
i
;
bool
pk_update
=
(
table
->
s
->
primary_key
!=
MAX_KEY
&&
key_cmp
(
table
->
s
->
primary_key
,
old_data
,
new_data
));
DBUG_ENTER
(
"update_row"
);
/*
* If IGNORE the ignore constraint violations on primary and unique keys
* If IGNORE the ignore constraint violations on primary and unique keys,
* but check that it is not part of INSERT ... ON DUPLICATE KEY UPDATE
*/
if
(
m_ignore_dup_key
)
if
(
m_ignore_dup_key
&&
thd
->
lex
->
sql_command
==
SQLCOM_UPDATE
)
{
int
peek_res
=
peek_indexed_rows
(
new_data
);
int
peek_res
=
peek_indexed_rows
(
new_data
,
pk_update
);
if
(
!
peek_res
)
{
...
...
@@ -2411,8 +2414,7 @@ int ha_ndbcluster::update_row(const byte *old_data, byte *new_data)
}
/* Check for update of primary key for special handling */
if
((
table
->
s
->
primary_key
!=
MAX_KEY
)
&&
(
key_cmp
(
table
->
s
->
primary_key
,
old_data
,
new_data
)))
if
(
pk_update
)
{
int
read_res
,
insert_res
,
delete_res
,
undo_res
;
...
...
sql/ha_ndbcluster.h
View file @
23113169
...
...
@@ -661,7 +661,7 @@ private:
const
NdbOperation
*
first
,
const
NdbOperation
*
last
,
uint
errcode
);
int
peek_indexed_rows
(
const
byte
*
record
);
int
peek_indexed_rows
(
const
byte
*
record
,
bool
check_pk
);
int
unique_index_read
(
const
byte
*
key
,
uint
key_len
,
byte
*
buf
);
int
ordered_index_scan
(
const
key_range
*
start_key
,
...
...
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