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
a4cf475e
Commit
a4cf475e
authored
Jun 06, 2009
by
Tatiana A. Nurnberg
Browse files
Options
Browse Files
Download
Plain Diff
auto-merge
parents
e66f7538
67234224
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
59 additions
and
27 deletions
+59
-27
cmd-line-utils/readline/bind.c
cmd-line-utils/readline/bind.c
+1
-1
cmd-line-utils/readline/chardefs.h
cmd-line-utils/readline/chardefs.h
+2
-2
cmd-line-utils/readline/display.c
cmd-line-utils/readline/display.c
+1
-1
mysql-test/r/xa.result
mysql-test/r/xa.result
+6
-0
mysql-test/t/xa.test
mysql-test/t/xa.test
+11
-0
sql/handler.cc
sql/handler.cc
+28
-20
sql/sql_class.h
sql/sql_class.h
+8
-0
strings/ctype.c
strings/ctype.c
+2
-3
No files found.
cmd-line-utils/readline/bind.c
View file @
a4cf475e
...
...
@@ -701,7 +701,7 @@ rl_function_of_keyseq (keyseq, map, type)
{
unsigned
char
ic
=
keyseq
[
i
];
if
(
META_
BYTE
(
ic
)
&&
_rl_convert_meta_chars_to_ascii
)
if
(
META_
CHAR_FOR_UCHAR
(
ic
)
&&
_rl_convert_meta_chars_to_ascii
)
{
if
(
map
[
ESC
].
type
==
ISKMAP
)
{
...
...
cmd-line-utils/readline/chardefs.h
View file @
a4cf475e
...
...
@@ -59,8 +59,8 @@
#define largest_char 255
/* Largest character value. */
#define CTRL_CHAR(c) ((c) < control_character_threshold && (((c) & 0x80) == 0))
#define META_
BYTE
(c) ((c) > meta_character_threshold)
#define META_CHAR(c) (META_
BYTE
(c) && (c) <= largest_char)
#define META_
CHAR_FOR_UCHAR
(c) ((c) > meta_character_threshold)
#define META_CHAR(c) (META_
CHAR_FOR_UCHAR
(c) && (c) <= largest_char)
#define CTRL(c) ((c) & control_character_mask)
#define META(c) ((c) | meta_character_bit)
...
...
cmd-line-utils/readline/display.c
View file @
a4cf475e
...
...
@@ -1888,7 +1888,7 @@ rl_character_len (c, pos)
uc
=
(
unsigned
char
)
c
;
if
(
META_
BYTE
(
uc
))
if
(
META_
CHAR_FOR_UCHAR
(
uc
))
return
((
_rl_output_meta_chars
==
0
)
?
4
:
1
);
if
(
uc
==
'\t'
)
...
...
mysql-test/r/xa.result
View file @
a4cf475e
...
...
@@ -75,3 +75,9 @@ xa rollback 'a','c';
xa start 'a','c';
drop table t1;
End of 5.0 tests
xa start 'a';
xa end 'a';
xa rollback 'a';
xa start 'a';
xa end 'a';
xa rollback 'a';
mysql-test/t/xa.test
View file @
a4cf475e
...
...
@@ -124,6 +124,17 @@ drop table t1;
--
echo
End
of
5.0
tests
#
# Bug#44672: Assertion failed: thd->transaction.xid_state.xid.is_null()
#
xa
start
'a'
;
xa
end
'a'
;
xa
rollback
'a'
;
xa
start
'a'
;
xa
end
'a'
;
xa
rollback
'a'
;
# Wait till all disconnects are completed
--
source
include
/
wait_until_count_sessions
.
inc
sql/handler.cc
View file @
a4cf475e
...
...
@@ -1073,6 +1073,13 @@ int ha_commit_trans(THD *thd, bool all)
user, or an implicit commit issued by a DDL.
*/
THD_TRANS
*
trans
=
all
?
&
thd
->
transaction
.
all
:
&
thd
->
transaction
.
stmt
;
/*
"real" is a nick name for a transaction for which a commit will
make persistent changes. E.g. a 'stmt' transaction inside a 'all'
transation is not 'real': even though it's possible to commit it,
the changes are not durable as they might be rolled back if the
enclosing 'all' transaction is rolled back.
*/
bool
is_real_trans
=
all
||
thd
->
transaction
.
all
.
ha_list
==
0
;
Ha_trx_info
*
ha_info
=
trans
->
ha_list
;
my_xid
xid
=
thd
->
transaction
.
xid_state
.
xid
.
get_my_xid
();
...
...
@@ -1184,16 +1191,9 @@ int ha_commit_trans(THD *thd, bool all)
if
(
rw_trans
)
start_waiting_global_read_lock
(
thd
);
}
else
if
(
all
)
{
/*
A COMMIT of an empty transaction. There may be savepoints.
Destroy them. If the transaction is not empty
savepoints are cleared in ha_commit_one_phase()
or ha_rollback_trans().
*/
/* Free resources and perform other cleanup even for 'empty' transactions. */
else
if
(
is_real_trans
)
thd
->
transaction
.
cleanup
();
}
#endif
/* USING_TRANSACTIONS */
DBUG_RETURN
(
error
);
}
...
...
@@ -1206,6 +1206,13 @@ int ha_commit_one_phase(THD *thd, bool all)
{
int
error
=
0
;
THD_TRANS
*
trans
=
all
?
&
thd
->
transaction
.
all
:
&
thd
->
transaction
.
stmt
;
/*
"real" is a nick name for a transaction for which a commit will
make persistent changes. E.g. a 'stmt' transaction inside a 'all'
transation is not 'real': even though it's possible to commit it,
the changes are not durable as they might be rolled back if the
enclosing 'all' transaction is rolled back.
*/
bool
is_real_trans
=
all
||
thd
->
transaction
.
all
.
ha_list
==
0
;
Ha_trx_info
*
ha_info
=
trans
->
ha_list
,
*
ha_info_next
;
DBUG_ENTER
(
"ha_commit_one_phase"
);
...
...
@@ -1227,8 +1234,6 @@ int ha_commit_one_phase(THD *thd, bool all)
}
trans
->
ha_list
=
0
;
trans
->
no_2pc
=
0
;
if
(
is_real_trans
)
thd
->
transaction
.
xid_state
.
xid
.
null
();
if
(
all
)
{
#ifdef HAVE_QUERY_CACHE
...
...
@@ -1236,8 +1241,9 @@ int ha_commit_one_phase(THD *thd, bool all)
query_cache
.
invalidate
(
thd
->
transaction
.
changed_tables
);
#endif
thd
->
variables
.
tx_isolation
=
thd
->
session_tx_isolation
;
thd
->
transaction
.
cleanup
();
}
if
(
is_real_trans
)
thd
->
transaction
.
cleanup
();
}
#endif
/* USING_TRANSACTIONS */
DBUG_RETURN
(
error
);
...
...
@@ -1249,6 +1255,13 @@ int ha_rollback_trans(THD *thd, bool all)
int
error
=
0
;
THD_TRANS
*
trans
=
all
?
&
thd
->
transaction
.
all
:
&
thd
->
transaction
.
stmt
;
Ha_trx_info
*
ha_info
=
trans
->
ha_list
,
*
ha_info_next
;
/*
"real" is a nick name for a transaction for which a commit will
make persistent changes. E.g. a 'stmt' transaction inside a 'all'
transation is not 'real': even though it's possible to commit it,
the changes are not durable as they might be rolled back if the
enclosing 'all' transaction is rolled back.
*/
bool
is_real_trans
=
all
||
thd
->
transaction
.
all
.
ha_list
==
0
;
DBUG_ENTER
(
"ha_rollback_trans"
);
...
...
@@ -1294,18 +1307,13 @@ int ha_rollback_trans(THD *thd, bool all)
}
trans
->
ha_list
=
0
;
trans
->
no_2pc
=
0
;
if
(
is_real_trans
)
{
if
(
thd
->
transaction_rollback_request
)
if
(
is_real_trans
&&
thd
->
transaction_rollback_request
)
thd
->
transaction
.
xid_state
.
rm_error
=
thd
->
main_da
.
sql_errno
();
else
thd
->
transaction
.
xid_state
.
xid
.
null
();
}
if
(
all
)
thd
->
variables
.
tx_isolation
=
thd
->
session_tx_isolation
;
}
/* Always cleanup. Even if there nht==0. There may be savepoints. */
if
(
all
)
if
(
is_real_trans
)
thd
->
transaction
.
cleanup
();
#endif
/* USING_TRANSACTIONS */
if
(
all
)
...
...
sql/sql_class.h
View file @
a4cf475e
...
...
@@ -1464,6 +1464,14 @@ class THD :public Statement,
{
changed_tables
=
0
;
savepoints
=
0
;
/*
If rm_error is raised, it means that this piece of a distributed
transaction has failed and must be rolled back. But the user must
rollback it explicitly, so don't start a new distributed XA until
then.
*/
if
(
!
xid_state
.
rm_error
)
xid_state
.
xid
.
null
();
#ifdef USING_TRANSACTIONS
free_root
(
&
mem_root
,
MYF
(
MY_KEEP_PREALLOC
));
#endif
...
...
strings/ctype.c
View file @
a4cf475e
...
...
@@ -328,9 +328,8 @@ my_string_repertoire(CHARSET_INFO *cs, const char *str, ulong length)
{
my_wc_t
wc
;
int
chlen
;
for
(;
(
chlen
=
cs
->
cset
->
mb_wc
(
cs
,
&
wc
,
(
const
unsigned
char
*
)
str
,
(
const
unsigned
char
*
)
strend
))
>
0
;
for
(;
(
chlen
=
cs
->
cset
->
mb_wc
(
cs
,
&
wc
,
(
uchar
*
)
str
,
(
uchar
*
)
strend
))
>
0
;
str
+=
chlen
)
{
if
(
wc
>
0x7F
)
...
...
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