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
27bf97aa
Commit
27bf97aa
authored
Mar 24, 2020
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cleanup: dead code, comments, avoid current_thd
parent
63f922da
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
4 deletions
+10
-4
sql/handler.cc
sql/handler.cc
+2
-2
sql/handler.h
sql/handler.h
+5
-1
sql/sql_table.cc
sql/sql_table.cc
+3
-1
No files found.
sql/handler.cc
View file @
27bf97aa
...
...
@@ -4860,7 +4860,7 @@ handler::ha_rename_table(const char *from, const char *to)
int
handler
::
ha_delete_table
(
const
char
*
name
)
{
if
(
ha_check_if_updates_are_ignored
(
current_thd
,
ht
,
"DROP"
))
if
(
ha_check_if_updates_are_ignored
(
ha_thd
()
,
ht
,
"DROP"
))
return
0
;
// Simulate dropped
mark_trx_read_write
();
return
delete_table
(
name
);
...
...
@@ -4880,7 +4880,7 @@ void
handler
::
ha_drop_table
(
const
char
*
name
)
{
DBUG_ASSERT
(
m_lock_type
==
F_UNLCK
);
if
(
ha_check_if_updates_are_ignored
(
current_thd
,
ht
,
"DROP"
))
if
(
ha_check_if_updates_are_ignored
(
ha_thd
()
,
ht
,
"DROP"
))
return
;
mark_trx_read_write
();
...
...
sql/handler.h
View file @
27bf97aa
...
...
@@ -1729,10 +1729,14 @@ handlerton *ha_default_tmp_handlerton(THD *thd);
/* can be replicated by wsrep replication provider plugin */
#define HTON_WSREP_REPLICATION (1 << 13)
/* Shared storage on slave. Ignore on slave any CREATE TABLE, DROP or updates */
/*
Set this on the *slave* that's connected to a shared with a master storage.
The slave will ignore any CREATE TABLE, DROP or updates for this engine.
*/
#define HTON_IGNORE_UPDATES (1 << 14)
/*
Set this on the *master* that's connected to a shared with a slave storage.
The table may not exists on the slave. The effects of having this flag are:
- ALTER TABLE that changes engine from this table to another engine will
be replicated as CREATE + INSERT
...
...
sql/sql_table.cc
View file @
27bf97aa
...
...
@@ -5686,7 +5686,7 @@ bool mysql_create_like_table(THD* thd, TABLE_LIST* table,
int
res
=
1
;
bool
is_trans
=
FALSE
;
bool
do_logging
=
FALSE
;
bool
force_generated_create
;
bool
force_generated_create
=
false
;
uint
not_used
;
int
create_res
;
DBUG_ENTER
(
"mysql_create_like_table"
);
...
...
@@ -5838,6 +5838,7 @@ bool mysql_create_like_table(THD* thd, TABLE_LIST* table,
if
(
thd
->
is_current_stmt_binlog_disabled
())
goto
err
;
#ifdef ENABLE_WHEN_S3_CAN_CREATE_TABLES
/*
If we do a create based on a shared table, log the full create of the
resulting table. This is needed as a shared table may look different
...
...
@@ -5847,6 +5848,7 @@ bool mysql_create_like_table(THD* thd, TABLE_LIST* table,
(((
src_table
->
table
->
s
->
db_type
()
->
flags
&
HTON_TABLE_MAY_NOT_EXIST_ON_SLAVE
)
&&
src_table
->
table
->
s
->
db_type
()
!=
local_create_info
.
db_type
));
#endif
if
(
thd
->
is_current_stmt_binlog_format_row
()
||
force_generated_create
)
{
...
...
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