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
5d80d3dc
Commit
5d80d3dc
authored
Oct 01, 2019
by
Will DeVries
Committed by
Sergei Petrunia
Mar 10, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove last_insert_id field from clustrix_connection.
parent
2070b82f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
7 deletions
+9
-7
storage/clustrixdb/clustrix_connection.cc
storage/clustrixdb/clustrix_connection.cc
+3
-2
storage/clustrixdb/clustrix_connection.h
storage/clustrixdb/clustrix_connection.h
+2
-3
storage/clustrixdb/ha_clustrixdb.cc
storage/clustrixdb/ha_clustrixdb.cc
+4
-2
No files found.
storage/clustrixdb/clustrix_connection.cc
View file @
5d80d3dc
...
...
@@ -255,7 +255,8 @@ my_ulonglong clustrix_connection::rows_affected()
}
int
clustrix_connection
::
write_row
(
ulonglong
clustrix_table_oid
,
uchar
*
packed_row
,
size_t
packed_size
)
uchar
*
packed_row
,
size_t
packed_size
,
ulonglong
*
last_insert_id
)
{
int
error_code
;
command_length
=
0
;
...
...
@@ -275,7 +276,7 @@ int clustrix_connection::write_row(ulonglong clustrix_table_oid,
if
((
error_code
=
read_query_response
()))
return
error_code
;
last_insert_id
=
clustrix_net
.
insert_id
;
*
last_insert_id
=
clustrix_net
.
insert_id
;
return
error_code
;
}
...
...
storage/clustrixdb/clustrix_connection.h
View file @
5d80d3dc
...
...
@@ -40,7 +40,6 @@ class clustrix_connection
bool
has_statement_trans
;
public:
ulonglong
last_insert_id
;
clustrix_connection
()
:
command_buffer
(
NULL
),
command_buffer_length
(
0
),
command_length
(
0
)
{
...
...
@@ -89,8 +88,8 @@ class clustrix_connection
int
run_query
(
String
&
stmt
);
my_ulonglong
rows_affected
();
int
write_row
(
ulonglong
clustrix_table_oid
,
uchar
*
packed_row
,
size_t
packed_size
);
int
write_row
(
ulonglong
clustrix_table_oid
,
uchar
*
packed_row
,
size_t
packed_size
,
ulonglong
*
last_insert_id
);
int
key_update
(
ulonglong
clustrix_table_oid
,
uchar
*
packed_key
,
size_t
packed_key_length
,
MY_BITMAP
*
update_set
,
...
...
storage/clustrixdb/ha_clustrixdb.cc
View file @
5d80d3dc
...
...
@@ -417,12 +417,14 @@ int ha_clustrixdb::write_row(const uchar *buf)
/* XXX: Clustrix may needs to return HA_ERR_AUTOINC_ERANGE if we hit that
error. */
ulonglong
last_insert_id
=
0
;
if
((
error_code
=
trx
->
write_row
(
clustrix_table_oid
,
packed_new_row
,
packed_size
)))
packed_new_row
,
packed_size
,
&
last_insert_id
)))
goto
err
;
if
(
table
->
next_number_field
)
insert_id_for_cur_row
=
trx
->
last_insert_id
;
insert_id_for_cur_row
=
last_insert_id
;
err:
if
(
packed_size
)
...
...
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