summaryrefslogtreecommitdiff
path: root/plugin/type_geom
diff options
context:
space:
mode:
authorSergey Vojtovich <svoj@mariadb.org>2019-07-09 13:02:26 +0400
committerSergey Vojtovich <svoj@mariadb.org>2019-07-09 13:02:52 +0400
commit0940e25d69cea59d6026f894b1fd9a5ebb55378c (patch)
tree59d777f2f0b31725ca05dbaeb47755235840fb8a /plugin/type_geom
parenta179de04025443032745ee811a97d8da7afe8996 (diff)
downloadmariadb-git-0940e25d69cea59d6026f894b1fd9a5ebb55378c.tar.gz
MDEV-19991 Turn I_S tables GEOMETRY_COLUMNS and SPATIAL_REF_SYS into a plugin
Cleanups.
Diffstat (limited to 'plugin/type_geom')
-rw-r--r--plugin/type_geom/plugin.cc39
1 files changed, 6 insertions, 33 deletions
diff --git a/plugin/type_geom/plugin.cc b/plugin/type_geom/plugin.cc
index bcca9011bec..3e9f1fb5572 100644
--- a/plugin/type_geom/plugin.cc
+++ b/plugin/type_geom/plugin.cc
@@ -74,18 +74,11 @@ exit:
}
-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;
}