Commit 212ae15d authored by Sergei Golubchik's avatar Sergei Golubchik

cleanup: handlerton

remove unused methods, reorder methods, add comments
parent 82d00ec4
......@@ -2326,6 +2326,9 @@ LOGFILE_GROUP_NAME, FILE_NAME, ENGINE
ORDER BY
LOGFILE_GROUP_NAME;
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.
show status like 'Opened_tables';
Variable_name Value
......
......@@ -116,6 +116,10 @@ test/#################################################_long_
twenty_byte_db_name_/#################################################_long_
##################################################_long/#################################################_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
#
......
......@@ -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 <= 1005 ? MYSQL_VERSION_ID < 120100 : /* until 10.5 EOL */
V <= 1010 ? MYSQL_VERSION_ID < 120500 : /* until 10.6 EOL */
V <= 1106 ? MYSQL_VERSION_ID < 130400 : /* until 10.11 EOL */
V <= 1107 ? MYSQL_VERSION_ID < 130400 : /* until 10.11 EOL */
V == 999999, /* only for sys_var::do_deprecated_warning() */
"check_deprecated_version failed"
);
......
......@@ -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 {
void *cookie;
void (*pre_hook)(void *);
......
This diff is collapsed.
......@@ -1133,9 +1133,7 @@ void Global_read_lock::unlock_global_read_lock(THD *thd)
{
thd->global_disable_checkpoint= 0;
if (!--global_disable_checkpoint)
{
ha_checkpoint_state(0); // Enable checkpoints
}
ha_disable_internal_writes(0); // Enable checkpoints
}
thd->mdl_context.release_lock(m_mdl_global_read_lock);
......
......@@ -678,6 +678,6 @@ static void disable_checkpoints(THD *thd)
{
thd->global_disable_checkpoint= 1;
if (!global_disable_checkpoint++)
ha_checkpoint_state(1); // Disable checkpoints
ha_disable_internal_writes(1); // Disable checkpoints
}
}
......@@ -9626,35 +9626,14 @@ bool get_schema_tables_result(JOIN *join,
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)
{
DBUG_ENTER("hton_fill_schema_table");
struct run_hton_fill_schema_table_args args;
args.tables= tables;
args.cond= cond;
plugin_foreach(thd, run_hton_fill_schema_table,
MYSQL_STORAGE_ENGINE_PLUGIN, &args);
StringBuffer<STRING_BUFFER_USUAL_SIZE> str(system_charset_info);
str.append(INFORMATION_SCHEMA_NAME);
str.append('.');
str.append(tables->schema_table->table_name);
warn_deprecated<1107>(thd, str.c_ptr());
DBUG_RETURN(0);
}
......
......@@ -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;
return 0;
}
......@@ -3903,7 +3902,7 @@ static int ha_maria_init(void *p)
maria_hton->tablefile_extensions= ha_maria_exts;
maria_hton->commit= maria_commit;
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->show_status= maria_show_status;
maria_hton->prepare_for_backup= maria_prepare_for_backup;
......
......@@ -1054,7 +1054,7 @@ static int ha_s3_init(void *p)
s3_hton->tablefile_extensions= no_exts;
s3_hton->commit= 0;
s3_hton->rollback= 0;
s3_hton->checkpoint_state= 0;
s3_hton->disable_internal_writes= 0;
s3_hton->flush_logs= 0;
s3_hton->show_status= 0;
s3_hton->prepare_for_backup= 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment