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
b014720b
Commit
b014720b
authored
Jun 14, 2020
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
optimization: use hton->drop_table in few simple cases
parent
c55c2928
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
24 additions
and
3 deletions
+24
-3
sql/log.cc
sql/log.cc
+1
-0
storage/blackhole/ha_blackhole.cc
storage/blackhole/ha_blackhole.cc
+1
-0
storage/example/ha_example.cc
storage/example/ha_example.cc
+1
-0
storage/federated/ha_federated.cc
storage/federated/ha_federated.cc
+1
-0
storage/federatedx/ha_federatedx.cc
storage/federatedx/ha_federatedx.cc
+1
-0
storage/heap/ha_heap.cc
storage/heap/ha_heap.cc
+9
-3
storage/myisam/ha_myisam.cc
storage/myisam/ha_myisam.cc
+6
-0
storage/oqgraph/ha_oqgraph.cc
storage/oqgraph/ha_oqgraph.cc
+1
-0
storage/perfschema/ha_perfschema.cc
storage/perfschema/ha_perfschema.cc
+1
-0
storage/sequence/sequence.cc
storage/sequence/sequence.cc
+1
-0
storage/sphinx/ha_sphinx.cc
storage/sphinx/ha_sphinx.cc
+1
-0
No files found.
sql/log.cc
View file @
b014720b
...
...
@@ -1692,6 +1692,7 @@ int binlog_init(void *p)
binlog_savepoint_rollback_can_release_mdl
;
binlog_hton
->
commit
=
binlog_commit
;
binlog_hton
->
rollback
=
binlog_rollback
;
binlog_hton
->
drop_table
=
[](
handlerton
*
,
const
char
*
)
{
return
0
;
};
if
(
WSREP_ON
||
opt_bin_log
)
{
binlog_hton
->
prepare
=
binlog_prepare
;
...
...
storage/blackhole/ha_blackhole.cc
View file @
b014720b
...
...
@@ -399,6 +399,7 @@ static int blackhole_init(void *p)
blackhole_hton
=
(
handlerton
*
)
p
;
blackhole_hton
->
db_type
=
DB_TYPE_BLACKHOLE_DB
;
blackhole_hton
->
create
=
blackhole_create_handler
;
blackhole_hton
->
drop_table
=
[](
handlerton
*
,
const
char
*
)
{
return
0
;
};
blackhole_hton
->
flags
=
HTON_CAN_RECREATE
|
HTON_AUTOMATIC_DELETE_TABLE
;
mysql_mutex_init
(
bh_key_mutex_blackhole
,
...
...
storage/example/ha_example.cc
View file @
b014720b
...
...
@@ -262,6 +262,7 @@ static int example_init_func(void *p)
example_hton
->
table_options
=
example_table_option_list
;
example_hton
->
field_options
=
example_field_option_list
;
example_hton
->
tablefile_extensions
=
ha_example_exts
;
example_hton
->
drop_table
=
[](
handlerton
*
,
const
char
*
)
{
return
0
;
};
DBUG_RETURN
(
0
);
}
...
...
storage/federated/ha_federated.cc
View file @
b014720b
...
...
@@ -484,6 +484,7 @@ int federated_db_init(void *p)
federated_hton
->
commit
=
federated_commit
;
federated_hton
->
rollback
=
federated_rollback
;
federated_hton
->
create
=
federated_create_handler
;
federated_hton
->
drop_table
=
[](
handlerton
*
,
const
char
*
)
{
return
0
;
};
federated_hton
->
flags
=
(
HTON_ALTER_NOT_SUPPORTED
|
HTON_NO_PARTITION
|
HTON_AUTOMATIC_DELETE_TABLE
);
...
...
storage/federatedx/ha_federatedx.cc
View file @
b014720b
...
...
@@ -438,6 +438,7 @@ int federatedx_db_init(void *p)
federatedx_hton
->
rollback
=
ha_federatedx
::
rollback
;
federatedx_hton
->
discover_table_structure
=
ha_federatedx
::
discover_assisted
;
federatedx_hton
->
create
=
federatedx_create_handler
;
federatedx_hton
->
drop_table
=
[](
handlerton
*
,
const
char
*
)
{
return
0
;
};
federatedx_hton
->
flags
=
(
HTON_ALTER_NOT_SUPPORTED
|
HTON_AUTOMATIC_DELETE_TABLE
);
federatedx_hton
->
create_derived
=
create_federatedx_derived_handler
;
...
...
storage/heap/ha_heap.cc
View file @
b014720b
...
...
@@ -34,12 +34,18 @@ heap_prepare_hp_create_info(TABLE *table_arg, bool internal_table,
HP_CREATE_INFO
*
hp_create_info
);
int
heap_panic
(
handlerton
*
hton
,
ha_panic_function
flag
)
static
int
heap_panic
(
handlerton
*
hton
,
ha_panic_function
flag
)
{
return
hp_panic
(
flag
);
}
static
int
heap_drop_table
(
handlerton
*
hton
,
const
char
*
path
)
{
int
error
=
heap_delete_table
(
path
);
return
error
==
ENOENT
?
0
:
error
;
}
int
heap_init
(
void
*
p
)
{
handlerton
*
heap_hton
;
...
...
@@ -50,6 +56,7 @@ int heap_init(void *p)
heap_hton
->
db_type
=
DB_TYPE_HEAP
;
heap_hton
->
create
=
heap_create_handler
;
heap_hton
->
panic
=
heap_panic
;
heap_hton
->
drop_table
=
heap_drop_table
;
heap_hton
->
flags
=
HTON_CAN_RECREATE
;
return
0
;
...
...
@@ -559,8 +566,7 @@ THR_LOCK_DATA **ha_heap::store_lock(THD *thd,
int
ha_heap
::
delete_table
(
const
char
*
name
)
{
int
error
=
heap_delete_table
(
name
);
return
error
==
ENOENT
?
0
:
error
;
return
heap_drop_table
(
0
,
name
);
}
...
...
storage/myisam/ha_myisam.cc
View file @
b014720b
...
...
@@ -2512,6 +2512,11 @@ int myisam_panic(handlerton *hton, ha_panic_function flag)
return
mi_panic
(
flag
);
}
static
int
myisam_drop_table
(
handlerton
*
hton
,
const
char
*
path
)
{
return
mi_delete_table
(
path
);
}
static
int
myisam_init
(
void
*
p
)
{
handlerton
*
hton
;
...
...
@@ -2529,6 +2534,7 @@ static int myisam_init(void *p)
hton
=
(
handlerton
*
)
p
;
hton
->
db_type
=
DB_TYPE_MYISAM
;
hton
->
create
=
myisam_create_handler
;
hton
->
drop_table
=
myisam_drop_table
;
hton
->
panic
=
myisam_panic
;
hton
->
flags
=
HTON_CAN_RECREATE
|
HTON_SUPPORT_LOG_TABLES
;
hton
->
tablefile_extensions
=
ha_myisam_exts
;
...
...
storage/oqgraph/ha_oqgraph.cc
View file @
b014720b
...
...
@@ -192,6 +192,7 @@ static int oqgraph_init(void *p)
hton
->
discover_table_structure
=
oqgraph_discover_table_structure
;
hton
->
close_connection
=
oqgraph_close_connection
;
hton
->
drop_table
=
[](
handlerton
*
,
const
char
*
)
{
return
0
;
};
oqgraph_init_done
=
TRUE
;
return
0
;
...
...
storage/perfschema/ha_perfschema.cc
View file @
b014720b
...
...
@@ -94,6 +94,7 @@ static int pfs_init_func(void *p)
pfs_hton
=
reinterpret_cast
<
handlerton
*>
(
p
);
pfs_hton
->
create
=
pfs_create_handler
;
pfs_hton
->
drop_table
=
[](
handlerton
*
,
const
char
*
)
{
return
0
;
};
pfs_hton
->
show_status
=
pfs_show_status
;
pfs_hton
->
flags
=
(
HTON_ALTER_NOT_SUPPORTED
|
HTON_TEMPORARY_NOT_SUPPORTED
|
...
...
storage/sequence/sequence.cc
View file @
b014720b
...
...
@@ -502,6 +502,7 @@ static int init(void *p)
handlerton
*
hton
=
(
handlerton
*
)
p
;
sequence_hton
=
hton
;
hton
->
create
=
create_handler
;
hton
->
drop_table
=
[](
handlerton
*
,
const
char
*
)
{
return
0
;
};
hton
->
discover_table
=
discover_table
;
hton
->
discover_table_existence
=
discover_table_existence
;
hton
->
commit
=
hton
->
rollback
=
dummy_commit_rollback
;
...
...
storage/sphinx/ha_sphinx.cc
View file @
b014720b
...
...
@@ -749,6 +749,7 @@ static int sphinx_init_func ( void * p )
hton
->
close_connection
=
sphinx_close_connection
;
hton
->
show_status
=
sphinx_show_status
;
hton
->
panic
=
sphinx_panic
;
hton
->
drop_table
=
[](
handlerton
*
,
const
char
*
)
{
return
0
;
};
hton
->
flags
=
HTON_CAN_RECREATE
|
HTON_AUTOMATIC_DELETE_TABLE
;
#endif
}
...
...
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