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
cb135edc
Commit
cb135edc
authored
Aug 25, 2024
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cleanup: handlerton
remove unused methods, reorder methods, add comments
parent
7ce8a82f
Changes
11
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
416 additions
and
449 deletions
+416
-449
mysql-test/main/information_schema.result
mysql-test/main/information_schema.result
+3
-0
mysql-test/suite/innodb/r/tablespace_per_table_not_windows.result
...st/suite/innodb/r/tablespace_per_table_not_windows.result
+4
-0
mysql-test/suite/innodb/r/tablespace_per_table_windows.result
...l-test/suite/innodb/r/tablespace_per_table_windows.result
+4
-0
sql/deprecation.h
sql/deprecation.h
+1
-1
sql/handler.cc
sql/handler.cc
+0
-15
sql/handler.h
sql/handler.h
+394
-399
sql/lock.cc
sql/lock.cc
+1
-3
sql/sql_reload.cc
sql/sql_reload.cc
+1
-1
sql/sql_show.cc
sql/sql_show.cc
+5
-26
storage/maria/ha_maria.cc
storage/maria/ha_maria.cc
+2
-3
storage/maria/ha_s3.cc
storage/maria/ha_s3.cc
+1
-1
No files found.
mysql-test/main/information_schema.result
View file @
cb135edc
...
@@ -2326,6 +2326,9 @@ LOGFILE_GROUP_NAME, FILE_NAME, ENGINE
...
@@ -2326,6 +2326,9 @@ LOGFILE_GROUP_NAME, FILE_NAME, ENGINE
ORDER BY
ORDER BY
LOGFILE_GROUP_NAME;
LOGFILE_GROUP_NAME;
LOGFILE_GROUP_NAME FILE_NAME TOTAL_EXTENTS INITIAL_SIZE ENGINE EXTRA
LOGFILE_GROUP_NAME FILE_NAME TOTAL_EXTENTS INITIAL_SIZE ENGINE EXTRA
Warnings:
Warning 1287 'information_schema.FILES' is deprecated and will be removed in a future release
Warning 1287 'information_schema.FILES' is deprecated and will be removed in a future release
# This must have Opened_tables=3, not 6.
# This must have Opened_tables=3, not 6.
show status like 'Opened_tables';
show status like 'Opened_tables';
Variable_name Value
Variable_name Value
...
...
mysql-test/suite/innodb/r/tablespace_per_table_not_windows.result
View file @
cb135edc
...
@@ -116,6 +116,10 @@ test/#################################################_long_
...
@@ -116,6 +116,10 @@ test/#################################################_long_
twenty_byte_db_name_/#################################################_long_
twenty_byte_db_name_/#################################################_long_
##################################################_long/#################################################_long
##################################################_long/#################################################_long
SELECT file_name, tablespace_name FROM information_schema.files WHERE file_name LIKE '%long%';
SELECT file_name, tablespace_name FROM information_schema.files WHERE file_name LIKE '%long%';
Warnings:
Level Warning
Code 1287
Message 'information_schema.FILES' is deprecated and will be removed in a future release
#
#
# Cleanup
# Cleanup
#
#
...
...
mysql-test/suite/innodb/r/tablespace_per_table_windows.result
View file @
cb135edc
...
@@ -42,6 +42,10 @@ SELECT name FROM information_schema.innodb_sys_tablespaces WHERE name LIKE '%lon
...
@@ -42,6 +42,10 @@ SELECT name FROM information_schema.innodb_sys_tablespaces WHERE name LIKE '%lon
name
name
this_sixty_four_byte_name_is_not_too_long_______________________/this_sixty_four_byte_name_is_not_too_long_______________________
this_sixty_four_byte_name_is_not_too_long_______________________/this_sixty_four_byte_name_is_not_too_long_______________________
SELECT file_name, tablespace_name FROM information_schema.files WHERE file_name LIKE '%long%';
SELECT file_name, tablespace_name FROM information_schema.files WHERE file_name LIKE '%long%';
Warnings:
Level Warning
Code 1287
Message 'information_schema.FILES' is deprecated and will be removed in a future release
#
#
# Cleanup
# Cleanup
#
#
...
...
sql/deprecation.h
View file @
cb135edc
...
@@ -30,7 +30,7 @@ template<uint V> static inline void check_deprecated_version(void)
...
@@ -30,7 +30,7 @@ template<uint V> static inline void check_deprecated_version(void)
V
<=
1004
?
MYSQL_VERSION_ID
<
110500
:
/* until 10.4 EOL */
V
<=
1004
?
MYSQL_VERSION_ID
<
110500
:
/* until 10.4 EOL */
V
<=
1005
?
MYSQL_VERSION_ID
<
120100
:
/* until 10.5 EOL */
V
<=
1005
?
MYSQL_VERSION_ID
<
120100
:
/* until 10.5 EOL */
V
<=
1010
?
MYSQL_VERSION_ID
<
120500
:
/* until 10.6 EOL */
V
<=
1010
?
MYSQL_VERSION_ID
<
120500
:
/* until 10.6 EOL */
V
<=
110
6
?
MYSQL_VERSION_ID
<
130400
:
/* until 10.11 EOL */
V
<=
110
7
?
MYSQL_VERSION_ID
<
130400
:
/* until 10.11 EOL */
V
==
999999
,
/* only for sys_var::do_deprecated_warning() */
V
==
999999
,
/* only for sys_var::do_deprecated_warning() */
"check_deprecated_version failed"
"check_deprecated_version failed"
);
);
...
...
sql/handler.cc
View file @
cb135edc
...
@@ -888,21 +888,6 @@ void ha_drop_database(const char* path)
...
@@ -888,21 +888,6 @@ void ha_drop_database(const char* path)
}
}
static
my_bool
checkpoint_state_handlerton
(
THD
*
,
plugin_ref
plugin
,
void
*
disable
)
{
handlerton
*
hton
=
plugin_hton
(
plugin
);
if
(
hton
->
checkpoint_state
)
hton
->
checkpoint_state
(
hton
,
(
int
)
*
(
bool
*
)
disable
);
return
FALSE
;
}
void
ha_checkpoint_state
(
bool
disable
)
{
plugin_foreach
(
NULL
,
checkpoint_state_handlerton
,
MYSQL_STORAGE_ENGINE_PLUGIN
,
&
disable
);
}
struct
st_commit_checkpoint_request
{
struct
st_commit_checkpoint_request
{
void
*
cookie
;
void
*
cookie
;
void
(
*
pre_hook
)(
void
*
);
void
(
*
pre_hook
)(
void
*
);
...
...
sql/handler.h
View file @
cb135edc
...
@@ -1257,12 +1257,6 @@ typedef struct st_order ORDER;
...
@@ -1257,12 +1257,6 @@ typedef struct st_order ORDER;
handlerton is a singleton structure - one instance per storage engine -
handlerton is a singleton structure - one instance per storage engine -
to provide access to storage engine functionality that works on the
to provide access to storage engine functionality that works on the
"global" level (unlike handler class that works on a per-table basis)
"global" level (unlike handler class that works on a per-table basis)
usually handlerton instance is defined statically in ha_xxx.cc as
static handlerton { ... } xxx_hton;
savepoint_*, prepare, recover, and *_by_xid pointers can be 0.
*/
*/
struct
handlerton
struct
handlerton
{
{
...
@@ -1293,8 +1287,39 @@ struct handlerton
...
@@ -1293,8 +1287,39 @@ struct handlerton
*/
*/
uint
savepoint_offset
;
uint
savepoint_offset
;
/*
/*
handlerton methods:
global handlerton flags HTON_...
*/
uint32
flags
;
/*
Optional clauses in the CREATE/ALTER TABLE
*/
ha_create_table_option
*
table_options
;
// table level options
ha_create_table_option
*
field_options
;
// these are specified per field
ha_create_table_option
*
index_options
;
// these are specified per index
/**
The list of extensions of files created for a single table in the
database directory (datadir/db_name/).
Used by open_table_error(), by the default rename_table and delete_table
handler methods, and by the default discovery implementation.
For engines that have more than one file name extensions (separate
metadata, index, and/or data files), the order of elements is relevant.
First element of engine file name extensions array should be metadata
file extention. This is assumed by the open_table_error()
and the default discovery implementation.
Second element - data file extension. This is
assumed by REPAIR TABLE ... USE_FRM implementation.
*/
const
char
**
tablefile_extensions
;
// by default - empty list
/**********************************************************************
Generic handlerton methods
**********************************************************************/
handler
*
(
*
create
)(
handlerton
*
hton
,
TABLE_SHARE
*
table
,
MEM_ROOT
*
mem_root
);
/*
close_connection is only called if
close_connection is only called if
thd->ha_data[xxx_hton.slot] is non-zero, so even if you don't need
thd->ha_data[xxx_hton.slot] is non-zero, so even if you don't need
this storage area - set it to something, so that MySQL would know
this storage area - set it to something, so that MySQL would know
...
@@ -1305,6 +1330,68 @@ struct handlerton
...
@@ -1305,6 +1330,68 @@ struct handlerton
Tell handler that query has been killed.
Tell handler that query has been killed.
*/
*/
void
(
*
kill_query
)(
handlerton
*
hton
,
THD
*
thd
,
enum
thd_kill_levels
level
);
void
(
*
kill_query
)(
handlerton
*
hton
,
THD
*
thd
,
enum
thd_kill_levels
level
);
void
(
*
drop_database
)(
handlerton
*
hton
,
char
*
path
);
/*
return 0 if dropped successfully,
-1 if nothing was done by design (as in e.g. blackhole)
an error code (e.g. HA_ERR_NO_SUCH_TABLE) otherwise
*/
int
(
*
drop_table
)(
handlerton
*
hton
,
const
char
*
path
);
int
(
*
panic
)(
handlerton
*
hton
,
enum
ha_panic_function
flag
);
/** Disable or enable the internal writes of a storage engine
This is used by Galera and by
FLUSH TABLES WITH READ LOCK AND DISABLE CHECKPOINT
While internal writes are disabled, the engine should pause any
background write activity (such as tablespace checkpointing) that require
consistency between different files (such as transaction log and
tablespace files) for crash recovery to succeed. The idea is to use this
to make safe multi-volume LVM snapshot backups.
*/
void
(
*
disable_internal_writes
)(
bool
disable
);
bool
(
*
flush_logs
)(
handlerton
*
hton
);
bool
(
*
show_status
)(
handlerton
*
hton
,
THD
*
thd
,
stat_print_fn
*
print
,
enum
ha_stat_type
stat
);
uint
(
*
partition_flags
)();
alter_table_operations
(
*
alter_table_flags
)(
alter_table_operations
flags
);
/*
Called for all storage handlers after ddl recovery is done
If the engine needs to do something on startup that requires a fully
functional server (like Spider creating system tables) - it should be
done here, not in init().
*/
int
(
*
signal_ddl_recovery_done
)(
handlerton
*
hton
);
/*
Server shutdown early notification.
If some parts of the engine need a fully functional server (like, InnoDB
purge thread) they need to be stopped now, not in deinit() or panic().
*/
void
(
*
pre_shutdown
)(
void
);
/* Called at startup to update default engine costs */
void
(
*
update_optimizer_costs
)(
OPTIMIZER_COSTS
*
costs
);
void
*
optimizer_costs
;
/* Costs are stored here */
/*
Notify the storage engine that the definition of the table (and the .frm
file) has changed. Returns 0 if ok.
*/
int
(
*
notify_tabledef_changed
)(
handlerton
*
hton
,
LEX_CSTRING
*
db
,
LEX_CSTRING
*
table_name
,
LEX_CUSTRING
*
frm
,
LEX_CUSTRING
*
org_tabledef_version
,
handler
*
file
);
/*
Inform handler that partitioning engine has changed the .frm and the .par
files
*/
int
(
*
create_partitioning_metadata
)(
const
char
*
path
,
const
char
*
old_path
,
chf_create_flags
action_flag
);
/**********************************************************************
Transaction handling
**********************************************************************/
/*
/*
sv points to an uninitialized storage area of requested size
sv points to an uninitialized storage area of requested size
(see savepoint_offset description)
(see savepoint_offset description)
...
@@ -1481,113 +1568,7 @@ struct handlerton
...
@@ -1481,113 +1568,7 @@ struct handlerton
recovery process.
recovery process.
*/
*/
void
(
*
commit_checkpoint_request
)(
void
*
cookie
);
void
(
*
commit_checkpoint_request
)(
void
*
cookie
);
/*
"Disable or enable checkpointing internal to the storage engine. This is
used for FLUSH TABLES WITH READ LOCK AND DISABLE CHECKPOINT to ensure that
the engine will never start any recovery from a time between
FLUSH TABLES ... ; UNLOCK TABLES.
While checkpointing is disabled, the engine should pause any background
write activity (such as tablespace checkpointing) that require consistency
between different files (such as transaction log and tablespace files) for
crash recovery to succeed. The idea is to use this to make safe
multi-volume LVM snapshot backups.
*/
int
(
*
checkpoint_state
)(
handlerton
*
hton
,
bool
disabled
);
void
*
(
*
create_cursor_read_view
)(
handlerton
*
hton
,
THD
*
thd
);
void
(
*
set_cursor_read_view
)(
handlerton
*
hton
,
THD
*
thd
,
void
*
read_view
);
void
(
*
close_cursor_read_view
)(
handlerton
*
hton
,
THD
*
thd
,
void
*
read_view
);
handler
*
(
*
create
)(
handlerton
*
hton
,
TABLE_SHARE
*
table
,
MEM_ROOT
*
mem_root
);
void
(
*
drop_database
)(
handlerton
*
hton
,
char
*
path
);
/*
return 0 if dropped successfully,
-1 if nothing was done by design (as in e.g. blackhole)
an error code (e.g. HA_ERR_NO_SUCH_TABLE) otherwise
*/
int
(
*
drop_table
)(
handlerton
*
hton
,
const
char
*
path
);
int
(
*
panic
)(
handlerton
*
hton
,
enum
ha_panic_function
flag
);
int
(
*
start_consistent_snapshot
)(
handlerton
*
hton
,
THD
*
thd
);
int
(
*
start_consistent_snapshot
)(
handlerton
*
hton
,
THD
*
thd
);
bool
(
*
flush_logs
)(
handlerton
*
hton
);
bool
(
*
show_status
)(
handlerton
*
hton
,
THD
*
thd
,
stat_print_fn
*
print
,
enum
ha_stat_type
stat
);
uint
(
*
partition_flags
)();
alter_table_operations
(
*
alter_table_flags
)(
alter_table_operations
flags
);
int
(
*
fill_is_table
)(
handlerton
*
hton
,
THD
*
thd
,
TABLE_LIST
*
tables
,
class
Item
*
cond
,
enum
enum_schema_tables
);
uint32
flags
;
/* global handler flags */
/*
Those handlerton functions below are properly initialized at handler
init.
*/
int
(
*
binlog_func
)(
handlerton
*
hton
,
THD
*
thd
,
enum_binlog_func
fn
,
void
*
arg
);
void
(
*
binlog_log_query
)(
handlerton
*
hton
,
THD
*
thd
,
enum_binlog_command
binlog_command
,
const
char
*
query
,
uint
query_length
,
const
char
*
db
,
const
char
*
table_name
);
void
(
*
abort_transaction
)(
handlerton
*
hton
,
THD
*
bf_thd
,
THD
*
victim_thd
,
my_bool
signal
)
__attribute__
((
nonnull
));
int
(
*
set_checkpoint
)(
handlerton
*
hton
,
const
XID
*
xid
);
int
(
*
get_checkpoint
)(
handlerton
*
hton
,
XID
*
xid
);
/**
Check if the version of the table matches the version in the .frm
file.
This is mainly used to verify in recovery to check if an inplace
ALTER TABLE succeded.
Storage engines that does not support inplace alter table does not
have to implement this function.
@param hton handlerton
@param path Path for table
@param version The unique id that is stored in the .frm file for
CREATE and updated for each ALTER TABLE (but not for
simple renames).
This is the ID used for the final table.
@param create_id The value returned from handler->table_version() for
the original table (before ALTER TABLE).
@retval 0 If id matches or table is newer than create_id (depending
on what version check the engine supports. This means that
The (inplace) alter table did succeed.
@retval # > 0 Alter table did not succeed.
Related to handler::discover_check_version().
*/
int
(
*
check_version
)(
handlerton
*
hton
,
const
char
*
path
,
const
LEX_CUSTRING
*
version
,
ulonglong
create_id
);
/* Called for all storage handlers after ddl recovery is done */
int
(
*
signal_ddl_recovery_done
)(
handlerton
*
hton
);
/* Called at startup to update default engine costs */
void
(
*
update_optimizer_costs
)(
OPTIMIZER_COSTS
*
costs
);
void
*
optimizer_costs
;
/* Costs are stored here */
/*
Optional clauses in the CREATE/ALTER TABLE
*/
ha_create_table_option
*
table_options
;
// table level options
ha_create_table_option
*
field_options
;
// these are specified per field
ha_create_table_option
*
index_options
;
// these are specified per index
/**
The list of extensions of files created for a single table in the
database directory (datadir/db_name/).
Used by open_table_error(), by the default rename_table and delete_table
handler methods, and by the default discovery implementation.
For engines that have more than one file name extensions (separate
metadata, index, and/or data files), the order of elements is relevant.
First element of engine file name extensions array should be metadata
file extention. This is implied by the open_table_error()
and the default discovery implementation.
Second element - data file extension. This is implied
assumed by REPAIR TABLE ... USE_FRM implementation.
*/
const
char
**
tablefile_extensions
;
// by default - empty list
/**********************************************************************
/**********************************************************************
Functions to intercept queries
Functions to intercept queries
...
@@ -1671,8 +1652,7 @@ struct handlerton
...
@@ -1671,8 +1652,7 @@ struct handlerton
Returns 0 on success and 1 on error.
Returns 0 on success and 1 on error.
*/
*/
int
(
*
discover_table_names
)(
handlerton
*
hton
,
const
LEX_CSTRING
*
db
,
int
(
*
discover_table_names
)(
handlerton
*
hton
,
const
LEX_CSTRING
*
db
,
MY_DIR
*
dir
,
MY_DIR
*
dir
,
discovered_list
*
result
);
discovered_list
*
result
);
/*
/*
This is a method that allows to server to check if a table exists without
This is a method that allows to server to check if a table exists without
...
@@ -1699,8 +1679,8 @@ struct handlerton
...
@@ -1699,8 +1679,8 @@ struct handlerton
This is the assisted table discovery method. Unlike the fully
This is the assisted table discovery method. Unlike the fully
automatic discovery as above, here a user is expected to issue an
automatic discovery as above, here a user is expected to issue an
explicit CREATE TABLE with the appropriate table attributes to
explicit CREATE TABLE with the appropriate table attributes to
"assist" the discovery of a table. But this
"discovering" CREATE TABLE
"assist" the discovery of a table. But such
"discovering" CREATE TABLE
statement will
not specify the table structure - the engine discovers
statement must
not specify the table structure - the engine discovers
it using this method. For example, FederatedX uses it in
it using this method. For example, FederatedX uses it in
CREATE TABLE t1 ENGINE=FEDERATED CONNECTION="mysql://foo/bar/t1";
CREATE TABLE t1 ENGINE=FEDERATED CONNECTION="mysql://foo/bar/t1";
...
@@ -1715,42 +1695,58 @@ struct handlerton
...
@@ -1715,42 +1695,58 @@ struct handlerton
int
(
*
discover_table_structure
)(
handlerton
*
hton
,
THD
*
thd
,
int
(
*
discover_table_structure
)(
handlerton
*
hton
,
THD
*
thd
,
TABLE_SHARE
*
share
,
HA_CREATE_INFO
*
info
);
TABLE_SHARE
*
share
,
HA_CREATE_INFO
*
info
);
/*
/**
Notify the storage engine that the definition of the table (and the .frm
Check if the version of the table matches the version in the .frm
file) has changed. Returns 0 if ok.
file.
This is mainly used to verify in recovery to check if an inplace
ALTER TABLE succeded.
Storage engines that does not support inplace alter table does not
have to implement this function.
@param hton handlerton
@param path Path for table
@param version The unique id that is stored in the .frm file for
CREATE and updated for each ALTER TABLE (but not for
simple renames).
This is the ID used for the final table.
@param create_id The value returned from handler->table_version() for
the original table (before ALTER TABLE).
@retval 0 If id matches or table is newer than create_id (depending
on what version check the engine supports. This means that
The (inplace) alter table did succeed.
@retval # > 0 Alter table did not succeed.
Related to handler::discover_check_version().
*/
*/
int
(
*
notify_tabledef_changed
)(
handlerton
*
hton
,
LEX_CSTRING
*
db
,
int
(
*
check_version
)(
handlerton
*
hton
,
const
char
*
path
,
LEX_CSTRING
*
table_name
,
LEX_CUSTRING
*
frm
,
const
LEX_CUSTRING
*
version
,
ulonglong
create_id
);
LEX_CUSTRING
*
org_tabledef_version
,
handler
*
file
);
/
*
/********************************************************************
*
System Versioning
System Versioning
*/
*********************************************************************
*/
/** Determine if system-versioned data was modified by the transaction.
/** Determine if system-versioned data was modified by the transaction.
@param[in,out] thd current session
@param[in,out] thd current session
@param[out] trx_id transaction start ID
@param[out] trx_id transaction start ID
@return transaction commit ID
@return transaction commit ID
@retval 0 if no system-versioned data was affected by the transaction */
@retval 0 if no system-versioned data was affected by the transaction
*/
ulonglong
(
*
prepare_commit_versioned
)(
THD
*
thd
,
ulonglong
*
trx_id
);
ulonglong
(
*
prepare_commit_versioned
)(
THD
*
thd
,
ulonglong
*
trx_id
);
/** Disable or enable the internal writes of a storage engine */
/*********************************************************************
void
(
*
disable_internal_writes
)(
bool
disable
);
backup
**********************************************************************/
/* backup */
void
(
*
prepare_for_backup
)(
void
);
void
(
*
prepare_for_backup
)(
void
);
void
(
*
end_backup
)(
void
);
void
(
*
end_backup
)(
void
);
/* Server shutdown early notification.*/
/**********************************************************************
void
(
*
pre_shutdown
)(
void
);
WSREP specific
**********************************************************************/
/*
void
(
*
abort_transaction
)(
handlerton
*
hton
,
THD
*
bf_thd
,
THD
*
victim_thd
,
Inform handler that partitioning engine has changed the .frm and the .par
my_bool
signal
)
__attribute__
((
nonnull
));
files
int
(
*
set_checkpoint
)(
handlerton
*
hton
,
const
XID
*
xid
);
*/
int
(
*
get_checkpoint
)(
handlerton
*
hton
,
XID
*
xid
);
int
(
*
create_partitioning_metadata
)(
const
char
*
path
,
const
char
*
old_path
,
chf_create_flags
action_flag
);
};
};
...
@@ -1854,7 +1850,7 @@ handlerton *ha_default_tmp_handlerton(THD *thd);
...
@@ -1854,7 +1850,7 @@ handlerton *ha_default_tmp_handlerton(THD *thd);
#define HTON_TRUNCATE_REQUIRES_EXCLUSIVE_USE (1 << 19)
#define HTON_TRUNCATE_REQUIRES_EXCLUSIVE_USE (1 << 19)
/*
/*
Used by mysql_inplace_alter_table() to decide if we should call
Used by mysql_inplace_alter_table() to decide if we should call
hton->notify_tabledef_changed() before commit (
MyRocks
) or after (InnoDB).
hton->notify_tabledef_changed() before commit (
S3
) or after (InnoDB).
*/
*/
#define HTON_REQUIRES_NOTIFY_TABLEDEF_CHANGED_AFTER_COMMIT (1 << 20)
#define HTON_REQUIRES_NOTIFY_TABLEDEF_CHANGED_AFTER_COMMIT (1 << 20)
...
@@ -4947,7 +4943,7 @@ class handler :public Sql_alloc
...
@@ -4947,7 +4943,7 @@ class handler :public Sql_alloc
*) Update SQL-layer data-dictionary by installing .FRM file for the new version
*) Update SQL-layer data-dictionary by installing .FRM file for the new version
of the table.
of the table.
*) Inform the storage engine about this change by calling the
*) Inform the storage engine about this change by calling the
hton::notify_table_changed()
hton::notify_table
def
_changed()
*) Destroy the Alter_inplace_info and handler_ctx objects.
*) Destroy the Alter_inplace_info and handler_ctx objects.
*/
*/
...
@@ -5637,7 +5633,6 @@ void ha_signal_ddl_recovery_done();
...
@@ -5637,7 +5633,6 @@ void ha_signal_ddl_recovery_done();
void
ha_signal_tc_log_recovery_done
();
void
ha_signal_tc_log_recovery_done
();
bool
ha_flush_logs
();
bool
ha_flush_logs
();
void
ha_drop_database
(
const
char
*
path
);
void
ha_drop_database
(
const
char
*
path
);
void
ha_checkpoint_state
(
bool
disable
);
void
ha_commit_checkpoint_request
(
void
*
cookie
,
void
(
*
pre_hook
)(
void
*
));
void
ha_commit_checkpoint_request
(
void
*
cookie
,
void
(
*
pre_hook
)(
void
*
));
int
ha_create_table
(
THD
*
thd
,
const
char
*
path
,
const
char
*
db
,
int
ha_create_table
(
THD
*
thd
,
const
char
*
path
,
const
char
*
db
,
const
char
*
table_name
,
HA_CREATE_INFO
*
create_info
,
const
char
*
table_name
,
HA_CREATE_INFO
*
create_info
,
...
...
sql/lock.cc
View file @
cb135edc
...
@@ -1133,9 +1133,7 @@ void Global_read_lock::unlock_global_read_lock(THD *thd)
...
@@ -1133,9 +1133,7 @@ void Global_read_lock::unlock_global_read_lock(THD *thd)
{
{
thd
->
global_disable_checkpoint
=
0
;
thd
->
global_disable_checkpoint
=
0
;
if
(
!--
global_disable_checkpoint
)
if
(
!--
global_disable_checkpoint
)
{
ha_disable_internal_writes
(
0
);
// Enable checkpoints
ha_checkpoint_state
(
0
);
// Enable checkpoints
}
}
}
thd
->
mdl_context
.
release_lock
(
m_mdl_global_read_lock
);
thd
->
mdl_context
.
release_lock
(
m_mdl_global_read_lock
);
...
...
sql/sql_reload.cc
View file @
cb135edc
...
@@ -678,6 +678,6 @@ static void disable_checkpoints(THD *thd)
...
@@ -678,6 +678,6 @@ static void disable_checkpoints(THD *thd)
{
{
thd
->
global_disable_checkpoint
=
1
;
thd
->
global_disable_checkpoint
=
1
;
if
(
!
global_disable_checkpoint
++
)
if
(
!
global_disable_checkpoint
++
)
ha_
checkpoint_state
(
1
);
// Disable checkpoints
ha_
disable_internal_writes
(
1
);
// Disable checkpoints
}
}
}
}
sql/sql_show.cc
View file @
cb135edc
...
@@ -9626,35 +9626,14 @@ bool get_schema_tables_result(JOIN *join,
...
@@ -9626,35 +9626,14 @@ bool get_schema_tables_result(JOIN *join,
DBUG_RETURN
(
result
);
DBUG_RETURN
(
result
);
}
}
struct
run_hton_fill_schema_table_args
{
TABLE_LIST
*
tables
;
COND
*
cond
;
};
static
my_bool
run_hton_fill_schema_table
(
THD
*
thd
,
plugin_ref
plugin
,
void
*
arg
)
{
struct
run_hton_fill_schema_table_args
*
args
=
(
run_hton_fill_schema_table_args
*
)
arg
;
handlerton
*
hton
=
plugin_hton
(
plugin
);
if
(
hton
->
fill_is_table
)
hton
->
fill_is_table
(
hton
,
thd
,
args
->
tables
,
args
->
cond
,
get_schema_table_idx
(
args
->
tables
->
schema_table
));
return
false
;
}
int
hton_fill_schema_table
(
THD
*
thd
,
TABLE_LIST
*
tables
,
COND
*
cond
)
int
hton_fill_schema_table
(
THD
*
thd
,
TABLE_LIST
*
tables
,
COND
*
cond
)
{
{
DBUG_ENTER
(
"hton_fill_schema_table"
);
DBUG_ENTER
(
"hton_fill_schema_table"
);
StringBuffer
<
STRING_BUFFER_USUAL_SIZE
>
str
(
system_charset_info
);
struct
run_hton_fill_schema_table_args
args
;
str
.
append
(
INFORMATION_SCHEMA_NAME
);
args
.
tables
=
tables
;
str
.
append
(
'.'
);
args
.
cond
=
cond
;
str
.
append
(
tables
->
schema_table
->
table_name
);
warn_deprecated
<
1107
>
(
thd
,
str
.
c_ptr
());
plugin_foreach
(
thd
,
run_hton_fill_schema_table
,
MYSQL_STORAGE_ENGINE_PLUGIN
,
&
args
);
DBUG_RETURN
(
0
);
DBUG_RETURN
(
0
);
}
}
...
...
storage/maria/ha_maria.cc
View file @
cb135edc
...
@@ -3674,10 +3674,9 @@ bool maria_flush_logs(handlerton *hton)
...
@@ -3674,10 +3674,9 @@ bool maria_flush_logs(handlerton *hton)
}
}
int
maria_checkpoint_state
(
handlerton
*
hton
,
bool
disabled
)
void
maria_checkpoint_state
(
bool
disabled
)
{
{
maria_checkpoint_disabled
=
(
my_bool
)
disabled
;
maria_checkpoint_disabled
=
(
my_bool
)
disabled
;
return
0
;
}
}
...
@@ -3903,7 +3902,7 @@ static int ha_maria_init(void *p)
...
@@ -3903,7 +3902,7 @@ static int ha_maria_init(void *p)
maria_hton
->
tablefile_extensions
=
ha_maria_exts
;
maria_hton
->
tablefile_extensions
=
ha_maria_exts
;
maria_hton
->
commit
=
maria_commit
;
maria_hton
->
commit
=
maria_commit
;
maria_hton
->
rollback
=
maria_rollback
;
maria_hton
->
rollback
=
maria_rollback
;
maria_hton
->
checkpoint_state
=
maria_checkpoint_state
;
maria_hton
->
disable_internal_writes
=
maria_checkpoint_state
;
maria_hton
->
flush_logs
=
maria_flush_logs
;
maria_hton
->
flush_logs
=
maria_flush_logs
;
maria_hton
->
show_status
=
maria_show_status
;
maria_hton
->
show_status
=
maria_show_status
;
maria_hton
->
prepare_for_backup
=
maria_prepare_for_backup
;
maria_hton
->
prepare_for_backup
=
maria_prepare_for_backup
;
...
...
storage/maria/ha_s3.cc
View file @
cb135edc
...
@@ -1054,7 +1054,7 @@ static int ha_s3_init(void *p)
...
@@ -1054,7 +1054,7 @@ static int ha_s3_init(void *p)
s3_hton
->
tablefile_extensions
=
no_exts
;
s3_hton
->
tablefile_extensions
=
no_exts
;
s3_hton
->
commit
=
0
;
s3_hton
->
commit
=
0
;
s3_hton
->
rollback
=
0
;
s3_hton
->
rollback
=
0
;
s3_hton
->
checkpoint_state
=
0
;
s3_hton
->
disable_internal_writes
=
0
;
s3_hton
->
flush_logs
=
0
;
s3_hton
->
flush_logs
=
0
;
s3_hton
->
show_status
=
0
;
s3_hton
->
show_status
=
0
;
s3_hton
->
prepare_for_backup
=
0
;
s3_hton
->
prepare_for_backup
=
0
;
...
...
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