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
aaa182b1
Commit
aaa182b1
authored
Oct 09, 2019
by
Will DeVries
Committed by
Sergei Petrunia
Mar 10, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix crash with update.
parent
04ca407d
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
3 deletions
+8
-3
storage/clustrixdb/clustrix_connection.cc
storage/clustrixdb/clustrix_connection.cc
+1
-1
storage/clustrixdb/ha_clustrixdb.cc
storage/clustrixdb/ha_clustrixdb.cc
+7
-2
No files found.
storage/clustrixdb/clustrix_connection.cc
View file @
aaa182b1
...
@@ -712,7 +712,7 @@ int clustrix_connection::update_query(String &stmt, LEX_CSTRING &dbname,
...
@@ -712,7 +712,7 @@ int clustrix_connection::update_query(String &stmt, LEX_CSTRING &dbname,
int
error_code
;
int
error_code
;
command_length
=
0
;
command_length
=
0
;
if
((
error_code
=
add_command_operand_uchar
(
CLUSTRIX_UPDATE_QUERY
)))
if
((
error_code
=
begin_command
(
CLUSTRIX_UPDATE_QUERY
)))
return
error_code
;
return
error_code
;
if
((
error_code
=
add_command_operand_str
((
uchar
*
)
dbname
.
str
,
dbname
.
length
)))
if
((
error_code
=
add_command_operand_str
((
uchar
*
)
dbname
.
str
,
dbname
.
length
)))
...
...
storage/clustrixdb/ha_clustrixdb.cc
View file @
aaa182b1
...
@@ -483,6 +483,9 @@ int ha_clustrixdb::direct_update_rows(ha_rows *update_rows)
...
@@ -483,6 +483,9 @@ int ha_clustrixdb::direct_update_rows(ha_rows *update_rows)
String
update_stmt
;
String
update_stmt
;
update_stmt
.
append
(
thd
->
query_string
.
str
());
update_stmt
.
append
(
thd
->
query_string
.
str
());
if
(
!
thd_test_options
(
thd
,
OPTION_NOT_AUTOCOMMIT
|
OPTION_BEGIN
))
trx
->
auto_commit_next
();
trx
->
update_query
(
update_stmt
,
table
->
s
->
db
,
update_rows
);
trx
->
update_query
(
update_stmt
,
table
->
s
->
db
,
update_rows
);
thd
->
get_stmt_da
()
->
set_overwrite_status
(
true
);
thd
->
get_stmt_da
()
->
set_overwrite_status
(
true
);
...
@@ -926,10 +929,12 @@ int ha_clustrixdb::external_lock(THD *thd, int lock_type)
...
@@ -926,10 +929,12 @@ int ha_clustrixdb::external_lock(THD *thd, int lock_type)
int
error_code
;
int
error_code
;
clustrix_connection
*
trx
=
get_trx
(
thd
,
&
error_code
);
clustrix_connection
*
trx
=
get_trx
(
thd
,
&
error_code
);
if
(
lock_type
!=
F_UNLCK
)
{
if
(
lock_type
!=
F_UNLCK
)
{
if
(
!
trx
->
has_open_transaction
())
trx
->
begin_transaction
();
trx
->
begin_transaction
();
trans_register_ha
(
thd
,
FALSE
,
clustrixdb_hton
);
trans_register_ha
(
thd
,
FALSE
,
clustrixdb_hton
);
if
(
thd_test_options
(
thd
,
OPTION_NOT_AUTOCOMMIT
|
OPTION_BEGIN
))
{
if
(
thd_test_options
(
thd
,
OPTION_NOT_AUTOCOMMIT
|
OPTION_BEGIN
))
{
if
(
!
trx
->
has_open_anonymous_savepoint
())
trx
->
set_anonymous_savepoint
();
trx
->
set_anonymous_savepoint
();
trans_register_ha
(
thd
,
TRUE
,
clustrixdb_hton
);
trans_register_ha
(
thd
,
TRUE
,
clustrixdb_hton
);
}
}
...
...
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