mirror of
https://github.com/MariaDB/server.git
synced 2025-01-26 16:54:15 +01:00
cleanup: remove Type_collection::handler_by_name()
it's a hard-coded geometry-specific method, move it into geometry-specific function. Will go away in the future.
This commit is contained in:
parent
a4817e1520
commit
5bf80af06e
9 changed files with 4 additions and 49 deletions
plugin
sql
|
@ -176,13 +176,6 @@ public:
|
|||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
const Type_handler *handler_by_name(const LEX_CSTRING &name) const override
|
||||
{
|
||||
if (type_handler_mysql_json.name().eq(name))
|
||||
return &type_handler_mysql_json;
|
||||
return NULL;
|
||||
}
|
||||
};
|
||||
|
||||
const Type_collection *Type_handler_mysql_json::type_collection() const
|
||||
|
|
|
@ -31,11 +31,6 @@ protected:
|
|||
return NULL;
|
||||
}
|
||||
public:
|
||||
const Type_handler *handler_by_name(const LEX_CSTRING &name) const override
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
const Type_handler *aggregate_for_result(const Type_handler *h1,
|
||||
const Type_handler *h2)
|
||||
const override
|
||||
|
|
|
@ -26,10 +26,6 @@ protected:
|
|||
const Type_handler *aggregate_common(const Type_handler *h1,
|
||||
const Type_handler *h2) const;
|
||||
public:
|
||||
const Type_handler *handler_by_name(const LEX_CSTRING &name) const override
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
const Type_handler *aggregate_for_result(const Type_handler *h1,
|
||||
const Type_handler *h2)
|
||||
const override;
|
||||
|
|
|
@ -94,10 +94,6 @@ Vers_type_trx vers_type_trx;
|
|||
class Type_collection_std: public Type_collection
|
||||
{
|
||||
public:
|
||||
const Type_handler *handler_by_name(const LEX_CSTRING &name) const override
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
const Type_handler *aggregate_for_result(const Type_handler *a,
|
||||
const Type_handler *b)
|
||||
const override
|
||||
|
@ -137,10 +133,6 @@ public:
|
|||
{
|
||||
return false;
|
||||
}
|
||||
const Type_handler *handler_by_name(const LEX_CSTRING &name) const override
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
const Type_handler *aggregate_for_result(const Type_handler *a,
|
||||
const Type_handler *b)
|
||||
const override
|
||||
|
@ -212,7 +204,7 @@ Type_handler::handler_by_name(THD *thd, const LEX_CSTRING &name)
|
|||
}
|
||||
|
||||
#ifdef HAVE_SPATIAL
|
||||
const Type_handler *ha= type_collection_geometry.handler_by_name(name);
|
||||
const Type_handler *ha= Type_collection_geometry_handler_by_name(name);
|
||||
if (ha)
|
||||
return ha;
|
||||
#endif
|
||||
|
|
|
@ -7415,7 +7415,6 @@ class Type_collection
|
|||
public:
|
||||
virtual ~Type_collection() = default;
|
||||
virtual bool init(Type_handler_data *) { return false; }
|
||||
virtual const Type_handler *handler_by_name(const LEX_CSTRING &name) const= 0;
|
||||
virtual const Type_handler *aggregate_for_result(const Type_handler *h1,
|
||||
const Type_handler *h2)
|
||||
const= 0;
|
||||
|
|
|
@ -1892,13 +1892,6 @@ public:
|
|||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
const Type_handler *handler_by_name(const LEX_CSTRING &name) const override
|
||||
{
|
||||
if (type_handler_fbt()->name().eq(name))
|
||||
return type_handler_fbt();
|
||||
return NULL;
|
||||
}
|
||||
};
|
||||
static Type_handler_fbt *type_handler_fbt()
|
||||
{
|
||||
|
|
|
@ -67,7 +67,7 @@ Type_handler_geometry::type_handler_geom_by_type(uint type)
|
|||
|
||||
|
||||
const Type_handler *
|
||||
Type_collection_geometry::handler_by_name(const LEX_CSTRING &name) const
|
||||
Type_collection_geometry_handler_by_name(const LEX_CSTRING &name)
|
||||
{
|
||||
if (type_handler_point.name().eq(name))
|
||||
return &type_handler_point;
|
||||
|
|
|
@ -297,7 +297,6 @@ class Type_collection_geometry: public Type_collection
|
|||
#endif
|
||||
public:
|
||||
bool init(Type_handler_data *data) override;
|
||||
const Type_handler *handler_by_name(const LEX_CSTRING &name) const override;
|
||||
const Type_handler *aggregate_for_result(const Type_handler *a,
|
||||
const Type_handler *b)
|
||||
const override;
|
||||
|
@ -316,6 +315,8 @@ public:
|
|||
};
|
||||
|
||||
extern Type_collection_geometry type_collection_geometry;
|
||||
const Type_handler *
|
||||
Type_collection_geometry_handler_by_name(const LEX_CSTRING &name);
|
||||
|
||||
#include "field.h"
|
||||
|
||||
|
|
|
@ -233,20 +233,6 @@ public:
|
|||
*/
|
||||
return NULL;
|
||||
}
|
||||
|
||||
const Type_handler *handler_by_name(const LEX_CSTRING &name) const override
|
||||
{
|
||||
/*
|
||||
Name resolution is not needed yet.
|
||||
JSON is not fully pluggable at the moment:
|
||||
- It is parsed using a hard-coded rule in sql_yacc.yy
|
||||
- It does not store extended data type information into
|
||||
FRM file yet. JSON is detected by CHECK(JSON_VALID(col))
|
||||
and this detection is also hard-coded.
|
||||
This will change in the future.
|
||||
*/
|
||||
return NULL;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue