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
6e8bfb0b
Commit
6e8bfb0b
authored
Sep 04, 2013
by
Jan Lindström
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed merge errors and XA prepare
parent
ba3ff50a
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
61 additions
and
5 deletions
+61
-5
sql/sql_class.cc
sql/sql_class.cc
+2
-0
sql/sql_table.cc
sql/sql_table.cc
+51
-0
sql/wsrep_mysqld.cc
sql/wsrep_mysqld.cc
+7
-4
storage/innobase/trx/trx0trx.cc
storage/innobase/trx/trx0trx.cc
+1
-1
No files found.
sql/sql_class.cc
View file @
6e8bfb0b
...
...
@@ -1155,6 +1155,8 @@ THD::THD()
wsrep_status_vars
=
0
;
wsrep_mysql_replicated
=
0
;
wsrep_bf_thd
=
NULL
;
wsrep_TOI_pre_query
=
NULL
;
wsrep_TOI_pre_query_len
=
0
;
#endif
/* Call to init() below requires fully initialized Open_tables_state. */
reset_open_tables_state
(
this
);
...
...
sql/sql_table.cc
View file @
6e8bfb0b
...
...
@@ -4883,6 +4883,50 @@ bool mysql_create_like_table(THD* thd, TABLE_LIST* table, TABLE_LIST* src_table,
uint
not_used
;
DBUG_ENTER
(
"mysql_create_like_table"
);
#ifdef WITH_WSREP
if
(
WSREP
(
thd
)
&&
!
thd
->
wsrep_applier
)
{
TABLE
*
tmp_table
;
bool
is_tmp_table
=
FALSE
;
for
(
tmp_table
=
thd
->
temporary_tables
;
tmp_table
;
tmp_table
=
tmp_table
->
next
)
{
if
(
!
strcmp
(
src_table
->
db
,
tmp_table
->
s
->
db
.
str
)
&&
!
strcmp
(
src_table
->
table_name
,
tmp_table
->
s
->
table_name
.
str
))
{
is_tmp_table
=
TRUE
;
break
;
}
}
if
(
!
is_tmp_table
)
{
WSREP_TO_ISOLATION_BEGIN
(
table
->
db
,
table
->
table_name
,
NULL
);
}
else
{
TABLE_LIST
tbl
;
bzero
((
void
*
)
&
tbl
,
sizeof
(
tbl
));
tbl
.
db
=
src_table
->
db
;
tbl
.
table_name
=
tbl
.
alias
=
src_table
->
table_name
;
tbl
.
table
=
tmp_table
;
char
buf
[
2048
];
String
query
(
buf
,
sizeof
(
buf
),
system_charset_info
);
query
.
length
(
0
);
// Have to zero it since constructor doesn't
(
void
)
store_create_info
(
thd
,
&
tbl
,
&
query
,
NULL
,
TRUE
);
WSREP_DEBUG
(
"TMP TABLE: %s"
,
query
.
ptr
());
thd
->
wsrep_TOI_pre_query
=
query
.
ptr
();
thd
->
wsrep_TOI_pre_query_len
=
query
.
length
();
WSREP_TO_ISOLATION_BEGIN
(
table
->
db
,
table
->
table_name
,
NULL
);
thd
->
wsrep_TOI_pre_query
=
NULL
;
thd
->
wsrep_TOI_pre_query_len
=
0
;
}
}
#endif
/*
We the open source table to get its description in HA_CREATE_INFO
...
...
@@ -5041,6 +5085,13 @@ bool mysql_create_like_table(THD* thd, TABLE_LIST* table, TABLE_LIST* src_table,
err:
DBUG_RETURN
(
res
);
#ifdef WITH_WSREP
error:
thd
->
wsrep_TOI_pre_query
=
NULL
;
DBUG_RETURN
(
TRUE
);
#endif
/* WITH_WSREP */
}
...
...
sql/wsrep_mysqld.cc
View file @
6e8bfb0b
...
...
@@ -858,14 +858,15 @@ static bool wsrep_prepare_keys_for_isolation(THD* thd,
ka
->
keys_len
=
0
;
extern
TABLE
*
find_temporary_table
(
THD
*
,
const
TABLE_LIST
*
);
extern
TABLE
*
find_temporary_table
(
THD
*
,
const
char
*
,
const
char
*
);
if
(
db
||
table
)
{
TABLE_LIST
tmp_table
;
bzero
((
char
*
)
&
tmp_table
,
sizeof
(
tmp_table
));
tmp_table
.
table_name
=
(
char
*
)
db
;
tmp_table
.
db
=
(
char
*
)
table
;
if
(
!
table
||
!
find_temporary_table
(
thd
,
&
tmp_
table
))
tmp_table
.
table_name
=
(
char
*
)
table
;
tmp_table
.
db
=
(
char
*
)
db
;
if
(
!
table
||
!
find_temporary_table
(
thd
,
db
,
table
))
{
if
(
!
(
ka
->
keys
=
(
wsrep_key_t
*
)
my_malloc
(
sizeof
(
wsrep_key_t
),
MYF
(
0
))))
{
...
...
@@ -896,8 +897,10 @@ static bool wsrep_prepare_keys_for_isolation(THD* thd,
if
(
!
find_temporary_table
(
thd
,
table
))
{
wsrep_key_t
*
tmp
;
/* In drop table both db and table can be NULL and table_list
contains tables, but ka->keys is not yet allocated ? */
tmp
=
(
wsrep_key_t
*
)
my_realloc
(
ka
->
keys
,
(
ka
->
keys_len
+
1
)
*
sizeof
(
wsrep_key_t
),
MYF
(
0
));
ka
->
keys
,
(
ka
->
keys_len
+
1
)
*
sizeof
(
wsrep_key_t
),
MYF
(
MY_ALLOW_ZERO_PTR
));
if
(
!
tmp
)
{
sql_print_error
(
"Can't allocate memory for key_array"
);
...
...
storage/innobase/trx/trx0trx.cc
View file @
6e8bfb0b
...
...
@@ -2076,7 +2076,7 @@ trx_start_if_not_started_xa_low(
transaction, doesn't. */
trx
->
support_xa
=
thd_supports_xa
(
trx
->
mysql_thd
);
trx_start_
low
(
trx
);
trx_start_
if_not_started
(
trx
);
/* fall through */
case
TRX_STATE_ACTIVE
:
return
;
...
...
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