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
fe73e69b
Commit
fe73e69b
authored
Jul 06, 2005
by
mskold@mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge mysql.com:/usr/local/home/marty/MySQL/mysql-4.1
into mysql.com:/usr/local/home/marty/MySQL/mysql-5.0
parents
883efd7e
7063d85b
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
6 deletions
+20
-6
client/mysqldump.c
client/mysqldump.c
+9
-0
sql/ha_ndbcluster.cc
sql/ha_ndbcluster.cc
+10
-5
sql/ha_ndbcluster.h
sql/ha_ndbcluster.h
+1
-1
No files found.
client/mysqldump.c
View file @
fe73e69b
...
...
@@ -2561,6 +2561,7 @@ static int do_show_master_status(MYSQL *mysql_con)
row
=
mysql_fetch_row
(
master
);
if
(
row
&&
row
[
0
]
&&
row
[
1
])
{
/* SHOW MASTER STATUS reports file and position */
if
(
opt_comments
)
fprintf
(
md_result_file
,
"
\n
--
\n
-- Position to start replication or point-in-time "
...
...
@@ -2570,6 +2571,14 @@ static int do_show_master_status(MYSQL *mysql_con)
comment_prefix
,
row
[
0
],
row
[
1
]);
check_io
(
md_result_file
);
}
else
if
(
!
ignore_errors
)
{
/* SHOW MASTER STATUS reports nothing and --force is not enabled */
my_printf_error
(
0
,
"Error: Binlogging on server not active"
,
MYF
(
0
),
mysql_error
(
mysql_con
));
mysql_free_result
(
master
);
return
1
;
}
mysql_free_result
(
master
);
}
return
0
;
...
...
sql/ha_ndbcluster.cc
View file @
fe73e69b
...
...
@@ -1249,7 +1249,7 @@ int ha_ndbcluster::set_primary_key(NdbOperation *op, const byte *key)
}
int
ha_ndbcluster
::
set_primary_key_from_record
(
NdbOperation
*
op
,
const
byte
*
old_data
)
int
ha_ndbcluster
::
set_primary_key_from_record
(
NdbOperation
*
op
,
const
byte
*
record
)
{
KEY
*
key_info
=
table
->
key_info
+
table
->
s
->
primary_key
;
KEY_PART_INFO
*
key_part
=
key_info
->
key_part
;
...
...
@@ -1260,7 +1260,7 @@ int ha_ndbcluster::set_primary_key_from_record(NdbOperation *op, const byte *old
{
Field
*
field
=
key_part
->
field
;
if
(
set_ndb_key
(
op
,
field
,
key_part
->
fieldnr
-
1
,
old_data
+
key_part
->
offset
))
key_part
->
fieldnr
-
1
,
record
+
key_part
->
offset
))
ERR_RETURN
(
op
->
getNdbError
());
}
DBUG_RETURN
(
0
);
...
...
@@ -2102,7 +2102,7 @@ int ha_ndbcluster::update_row(const byte *old_data, byte *new_data)
if
((
table
->
s
->
primary_key
!=
MAX_KEY
)
&&
(
key_cmp
(
table
->
s
->
primary_key
,
old_data
,
new_data
)))
{
int
read_res
,
insert_res
,
delete_res
;
int
read_res
,
insert_res
,
delete_res
,
undo_res
;
DBUG_PRINT
(
"info"
,
(
"primary key update, doing pk read+delete+insert"
));
// Get all old fields, since we optimize away fields not in query
...
...
@@ -2131,9 +2131,14 @@ int ha_ndbcluster::update_row(const byte *old_data, byte *new_data)
DBUG_PRINT
(
"info"
,
(
"insert failed"
));
if
(
trans
->
commitStatus
()
==
NdbConnection
::
Started
)
{
// Undo write_row(new
_data)
// Undo delete_row(old
_data)
m_primary_key_update
=
TRUE
;
insert_res
=
write_row
((
byte
*
)
old_data
);
undo_res
=
write_row
((
byte
*
)
old_data
);
if
(
undo_res
)
push_warning
(
current_thd
,
MYSQL_ERROR
::
WARN_LEVEL_WARN
,
undo_res
,
"NDB failed undoing delete at primary key update"
);
m_primary_key_update
=
FALSE
;
}
DBUG_RETURN
(
insert_res
);
...
...
sql/ha_ndbcluster.h
View file @
fe73e69b
...
...
@@ -580,7 +580,7 @@ private:
friend
int
g_get_ndb_blobs_value
(
NdbBlob
*
ndb_blob
,
void
*
arg
);
int
get_ndb_blobs_value
(
NdbBlob
*
last_ndb_blob
);
int
set_primary_key
(
NdbOperation
*
op
,
const
byte
*
key
);
int
set_primary_key_from_record
(
NdbOperation
*
op
,
const
byte
*
old_data
);
int
set_primary_key_from_record
(
NdbOperation
*
op
,
const
byte
*
record
);
int
set_bounds
(
NdbIndexScanOperation
*
,
const
key_range
*
keys
[
2
],
uint
=
0
);
int
key_cmp
(
uint
keynr
,
const
byte
*
old_row
,
const
byte
*
new_row
);
int
set_index_key
(
NdbOperation
*
,
const
KEY
*
key_info
,
const
byte
*
key_ptr
);
...
...
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