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
0940e25d
Commit
0940e25d
authored
Jul 09, 2019
by
Sergey Vojtovich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-19991 Turn I_S tables GEOMETRY_COLUMNS and SPATIAL_REF_SYS into a plugin
Cleanups.
parent
a179de04
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
35 deletions
+7
-35
plugin/type_geom/plugin.cc
plugin/type_geom/plugin.cc
+6
-33
sql/sql_show.cc
sql/sql_show.cc
+1
-1
sql/sql_show.h
sql/sql_show.h
+0
-1
No files found.
plugin/type_geom/plugin.cc
View file @
0940e25d
...
...
@@ -74,18 +74,11 @@ static int spatial_ref_sys_fill(THD *thd, TABLE_LIST *tables, COND *cond)
}
static
int
fill_table_spatial_ref_sys
(
THD
*
thd
,
TABLE_LIST
*
tables
,
COND
*
cond
)
{
spatial_ref_sys_fill
(
thd
,
tables
,
cond
);
return
0
;
}
static
int
plugin_init_spatial_ref_sys
(
void
*
p
)
{
ST_SCHEMA_TABLE
*
schema
=
(
ST_SCHEMA_TABLE
*
)
p
;
schema
->
fields_info
=
spatial_ref_sys_fields_info
;
schema
->
fill_table
=
fill_table_spatial_ref_sys
;
schema
->
fill_table
=
spatial_ref_sys_fill
;
return
0
;
}
...
...
@@ -203,35 +196,15 @@ static int get_geometry_column_record(THD *thd, TABLE_LIST *tables,
}
static
ST_SCHEMA_TABLE
geometry_columns
=
{
"GEOMETRY_COLUMNS"
,
// table_name
geometry_columns_fields_info
,
// fields_info
0
,
// reset_table
NULL
,
// fill_table
NULL
,
// old_format
get_geometry_column_record
,
// process_table
1
,
// idx_field1
2
,
// idx_field2
0
,
// hidden
OPTIMIZE_I_S_TABLE
|
OPEN_VIEW_FULL
// i_s_requested_object
};
static
int
fill_table_geometry_columns
(
THD
*
thd
,
TABLE_LIST
*
tables
,
COND
*
cond
)
{
tables
->
schema_table
=
&
geometry_columns
;
optimize_for_get_all_tables
(
thd
,
tables
,
cond
);
get_all_tables
(
thd
,
tables
,
cond
);
return
0
;
}
static
int
plugin_init_geometry_columns
(
void
*
p
)
{
ST_SCHEMA_TABLE
*
schema
=
(
ST_SCHEMA_TABLE
*
)
p
;
schema
->
fields_info
=
geometry_columns_fields_info
;
schema
->
fill_table
=
fill_table_geometry_columns
;
schema
->
fill_table
=
get_all_tables
;
schema
->
process_table
=
get_geometry_column_record
;
schema
->
idx_field1
=
1
;
schema
->
idx_field2
=
2
;
schema
->
i_s_requested_object
=
OPTIMIZE_I_S_TABLE
|
OPEN_VIEW_FULL
;
return
0
;
}
...
...
sql/sql_show.cc
View file @
0940e25d
...
...
@@ -8417,7 +8417,7 @@ int make_schema_select(THD *thd, SELECT_LEX *sel,
*/
bool
optimize_for_get_all_tables
(
THD
*
thd
,
TABLE_LIST
*
tables
,
COND
*
cond
)
static
bool
optimize_for_get_all_tables
(
THD
*
thd
,
TABLE_LIST
*
tables
,
COND
*
cond
)
{
SELECT_LEX
*
lsel
=
tables
->
schema_select_lex
;
ST_SCHEMA_TABLE
*
schema_table
=
tables
->
schema_table
;
...
...
sql/sql_show.h
View file @
0940e25d
...
...
@@ -78,7 +78,6 @@ typedef struct system_status_var STATUS_VAR;
typedef
enum
{
WITHOUT_DB_NAME
,
WITH_DB_NAME
}
enum_with_db_name
;
int
get_all_tables
(
THD
*
thd
,
TABLE_LIST
*
tables
,
COND
*
cond
);
bool
optimize_for_get_all_tables
(
THD
*
thd
,
TABLE_LIST
*
tables
,
COND
*
cond
);
int
show_create_table
(
THD
*
thd
,
TABLE_LIST
*
table_list
,
String
*
packet
,
Table_specification_st
*
create_info_arg
,
...
...
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